/*
 howler.js v2.1.1 | (c) 2013-2018, James Simpson of GoldFire Studios | MIT License | howlerjs.com  Spatial Plugin  @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(ma,w,N){if(null==ma)throw new TypeError("The 'this' value for String.prototype."+N+" must not be null or undefined");if(w instanceof RegExp)throw new TypeError("First argument to String.prototype."+N+" must not be a regular expression");return ma+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(ma,w,N){ma!=Array.prototype&&ma!=Object.prototype&&(ma[w]=N.value)};$jscomp.getGlobal=function(ma){ma=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,ma];for(var w=0;w<ma.length;++w){var N=ma[w];if(N&&N.Math==Math)return N}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(ma,w,N,E){if(w){N=$jscomp.global;ma=ma.split(".");for(E=0;E<ma.length-1;E++){var V=ma[E];V in N||(N[V]={});N=N[V]}ma=ma[ma.length-1];E=N[ma];w=w(E);w!=E&&null!=w&&$jscomp.defineProperty(N,ma,{configurable:!0,writable:!0,value:w})}};
$jscomp.polyfill("String.prototype.endsWith",function(ma){return ma?ma:function(w,N){var E=$jscomp.checkStringArgs(this,w,"endsWith");w+="";void 0===N&&(N=E.length);N=Math.max(0,Math.min(N|0,E.length));for(var V=w.length;0<V&&0<N;)if(E[--N]!=w[--V])return!1;return 0>=V}},"es6","es3");
$jscomp.polyfill("String.fromCodePoint",function(ma){return ma?ma:function(w){for(var N="",E=0;E<arguments.length;E++){var V=Number(arguments[E]);if(0>V||1114111<V||V!==Math.floor(V))throw new RangeError("invalid_code_point "+V);65535>=V?N+=String.fromCharCode(V):(V-=65536,N+=String.fromCharCode(V>>>10&1023|55296),N+=String.fromCharCode(V&1023|56320))}return N}},"es6","es3");$jscomp.arrayIteratorImpl=function(ma){var w=0;return function(){return w<ma.length?{done:!1,value:ma[w++]}:{done:!0}}};
$jscomp.arrayIterator=function(ma){return{next:$jscomp.arrayIteratorImpl(ma)}};$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.SymbolClass=function(ma,w){this.$jscomp$symbol$id_=ma;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:w})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};
$jscomp.Symbol=function(){function ma(N){if(this instanceof ma)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(N||"")+"_"+w++,N)}var w=0;return ma}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var ma=$jscomp.global.Symbol.iterator;ma||(ma=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[ma]&&$jscomp.defineProperty(Array.prototype,ma,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var ma=$jscomp.global.Symbol.asyncIterator;ma||(ma=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(ma){$jscomp.initSymbolIterator();ma={next:ma};ma[$jscomp.global.Symbol.iterator]=function(){return this};return ma};
$jscomp.iteratorFromArray=function(ma,w){$jscomp.initSymbolIterator();ma instanceof String&&(ma+="");var N=0,E={next:function(){if(N<ma.length){var V=N++;return{value:w(V,ma[V]),done:!1}}E.next=function(){return{done:!0,value:void 0}};return E.next()}};E[Symbol.iterator]=function(){return E};return E};$jscomp.polyfill("Array.prototype.keys",function(ma){return ma?ma:function(){return $jscomp.iteratorFromArray(this,function(w){return w})}},"es6","es3");
$jscomp.polyfill("String.prototype.startsWith",function(ma){return ma?ma:function(w,N){var E=$jscomp.checkStringArgs(this,w,"startsWith");w+="";var V=E.length,ra=w.length;N=Math.max(0,Math.min(N|0,E.length));for(var u=0;u<ra&&N<V;)if(E[N++]!=w[u++])return!1;return u>=ra}},"es6","es3");$jscomp.polyfill("Array.prototype.values",function(ma){return ma?ma:function(){return $jscomp.iteratorFromArray(this,function(w,N){return N})}},"es8","es3");
$jscomp.polyfill("String.prototype.codePointAt",function(ma){return ma?ma:function(w){var N=$jscomp.checkStringArgs(this,null,"codePointAt"),E=N.length;w=Number(w)||0;if(0<=w&&w<E){w|=0;var V=N.charCodeAt(w);if(55296>V||56319<V||w+1===E)return V;w=N.charCodeAt(w+1);return 56320>w||57343<w?V:1024*(V-55296)+w+9216}}},"es6","es3");
$jscomp.polyfill("Array.prototype.fill",function(ma){return ma?ma:function(w,N,E){var V=this.length||0;0>N&&(N=Math.max(0,V+N));if(null==E||E>V)E=V;E=Number(E);0>E&&(E=Math.max(0,V+E));for(N=Number(N||0);N<E;N++)this[N]=w;return this}},"es6","es3");
$jscomp.polyfill("String.prototype.repeat",function(ma){return ma?ma:function(w){var N=$jscomp.checkStringArgs(this,null,"repeat");if(0>w||1342177279<w)throw new RangeError("Invalid count value");w|=0;for(var E="";w;)if(w&1&&(E+=N),w>>>=1)N+=N;return E}},"es6","es3");
(function(ma,w){ma.lime=ma.lime||{};ma.lime.$scripts=ma.lime.$scripts||{};ma.lime.$scripts.mechhrevised=function(w,E){(function(w,N){function u(a,b){a=Object.create(a);for(var c in b)a[c]=b[c];b.toString!==Object.prototype.toString&&(a.toString=b.toString);return a}function E(a){return a instanceof Array?new se(a):a.iterator()}function r(a,b){if(null==b)return null;null==b.__id__&&(b.__id__=N.$haxeUID++);var c;null==a.hx__closures__?a.hx__closures__={}:c=a.hx__closures__[b.__id__];null==c&&(c=b.bind(a),
a.hx__closures__[b.__id__]=c);return c}w.lime=w.lime||{};var k={},v=function(){return U.__string_rec(this,"")},x=x||{},C,Ba=function(){};k.ApplicationMain=Ba;Ba.__name__="ApplicationMain";Ba.main=function(){Ba.configureTracing();ha.load();M.loadInputConfig();Qa.__registerEntryPoint("mechhrevised",Ba.create);Da.get_current()};Ba.reloadGame=function(){for(var a=0,b=Ba.extensions;a<b.length;){var c=b[a];++a;c.reloadGame()}a=0;for(b=Ba.reloadListeners;a<b.length;)c=b[a],++a,c();n.resetStatics();Ld.resetStatics();
tb.resetStatics();Af.resetStatics();Lb.resetStatics();Xb.resetStatics();ne.resetStatics();tc.resetStatics();Md.resetStatics();Bf.resetStatics();ke.resetStatics();vb.resetStatics();W.resetStatics();bc.resetStatics();M.resetStatics();q.resetStatics();Da.get_current().removeChild(Ba.universal);M.loadInputConfig();Ba.universal=new xa;Da.get_current().addChild(Ba.universal);Ba.preloaderComplete()};Ba.create=function(a){Ba.app=new ej;ra.init(a);Ba.app.meta.h.build="1";Ba.app.meta.h.company="Stencyl";Ba.app.meta.h.file=
"mechhrevised";Ba.app.meta.h.name="mechhrevised";Ba.app.meta.h.packageName="com.example.myapp";Ba.app.meta.h.version="1.0.0";var b={allowHighDPI:!1,alwaysOnTop:!1,borderless:!1,element:null,frameRate:65,height:480,hidden:!1,maximized:!1,minimized:!1,parameters:{},resizable:!1,title:"mechhrevised",width:640,x:null,y:null};b.context={antialiasing:ha.antialias?2:0,background:0,colorDepth:32,depth:!0,hardware:!0,stencil:!0,type:null,vsync:!0};if(null==Ba.app.__window&&null!=a)for(var c=0,d=X.fields(a);c<
d.length;){var e=d[c];++c;Object.prototype.hasOwnProperty.call(b,e)?b[e]=X.field(a,e):Object.prototype.hasOwnProperty.call(b.context,e)&&(b.context[e]=X.field(a,e))}Ba.app.createWindow(b);ha.releaseMode||Da.get_current().get_loaderInfo().uncaughtErrorEvents.addEventListener("uncaughtError",Ba.uncaughtErrorHandler);xa.initWindow(Ba.app.__window);Ba.universal=new xa;Da.get_current().addChild(Ba.universal);Ba.extensions=[];q.am=Ba;c=new ok;c.onComplete.add(Ba.preloaderComplete);Ba.app.__preloader.onProgress.add(r(c,
c.onUpdate));Ba.app.__preloader.onComplete.add(r(c,c.onLoaded));c=0;for(d=ra.preloadLibraries;c<d.length;)a=d[c],++c,Ba.app.__preloader.addLibrary(a);c=0;for(d=ra.preloadLibraryNames;c<d.length;)a=d[c],++c,Ba.app.__preloader.addLibraryName(a);var f=new pk;f.onComplete.add(function(){f.isLocked()||Ba.app.__preloader.load()});f.checkSiteLock();Ba.app.exec()};Ba.preloaderComplete=function(){try{new q(Ba.universal,Ba.extensions)}catch(b){var a=J.caught(b);Da.get_current().stage.__handleError(a)}};Ba.configureTracing=
function(){mf.trace=function(a,b){};Q.level=0};Ba.uncaughtErrorHandler=function(a){a.error instanceof wc?(a=U.__cast(a.error,wc),Q.fullError(a.get_message(),a,{fileName:"Export/html5/haxe/ApplicationMain.hx",lineNumber:478,className:"ApplicationMain",methodName:"uncaughtErrorHandler"})):a.error instanceof te?(a=U.__cast(a.error,te),Q.error(a.text,{fileName:"Export/html5/haxe/ApplicationMain.hx",lineNumber:484,className:"ApplicationMain",methodName:"uncaughtErrorHandler"})):Q.error(A.string(a.error),
{fileName:"Export/html5/haxe/ApplicationMain.hx",lineNumber:488,className:"ApplicationMain",methodName:"uncaughtErrorHandler"})};var aa=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};k.EReg=aa;aa.__name__="EReg";aa.prototype={r:null,match:function(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return null!=this.r.m},matched:function(a){if(null!=this.r.m&&0<=a&&a<this.r.m.length)return this.r.m[a];throw J.thrown("EReg::matched");},matchedRight:function(){if(null==
this.r.m)throw J.thrown("No string matched");var a=this.r.m.index+this.r.m[0].length;return I.substr(this.r.s,a,this.r.s.length-a)},matchedPos:function(){if(null==this.r.m)throw J.thrown("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(a,b,c){null==c&&(c=-1);if(this.r.global){if(this.r.lastIndex=b,this.r.m=this.r.exec(0>c?a:I.substr(a,0,b+c)),c=null!=this.r.m)this.r.s=a}else if(c=this.match(0>c?I.substr(a,b,null):I.substr(a,b,c)))this.r.s=a,this.r.m.index+=
b;return c},split:function(a){return a.replace(this.r,"#__delim__#").split("#__delim__#")},map:function(a,b){for(var c=0,d="";!(c>=a.length);){if(!this.matchSub(a,c)){d+=A.string(I.substr(a,c,null));break}var e=this.matchedPos();d+=A.string(I.substr(a,c,e.pos-c));d+=A.string(b(this));0==e.len?(d+=A.string(I.substr(a,e.pos,1)),c=e.pos+1):c=e.pos+e.len;if(!this.r.global)break}!this.r.global&&0<c&&c<a.length&&(d+=A.string(I.substr(a,c,null)));return d},__class__:aa};var I=function(){};k.HxOverrides=
I;I.__name__="HxOverrides";I.strDate=function(a){switch(a.length){case 8:a=a.split(":");var b=new Date;b.setTime(0);b.setUTCHours(a[0]);b.setUTCMinutes(a[1]);b.setUTCSeconds(a[2]);return b;case 10:return a=a.split("-"),new Date(a[0],a[1]-1,a[2],0,0,0);case 19:return a=a.split(" "),b=a[0].split("-"),a=a[1].split(":"),new Date(b[0],b[1]-1,b[2],a[0],a[1],a[2]);default:throw J.thrown("Invalid date format : "+a);}};I.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};I.substr=function(a,b,c){if(null==
c)c=a.length;else if(0>c)if(0==b)c=a.length+c;else return"";return a.substr(b,c)};I.remove=function(a,b){b=a.indexOf(b);if(-1==b)return!1;a.splice(b,1);return!0};I.now=function(){return Date.now()};var V=function(a,b){this.min=a;this.max=b};k.IntIterator=V;V.__name__="IntIterator";V.prototype={min:null,max:null,hasNext:function(){return this.min<this.max},next:function(){return this.min++},__class__:V};var Uc=function(){};k.Lambda=Uc;Uc.__name__="Lambda";Uc.array=function(a){var b=[];for(a=E(a);a.hasNext();){var c=
a.next();b.push(c)}return b};Uc.exists=function(a,b){for(a=E(a);a.hasNext();){var c=a.next();if(b(c))return!0}return!1};Uc.count=function(a,b){var c=0;if(null==b)for(b=E(a);b.hasNext();)b.next(),++c;else for(a=E(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};Uc.indexOf=function(a,b){var c=0;for(a=E(a);a.hasNext();){var d=a.next();if(b==d)return c;++c}return-1};var ra=function(){};k.ManifestResources=ra;ra.__name__="ManifestResources";ra.init=function(a){ra.preloadLibraries=[];ra.preloadLibraryNames=
[];ra.rootPath=null;null!=a&&Object.prototype.hasOwnProperty.call(a,"rootPath")&&(ra.rootPath=X.field(a,"rootPath"),R.endsWith(ra.rootPath,"/")||(ra.rootPath+="/"));null==ra.rootPath&&(ra.rootPath="./");a=Jc.parse('{"name":null,"assets":"aoy8:positioni15y4:sizezy4:typey4:TEXTy2:idy36:assets%2Fgraphics%2F1x%2Ffont-28.fnty6:lengthi1268goR0i1283R1zR2y5:IMAGER4y36:assets%2Fgraphics%2F1x%2Ffont-28.pngR6i18240y7:preloadtgoR0i19523R1zR2R3R4y36:assets%2Fgraphics%2F1x%2Ffont-29.fntR6i1498goR0i21021R1zR2R7R4y36:assets%2Fgraphics%2F1x%2Ffont-29.pngR6i150839R9tgoR0i171860R1zR2R3R4y36:assets%2Fgraphics%2F1x%2Ffont-30.fntR6i467goR0i172327R1zR2R7R4y36:assets%2Fgraphics%2F1x%2Ffont-30.pngR6i44881R9tgoR0i217208R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-14-0.pngR6i623R9tgoR0i217831R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-14-1.pngR6i1750R9tgoR0i219581R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-14-2.pngR6i613R9tgoR0i220194R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-14-3.pngR6i472R9tgoR0i220666R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-16-0.pngR6i134954R9tgoR0i355620R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-18-0.pngR6i3072R9tgoR0i358692R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-189-0.pngR6i282R9tgoR0i358974R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-191-0.pngR6i310R9tgoR0i359284R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-193-0.pngR6i268R9tgoR0i359552R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-195-0.pngR6i1849R9tgoR0i361401R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-197-0.pngR6i272R9tgoR0i361673R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-199-0.pngR6i894R9tgoR0i362567R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-0.pngR6i994R9tgoR0i363561R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-1.pngR6i3058R9tgoR0i366619R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-2.pngR6i3109R9tgoR0i369728R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-3.pngR6i2972R9tgoR0i372700R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-4.pngR6i3351R9tgoR0i376051R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-5.pngR6i3971R9tgoR0i380022R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-6.pngR6i3736R9tgoR0i383758R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-7.pngR6i3984R9tgoR0i387742R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-2-8.pngR6i4242R9tgoR0i391984R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-20-0.pngR6i2169R9tgoR0i394153R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-201-0.pngR6i797R9tgoR0i394950R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-203-0.pngR6i1604R9tgoR0i396554R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-207-0.pngR6i6198R9tgoR0i402752R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-209-0.pngR6i4103R9tgoR0i406855R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-209-1.pngR6i4421R9tgoR0i411276R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-209-2.pngR6i4498R9tgoR0i415774R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-209-3.pngR6i4431R9tgoR0i420205R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-211-0.pngR6i797R9tgoR0i421002R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-213-0.pngR6i6198R9tgoR0i427200R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-215-0.pngR6i6198R9tgoR0i433398R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-219-0.pngR6i2169R9tgoR0i435567R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-221-0.pngR6i1224R9tgoR0i436791R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-223-0.pngR6i6198R9tgoR0i442989R1zR2R7R4y41:assets%2Fgraphics%2F1x%2Fsprite-225-0.pngR6i173R9tgoR0i443162R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-25-0.pngR6i797R9tgoR0i443959R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-25-1.pngR6i276R9tgoR0i444235R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-27-0.pngR6i797R9tgoR0i445032R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-27-1.pngR6i258R9tgoR0i445290R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-33-0.pngR6i227804R9tgoR0i673094R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-35-0.pngR6i650R9tgoR0i673744R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-37-0.pngR6i162R9tgoR0i673906R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-39-0.pngR6i183R9tgoR0i674089R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-4-0.pngR6i16167R9tgoR0i690256R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Fsprite-4-1.pngR6i797R9tgoR0i691053R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-41-0.pngR6i126R9tgoR0i691179R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-71-0.pngR6i160R9tgoR0i691339R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Fsprite-73-0.pngR6i6198R9tgoR0i697537R1zR2R7R4y38:assets%2Fgraphics%2F1x%2Ftileset-0.pngR6i27066R9tgoR0i724603R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Ftileset-204.pngR6i74175R9tgoR0i798778R1zR2R7R4y40:assets%2Fgraphics%2F1x%2Ftileset-205.pngR6i93R9tgoR0i798871R1zR2R7R4y39:assets%2Fgraphics%2F1x%2Ftileset-31.pngR6i7528R9tgoR0i806399R1zR2R3R4y36:assets%2Fgraphics%2Fdefault-font.fntR6i1057goR0i807456R1zR2R7R4y36:assets%2Fgraphics%2Fdefault-font.pngR6i1759R9tgoR1i3305221R2y5:MUSICR4y29:assets%2Fmusic%2Fsound-23.mp3y9:pathGroupaR70y29:assets%2Fmusic%2Fsound-23.ogghR9tgoR1i866720R2R69R4R72R71aR70R72hgoR1i3305221R2y5:SOUNDR4y27:assets%2Fsfx%2Fsound-23.mp3R71aR74hR9tgoR0i809215R1zR2y6:BINARYR4y29:assets%2Fdata%2Fbehaviors.mbsR6i16284goR0i825499R1zR2R75R4y24:assets%2Fdata%2Fgame.mbsR6i833goR0i826332R1zR2R7R4y34:assets%2Fdata%2Finner-joystick.pngR6i1025R9tgoR0i827357R1zR2R7R4y34:assets%2Fdata%2Fouter-joystick.pngR6i2217R9tgoR0i829574R1zR2R75R4y29:assets%2Fdata%2Fresources.mbsR6i17057goR0i846631R1zR2R75R4y27:assets%2Fdata%2Fscene-0.mbsR6i1908goR0i848539R1zR2R75R4y27:assets%2Fdata%2Fscene-0.scnR6i199goR0i848738R1zR2R75R4y27:assets%2Fdata%2Fscene-1.mbsR6i1244goR0i849982R1zR2R75R4y27:assets%2Fdata%2Fscene-1.scnR6i223goR0i850205R1zR2R75R4y28:assets%2Fdata%2Fscene-10.mbsR6i704goR0i850909R1zR2R75R4y28:assets%2Fdata%2Fscene-10.scnR6i26goR0i850935R1zR2R75R4y28:assets%2Fdata%2Fscene-11.mbsR6i790goR0i851725R1zR2R75R4y28:assets%2Fdata%2Fscene-11.scnR6i26goR0i851751R1zR2R75R4y28:assets%2Fdata%2Fscene-12.mbsR6i749goR0i852500R1zR2R75R4y28:assets%2Fdata%2Fscene-12.scnR6i26goR0i852526R1zR2R75R4y28:assets%2Fdata%2Fscene-13.mbsR6i1197goR0i853723R1zR2R75R4y28:assets%2Fdata%2Fscene-13.scnR6i59goR0i853782R1zR2R75R4y28:assets%2Fdata%2Fscene-14.mbsR6i1696goR0i855478R1zR2R75R4y28:assets%2Fdata%2Fscene-14.scnR6i197goR0i855675R1zR2R75R4y28:assets%2Fdata%2Fscene-15.mbsR6i1791goR0i857466R1zR2R75R4y28:assets%2Fdata%2Fscene-15.scnR6i248goR0i857714R1zR2R75R4y28:assets%2Fdata%2Fscene-17.mbsR6i1870goR0i859584R1zR2R75R4y28:assets%2Fdata%2Fscene-17.scnR6i120goR0i859704R1zR2R75R4y28:assets%2Fdata%2Fscene-18.mbsR6i1181goR0i860885R1zR2R75R4y28:assets%2Fdata%2Fscene-18.scnR6i56goR0i860941R1zR2R75R4y28:assets%2Fdata%2Fscene-19.mbsR6i300goR0i861241R1zR2R75R4y28:assets%2Fdata%2Fscene-19.scnR6i113goR0i861354R1zR2R75R4y27:assets%2Fdata%2Fscene-2.mbsR6i517goR0i861871R1zR2R75R4y27:assets%2Fdata%2Fscene-2.scnR6i118goR0i861989R1zR2R75R4y27:assets%2Fdata%2Fscene-3.mbsR6i2063goR0i864052R1zR2R75R4y27:assets%2Fdata%2Fscene-3.scnR6i202goR0i864254R1zR2R75R4y27:assets%2Fdata%2Fscene-4.mbsR6i518goR0i864772R1zR2R75R4y27:assets%2Fdata%2Fscene-4.scnR6i115goR0i864887R1zR2R75R4y27:assets%2Fdata%2Fscene-5.mbsR6i751goR0i865638R1zR2R75R4y27:assets%2Fdata%2Fscene-5.scnR6i26goR0i865664R1zR2R75R4y27:assets%2Fdata%2Fscene-6.mbsR6i712goR0i866376R1zR2R75R4y27:assets%2Fdata%2Fscene-6.scnR6i26goR0i866402R1zR2R75R4y27:assets%2Fdata%2Fscene-7.mbsR6i763goR0i867165R1zR2R75R4y27:assets%2Fdata%2Fscene-7.scnR6i26goR0i867191R1zR2R75R4y26:assets%2Fdata%2Fscenes.mbsR6i275gh","rootPath":null,"version":2,"libraryArgs":["lib/default.pak","gzip"],"libraryType":"lime.utils.PackedAssetLibrary"}',
ra.rootPath);a=wb.fromManifest(a);sa.registerLibrary("default",a);a=sa.getLibrary("default");null!=a?ra.preloadLibraries.push(a):ra.preloadLibraryNames.push("default")};Math.__name__="Math";var X=function(){};k.Reflect=X;X.__name__="Reflect";X.field=function(a,b){try{return a[b]}catch(c){return xb.lastError=c,null}};X.getProperty=function(a,b){var c;if(null==a)return null;var d=a.__properties__?c=a.__properties__["get_"+b]:!1;return d?a[c]():a[b]};X.setProperty=function(a,b,c){var d;var e=a.__properties__?
d=a.__properties__["set_"+b]:!1;if(e)a[d](c);else a[b]=c};X.fields=function(a){var b=[];if(null!=a){var c=Object.prototype.hasOwnProperty,d;for(d in a)"__id__"!=d&&"hx__closures__"!=d&&c.call(a,d)&&b.push(d)}return b};X.isFunction=function(a){return"function"==typeof a?!(a.__name__||a.__ename__):!1};X.compare=function(a,b){return a==b?0:a>b?1:-1};X.compareMethods=function(a,b){return a==b?!0:X.isFunction(a)&&X.isFunction(b)?a.scope==b.scope&&a.method==b.method?null!=a.method:!1:!1};X.isEnumValue=
function(a){return null!=a?null!=a.__enum__:!1};X.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};X.makeVarArgs=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a(b)}};var A=function(){};k.Std=A;A.__name__="Std";A.string=function(a){return U.__string_rec(a,"")};A.parseInt=function(a){if(null!=a)for(var b=0,c=a.length;b<c;){var d=b++,e=a.charCodeAt(d);if(8>=e||14<=e&&32!=e&&45!=e)if(b=a.charCodeAt(d+1),a=parseInt(a,
120==b||88==b?16:10),isNaN(a))break;else return a}return null};var ma=function(){};k["_String.String_Impl_"]=ma;ma.__name__="_String.String_Impl_";ma.fromCharCode=function(a){return String.fromCodePoint(a)};var Wa=function(){this.b=""};k.StringBuf=Wa;Wa.__name__="StringBuf";Wa.prototype={b:null,__class__:Wa};var R=function(){};k.StringTools=R;R.__name__="StringTools";R.htmlEscape=function(a,b){for(var c="",d=0,e=a;d<e.length;){a=e;var f=d++,g=a.charCodeAt(f);55296<=g&&56319>=g&&(g=g-55232<<10|a.charCodeAt(f+
1)&1023);a=g;65536<=a&&++d;switch(a){case 34:c=b?c+"&quot;":c+String.fromCodePoint(a);break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(a);break;case 60:c+="&lt;";break;case 62:c+="&gt;";break;default:c+=String.fromCodePoint(a)}}return c};R.htmlUnescape=function(a){return a.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").join("&")};R.startsWith=function(a,b){return a.length>=b.length?0==a.lastIndexOf(b,0):
!1};R.endsWith=function(a,b){var c=b.length,d=a.length;return d>=c?a.indexOf(b,d-c)==d-c:!1};R.isSpace=function(a,b){a=I.cca(a,b);return 8<a&&14>a?!0:32==a};R.ltrim=function(a){for(var b=a.length,c=0;c<b&&R.isSpace(a,c);)++c;return 0<c?I.substr(a,c,b-c):a};R.rtrim=function(a){for(var b=a.length,c=0;c<b&&R.isSpace(a,b-c-1);)++c;return 0<c?I.substr(a,0,b-c):a};R.trim=function(a){return R.ltrim(R.rtrim(a))};R.rpad=function(a,b,c){if(0>=b.length)return a;for(a=null==a?"null":""+a;a.length<c;)a+=null==
b?"null":""+b;return a};R.replace=function(a,b,c){return a.split(b).join(c)};R.hex=function(a,b){for(var c="";c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4,0<a;);if(null!=b)for(;c.length<b;)c="0"+c;return c};var Ca=x.ValueType={__ename__:"ValueType",__constructs__:null,TNull:{_hx_name:"TNull",_hx_index:0,__enum__:"ValueType",toString:v},TInt:{_hx_name:"TInt",_hx_index:1,__enum__:"ValueType",toString:v},TFloat:{_hx_name:"TFloat",_hx_index:2,__enum__:"ValueType",toString:v},TBool:{_hx_name:"TBool",_hx_index:3,
__enum__:"ValueType",toString:v},TObject:{_hx_name:"TObject",_hx_index:4,__enum__:"ValueType",toString:v},TFunction:{_hx_name:"TFunction",_hx_index:5,__enum__:"ValueType",toString:v},TClass:(C=function(a){return{_hx_index:6,c:a,__enum__:"ValueType",toString:v}},C._hx_name="TClass",C.__params__=["c"],C),TEnum:(C=function(a){return{_hx_index:7,e:a,__enum__:"ValueType",toString:v}},C._hx_name="TEnum",C.__params__=["e"],C),TUnknown:{_hx_name:"TUnknown",_hx_index:8,__enum__:"ValueType",toString:v}};Ca.__constructs__=
[Ca.TNull,Ca.TInt,Ca.TFloat,Ca.TBool,Ca.TObject,Ca.TFunction,Ca.TClass,Ca.TEnum,Ca.TUnknown];var Ia=function(){};k.Type=Ia;Ia.__name__="Type";Ia.resolveEnum=function(a){return x[a]};Ia.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};Ia.createEnum=function(a,b,c){var d=X.field(a,b);if(null==d)throw J.thrown("No such constructor "+b);if(X.isFunction(d)){if(null==c)throw J.thrown("Constructor "+b+" need parameters");return d.apply(a,c)}if(null!=c&&0!=c.length)throw J.thrown("Constructor "+
b+" does not need parameters");return d};Ia.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);I.remove(b,"__class__");I.remove(b,"__properties__");return b};Ia.typeof=function(a){switch(typeof a){case "boolean":return Ca.TBool;case "function":return a.__name__||a.__ename__?Ca.TObject:Ca.TFunction;case "number":return Math.ceil(a)==a%2147483648?Ca.TInt:Ca.TFloat;case "object":if(null==a)return Ca.TNull;var b=a.__enum__;if(null!=b)return Ca.TEnum(x[b]);a=U.getClass(a);return null!=
a?Ca.TClass(a):Ca.TObject;case "string":return Ca.TClass(String);case "undefined":return Ca.TNull;default:return Ca.TUnknown}};Ia.enumParameters=function(a){var b=x[a.__enum__].__constructs__[a._hx_index].__params__;if(null!=b){for(var c=[],d=0;d<b.length;){var e=b[d];++d;c.push(a[e])}return c}return[]};var ua={gt:function(a,b){var c=0>a;return c!=0>b?c:a>b},toFloat:function(a){return 0>a?4294967296+a:a+0}},lb=function(){};k["openfl.events.IEventDispatcher"]=lb;lb.__name__="openfl.events.IEventDispatcher";
lb.__isInterface__=!0;lb.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:lb};var za=function(a){null!=a&&(this.__targetDispatcher=a)};k["openfl.events.EventDispatcher"]=za;za.__name__="openfl.events.EventDispatcher";za.__interfaces__=[lb];za.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(a,b,c,d,e){null==d&&(d=0);null==c&&(c=!1);if(null!=b)if(null==this.__eventMap&&(this.__eventMap=
new ia,this.__iterators=new ia),Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)){h=this.__eventMap.h[a];e=0;for(var f=h.length;e<f;){var g=e++;if(h[g].match(b,c))return}a=this.__iterators.h[a];for(e=0;e<a.length;)f=a[e],++e,f.active&&f.copy();this.__addListenerByPriority(h,new fj(b,c,d))}else{var h=[];h.push(new fj(b,c,d));f=new gj(h);this.__eventMap.h[a]=h;this.__iterators.h[a]=[f]}},dispatchEvent:function(a){a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this;return this.__dispatchEvent(a)},
hasEventListener:function(a){return null==this.__eventMap?!1:Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)},removeEventListener:function(a,b,c){null==c&&(c=!1);if(null!=this.__eventMap&&null!=b){var d=this.__eventMap.h[a];if(null!=d){for(var e=this.__iterators.h[a],f=0,g=d.length;f<g;){var h=f++;if(d[h].match(b,c)){for(b=0;b<e.length;)c=e[b],++b,c.remove(d[h],h);d.splice(h,1);break}}0==d.length&&(d=this.__eventMap,e=a,Object.prototype.hasOwnProperty.call(d.h,e)&&delete d.h[e],d=this.__iterators,
e=a,Object.prototype.hasOwnProperty.call(d.h,e)&&delete d.h[e]);0>=Object.keys(this.__eventMap.h).length&&(this.__iterators=this.__eventMap=null)}}},toString:function(){return"[object "+U.getClass(this).__name__.split(".").pop()+"]"},willTrigger:function(a){return this.hasEventListener(a)},__dispatchEvent:function(a){if(null==this.__eventMap||null==a)return!0;var b=a.type,c=this.__eventMap.h[b];if(null==c)return!0;null==a.target&&(a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this);
a.currentTarget=this;var d=1==a.eventPhase;b=this.__iterators.h[b];var e=b[0];e.active&&(e=new gj(c),b.push(e));e.start();for(var f=e;f.hasNext();){var g=f.next();if(null!=g&&g.useCapture==d&&(g.callback(a),a.__isCanceledNow))break}e.stop();e!=b[0]?I.remove(b,e):e.reset(c);return!a.isDefaultPrevented()},__removeAllListeners:function(){this.__iterators=this.__eventMap=null},__addListenerByPriority:function(a,b){for(var c=a.length,d=c,e=0;e<c;){var f=e++;if(a[f].priority<b.priority){d=f;break}}a.splice(d,
0,b)},__class__:za};var ae=function(){};k["openfl.display.IBitmapDrawable"]=ae;ae.__name__="openfl.display.IBitmapDrawable";ae.__isInterface__=!0;ae.prototype={__blendMode:null,__drawableType:null,__isMask:null,__renderable:null,__renderTransform:null,__transform:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__getBounds:null,__update:null,__updateTransforms:null,__mask:null,__scrollRect:null,__class__:ae};var ub={__properties__:{set_length:"set_length",get_length:"get_length",
set_fixed:"set_fixed",get_fixed:"get_fixed"},concat:function(a,b){return a.concat(b)},copy:function(a){return a.copy()},every:function(a,b,c){for(var d=0,e=a.get_length();d<e;){var f=d++;a.__tempIndex=f;if(null!=c){if(0==b.apply(c,[a.get(f),f,a]))break}else if(0==b(a.get(f),f,a))break}return a.__tempIndex==a.get_length()-1},filter:function(a,b){return a.filter(b)},get:function(a,b){return a.get(b)},indexOf:function(a,b,c){null==c&&(c=0);return a.indexOf(b,c)},insertAt:function(a,b,c){a.insertAt(b,
c)},iterator:function(a){return a.iterator()},join:function(a,b){null==b&&(b=",");return a.join(b)},lastIndexOf:function(a,b,c){return a.lastIndexOf(b,c)},pop:function(a){return a.pop()},push:function(a,b){return a.push(b)},removeAt:function(a,b){return a.removeAt(b)},reverse:function(a){return a.reverse()},set:function(a,b,c){return a.set(b,c)},shift:function(a){return a.shift()},slice:function(a,b,c){null==b&&(b=0);return a.slice(b,c)},some:function(a,b,c){for(var d=0,e=a.get_length();d<e;){var f=
d++;a.__tempIndex=f;if(null!=c){if(1==b.apply(c,[a.get(f),f,a]))break}else if(b(a.get(f),f,a))break;f==a.get_length()-1&&a.__tempIndex++}return a.__tempIndex<a.get_length()-1},sort:function(a,b){a.sort(b)},splice:function(a,b,c){for(var d=arguments.length,e=Array(3<d?d-3:0),f=3;f<d;++f)e[f-3]=arguments[f];a.__tempIndex=b;for(d=0;d<e.length;)f=e[d++],a.insertAt(a.__tempIndex,f),a.__tempIndex++;return a.splice(a.__tempIndex,c)},toString:function(a){return null!=a?a.toString():null},unshift:function(a,
b){a.unshift(b)},convert:function(a){return a},toBoolVector:function(a,b,c,d){return new Cf(b,c,d)},toIntVector:function(a,b,c,d){return new Df(b,c,d)},toFloatVector:function(a,b,c,d){return new Ef(b,c,d,!0)},toFunctionVector:function(a,b,c,d){return new Ff(b,c,d)},toObjectVector:function(a,b,c,d){return new nf(b,c,d,!0)},toNullVector:function(a,b,c,d){return new nf(b,c,d,!0)},fromBoolVector:function(a){return a},fromIntVector:function(a){return a},fromFloatVector:function(a){return a},fromFunctionVector:function(a){return a},
fromObjectVector:function(a){return a},get_fixed:function(a){return a.fixed},set_fixed:function(a,b){return a.fixed=b},get_length:function(a){return a.get_length()},set_length:function(a,b){return a.set_length(b)}},qd=function(a,b,c){this.__pool=new Vb;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList=new Dc;null!=a&&(this.create=a);null!=b&&(this.clean=b);null!=c&&this.set_size(c)};k["lime.utils.ObjectPool"]=qd;qd.__name__="lime.utils.ObjectPool";
qd.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,__inactiveObjectList:null,__pool:null,__size:null,add:function(a){this.__pool.exists(a)||(this.__pool.set(a,!1),this.clean(a),this.__pool.set(a,!1),null==this.__inactiveObject0?this.__inactiveObject0=a:null==this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++)},clean:function(a){},clear:function(){this.__pool=new Vb;this.inactiveObjects=this.activeObjects=
0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList.clear()},create:function(){return null},get:function(){var a=null;if(0<this.inactiveObjects)null!=this.__inactiveObject0?(a=this.__inactiveObject0,this.__inactiveObject0=null):null!=this.__inactiveObject1?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),0<this.__inactiveObjectList.length&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),0<this.__inactiveObjectList.length&&
(this.__inactiveObject1=this.__inactiveObjectList.pop())),this.__pool.set(a,!0),this.inactiveObjects--,this.activeObjects++;else if(null==this.__size||this.activeObjects<this.__size)a=this.create(),null!=a&&(this.__pool.set(a,!0),this.activeObjects++);return a},release:function(a){if(!this.__pool.exists(a)){var b="Object is not a member of the pool",c={fileName:"lime/utils/ObjectPool.hx",lineNumber:102,className:"lime.utils.ObjectPool",methodName:"release"};if(xc.throwErrors)throw a="["+c.className+
"] ERROR: "+A.string(b),J.thrown(a);Q.error(b,c)}else if(!this.__pool.get(a)){b="Object has already been released";c={fileName:"lime/utils/ObjectPool.hx",lineNumber:106,className:"lime.utils.ObjectPool",methodName:"release"};if(xc.throwErrors)throw a="["+c.className+"] ERROR: "+A.string(b),J.thrown(a);Q.error(b,c)}this.activeObjects--;null==this.__size||this.activeObjects+this.inactiveObjects<this.__size?(this.clean(a),this.__pool.set(a,!1),null==this.__inactiveObject0?this.__inactiveObject0=a:null==
this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++):this.__pool.remove(a)},remove:function(a){this.__pool.exists(a)&&(this.__pool.remove(a),this.__inactiveObject0==a?(this.__inactiveObject0=null,this.inactiveObjects--):this.__inactiveObject1==a?(this.__inactiveObject1=null,this.inactiveObjects--):this.__inactiveObjectList.remove(a)?this.inactiveObjects--:this.activeObjects--)},__addInactive:function(a){this.__pool.set(a,!1);null==this.__inactiveObject0?
this.__inactiveObject0=a:null==this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a);this.inactiveObjects++},__getInactive:function(){if(null!=this.__inactiveObject0){var a=this.__inactiveObject0;this.__inactiveObject0=null}else null!=this.__inactiveObject1?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),0<this.__inactiveObjectList.length&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),0<this.__inactiveObjectList.length&&
(this.__inactiveObject1=this.__inactiveObjectList.pop()));this.__pool.set(a,!0);this.inactiveObjects--;this.activeObjects++;return a},__removeInactive:function(a){if(!(0>=a||0==this.inactiveObjects)&&(null!=this.__inactiveObject0&&(this.__pool.remove(this.__inactiveObject0),this.__inactiveObject0=null,this.inactiveObjects--,--a),0!=a&&0!=this.inactiveObjects&&(null!=this.__inactiveObject1&&(this.__pool.remove(this.__inactiveObject1),this.__inactiveObject1=null,this.inactiveObjects--,--a),0!=a&&0!=
this.inactiveObjects)))for(var b=this.__inactiveObjectList.h;null!=b;){var c=b.item;b=b.next;this.__pool.remove(c);this.__inactiveObjectList.remove(c);this.inactiveObjects--;--a;if(0==a||0==this.inactiveObjects)break}},get_size:function(){return this.__size},set_size:function(a){if(null==a)this.__size=null;else{var b=this.inactiveObjects+this.activeObjects;this.__size=a;if(b>a)this.__removeInactive(b-a);else if(a>b)for(var c=0,d=a-b;c<d;)if(c++,b=this.create(),null!=b)this.__pool.set(b,!1),this.__inactiveObjectList.add(b),
this.inactiveObjects++;else break}return a},__class__:qd,__properties__:{set_size:"set_size",get_size:"get_size"}};var Od=function(){};k["haxe.IMap"]=Od;Od.__name__="haxe.IMap";Od.__isInterface__=!0;Od.prototype={get:null,set:null,exists:null,remove:null,keys:null,iterator:null,keyValueIterator:null,__class__:Od};var Vb=function(){this.h={__keys__:{}}};k["haxe.ds.ObjectMap"]=Vb;Vb.__name__="haxe.ds.ObjectMap";Vb.__interfaces__=[Od];Vb.prototype={h:null,set:function(a,b){var c=a.__id__;null==c&&(c=
a.__id__=N.$haxeUID++);this.h[c]=b;this.h.__keys__[c]=a},get:function(a){return this.h[a.__id__]},exists:function(a){return null!=this.h.__keys__[a.__id__]},remove:function(a){a=a.__id__;if(null==this.h.__keys__[a])return!1;delete this.h[a];delete this.h.__keys__[a];return!0},keys:function(){var a=[],b;for(b in this.h.__keys__)this.h.hasOwnProperty(b)&&a.push(this.h.__keys__[b]);return new se(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=
this.it.next();return this.ref[a.__id__]}}},keyValueIterator:function(){return new ch(this)},toString:function(){var a="{";for(var b=this.keys();b.hasNext();){var c=b.next();a+=A.string(A.string(c));a+=" => ";a+=A.string(A.string(this.h[c.__id__]));b.hasNext()&&(a+=", ")}return a+"}"},__class__:Vb};var Dc=function(){this.length=0};k["haxe.ds.List"]=Dc;Dc.__name__="haxe.ds.List";Dc.prototype={h:null,q:null,length:null,add:function(a){a=new qk(a,null);null==this.h?this.h=a:this.q.next=a;this.q=a;this.length++},
push:function(a){this.h=a=new qk(a,this.h);null==this.q&&(this.q=a);this.length++},pop:function(){if(null==this.h)return null;var a=this.h.item;this.h=this.h.next;null==this.h&&(this.q=null);this.length--;return a},clear:function(){this.q=this.h=null;this.length=0},remove:function(a){for(var b=null,c=this.h;null!=c;){if(c.item==a)return null==b?this.h=c.next:b.next=c.next,this.q==c&&(this.q=b),this.length--,!0;b=c;c=c.next}return!1},iterator:function(){return new tn(this.h)},__class__:Dc};var ab=
function(){za.call(this);this.__alpha=this.__drawableType=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new wa;this.__visible=!0;this.__rotationSine=this.__rotation=0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new wa;this.__worldColorTransform=new Kc;this.__renderTransform=new wa;this.__worldVisible=!0;this.set_name("instance"+ ++ab.__instanceCount);null!=ab.__initStage&&(this.stage=ab.__initStage,ab.__initStage=
null,this.stage.addChild(this))};k["openfl.display.DisplayObject"]=ab;ab.__name__="openfl.display.DisplayObject";ab.__interfaces__=[ae];ab.__calculateAbsoluteTransform=function(a,b,c){c.a=a.a*b.a+a.b*b.c;c.b=a.a*b.b+a.b*b.d;c.c=a.c*b.a+a.d*b.c;c.d=a.c*b.b+a.d*b.d;c.tx=a.tx*b.a+a.ty*b.c+b.tx;c.ty=a.tx*b.b+a.ty*b.d+b.ty};ab.__super__=za;ab.prototype=u(za.prototype,{opaqueBackground:null,parent:null,stage:null,__alpha:null,__blendMode:null,__cacheAsBitmap:null,__cacheAsBitmapMatrix:null,__cacheBitmap:null,
__cacheBitmapBackground:null,__cacheBitmapColorTransform:null,__cacheBitmapData:null,__cacheBitmapData2:null,__cacheBitmapData3:null,__cacheBitmapMatrix:null,__cacheBitmapRenderer:null,__cairo:null,__children:null,__customRenderClear:null,__customRenderEvent:null,__drawableType:null,__filters:null,__graphics:null,__interactive:null,__isCacheBitmapRender:null,__isMask:null,__loaderInfo:null,__mask:null,__maskTarget:null,__name:null,__objectTransform:null,__renderable:null,__renderDirty:null,__renderParent:null,
__renderTransform:null,__renderTransformCache:null,__renderTransformChanged:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scale9Grid:null,__scaleX:null,__scaleY:null,__scrollRect:null,__shader:null,__tempPoint:null,__transform:null,__transformDirty:null,__visible:null,__worldAlpha:null,__worldAlphaChanged:null,__worldBlendMode:null,__worldClip:null,__worldClipChanged:null,__worldColorTransform:null,__worldShader:null,__worldScale9Grid:null,__worldTransform:null,__worldVisible:null,
__worldVisibleChanged:null,__worldTransformInvalid:null,__worldZ:null,__canvas:null,__context:null,__style:null,addEventListener:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":Object.prototype.hasOwnProperty.call(ab.__broadcastEvents.h,a)||(ab.__broadcastEvents.h[a]=[]);var f=ab.__broadcastEvents.h[a];-1==f.indexOf(this)&&f.push(this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":null==
this.__customRenderEvent&&(this.__customRenderEvent=new pg(null),this.__customRenderEvent.objectColorTransform=new Kc,this.__customRenderEvent.objectMatrix=new wa,this.__customRenderClear=!0)}za.prototype.addEventListener.call(this,a,b,c,d,e)},dispatchEvent:function(a){if(a instanceof Kb){var b=this.__getRenderTransform();a.stageX=a.localX*b.a+a.localY*b.c+b.tx;b=this.__getRenderTransform();a.stageY=a.localX*b.b+a.localY*b.d+b.ty}else a instanceof Td&&(b=this.__getRenderTransform(),a.stageX=a.localX*
b.a+a.localY*b.c+b.tx,b=this.__getRenderTransform(),a.stageY=a.localX*b.b+a.localY*b.d+b.ty);a.target=this;return this.__dispatchWithCapture(a)},getBounds:function(a){var b=wa.__pool.get();if(null!=a&&a!=this){b.copyFrom(this.__getWorldTransform());var c=wa.__pool.get();c.copyFrom(a.__getWorldTransform());c.invert();b.concat(c);wa.__pool.release(c)}else b.identity();a=new fa;this.__getBounds(a,b);wa.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,
new pa)},hitTestObject:function(a){if(null!=a&&null!=a.parent&&null!=this.parent){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},hitTestPoint:function(a,b,c){null==c&&(c=!1);return null!=this.stage?this.__hitTest(a,b,c,null,!1,this):!1},invalidate:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},localToGlobal:function(a){return this.__getRenderTransform().transformPoint(a)},removeEventListener:function(a,b,c){null==c&&(c=!1);za.prototype.removeEventListener.call(this,
a,b,c);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":this.hasEventListener(a)||Object.prototype.hasOwnProperty.call(ab.__broadcastEvents.h,a)&&I.remove(ab.__broadcastEvents.h[a],this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.hasEventListener("clearDOM")||this.hasEventListener("renderCairo")||this.hasEventListener("renderCanvas")||this.hasEventListener("renderDOM")||
this.hasEventListener("renderOpenGL")||(this.__customRenderEvent=null)}},__cleanup:function(){this.__context=this.__canvas=this.__cairo=null;null!=this.__graphics&&this.__graphics.__cleanup();null!=this.__cacheBitmap&&(this.__cacheBitmap.__cleanup(),this.__cacheBitmap=null);null!=this.__cacheBitmapData&&(this.__cacheBitmapData.dispose(),this.__cacheBitmapData=null)},__dispatch:function(a){if(null!=this.__eventMap&&this.hasEventListener(a.type)){var b=za.prototype.__dispatchEvent.call(this,a);return a.__isCanceled?
!0:b}return!0},__dispatchChildren:function(a){},__dispatchEvent:function(a){var b=a.bubbles?this.parent:null,c=za.prototype.__dispatchEvent.call(this,a);if(a.__isCanceled)return!0;null!=b&&b!=this&&(a.eventPhase=3,null==a.target&&(a.target=this),b.__dispatchEvent(a));return c},__dispatchWithCapture:function(a){null==a.target&&(a.target=this);if(null!=this.parent)if(a.eventPhase=1,this.parent==this.stage)this.parent.__dispatch(a);else{for(var b=ab.__tempStack.get(),c=this.parent,d=0;null!=c;)b.set(d,
c),c=c.parent,++d;c=0;for(var e=d;c<e;){var f=c++;b.get(d-f-1).__dispatch(a)}ab.__tempStack.release(b)}a.eventPhase=2;return this.__dispatchEvent(a)},__enterFrame:function(a){},__getBounds:function(a,b){null!=this.__graphics&&this.__graphics.__getBounds(a,b)},__getCursor:function(){return null},__getFilterBounds:function(a,b){this.__getRenderBounds(a,b);if(null!=this.__filters){b=fa.__pool.get();for(var c=0,d=this.__filters;c<d.length;){var e=d[c];++c;b.__expand(-e.__leftExtension,-e.__topExtension,
e.__leftExtension+e.__rightExtension,e.__topExtension+e.__bottomExtension)}a.width+=b.width;a.height+=b.height;a.x+=b.x;a.y+=b.y;fa.__pool.release(b)}},__getInteractive:function(a){return!1},__getLocalBounds:function(a){this.__getBounds(a,this.__transform);a.x-=this.__transform.tx;a.y-=this.__transform.ty},__getRenderBounds:function(a,b){if(null==this.__scrollRect)this.__getBounds(a,b);else{var c=fa.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);
fa.__pool.release(c)}},__getRenderTransform:function(){this.__getWorldTransform();return this.__renderTransform},__getWorldTransform:function(){if(this.__transformDirty||this.__worldTransformInvalid){var a=[],b=this;if(null==this.parent)this.__update(!0,!1);else for(;b!=this.stage&&(a.push(b),b=b.parent,null!=b););for(var c=a.length;0<=--c;)b=a[c],b.__update(!0,!1)}return this.__worldTransform},__globalToLocal:function(a,b){this.__getRenderTransform();if(a==b){var c=this.__renderTransform,d=c.a*c.d-
c.b*c.c;if(0==d)a.x=-c.tx,a.y=-c.ty;else{var e=1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx));a.y=1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));a.x=e}}else c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.x=0==d?-c.tx:1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx)),c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.y=0==d?-c.ty:1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));return b},__hitTest:function(a,b,c,d,e,f){if(null!=this.__graphics){if(!f.__visible||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__graphics.__hitTest(a,
b,c,this.__getRenderTransform()))return null==d||e||d.push(f),!0}return!1},__hitTestMask:function(a,b){return null!=this.__graphics&&this.__graphics.__hitTest(a,b,!0,this.__getRenderTransform())?!0:!1},__readGraphicsData:function(a,b){null!=this.__graphics&&this.__graphics.__readGraphicsData(a)},__setParentRenderDirty:function(){var a=null!=this.__renderParent?this.__renderParent:this.parent;null==a||a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())},__setRenderDirty:function(){this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty())},__setStageReference:function(a){this.stage=a},__setTransformDirty:function(){this.__transformDirty||(this.__transformDirty=!0,this.__setWorldTransformInvalid(),this.__setParentRenderDirty())},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=!0},__stopAllMovieClips:function(){},__update:function(a,b){var c=null!=this.__renderParent?this.__renderParent:this.parent;this.__isMask&&null==c&&(c=this.__maskTarget);this.__renderable=
this.__visible&&0!=this.__scaleX&&0!=this.__scaleY&&!this.__isMask&&(null==c||!c.__isMask);this.__updateTransforms();this.__worldTransformInvalid=this.__transformDirty=!1;if(!a)if(ab.__supportDOM&&(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),null==this.__renderTransformCache?this.__renderTransformCache=this.__renderTransform.clone():this.__renderTransformCache.copyFrom(this.__renderTransform)),null!=c){if(ab.__supportDOM){var d=c.__worldVisible&&this.__visible;
this.__worldVisibleChanged=this.__worldVisible!=d;this.__worldVisible=d;d=this.get_alpha()*c.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=d;this.__worldAlpha=d}else this.__worldAlpha=this.get_alpha()*c.__worldAlpha;null!=this.__objectTransform?(this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform),this.__worldColorTransform.__combine(c.__worldColorTransform)):this.__worldColorTransform.__copyFrom(c.__worldColorTransform);this.__worldBlendMode=null==this.__blendMode||
10==this.__blendMode?c.__worldBlendMode:this.__blendMode;this.__worldShader=null==this.__shader?c.__shader:this.__shader;this.__worldScale9Grid=null==this.__scale9Grid?c.__scale9Grid:this.__scale9Grid}else this.__worldAlpha=this.get_alpha(),ab.__supportDOM&&(this.__worldVisibleChanged=this.__worldVisible!=this.__visible,this.__worldVisible=this.__visible,this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha()),null!=this.__objectTransform?this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform):
this.__worldColorTransform.__identity(),this.__worldBlendMode=this.__blendMode,this.__worldShader=this.__shader,this.__worldScale9Grid=this.__scale9Grid;b&&null!=this.get_mask()&&this.get_mask().__update(a,!0)},__updateTransforms:function(a){var b=null!=a;a=b?a:this.__transform;null==this.__worldTransform&&(this.__worldTransform=new wa);null==this.__renderTransform&&(this.__renderTransform=new wa);var c=null!=this.__renderParent?this.__renderParent:this.parent;if(b||null==this.parent)this.__worldTransform.copyFrom(a);
else{var d=this.parent.__worldTransform,e=this.__worldTransform;e.a=a.a*d.a+a.b*d.c;e.b=a.a*d.b+a.b*d.d;e.c=a.c*d.a+a.d*d.c;e.d=a.c*d.b+a.d*d.d;e.tx=a.tx*d.a+a.ty*d.c+d.tx;e.ty=a.tx*d.b+a.ty*d.d+d.ty}b||null==c?this.__renderTransform.copyFrom(a):(d=c.__renderTransform,e=this.__renderTransform,e.a=a.a*d.a+a.b*d.c,e.b=a.a*d.b+a.b*d.d,e.c=a.c*d.a+a.d*d.c,e.d=a.c*d.b+a.d*d.d,e.tx=a.tx*d.a+a.ty*d.c+d.tx,e.ty=a.tx*d.b+a.ty*d.d+d.ty);null!=this.__scrollRect&&(b=this.__renderTransform,a=-this.__scrollRect.x,
c=-this.__scrollRect.y,b.tx=a*b.a+c*b.c+b.tx,b.ty=a*b.b+c*b.d+b.ty)},get_alpha:function(){return this.__alpha},set_alpha:function(a){1<a&&(a=1);0>a&&(a=0);a==this.__alpha||this.get_cacheAsBitmap()||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__alpha=a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){null==a&&(a=10);a==this.__blendMode||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__blendMode=
a},get_cacheAsBitmap:function(){return null==this.__filters?this.__cacheAsBitmap:!0},set_cacheAsBitmap:function(a){a==this.__cacheAsBitmap||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__cacheAsBitmap=a},get_cacheAsBitmapMatrix:function(){return this.__cacheAsBitmapMatrix},set_cacheAsBitmapMatrix:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__cacheAsBitmapMatrix=null!=a?a.clone():a},get_filters:function(){return null==
this.__filters?[]:this.__filters.slice()},set_filters:function(a){if(null!=a&&0<a.length){for(var b=[],c=0;c<a.length;){var d=a[c];++c;d=d.clone();d.__renderDirty=!0;b.push(d)}this.__filters=b;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}else null!=this.__filters&&(this.__filters=null,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_height:function(){var a=fa.__pool.get();this.__getLocalBounds(a);var b=a.height;fa.__pool.release(a);
return b},set_height:function(a){var b=fa.__pool.get(),c=wa.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);fa.__pool.release(b);wa.__pool.release(c);return a},get_loaderInfo:function(){return null!=this.stage?Ec.current.__loaderInfo:null},get_mask:function(){return this.__mask},set_mask:function(a){if(a==this.__mask)return a;a!=this.__mask&&(this.__setTransformDirty(),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));
if(null!=this.__mask){this.__mask.__isMask=!1;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var b=this.__mask;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}null!=a&&(a.__isMask=!0,a.__maskTarget=this,a.__setWorldTransformInvalid());null!=this.__cacheBitmap&&this.__cacheBitmap.get_mask()!=a&&this.__cacheBitmap.set_mask(a);return this.__mask=a},get_mouseX:function(){var a=null!=this.stage?this.stage.__mouseX:Ec.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:
Ec.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*c.c;return 0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx))},get_mouseY:function(){var a=null!=this.stage?this.stage.__mouseX:Ec.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:Ec.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*c.c;return 0==d?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a))},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},get_root:function(){return null!=this.stage?
Ec.current:null},get_rotation:function(){return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/180*this.__rotation;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);this.__transform.a=this.__rotationCosine*this.__scaleX;this.__transform.b=this.__rotationSine*this.__scaleX;this.__transform.c=-this.__rotationSine*this.__scaleY;this.__transform.d=this.__rotationCosine*this.__scaleY;this.__setTransformDirty()}return a},get_scale9Grid:function(){return null==
this.__scale9Grid?null:this.__scale9Grid.clone()},set_scale9Grid:function(a){if(null==a&&null==this.__scale9Grid||null!=a&&null!=this.__scale9Grid&&this.__scale9Grid.equals(a))return a;null!=a?(null==this.__scale9Grid&&(this.__scale9Grid=new fa),this.__scale9Grid.copyFrom(a)):this.__scale9Grid=null;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_scaleX:function(){return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX)if(this.__scaleX=a,0==this.__transform.b)a!=
this.__transform.a&&this.__setTransformDirty(),this.__transform.a=a;else{var b=this.__rotationCosine*a,c=this.__rotationSine*a;this.__transform.a==b&&this.__transform.b==c||this.__setTransformDirty();this.__transform.a=b;this.__transform.b=c}return a},get_scaleY:function(){return this.__scaleY},set_scaleY:function(a){if(a!=this.__scaleY)if(this.__scaleY=a,0==this.__transform.c)a!=this.__transform.d&&this.__setTransformDirty(),this.__transform.d=a;else{var b=-this.__rotationSine*a,c=this.__rotationCosine*
a;this.__transform.d==c&&this.__transform.c==b||this.__setTransformDirty();this.__transform.c=b;this.__transform.d=c}return a},get_scrollRect:function(){return null==this.__scrollRect?null:this.__scrollRect.clone()},set_scrollRect:function(a){if(null==a&&null==this.__scrollRect||null!=a&&null!=this.__scrollRect&&this.__scrollRect.equals(a))return a;null!=a?(null==this.__scrollRect&&(this.__scrollRect=new fa),this.__scrollRect.copyFrom(a)):this.__scrollRect=null;this.__setTransformDirty();ab.__supportDOM&&
!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_shader:function(){return this.__shader},set_shader:function(a){this.__shader=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_transform:function(){null==this.__objectTransform&&(this.__objectTransform=new rk(this));return this.__objectTransform},set_transform:function(a){if(null==a)throw new Ah("Parameter transform must be non-null.");null==this.__objectTransform&&(this.__objectTransform=
new rk(this));this.__setTransformDirty();this.__objectTransform.set_matrix(a.get_matrix());if(!this.__objectTransform.__colorTransform.__equals(a.__colorTransform,!0)||!this.get_cacheAsBitmap()&&this.__objectTransform.__colorTransform.alphaMultiplier!=a.__colorTransform.alphaMultiplier)this.__objectTransform.__colorTransform.__copyFrom(a.get_colorTransform()),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__objectTransform},get_visible:function(){return this.__visible},
set_visible:function(a){a==this.__visible||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__visible=a},get_width:function(){var a=fa.__pool.get();this.__getLocalBounds(a);var b=a.width;fa.__pool.release(a);return b},set_width:function(a){var b=fa.__pool.get(),c=wa.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);fa.__pool.release(b);wa.__pool.release(c);return a},get_x:function(){return this.__transform.tx},
set_x:function(a){a!=this.__transform.tx&&this.__setTransformDirty();return this.__transform.tx=a},get_y:function(){return this.__transform.ty},set_y:function(a){a!=this.__transform.ty&&this.__setTransformDirty();return this.__transform.ty=a},__class__:ab,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_shader:"set_shader",
get_shader:"get_shader",set_scrollRect:"set_scrollRect",get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_scale9Grid:"set_scale9Grid",get_scale9Grid:"get_scale9Grid",set_rotation:"set_rotation",get_rotation:"get_rotation",get_root:"get_root",set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_mask:"set_mask",get_mask:"get_mask",get_loaderInfo:"get_loaderInfo",set_height:"set_height",
get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var D=function(){ab.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=
-1};k["openfl.display.InteractiveObject"]=D;D.__name__="openfl.display.InteractiveObject";D.__super__=ab;D.prototype=u(ab.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){Ec.notImplemented({fileName:"openfl/display/InteractiveObject.hx",lineNumber:1251,className:"openfl.display.InteractiveObject",methodName:"requestSoftKeyboard"});return!1},__allowMouseFocus:function(){return this.mouseEnabled?
this.get_tabEnabled():!1},__getInteractive:function(a){null!=a&&(a.push(this),null!=this.parent&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,e,f){return!f.get_visible()||this.__isMask||e&&!this.mouseEnabled?!1:ab.prototype.__hitTest.call(this,a,b,c,d,e,f)},__tabTest:function(a){this.get_tabEnabled()&&a.push(this)},get_tabEnabled:function(){return 1==this.__tabEnabled?!0:!1},set_tabEnabled:function(a){this.__tabEnabled!=a&&(this.__tabEnabled=a,this.dispatchEvent(new la("tabEnabledChange",
!0,!1)));return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},set_tabIndex:function(a){if(this.__tabIndex!=a){if(-1>a)throw new Bh("Parameter tabIndex must be a non-negative number; got "+a);this.__tabIndex=a;this.dispatchEvent(new la("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:D,__properties__:u(ab.prototype.__properties__,{set_tabIndex:"set_tabIndex",get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var jb=function(){D.call(this);
this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=ub.toObjectVector(null)};k["openfl.display.DisplayObjectContainer"]=jb;jb.__name__="openfl.display.DisplayObjectContainer";jb.__super__=D;jb.prototype=u(D.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(a){return this.addChildAt(a,this.get_numChildren())},addChildAt:function(a,b){if(null==a)throw a=new Ah("Error #2007: Parameter child must be non-null."),a.errorID=2007,a;if(a.stage==
a)throw a=new hi("Error #3783: A Stage object cannot be added as the child of another object."),a.errorID=3783,a;if(b>this.__children.length||0>b)throw J.thrown("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(I.remove(this.__children,a),this.__children.splice(b,0,a),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));else{null!=a.parent&&a.parent.removeChild(a);this.__children.splice(b,0,a);a.parent=this;(b=null!=this.stage&&null==a.stage)&&a.__setStageReference(this.stage);
a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var c=new la("added");c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);b&&(c=new la("addedToStage",!1,!1),a.__dispatchWithCapture(c),a.__dispatchChildren(c))}return a},areInaccessibleObjectsUnderPoint:function(a){return!1},contains:function(a){for(;a!=this&&null!=a;)a=a.parent;return a==this},getChildAt:function(a){return 0<=a&&a<this.__children.length?
this.__children[a]:null},getChildByName:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},getChildIndex:function(a){for(var b=0,c=this.__children.length;b<c;){var d=b++;if(this.__children[d]==a)return d}return-1},getObjectsUnderPoint:function(a){var b=[];this.__hitTest(a.x,a.y,!1,b,!1,this);b.reverse();return b},removeChild:function(a){if(null!=a&&a.parent==this){a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());
this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var b=new la("removed",!0);a.__dispatchWithCapture(b);null!=this.stage&&(null!=a.stage&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new la("removedFromStage",!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;I.remove(this.__children,a);this.__removedChildren.push(a);a.__setTransformDirty()}return a},removeChildAt:function(a){return 0<=a&&a<this.__children.length?
this.removeChild(this.__children[a]):null},removeChildren:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);if(2147483647==b&&(b=this.__children.length-1,0>b))return;if(!(a>this.__children.length-1)){if(b<a||0>a||b>this.__children.length)throw new Bh("The supplied index is out of bounds.");for(b-=a;0<=b;)this.removeChildAt(a),--b}},resolve:function(a){if(null==this.__children)return null;for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},setChildIndex:function(a,
b){0<=b&&b<=this.__children.length&&a.parent==this&&(I.remove(this.__children,a),this.__children.splice(b,0,a))},stopAllMovieClips:function(){this.__stopAllMovieClips()},swapChildren:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__children.indexOf(a),d=this.__children.indexOf(b);this.__children[c]=b;this.__children[d]=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},swapChildrenAt:function(a,b){var c=this.__children[a];this.__children[a]=this.__children[b];
this.__children[b]=c;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__cleanup:function(){D.prototype.__cleanup.call(this);for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__cleanup()}for(a=this.__removedChildren.iterator();a.hasNext();)b=a.next(),null==b.stage&&b.__cleanup();this.__removedChildren.set_length(0)},__cleanupRemovedChildren:function(){for(var a=this.__removedChildren.iterator();a.hasNext();){var b=a.next();null==b.stage&&b.__cleanup()}this.__removedChildren.set_length(0)},
__dispatchChildren:function(a){if(null!=this.__children)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;a.target=d;if(!d.__dispatchWithCapture(a))break;d.__dispatchChildren(a)}},__enterFrame:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__enterFrame(a)}},__getBounds:function(a,b){D.prototype.__getBounds.call(this,a,b);if(0!=this.__children.length){for(var c=wa.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY){var g=
f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*b.d;c.c=g.c*b.a+g.d*b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*b.c+b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;f.__getBounds(a,c)}}wa.__pool.release(c)}},__getFilterBounds:function(a,b){D.prototype.__getFilterBounds.call(this,a,b);if(null==this.__scrollRect&&0!=this.__children.length){for(var c=wa.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY&&!f.__isMask){var g=f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*
b.d;c.c=g.c*b.a+g.d*b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*b.c+b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;g=fa.__pool.get();f.__getFilterBounds(g,c);a.__expand(g.x,g.y,g.width,g.height);fa.__pool.release(g)}}wa.__pool.release(c)}},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)D.prototype.__getRenderBounds.call(this,a,b);else if(D.prototype.__getBounds.call(this,a,b),0!=this.__children.length){for(var c=wa.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY&&
!f.__isMask){var g=f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*b.d;c.c=g.c*b.a+g.d*b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*b.c+b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;f.__getRenderBounds(a,c)}}wa.__pool.release(c)}},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||e&&!this.mouseEnabled&&!this.mouseChildren||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(null!=this.__scrollRect){var g=pa.__pool.get();g.setTo(a,b);var h=this.__getRenderTransform(),m=h.a*
h.d-h.b*h.c;if(0==m)g.x=-h.tx,g.y=-h.ty;else{var l=1/m*(h.c*(h.ty-g.y)+h.d*(g.x-h.tx));g.y=1/m*(h.a*(g.y-h.ty)+h.b*(h.tx-g.x));g.x=l}if(!this.__scrollRect.containsPoint(g))return pa.__pool.release(g),!1;pa.__pool.release(g)}g=this.__children.length;if(e)if(null==d||!this.mouseChildren)for(;0<=--g;){if(this.__children[g].__hitTest(a,b,c,null,!0,this.__children[g]))return null!=d&&d.push(f),!0}else{if(null!=d){e=d.length;for(m=!1;0<=--g&&!(((h=this.__children[g].__getInteractive(null))||this.mouseEnabled&&
!m)&&this.__children[g].__hitTest(a,b,c,d,!0,this.__children[g])&&(m=!0,h&&d.length>e)););if(m)return d.splice(e,0,f),!0}}else{for(m=!1;0<=--g&&(!this.__children[g].__hitTest(a,b,c,d,!1,this.__children[g])||(m=!0,null!=d)););return m}return!1},__hitTestMask:function(a,b){for(var c=this.__children.length;0<=--c;)if(this.__children[c].__hitTestMask(a,b))return!0;return!1},__readGraphicsData:function(a,b){D.prototype.__readGraphicsData.call(this,a,b);if(b)for(var c=0,d=this.__children;c<d.length;){var e=
d[c];++c;e.__readGraphicsData(a,b)}},__setStageReference:function(a){D.prototype.__setStageReference.call(this,a);if(null!=this.__children)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__setStageReference(a)}},__setWorldTransformInvalid:function(){if(!this.__worldTransformInvalid&&(this.__worldTransformInvalid=!0,null!=this.__children))for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__setWorldTransformInvalid()}},__stopAllMovieClips:function(){for(var a=0,b=this.__children;a<
b.length;){var c=b[a];++a;c.__stopAllMovieClips()}},__tabTest:function(a){D.prototype.__tabTest.call(this,a);if(this.get_tabChildren())for(var b,c=0,d=this.__children;c<d.length;){var e=d[c];++c;if(b=e.__getInteractive(null))b=e,b.__tabTest(a)}},__update:function(a,b){D.prototype.__update.call(this,a,b);if(b){b=0;for(var c=this.__children;b<c.length;){var d=c[b];++b;d.__update(a,!0)}}},get_numChildren:function(){return this.__children.length},get_tabChildren:function(){return this.__tabChildren},
set_tabChildren:function(a){this.__tabChildren!=a&&(this.__tabChildren=a,this.dispatchEvent(new la("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:jb,__properties__:u(D.prototype.__properties__,{set_tabChildren:"set_tabChildren",get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var Ya=function(){jb.call(this);this.__drawableType=4;this.__buttonMode=!1;this.useHandCursor=!0;if(null!=this.__pendingBindLibrary){var a=this.__pendingBindLibrary,b=this.__pendingBindClassName;
this.__pendingBindClassName=this.__pendingBindLibrary=null;a.bind(b,this)}else null!=Ya.__constructor&&(a=Ya.__constructor,Ya.__constructor=null,a(this))};k["openfl.display.Sprite"]=Ya;Ya.__name__="openfl.display.Sprite";Ya.fromTimeline=function(a){var b=new Ya;a.initializeSprite(b);return b};Ya.__super__=jb;Ya.prototype=u(jb.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,__pendingBindClassName:null,__pendingBindLibrary:null,startDrag:function(a,b){null==a&&(a=!1);null!=
this.stage&&this.stage.__startDrag(this,a,b)},stopDrag:function(){null!=this.stage&&this.stage.__stopDrag(this)},__bind:function(a,b){if(null==this.__worldTransform)this.__pendingBindLibrary=a,this.__pendingBindClassName=b;else if(null==a||null==b||!a.bind(b,this)){a='Cannot bind class name "'+b+'"';b={fileName:"openfl/display/Sprite.hx",lineNumber:281,className:"openfl.display.Sprite",methodName:"__bind"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}},
__getCursor:function(){return this.__buttonMode&&this.useHandCursor?"button":null},__hitTest:function(a,b,c,d,e,f){if(e&&!this.mouseEnabled&&!this.mouseChildren)return!1;if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return this.__hitTestHitArea(a,b,c,d,e,f);if(null!=this.__scrollRect){var g=pa.__pool.get();g.setTo(a,b);var h=this.__getRenderTransform(),m=h.a*h.d-h.b*h.c;if(0==m)g.x=-h.tx,g.y=-h.ty;else{var l=1/m*(h.c*(h.ty-g.y)+h.d*(g.x-h.tx));g.y=
1/m*(h.a*(g.y-h.ty)+h.b*(h.tx-g.x));g.x=l}if(!this.__scrollRect.containsPoint(g))return pa.__pool.release(g),this.__hitTestHitArea(a,b,c,d,!0,f);pa.__pool.release(g)}return jb.prototype.__hitTest.call(this,a,b,c,d,e,f)?null!=d?e:!0:null==this.hitArea&&null!=this.__graphics&&this.__graphics.__hitTest(a,b,c,this.__getRenderTransform())?(null==d||e&&!this.mouseEnabled||d.push(f),!0):this.__hitTestHitArea(a,b,c,d,e,f)},__hitTestHitArea:function(a,b,c,d,e,f){return null==this.hitArea||this.hitArea.mouseEnabled?
!1:(this.hitArea.mouseEnabled=!0,a=this.hitArea.__hitTest(a,b,c,null,!0,f),this.hitArea.mouseEnabled=!1,null!=d&&a&&(d[d.length]=f),a)},__hitTestMask:function(a,b){return jb.prototype.__hitTestMask.call(this,a,b)||null!=this.__graphics&&this.__graphics.__hitTest(a,b,!0,this.__getRenderTransform())?!0:!1},get_graphics:function(){null==this.__graphics&&(this.__graphics=new Te(this));return this.__graphics},get_tabEnabled:function(){return null==this.__tabEnabled?this.__buttonMode:this.__tabEnabled},
get_buttonMode:function(){return this.__buttonMode},set_buttonMode:function(a){return this.__buttonMode=a},__class__:Ya,__properties__:u(jb.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var xa=function(){Ya.call(this);this.set_name("Root");this.addEventListener("addedToStage",r(this,this.onAdded))};k.Universal=xa;xa.__name__="Universal";xa.initWindow=function(a){xa.window=a;a.stage.align=6;a.stage.set_scaleMode(2)};xa.__super__=
Ya;xa.prototype=u(Ya.prototype,{maskLayer:null,onAdded:function(a){this.removeEventListener("addedToStage",r(this,this.onAdded));this.maskLayer=new Ke;this.maskLayer.set_name("Mask Layer");this.initScreen(ha.startInFullScreen)},initScreen:function(a){Q.debug("initScreen",{fileName:"Universal.hx",lineNumber:66,className:"Universal",methodName:"initScreen"});a=!1;this.stage.set_displayState(a?1:2);this.stage.__setLogicalSize(0,0);Da.get_current().set_x(0);Da.get_current().set_y(0);Da.get_current().set_scaleX(1);
Da.get_current().set_scaleY(1);this.set_x(0);this.set_y(0);this.set_scaleX(1);this.set_scaleY(1);q.stage=this.stage;for(var b=new Vb,c=0,d=ha.scales;c<d.length;){var e=d[c];++c;b.set(e,!0)}xa.windowWidth=a?ua.toFloat(this.stage.get_fullScreenWidth()):ha.stageWidth*ha.gameScale;xa.windowHeight=a?ua.toFloat(this.stage.get_fullScreenHeight()):ha.stageHeight*ha.gameScale;Q.debug("Game Width: "+ha.stageWidth,{fileName:"Universal.hx",lineNumber:113,className:"Universal",methodName:"initScreen"});Q.debug("Game Height: "+
ha.stageHeight,{fileName:"Universal.hx",lineNumber:114,className:"Universal",methodName:"initScreen"});Q.debug("Game Scale: "+ha.gameScale,{fileName:"Universal.hx",lineNumber:115,className:"Universal",methodName:"initScreen"});Q.debug("Window Width: "+xa.windowWidth,{fileName:"Universal.hx",lineNumber:116,className:"Universal",methodName:"initScreen"});Q.debug("Window Height: "+xa.windowHeight,{fileName:"Universal.hx",lineNumber:117,className:"Universal",methodName:"initScreen"});c=this.stage.get_fullScreenWidth();
Q.debug("FullScreen Width: "+(null==c?"null":A.string(ua.toFloat(c))),{fileName:"Universal.hx",lineNumber:118,className:"Universal",methodName:"initScreen"});c=this.stage.get_fullScreenHeight();Q.debug("FullScreen Height: "+(null==c?"null":A.string(ua.toFloat(c))),{fileName:"Universal.hx",lineNumber:119,className:"Universal",methodName:"initScreen"});Q.debug("Device Pixel Ratio: "+this.stage.window.__scale,{fileName:"Universal.hx",lineNumber:120,className:"Universal",methodName:"initScreen"});Q.debug("Enabled Scales: "+
A.string(ha.scales),{fileName:"Universal.hx",lineNumber:121,className:"Universal",methodName:"initScreen"});Q.debug("Scale Mode: "+(null==ha.scaleMode?"null":ii.toString(ha.scaleMode)),{fileName:"Universal.hx",lineNumber:122,className:"Universal",methodName:"initScreen"});c=this.getDesiredScale(xa.windowWidth,xa.windowHeight,ha.stageWidth,ha.stageHeight);d=this.getDesiredScale(ua.toFloat(this.stage.get_fullScreenWidth()),ua.toFloat(this.stage.get_fullScreenHeight()),ha.stageWidth,ha.stageHeight);
d=ha.forceHiResAssets?d:c;4==d&&null!=b.h.__keys__[Cd._4X.__id__]?(q.SCALE=4,q.IMG_BASE="4x"):3<=d&&null!=b.h.__keys__[Cd._3X.__id__]?(q.SCALE=3,q.IMG_BASE="3x"):2<=d&&null!=b.h.__keys__[Cd._2X.__id__]?(q.SCALE=2,q.IMG_BASE="2x"):1.5<=d&&null!=b.h.__keys__[Cd._1_5X.__id__]?(q.SCALE=1.5,q.IMG_BASE="1.5x"):(q.SCALE=1,q.IMG_BASE="1x");Q.debug("Theoretical Scale: "+d,{fileName:"Universal.hx",lineNumber:160,className:"Universal",methodName:"initScreen"});Q.debug("Asset Scale: "+q.IMG_BASE,{fileName:"Universal.hx",
lineNumber:161,className:"Universal",methodName:"initScreen"});b=ha.stageWidth*q.SCALE;d=ha.stageHeight*q.SCALE;e=xa.windowWidth/b;var f=xa.windowHeight/d;if(ha.forceHiResAssets||xa.windowWidth!=ha.stageWidth||xa.windowHeight!=ha.stageHeight)1==ha.scaleMode?q.SCALE!=c&&(this.set_scaleX(c/q.SCALE),this.set_scaleY(this.get_scaleX())):2==ha.scaleMode?(this.set_scaleX(e),this.set_scaleY(f)):3==ha.scaleMode||5==ha.scaleMode?(this.set_scaleX(Math.min(e,f)),this.set_scaleY(this.get_scaleX())):4==ha.scaleMode?
(this.set_scaleX(Math.max(e,f)),this.set_scaleY(this.get_scaleX())):0==ha.scaleMode&&q.SCALE!=c&&(this.set_scaleX(c/q.SCALE),this.set_scaleY(this.get_scaleX())),5!=ha.scaleMode&&1!=ha.scaleMode&&(this.set_x(this.get_x()+(xa.windowWidth-b*this.get_scaleX())/2),this.set_y(this.get_y()+(xa.windowHeight-d*this.get_scaleY())/2));xa.logicalWidth=ha.stageWidth;xa.logicalHeight=ha.stageHeight;!a||5!=ha.scaleMode&&1!=ha.scaleMode||(xa.logicalWidth=xa.windowWidth/this.get_scaleX()/q.SCALE,xa.logicalHeight=
xa.windowHeight/this.get_scaleY()/q.SCALE,(xa.logicalWidth|0)==xa.logicalWidth&&(xa.logicalHeight|0)==xa.logicalHeight)||(xa.logicalWidth|=0,xa.logicalHeight|=0,this.set_scaleX(xa.windowWidth/q.SCALE/xa.logicalWidth),this.set_scaleY(xa.windowHeight/q.SCALE/xa.logicalHeight));q.screenScaleX=this.get_scaleX();q.screenScaleY=this.get_scaleY();this.maskLayer.get_graphics().clear();!a||3!=ha.scaleMode&&0!=ha.scaleMode||(a=this.get_x()/this.get_scaleX(),c=this.get_y()/this.get_scaleY(),e=xa.windowWidth/
this.get_scaleX(),this.maskLayer.get_graphics().beginFill(this.stage.get_color()),this.maskLayer.get_graphics().drawRect(-a,-c,e,c),this.maskLayer.get_graphics().drawRect(-a,0,a,d),this.maskLayer.get_graphics().drawRect(b,0,a,d),this.maskLayer.get_graphics().drawRect(-a,d,e,c),this.maskLayer.get_graphics().endFill());Q.debug("Logical Width: "+xa.logicalWidth,{fileName:"Universal.hx",lineNumber:312,className:"Universal",methodName:"initScreen"});Q.debug("Logical Height: "+xa.logicalHeight,{fileName:"Universal.hx",
lineNumber:313,className:"Universal",methodName:"initScreen"});Q.debug("Scale X: "+this.get_scaleX(),{fileName:"Universal.hx",lineNumber:314,className:"Universal",methodName:"initScreen"});Q.debug("Scale Y: "+this.get_scaleY(),{fileName:"Universal.hx",lineNumber:315,className:"Universal",methodName:"initScreen"})},getDesiredScale:function(a,b,c,d){var e=2*c,f=2*d;c*=3;d*=3;return a>=2*e&&b>=2*f?4:a>=c&&b>=d?3:a>=e&&b>=f?2:a>=c/2&&b>=d/2?1.5:1},__class__:xa});var Ga={toString:function(a){switch(a){case 0:return"Element";
case 1:return"PCData";case 2:return"CData";case 3:return"Comment";case 4:return"DocType";case 5:return"ProcessingInstruction";case 6:return"Document"}}},ba=function(a){this.nodeType=a;this.children=[];this.attributeMap=new ia};k.Xml=ba;ba.__name__="Xml";ba.parse=function(a){return dh.parse(a)};ba.createElement=function(a){var b=new ba(ba.Element);if(b.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeName=a;return b};
ba.createPCData=function(a){var b=new ba(ba.PCData);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeValue=a;return b};ba.createCData=function(a){var b=new ba(ba.CData);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeValue=a;return b};ba.createComment=function(a){var b=new ba(ba.Comment);if(b.nodeType==
ba.Document||b.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeValue=a;return b};ba.createDocType=function(a){var b=new ba(ba.DocType);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeValue=a;return b};ba.createProcessingInstruction=function(a){var b=new ba(ba.ProcessingInstruction);if(b.nodeType==ba.Document||b.nodeType==
ba.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));b.nodeValue=a;return b};ba.createDocument=function(){return new ba(ba.Document)};ba.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(a){if(this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));return this.attributeMap.h[a]},set:function(a,b){if(this.nodeType!=
ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));this.attributeMap.h[a]=b},exists:function(a){if(this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));return Object.prototype.hasOwnProperty.call(this.attributeMap.h,a)},attributes:function(){if(this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==
this.nodeType?"null":Ga.toString(this.nodeType)));return new hj(this.attributeMap.h)},elements:function(){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));for(var a=[],b=0,c=this.children;b<c.length;){var d=c[b];++b;d.nodeType==ba.Element&&a.push(d)}return new se(a)},elementsNamed:function(a){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+
(null==this.nodeType?"null":Ga.toString(this.nodeType)));for(var b=[],c=0,d=this.children;c<d.length;){var e=d[c];++c;if(e.nodeType==ba.Element){if(e.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==e.nodeType?"null":Ga.toString(e.nodeType)));var f=e.nodeName==a}else f=!1;f&&b.push(e)}return new se(b)},firstElement:function(){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==
this.nodeType?"null":Ga.toString(this.nodeType)));for(var a=0,b=this.children;a<b.length;){var c=b[a];++a;if(c.nodeType==ba.Element)return c}return null},addChild:function(a){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));null!=a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=ba.Document&&this.nodeType!=
ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Ga.toString(this.nodeType)));return I.remove(this.children,a)?(a.parent=null,!0):!1},toString:function(){return ij.print(this)},__class__:ba};var Ha=function(){this.lowerBound=new y;this.upperBound=new y};k["box2D.collision.B2AABB"]=Ha;Ha.__name__="box2D.collision.B2AABB";Ha.prototype={isValid:function(){var a=this.upperBound.y-this.lowerBound.y;return 0<=this.upperBound.x-this.lowerBound.x&&
0<=a&&this.lowerBound.isValid()&&this.upperBound.isValid()},getCenter:function(){return new y((this.lowerBound.x+this.upperBound.x)/2,(this.lowerBound.y+this.upperBound.y)/2)},getExtents:function(){return new y((this.upperBound.x-this.lowerBound.x)/2,(this.upperBound.y-this.lowerBound.y)/2)},contains:function(a){var b;return b=(b=(b=(b=this.lowerBound.x<=a.lowerBound.x)&&this.lowerBound.y<=a.lowerBound.y)&&a.upperBound.x<=this.upperBound.x)&&a.upperBound.y<=this.upperBound.y},rayCast:function(a,b){var c=
-Number.MAX_VALUE,d=Number.MAX_VALUE,e=b.p1.x,f=b.p1.y,g=b.p2.x-b.p1.x;b=b.p2.y-b.p1.y;var h=Math.abs(b),m=a.normal;if(Math.abs(g)<Number.MIN_VALUE){if(e<this.lowerBound.x||this.upperBound.x<e)return!1}else{var l=1/g;g=(this.lowerBound.x-e)*l;e=(this.upperBound.x-e)*l;l=-1;g>e&&(l=g,g=e,e=l,l=1);g>c&&(m.x=l,m.y=0,c=g);d=Math.min(d,e);if(c>d)return!1}if(h<Number.MIN_VALUE){if(f<this.lowerBound.y||this.upperBound.y<f)return!1}else if(l=1/b,g=(this.lowerBound.y-f)*l,e=(this.upperBound.y-f)*l,l=-1,g>
e&&(l=g,g=e,e=l,l=1),g>c&&(m.y=l,m.x=0,c=g),d=Math.min(d,e),c>d)return!1;a.fraction=c;return!0},testOverlap:function(a){var b=a.lowerBound.y-this.upperBound.y,c=this.lowerBound.y-a.upperBound.y;return 0<a.lowerBound.x-this.upperBound.x||0<b||0<this.lowerBound.x-a.upperBound.x||0<c?!1:!0},combine:function(a,b){this.lowerBound.x=Math.min(a.lowerBound.x,b.lowerBound.x);this.lowerBound.y=Math.min(a.lowerBound.y,b.lowerBound.y);this.upperBound.x=Math.max(a.upperBound.x,b.upperBound.x);this.upperBound.y=
Math.max(a.upperBound.y,b.upperBound.y)},reset:function(){this.lowerBound.x=0;this.lowerBound.y=0;this.upperBound.x=0;this.upperBound.y=0},setTo:function(a){this.lowerBound.x=a.lowerBound.x;this.lowerBound.y=a.lowerBound.y;this.upperBound.x=a.upperBound.x;this.upperBound.y=a.upperBound.y},lowerBound:null,upperBound:null,__class__:Ha};var y=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};k["box2D.common.math.B2Vec2"]=y;y.__name__="box2D.common.math.B2Vec2";y.make=function(a,b){return new y(a,
b)};y.freePool=function(){y.pooli=0};y.getFromPool=function(){500<y.pooli&&(y.pooli=0);if(y.pooli<y.pool.length){var a=y.pool[y.pooli];a.x=0;a.y=0}else a=new y,y.pool.push(a);y.pooli++;return a};y.prototype={setZero:function(){this.y=this.x=0},set:function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b},setV:function(a){this.x=a.x;this.y=a.y},getNegative:function(){return new y(-this.x,-this.y)},getNegativePooled:function(){var a=y.getFromPool();a.x=-this.x;a.y=-this.y;return a},negativeSelf:function(){this.x=
-this.x;this.y=-this.y},copy:function(a){null==a&&(a=!1);if(a){a=y.getFromPool();var b=this.x,c=this.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c}else a=new y(this.x,this.y);return a},add:function(a){this.x+=a.x;this.y+=a.y},subtract:function(a){this.x-=a.x;this.y-=a.y},multiply:function(a){this.x*=a;this.y*=a},mulM:function(a){var b=this.x;this.x=a.col1.x*b+a.col2.x*this.y;this.y=a.col1.y*b+a.col2.y*this.y},mulTM:function(a){var b=O.dot(this,a.col1);this.y=O.dot(this,a.col2);this.x=b},crossVF:function(a){var b=
this.x;this.x=a*this.y;this.y=-a*b},crossFV:function(a){var b=this.x;this.x=-a*this.y;this.y=a*b},minV:function(a){this.x=this.x<a.x?this.x:a.x;this.y=this.y<a.y?this.y:a.y},maxV:function(a){this.x=this.x>a.x?this.x:a.x;this.y=this.y>a.y?this.y:a.y},abs:function(){0>this.x&&(this.x=-this.x);0>this.y&&(this.y=-this.y)},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthSquared:function(){return this.x*this.x+this.y*this.y},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*
this.y);if(a<Number.MIN_VALUE)return 0;var b=1/a;this.x*=b;this.y*=b;return a},perpDot:function(a){return-this.y*a.x+this.x*a.y},winding:function(a,b){var c=a.copy();c.subtract(this);b=b.copy();b.subtract(a);return c.perpDot(b)},isValid:function(){return O.isValid(this.x)?O.isValid(this.y):!1},x:null,y:null,toString:function(){return"("+this.x+", "+this.y+")"},reset:function(){this.y=this.x=0},__class__:y};var ja=function(){this.v=new y;this.id=new lc};k["box2D.collision.ClipVertex"]=ja;ja.__name__=
"box2D.collision.ClipVertex";ja.prototype={set:function(a){var b=this.v,c=a.v;b.x=c.x;b.y=c.y;this.id.set(a.id)},v:null,id:null,__class__:ja};var lc=function(){this.features=new mc;this.features._m_id=this};k["box2D.collision.B2ContactID"]=lc;lc.__name__="box2D.collision.B2ContactID";lc.prototype={set:function(a){this.set_key(a._key)},copy:function(){var a=new lc;a.set_key(this.get_key());return a},get_key:function(){return this._key},set_key:function(a){this._key=a;this.features._referenceEdge=this._key&
255;this.features._incidentEdge=(this._key&65280)>>8&255;this.features._incidentVertex=(this._key&16711680)>>16&255;this.features._flip=(this._key&-16777216)>>24&255;return this._key},features:null,_key:null,indexA:null,indexB:null,typeA:null,typeB:null,__class__:lc,__properties__:{set_key:"set_key",get_key:"get_key"}};var mc=function(){};k["box2D.collision.Features"]=mc;mc.__name__="box2D.collision.Features";mc.prototype={get_referenceEdge:function(){return this._referenceEdge},set_referenceEdge:function(a){this._referenceEdge=
a;this._m_id._key=this._m_id._key&-256|this._referenceEdge&255;return a},_referenceEdge:null,get_incidentEdge:function(){return this._incidentEdge},set_incidentEdge:function(a){this._incidentEdge=a;this._m_id._key=this._m_id._key&-65281|this._incidentEdge<<8&65280;return a},_incidentEdge:null,get_incidentVertex:function(){return this._incidentVertex},set_incidentVertex:function(a){this._incidentVertex=a;this._m_id._key=this._m_id._key&-16711681|this._incidentVertex<<16&16711680;return a},_incidentVertex:null,
get_flip:function(){return this._flip},set_flip:function(a){this._flip=a;this._m_id._key=this._m_id._key&16777215|this._flip<<24&-16777216;return a},_flip:null,_m_id:null,__class__:mc,__properties__:{set_flip:"set_flip",get_flip:"get_flip",set_incidentVertex:"set_incidentVertex",get_incidentVertex:"get_incidentVertex",set_incidentEdge:"set_incidentEdge",get_incidentEdge:"get_incidentEdge",set_referenceEdge:"set_referenceEdge",get_referenceEdge:"get_referenceEdge"}};var Sa=function(){};k["box2D.collision.B2Collision"]=
Sa;Sa.__name__="box2D.collision.B2Collision";Sa.clipSegmentToLine=function(a,b,c,d){var e=0,f=b[0],g=f.v;f=b[1];var h=f.v,m=c.x*g.x+c.y*g.y-d;f=c.x*h.x+c.y*h.y-d;0>=m&&a[e++].set(b[0]);0>=f&&a[e++].set(b[1]);0>m*f&&(c=m/(m-f),f=a[e],f=f.v,f.x=g.x+c*(h.x-g.x),f.y=g.y+c*(h.y-g.y),f=a[e],f.id=(0<m?b[0]:b[1]).id,++e);return e};Sa.edgeSeparation=function(a,b,c,d,e){var f=a.m_vertices,g=d.m_vertexCount;d=d.m_vertices;var h=b.R,m=a.m_normals[c];a=h.col1.x*m.x+h.col2.x*m.y;var l=h.col1.y*m.x+h.col2.y*m.y;
h=e.R;var L=h.col1.x*a+h.col1.y*l;h=h.col2.x*a+h.col2.y*l;for(var p=0,n=Number.MAX_VALUE,q=0;q<g;){var k=q++;m=d[k];m=m.x*L+m.y*h;m<n&&(n=m,p=k)}m=f[c];h=b.R;c=b.position.x+(h.col1.x*m.x+h.col2.x*m.y);b=b.position.y+(h.col1.y*m.x+h.col2.y*m.y);m=d[p];h=e.R;return(e.position.x+(h.col1.x*m.x+h.col2.x*m.y)-c)*a+(e.position.y+(h.col1.y*m.x+h.col2.y*m.y)-b)*l};Sa.findMaxSeparation=function(a,b,c,d,e){var f=b.m_vertexCount,g=b.m_normals,h=e.R,m=d.m_centroid,l=e.position.x+(h.col1.x*m.x+h.col2.x*m.y),L=
e.position.y+(h.col1.y*m.x+h.col2.y*m.y);h=c.R;m=b.m_centroid;l-=c.position.x+(h.col1.x*m.x+h.col2.x*m.y);L-=c.position.y+(h.col1.y*m.x+h.col2.y*m.y);h=l*c.R.col1.x+L*c.R.col1.y;L=l*c.R.col2.x+L*c.R.col2.y;l=0;for(var p=-Number.MAX_VALUE,n=0;n<f;){var q=n++;m=g[q];m=m.x*h+m.y*L;m>p&&(p=m,l=q)}g=Sa.edgeSeparation(b,c,l,d,e);p=0<=l-1?l-1:f-1;h=Sa.edgeSeparation(b,c,p,d,e);n=l+1<f?l+1:0;L=Sa.edgeSeparation(b,c,n,d,e);if(h>g&&h>L)m=-1;else if(L>g)m=1,p=n,h=L;else return a[0]=l,g;for(;;)if(l=-1==m?0<=
p-1?p-1:f-1:p+1<f?p+1:0,g=Sa.edgeSeparation(b,c,l,d,e),g>h)p=l,h=g;else break;a[0]=p;return h};Sa.findIncidentEdge=function(a,b,c,d,e,f){var g=e.m_vertexCount,h=e.m_vertices;e=e.m_normals;var m=c.R;b=b.m_normals[d];c=m.col1.x*b.x+m.col2.x*b.y;var l=m.col1.y*b.x+m.col2.y*b.y;m=f.R;b=m.col1.x*c+m.col1.y*l;l=m.col2.x*c+m.col2.y*l;c=b;m=0;for(var L=Number.MAX_VALUE,p=0;p<g;){var n=p++;b=e[n];b=c*b.x+l*b.y;b<L&&(L=b,m=n)}e=m;g=e+1<g?e+1:0;c=a[0];b=h[e];m=f.R;c.v.x=f.position.x+(m.col1.x*b.x+m.col2.x*b.y);
c.v.y=f.position.y+(m.col1.y*b.x+m.col2.y*b.y);c.id.features.set_referenceEdge(d);c.id.features.set_incidentEdge(e);c.id.features.set_incidentVertex(0);c=a[1];b=h[g];m=f.R;c.v.x=f.position.x+(m.col1.x*b.x+m.col2.x*b.y);c.v.y=f.position.y+(m.col1.y*b.x+m.col2.y*b.y);c.id.features.set_referenceEdge(d);c.id.features.set_incidentEdge(g);c.id.features.set_incidentVertex(1)};Sa.makeClipPointVector=function(){var a=[];a[0]=new ja;a[1]=new ja;return a};Sa.collidePolygons=function(a,b,c,d,e){a.m_pointCount=
0;var f=b.m_radius+d.m_radius;Sa.s_edgeAO[0]=0;var g=Sa.findMaxSeparation(Sa.s_edgeAO,b,c,d,e);var h=Sa.s_edgeAO[0];if(!(g>f)){Sa.s_edgeBO[0]=0;var m=Sa.findMaxSeparation(Sa.s_edgeBO,d,e,b,c);var l=Sa.s_edgeBO[0];if(!(m>f)){m>.98*g+.001?(g=d,d=b,b=e,e=l,a.m_type=4,h=1):(g=b,b=c,c=e,e=h,a.m_type=2,h=0);l=Sa.s_incidentEdge;Sa.findIncidentEdge(l,g,b,e,d,c);m=g.m_vertices;d=m[e];var L=e+1<g.m_vertexCount?m[e+1]:m[0];g=Sa.s_localTangent;e=L.x-d.x;var p=L.y-d.y;null==p&&(p=0);null==e&&(e=0);g.x=e;g.y=p;
g.normalize();m=Sa.s_localNormal;m.x=g.y;m.y=-g.x;var n=Sa.s_planePoint;e=.5*(d.x+L.x);p=.5*(d.y+L.y);null==p&&(p=0);null==e&&(e=0);n.x=e;n.y=p;p=Sa.s_tangent;e=b.R;p.x=e.col1.x*g.x+e.col2.x*g.y;p.y=e.col1.y*g.x+e.col2.y*g.y;var q=Sa.s_tangent2;q.x=-p.x;q.y=-p.y;g=Sa.s_normal;g.x=p.y;g.y=-p.x;var k=Sa.s_v11,t=Sa.s_v12;k.x=b.position.x+(e.col1.x*d.x+e.col2.x*d.y);k.y=b.position.y+(e.col1.y*d.x+e.col2.y*d.y);t.x=b.position.x+(e.col1.x*L.x+e.col2.x*L.y);t.y=b.position.y+(e.col1.y*L.x+e.col2.y*L.y);b=
g.x*k.x+g.y*k.y;e=p.x*t.x+p.y*t.y+f;L=Sa.s_clipPoints1;d=Sa.s_clipPoints2;l=Sa.clipSegmentToLine(L,l,q,-p.x*k.x-p.y*k.y+f);if(!(2>l||(l=Sa.clipSegmentToLine(d,L,p,e),2>l))){l=a.m_localPlaneNormal;l.x=m.x;l.y=m.y;l=a.m_localPoint;l.x=n.x;l.y=n.y;m=l=0;for(n=ca.b2_maxManifoldPoints;m<n;)e=m++,p=d[e],g.x*p.v.x+g.y*p.v.y-b<=f&&(q=a.m_points[l],e=c.R,k=p.v.x-c.position.x,L=p.v.y-c.position.y,q.m_localPoint.x=k*e.col1.x+L*e.col1.y,q.m_localPoint.y=k*e.col2.x+L*e.col2.y,q.m_id.set(p.id),q.m_id.features.set_flip(h),
++l);a.m_pointCount=l}}}};Sa.collideCircles=function(a,b,c,d,e){a.m_pointCount=0;var f=c.R,g=b.m_p,h=c.position.x+(f.col1.x*g.x+f.col2.x*g.y);c=c.position.y+(f.col1.y*g.x+f.col2.y*g.y);f=e.R;g=d.m_p;h=e.position.x+(f.col1.x*g.x+f.col2.x*g.y)-h;e=e.position.y+(f.col1.y*g.x+f.col2.y*g.y)-c;f=b.m_radius+d.m_radius;h*h+e*e>f*f||(a.m_type=1,e=a.m_localPoint,b=b.m_p,e.x=b.x,e.y=b.y,e=a.m_localPlaneNormal,e.x=0,e.y=0,a.m_pointCount=1,e=a.m_points[0].m_localPoint,b=d.m_p,e.x=b.x,e.y=b.y,a.m_points[0].m_id.set_key(0))};
Sa.collidePolygonAndCircle=function(a,b,c,d,e){a.m_pointCount=0;var f=e.R,g=d.m_p,h=e.position.x+(f.col1.x*g.x+f.col2.x*g.y)-c.position.x,m=e.position.y+(f.col1.y*g.x+f.col2.y*g.y)-c.position.y;f=c.R;c=h*f.col1.x+m*f.col1.y;f=h*f.col2.x+m*f.col2.y;var l=0,L=-Number.MAX_VALUE;e=b.m_radius+d.m_radius;var p=b.m_vertexCount,n=b.m_vertices;b=b.m_normals;for(var q=0;q<p;){var k=q++;g=n[k];h=c-g.x;m=f-g.y;g=b[k];g=g.x*h+g.y*m;if(g>e)return;g>L&&(L=g,l=k)}h=l;g=n[h];p=n[h+1<p?h+1:0];if(L<Number.MIN_VALUE)a.m_pointCount=
1,a.m_type=2,c=a.m_localPlaneNormal,f=b[l],c.x=f.x,c.y=f.y,a.m_localPoint.x=.5*(g.x+p.x),a.m_localPoint.y=.5*(g.y+p.y);else if(L=(c-p.x)*(g.x-p.x)+(f-p.y)*(g.y-p.y),0>=(c-g.x)*(p.x-g.x)+(f-g.y)*(p.y-g.y)){if((c-g.x)*(c-g.x)+(f-g.y)*(f-g.y)>e*e)return;a.m_pointCount=1;a.m_type=2;a.m_localPlaneNormal.x=c-g.x;a.m_localPlaneNormal.y=f-g.y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;c.x=g.x;c.y=g.y}else if(0>=L){if((c-p.x)*(c-p.x)+(f-p.y)*(f-p.y)>e*e)return;a.m_pointCount=1;a.m_type=2;a.m_localPlaneNormal.x=
c-p.x;a.m_localPlaneNormal.y=f-p.y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;c.x=p.x;c.y=p.y}else{l=.5*(g.x+p.x);g=.5*(g.y+p.y);L=(c-l)*b[h].x+(f-g)*b[h].y;if(L>e)return;a.m_pointCount=1;a.m_type=2;a.m_localPlaneNormal.x=b[h].x;a.m_localPlaneNormal.y=b[h].y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;f=l;e=g;null==e&&(e=0);null==f&&(f=0);c.x=f;c.y=e}c=a.m_points[0].m_localPoint;f=d.m_p;c.x=f.x;c.y=f.y;a.m_points[0].m_id.set_key(0)};Sa.testOverlap=function(a,b){var c=b.lowerBound,d=a.upperBound,
e=c.x-d.x,f=c.y-d.y;c=a.lowerBound;d=b.upperBound;a=c.y-d.y;return 0<e||0<f||0<c.x-d.x||0<a?!1:!0};var nc=function(){this.position=new y;this.velocity=new y;this.normal=new y;this.id=new lc};k["box2D.collision.B2ContactPoint"]=nc;nc.__name__="box2D.collision.B2ContactPoint";nc.prototype={shape1:null,shape2:null,position:null,velocity:null,normal:null,separation:null,friction:null,restitution:null,id:null,__class__:nc};var P=function(){this.m_v1=new Ue;this.m_v2=new Ue;this.m_v3=new Ue;this.m_vertices=
[];this.m_vertices[0]=this.m_v1;this.m_vertices[1]=this.m_v2;this.m_vertices[2]=this.m_v3};k["box2D.collision.B2Simplex"]=P;P.__name__="box2D.collision.B2Simplex";P.prototype={readCache:function(a,b,c,d,e){ca.b2Assert(0<=a.count&&3>=a.count);this.m_count=a.count;var f=this.m_vertices;if(a.useCache){for(var g=0,h=this.m_count;g<h;){var m=g++;var l=f[m];l.indexA=a.indexA[m];l.indexB=a.indexB[m];m=b.getVertex(l.indexA);var L=d.getVertex(l.indexB);l.wA=O.mulX(c,m,!0);l.wB=O.mulX(e,L,!0);l.w=O.subtractVVPooled(l.wB,
l.wA);l.a=0}1<this.m_count&&(a=a.metric,l=this.getMetric(),l<.5*a||2*a<l||l<Number.MIN_VALUE)&&(this.m_count=0)}0==this.m_count&&(l=f[0],l.indexA=0,l.indexB=0,m=b.getVertex(0),L=d.getVertex(0),l.wA=O.mulX(c,m,!0),l.wB=O.mulX(e,L,!0),l.w=O.subtractVVPooled(l.wB,l.wA),this.m_count=1)},writeCache:function(a){if(a.useCache){a.metric=this.getMetric();a.count=this.m_count;for(var b=this.m_vertices,c=0,d=this.m_count;c<d;){var e=c++;a.indexA[e]=b[e].indexA;a.indexB[e]=b[e].indexB}}},getSearchDirection:function(){switch(this.m_count){case 1:return this.m_v1.w.getNegativePooled();
case 2:var a=O.subtractVVPooled(this.m_v2.w,this.m_v1.w);return 0<O.crossVV(a,this.m_v1.w.getNegativePooled())?O.crossFV(1,a,!0):O.crossVF(a,1,!0);default:return ca.b2Assert(!1),y.getFromPool()}},getClosestPoint:function(){switch(this.m_count){case 0:return ca.b2Assert(!1),y.getFromPool();case 1:return this.m_v1.w;case 2:var a=y.getFromPool();a.x=this.m_v1.a*this.m_v1.w.x+this.m_v2.a*this.m_v2.w.x;a.y=this.m_v1.a*this.m_v1.w.y+this.m_v2.a*this.m_v2.w.y;return a;default:return ca.b2Assert(!1),y.getFromPool()}},
getWitnessPoints:function(a,b){switch(this.m_count){case 0:ca.b2Assert(!1);break;case 1:var c=this.m_v1.wA;a.x=c.x;a.y=c.y;c=this.m_v1.wB;b.x=c.x;b.y=c.y;break;case 2:a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x;a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y;b.x=this.m_v1.a*this.m_v1.wB.x+this.m_v2.a*this.m_v2.wB.x;b.y=this.m_v1.a*this.m_v1.wB.y+this.m_v2.a*this.m_v2.wB.y;break;case 3:b.x=a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x+this.m_v3.a*this.m_v3.wA.x;
b.y=a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y+this.m_v3.a*this.m_v3.wA.y;break;default:ca.b2Assert(!1)}},getMetric:function(){switch(this.m_count){case 0:return ca.b2Assert(!1),0;case 1:return 0;case 2:return O.subtractVVPooled(this.m_v1.w,this.m_v2.w).length();case 3:return O.crossVV(O.subtractVVPooled(this.m_v2.w,this.m_v1.w),O.subtractVVPooled(this.m_v3.w,this.m_v1.w));default:return ca.b2Assert(!1),0}},solve2:function(){var a=this.m_v1.w,b=this.m_v2.w,c=O.subtractVVPooled(b,a);
a=-(a.x*c.x+a.y*c.y);0>=a?this.m_count=this.m_v1.a=1:(b=b.x*c.x+b.y*c.y,0>=b?(this.m_count=this.m_v2.a=1,this.m_v1.set(this.m_v2)):(c=1/(b+a),this.m_v1.a=b*c,this.m_v2.a=a*c,this.m_count=2))},solve3:function(){var a=this.m_v1.w,b=this.m_v2.w,c=this.m_v3.w,d=O.subtractVVPooled(b,a),e=O.dot(a,d),f=O.dot(b,d);e=-e;var g=O.subtractVVPooled(c,a),h=O.dot(a,g),m=O.dot(c,g);h=-h;var l=O.subtractVVPooled(c,b),L=O.dot(b,l);l=O.dot(c,l);L=-L;g=O.crossVV(d,g);d=g*O.crossVV(b,c);c=g*O.crossVV(c,a);a=g*O.crossVV(a,
b);0>=e&&0>=h?this.m_count=this.m_v1.a=1:0<f&&0<e&&0>=a?(m=1/(f+e),this.m_v1.a=f*m,this.m_v2.a=e*m,this.m_count=2):0<m&&0<h&&0>=c?(f=1/(m+h),this.m_v1.a=m*f,this.m_v3.a=h*f,this.m_count=2,this.m_v2.set(this.m_v3)):0>=f&&0>=L?(this.m_count=this.m_v2.a=1,this.m_v1.set(this.m_v2)):0>=m&&0>=l?(this.m_count=this.m_v3.a=1,this.m_v1.set(this.m_v3)):0<l&&0<L&&0>=d?(f=1/(l+L),this.m_v2.a=l*f,this.m_v3.a=L*f,this.m_count=2,this.m_v1.set(this.m_v3)):(f=1/(d+c+a),this.m_v1.a=d*f,this.m_v2.a=c*f,this.m_v3.a=a*
f,this.m_count=3)},m_v1:null,m_v2:null,m_v3:null,m_vertices:null,m_count:null,__class__:P};var Ue=function(){};k["box2D.collision.B2SimplexVertex"]=Ue;Ue.__name__="box2D.collision.B2SimplexVertex";Ue.prototype={set:function(a){var b=this.wA,c=a.wA;b.x=c.x;b.y=c.y;b=this.wB;c=a.wB;b.x=c.x;b.y=c.y;b=this.w;c=a.w;b.x=c.x;b.y=c.y;this.a=a.a;this.indexA=a.indexA;this.indexB=a.indexB},wA:null,wB:null,w:null,a:null,indexA:null,indexB:null,__class__:Ue};var ka=function(){};k["box2D.collision.B2Distance"]=
ka;ka.__name__="box2D.collision.B2Distance";ka.distance=function(a,b,c){++ka.b2_gjkCalls;var d=c.proxyA,e=c.proxyB,f=c.transformA,g=c.transformB,h=ka.s_simplex;h.readCache(b,d,f,e,g);var m=h.m_vertices,l=ka.s_saveA,L=ka.s_saveB;h.getClosestPoint().lengthSquared();for(var p,n=0;20>n;){var q=h.m_count;for(var k=0,t=q;k<t;)p=k++,l[p]=m[p].indexA,L[p]=m[p].indexB;switch(h.m_count){case 1:break;case 2:h.solve2();break;case 3:h.solve3();break;default:ca.b2Assert(!1)}if(3==h.m_count)break;p=h.getClosestPoint();
p.lengthSquared();k=h.getSearchDirection();if(k.lengthSquared()<Number.MIN_VALUE*Number.MIN_VALUE)break;p=m[h.m_count];p.indexA=d.getSupport(O.mulTMV(f.R,k.getNegativePooled(),!0))|0;p.wA=O.mulX(f,d.getVertex(p.indexA),!0);p.indexB=e.getSupport(O.mulTMV(g.R,k,!0))|0;p.wB=O.mulX(g,e.getVertex(p.indexB),!0);p.w=O.subtractVVPooled(p.wB,p.wA);++n;++ka.b2_gjkIters;k=!1;for(t=0;t<q;){var v=t++;if(p.indexA==l[v]&&p.indexB==L[v]){k=!0;break}}if(k)break;++h.m_count}ka.b2_gjkMaxIters=O.max(ka.b2_gjkMaxIters,
n)|0;h.getWitnessPoints(a.pointA,a.pointB);a.distance=O.subtractVVPooled(a.pointA,a.pointB).length();a.iterations=n;h.writeCache(b);c.useRadii&&(b=d.m_radius,e=e.m_radius,a.distance>b+e&&a.distance>Number.MIN_VALUE?(a.distance-=b+e,c=O.subtractVVPooled(a.pointB,a.pointA),c.normalize(),a.pointA.x+=b*c.x,a.pointA.y+=b*c.y,a.pointB.x-=e*c.x,a.pointB.y-=e*c.y):(p=y.getFromPool(),p.x=.5*(a.pointA.x+a.pointB.x),p.y=.5*(a.pointA.y+a.pointB.y),a.pointA.x=a.pointB.x=p.x,a.pointA.y=a.pointB.y=p.y,a.distance=
0))};var F=function(){};k["box2D.collision.B2DistanceInput"]=F;F.__name__="box2D.collision.B2DistanceInput";F.prototype={proxyA:null,proxyB:null,transformA:null,transformB:null,useRadii:null,__class__:F};var qg=function(){this.pointA=new y;this.pointB=new y};k["box2D.collision.B2DistanceOutput"]=qg;qg.__name__="box2D.collision.B2DistanceOutput";qg.prototype={pointA:null,pointB:null,distance:null,iterations:null,__class__:qg};var Rb=function(){this.m_internalVertices=[]};k["box2D.collision.B2DistanceProxy"]=
Rb;Rb.__name__="box2D.collision.B2DistanceProxy";Rb.prototype={set:function(a){switch(a.getType()){case 0:a=U.__cast(a,Lc);for(this.m_vertices=this.m_internalVertices;1<this.m_vertices.length;)this.m_vertices.pop();this.m_vertices[0]=a.m_p;this.m_count=1;this.m_radius=a.m_radius;break;case 1:a=U.__cast(a,Db);this.m_vertices=a.m_vertices;this.m_count=a.m_vertexCount;this.m_radius=a.m_radius;break;case 2:a=U.__cast(a,rg);for(this.m_vertices=this.m_internalVertices;2<this.m_vertices.length;)this.m_vertices.pop();
this.m_vertices[0]=a.m_v1;this.m_vertices[1]=a.m_v2;this.m_count=2;this.m_radius=a.m_radius;break;default:ca.b2Assert(!1)}},getSupport:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_count;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return b},getSupportVertex:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_count;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;
g>c&&(b=f,c=g)}return this.m_vertices[b]},getVertexCount:function(){return this.m_count},getVertex:function(a){ca.b2Assert(0<=a&&a<this.m_count);return this.m_vertices[a]},m_internalVertices:null,m_vertices:null,m_count:null,m_radius:null,__class__:Rb};var ue=function(){this.oldAABB=new Ha;this.stackQueue=[];this.stackQueuePos=0;this.m_freeList=this.m_root=null;this.m_insertionCount=this.m_path=0};k["box2D.collision.B2DynamicTree"]=ue;ue.__name__="box2D.collision.B2DynamicTree";ue.prototype={createProxy:function(a,
b){var c=this.allocateNode(),d=ca.b2_aabbExtension,e=ca.b2_aabbExtension;c.aabb.lowerBound.x=a.lowerBound.x-d;c.aabb.lowerBound.y=a.lowerBound.y-e;c.aabb.upperBound.x=a.upperBound.x+d;c.aabb.upperBound.y=a.upperBound.y+e;c.userData=b;this.insertLeaf(c);return c},destroyProxy:function(a){this.removeLeaf(a);this.freeNode(a)},moveProxy:function(a,b,c){ca.b2Assert(a.isLeaf());if(a.aabb.contains(b))return!1;this.removeLeaf(a);var d=ca.b2_aabbExtension+ca.b2_aabbMultiplier*(0<c.x?c.x:-c.x);c=ca.b2_aabbExtension+
ca.b2_aabbMultiplier*(0<c.y?c.y:-c.y);a.aabb.lowerBound.x=b.lowerBound.x-d;a.aabb.lowerBound.y=b.lowerBound.y-c;a.aabb.upperBound.x=b.upperBound.x+d;a.aabb.upperBound.y=b.upperBound.y+c;this.insertLeaf(a);return!0},rebalance:function(a){if(null!=this.m_root)for(var b=0;b<a;){b++;for(var c=this.m_root,d=0;0==c.isLeaf();)c=0!=(this.m_path>>d&1)?c.child2:c.child1,d=d+1&31;++this.m_path;this.removeLeaf(c);this.insertLeaf(c)}},getFatAABB:function(a){return a.aabb},getUserData:function(a){return a.userData},
stackQueuePos:null,stackQueue:null,query:function(a,b){if(null!=this.m_root){null==this.stackQueue[this.stackQueuePos]&&(this.stackQueue[this.stackQueuePos]=[]);var c=this.stackQueue[this.stackQueuePos++],d=0;for(c[d++]=this.m_root;0<d;){var e=c[--d];if(e.aabb.testOverlap(b))if(e.isLeaf()){if(!a.queryCallback(e))break}else c[d++]=e.child1,c[d++]=e.child2}for(d=c.length;0<d--;)c.pop();--this.stackQueuePos}},rayCast:function(a,b){if(null!=this.m_root){var c=b.p1,d=b.p2,e=O.subtractVVPooled(c,d);e.normalize();
e=O.crossFV(1,e);var f=O.absV(e),g=b.maxFraction,h=new Ha;var m=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);h.lowerBound.x=Math.min(c.x,m);h.lowerBound.y=Math.min(c.y,g);h.upperBound.x=Math.max(c.x,m);h.upperBound.y=Math.max(c.y,g);var l=[],L=0;for(l[L++]=this.m_root;0<L;)if(m=l[--L],0!=m.aabb.testOverlap(h)){g=m.aabb.getCenter();var p=m.aabb.getExtents();if(!(0<Math.abs(e.x*(c.x-g.x)+e.y*(c.y-g.y))-f.x*p.x-f.y*p.y))if(m.isLeaf()){g=new sk;g.p1=b.p1;g.p2=b.p2;g.maxFraction=b.maxFraction;g=a(g,m);if(0==g)break;
m=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);h.lowerBound.x=Math.min(c.x,m);h.lowerBound.y=Math.min(c.y,g);h.upperBound.x=Math.max(c.x,m);h.upperBound.y=Math.max(c.y,g)}else l[L++]=m.child1,l[L++]=m.child2}}},allocateNode:function(){if(null!=this.m_freeList){var a=this.m_freeList;this.m_freeList=a.parent;a.parent=null;a.child1=null;a.child2=null;return a}return new jj},freeNode:function(a){a.parent=this.m_freeList;this.m_freeList=a},insertLeaf:function(a){++this.m_insertionCount;if(null==this.m_root)this.m_root=
a,this.m_root.parent=null;else{var b=this.m_root;if(0==b.isLeaf())for(var c=(a.aabb.lowerBound.x+a.aabb.upperBound.x)/2,d=(a.aabb.lowerBound.y+a.aabb.upperBound.y)/2;;){var e=b.child1;b=b.child2;b=Math.abs((e.aabb.lowerBound.x+e.aabb.upperBound.x)/2-c)+Math.abs((e.aabb.lowerBound.y+e.aabb.upperBound.y)/2-d)<Math.abs((b.aabb.lowerBound.x+b.aabb.upperBound.x)/2-c)+Math.abs((b.aabb.lowerBound.y+b.aabb.upperBound.y)/2-d)?e:b;if(0!=b.isLeaf())break}c=b.parent;d=this.allocateNode();d.parent=c;d.userData=
null;d.aabb.combine(a.aabb,b.aabb);if(null!=c)for(b.parent.child1==b?c.child1=d:c.child2=d,d.child1=b,d.child2=a,b.parent=d,a.parent=d;!c.aabb.contains(d.aabb)&&(c.aabb.combine(c.child1.aabb,c.child2.aabb),d=c,c=c.parent,null!=c););else d.child1=b,d.child2=a,b.parent=d,this.m_root=a.parent=d}},oldAABB:null,removeLeaf:function(a){if(a==this.m_root)this.m_root=null;else{var b=a.parent,c=b.parent;a=b.child1==a?b.child2:b.child1;if(null!=c)for(c.child1==b?c.child1=a:c.child2=a,a.parent=c,this.freeNode(b);null!=
c;){this.oldAABB.setTo(c.aabb);c.aabb.combine(c.child1.aabb,c.child2.aabb);if(this.oldAABB.contains(c.aabb))break;c=c.parent}else this.m_root=a,a.parent=null,this.freeNode(b)}},m_root:null,m_freeList:null,m_path:null,m_insertionCount:null,__class__:ue};var pf=function(){};k["box2D.collision.QueryCallback"]=pf;pf.__name__="box2D.collision.QueryCallback";pf.__isInterface__=!0;pf.prototype={queryCallback:null,__class__:pf};var tk=function(){};k["box2D.collision.IBroadPhase"]=tk;tk.__name__="box2D.collision.IBroadPhase";
tk.__isInterface__=!0;tk.prototype={createProxy:null,destroyProxy:null,moveProxy:null,testOverlap:null,getUserData:null,getFatAABB:null,getProxyCount:null,updatePairs:null,query:null,rayCast:null,validate:null,rebalance:null,__class__:tk};var Le=function(){this.m_tree=new ue;this.m_moveBuffer=[];this.m_pairBuffer=[];this.m_proxyCount=this.m_pairCount=0};k["box2D.collision.B2DynamicTreeBroadPhase"]=Le;Le.__name__="box2D.collision.B2DynamicTreeBroadPhase";Le.__interfaces__=[pf,tk];Le.prototype={createProxy:function(a,
b){a=this.m_tree.createProxy(a,b);++this.m_proxyCount;this.bufferMove(a);return a},destroyProxy:function(a){this.unBufferMove(a);--this.m_proxyCount;this.m_tree.destroyProxy(a)},moveProxy:function(a,b,c){this.m_tree.moveProxy(a,b,c)&&this.bufferMove(a)},testOverlap:function(a,b){a=this.m_tree.getFatAABB(a);b=this.m_tree.getFatAABB(b);return a.testOverlap(b)},getUserData:function(a){return this.m_tree.getUserData(a)},getFatAABB:function(a){return this.m_tree.getFatAABB(a)},getProxyCount:function(){return this.m_proxyCount},
updatePairs:function(a){for(var b=this.m_pairCount=0,c=this.m_moveBuffer;b<c.length;){var d=c[b];++b;this.cur_queryProxy=d;d=this.m_tree.getFatAABB(d);this.m_tree.query(this,d)}this.cur_queryProxy=null;for(b=this.m_moveBuffer.length;0<=--b;)this.m_moveBuffer.pop();c=!0;for(b=0;c;)if(b>=this.m_pairCount)c=!1;else for(d=this.m_pairBuffer[b],a.addPair(this.m_tree.getUserData(d.proxyA),this.m_tree.getUserData(d.proxyB)),++b;b<this.m_pairCount;){var e=this.m_pairBuffer[b];if(e.proxyA!=d.proxyA||e.proxyB!=
d.proxyB)break;++b}},queryCallback:function(a){if(a==this.cur_queryProxy)return!0;this.m_pairCount==this.m_pairBuffer.length&&(this.m_pairBuffer[this.m_pairCount]=new un);var b=this.m_pairBuffer[this.m_pairCount];a.id<this.cur_queryProxy.id?(b.proxyA=a,b.proxyB=this.cur_queryProxy):(b.proxyA=this.cur_queryProxy,b.proxyB=a);++this.m_pairCount;return!0},query:function(a,b){this.m_tree.query(a,b)},rayCast:function(a,b){this.m_tree.rayCast(a,b)},validate:function(){},rebalance:function(a){this.m_tree.rebalance(a)},
bufferMove:function(a){this.m_moveBuffer[this.m_moveBuffer.length]=a},unBufferMove:function(a){I.remove(this.m_moveBuffer,a)},comparePairs:function(a,b){return 0},m_tree:null,m_proxyCount:null,m_moveBuffer:null,m_pairBuffer:null,m_pairCount:null,cur_queryProxy:null,__class__:Le};var jj=function(){this.aabb=new Ha;this.id=jj.currentID++};k["box2D.collision.B2DynamicTreeNode"]=jj;jj.__name__="box2D.collision.B2DynamicTreeNode";jj.prototype={id:null,isLeaf:function(){return null==this.child1},userData:null,
aabb:null,parent:null,child1:null,child2:null,__class__:jj};var un=function(){};k["box2D.collision.B2DynamicTreePair"]=un;un.__name__="box2D.collision.B2DynamicTreePair";un.prototype={proxyA:null,proxyB:null,__class__:un};var eh=function(){this.m_pointCount=0;this.m_points=[];for(var a=0,b=ca.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new vn}this.m_localPlaneNormal=new y;this.m_localPoint=new y};k["box2D.collision.B2Manifold"]=eh;eh.__name__="box2D.collision.B2Manifold";eh.prototype={reset:function(){for(var a=
0,b=ca.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c].reset()}a=this.m_localPlaneNormal;a.x=0;a.y=0;a=this.m_localPoint;a.x=0;this.m_pointCount=this.m_type=a.y=0},set:function(a){this.m_pointCount=a.m_pointCount;for(var b=0,c=ca.b2_maxManifoldPoints;b<c;){var d=b++;this.m_points[d].set(a.m_points[d])}b=this.m_localPlaneNormal;c=a.m_localPlaneNormal;b.x=c.x;b.y=c.y;b=this.m_localPoint;c=a.m_localPoint;b.x=c.x;b.y=c.y;this.m_type=a.m_type},copy:function(){var a=new eh;a.set(this);return a},m_points:null,
m_localPlaneNormal:null,m_localPoint:null,m_type:null,m_pointCount:null,__class__:eh};var vn=function(){this.m_localPoint=new y;this.m_id=new lc;this.reset()};k["box2D.collision.B2ManifoldPoint"]=vn;vn.__name__="box2D.collision.B2ManifoldPoint";vn.prototype={reset:function(){var a=this.m_localPoint;a.x=0;this.m_tangentImpulse=this.m_normalImpulse=a.y=0;this.m_id.set_key(0)},set:function(a){var b=this.m_localPoint,c=a.m_localPoint;b.x=c.x;b.y=c.y;this.m_normalImpulse=a.m_normalImpulse;this.m_tangentImpulse=
a.m_tangentImpulse;this.m_id.set(a.m_id)},m_localPoint:null,m_normalImpulse:null,m_tangentImpulse:null,m_id:null,__class__:vn};var Yq=function(){this.R=new zc;this.center=new y;this.extents=new y};k["box2D.collision.B2OBB"]=Yq;Yq.__name__="box2D.collision.B2OBB";Yq.prototype={R:null,center:null,extents:null,__class__:Yq};var sk=function(a,b,c){null==c&&(c=1);this.p1=new y;this.p2=new y;if(null!=a){var d=this.p1;d.x=a.x;d.y=a.y}null!=b&&(d=this.p2,d.x=b.x,d.y=b.y);this.maxFraction=c};k["box2D.collision.B2RayCastInput"]=
sk;sk.__name__="box2D.collision.B2RayCastInput";sk.prototype={p1:null,p2:null,maxFraction:null,__class__:sk};var wn=function(){this.normal=new y};k["box2D.collision.B2RayCastOutput"]=wn;wn.__name__="box2D.collision.B2RayCastOutput";wn.prototype={normal:null,fraction:null,__class__:wn};var df=function(){this.m_localPoint=new y;this.m_axis=new y};k["box2D.collision.B2SeparationFunction"]=df;df.__name__="box2D.collision.B2SeparationFunction";df.prototype={initialize:function(a,b,c,d,e){this.m_proxyA=
b;this.m_proxyB=d;b=a.count;ca.b2Assert(0<b&&3>b);if(1==b){this.m_type=df.e_points;var f=this.m_proxyA.getVertex(a.indexA[0]);a=this.m_proxyB.getVertex(a.indexB[0]);var g=f;var h=c.R;f=c.position.x+(h.col1.x*g.x+h.col2.x*g.y);c=c.position.y+(h.col1.y*g.x+h.col2.y*g.y);g=a;h=e.R;a=e.position.x+(h.col1.x*g.x+h.col2.x*g.y);e=e.position.y+(h.col1.y*g.x+h.col2.y*g.y);this.m_axis.x=a-f;this.m_axis.y=e-c;this.m_axis.normalize()}else if(a.indexB[0]==a.indexB[1]){this.m_type=df.e_faceA;b=this.m_proxyA.getVertex(a.indexA[0]);
d=this.m_proxyA.getVertex(a.indexA[1]);a=this.m_proxyB.getVertex(a.indexB[0]);this.m_localPoint.x=.5*(b.x+d.x);this.m_localPoint.y=.5*(b.y+d.y);var m=this.m_axis;b=O.crossVF(O.subtractVVPooled(d,b),1,!0);m.x=b.x;m.y=b.y;this.m_axis.normalize();g=this.m_axis;h=c.R;b=h.col1.x*g.x+h.col2.x*g.y;d=h.col1.y*g.x+h.col2.y*g.y;g=this.m_localPoint;h=c.R;f=c.position.x+(h.col1.x*g.x+h.col2.x*g.y);c=c.position.y+(h.col1.y*g.x+h.col2.y*g.y);g=a;h=e.R;a=e.position.x+(h.col1.x*g.x+h.col2.x*g.y);e=e.position.y+(h.col1.y*
g.x+h.col2.y*g.y);0>(a-f)*b+(e-c)*d&&(m=this.m_axis,m.x=-m.x,m.y=-m.y)}else if(a.indexA[0]==a.indexA[0])this.m_type=df.e_faceB,h=this.m_proxyB.getVertex(a.indexB[0]),g=this.m_proxyB.getVertex(a.indexB[1]),f=this.m_proxyA.getVertex(a.indexA[0]),this.m_localPoint.x=.5*(h.x+g.x),this.m_localPoint.y=.5*(h.y+g.y),m=this.m_axis,b=O.crossVF(O.subtractVVPooled(g,h),1,!0),m.x=b.x,m.y=b.y,this.m_axis.normalize(),g=this.m_axis,h=e.R,b=h.col1.x*g.x+h.col2.x*g.y,d=h.col1.y*g.x+h.col2.y*g.y,g=this.m_localPoint,
h=e.R,a=e.position.x+(h.col1.x*g.x+h.col2.x*g.y),e=e.position.y+(h.col1.y*g.x+h.col2.y*g.y),g=f,h=c.R,f=c.position.x+(h.col1.x*g.x+h.col2.x*g.y),c=c.position.y+(h.col1.y*g.x+h.col2.y*g.y),0>(f-a)*b+(c-e)*d&&(m=this.m_axis,m.x=-m.x,m.y=-m.y);else{b=this.m_proxyA.getVertex(a.indexA[0]);d=this.m_proxyA.getVertex(a.indexA[1]);h=this.m_proxyB.getVertex(a.indexB[0]);g=this.m_proxyB.getVertex(a.indexB[1]);var l=O.mulMV(c.R,O.subtractVVPooled(d,b),!0);e=O.mulMV(e.R,O.subtractVVPooled(g,h),!0);c=l.x*l.x+l.y*
l.y;f=e.x*e.x+e.y*e.y;m=O.subtractVVPooled(e,l);a=l.x*m.x+l.y*m.y;m=e.x*m.x+e.y*m.y;l=l.x*e.x+l.y*e.y;var L=c*f-l*l;e=0;0!=L&&(e=O.clamp((l*m-a*f)/L,0,1));0>(l*e+m)/f&&(e=O.clamp((l-a)/c,0,1));f=y.getFromPool();f.x=b.x+e*(d.x-b.x);f.y=b.y+e*(d.y-b.y);a=y.getFromPool();a.x=h.x+e*(g.x-h.x);a.y=h.y+e*(g.y-h.y);0==e||1==e?(this.m_type=df.e_faceB,m=this.m_axis,b=O.crossVF(O.subtractVVPooled(g,h),1,!0),m.x=b.x,m.y=b.y,this.m_axis.normalize(),m=this.m_localPoint,m.x=a.x,m.y=a.y):(this.m_type=df.e_faceA,
m=this.m_axis,b=O.crossVF(O.subtractVVPooled(d,b),1,!0),m.x=b.x,m.y=b.y,m=this.m_localPoint,m.x=f.x,m.y=f.y);0>e&&(m=this.m_axis,m.x=-m.x,m.y=-m.y)}},evaluate:function(a,b){var c;if(this.m_type==df.e_points){var d=O.mulTMV(a.R,this.m_axis,!0);var e=O.mulTMV(b.R,this.m_axis.getNegativePooled(),!0);d=this.m_proxyA.getSupportVertex(d);e=this.m_proxyB.getSupportVertex(e);a=O.mulX(a,d,!0);b=O.mulX(b,e,!0);return c=(b.x-a.x)*this.m_axis.x+(b.y-a.y)*this.m_axis.y}if(this.m_type==df.e_faceA)return c=O.mulMV(a.R,
this.m_axis,!0),a=O.mulX(a,this.m_localPoint,!0),e=O.mulTMV(b.R,c.getNegativePooled(),!0),e=this.m_proxyB.getSupportVertex(e),b=O.mulX(b,e,!0),c=(b.x-a.x)*c.x+(b.y-a.y)*c.y;if(this.m_type==df.e_faceB)return c=O.mulMV(b.R,this.m_axis,!0),b=O.mulX(b,this.m_localPoint,!0),d=O.mulTMV(a.R,c.getNegativePooled(),!0),d=this.m_proxyA.getSupportVertex(d),a=O.mulX(a,d,!0),c=(a.x-b.x)*c.x+(a.y-b.y)*c.y;ca.b2Assert(!1);return 0},m_proxyA:null,m_proxyB:null,m_type:null,m_localPoint:null,m_axis:null,__class__:df};
var uk=function(){this.useCache=!1;this.indexA=[];this.indexB=[]};k["box2D.collision.B2SimplexCache"]=uk;uk.__name__="box2D.collision.B2SimplexCache";uk.prototype={metric:null,count:null,indexA:null,indexB:null,useCache:null,__class__:uk};var xn=function(){this.proxyA=new Rb;this.proxyB=new Rb;this.sweepA=new fh;this.sweepB=new fh};k["box2D.collision.B2TOIInput"]=xn;xn.__name__="box2D.collision.B2TOIInput";xn.prototype={proxyA:null,proxyB:null,sweepA:null,sweepB:null,tolerance:null,__class__:xn};
var Ve=function(a,b){this.position=new y;this.R=new zc;if(null!=a){var c=this.position;c.x=a.x;c.y=a.y;this.R.setM(b)}};k["box2D.common.math.B2Transform"]=Ve;Ve.__name__="box2D.common.math.B2Transform";Ve.prototype={initialize:function(a,b){var c=this.position;c.x=a.x;c.y=a.y;this.R.setM(b)},setIdentity:function(){var a=this.position;a.x=0;a.y=0;this.R.setIdentity()},set:function(a){var b=this.position,c=a.position;b.x=c.x;b.y=c.y;this.R.setM(a.R)},getAngle:function(){return Math.atan2(this.R.col1.y,
this.R.col1.x)},multiply:function(a){a=this.R.multiplyV(a);a.add(this.position);return a},multiplyInPlace:function(a){this.R.multiplyVInPlace(a);a.add(this.position)},position:null,R:null,__class__:Ve};var zc=function(){this.col1=new y(0,1);this.col2=new y(0,1)};k["box2D.common.math.B2Mat22"]=zc;zc.__name__="box2D.common.math.B2Mat22";zc.fromAngle=function(a){var b=new zc;b.set(a);return b};zc.fromVV=function(a,b){var c=new zc;c.setVV(a,b);return c};zc.prototype={set:function(a){var b=Math.cos(a);
a=Math.sin(a);this.col1.x=b;this.col2.x=-a;this.col1.y=a;this.col2.y=b},setVV:function(a,b){var c=this.col1;c.x=a.x;c.y=a.y;c=this.col2;c.x=b.x;c.y=b.y},copy:function(){var a=new zc;a.setM(this);return a},setM:function(a){var b=this.col1,c=a.col1;b.x=c.x;b.y=c.y;b=this.col2;c=a.col2;b.x=c.x;b.y=c.y},addM:function(a){this.col1.x+=a.col1.x;this.col1.y+=a.col1.y;this.col2.x+=a.col2.x;this.col2.y+=a.col2.y},multiplyV:function(a){return new y(this.col1.x*a.x+this.col2.x*a.y,this.col1.y*a.x+this.col2.y*
a.y)},multiplyVInPlace:function(a){var b=this.col1.x*a.x+this.col2.x*a.y,c=this.col1.y*a.x+this.col2.y*a.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c},setIdentity:function(){this.col1.x=1;this.col2.x=0;this.col1.y=0;this.col2.y=1},setZero:function(){this.col1.x=0;this.col2.x=0;this.col1.y=0;this.col2.y=0},setAngle:function(a){this.col1.x=Math.cos(a);this.col1.y=Math.sin(a);this.col2.x=-this.col1.y;this.col2.y=this.col1.x},getAngle:function(){return Math.atan2(this.col1.y,this.col1.x)},getInverse:function(a){var b=
this.col1.x,c=this.col2.x,d=this.col1.y,e=this.col2.y,f=b*e-c*d;0!=f&&(f=1/f);a.col1.x=f*e;a.col2.x=-f*c;a.col1.y=-f*d;a.col2.y=f*b;return a},solve:function(a,b,c){var d=this.col1.x,e=this.col2.x,f=this.col1.y,g=this.col2.y,h=d*g-e*f;0!=h&&(h=1/h);a.x=h*(g*b-e*c);a.y=h*(d*c-f*b);return a},abs:function(){this.col1.abs();this.col2.abs()},col1:null,col2:null,__class__:zc};var Ib=function(){};k["box2D.collision.B2TimeOfImpact"]=Ib;Ib.__name__="box2D.collision.B2TimeOfImpact";Ib.timeOfImpact=function(a){++Ib.b2_toiCalls;
var b=a.proxyA,c=a.proxyB,d=a.sweepA,e=a.sweepB;ca.b2Assert(d.t0==e.t0);ca.b2Assert(1-d.t0>Number.MIN_VALUE);var f=b.m_radius+c.m_radius;a=a.tolerance;var g=0,h=0,m=0;Ib.s_cache.count=0;for(Ib.s_distanceInput.useRadii=!1;;){d.getTransform(Ib.s_xfA,g);e.getTransform(Ib.s_xfB,g);Ib.s_distanceInput.proxyA=b;Ib.s_distanceInput.proxyB=c;Ib.s_distanceInput.transformA=Ib.s_xfA;Ib.s_distanceInput.transformB=Ib.s_xfB;ka.distance(Ib.s_distanceOutput,Ib.s_cache,Ib.s_distanceInput);if(0>=Ib.s_distanceOutput.distance){g=
1;break}Ib.s_fcn.initialize(Ib.s_cache,b,Ib.s_xfA,c,Ib.s_xfB);var l=Ib.s_fcn.evaluate(Ib.s_xfA,Ib.s_xfB);if(0>=l){g=1;break}0==h&&(m=l>f?O.max(f-a,.75*f):O.max(l-a,.02*f));if(l-m<.5*a){if(0==h){g=1;break}break}var L=g,p=g,n=1;d.getTransform(Ib.s_xfA,n);e.getTransform(Ib.s_xfB,n);var q=Ib.s_fcn.evaluate(Ib.s_xfA,Ib.s_xfB);if(q>=m){g=1;break}for(var k=0;;){var t=0!=(k&1)?p+(m-l)*(n-p)/(q-l):.5*(p+n);d.getTransform(Ib.s_xfA,t);e.getTransform(Ib.s_xfB,t);var v=Ib.s_fcn.evaluate(Ib.s_xfA,Ib.s_xfB);if(O.abs(v-
m)<.025*a){L=t;break}v>m?(p=t,l=v):(n=t,q=v);++k;++Ib.b2_toiRootIters;if(50==k)break}Ib.b2_toiMaxRootIters=O.max(Ib.b2_toiMaxRootIters,k)|0;if(L<(1+100*Number.MIN_VALUE)*g)break;g=L;++h;++Ib.b2_toiIters;if(1E3==h)break}Ib.b2_toiMaxIters=O.max(Ib.b2_toiMaxIters,h)|0;return g};var kj=function(){this.m_normal=new y;this.m_points=[];for(var a=0,b=ca.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new y}};k["box2D.collision.B2WorldManifold"]=kj;kj.__name__="box2D.collision.B2WorldManifold";kj.prototype=
{reset:function(){var a=this.m_normal;a.x=0;for(var b=a.y=0,c=ca.b2_maxManifoldPoints;b<c;)a=b++,a=this.m_points[a],a.x=0,a.y=0},initialize:function(a,b,c,d,e){if(0!=a.m_pointCount){var f=this.m_normal;f.x=0;for(var g=f.y=0,h=ca.b2_maxManifoldPoints;g<h;){var m=g++;f=this.m_points[m];f.x=0;f.y=0}switch(a.m_type){case 1:var l=b.R;f=a.m_localPoint;g=b.position.x+l.col1.x*f.x+l.col2.x*f.y;b=b.position.y+l.col1.y*f.x+l.col2.y*f.y;l=d.R;f=a.m_points[0].m_localPoint;a=d.position.x+l.col1.x*f.x+l.col2.x*
f.y;d=d.position.y+l.col1.y*f.x+l.col2.y*f.y;f=a-g;l=d-b;h=f*f+l*l;h>Number.MIN_VALUE*Number.MIN_VALUE?(h=Math.sqrt(h),this.m_normal.x=f/h,this.m_normal.y=l/h):(this.m_normal.x=1,this.m_normal.y=0);b+=c*this.m_normal.y;d-=e*this.m_normal.y;this.m_points[0].x=.5*(g+c*this.m_normal.x+(a-e*this.m_normal.x));this.m_points[0].y=.5*(b+d);break;case 2:l=b.R;f=a.m_localPlaneNormal;var L=l.col1.x*f.x+l.col2.x*f.y;var p=l.col1.y*f.x+l.col2.y*f.y;l=b.R;f=a.m_localPoint;var n=b.position.x+l.col1.x*f.x+l.col2.x*
f.y;var q=b.position.y+l.col1.y*f.x+l.col2.y*f.y;this.m_normal.x=L;this.m_normal.y=p;g=0;for(h=a.m_pointCount;g<h;){m=g++;l=d.R;f=a.m_points[m].m_localPoint;var k=d.position.x+l.col1.x*f.x+l.col2.x*f.y;f=d.position.y+l.col1.y*f.x+l.col2.y*f.y;this.m_points[m].x=k+.5*(c-(k-n)*L-(f-q)*p-e)*L;this.m_points[m].y=f+.5*(c-(k-n)*L-(f-q)*p-e)*p}break;case 4:for(l=d.R,f=a.m_localPlaneNormal,L=l.col1.x*f.x+l.col2.x*f.y,p=l.col1.y*f.x+l.col2.y*f.y,l=d.R,f=a.m_localPoint,n=d.position.x+l.col1.x*f.x+l.col2.x*
f.y,q=d.position.y+l.col1.y*f.x+l.col2.y*f.y,this.m_normal.x=-L,this.m_normal.y=-p,g=0,h=a.m_pointCount;g<h;)m=g++,l=b.R,f=a.m_points[m].m_localPoint,k=b.position.x+l.col1.x*f.x+l.col2.x*f.y,f=b.position.y+l.col1.y*f.x+l.col2.y*f.y,this.m_points[m].x=k+.5*(e-(k-n)*L-(f-q)*p-c)*L,this.m_points[m].y=f+.5*(e-(k-n)*L-(f-q)*p-c)*p}}},getPoint:function(){return 0==this.m_points.length?null:1==this.m_points.length?this.m_points[0]:new y((this.m_points[0].x+this.m_points[1].x)/2,(this.m_points[0].y+this.m_points[1].y)/
2)},m_normal:null,m_points:null,__class__:kj};var Wb=function(){this.m_type=-1;this.m_radius=ca.b2_linearSlop};k["box2D.collision.shapes.B2Shape"]=Wb;Wb.__name__="box2D.collision.shapes.B2Shape";Wb.testOverlap=function(a,b,c,d){Wb.initialized||(Wb.distanceInput.proxyA=Wb.proxyA,Wb.distanceInput.proxyB=Wb.proxyB,Wb.distanceInput.useRadii=!0,Wb.initialized=!0);Wb.proxyA.set(a);Wb.proxyB.set(c);Wb.distanceInput.transformA=b;Wb.distanceInput.transformB=d;Wb.simplexCache.count=0;ka.distance(Wb.distanceOutput,
Wb.simplexCache,Wb.distanceInput);return Wb.distanceOutput.distance<10*Number.MIN_VALUE};Wb.prototype={copy:function(){return null},set:function(a){this.m_radius=a.m_radius},getType:function(){return this.m_type},testPoint:function(a,b){return!1},rayCast:function(a,b,c){return!1},computeAABB:function(a,b){},computeMass:function(a,b){},computeSubmergedArea:function(a,b,c,d){return 0},m_type:null,m_radius:null,__class__:Wb};var Lc=function(a){null==a&&(a=0);Wb.call(this);this.m_p=new y;this.m_type=
0;this.m_radius=a};k["box2D.collision.shapes.B2CircleShape"]=Lc;Lc.__name__="box2D.collision.shapes.B2CircleShape";Lc.__super__=Wb;Lc.prototype=u(Wb.prototype,{copy:function(){var a=new Lc;a.set(this);return a},set:function(a){Wb.prototype.set.call(this,a);if(a instanceof Lc){var b=U.__cast(a,Lc);a=this.m_p;b=b.m_p;a.x=b.x;a.y=b.y}},testPoint:function(a,b){var c=a.R,d=a.position.x+(c.col1.x*this.m_p.x+c.col2.x*this.m_p.y);a=a.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y);d=b.x-d;a=b.y-a;return d*
d+a*a<=this.m_radius*this.m_radius},rayCast:function(a,b,c){var d=c.R,e=b.p1.x-(c.position.x+(d.col1.x*this.m_p.x+d.col2.x*this.m_p.y));c=b.p1.y-(c.position.y+(d.col1.y*this.m_p.x+d.col2.y*this.m_p.y));d=b.p2.x-b.p1.x;var f=b.p2.y-b.p1.y,g=e*d+c*f,h=d*d+f*f,m=g*g-h*(e*e+c*c-this.m_radius*this.m_radius);if(0>m||h<Number.MIN_VALUE)return!1;g=-(g+Math.sqrt(m));return 0<=g&&g<=b.maxFraction*h?(g/=h,a.fraction=g,a.normal.x=e+g*d,a.normal.y=c+g*f,a.normal.normalize(),!0):!1},computeAABB:function(a,b){var c=
b.R,d=b.position.x+(c.col1.x*this.m_p.x+c.col2.x*this.m_p.y);b=b.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y);c=a.lowerBound;var e=d-this.m_radius,f=b-this.m_radius;null==f&&(f=0);null==e&&(e=0);c.x=e;c.y=f;c=a.upperBound;e=d+this.m_radius;f=b+this.m_radius;null==f&&(f=0);null==e&&(e=0);c.x=e;c.y=f},computeMass:function(a,b){a.mass=b*ca.b2_pi*this.m_radius*this.m_radius;b=a.center;var c=this.m_p;b.x=c.x;b.y=c.y;a.I=a.mass*(.5*this.m_radius*this.m_radius+(this.m_p.x*this.m_p.x+this.m_p.y*this.m_p.y))},
computeSubmergedArea:function(a,b,c,d){c=O.mulX(c,this.m_p,!0);var e=-(O.dot(a,c)-b);if(e<-this.m_radius+Number.MIN_VALUE)return 0;if(e>this.m_radius)return d.x=c.x,d.y=c.y,Math.PI*this.m_radius*this.m_radius;b=this.m_radius*this.m_radius;var f=e*e;e=b*(Math.asin(e/this.m_radius)+Math.PI/2)+e*Math.sqrt(b-f);b=-.6666666666666666*Math.pow(b-f,1.5)/e;d.x=c.x+a.x*b;d.y=c.y+a.y*b;return e},getLocalPosition:function(){return this.m_p},setLocalPosition:function(a){var b=this.m_p;b.x=a.x;b.y=a.y},getRadius:function(){return this.m_radius},
setRadius:function(a){this.m_radius=a},m_p:null,__class__:Lc});var rg=function(a,b){Wb.call(this);this.s_supportVec=new y;this.m_v1=new y;this.m_v2=new y;this.m_v0=new y;this.m_v3=new y;this.m_hasVertex3=this.m_hasVertex0=!1;this.m_coreV1=new y;this.m_coreV2=new y;this.m_normal=new y;this.m_direction=new y;this.m_cornerDir1=new y;this.m_cornerDir2=new y;this.m_type=2;this.m_nextEdge=this.m_prevEdge=null;this.m_v1=a;this.m_v2=b;a=this.m_direction;b=this.m_v2.x-this.m_v1.x;var c=this.m_v2.y-this.m_v1.y;
null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.m_length=this.m_direction.normalize();a=this.m_normal;b=this.m_direction.y;c=-this.m_direction.x;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.m_coreV1;b=-ca.b2_toiSlop*(this.m_normal.x-this.m_direction.x)+this.m_v1.x;c=-ca.b2_toiSlop*(this.m_normal.y-this.m_direction.y)+this.m_v1.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.m_coreV2;b=-ca.b2_toiSlop*(this.m_normal.x+this.m_direction.x)+this.m_v2.x;c=-ca.b2_toiSlop*(this.m_normal.y+this.m_direction.y)+
this.m_v2.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.m_cornerDir1=this.m_normal;a=this.m_cornerDir2;b=-this.m_normal.x;c=-this.m_normal.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c};k["box2D.collision.shapes.B2EdgeShape"]=rg;rg.__name__="box2D.collision.shapes.B2EdgeShape";rg.__super__=Wb;rg.prototype=u(Wb.prototype,{testPoint:function(a,b){return!1},rayCast:function(a,b,c){var d=b.p2.x-b.p1.x,e=b.p2.y-b.p1.y,f=c.R,g=c.position.x+(f.col1.x*this.m_v1.x+f.col2.x*this.m_v1.y),h=c.position.y+(f.col1.y*
this.m_v1.x+f.col2.y*this.m_v1.y),m=c.position.y+(f.col1.y*this.m_v2.x+f.col2.y*this.m_v2.y)-h;c=-(c.position.x+(f.col1.x*this.m_v2.x+f.col2.x*this.m_v2.y)-g);f=100*Number.MIN_VALUE;var l=-(d*m+e*c);if(l>f){g=b.p1.x-g;var L=b.p1.y-h;h=g*m+L*c;if(0<=h&&h<=b.maxFraction*l&&(b=-d*L+e*g,-f*l<=b&&b<=l*(1+f)))return a.fraction=h/l,b=Math.sqrt(m*m+c*c),a.normal.x=m/b,a.normal.y=c/b,!0}return!1},computeAABB:function(a,b){var c=b.R,d=b.position.x+(c.col1.x*this.m_v1.x+c.col2.x*this.m_v1.y),e=b.position.y+
(c.col1.y*this.m_v1.x+c.col2.y*this.m_v1.y),f=b.position.x+(c.col1.x*this.m_v2.x+c.col2.x*this.m_v2.y);b=b.position.y+(c.col1.y*this.m_v2.x+c.col2.y*this.m_v2.y);d<f?(a.lowerBound.x=d,a.upperBound.x=f):(a.lowerBound.x=f,a.upperBound.x=d);e<b?(a.lowerBound.y=e,a.upperBound.y=b):(a.lowerBound.y=b,a.upperBound.y=e)},computeMass:function(a,b){a.mass=0;b=a.center;var c=this.m_v1;b.x=c.x;b.y=c.y;a.I=0},computeSubmergedArea:function(a,b,c,d){var e=new y(a.x*b,a.y*b),f=O.mulX(c,this.m_v1,!0);c=O.mulX(c,this.m_v2,
!0);var g=O.dot(a,f)-b;a=O.dot(a,c)-b;if(0<g){if(0<a)return 0;f.x=-a/(g-a)*f.x+g/(g-a)*c.x;f.y=-a/(g-a)*f.y+g/(g-a)*c.y}else 0<a&&(c.x=-a/(g-a)*f.x+g/(g-a)*c.x,c.y=-a/(g-a)*f.y+g/(g-a)*c.y);d.x=(e.x+f.x+c.x)/3;d.y=(e.y+f.y+c.y)/3;return.5*((f.x-e.x)*(c.y-e.y)-(f.y-e.y)*(c.x-e.x))},getLength:function(){return this.m_length},getVertex1:function(){return this.m_v1},getVertex2:function(){return this.m_v2},getCoreVertex1:function(){return this.m_coreV1},getCoreVertex2:function(){return this.m_coreV2},
getNormalVector:function(){return this.m_normal},getDirectionVector:function(){return this.m_direction},getCorner1Vector:function(){return this.m_cornerDir1},getCorner2Vector:function(){return this.m_cornerDir2},corner1IsConvex:function(){return this.m_cornerConvex1},corner2IsConvex:function(){return this.m_cornerConvex2},getFirstVertex:function(a){var b=a.R;return new y(a.position.x+(b.col1.x*this.m_coreV1.x+b.col2.x*this.m_coreV1.y),a.position.y+(b.col1.y*this.m_coreV1.x+b.col2.y*this.m_coreV1.y))},
getNextEdge:function(){return this.m_nextEdge},getPrevEdge:function(){return this.m_prevEdge},s_supportVec:null,support:function(a,b,c){var d=a.R,e=a.position.x+(d.col1.x*this.m_coreV1.x+d.col2.x*this.m_coreV1.y),f=a.position.y+(d.col1.y*this.m_coreV1.x+d.col2.y*this.m_coreV1.y),g=a.position.x+(d.col1.x*this.m_coreV2.x+d.col2.x*this.m_coreV2.y);a=a.position.y+(d.col1.y*this.m_coreV2.x+d.col2.y*this.m_coreV2.y);e*b+f*c>g*b+a*c?(this.s_supportVec.x=e,this.s_supportVec.y=f):(this.s_supportVec.x=g,this.s_supportVec.y=
a);return this.s_supportVec},copy:function(){var a=new rg(this.m_v1,this.m_v2);a.set(this);var b=U.__cast(a,rg),c=b.m_v0,d=this.m_v0;c.x=d.x;c.y=d.y;c=b.m_v3;d=this.m_v3;c.x=d.x;c.y=d.y;b.m_hasVertex0=this.m_hasVertex0;b.m_hasVertex3=this.m_hasVertex3;return a},setPrevEdge:function(a,b,c,d){this.m_prevEdge=a;this.m_coreV1=b;this.m_cornerDir1=c;this.m_cornerConvex1=d},setNextEdge:function(a,b,c,d){this.m_nextEdge=a;this.m_coreV2=b;this.m_cornerDir2=c;this.m_cornerConvex2=d},m_v1:null,m_v2:null,m_v0:null,
m_v3:null,m_hasVertex0:null,m_hasVertex3:null,m_coreV1:null,m_coreV2:null,m_length:null,m_normal:null,m_direction:null,m_cornerDir1:null,m_cornerDir2:null,m_cornerConvex1:null,m_cornerConvex2:null,m_nextEdge:null,m_prevEdge:null,__class__:rg});var lj=function(){this.mass=0;this.center=new y(0,0);this.I=0};k["box2D.collision.shapes.B2MassData"]=lj;lj.__name__="box2D.collision.shapes.B2MassData";lj.prototype={mass:null,center:null,I:null,__class__:lj};var Db=function(){Wb.call(this);this.m_type=1;this.m_centroid=
new y;this.m_vertices=[];this.m_normals=[]};k["box2D.collision.shapes.B2PolygonShape"]=Db;Db.__name__="box2D.collision.shapes.B2PolygonShape";Db.asArray=function(a,b){var c=new Db;c.setAsArray(a,b);return c};Db.asVector=function(a,b){var c=new Db;c.setAsVector(a,b);return c};Db.asBox=function(a,b){var c=new Db;c.setAsBox(a,b);return c};Db.asOrientedBox=function(a,b,c,d){null==d&&(d=0);var e=new Db;e.setAsOrientedBox(a,b,c,d);return e};Db.asEdge=function(a,b){var c=new Db;c.setAsEdge(a,b);return c};
Db.computeCentroid=function(a,b){for(var c=new y,d=0,e=0;e<b;){var f=e++,g=a[f];f=f+1<b?a[f+1|0]:a[0];var h=.5*((g.x-0)*(f.y-0)-(g.y-0)*(f.x-0));d+=h;c.x+=.3333333333333333*h*(0+g.x+f.x);c.y+=.3333333333333333*h*(0+g.y+f.y)}c.x*=1/d;c.y*=1/d;return c};Db.computeOBB=function(a,b,c){for(var d,e=[],f=0,g=c;f<g;)d=f++,e[d]=b[d];e[c]=e[0];b=Number.MAX_VALUE;f=1;for(g=c+1;f<g;){d=f++;var h=e[d-1|0],m=e[d].x-h.x,l=e[d].y-h.y;d=Math.sqrt(m*m+l*l);m/=d;l/=d;for(var L=-l,p=m,n=d=Number.MAX_VALUE,q=-Number.MAX_VALUE,
k=-Number.MAX_VALUE,t=0,v=c;t<v;){var Ka=t++,r=e[Ka].x-h.x,u=e[Ka].y-h.y;Ka=m*r+l*u;r=L*r+p*u;Ka<d&&(d=Ka);r<n&&(n=r);Ka>q&&(q=Ka);r>k&&(k=r)}t=(q-d)*(k-n);t<.95*b&&(b=t,a.R.col1.x=m,a.R.col1.y=l,a.R.col2.x=L,a.R.col2.y=p,m=.5*(d+q),l=.5*(n+k),L=a.R,a.center.x=h.x+(L.col1.x*m+L.col2.x*l),a.center.y=h.y+(L.col1.y*m+L.col2.y*l),a.extents.x=.5*(q-d),a.extents.y=.5*(k-n))}};Db.__super__=Wb;Db.prototype=u(Wb.prototype,{copy:function(){var a=new Db;a.set(this);return a},set:function(a){Wb.prototype.set.call(this,
a);if(a instanceof Db){a=U.__cast(a,Db);var b=this.m_centroid,c=a.m_centroid;b.x=c.x;b.y=c.y;this.m_vertexCount=a.m_vertexCount;this.reserve(this.m_vertexCount);for(var d=0,e=this.m_vertexCount;d<e;){var f=d++;b=this.m_vertices[f];c=a.m_vertices[f];b.x=c.x;b.y=c.y;b=this.m_normals[f];f=a.m_normals[f];b.x=f.x;b.y=f.y}}},setAsArray:function(a,b){null==b&&(b=0);for(var c=[],d=0;d<a.length;){var e=a[d];++d;c.push(e)}this.setAsVector(c,b)},setAsVector:function(a,b){null==b&&(b=0);0==b&&(b=a.length);ca.b2Assert(2<=
b);this.m_vertexCount=b;this.reserve(b);for(var c=0,d=this.m_vertexCount;c<d;){b=c++;var e=this.m_vertices[b],f=a[b];e.x=f.x;e.y=f.y}c=0;for(d=this.m_vertexCount;c<d;)b=c++,a=O.subtractVVPooled(this.m_vertices[b+1<this.m_vertexCount?b+1:0],this.m_vertices[b]),ca.b2Assert(a.lengthSquared()>Number.MIN_VALUE),e=this.m_normals[b],f=O.crossVF(a,1,!0),e.x=f.x,e.y=f.y,this.m_normals[b].normalize();this.m_centroid=Db.computeCentroid(this.m_vertices,this.m_vertexCount)},setAsBox:function(a,b){this.m_vertexCount=
4;this.reserve(4);var c=this.m_vertices[0],d=-a,e=-b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[1];d=a;e=-b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[2];d=a;e=b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[3];d=-a;e=b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_normals[0];d=0;e=-1;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_normals[1];d=1;e=0;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_normals[2];d=0;e=1;null==e&&(e=0);null==d&&
(d=0);c.x=d;c.y=e;c=this.m_normals[3];d=-1;e=0;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_centroid;c.x=0;c.y=0},setAsOrientedBox:function(a,b,c,d){null==d&&(d=0);this.m_vertexCount=4;this.reserve(4);var e=this.m_vertices[0],f=-a,g=-b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[1];f=a;g=-b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[2];f=a;g=b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[3];f=-a;g=b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=
this.m_normals[0];f=0;g=-1;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_normals[1];f=1;g=0;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_normals[2];f=0;g=1;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_normals[3];f=-1;g=0;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;this.m_centroid=c;a=new Ve;a.position=c;a.R.set(d);c=0;for(d=this.m_vertexCount;c<d;)b=c++,this.m_vertices[b]=O.mulX(a,this.m_vertices[b]),this.m_normals[b]=O.mulMV(a.R,this.m_normals[b])},setAsEdge:function(a,b){this.m_vertexCount=
2;this.reserve(2);var c=this.m_vertices[0];c.x=a.x;c.y=a.y;c=this.m_vertices[1];c.x=b.x;c.y=b.y;this.m_centroid.x=.5*(a.x+b.x);this.m_centroid.y=.5*(a.y+b.y);this.m_normals[0]=O.crossVF(O.subtractVV(b,a),1);this.m_normals[0].normalize();this.m_normals[1].x=-this.m_normals[0].x;this.m_normals[1].y=-this.m_normals[0].y},testPoint:function(a,b){var c=a.R;var d=b.x-a.position.x;a=b.y-a.position.y;b=d*c.col1.x+a*c.col1.y;for(var e=d*c.col2.x+a*c.col2.y,f=0,g=this.m_vertexCount;f<g;){var h=f++;c=this.m_vertices[h];
d=b-c.x;a=e-c.y;c=this.m_normals[h];if(0<c.x*d+c.y*a)return!1}return!0},rayCast:function(a,b,c){var d=0,e=b.maxFraction,f=b.p1.x-c.position.x,g=b.p1.y-c.position.y,h=c.R,m=f*h.col1.x+g*h.col1.y,l=f*h.col2.x+g*h.col2.y;f=b.p2.x-c.position.x;g=b.p2.y-c.position.y;h=c.R;b=f*h.col1.x+g*h.col1.y-m;h=f*h.col2.x+g*h.col2.y-l;for(var L=-1,p=0,n=this.m_vertexCount;p<n;){var q=p++;var k=this.m_vertices[q];f=k.x-m;g=k.y-l;k=this.m_normals[q];f=k.x*f+k.y*g;k=k.x*b+k.y*h;if(0==k){if(0>f)return!1}else 0>k&&f<d*
k?(d=f/k,L=q):0<k&&f<e*k&&(e=f/k);if(e<d-Number.MIN_VALUE)return!1}return 0<=L?(a.fraction=d,h=c.R,k=this.m_normals[L],a.normal.x=h.col1.x*k.x+h.col2.x*k.y,a.normal.y=h.col1.y*k.x+h.col2.y*k.y,!0):!1},computeAABB:function(a,b){for(var c=b.R,d=this.m_vertices[0],e=b.position.x+(c.col1.x*d.x+c.col2.x*d.y),f=b.position.y+(c.col1.y*d.x+c.col2.y*d.y),g=e,h=f,m=1,l=this.m_vertexCount;m<l;){var L=m++;d=this.m_vertices[L];L=b.position.x+(c.col1.x*d.x+c.col2.x*d.y);d=b.position.y+(c.col1.y*d.x+c.col2.y*d.y);
e<L||(e=L);f<d||(f=d);g>L||(g=L);h>d||(h=d)}a.lowerBound.x=e-this.m_radius;a.lowerBound.y=f-this.m_radius;a.upperBound.x=g+this.m_radius;a.upperBound.y=h+this.m_radius},computeMass:function(a,b){if(2==this.m_vertexCount)a.center.x=.5*(this.m_vertices[0].x+this.m_vertices[1].x),a.center.y=.5*(this.m_vertices[0].y+this.m_vertices[1].y),a.mass=0,a.I=0;else{for(var c=0,d=0,e=0,f=0,g=0,h=this.m_vertexCount;g<h;){var m=g++,l=this.m_vertices[m],L=m+1<this.m_vertexCount?this.m_vertices[m+1|0]:this.m_vertices[0],
p=l.x-0,n=l.y-0,q=L.x-0,k=L.y-0;m=p*k-n*q;var t=.5*m;e+=t;c+=.3333333333333333*t*(0+l.x+L.x);d+=.3333333333333333*t*(0+l.y+L.y);l=p;f+=m*(.3333333333333333*(.25*(l*l+q*l+q*q)+(0*l+0*q))+.3333333333333333*(.25*(n*n+k*n+k*k)+(0*n+0*k)))}a.mass=b*e;g=a.center;c*=1/e;d*=1/e;null==d&&(d=0);null==c&&(c=0);g.x=c;g.y=d;a.I=b*f}},computeSubmergedArea:function(a,b,c,d){var e=O.mulTMV(c.R,a,!0),f=b-O.dot(a,c.position),g=[],h=0,m=-1;b=-1;for(var l=!1,L=0,p=this.m_vertexCount;L<p;){a=L++;g[a]=O.dot(e,this.m_vertices[a])-
f;var n=g[a]<-Number.MIN_VALUE;0<a&&(n?l||(m=a-1,++h):l&&(b=a-1,++h));l=n}switch(h){case 0:return l?(a=new lj,this.computeMass(a,1),c=O.mulX(c,a.center),d.x=c.x,d.y=c.y,a.mass):0;case 1:-1==m?m=this.m_vertexCount-1:b=this.m_vertexCount-1}a=(m+1)%this.m_vertexCount;e=(b+1)%this.m_vertexCount;f=(0-g[m])/(g[a]-g[m]);g=(0-g[b])/(g[e]-g[b]);m=new y(this.m_vertices[m].x*(1-f)+this.m_vertices[a].x*f,this.m_vertices[m].y*(1-f)+this.m_vertices[a].y*f);g=new y(this.m_vertices[b].x*(1-g)+this.m_vertices[e].x*
g,this.m_vertices[b].y*(1-g)+this.m_vertices[e].y*g);b=0;f=new y;for(h=this.m_vertices[a];a!=e;)a=(a+1)%this.m_vertexCount,l=a==e?g:this.m_vertices[a],L=.5*((h.x-m.x)*(l.y-m.y)-(h.y-m.y)*(l.x-m.x)),b+=L,f.x+=L*(m.x+h.x+l.x)/3,f.y+=L*(m.y+h.y+l.y)/3,h=l;f.multiply(1/b);c=O.mulX(c,f);d.x=c.x;d.y=c.y;return b},getVertexCount:function(){return this.m_vertexCount},getVertices:function(){return this.m_vertices},getNormals:function(){return this.m_normals},getSupport:function(a){for(var b=0,c=this.m_vertices[0].x*
a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_vertexCount;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return b},getSupportVertex:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_vertexCount;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return this.m_vertices[b]},validate:function(){return!1},reserve:function(a){for(var b=this.m_vertices.length;b<a;){var c=b++;this.m_vertices[c]=new y;this.m_normals[c]=
new y}},m_centroid:null,m_vertices:null,m_normals:null,m_vertexCount:null,__class__:Db});var vk=function(a,b,c){this._r=255*O.clamp(a,0,1)|0;this._g=255*O.clamp(b,0,1)|0;this._b=255*O.clamp(c,0,1)|0};k["box2D.common.B2Color"]=vk;vk.__name__="box2D.common.B2Color";vk.prototype={set:function(a,b,c){this._r=255*O.clamp(a,0,1)|0;this._g=255*O.clamp(b,0,1)|0;this._b=255*O.clamp(c,0,1)|0},r:null,g:null,b:null,color:null,set_r:function(a){return this._r=255*O.clamp(a,0,1)|0},set_g:function(a){return this._g=
255*O.clamp(a,0,1)|0},set_b:function(a){return this._b=255*O.clamp(a,0,1)|0},get_color:function(){return this._r<<16|this._g<<8|this._b},_r:null,_g:null,_b:null,__class__:vk,__properties__:{get_color:"get_color",set_b:"set_b",set_g:"set_g",set_r:"set_r"}};var ca=function(){};k["box2D.common.B2Settings"]=ca;ca.__name__="box2D.common.B2Settings";ca.b2MixFriction=function(a,b){return Math.sqrt(a*b)};ca.b2MixRestitution=function(a,b){return a>b?a:b};ca.b2Assert=function(a){if(!a)throw J.thrown("Assertion Failed");
};var Ch=function(a,b,c){this.col1=new We;this.col2=new We;this.col3=new We;null==a&&null==b&&null==c?(this.col1.setZero(),this.col2.setZero(),this.col3.setZero()):(this.col1.setV(a),this.col2.setV(b),this.col3.setV(c))};k["box2D.common.math.B2Mat33"]=Ch;Ch.__name__="box2D.common.math.B2Mat33";Ch.prototype={setVVV:function(a,b,c){this.col1.setV(a);this.col2.setV(b);this.col3.setV(c)},copy:function(){return new Ch(this.col1,this.col2,this.col3)},setM:function(a){this.col1.setV(a.col1);this.col2.setV(a.col2);
this.col3.setV(a.col3)},addM:function(a){this.col1.x+=a.col1.x;this.col1.y+=a.col1.y;this.col1.z+=a.col1.z;this.col2.x+=a.col2.x;this.col2.y+=a.col2.y;this.col2.z+=a.col2.z;this.col3.x+=a.col3.x;this.col3.y+=a.col3.y;this.col3.z+=a.col3.z},setIdentity:function(){this.col1.x=1;this.col2.x=0;this.col3.x=0;this.col1.y=0;this.col2.y=1;this.col3.y=0;this.col1.z=0;this.col2.z=0;this.col3.z=1},setZero:function(){this.col1.x=0;this.col2.x=0;this.col3.x=0;this.col1.y=0;this.col2.y=0;this.col3.y=0;this.col1.z=
0;this.col2.z=0;this.col3.z=0},solve22:function(a,b,c){var d=this.col1.x,e=this.col2.x,f=this.col1.y,g=this.col2.y,h=d*g-e*f;0!=h&&(h=1/h);a.x=h*(g*b-e*c);a.y=h*(d*c-f*b);return a},solve33:function(a,b,c,d){var e=this.col1.x,f=this.col1.y,g=this.col1.z,h=this.col2.x,m=this.col2.y,l=this.col2.z,L=this.col3.x,p=this.col3.y,n=this.col3.z,q=e*(m*n-l*p)+f*(l*L-h*n)+g*(h*p-m*L);0!=q&&(q=1/q);a.x=q*(b*(m*n-l*p)+c*(l*L-h*n)+d*(h*p-m*L));a.y=q*(e*(c*n-d*p)+f*(d*L-b*n)+g*(b*p-c*L));a.z=q*(e*(m*d-l*c)+f*(l*
b-h*d)+g*(h*c-m*b));return a},col1:null,col2:null,col3:null,__class__:Ch};var O=function(){};k["box2D.common.math.B2Math"]=O;O.__name__="box2D.common.math.B2Math";O.__properties__={get_MIN_VALUE:"get_MIN_VALUE",get_MAX_VALUE:"get_MAX_VALUE"};O.isValid=function(a){return isNaN(a)||-Infinity==a||Infinity==a?!1:!0};O.dot=function(a,b){return a.x*b.x+a.y*b.y};O.crossVV=function(a,b){return a.x*b.y-a.y*b.x};O.crossVF=function(a,b,c){null==c&&(c=!1);if(c){c=y.getFromPool();var d=b*a.y;a=-b*a.x;null==a&&
(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new y(b*a.y,-b*a.x);return c};O.crossFV=function(a,b,c){null==c&&(c=!1);if(c){c=y.getFromPool();var d=-a*b.y;a*=b.x;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new y(-a*b.y,a*b.x);return c};O.mulMV=function(a,b,c){null==c&&(c=!1);if(c){c=y.getFromPool();var d=a.col1.x*b.x+a.col2.x*b.y;a=a.col1.y*b.x+a.col2.y*b.y;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new y(a.col1.x*b.x+a.col2.x*b.y,a.col1.y*b.x+a.col2.y*b.y);return c};O.mulTMV=function(a,b,c){null==
c&&(c=!1);if(c){c=y.getFromPool();var d=O.dot(b,a.col1);a=O.dot(b,a.col2);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new y(O.dot(b,a.col1),O.dot(b,a.col2));return c};O.mulX=function(a,b,c){null==c&&(c=!1);b=O.mulMV(a.R,b,c);b.x+=a.position.x;b.y+=a.position.y;return b};O.mulXT=function(a,b,c){b=O.subtractVVPooled(b,a.position);c=b.x*a.R.col1.x+b.y*a.R.col1.y;b.y=b.x*a.R.col2.x+b.y*a.R.col2.y;b.x=c;return b};O.addVV=function(a,b){return new y(a.x+b.x,a.y+b.y)};O.subtractVV=function(a,b){return new y(a.x-
b.x,a.y-b.y)};O.subtractVVPooled=function(a,b){var c=y.getFromPool(),d=a.x-b.x;a=a.y-b.y;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;return c};O.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};O.distanceSquared=function(a,b){var c=a.x-b.x;a=a.y-b.y;return c*c+a*a};O.mulFV=function(a,b){return new y(a*b.x,a*b.y)};O.addMM=function(a,b){return zc.fromVV(O.addVV(a.col1,b.col1),O.addVV(a.col2,b.col2))};O.mulMM=function(a,b){return zc.fromVV(O.mulMV(a,b.col1),O.mulMV(a,b.col2))};
O.mulTMM=function(a,b){var c=new y(O.dot(a.col1,b.col1),O.dot(a.col2,b.col1));a=new y(O.dot(a.col1,b.col2),O.dot(a.col2,b.col2));return zc.fromVV(c,a)};O.abs=function(a){return 0<a?a:-a};O.absV=function(a){return new y(O.abs(a.x),O.abs(a.y))};O.absM=function(a){return zc.fromVV(O.absV(a.col1),O.absV(a.col2))};O.min=function(a,b){return a<b?a:b};O.minV=function(a,b){return new y(O.min(a.x,b.x),O.min(a.y,b.y))};O.max=function(a,b){return a>b?a:b};O.maxV=function(a,b){return new y(O.max(a.x,b.x),O.max(a.y,
b.y))};O.clamp=function(a,b,c){return a<b?b:a>c?c:a};O.clampV=function(a,b,c){return O.maxV(b,O.minV(a,c))};O.swap=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};O.random=function(){return 2*Math.random()-1};O.randomRange=function(a,b){return(b-a)*Math.random()+a};O.nextPowerOfTwo=function(a){a|=a>>1&2147483647;a|=a>>2&1073741823;a|=a>>4&268435455;a|=a>>8&16777215;return(a|a>>16&65535)+1};O.isPowerOfTwo=function(a){return 0<a&&0==(a&a-1)};O.get_MAX_VALUE=function(){return Number.MAX_VALUE};O.get_MIN_VALUE=
function(){return Number.MIN_VALUE};var fh=function(){this.localCenter=new y;this.c0=new y;this.c=new y};k["box2D.common.math.B2Sweep"]=fh;fh.__name__="box2D.common.math.B2Sweep";fh.prototype={set:function(a){var b=this.localCenter,c=a.localCenter;b.x=c.x;b.y=c.y;b=this.c0;c=a.c0;b.x=c.x;b.y=c.y;b=this.c;c=a.c;b.x=c.x;b.y=c.y;this.a0=a.a0;this.a=a.a;this.t0=a.t0},copy:function(){var a=new fh,b=a.localCenter,c=this.localCenter;b.x=c.x;b.y=c.y;b=a.c0;c=this.c0;b.x=c.x;b.y=c.y;b=a.c;c=this.c;b.x=c.x;
b.y=c.y;a.a0=this.a0;a.a=this.a;a.t0=this.t0;return a},getTransform:function(a,b){a.position.x=(1-b)*this.c0.x+b*this.c.x;a.position.y=(1-b)*this.c0.y+b*this.c.y;a.R.set((1-b)*this.a0+b*this.a);b=a.R;a.position.x-=b.col1.x*this.localCenter.x+b.col2.x*this.localCenter.y;a.position.y-=b.col1.y*this.localCenter.x+b.col2.y*this.localCenter.y},advance:function(a){if(this.t0<a&&1-this.t0>Number.MIN_VALUE){var b=(a-this.t0)/(1-this.t0);this.c0.x=(1-b)*this.c0.x+b*this.c.x;this.c0.y=(1-b)*this.c0.y+b*this.c.y;
this.a0=(1-b)*this.a0+b*this.a;this.t0=a}},localCenter:null,c0:null,c:null,a0:null,a:null,t0:null,__class__:fh};var We=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.z=c};k["box2D.common.math.B2Vec3"]=We;We.__name__="box2D.common.math.B2Vec3";We.prototype={setZero:function(){this.x=this.y=this.z=0},set:function(a,b,c){this.x=a;this.y=b;this.z=c},setV:function(a){this.x=a.x;this.y=a.y;this.z=a.z},getNegative:function(){return new We(-this.x,-this.y,-this.z)},negativeSelf:function(){this.x=
-this.x;this.y=-this.y;this.z=-this.z},copy:function(){return new We(this.x,this.y,this.z)},add:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},subtract:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},multiply:function(a){this.x*=a;this.y*=a;this.z*=a},x:null,y:null,z:null,__class__:We};var oa=function(a,b){this.m_xf=new Ve;this.m_sweep=new fh;this.m_linearVelocity=new y;this.m_force=new y;this.m_flags=0;a.bullet&&(this.m_flags|=oa.e_bulletFlag);a.fixedRotation&&(this.m_flags|=oa.e_fixedRotationFlag);
a.allowSleep&&(this.m_flags|=oa.e_allowSleepFlag);a.awake&&(this.m_flags|=oa.e_awakeFlag);a.active&&(this.m_flags|=oa.e_activeFlag);a.ignoreGravity&&(this.m_flags|=oa.e_ignoreGravityFlag);this.m_world=b;b=this.m_xf.position;var c=a.position;b.x=c.x;b.y=c.y;this.m_xf.R.set(a.angle);b=this.m_sweep.localCenter;b.x=0;b.y=0;this.m_sweep.t0=1;this.m_sweep.a0=this.m_sweep.a=a.angle;b=this.m_xf.R;c=this.m_sweep.localCenter;this.m_sweep.c.x=b.col1.x*c.x+b.col2.x*c.y;this.m_sweep.c.y=b.col1.y*c.x+b.col2.y*
c.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;b=this.m_sweep.c0;c=this.m_sweep.c;b.x=c.x;b.y=c.y;this.m_contactList=this.m_controllerList=this.m_jointList=null;this.m_controllerCount=0;this.m_next=this.m_prev=null;b=this.m_linearVelocity;c=a.linearVelocity;b.x=c.x;b.y=c.y;this.m_angularVelocity=a.angularVelocity;this.m_linearDamping=a.linearDamping;this.m_angularDamping=a.angularDamping;b=this.m_force;var d=c=0;null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;this.m_sleepTime=
this.m_torque=0;this.m_type=a.type;this.m_invMass=this.m_type==oa.b2_dynamicBody?this.m_mass=1:this.m_mass=0;this.m_invI=this.m_I=0;this.m_inertiaScale=a.inertiaScale;this.m_userData=a.userData;this.m_fixtureList=null;this.m_fixtureCount=0;this.groupID=a.groupID;this.origin=new y;this.size=new y};k["box2D.dynamics.B2Body"]=oa;oa.__name__="box2D.dynamics.B2Body";oa.prototype={connectEdges:function(a,b,c){var d=Math.atan2(b.getDirectionVector().y,b.getDirectionVector().x);c=O.mulFV(Math.tan(.5*(d-c)),
b.getDirectionVector());c=O.subtractVV(c,b.getNormalVector());c=O.mulFV(ca.b2_toiSlop,c);c=O.addVV(c,b.getVertex1());var e=O.addVV(a.getDirectionVector(),b.getDirectionVector());e.normalize();var f=0<O.dot(a.getDirectionVector(),b.getNormalVector());a.setNextEdge(b,c,e,f);b.setPrevEdge(a,c,e,f);return d},createFixture:function(a){if(1==this.m_world.isLocked())return null;var b=new Gf;b.create(this,this.m_xf,a);0!=(this.m_flags&oa.e_activeFlag)&&b.createProxy(this.m_world.m_contactManager.m_broadPhase,
this.m_xf);b.m_next=this.m_fixtureList;this.m_fixtureList=b;++this.m_fixtureCount;b.m_body=this;0<b.m_density&&this.resetMassData();this.m_world.m_flags|=cc.e_newFixture;return b},createFixture2:function(a,b){null==b&&(b=0);var c=new Hf;c.shape=a;c.density=b;return this.createFixture(c)},DestroyFixture:function(a){if(1!=this.m_world.isLocked()){for(var b=this.m_fixtureList,c=null;null!=b;){if(b==a){null!=c?c.m_next=a.m_next:this.m_fixtureList=a.m_next;break}c=b;b=b.m_next}for(b=this.m_contactList;null!=
b;){c=b.contact;b=b.next;var d=c.getFixtureA(),e=c.getFixtureB();a!=d&&a!=e||this.m_world.m_contactManager.destroy(c)}0!=(this.m_flags&oa.e_activeFlag)&&a.destroyProxy(this.m_world.m_contactManager.m_broadPhase);a.destroy();a.m_body=null;a.m_next=null;--this.m_fixtureCount;this.resetMassData()}},setPositionAndAngle:function(a,b){if(1!=this.m_world.isLocked()){this.m_xf.R.set(b);var c=this.m_xf.position;c.x=a.x;c.y=a.y;c=this.m_xf.R;a=this.m_sweep.localCenter;this.m_sweep.c.x=c.col1.x*a.x+c.col2.x*
a.y;this.m_sweep.c.y=c.col1.y*a.x+c.col2.y*a.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;c=this.m_sweep.c0;a=this.m_sweep.c;c.x=a.x;c.y=a.y;this.m_sweep.a0=this.m_sweep.a=b;b=this.m_world.m_contactManager.m_broadPhase;for(c=this.m_fixtureList;null!=c;)c.synchronize(b,this.m_xf,this.m_xf),c=c.m_next;this.m_world.m_contactManager.findNewContacts()}},setPositionFast:function(a){if(1!=this.m_world.isLocked()){var b=this.m_xf.position;b.x=a.x;b.y=a.y;b=this.m_xf.R;a=
this.m_sweep.localCenter;this.m_sweep.c.x=b.col1.x*a.x+b.col2.x*a.y;this.m_sweep.c.y=b.col1.y*a.x+b.col2.y*a.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;b=this.m_sweep.c0;a=this.m_sweep.c;b.x=a.x;b.y=a.y}},setTransform:function(a){this.setPositionAndAngle(a.position,a.getAngle())},getTransform:function(){return this.m_xf},getPosition:function(){return this.m_xf.position},setPosition:function(a){this.setPositionAndAngle(a,this.getAngle())},getAngle:function(){return this.m_sweep.a},
setAngle:function(a){this.setPositionAndAngle(this.getPosition(),a)},getWorldCenter:function(){return this.m_sweep.c},getLocalCenter:function(){return this.m_sweep.localCenter},setLinearVelocity:function(a){if(this.m_type!=oa.b2_staticBody){var b=this.m_linearVelocity;b.x=a.x;b.y=a.y}},getLinearVelocity:function(){return this.m_linearVelocity},setAngularVelocity:function(a){this.m_type!=oa.b2_staticBody&&(this.m_angularVelocity=a)},getAngularVelocity:function(){return this.m_angularVelocity},getDefinition:function(){var a=
new ji;a.type=this.getType();a.allowSleep=(this.m_flags&oa.e_allowSleepFlag)==oa.e_allowSleepFlag;a.angle=this.getAngle();a.angularDamping=this.m_angularDamping;a.angularVelocity=this.m_angularVelocity;a.fixedRotation=(this.m_flags&oa.e_fixedRotationFlag)==oa.e_fixedRotationFlag;a.bullet=(this.m_flags&oa.e_bulletFlag)==oa.e_bulletFlag;a.awake=(this.m_flags&oa.e_awakeFlag)==oa.e_awakeFlag;a.linearDamping=this.m_linearDamping;var b=a.linearVelocity,c=this.getLinearVelocity();b.x=c.x;b.y=c.y;a.position=
this.getPosition();a.userData=this.getUserData();return a},applyForce:function(a,b){this.m_type==oa.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_force.x+=a.x,this.m_force.y+=a.y,this.m_torque+=(b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x)},applyTorque:function(a){this.m_type==oa.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_torque+=a)},applyImpulse:function(a,b){this.m_type==oa.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_linearVelocity.x+=this.m_invMass*
a.x,this.m_linearVelocity.y+=this.m_invMass*a.y,this.m_angularVelocity+=this.m_invI*((b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x))},split:function(a){for(var b=this.getLinearVelocity().copy(),c=this.getAngularVelocity(),d=this.getWorldCenter(),e=this.m_world.createBody(this.getDefinition()),f=null,g=this.m_fixtureList;null!=g;)if(a(g)){var h=g.m_next;null!=f?f.m_next=h:this.m_fixtureList=h;this.m_fixtureCount--;g.m_next=e.m_fixtureList;e.m_fixtureList=g;e.m_fixtureCount++;g.m_body=e;g=h}else f=
g,g=g.m_next;this.resetMassData();e.resetMassData();f=this.getWorldCenter();a=e.getWorldCenter();f=O.addVV(b,O.crossFV(c,O.subtractVV(f,d)));b=O.addVV(b,O.crossFV(c,O.subtractVV(a,d)));this.setLinearVelocity(f);e.setLinearVelocity(b);this.setAngularVelocity(c);e.setAngularVelocity(c);this.synchronizeFixtures();e.synchronizeFixtures();return e},merge:function(a){for(var b=a.m_fixtureList;null!=b;){var c=b.m_next;a.m_fixtureCount--;b.m_next=this.m_fixtureList;this.m_fixtureList=b;this.m_fixtureCount++;
b.m_body=a;b=c}this.m_fixtureCount=0;this.getWorldCenter();a.getWorldCenter();this.getLinearVelocity().copy();a.getLinearVelocity().copy();this.getAngularVelocity();a.getAngularVelocity();this.resetMassData();this.synchronizeFixtures()},getMass:function(){return this.m_mass},getInertia:function(){return this.m_I},getMassData:function(a){a.mass=this.m_mass;a.I=this.m_I;a=a.center;var b=this.m_sweep.localCenter;a.x=b.x;a.y=b.y},setMassData:function(a){ca.b2Assert(0==this.m_world.isLocked());if(1!=this.m_world.isLocked()&&
this.m_type==oa.b2_dynamicBody){this.m_invI=this.m_I=this.m_invMass=0;this.m_mass=a.mass;0>=this.m_mass&&(this.m_mass=1);this.m_invMass=1/this.m_mass;0<a.I&&0==(this.m_flags&oa.e_fixedRotationFlag)&&(this.m_I=a.I-this.m_mass*(a.center.x*a.center.x+a.center.y*a.center.y),this.m_invI=1/this.m_I);var b=this.m_sweep.c.copy(),c=this.m_sweep.localCenter;a=a.center;c.x=a.x;c.y=a.y;c=this.m_sweep.c0;a=O.mulX(this.m_xf,this.m_sweep.localCenter);c.x=a.x;c.y=a.y;c=this.m_sweep.c;a=this.m_sweep.c0;c.x=a.x;c.y=
a.y;this.m_linearVelocity.x+=this.m_angularVelocity*-(this.m_sweep.c.y-b.y);this.m_linearVelocity.y+=this.m_angularVelocity*(this.m_sweep.c.x-b.x)}},resetMassData:function(){this.m_invI=this.m_I=this.m_invMass=this.m_mass=0;var a=this.m_sweep.localCenter;a.x=0;a.y=0;if(this.m_type!=oa.b2_staticBody&&this.m_type!=oa.b2_kinematicBody){var b=y.make(0,0);for(a=this.m_fixtureList;null!=a;)if(0!=a.m_density){var c=a.getMassData();this.m_mass+=c.mass;b.x+=c.center.x*c.mass;b.y+=c.center.y*c.mass;this.m_I+=
c.I;a=a.m_next}0<this.m_mass?(this.m_invMass=1/this.m_mass,b.x*=this.m_invMass,b.y*=this.m_invMass):this.m_invMass=this.m_mass=1;0<this.m_I&&0==(this.m_flags&oa.e_fixedRotationFlag)?(this.m_I-=this.m_mass*(b.x*b.x+b.y*b.y),this.m_I*=this.m_inertiaScale,ca.b2Assert(0<this.m_I),this.m_invI=1/this.m_I):this.m_invI=this.m_I=0;c=this.m_sweep.c.copy();a=this.m_sweep.localCenter;a.x=b.x;a.y=b.y;a=this.m_sweep.c0;b=O.mulX(this.m_xf,this.m_sweep.localCenter);a.x=b.x;a.y=b.y;a=this.m_sweep.c;b=this.m_sweep.c0;
a.x=b.x;a.y=b.y;this.m_linearVelocity.x+=this.m_angularVelocity*-(this.m_sweep.c.y-c.y);this.m_linearVelocity.y+=this.m_angularVelocity*(this.m_sweep.c.x-c.x)}},getWorldPoint:function(a){var b=this.m_xf.R;a=new y(b.col1.x*a.x+b.col2.x*a.y,b.col1.y*a.x+b.col2.y*a.y);a.x+=this.m_xf.position.x;a.y+=this.m_xf.position.y;return a},getWorldVector:function(a){return O.mulMV(this.m_xf.R,a)},getLocalPoint:function(a){return O.mulXT(this.m_xf,a)},getLocalVector:function(a){return O.mulTMV(this.m_xf.R,a)},getLinearVelocityFromWorldPoint:function(a){return new y(this.m_linearVelocity.x-
this.m_angularVelocity*(a.y-this.m_sweep.c.y),this.m_linearVelocity.y+this.m_angularVelocity*(a.x-this.m_sweep.c.x))},getLinearVelocityFromLocalPoint:function(a){var b=this.m_xf.R;a=new y(b.col1.x*a.x+b.col2.x*a.y,b.col1.y*a.x+b.col2.y*a.y);a.x+=this.m_xf.position.x;a.y+=this.m_xf.position.y;return new y(this.m_linearVelocity.x-this.m_angularVelocity*(a.y-this.m_sweep.c.y),this.m_linearVelocity.y+this.m_angularVelocity*(a.x-this.m_sweep.c.x))},getLinearDamping:function(){return this.m_linearDamping},
setLinearDamping:function(a){this.m_linearDamping=a},getAngularDamping:function(){return this.m_angularDamping},setAngularDamping:function(a){this.m_angularDamping=a},setType:function(a){if(this.m_type!=a)for(this.m_type=a,this.resetMassData(),this.m_type==oa.b2_staticBody&&(a=this.m_linearVelocity,a.x=0,this.m_angularVelocity=a.y=0),this.setAwake(!0),a=this.m_force,a.x=0,this.m_torque=a.y=0,a=this.m_contactList;null!=a;)a.contact.flagForFiltering(),a=a.next},getType:function(){return this.m_type},
setBullet:function(a){this.m_flags=a?this.m_flags|oa.e_bulletFlag:this.m_flags&~oa.e_bulletFlag},isBullet:function(){return(this.m_flags&oa.e_bulletFlag)==oa.e_bulletFlag},setSleepingAllowed:function(a){a?this.m_flags|=oa.e_allowSleepFlag:(this.m_flags&=~oa.e_allowSleepFlag,this.setAwake(!0))},setAwake:function(a){a?(this.m_flags|=oa.e_awakeFlag,this.m_sleepTime=0):(this.m_flags&=~oa.e_awakeFlag,this.m_sleepTime=0,a=this.m_linearVelocity,a.x=0,this.m_angularVelocity=a.y=0,a=this.m_force,a.x=0,this.m_torque=
a.y=0)},isAwake:function(){return(this.m_flags&oa.e_awakeFlag)==oa.e_awakeFlag},setFixedRotation:function(a){this.m_flags=a?this.m_flags|oa.e_fixedRotationFlag:this.m_flags&~oa.e_fixedRotationFlag;this.resetMassData()},isFixedRotation:function(){return(this.m_flags&oa.e_fixedRotationFlag)==oa.e_fixedRotationFlag},setActive:function(a){if(a!=this.isActive()){var b;if(a)for(this.m_flags|=oa.e_activeFlag,a=this.m_world.m_contactManager.m_broadPhase,b=this.m_fixtureList;null!=b;)b.createProxy(a,this.m_xf),
b=b.m_next;else{this.m_flags&=~oa.e_activeFlag;a=this.m_world.m_contactManager.m_broadPhase;for(b=this.m_fixtureList;null!=b;)b.destroyProxy(a),b=b.m_next;for(a=this.m_contactList;null!=a;)b=a,a=a.next,this.m_world.m_contactManager.destroy(b.contact);this.m_contactList=null}}},isActive:function(){return(this.m_flags&oa.e_activeFlag)==oa.e_activeFlag},isSleepingAllowed:function(){return(this.m_flags&oa.e_allowSleepFlag)==oa.e_allowSleepFlag},getFixtureList:function(){return this.m_fixtureList},getJointList:function(){return this.m_jointList},
getControllerList:function(){return this.m_controllerList},getContactList:function(){return this.m_contactList},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},setUserData:function(a){this.m_userData=a},getWorld:function(){return this.m_world},setFriction:function(a){for(var b=this.m_fixtureList;null!=b;)b.m_friction=a,b=b.m_next},setBounciness:function(a){for(var b=this.m_fixtureList;null!=b;)b.m_restitution=a,b=b.m_next},setPaused:function(a){this.m_flags=a?
this.m_flags|oa.e_pausedFlag:this.m_flags&~oa.e_pausedFlag},isPaused:function(){return(this.m_flags&oa.e_pausedFlag)==oa.e_pausedFlag},setIgnoreGravity:function(a){this.m_flags=a?this.m_flags|oa.e_ignoreGravityFlag:this.m_flags&~oa.e_ignoreGravityFlag},isIgnoringGravity:function(){return(this.m_flags&oa.e_ignoreGravityFlag)==oa.e_ignoreGravityFlag},setAlwaysActive:function(a){this.m_flags=a?this.m_flags|oa.e_alwaysActiveFlag:this.m_flags&~oa.e_alwaysActiveFlag},isAlwaysActive:function(){return(this.m_flags&
oa.e_alwaysActiveFlag)==oa.e_alwaysActiveFlag},synchronizeFixtures:function(){var a=oa.s_xf1;a.R.set(this.m_sweep.a0);var b=a.R,c=this.m_sweep.localCenter;a.position.x=this.m_sweep.c0.x-(b.col1.x*c.x+b.col2.x*c.y);a.position.y=this.m_sweep.c0.y-(b.col1.y*c.x+b.col2.y*c.y);b=this.m_world.m_contactManager.m_broadPhase;for(c=this.m_fixtureList;null!=c;)c.synchronize(b,a,this.m_xf),c=c.m_next},synchronizeTransform:function(){this.m_xf.R.set(this.m_sweep.a);var a=this.m_xf.R,b=this.m_sweep.localCenter;
this.m_xf.position.x=this.m_sweep.c.x-(a.col1.x*b.x+a.col2.x*b.y);this.m_xf.position.y=this.m_sweep.c.y-(a.col1.y*b.x+a.col2.y*b.y)},shouldCollide:function(a){if(this.m_type!=oa.b2_dynamicBody&&a.m_type!=oa.b2_dynamicBody)return!1;for(var b=this.m_jointList;null!=b;){if(b.other==a&&0==b.joint.m_collideConnected)return!1;b=b.next}return!0},advance:function(a){this.m_sweep.advance(a);a=this.m_sweep.c;var b=this.m_sweep.c0;a.x=b.x;a.y=b.y;this.m_sweep.a=this.m_sweep.a0;this.synchronizeTransform()},m_flags:null,
m_type:null,m_islandIndex:null,m_xf:null,m_sweep:null,m_linearVelocity:null,m_angularVelocity:null,m_force:null,m_torque:null,m_world:null,m_prev:null,m_next:null,m_fixtureList:null,m_fixtureCount:null,m_controllerList:null,m_controllerCount:null,m_jointList:null,m_contactList:null,m_mass:null,m_invMass:null,m_I:null,m_invI:null,m_inertiaScale:null,m_linearDamping:null,m_angularDamping:null,m_sleepTime:null,m_userData:null,groupID:null,origin:null,size:null,__class__:oa};var ji=function(){this.position=
new y;this.linearVelocity=new y;this.userData=null;this.angularDamping=this.linearDamping=this.angularVelocity=this.angle=0;this.awake=this.allowSleep=!0;this.bullet=this.fixedRotation=!1;this.type=oa.b2_staticBody;this.active=!0;this.inertiaScale=1;this.groupID=3};k["box2D.dynamics.B2BodyDef"]=ji;ji.__name__="box2D.dynamics.B2BodyDef";ji.prototype={type:null,position:null,angle:null,linearVelocity:null,angularVelocity:null,linearDamping:null,angularDamping:null,allowSleep:null,awake:null,fixedRotation:null,
bullet:null,active:null,userData:null,inertiaScale:null,groupID:null,ignoreGravity:null,friction:null,bounciness:null,mass:null,aMass:null,__class__:ji};var mj=function(){};k["box2D.dynamics.B2ContactFilter"]=mj;mj.__name__="box2D.dynamics.B2ContactFilter";mj.prototype={shouldCollide:function(a,b){var c=a.m_body.groupID,d=b.m_body.groupID;a=a.groupID;b=b.groupID;-1E3!=a&&(c=a);-1E3!=b&&(d=b);return-1==c||-1==d?!1:-2==c||-2==d?1==c||1==d?!1:!0:Lb.collisionMap[c][d]},rayCollide:function(a,b){return null==
a?!0:this.shouldCollide(U.__cast(a,Gf),b)},__class__:mj};var yn=function(){this.normalImpulses=[];this.tangentImpulses=[]};k["box2D.dynamics.B2ContactImpulse"]=yn;yn.__name__="box2D.dynamics.B2ContactImpulse";yn.prototype={normalImpulses:null,tangentImpulses:null,__class__:yn};var Ig=function(){};k["box2D.dynamics.B2ContactListener"]=Ig;Ig.__name__="box2D.dynamics.B2ContactListener";Ig.prototype={beginContact:function(a){2147483647<Ig.KEY_LOCK&&(Ig.KEY_LOCK=-2147483648);a.key=Ig.KEY_LOCK++;var b=
a.getFixtureA().getUserData(),c=a.getFixtureB().getUserData(),d=b instanceof md,e=c instanceof md;!d||e||c instanceof Jg?!e||d||b instanceof Jg?(null!=b.contacts&&(b.contacts.set(a.key,a),b.contactCount++),null!=c.contacts&&(c.contacts.set(a.key,a),c.contactCount++)):(U.__cast(c,md).addActor(b),null!=b.regionContacts&&b.regionContacts.set(a.key,a)):(U.__cast(b,md).addActor(c),null!=c.regionContacts&&c.regionContacts.set(a.key,a))},endContact:function(a){var b=a.getFixtureA().getUserData(),c=a.getFixtureB().getUserData(),
d=b instanceof md,e=c instanceof md;if(d&&!e){d=!1;null!=c.regionContacts&&c.regionContacts.unset(a.key);for(a=c.regionContacts.iterator();a.hasNext();){e=a.next();if(e.getFixtureA().getUserData()instanceof md&&e.getFixtureA().getUserData()==b){d=!0;break}if(e.getFixtureB().getUserData()instanceof md&&e.getFixtureB().getUserData()==b){d=!0;break}}d&&!c.recycled||U.__cast(b,md).removeActor(c)}else if(e&&!d){d=!1;null!=b.regionContacts&&b.regionContacts.unset(a.key);for(a=b.regionContacts.iterator();a.hasNext();){e=
a.next();if(e.getFixtureA().getUserData()instanceof md&&e.getFixtureA().getUserData()==c){d=!0;break}if(e.getFixtureB().getUserData()instanceof md&&e.getFixtureB().getUserData()==c){d=!0;break}}d&&!b.recycled||U.__cast(c,md).removeActor(b)}else{if(null!=b.collisions){d=b.collisions;e=a.key;var f=d.mH,g=f.mHash[73856093*e&f.mMask];if(-1==g)e=-2147483648;else if(f=f.mData,f[g]==e)e=f[g+1];else{var h=-2147483648;for(g=f[g+2];-1!=g;){if(f[g]==e){h=f[g+1];break}g=f[g+2]}e=h}f=-2147483648==e?null:d.mVals[e];
if(null!=f)for(b.collisions.unset(a.key),b.collisionsCount--;0<f.points.length;)Md.free(f.points.pop())}null!=b.contacts&&b.contacts.unset(a.key)&&b.contactCount--;if(null!=c.collisions){d=c.collisions;e=a.key;f=d.mH;g=f.mHash[73856093*e&f.mMask];if(-1==g)e=-2147483648;else if(f=f.mData,f[g]==e)e=f[g+1];else{h=-2147483648;for(g=f[g+2];-1!=g;){if(f[g]==e){h=f[g+1];break}g=f[g+2]}e=h}f=-2147483648==e?null:d.mVals[e];if(null!=f)for(c.collisions.unset(a.key),c.collisionsCount--;0<f.points.length;)Md.free(f.points.pop())}null!=
c.contacts&&c.contacts.unset(a.key)&&c.contactCount--}},preSolve:function(a,b){tc.preSolve(a,b)},postSolve:function(a,b){},__class__:Ig};var wk=function(){this.m_world=null;this.m_contactCount=0;this.m_contactFilter=mj.b2_defaultFilter;this.m_contactListener=Ig.b2_defaultListener;this.m_contactFactory=new zn(this.m_allocator);this.m_broadPhase=new Le};k["box2D.dynamics.B2ContactManager"]=wk;wk.__name__="box2D.dynamics.B2ContactManager";wk.prototype={addPair:function(a,b){var c=a.getBody(),d=b.getBody();
if(c!=d){for(var e=d.getContactList();null!=e;){if(e.other==c){var f=e.contact.getFixtureA(),g=e.contact.getFixtureB();if(f==a&&g==b||f==b&&g==a)return}e=e.next}0!=d.shouldCollide(c)&&0!=this.m_contactFilter.shouldCollide(a,b)&&(e=this.m_contactFactory.create(a,b),a=e.getFixtureA(),b=e.getFixtureB(),c=a.m_body,d=b.m_body,e.m_prev=null,e.m_next=this.m_world.m_contactList,null!=this.m_world.m_contactList&&(this.m_world.m_contactList.m_prev=e),this.m_world.m_contactList=e,e.m_nodeA.contact=e,e.m_nodeA.other=
d,e.m_nodeA.prev=null,e.m_nodeA.next=c.m_contactList,null!=c.m_contactList&&(c.m_contactList.prev=e.m_nodeA),c.m_contactList=e.m_nodeA,e.m_nodeB.contact=e,e.m_nodeB.other=c,e.m_nodeB.prev=null,e.m_nodeB.next=d.m_contactList,null!=d.m_contactList&&(d.m_contactList.prev=e.m_nodeB),d.m_contactList=e.m_nodeB,++this.m_world.m_contactCount)}},findNewContacts:function(){this.m_broadPhase.updatePairs(this)},destroy:function(a){var b=a.getFixtureA(),c=a.getFixtureB();b=b.getBody();c=c.getBody();a.isTouching()&&
this.m_contactListener.endContact(a);null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);a==this.m_world.m_contactList&&(this.m_world.m_contactList=a.m_next);null!=a.m_nodeA.prev&&(a.m_nodeA.prev.next=a.m_nodeA.next);null!=a.m_nodeA.next&&(a.m_nodeA.next.prev=a.m_nodeA.prev);a.m_nodeA==b.m_contactList&&(b.m_contactList=a.m_nodeA.next);null!=a.m_nodeB.prev&&(a.m_nodeB.prev.next=a.m_nodeB.next);null!=a.m_nodeB.next&&(a.m_nodeB.next.prev=a.m_nodeB.prev);a.m_nodeB==c.m_contactList&&
(c.m_contactList=a.m_nodeB.next);this.m_contactFactory.destroy(a);--this.m_contactCount},collide:function(){for(var a=this.m_world.m_contactList;null!=a;){var b=a.getFixtureA(),c=a.getFixtureB(),d=b.getBody(),e=c.getBody();if(0==d.isAwake()&&0==e.isAwake())a=a.getNext();else{if(0!=(a.m_flags&Ta.e_filterFlag)){if(0==e.shouldCollide(d)){b=a;a=b.getNext();this.destroy(b);continue}if(0==this.m_contactFilter.shouldCollide(b,c)){b=a;a=b.getNext();this.destroy(b);continue}a.m_flags&=~Ta.e_filterFlag}0==
this.m_broadPhase.testOverlap(b.m_proxy,c.m_proxy)?(b=a,a=b.getNext(),this.destroy(b)):(a.update(this.m_contactListener),a=a.getNext())}}},m_world:null,m_broadPhase:null,m_contactList:null,m_contactCount:null,m_contactFilter:null,m_contactListener:null,m_contactFactory:null,m_allocator:null,__class__:wk};var Ce=function(){this.m_xformScale=this.m_fillAlpha=this.m_alpha=this.m_lineThickness=this.m_drawScale=1;this.m_drawFlags=0};k["box2D.dynamics.B2DebugDraw"]=Ce;Ce.__name__="box2D.dynamics.B2DebugDraw";
Ce.prototype={setFlags:function(a){this.m_drawFlags=a},getFlags:function(){return this.m_drawFlags},appendFlags:function(a){this.m_drawFlags|=a},clearFlags:function(a){this.m_drawFlags&=~a},setSprite:function(a){this.m_sprite=a},getSprite:function(){return this.m_sprite},setDrawScale:function(a){this.m_drawScale=a},getDrawScale:function(){return this.m_drawScale},setLineThickness:function(a){this.m_lineThickness=a},getLineThickness:function(){return this.m_lineThickness},setAlpha:function(a){this.m_alpha=
a},getAlpha:function(){return this.m_alpha},setFillAlpha:function(a){this.m_fillAlpha=a},getFillAlpha:function(){return this.m_fillAlpha},setXFormScale:function(a){this.m_xformScale=a},getXFormScale:function(){return this.m_xformScale},drawPolygon:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale);for(c=0;c<b;){var d=c++;this.m_sprite.get_graphics().lineTo(a[d].x*
this.m_drawScale,a[d].y*this.m_drawScale)}this.m_sprite.get_graphics().lineTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale)},drawSolidPolygon:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale);this.m_sprite.get_graphics().beginFill(c.get_color(),this.m_fillAlpha);for(c=0;c<b;){var d=c++;this.m_sprite.get_graphics().lineTo(a[d].x*this.m_drawScale,a[d].y*this.m_drawScale)}this.m_sprite.get_graphics().lineTo(a[0].x*
this.m_drawScale,a[0].y*this.m_drawScale);this.m_sprite.get_graphics().endFill()},drawCircle:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().drawCircle(a.x*this.m_drawScale,a.y*this.m_drawScale,b*this.m_drawScale)},drawSolidCircle:function(a,b,c,d){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,d.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(0,0);this.m_sprite.get_graphics().beginFill(d.get_color(),
this.m_fillAlpha);this.m_sprite.get_graphics().drawCircle(a.x*this.m_drawScale,a.y*this.m_drawScale,b*this.m_drawScale);this.m_sprite.get_graphics().endFill();this.m_sprite.get_graphics().moveTo(a.x*this.m_drawScale,a.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.x+c.x*b)*this.m_drawScale,(a.y+c.y*b)*this.m_drawScale)},drawSegment:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a.x*this.m_drawScale,
a.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo(b.x*this.m_drawScale,b.y*this.m_drawScale)},drawTransform:function(a){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,16711680,this.m_alpha);this.m_sprite.get_graphics().moveTo(a.position.x*this.m_drawScale,a.position.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.position.x+this.m_xformScale*a.R.col1.x)*this.m_drawScale,(a.position.y+this.m_xformScale*a.R.col1.y)*this.m_drawScale);this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,
65280,this.m_alpha);this.m_sprite.get_graphics().moveTo(a.position.x*this.m_drawScale,a.position.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.position.x+this.m_xformScale*a.R.col2.x)*this.m_drawScale,(a.position.y+this.m_xformScale*a.R.col2.y)*this.m_drawScale)},m_drawFlags:null,m_sprite:null,m_drawScale:null,m_lineThickness:null,m_alpha:null,m_fillAlpha:null,m_xformScale:null,__class__:Ce};var Zq=function(){};k["box2D.dynamics.B2DestructionListener"]=Zq;Zq.__name__="box2D.dynamics.B2DestructionListener";
Zq.prototype={sayGoodbyeJoint:function(a){},sayGoodbyeFixture:function(a){},__class__:Zq};var nj=function(){this.categoryBits=1;this.maskBits=65535;this.groupIndex=0};k["box2D.dynamics.B2FilterData"]=nj;nj.__name__="box2D.dynamics.B2FilterData";nj.prototype={copy:function(){var a=new nj;a.categoryBits=this.categoryBits;a.maskBits=this.maskBits;a.groupIndex=this.groupIndex;return a},categoryBits:null,maskBits:null,groupIndex:null,__class__:nj};var Gf=function(){this.m_filter=new nj;this.m_aabb=new Ha;
this.m_shape=this.m_next=this.m_body=this.m_userData=null;this.m_restitution=this.m_friction=this.m_density=0;this.groupID=3};k["box2D.dynamics.B2Fixture"]=Gf;Gf.__name__="box2D.dynamics.B2Fixture";Gf.prototype={getType:function(){return this.m_shape.getType()},getShape:function(){return this.m_shape},setSensor:function(a){if(this.m_isSensor!=a&&(this.m_isSensor=a,null!=this.m_body))for(a=this.m_body.getContactList();null!=a;){var b=a.contact,c=b.getFixtureA(),d=b.getFixtureB();c!=this&&d!=this||
b.setSensor(c.isSensor()||d.isSensor());a=a.next}},isSensor:function(){return this.m_isSensor},setFilterData:function(a){this.m_filter=a.copy();if(null==this.m_body)for(a=this.m_body.getContactList();null!=a;){var b=a.contact,c=b.getFixtureA(),d=b.getFixtureB();c!=this&&d!=this||b.flagForFiltering();a=a.next}},getFilterData:function(){return this.m_filter.copy()},getBody:function(){return this.m_body},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},SetUserData:function(a){this.m_userData=
a},testPoint:function(a){return this.m_shape.testPoint(this.m_body.getTransform(),a)},rayCast:function(a,b){return this.m_shape.rayCast(a,b,this.m_body.getTransform())},getMassData:function(a){null==a&&(a=new lj);this.m_shape.computeMass(a,this.m_density);return a},setDensity:function(a){this.m_density=a},getDensity:function(){return this.m_density},getFriction:function(){return this.m_friction},setFriction:function(a){this.m_friction=a},getRestitution:function(){return this.m_restitution},setRestitution:function(a){this.m_restitution=
a},getAABB:function(){return this.m_aabb},create:function(a,b,c){this.m_userData=c.userData;this.m_friction=c.friction;this.m_restitution=c.restitution;this.m_body=a;this.m_next=null;this.m_filter=c.filter.copy();this.m_isSensor=c.isSensor;this.m_shape=c.shape.copy();this.m_density=c.density;this.groupID=c.groupID},destroy:function(){this.m_shape=null},createProxy:function(a,b){this.m_shape.computeAABB(this.m_aabb,b);this.m_proxy=a.createProxy(this.m_aabb,this)},destroyProxy:function(a){null!=this.m_proxy&&
(a.destroyProxy(this.m_proxy),this.m_proxy=null)},synchronize:function(a,b,c){null!=this.m_proxy&&(this.m_shape.computeAABB(Gf.tempAABB1,b),this.m_shape.computeAABB(Gf.tempAABB2,c),this.m_aabb.combine(Gf.tempAABB1,Gf.tempAABB2),b=O.subtractVVPooled(c.position,b.position),a.moveProxy(this.m_proxy,this.m_aabb,b))},m_massData:null,m_aabb:null,m_density:null,m_next:null,m_body:null,m_shape:null,m_friction:null,m_restitution:null,m_proxy:null,m_filter:null,m_isSensor:null,m_userData:null,groupID:null,
__class__:Gf};var Hf=function(){this.filter=new nj;this.userData=this.shape=null;this.friction=.2;this.density=this.restitution=0;this.filter.categoryBits=1;this.filter.maskBits=65535;this.filter.groupIndex=0;this.isSensor=!1;this.groupID=3};k["box2D.dynamics.B2FixtureDef"]=Hf;Hf.__name__="box2D.dynamics.B2FixtureDef";Hf.prototype={shape:null,userData:null,friction:null,restitution:null,density:null,isSensor:null,filter:null,groupID:null,__class__:Hf};var Dh=function(){this.m_bodies=[];this.m_contacts=
[];this.m_joints=[]};k["box2D.dynamics.B2Island"]=Dh;Dh.__name__="box2D.dynamics.B2Island";Dh.prototype={initialize:function(a,b,c,d,e,f){this.m_bodyCapacity=a;this.m_contactCapacity=b;this.m_jointCapacity=c;this.m_jointCount=this.m_contactCount=this.m_bodyCount=0;this.m_allocator=d;this.m_listener=e;this.m_contactSolver=f;d=this.m_bodies.length;for(e=a;d<e;)a=d++,this.m_bodies[a]=null;d=this.m_contacts.length;for(e=b;d<e;)a=d++,this.m_contacts[a]=null;d=this.m_joints.length;for(e=c;d<e;)a=d++,this.m_joints[a]=
null},clear:function(){this.m_jointCount=this.m_contactCount=this.m_bodyCount=0},solve:function(a,b,c){for(var d,e,f=0,g=this.m_bodyCount;f<g;)d=f++,d=this.m_bodies[d],d.getType()==oa.b2_dynamicBody&&(d.isIgnoringGravity()?(d.m_linearVelocity.x+=a.dt*d.m_invMass*d.m_force.x,d.m_linearVelocity.y+=a.dt*d.m_invMass*d.m_force.y):(d.m_linearVelocity.x+=a.dt*(b.x+d.m_invMass*d.m_force.x),d.m_linearVelocity.y+=a.dt*(b.y+d.m_invMass*d.m_force.y)),d.m_angularVelocity+=a.dt*d.m_invI*d.m_torque,d.m_linearVelocity.multiply(O.clamp(1-
a.dt*d.m_linearDamping,0,1)),d.m_angularVelocity*=O.clamp(1-a.dt*d.m_angularDamping,0,1));this.m_contactSolver.initialize(a,this.m_contacts,this.m_contactCount,this.m_allocator);b=this.m_contactSolver;b.initVelocityConstraints(a);f=0;for(g=this.m_jointCount;f<g;)d=f++,e=this.m_joints[d],e.initVelocityConstraints(a);f=0;for(g=a.velocityIterations;f<g;){f++;d=0;for(var h=this.m_jointCount;d<h;)e=d++,e=this.m_joints[e],e.solveVelocityConstraints(a);b.solveVelocityConstraints()}f=0;for(g=this.m_jointCount;f<
g;)d=f++,e=this.m_joints[d],e.finalizeVelocityConstraints();b.finalizeVelocityConstraints();f=0;for(g=this.m_bodyCount;f<g;)if(d=f++,d=this.m_bodies[d],d.getType()!=oa.b2_staticBody){h=a.dt*d.m_linearVelocity.x;var m=a.dt*d.m_linearVelocity.y;h*h+m*m>ca.b2_maxTranslationSquared&&(d.m_linearVelocity.normalize(),d.m_linearVelocity.x=d.m_linearVelocity.x*ca.b2_maxTranslation*a.inv_dt,d.m_linearVelocity.y=d.m_linearVelocity.y*ca.b2_maxTranslation*a.inv_dt);h=a.dt*d.m_angularVelocity;h*h>ca.b2_maxRotationSquared&&
(d.m_angularVelocity=0>d.m_angularVelocity?-ca.b2_maxRotation*a.inv_dt:ca.b2_maxRotation*a.inv_dt);h=d.m_sweep.c0;m=d.m_sweep.c;h.x=m.x;h.y=m.y;d.m_sweep.a0=d.m_sweep.a;d.m_sweep.c.x+=a.dt*d.m_linearVelocity.x;d.m_sweep.c.y+=a.dt*d.m_linearVelocity.y;d.m_sweep.a+=a.dt*d.m_angularVelocity;d.synchronizeTransform()}f=0;for(g=a.positionIterations;f<g;){f++;m=b.solvePositionConstraints(ca.b2_contactBaumgarte);var l=!0;d=0;for(h=this.m_jointCount;d<h;)e=d++,e=this.m_joints[e],e=e.solvePositionConstraints(ca.b2_contactBaumgarte),
l=l&&e;if(m&&l)break}this.report(b.m_constraints);if(c){c=Number.MAX_VALUE;b=ca.b2_linearSleepTolerance*ca.b2_linearSleepTolerance;h=ca.b2_angularSleepTolerance*ca.b2_angularSleepTolerance;f=0;for(g=this.m_bodyCount;f<g;)d=f++,d=this.m_bodies[d],d.getType()!=oa.b2_staticBody&&(0==(d.m_flags&oa.e_allowSleepFlag)&&(c=d.m_sleepTime=0),0==(d.m_flags&oa.e_allowSleepFlag)||d.m_angularVelocity*d.m_angularVelocity>h||O.dot(d.m_linearVelocity,d.m_linearVelocity)>b?c=d.m_sleepTime=0:(d.m_sleepTime+=a.dt,c=
O.min(c,d.m_sleepTime)));if(c>=ca.b2_timeToSleep)for(f=0,g=this.m_bodyCount;f<g;)d=f++,d=this.m_bodies[d],d.setAwake(!1)}},solveTOI:function(a){this.m_contactSolver.initialize(a,this.m_contacts,this.m_contactCount,this.m_allocator);for(var b=this.m_contactSolver,c=0,d=this.m_jointCount;c<d;){var e=c++;this.m_joints[e].initVelocityConstraints(a)}c=0;for(d=a.velocityIterations;c<d;){c++;b.solveVelocityConstraints();e=0;for(var f=this.m_jointCount;e<f;){var g=e++;this.m_joints[g].solveVelocityConstraints(a)}}c=
0;for(d=this.m_bodyCount;c<d;)e=c++,e=this.m_bodies[e],e.getType()!=oa.b2_staticBody&&(f=a.dt*e.m_linearVelocity.x,g=a.dt*e.m_linearVelocity.y,f*f+g*g>ca.b2_maxTranslationSquared&&(e.m_linearVelocity.normalize(),e.m_linearVelocity.x=e.m_linearVelocity.x*ca.b2_maxTranslation*a.inv_dt,e.m_linearVelocity.y=e.m_linearVelocity.y*ca.b2_maxTranslation*a.inv_dt),f=a.dt*e.m_angularVelocity,f*f>ca.b2_maxRotationSquared&&(e.m_angularVelocity=0>e.m_angularVelocity?-ca.b2_maxRotation*a.inv_dt:ca.b2_maxRotation*
a.inv_dt),f=e.m_sweep.c0,g=e.m_sweep.c,f.x=g.x,f.y=g.y,e.m_sweep.a0=e.m_sweep.a,e.m_sweep.c.x+=a.dt*e.m_linearVelocity.x,e.m_sweep.c.y+=a.dt*e.m_linearVelocity.y,e.m_sweep.a+=a.dt*e.m_angularVelocity,e.synchronizeTransform());c=0;for(d=a.positionIterations;c<d;){c++;a=b.solvePositionConstraints(.75);var h=!0;e=0;for(f=this.m_jointCount;e<f;)g=e++,g=this.m_joints[g].solvePositionConstraints(ca.b2_contactBaumgarte),h=h&&g;if(a&&h)break}this.report(b.m_constraints)},report:function(a){if(null!=this.m_listener)for(var b=
0,c=this.m_contactCount;b<c;){var d=b++,e=this.m_contacts[d];d=a[d];for(var f=0,g=d.pointCount;f<g;){var h=f++;Dh.s_impulse.normalImpulses[h]=d.points[h].normalImpulse;Dh.s_impulse.tangentImpulses[h]=d.points[h].tangentImpulse}this.m_listener.postSolve(e,Dh.s_impulse)}},addBody:function(a){a.m_islandIndex=this.m_bodyCount;this.m_bodies[this.m_bodyCount++]=a},addContact:function(a){this.m_contacts[this.m_contactCount++]=a},addJoint:function(a){this.m_joints[this.m_jointCount++]=a},m_allocator:null,
m_listener:null,m_contactSolver:null,m_bodies:null,m_contacts:null,m_joints:null,m_bodyCount:null,m_jointCount:null,m_contactCount:null,m_bodyCapacity:null,m_contactCapacity:null,m_jointCapacity:null,__class__:Dh};var oj=function(){};k["box2D.dynamics.B2TimeStep"]=oj;oj.__name__="box2D.dynamics.B2TimeStep";oj.prototype={set:function(a){this.dt=a.dt;this.inv_dt=a.inv_dt;this.positionIterations=a.positionIterations;this.velocityIterations=a.velocityIterations;this.warmStarting=a.warmStarting},dt:null,
inv_dt:null,dtRatio:null,velocityIterations:null,positionIterations:null,warmStarting:null,__class__:oj};var cc=function(a,b){this.pointQueryCallback=new xk;this.shapeQueryCallback=new yk;this.aabbQueryCallback=new zk;this.s_stack=[];this.m_contactManager=new wk;this.m_contactSolver=new De;this.m_island=new Dh;this.m_controllerList=this.m_jointList=this.m_contactList=this.m_bodyList=this.m_debugDraw=this.m_destructionListener=null;this.m_controllerCount=this.m_jointCount=this.m_contactCount=this.m_bodyCount=
0;cc.m_warmStarting=!0;cc.m_continuousPhysics=!1;this.m_allowSleep=b;this.m_gravity=a;this.m_flags=this.m_inv_dt0=0;this.m_contactManager.m_world=this;a=new ji;this.m_groundBody=this.createBody(a)};k["box2D.dynamics.B2World"]=cc;cc.__name__="box2D.dynamics.B2World";cc.prototype={setDestructionListener:function(a){this.m_destructionListener=a},setContactFilter:function(a){this.m_contactManager.m_contactFilter=a},setContactListener:function(a){this.m_contactManager.m_contactListener=a},setDebugDraw:function(a){this.m_debugDraw=
a},setBroadPhase:function(a){var b=this.m_contactManager.m_broadPhase;this.m_contactManager.m_broadPhase=a;for(var c=this.m_bodyList;null!=c;){for(var d=c.m_fixtureList;null!=d;)d.m_proxy=a.createProxy(b.getFatAABB(d.m_proxy),d),d=d.m_next;c=c.m_next}},validate:function(){this.m_contactManager.m_broadPhase.validate()},getProxyCount:function(){return this.m_contactManager.m_broadPhase.getProxyCount()},createBody:function(a){if(1==this.isLocked())return null;a=new oa(a,this);a.m_prev=null;a.m_next=
this.m_bodyList;null!=this.m_bodyList&&(this.m_bodyList.m_prev=a);this.m_bodyList=a;++this.m_bodyCount;return a},destroyBody:function(a){if(1!=this.isLocked()){for(var b=a.m_jointList;null!=b;){var c=b;b=b.next;null!=this.m_destructionListener&&this.m_destructionListener.sayGoodbyeJoint(c.joint);this.destroyJoint(c.joint)}for(b=a.m_controllerList;null!=b;)c=b,b=b.nextController,c.controller.removeBody(a);for(b=a.m_contactList;null!=b;)c=b,b=b.next,this.m_contactManager.destroy(c.contact);a.m_contactList=
null;for(b=a.m_fixtureList;null!=b;)c=b,b=b.m_next,null!=this.m_destructionListener&&this.m_destructionListener.sayGoodbyeFixture(c),c.destroyProxy(this.m_contactManager.m_broadPhase),c.destroy();a.m_fixtureList=null;a.m_fixtureCount=0;null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);a==this.m_bodyList&&(this.m_bodyList=a.m_next);--this.m_bodyCount}},createJoint:function(a){var b=Sb.create(a,null);b.m_prev=null;b.m_next=this.m_jointList;null!=this.m_jointList&&
(this.m_jointList.m_prev=b);this.m_jointList=b;++this.m_jointCount;b.m_edgeA.joint=b;b.m_edgeA.other=b.m_bodyB;b.m_edgeA.prev=null;b.m_edgeA.next=b.m_bodyA.m_jointList;null!=b.m_bodyA.m_jointList&&(b.m_bodyA.m_jointList.prev=b.m_edgeA);b.m_bodyA.m_jointList=b.m_edgeA;b.m_edgeB.joint=b;b.m_edgeB.other=b.m_bodyA;b.m_edgeB.prev=null;b.m_edgeB.next=b.m_bodyB.m_jointList;null!=b.m_bodyB.m_jointList&&(b.m_bodyB.m_jointList.prev=b.m_edgeB);b.m_bodyB.m_jointList=b.m_edgeB;var c=a.bodyA,d=a.bodyB;if(0==a.collideConnected)for(a=
d.getContactList();null!=a;)a.other==c&&a.contact.flagForFiltering(),a=a.next;return b},destroyJoint:function(a){var b=a.m_collideConnected;null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);a==this.m_jointList&&(this.m_jointList=a.m_next);var c=a.m_bodyA,d=a.m_bodyB;c.setAwake(!0);d.setAwake(!0);null!=a.m_edgeA.prev&&(a.m_edgeA.prev.next=a.m_edgeA.next);null!=a.m_edgeA.next&&(a.m_edgeA.next.prev=a.m_edgeA.prev);a.m_edgeA==c.m_jointList&&(c.m_jointList=a.m_edgeA.next);
a.m_edgeA.prev=null;a.m_edgeA.next=null;null!=a.m_edgeB.prev&&(a.m_edgeB.prev.next=a.m_edgeB.next);null!=a.m_edgeB.next&&(a.m_edgeB.next.prev=a.m_edgeB.prev);a.m_edgeB==d.m_jointList&&(d.m_jointList=a.m_edgeB.next);a.m_edgeB.prev=null;a.m_edgeB.next=null;Sb.destroy(a,null);--this.m_jointCount;if(0==b)for(a=d.getContactList();null!=a;)a.other==c&&a.contact.flagForFiltering(),a=a.next},addController:function(a){a.m_next=this.m_controllerList;a.m_prev=null;this.m_controllerList=a;a.m_world=this;this.m_controllerCount++;
return a},removeController:function(a){null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);this.m_controllerList==a&&(this.m_controllerList=a.m_next);this.m_controllerCount--},createController:function(a){if(a.m_world!=this)throw J.thrown("Controller can only be a member of one world");a.m_next=this.m_controllerList;a.m_prev=null;null!=this.m_controllerList&&(this.m_controllerList.m_prev=a);this.m_controllerList=a;++this.m_controllerCount;a.m_world=this;return a},
destroyController:function(a){a.clear();null!=a.m_next&&(a.m_next.m_prev=a.m_prev);null!=a.m_prev&&(a.m_prev.m_next=a.m_next);a==this.m_controllerList&&(this.m_controllerList=a.m_next);--this.m_controllerCount},setWarmStarting:function(a){cc.m_warmStarting=a},setContinuousPhysics:function(a){cc.m_continuousPhysics=a},getBodyCount:function(){return this.m_bodyCount},getJointCount:function(){return this.m_jointCount},getContactCount:function(){return this.m_contactCount},setGravity:function(a){this.m_gravity=
a},getGravity:function(){return this.m_gravity},getGroundBody:function(){return this.m_groundBody},step:function(a,b,c){y.freePool();0!=(this.m_flags&cc.e_newFixture)&&(this.m_contactManager.findNewContacts(),this.m_flags&=~cc.e_newFixture);this.m_flags|=cc.e_locked;var d=cc.s_timestep2;d.dt=a;d.velocityIterations=b;d.positionIterations=c;d.inv_dt=0<a?1/a:0;d.dtRatio=this.m_inv_dt0*a;d.warmStarting=cc.m_warmStarting;this.m_contactManager.collide();0<d.dt&&this.solve(d);cc.m_continuousPhysics&&0<d.dt&&
this.solveTOI(d);0<d.dt&&(this.m_inv_dt0=d.inv_dt);this.m_flags&=~cc.e_locked},clearForces:function(){for(var a=this.m_bodyList;null!=a;){var b=a.m_force;b.x=0;b.y=0;a.m_torque=0;a=a.m_next}},drawDebugData:function(){if(null!=this.m_debugDraw){this.m_debugDraw.m_sprite.get_graphics().clear();var a=this.m_debugDraw.getFlags(),b,c;new y;new y;new y;new Ha;new Ha;new y;new y;new y;new y;var d=new vk(0,0,0);if(0!=(a&Ce.e_shapeBit))for(b=this.m_bodyList;null!=b;){var e=b.m_xf;for(c=b.getFixtureList();null!=
c;){var f=c.getShape();0==b.isActive()?d.set(.5,.5,.3):b.getType()==oa.b2_staticBody?d.set(.5,.9,.5):b.getType()==oa.b2_kinematicBody?d.set(.5,.5,.9):0==b.isAwake()?d.set(.6,.6,.6):d.set(.9,.7,.7);this.drawShape(f,e,d);c=c.m_next}b=b.m_next}if(0!=(a&Ce.e_jointBit))for(b=this.m_jointList;null!=b;)this.drawJoint(b),b=b.m_next;if(0!=(a&Ce.e_controllerBit))for(b=this.m_controllerList;null!=b;)b.draw(this.m_debugDraw),b=b.m_next;if(0!=(a&Ce.e_pairBit))for(d.set(.3,.9,.9),b=this.m_contactManager.m_contactList;null!=
b;)f=b.getFixtureA(),c=b.getFixtureB(),f=f.getAABB().getCenter(),c=c.getAABB().getCenter(),this.m_debugDraw.drawSegment(f,c,d),b=b.getNext();if(0!=(a&Ce.e_aabbBit))for(f=this.m_contactManager.m_broadPhase,e=[new y,new y,new y,new y],b=this.m_bodyList;null!=b;){if(0!=b.isActive())for(c=b.getFixtureList();null!=c;){var g=f.getFatAABB(c.m_proxy),h=e[0],m=g.lowerBound.x,l=g.lowerBound.y;null==l&&(l=0);null==m&&(m=0);h.x=m;h.y=l;h=e[1];m=g.upperBound.x;l=g.lowerBound.y;null==l&&(l=0);null==m&&(m=0);h.x=
m;h.y=l;h=e[2];m=g.upperBound.x;l=g.upperBound.y;null==l&&(l=0);null==m&&(m=0);h.x=m;h.y=l;h=e[3];m=g.lowerBound.x;g=g.upperBound.y;null==g&&(g=0);null==m&&(m=0);h.x=m;h.y=g;this.m_debugDraw.drawPolygon(e,4,d);c=c.getNext()}b=b.getNext()}if(0!=(a&Ce.e_centerOfMassBit))for(b=this.m_bodyList;null!=b;)e=cc.s_xf,e.R=b.m_xf.R,e.position=b.getWorldCenter(),this.m_debugDraw.drawTransform(e),b=b.m_next}},queryAABB:function(a,b){this.aabbQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;this.aabbQueryCallback.callbackMethod=
a;this.m_contactManager.m_broadPhase.query(this.aabbQueryCallback,b)},queryShape:function(a,b,c){this.shapeQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;this.shapeQueryCallback.callbackMethod=a;null==c&&(c=new Ve,c.setIdentity());this.shapeQueryCallback.transform=c;a=new Ha;b.computeAABB(a,c);this.shapeQueryCallback.shape=b;this.m_contactManager.m_broadPhase.query(this.shapeQueryCallback,a)},queryPoint:function(a,b){this.pointQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;
this.pointQueryCallback.callbackMethod=a;this.pointQueryCallback.p=b;a=new Ha;var c=a.lowerBound,d=b.x-ca.b2_linearSlop,e=b.y-ca.b2_linearSlop;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=a.upperBound;d=b.x+ca.b2_linearSlop;e=b.y+ca.b2_linearSlop;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;this.m_contactManager.m_broadPhase.query(this.pointQueryCallback,a)},rayCast:function(a,b,c){var d=this.m_contactManager.m_broadPhase,e=new wn,f=new sk(b,c);d.rayCast(function(f,h){h=d.getUserData(h);h=U.__cast(h,
Gf);if(h.rayCast(e,f)){f=e.fraction;var g=new y((1-f)*b.x+f*c.x,(1-f)*b.y+f*c.y);return a(h,g,e.normal,f)}return f.maxFraction},f)},rayCastOne:function(a,b){var c;this.rayCast(function(a,b,f,g){c=a;return g},a,b);return c},rayCastAll:function(a,b){var c=[];this.rayCast(function(a,b,f,g){c[c.length]=a;return 1},a,b);return c},getBodyList:function(){return this.m_bodyList},getJointList:function(){return this.m_jointList},getContactList:function(){return this.m_contactList},isLocked:function(){return 0<
(this.m_flags&cc.e_locked)},s_stack:null,solve:function(a){for(var b=this.m_controllerList;null!=b;)b.step(a),b=b.m_next;b=this.m_island;b.initialize(this.m_bodyCount,this.m_contactCount,this.m_jointCount,null,this.m_contactManager.m_contactListener,this.m_contactSolver);for(var c=this.m_bodyList;null!=c;)c.m_flags&=~oa.e_islandFlag,c=c.m_next;for(var d=this.m_contactList;null!=d;)d.m_flags&=~Ta.e_islandFlag,d=d.m_next;for(d=this.m_jointList;null!=d;)d.m_islandFlag=!1,d=d.m_next;d=this.s_stack;for(var e=
this.m_bodyList;null!=e;){if(0==(e.m_flags&oa.e_islandFlag)&&(!e.isActive()&&!e.isAlwaysActive()&&e.m_xf.position.x+e.origin.x+e.size.x>=this.m_aabb.lowerBound.x&&e.m_xf.position.y+e.origin.y+e.size.y>=this.m_aabb.lowerBound.y&&e.m_xf.position.x+e.origin.x<=this.m_aabb.upperBound.x&&e.m_xf.position.y+e.origin.y<=this.m_aabb.upperBound.y&&(e.setActive(!0),e.setAwake(!0)),0!=e.isAwake()&&0!=e.isActive()&&!e.isPaused()&&e.getType()!=oa.b2_staticBody))if(e.isActive()&&!e.isAlwaysActive()&&(e.m_xf.position.x+
e.origin.x+e.size.x<this.m_aabb.lowerBound.x||e.m_xf.position.y+e.origin.y+e.size.y<this.m_aabb.lowerBound.y||e.m_xf.position.x+e.origin.x>this.m_aabb.upperBound.x||e.m_xf.position.y+e.origin.y>this.m_aabb.upperBound.y))e.setAwake(!1),e.setActive(!1);else{b.clear();var f=0;d[f++]=e;for(e.m_flags|=oa.e_islandFlag;0<f;)if(c=d[--f],b.addBody(c),0==c.isAwake()&&c.setAwake(!0),c.getType()!=oa.b2_staticBody){for(var g,h=c.m_contactList;null!=h;)0==(h.contact.m_flags&Ta.e_islandFlag)&&1!=h.contact.isSensor()&&
0!=h.contact.isEnabled()&&0!=h.contact.isTouching()&&(b.addContact(h.contact),h.contact.m_flags|=Ta.e_islandFlag,g=h.other,0==(g.m_flags&oa.e_islandFlag)&&(d[f++]=g,g.m_flags|=oa.e_islandFlag)),h=h.next;for(c=c.m_jointList;null!=c;)1!=c.joint.m_islandFlag&&(g=c.other,0!=g.isActive()&&(b.addJoint(c.joint),c.joint.m_islandFlag=!0,0==(g.m_flags&oa.e_islandFlag)&&(d[f++]=g,g.m_flags|=oa.e_islandFlag))),c=c.next}b.solve(a,this.m_gravity,this.m_allowSleep);f=0;for(g=b.m_bodyCount;f<g;)c=f++,c=b.m_bodies[c],
c.getType()==oa.b2_staticBody&&(c.m_flags&=~oa.e_islandFlag)}e=e.m_next}f=0;for(g=d.length;f<g;){c=f++;if(null==d[c])break;d[c]=null}for(c=this.m_bodyList;null!=c;)0!=c.isAwake()&&0!=c.isActive()&&c.getType()!=oa.b2_staticBody&&c.synchronizeFixtures(),c=c.m_next;this.m_contactManager.findNewContacts()},solveTOI:function(a){var b,c=this.m_island;c.initialize(this.m_bodyCount,ca.b2_maxTOIContactsPerIsland,ca.b2_maxTOIJointsPerIsland,null,this.m_contactManager.m_contactListener,this.m_contactSolver);
for(var d=cc.s_queue,e=this.m_bodyList;null!=e;)e.m_flags&=~oa.e_islandFlag,e.m_sweep.t0=0,e=e.m_next;for(b=this.m_contactList;null!=b;)b.m_flags&=~(Ta.e_toiFlag|Ta.e_islandFlag),b=b.m_next;for(e=this.m_jointList;null!=e;)e.m_islandFlag=!1,e=e.m_next;for(;;){e=null;var f=1;for(b=this.m_contactList;null!=b;){if(1!=b.isSensor()&&0!=b.isEnabled()&&0!=b.isContinuous()){if(0!=(b.m_flags&Ta.e_toiFlag))var g=b.m_toi;else{g=b.m_fixtureA;var h=b.m_fixtureB;g=g.m_body;h=h.m_body;if(!(g.getType()==oa.b2_dynamicBody&&
0!=g.isAwake()||h.getType()==oa.b2_dynamicBody&&0!=h.isAwake())){b=b.m_next;continue}var m=g.m_sweep.t0;g.m_sweep.t0<h.m_sweep.t0?(m=h.m_sweep.t0,g.m_sweep.advance(m)):h.m_sweep.t0<g.m_sweep.t0&&(m=g.m_sweep.t0,h.m_sweep.advance(m));g=b.computeTOI(g.m_sweep,h.m_sweep);ca.b2Assert(0<=g&&1>=g);0<g&&1>g&&(g=(1-g)*m+g,1<g&&(g=1));b.m_toi=g;b.m_flags|=Ta.e_toiFlag}Number.MIN_VALUE<g&&g<f&&(e=b,f=g)}b=b.m_next}if(null==e||1-100*Number.MIN_VALUE<f)break;g=e.m_fixtureA;h=e.m_fixtureB;g=g.m_body;h=h.m_body;
cc.s_backupA.set(g.m_sweep);cc.s_backupB.set(h.m_sweep);g.advance(f);h.advance(f);e.update(this.m_contactManager.m_contactListener);e.m_flags&=~Ta.e_toiFlag;if(1==e.isSensor()||0==e.isEnabled())g.m_sweep.set(cc.s_backupA),h.m_sweep.set(cc.s_backupB),g.synchronizeTransform(),h.synchronizeTransform();else if(0!=e.isTouching()){b=g;b.getType()!=oa.b2_dynamicBody&&(b=h);c.clear();h=g=0;d[g+h++]=b;for(b.m_flags|=oa.e_islandFlag;0<h;)if(e=d[g++],--h,c.addBody(e),0==e.isAwake()&&e.setAwake(!0),e.getType()==
oa.b2_dynamicBody){for(b=e.m_contactList;null!=b&&c.m_contactCount!=c.m_contactCapacity;)0==(b.contact.m_flags&Ta.e_islandFlag)&&1!=b.contact.isSensor()&&0!=b.contact.isEnabled()&&0!=b.contact.isTouching()&&(c.addContact(b.contact),b.contact.m_flags|=Ta.e_islandFlag,m=b.other,0==(m.m_flags&oa.e_islandFlag)&&(m.getType()!=oa.b2_staticBody&&(m.advance(f),m.setAwake(!0)),d[g+h]=m,++h,m.m_flags|=oa.e_islandFlag)),b=b.next;for(b=e.m_jointList;null!=b;)c.m_jointCount!=c.m_jointCapacity&&1!=b.joint.m_islandFlag&&
(m=b.other,0!=m.isActive()&&(c.addJoint(b.joint),b.joint.m_islandFlag=!0,0==(m.m_flags&oa.e_islandFlag)&&(m.getType()!=oa.b2_staticBody&&(m.advance(f),m.setAwake(!0)),d[g+h]=m,++h,m.m_flags|=oa.e_islandFlag))),b=b.next}b=cc.s_timestep;b.warmStarting=!1;b.dt=(1-f)*a.dt;b.inv_dt=1/b.dt;b.dtRatio=0;b.velocityIterations=a.velocityIterations;b.positionIterations=a.positionIterations;c.solveTOI(b);f=0;for(g=c.m_bodyCount;f<g;)if(b=f++,e=c.m_bodies[b],e.m_flags&=~oa.e_islandFlag,0!=e.isAwake()&&e.getType()==
oa.b2_dynamicBody)for(e.synchronizeFixtures(),b=e.m_contactList;null!=b;)b.contact.m_flags&=~Ta.e_toiFlag,b=b.next;f=0;for(e=c.m_contactCount;f<e;)b=f++,b=c.m_contacts[b],b.m_flags&=~(Ta.e_toiFlag|Ta.e_islandFlag);f=0;for(b=c.m_jointCount;f<b;)e=f++,e=c.m_joints[e],e.m_islandFlag=!1;this.m_contactManager.findNewContacts()}}},drawJoint:function(a){var b=a.getBodyA(),c=a.getBodyB(),d=b.m_xf.position,e=c.m_xf.position,f=a.getAnchorA(),g=a.getAnchorB(),h=cc.s_jointColor;switch(a.m_type){case 3:this.m_debugDraw.drawSegment(f,
g,h);break;case 4:b=U.__cast(a,sg);a=b.getGroundAnchorA();b=b.getGroundAnchorB();this.m_debugDraw.drawSegment(a,f,h);this.m_debugDraw.drawSegment(b,g,h);this.m_debugDraw.drawSegment(a,b,h);break;case 5:this.m_debugDraw.drawSegment(f,g,h);break;default:b!=this.m_groundBody&&this.m_debugDraw.drawSegment(d,f,h),this.m_debugDraw.drawSegment(f,g,h),c!=this.m_groundBody&&this.m_debugDraw.drawSegment(e,g,h)}},drawShape:function(a,b,c){switch(a.m_type){case 0:a=U.__cast(a,Lc);var d=O.mulX(b,a.m_p);this.m_debugDraw.drawSolidCircle(d,
a.m_radius,b.R.col1,c);break;case 1:d=U.__cast(a,Db);a=d.getVertexCount();for(var e=d.getVertices(),f=[],g=0;g<a;)d=g++,f[d]=O.mulX(b,e[d]);this.m_debugDraw.drawSolidPolygon(f,a,c);break;case 2:a=U.__cast(a,rg),this.m_debugDraw.drawSegment(O.mulX(b,a.getVertex1()),O.mulX(b,a.getVertex2()),c)}},m_aabb:null,setScreenBounds:function(a){this.m_aabb=a},getScreenBounds:function(){return this.m_aabb},m_flags:null,m_contactManager:null,m_contactSolver:null,m_island:null,m_bodyList:null,m_jointList:null,m_contactList:null,
m_bodyCount:null,m_contactCount:null,m_jointCount:null,m_controllerList:null,m_controllerCount:null,m_gravity:null,m_allowSleep:null,m_groundBody:null,m_destructionListener:null,m_debugDraw:null,m_inv_dt0:null,aabbQueryCallback:null,shapeQueryCallback:null,pointQueryCallback:null,__class__:cc};var zk=function(){};k["box2D.dynamics.AABBQueryCallback"]=zk;zk.__name__="box2D.dynamics.AABBQueryCallback";zk.__interfaces__=[pf];zk.prototype={broadPhase:null,callbackMethod:null,queryCallback:function(a){return this.callbackMethod(this.broadPhase.getUserData(a))},
__class__:zk};var yk=function(){};k["box2D.dynamics.ShapeQueryCallback"]=yk;yk.__name__="box2D.dynamics.ShapeQueryCallback";yk.__interfaces__=[pf];yk.prototype={broadPhase:null,shape:null,transform:null,callbackMethod:null,queryCallback:function(a){a=this.broadPhase.getUserData(a);return Wb.testOverlap(this.shape,this.transform,a.getShape(),a.getBody().getTransform())?this.callbackMethod(a):!0},__class__:yk};var xk=function(){};k["box2D.dynamics.PointQueryCallback"]=xk;xk.__name__="box2D.dynamics.PointQueryCallback";
xk.__interfaces__=[pf];xk.prototype={broadPhase:null,callbackMethod:null,p:null,queryCallback:function(a){a=this.broadPhase.getUserData(a);return a.testPoint(this.p)?this.callbackMethod(a):!0},__class__:xk};var Ta=function(){this.m_nodeA=new Ak;this.m_nodeB=new Ak;this.m_manifold=new eh;this.m_oldManifold=new eh};k["box2D.dynamics.contacts.B2Contact"]=Ta;Ta.__name__="box2D.dynamics.contacts.B2Contact";Ta.prototype={getManifold:function(){return this.m_manifold},getWorldManifold:function(a){var b=
this.m_fixtureA.getBody(),c=this.m_fixtureB.getBody(),d=this.m_fixtureA.getShape(),e=this.m_fixtureB.getShape();a.initialize(this.m_manifold,b.getTransform(),d.m_radius,c.getTransform(),e.m_radius)},isTouching:function(){return(this.m_flags&Ta.e_touchingFlag)==Ta.e_touchingFlag},isContinuous:function(){return(this.m_flags&Ta.e_continuousFlag)==Ta.e_continuousFlag},setSensor:function(a){this.m_flags=a?this.m_flags|Ta.e_sensorFlag:this.m_flags&~Ta.e_sensorFlag},isSensor:function(){return(this.m_flags&
Ta.e_sensorFlag)==Ta.e_sensorFlag},setEnabled:function(a){this.m_flags=a?this.m_flags|Ta.e_enabledFlag:this.m_flags&~Ta.e_enabledFlag},isEnabled:function(){return(this.m_flags&Ta.e_enabledFlag)==Ta.e_enabledFlag},getNext:function(){return this.m_next},getFixtureA:function(){return this.m_fixtureA},getFixtureB:function(){return this.m_fixtureB},flagForFiltering:function(){this.m_flags|=Ta.e_filterFlag},reset:function(a,b){this.m_flags=Ta.e_enabledFlag;if(null==a||null==b)this.m_fixtureB=this.m_fixtureA=
null;else{if(a.isSensor()||b.isSensor())this.m_flags|=Ta.e_sensorFlag;var c=a.getBody(),d=b.getBody();if(c.getType()!=oa.b2_dynamicBody||c.isBullet()||d.getType()!=oa.b2_dynamicBody||d.isBullet())this.m_flags|=Ta.e_continuousFlag;this.m_fixtureA=a;this.m_fixtureB=b;this.m_manifold.m_pointCount=0;this.m_next=this.m_prev=null;this.m_nodeA.contact=null;this.m_nodeA.prev=null;this.m_nodeA.next=null;this.m_nodeA.other=null;this.m_nodeB.contact=null;this.m_nodeB.prev=null;this.m_nodeB.next=null;this.m_nodeB.other=
null}},update:function(a){var b=this.m_oldManifold;this.m_oldManifold=this.m_manifold;this.m_manifold=b;this.m_flags|=Ta.e_enabledFlag;var c=!1;b=(this.m_flags&Ta.e_touchingFlag)==Ta.e_touchingFlag;var d=this.m_fixtureA.m_body,e=this.m_fixtureB.m_body,f=this.m_fixtureA.m_aabb.testOverlap(this.m_fixtureB.m_aabb);if(0!=(this.m_flags&Ta.e_sensorFlag))f&&(c=this.m_fixtureA.getShape(),f=this.m_fixtureB.getShape(),d=d.getTransform(),e=e.getTransform(),c=Wb.testOverlap(c,d,f,e)),this.m_manifold.m_pointCount=
0;else{d.getType()!=oa.b2_dynamicBody||d.isBullet()||e.getType()!=oa.b2_dynamicBody||e.isBullet()?this.m_flags|=Ta.e_continuousFlag:this.m_flags&=~Ta.e_continuousFlag;if(f){this.evaluate();c=0<this.m_manifold.m_pointCount;f=0;for(var g=this.m_manifold.m_pointCount;f<g;){var h=f++;h=this.m_manifold.m_points[h];h.m_normalImpulse=0;h.m_tangentImpulse=0;for(var m=h.m_id,l=0,L=this.m_oldManifold.m_pointCount;l<L;){var p=l++;p=this.m_oldManifold.m_points[p];if(p.m_id.get_key()==m.get_key()){h.m_normalImpulse=
p.m_normalImpulse;h.m_tangentImpulse=p.m_tangentImpulse;break}}}}else this.m_manifold.m_pointCount=0;c!=b&&(d.setAwake(!0),e.setAwake(!0))}this.m_flags=c?this.m_flags|Ta.e_touchingFlag:this.m_flags&~Ta.e_touchingFlag;0==b&&1==c&&a.beginContact(this);1==b&&0==c&&a.endContact(this);0==(this.m_flags&Ta.e_sensorFlag)&&a.preSolve(this,this.m_oldManifold)},evaluate:function(){},computeTOI:function(a,b){Ta.s_input.proxyA.set(this.m_fixtureA.getShape());Ta.s_input.proxyB.set(this.m_fixtureB.getShape());Ta.s_input.sweepA=
a;Ta.s_input.sweepB=b;Ta.s_input.tolerance=ca.b2_linearSlop;return Ib.timeOfImpact(Ta.s_input)},m_flags:null,m_prev:null,m_next:null,m_nodeA:null,m_nodeB:null,m_fixtureA:null,m_fixtureB:null,m_manifold:null,m_oldManifold:null,m_toi:null,key:null,__class__:Ta};var gh=function(){Ta.call(this)};k["box2D.dynamics.contacts.B2CircleContact"]=gh;gh.__name__="box2D.dynamics.contacts.B2CircleContact";gh.create=function(a){return new gh};gh.destroy=function(a,b){};gh.__super__=Ta;gh.prototype=u(Ta.prototype,
{reset:function(a,b){Ta.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();Sa.collideCircles(this.m_manifold,U.__cast(this.m_fixtureA.getShape(),Lc),a.m_xf,U.__cast(this.m_fixtureB.getShape(),Lc),b.m_xf)},__class__:gh});var Bn=function(){this.localPlaneNormal=new y;this.localPoint=new y;this.normal=new y;this.normalMass=new zc;this.K=new zc;this.points=[];for(var a=0,b=ca.b2_maxManifoldPoints;a<b;){var c=a++;this.points[c]=new An}};k["box2D.dynamics.contacts.B2ContactConstraint"]=
Bn;Bn.__name__="box2D.dynamics.contacts.B2ContactConstraint";Bn.prototype={points:null,localPlaneNormal:null,localPoint:null,normal:null,normalMass:null,K:null,bodyA:null,bodyB:null,type:null,radius:null,friction:null,restitution:null,pointCount:null,manifold:null,__class__:Bn};var An=function(){this.localPoint=new y;this.rA=new y;this.rB=new y};k["box2D.dynamics.contacts.B2ContactConstraintPoint"]=An;An.__name__="box2D.dynamics.contacts.B2ContactConstraintPoint";An.prototype={localPoint:null,rA:null,
rB:null,normalImpulse:null,tangentImpulse:null,normalMass:null,tangentMass:null,equalizedMass:null,velocityBias:null,__class__:An};var Ak=function(){};k["box2D.dynamics.contacts.B2ContactEdge"]=Ak;Ak.__name__="box2D.dynamics.contacts.B2ContactEdge";Ak.prototype={other:null,contact:null,prev:null,next:null,__class__:Ak};var zn=function(a){this.m_allocator=a;this.initializeRegisters()};k["box2D.dynamics.contacts.B2ContactFactory"]=zn;zn.__name__="box2D.dynamics.contacts.B2ContactFactory";zn.prototype=
{addType:function(a,b,c,d){this.m_registers[c][d].createFcn=a;this.m_registers[c][d].destroyFcn=b;this.m_registers[c][d].primary=c},initializeRegisters:function(){this.m_registers=[];this.m_registers[0]=[];this.m_registers[0][0]=null;this.m_registers[0][1]=null;this.m_registers[0][2]=null;this.m_registers[1]=[];this.m_registers[1][0]=null;this.m_registers[1][1]=null;this.m_registers[1][2]=null;this.m_registers[2]=[];this.m_registers[2][0]=null;this.m_registers[2][1]=null;this.m_registers[2][2]=null;
null==this.m_registers[0][0]&&(this.m_registers[0][0]=new bg);null==this.m_registers[0][1]&&(this.m_registers[0][1]=new bg,this.m_registers[1][0]=this.m_registers[0][1]);null==this.m_registers[0][2]&&(this.m_registers[0][2]=new bg,this.m_registers[2][0]=this.m_registers[0][2]);null==this.m_registers[1][0]&&(this.m_registers[1][0]=new bg,this.m_registers[0][1]=this.m_registers[1][0]);null==this.m_registers[1][1]&&(this.m_registers[1][1]=new bg);null==this.m_registers[1][2]&&(this.m_registers[1][2]=
new bg,this.m_registers[2][1]=this.m_registers[1][2]);null==this.m_registers[2][0]&&(this.m_registers[2][0]=new bg,this.m_registers[0][2]=this.m_registers[2][0]);null==this.m_registers[2][1]&&(this.m_registers[2][1]=new bg,this.m_registers[1][2]=this.m_registers[2][1]);null==this.m_registers[2][2]&&(this.m_registers[2][2]=new bg);this.addType(gh.create,gh.destroy,0,0);this.addType(hh.create,hh.destroy,1,0);this.addType(ih.create,ih.destroy,1,1);this.addType(Na.create,Na.destroy,2,0);this.addType(G.create,
G.destroy,1,2)},create:function(a,b){var c=a.getType(),d=b.getType();d=this.m_registers[c][d];if(null!=d.pool){var e=d.pool;d.pool=e.m_next;d.poolCount--;d.primary==c?e.reset(a,b):e.reset(b,a);return e}e=d.createFcn;return null!=e?(d.primary==c?(e=e(this.m_allocator),e.reset(a,b)):(e=e(this.m_allocator),e.reset(b,a)),e):null},destroy:function(a){0<a.m_manifold.m_pointCount&&(a.m_fixtureA.m_body.setAwake(!0),a.m_fixtureB.m_body.setAwake(!0));var b=a.m_fixtureA.getType(),c=a.m_fixtureB.getType();b=
this.m_registers[b][c];b.poolCount++;a.m_next=b.pool;b.pool=a;b=b.destroyFcn;b(a,this.m_allocator)},m_registers:null,m_allocator:null,__class__:zn};var bg=function(){};k["box2D.dynamics.contacts.B2ContactRegister"]=bg;bg.__name__="box2D.dynamics.contacts.B2ContactRegister";bg.prototype={createFcn:null,destroyFcn:null,primary:null,pool:null,poolCount:null,__class__:bg};var pj=function(){this.m_normal=new y;this.m_separations=[];this.m_points=[];for(var a=0,b=ca.b2_maxManifoldPoints;a<b;){var c=a++;
this.m_points[c]=new y}};k["box2D.dynamics.contacts.B2PositionSolverManifold"]=pj;pj.__name__="box2D.dynamics.contacts.B2PositionSolverManifold";pj.prototype={initialize:function(a){ca.b2Assert(0<a.pointCount);switch(a.type){case 1:var b=a.bodyA.m_xf.R;var c=a.localPoint;var d=a.bodyA.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);var e=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyB.m_xf.R;c=a.points[0].localPoint;var f=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);b=a.bodyB.m_xf.position.y+
(b.col1.y*c.x+b.col2.y*c.y);var g=f-d;c=b-e;var h=g*g+c*c;h>Number.MIN_VALUE*Number.MIN_VALUE?(h=Math.sqrt(h),this.m_normal.x=g/h,this.m_normal.y=c/h):(this.m_normal.x=1,this.m_normal.y=0);this.m_points[0].x=.5*(d+f);this.m_points[0].y=.5*(e+b);this.m_separations[0]=g*this.m_normal.x+c*this.m_normal.y-a.radius;break;case 2:b=a.bodyA.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=b.col1.x*c.x+b.col2.x*c.y;this.m_normal.y=b.col1.y*c.x+b.col2.y*c.y;b=a.bodyA.m_xf.R;c=a.localPoint;d=a.bodyA.m_xf.position.x+
(b.col1.x*c.x+b.col2.x*c.y);e=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyB.m_xf.R;f=0;for(g=a.pointCount;f<g;){var m=f++;c=a.points[m].localPoint;h=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);c=a.bodyB.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);this.m_separations[m]=(h-d)*this.m_normal.x+(c-e)*this.m_normal.y-a.radius;this.m_points[m].x=h;this.m_points[m].y=c}break;case 4:b=a.bodyB.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=b.col1.x*c.x+b.col2.x*c.y;this.m_normal.y=b.col1.y*
c.x+b.col2.y*c.y;b=a.bodyB.m_xf.R;c=a.localPoint;d=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);e=a.bodyB.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyA.m_xf.R;f=0;for(g=a.pointCount;f<g;)m=f++,c=a.points[m].localPoint,h=a.bodyA.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y),c=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y),this.m_separations[m]=(h-d)*this.m_normal.x+(c-e)*this.m_normal.y-a.radius,m=this.m_points[m],null==c&&(c=0),null==h&&(h=0),m.x=h,m.y=c;this.m_normal.x*=-1;this.m_normal.y*=
-1}},m_normal:null,m_points:null,m_separations:null,__class__:pj};var De=function(){this.m_step=new oj;this.m_constraints=[]};k["box2D.dynamics.contacts.B2ContactSolver"]=De;De.__name__="box2D.dynamics.contacts.B2ContactSolver";De.prototype={initialize:function(a,b,c,d){this.m_step.set(a);this.m_allocator=d;for(this.m_constraintCount=c;this.m_constraints.length<this.m_constraintCount;)this.m_constraints[this.m_constraints.length]=new Bn;for(a=0;a<c;){d=a++;var e=b[d];var f=e.m_fixtureA,g=e.m_fixtureB,
h=f.m_shape.m_radius,m=g.m_shape.m_radius,l=f.m_body,L=g.m_body;e=e.getManifold();var p=ca.b2MixFriction(f.getFriction(),g.getFriction()),n=ca.b2MixRestitution(f.getRestitution(),g.getRestitution()),q=l.m_linearVelocity.x,k=l.m_linearVelocity.y,t=L.m_linearVelocity.x,v=L.m_linearVelocity.y,r=l.m_angularVelocity,S=L.m_angularVelocity;ca.b2Assert(0<e.m_pointCount);De.s_worldManifold.initialize(e,l.m_xf,h,L.m_xf,m);f=De.s_worldManifold.m_normal.x;g=De.s_worldManifold.m_normal.y;d=this.m_constraints[d];
d.bodyA=l;d.bodyB=L;d.manifold=e;d.normal.x=f;d.normal.y=g;d.pointCount=e.m_pointCount;d.friction=p;d.restitution=n;d.localPlaneNormal.x=e.m_localPlaneNormal.x;d.localPlaneNormal.y=e.m_localPlaneNormal.y;d.localPoint.x=e.m_localPoint.x;d.localPoint.y=e.m_localPoint.y;d.radius=h+m;d.type=e.m_type;h=0;for(m=d.pointCount;h<m;){var u=h++,P=e.m_points[u];p=d.points[u];p.normalImpulse=P.m_normalImpulse;p.tangentImpulse=P.m_tangentImpulse;n=p.localPoint;P=P.m_localPoint;n.x=P.x;n.y=P.y;n=p.rA.x=De.s_worldManifold.m_points[u].x-
l.m_sweep.c.x;P=p.rA.y=De.s_worldManifold.m_points[u].y-l.m_sweep.c.y;var C=p.rB.x=De.s_worldManifold.m_points[u].x-L.m_sweep.c.x;u=p.rB.y=De.s_worldManifold.m_points[u].y-L.m_sweep.c.y;var x=n*g-P*f,F=C*g-u*f;x*=x;F*=F;p.normalMass=1/(l.m_invMass+L.m_invMass+l.m_invI*x+L.m_invI*F);var z=l.m_mass*l.m_invMass+L.m_mass*L.m_invMass;z+=l.m_mass*l.m_invI*x+L.m_mass*L.m_invI*F;p.equalizedMass=1/z;F=g;z=-f;x=n*z-P*F;F=C*z-u*F;x*=x;F*=F;p.tangentMass=1/(l.m_invMass+L.m_invMass+l.m_invI*x+L.m_invI*F);p.velocityBias=
0;n=d.normal.x*(t+-S*u-q- -r*P)+d.normal.y*(v+S*C-k-r*n);n<-ca.b2_velocityThreshold&&(p.velocityBias+=-d.restitution*n)}2==d.pointCount&&(v=d.points[0],t=d.points[1],e=l.m_invMass,l=l.m_invI,q=L.m_invMass,L=L.m_invI,k=v.rA.x*g-v.rA.y*f,v=v.rB.x*g-v.rB.y*f,r=t.rA.x*g-t.rA.y*f,t=t.rB.x*g-t.rB.y*f,g=e+q+l*k*k+L*v*v,f=e+q+l*r*r+L*t*t,L=e+q+l*k*r+L*v*t,g*g<100*(g*f-L*L)?(l=d.K.col1,e=L,null==e&&(e=0),null==g&&(g=0),l.x=g,l.y=e,g=d.K.col2,null==f&&(f=0),null==L&&(L=0),g.x=L,g.y=f,d.K.getInverse(d.normalMass)):
d.pointCount=1)}},initVelocityConstraints:function(a){for(var b=0,c=this.m_constraintCount;b<c;){var d=b++;d=this.m_constraints[d];var e=d.bodyA,f=d.bodyB,g=e.m_invMass,h=e.m_invI,m=f.m_invMass,l=f.m_invI,L=d.normal.x,p=d.normal.y,n=p,q=-L;if(a.warmStarting){var k=d.pointCount;for(var t=0;t<k;){var v=t++;v=d.points[v];v.normalImpulse*=a.dtRatio;v.tangentImpulse*=a.dtRatio;var r=v.normalImpulse*L+v.tangentImpulse*n,S=v.normalImpulse*p+v.tangentImpulse*q;e.m_angularVelocity-=h*(v.rA.x*S-v.rA.y*r);e.m_linearVelocity.x-=
g*r;e.m_linearVelocity.y-=g*S;f.m_angularVelocity+=l*(v.rB.x*S-v.rB.y*r);f.m_linearVelocity.x+=m*r;f.m_linearVelocity.y+=m*S}}else for(k=d.pointCount,e=0,f=k;e<f;)g=e++,g=d.points[g],g.normalImpulse=0,g.tangentImpulse=0}},solveVelocityConstraints:function(){for(var a,b,c,d,e,f,g,h,m,l,L=0,p=this.m_constraintCount;L<p;){var n=L++;d=this.m_constraints[n];n=d.bodyA;var q=d.bodyB,k=n.m_angularVelocity,t=q.m_angularVelocity,v=n.m_linearVelocity,r=q.m_linearVelocity,S=n.m_invMass,u=n.m_invI,P=q.m_invMass,
C=q.m_invI;h=d.normal.x;var x=m=d.normal.y,F=-h;l=d.friction;g=0;for(f=d.pointCount;g<f;)a=g++,a=d.points[a],b=r.x-t*a.rB.y-v.x+k*a.rA.y,c=r.y+t*a.rB.x-v.y-k*a.rA.x,b=b*x+c*F,b=a.tangentMass*-b,c=l*a.normalImpulse,c=O.clamp(a.tangentImpulse+b,-c,c),b=c-a.tangentImpulse,e=b*x,b*=F,v.x-=S*e,v.y-=S*b,k-=u*(a.rA.x*b-a.rA.y*e),r.x+=P*e,r.y+=P*b,t+=C*(a.rB.x*b-a.rB.y*e),a.tangentImpulse=c;if(1==d.pointCount)a=d.points[0],b=r.x+-t*a.rB.y-v.x- -k*a.rA.y,c=r.y+t*a.rB.x-v.y-k*a.rA.x,d=b*h+c*m,b=-a.normalMass*
(d-a.velocityBias),c=a.normalImpulse+b,0<c||(c=0),b=c-a.normalImpulse,e=b*h,b*=m,v.x-=S*e,v.y-=S*b,k-=u*(a.rA.x*b-a.rA.y*e),r.x+=P*e,r.y+=P*b,t+=C*(a.rB.x*b-a.rB.y*e),a.normalImpulse=c;else{a=d.points[0];x=d.points[1];f=a.normalImpulse;g=x.normalImpulse;e=(r.x-t*a.rB.y-v.x+k*a.rA.y)*h+(r.y+t*a.rB.x-v.y-k*a.rA.x)*m;var z=(r.x-t*x.rB.y-v.x+k*x.rA.y)*h+(r.y+t*x.rB.x-v.y-k*x.rA.x)*m;b=e-a.velocityBias;c=z-x.velocityBias;l=d.K;b-=l.col1.x*f+l.col2.x*g;for(c-=l.col1.y*f+l.col2.y*g;;){l=d.normalMass;F=-(l.col1.x*
b+l.col2.x*c);l=-(l.col1.y*b+l.col2.y*c);if(0<=F&&0<=l){f=F-f;g=l-g;d=f*h;f*=m;h*=g;m*=g;v.x-=S*(d+h);v.y-=S*(f+m);k-=u*(a.rA.x*f-a.rA.y*d+x.rA.x*m-x.rA.y*h);r.x+=P*(d+h);r.y+=P*(f+m);t+=C*(a.rB.x*f-a.rB.y*d+x.rB.x*m-x.rB.y*h);a.normalImpulse=F;x.normalImpulse=l;break}F=-a.normalMass*b;l=0;z=d.K.col1.y*F+c;if(0<=F&&0<=z){f=F-f;g=l-g;d=f*h;f*=m;h*=g;m*=g;v.x-=S*(d+h);v.y-=S*(f+m);k-=u*(a.rA.x*f-a.rA.y*d+x.rA.x*m-x.rA.y*h);r.x+=P*(d+h);r.y+=P*(f+m);t+=C*(a.rB.x*f-a.rB.y*d+x.rB.x*m-x.rB.y*h);a.normalImpulse=
F;x.normalImpulse=l;break}F=0;l=-x.normalMass*c;e=d.K.col2.x*l+b;if(0<=l&&0<=e){f=F-f;g=l-g;d=f*h;f*=m;h*=g;m*=g;v.x-=S*(d+h);v.y-=S*(f+m);k-=u*(a.rA.x*f-a.rA.y*d+x.rA.x*m-x.rA.y*h);r.x+=P*(d+h);r.y+=P*(f+m);t+=C*(a.rB.x*f-a.rB.y*d+x.rB.x*m-x.rB.y*h);a.normalImpulse=F;x.normalImpulse=l;break}l=F=0;e=b;z=c;if(0<=e&&0<=z){f=F-f;g=l-g;d=f*h;f*=m;h*=g;m*=g;v.x-=S*(d+h);v.y-=S*(f+m);k-=u*(a.rA.x*f-a.rA.y*d+x.rA.x*m-x.rA.y*h);r.x+=P*(d+h);r.y+=P*(f+m);t+=C*(a.rB.x*f-a.rB.y*d+x.rB.x*m-x.rB.y*h);a.normalImpulse=
F;x.normalImpulse=l;break}break}}n.m_angularVelocity=k;q.m_angularVelocity=t}},finalizeVelocityConstraints:function(){for(var a=0,b=this.m_constraintCount;a<b;){var c=a++;c=this.m_constraints[c];for(var d=c.manifold,e=0,f=c.pointCount;e<f;){var g=e++,h=d.m_points[g];g=c.points[g];h.m_normalImpulse=g.normalImpulse;h.m_tangentImpulse=g.tangentImpulse}}},solvePositionConstraints:function(a){for(var b=0,c=0,d=this.m_constraintCount;c<d;){var e=c++;e=this.m_constraints[e];var f=e.bodyA,g=e.bodyB,h=f.m_mass*
f.m_invMass,m=f.m_mass*f.m_invI,l=g.m_mass*g.m_invMass,L=g.m_mass*g.m_invI;De.s_psm.initialize(e);for(var p=De.s_psm.m_normal,n=0,q=e.pointCount;n<q;){var k=n++,t=e.points[k],v=De.s_psm.m_points[k],r=De.s_psm.m_separations[k];k=v.x-f.m_sweep.c.x;var S=v.y-f.m_sweep.c.y,u=v.x-g.m_sweep.c.x;v=v.y-g.m_sweep.c.y;b<r||(b=r);r=O.clamp(a*(r+ca.b2_linearSlop),-ca.b2_maxLinearCorrection,0);r*=-t.equalizedMass;t=r*p.x;r*=p.y;f.m_sweep.c.x-=h*t;f.m_sweep.c.y-=h*r;f.m_sweep.a-=m*(k*r-S*t);f.synchronizeTransform();
g.m_sweep.c.x+=l*t;g.m_sweep.c.y+=l*r;g.m_sweep.a+=L*(u*r-v*t);g.synchronizeTransform()}}return b>-1.5*ca.b2_linearSlop},m_step:null,m_allocator:null,m_constraints:null,m_constraintCount:null,__class__:De};var Na=function(){Ta.call(this)};k["box2D.dynamics.contacts.B2EdgeAndCircleContact"]=Na;Na.__name__="box2D.dynamics.contacts.B2EdgeAndCircleContact";Na.create=function(a){return new Na};Na.destroy=function(a,b){};Na.__super__=Ta;Na.prototype=u(Ta.prototype,{m_v0:null,m_v1:null,m_v2:null,m_v3:null,
reset:function(a,b){Ta.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();this.b2CollideEdgeAndCircle(this.m_manifold,U.__cast(this.m_fixtureA.getShape(),rg),a.m_xf,U.__cast(this.m_fixtureB.getShape(),Lc),b.m_xf)},b2CollideEdgeAndCircle:function(a,b,c,d,e){a.m_pointCount=0;this.multiplyTransformVector(e,d.m_p,Na.temp1);e=Na.q;var f=O.mulXT(c,Na.temp1);e.x=f.x;e.y=f.y;this.m_v0=b.m_v0;this.m_v1=b.m_v1;this.m_v2=b.m_v2;this.m_v3=b.m_v3;e=
Na.e;f=this.m_v2.x-this.m_v1.x;var g=this.m_v2.y-this.m_v1.y;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=Na.temp1;f=this.m_v2.x-Na.q.x;g=this.m_v2.y-Na.q.y;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;var h=O.dot(Na.e,Na.temp1);e=Na.temp1;f=Na.q.x-this.m_v1.x;g=Na.q.y-this.m_v1.y;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;f=O.dot(Na.e,Na.temp1);c=b.m_radius+d.m_radius;if(0>=f){if(e=Na.p,h=this.m_v1,e.x=h.x,e.y=h.y,e=Na.temp1,f=Na.q.x-Na.p.x,g=Na.q.y-Na.p.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,e=
O.dot(Na.temp1,Na.temp1),!(e>c*c)){if(b.m_hasVertex0&&(e=Na.temp1,f=this.m_v1.x-this.m_v0.x,g=this.m_v1.y-this.m_v0.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,e=Na.temp2,f=this.m_v1.x-Na.q.x,g=this.m_v1.y-Na.q.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,0<O.dot(Na.temp1,Na.temp2)))return;a.m_pointCount=1;a.m_type=1;e=a.m_localPlaneNormal;e.x=0;e.y=0;e=a.m_localPoint;h=Na.p;e.x=h.x;e.y=h.y;a.m_points[0].m_id.set_key(0);a.m_points[0].m_id.indexA=0;a.m_points[0].m_id.indexB=0;a.m_points[0].m_id.typeA=
lc.VERTEX;a.m_points[0].m_id.typeB=lc.VERTEX;e=a.m_points[0].m_localPoint;h=d.m_p;e.x=h.x;e.y=h.y}}else if(0>=h){if(e=Na.p,h=this.m_v2,e.x=h.x,e.y=h.y,e=Na.temp1,f=Na.q.x-Na.p.x,g=Na.q.y-Na.p.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,e=O.dot(Na.temp1,Na.temp1),!(e>c*c)){if(b.m_hasVertex3&&(e=Na.temp1,f=this.m_v3.x-this.m_v2.x,g=this.m_v3.y-this.m_v2.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,e=Na.temp2,f=Na.q.x-this.m_v2.x,g=Na.q.y-this.m_v2.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,0<O.dot(Na.temp1,
Na.temp2)))return;a.m_pointCount=1;a.m_type=1;e=a.m_localPlaneNormal;e.x=0;e.y=0;e=a.m_localPoint;h=Na.p;e.x=h.x;e.y=h.y;a.m_points[0].m_id.set_key(0);a.m_points[0].m_id.indexA=1;a.m_points[0].m_id.indexB=0;a.m_points[0].m_id.typeA=lc.VERTEX;a.m_points[0].m_id.typeB=lc.VERTEX;e=a.m_points[0].m_localPoint;h=d.m_p;e.x=h.x;e.y=h.y}}else b=O.dot(Na.e,Na.e),ca.b2Assert(0<b),Na.p.x=1/b*(this.m_v1.x*h+this.m_v2.x*f),Na.p.y=1/b*(this.m_v1.y*h+this.m_v2.y*f),Na.temp1.x=Na.q.x-Na.p.x,Na.temp1.y=Na.q.y-Na.p.y,
e=O.dot(Na.temp1,Na.temp1),e>c*c||(e=Na.temp1,f=-Na.e.y,g=Na.e.x,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,e=Na.temp2,f=Na.q.x-this.m_v1.x,g=Na.q.y-this.m_v1.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,0>O.dot(Na.temp1,Na.temp2)&&(e=Na.temp1,e.x=-e.x,e.y=-e.y),Na.temp1.normalize(),a.m_pointCount=1,a.m_type=2,e=a.m_localPlaneNormal,f=Na.temp1,e.x=f.x,e.y=f.y,e=a.m_localPoint,f=this.m_v1,e.x=f.x,e.y=f.y,a.m_points[0].m_id.set_key(0),a.m_points[0].m_id.indexA=0,a.m_points[0].m_id.indexB=0,a.m_points[0].m_id.typeA=
lc.FACE,a.m_points[0].m_id.typeB=lc.VERTEX,e=a.m_points[0].m_localPoint,f=d.m_p,e.x=f.x,e.y=f.y)},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,Na.mat);var d=Na.temp2;b=b.position;d.x=b.x;d.y=b.y;Na.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,Na.temp2,c.position);d=c.R.col1;b=Na.mat.col1;d.x=b.x;d.y=b.y;d=c.R.col2;b=Na.mat.col2;d.x=b.x;d.y=b.y},multiplyRotationsInverse:function(a,b,c){c.col1.x=a.col1.x*b.col1.x+a.col1.y*b.col1.y;c.col1.y=a.col2.x*
b.col1.x+a.col2.y*b.col1.y;c.col2.x=a.col1.x*b.col2.x+a.col1.y*b.col2.y;c.col2.y=a.col2.x*b.col2.x+a.col2.y*b.col2.y},multiplyRotationVector:function(a,b,c){c.x=a.col1.x*b.x+a.col2.x*b.y;c.y=a.col1.y*b.x+a.col2.y*b.y},multiplyRotationVectorInverse:function(a,b,c){c.x=a.col1.x*b.x+a.col1.y*b.y;c.y=a.col2.x*b.x+a.col2.y*b.y},multiplyTransformVector:function(a,b,c){c.x=a.R.col1.x*b.x+a.R.col2.x*b.y+a.position.x;c.y=a.R.col1.y*b.x+a.R.col2.y*b.y+a.position.y},__class__:Na});var hh=function(){Ta.call(this)};
k["box2D.dynamics.contacts.B2PolyAndCircleContact"]=hh;hh.__name__="box2D.dynamics.contacts.B2PolyAndCircleContact";hh.create=function(a){return new hh};hh.destroy=function(a,b){};hh.__super__=Ta;hh.prototype=u(Ta.prototype,{reset:function(a,b){Ta.prototype.reset.call(this,a,b);ca.b2Assert(1==a.getType());ca.b2Assert(0==b.getType())},evaluate:function(){var a=this.m_fixtureA.m_body,b=this.m_fixtureB.m_body;Sa.collidePolygonAndCircle(this.m_manifold,U.__cast(this.m_fixtureA.getShape(),Db),a.m_xf,U.__cast(this.m_fixtureB.getShape(),
Lc),b.m_xf)},__class__:hh});var jh=function(){this.v=new y;this.id=new lc};k["box2D.dynamics.contacts.ClipVertex"]=jh;jh.__name__="box2D.dynamics.contacts.ClipVertex";jh.prototype={v:null,id:null,set:function(a){var b=this.v,c=a.v;b.x=c.x;b.y=c.y;this.id.set(a.id)},__class__:jh};var Bk=function(){};k["box2D.dynamics.contacts.EPAxis"]=Bk;Bk.__name__="box2D.dynamics.contacts.EPAxis";Bk.prototype={type:null,index:null,separation:null,__class__:Bk};var Cn=function(){this.vertices=[];this.normals=[];for(var a=
0;32>a;)a++,this.vertices.push(new y),this.normals.push(new y)};k["box2D.dynamics.contacts.TempPolygon"]=Cn;Cn.__name__="box2D.dynamics.contacts.TempPolygon";Cn.prototype={vertices:null,normals:null,count:null,__class__:Cn};var Dn=function(){this.v1=new y;this.v2=new y;this.normal=new y;this.sideNormal1=new y;this.sideNormal2=new y};k["box2D.dynamics.contacts.ReferenceFace"]=Dn;Dn.__name__="box2D.dynamics.contacts.ReferenceFace";Dn.prototype={i1:null,i2:null,v1:null,v2:null,normal:null,sideNormal1:null,
sideNormal2:null,sideOffset1:null,sideOffset2:null,__class__:Dn};var G=function(){Ta.call(this)};k["box2D.dynamics.contacts.B2PolyAndEdgeContact"]=G;G.__name__="box2D.dynamics.contacts.B2PolyAndEdgeContact";G.create=function(a){return new G};G.destroy=function(a,b){};G.clipSegmentToLine=function(a,b,c,d,e){var f=0,g=O.dot(c,b[0].v)-d;c=O.dot(c,b[1].v)-d;0>=g&&a[f++].set(b[0]);0>=c&&a[f++].set(b[1]);0>g*c&&(g/=g-c,c=a[f].v,d=b[1].v,c.x=d.x,c.y=d.y,a[f].v.subtract(b[0].v),a[f].v.multiply(g),a[f].v.add(b[0].v),
a[f].id.indexA=e,a[f].id.indexB=b[0].id.indexB,a[f].id.typeA=lc.VERTEX,a[f].id.typeB=lc.FACE,++f);return f};G.__super__=Ta;G.prototype=u(Ta.prototype,{m_v0:null,m_v1:null,m_v2:null,m_v3:null,m_front:null,m_radius:null,reset:function(a,b){a.getShape()instanceof Db?(Ta.prototype.reset.call(this,b,a),ca.b2Assert(1==a.getType()),ca.b2Assert(2==b.getType())):(Ta.prototype.reset.call(this,a,b),ca.b2Assert(2==a.getType()),ca.b2Assert(1==b.getType()))},evaluate:function(){var a=this.m_fixtureA.getBody(),
b=this.m_fixtureB.getBody();this.b2CollidePolyAndEdge(this.m_manifold,U.__cast(this.m_fixtureA.getShape(),rg),a.m_xf,U.__cast(this.m_fixtureB.getShape(),Db),b.m_xf)},b2CollidePolyAndEdge:function(a,b,c,d,e){this.multiplyTransformsInverse(c,e,G.m_xf);this.multiplyTransformVector(G.m_xf,d.m_centroid,G.temp);e=G.m_centroidB;var f=G.temp;e.x=f.x;e.y=f.y;this.m_v0=b.m_v0;this.m_v1=b.m_v1;this.m_v2=b.m_v2;this.m_v3=b.m_v3;c=b.m_hasVertex0;b=b.m_hasVertex3;e=G.edge1;f=this.m_v2;e.x=f.x;e.y=f.y;G.edge1.subtract(this.m_v1);
G.edge1.normalize();e=G.m_normal1;f=G.edge1.y;var g=-G.edge1.x;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=G.temp;f=G.m_centroidB;e.x=f.x;e.y=f.y;G.temp.subtract(this.m_v1);var h=O.dot(G.m_normal1,G.temp),m=0,l=0,L=!1,p=!1;c&&(e=G.edge0,f=this.m_v1,e.x=f.x,e.y=f.y,G.edge0.subtract(this.m_v0),G.edge0.normalize(),e=G.m_normal0,f=G.edge0.y,g=-G.edge0.x,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,L=0<=O.crossVV(G.edge0,G.edge1),e=G.temp,f=G.m_centroidB,e.x=f.x,e.y=f.y,G.temp.subtract(this.m_v0),m=O.dot(G.m_normal0,
G.temp));b&&(e=G.edge2,f=this.m_v3,e.x=f.x,e.y=f.y,G.edge2.subtract(this.m_v2),G.edge2.normalize(),e=G.m_normal2,f=G.edge2.y,g=-G.edge2.x,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,p=0<O.crossVV(G.edge1,G.edge2),e=G.temp,f=G.m_centroidB,e.x=f.x,e.y=f.y,G.temp.subtract(this.m_v2),l=O.dot(G.m_normal2,G.temp));c&&b?L&&p?(this.m_front=0<=m||0<=h||0<=l)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal0,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal2,e.x=f.x,e.y=f.y):(e=G.m_normal,
f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):L?(this.m_front=0<=m||0<=h&&0<=l)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal0,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal2,
e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):p?(this.m_front=0<=l||0<=m&&0<=h)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal2,e.x=f.x,e.y=f.y):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal0,e.x=f.x,
e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):(this.m_front=0<=m&&0<=h&&0<=l)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal2,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal0,e.x=f.x,e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):c?(L?((this.m_front=0<=m||0<=h)?(e=G.m_normal,
f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal0):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1),e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal1):(this.m_front=0<=m&&0<=h)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal1):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,
f=G.m_normal0),e.x=f.x,e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):b?(p?(this.m_front=0<=h||0<=l)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal2):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal1):((this.m_front=0<=h&&0<=l)?(e=G.m_normal,f=G.m_normal1,e.x=
f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1):(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal2),e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal1),e.x=f.x,e.y=f.y):(this.m_front=0<=h)?(e=G.m_normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_lowerLimit,e.x=-e.x,e.y=-e.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,e.x=-e.x,e.y=-e.y):(e=G.m_normal,f=G.m_normal1,
e.x=f.x,e.y=f.y,e=G.m_normal,e.x=-e.x,e.y=-e.y,e=G.m_lowerLimit,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.m_upperLimit,f=G.m_normal1,e.x=f.x,e.y=f.y);G.m_polygonB.count=d.m_vertexCount;b=0;for(g=d.m_vertexCount;b<g;)h=b++,this.multiplyTransformVector(G.m_xf,d.m_vertices[h],G.temp),e=G.m_polygonB.vertices[h],f=G.temp,e.x=f.x,e.y=f.y,this.multiplyRotationVector(G.m_xf.R,d.m_normals[h],G.temp),f=G.m_polygonB.normals[h],m=G.temp,f.x=m.x,f.y=m.y;this.m_radius=2*ca.b2_polygonRadius;a.m_pointCount=0;this.computeEdgeSeparation(G.edgeAxis);
if(!(G.edgeAxis.type==If.UNKNOWN||G.edgeAxis.separation>this.m_radius||(this.computePolygonSeparation(G.polygonAxis),G.polygonAxis.type!=If.UNKNOWN&&G.polygonAxis.separation>this.m_radius))){c=G.polygonAxis.type==If.UNKNOWN?G.edgeAxis:G.polygonAxis.separation>.98*G.edgeAxis.separation+.001?G.polygonAxis:G.edgeAxis;if(c.type==If.EDGE_A){a.m_type=2;e=0;f=O.dot(G.m_normal,G.m_polygonB.normals[0]);b=1;for(g=G.m_polygonB.count;b<g;)h=b++,m=O.dot(G.m_normal,G.m_polygonB.normals[h]),m<f&&(f=m,e=h);b=e;g=
b+1<G.m_polygonB.count?b+1:0;e=G.ie[0].v;f=G.m_polygonB.vertices[b];e.x=f.x;e.y=f.y;G.ie[0].id.indexA=0;G.ie[0].id.indexB=b;G.ie[0].id.typeA=lc.FACE;G.ie[0].id.typeB=lc.VERTEX;e=G.ie[1].v;f=G.m_polygonB.vertices[g];e.x=f.x;e.y=f.y;G.ie[1].id.indexA=0;G.ie[1].id.indexB=g;G.ie[1].id.typeA=lc.FACE;G.ie[1].id.typeB=lc.VERTEX;this.m_front?(G.rf.i1=0,G.rf.i2=1,e=G.rf.v1,f=this.m_v1,e.x=f.x,e.y=f.y,e=G.rf.v2,f=this.m_v2,e.x=f.x,e.y=f.y,e=G.rf.normal,f=G.m_normal1,e.x=f.x,e.y=f.y):(G.rf.i1=1,G.rf.i2=0,e=
G.rf.v1,f=this.m_v2,e.x=f.x,e.y=f.y,e=G.rf.v2,f=this.m_v1,e.x=f.x,e.y=f.y,e=G.rf.normal,f=G.m_normal1,e.x=f.x,e.y=f.y,e=G.rf.normal,e.x=-e.x,e.y=-e.y)}else a.m_type=4,e=G.ie[0].v,f=this.m_v1,e.x=f.x,e.y=f.y,G.ie[0].id.indexA=0,G.ie[0].id.indexB=c.index,G.ie[0].id.typeA=lc.VERTEX,G.ie[0].id.typeB=lc.FACE,e=G.ie[1].v,f=this.m_v2,e.x=f.x,e.y=f.y,G.ie[1].id.indexA=0,G.ie[1].id.indexB=c.index,G.ie[1].id.typeA=lc.VERTEX,G.ie[1].id.typeB=lc.FACE,G.rf.i1=c.index,G.rf.i2=G.rf.i1+1<G.m_polygonB.count?G.rf.i1+
1:0,e=G.rf.v1,f=G.m_polygonB.vertices[G.rf.i1],e.x=f.x,e.y=f.y,e=G.rf.v2,f=G.m_polygonB.vertices[G.rf.i2],e.x=f.x,e.y=f.y,e=G.rf.normal,f=G.m_polygonB.normals[G.rf.i1],e.x=f.x,e.y=f.y;e=G.rf.sideNormal1;f=G.rf.normal.y;g=-G.rf.normal.x;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=G.rf.sideNormal2;f=G.rf.sideNormal1;e.x=f.x;e.y=f.y;e=G.rf.sideNormal2;e.x=-e.x;e.y=-e.y;G.rf.sideOffset1=O.dot(G.rf.sideNormal1,G.rf.v1);G.rf.sideOffset2=O.dot(G.rf.sideNormal2,G.rf.v2);e=G.clipSegmentToLine(G.clipPoints1,
G.ie,G.rf.sideNormal1,G.rf.sideOffset1,G.rf.i1);if(!(e<ca.b2_maxManifoldPoints||(e=G.clipSegmentToLine(G.clipPoints2,G.clipPoints1,G.rf.sideNormal2,G.rf.sideOffset2,G.rf.i2),e<ca.b2_maxManifoldPoints))){c.type==If.EDGE_A?(e=a.m_localPlaneNormal,f=G.rf.normal,e.x=f.x,e.y=f.y,e=a.m_localPoint,f=G.rf.v1):(e=a.m_localPlaneNormal,f=d.m_normals[G.rf.i1],e.x=f.x,e.y=f.y,e=a.m_localPoint,f=d.m_vertices[G.rf.i1]);e.x=f.x;e.y=f.y;b=d=0;for(g=ca.b2_maxManifoldPoints;b<g;)h=b++,e=G.temp,f=G.clipPoints2[h].v,
e.x=f.x,e.y=f.y,G.temp.subtract(G.rf.v1),O.dot(G.rf.normal,G.temp)<=this.m_radius&&(e=a.m_points[d],c.type==If.EDGE_A?(f=e.m_localPoint,m=O.mulXT(G.m_xf,G.clipPoints2[h].v),f.x=m.x,f.y=m.y,e.m_id.set(G.clipPoints2[h].id)):(f=e.m_localPoint,m=G.clipPoints2[h].v,f.x=m.x,f.y=m.y,e.m_id.typeA=G.clipPoints2[h].id.typeB,e.m_id.typeB=G.clipPoints2[h].id.typeA,e.m_id.indexA=G.clipPoints2[h].id.indexB,e.m_id.indexB=G.clipPoints2[h].id.indexA),++d);a.m_pointCount=d}}},computeEdgeSeparation:function(a){a.type=
If.EDGE_A;a.index=this.m_front?0:1;a.separation=Number.MAX_VALUE;for(var b=0,c=G.m_polygonB.count;b<c;){var d=b++,e=G.temp;d=G.m_polygonB.vertices[d];e.x=d.x;e.y=d.y;G.temp.subtract(this.m_v1);e=O.dot(G.m_normal,G.temp);e<a.separation&&(a.separation=e)}},computePolygonSeparation:function(a){a.type=If.UNKNOWN;a.index=-1;a.separation=-Number.MAX_VALUE;var b=G.perp,c=-G.m_normal.y,d=G.m_normal.x;null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;c=0;for(d=G.m_polygonB.count;c<d;){var e=c++;b=G.n;var f=G.m_polygonB.normals[e];
b.x=f.x;b.y=f.y;b=G.n;b.x=-b.x;b.y=-b.y;b=G.temp;f=G.m_polygonB.vertices[e];b.x=f.x;b.y=f.y;G.temp.subtract(this.m_v1);b=O.dot(G.n,G.temp);f=G.temp;var g=G.m_polygonB.vertices[e];f.x=g.x;f.y=g.y;G.temp.subtract(this.m_v2);f=O.dot(G.n,G.temp);b=Math.min(b,f);if(b>this.m_radius){a.type=If.EDGE_B;a.index=e;a.separation=b;break}0<=O.dot(G.n,G.perp)?(f=G.temp,g=G.n,f.x=g.x,f.y=g.y,G.temp.subtract(G.m_upperLimit)):(f=G.temp,g=G.n,f.x=g.x,f.y=g.y,G.temp.subtract(G.m_lowerLimit));!(O.dot(G.temp,G.m_normal)<
-ca.b2_angularSlop)&&b>a.separation&&(a.type=If.EDGE_B,a.index=e,a.separation=b)}},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,G.mat);var d=G.temp2;b=b.position;d.x=b.x;d.y=b.y;G.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,G.temp2,c.position);d=c.R.col1;b=G.mat.col1;d.x=b.x;d.y=b.y;d=c.R.col2;b=G.mat.col2;d.x=b.x;d.y=b.y},multiplyRotationsInverse:function(a,b,c){c.col1.x=a.col1.x*b.col1.x+a.col1.y*b.col1.y;c.col1.y=a.col2.x*b.col1.x+a.col2.y*
b.col1.y;c.col2.x=a.col1.x*b.col2.x+a.col1.y*b.col2.y;c.col2.y=a.col2.x*b.col2.x+a.col2.y*b.col2.y},multiplyRotationVector:function(a,b,c){c.x=a.col1.x*b.x+a.col2.x*b.y;c.y=a.col1.y*b.x+a.col2.y*b.y},multiplyRotationVectorInverse:function(a,b,c){c.x=a.col1.x*b.x+a.col1.y*b.y;c.y=a.col2.x*b.x+a.col2.y*b.y},multiplyTransformVector:function(a,b,c){c.x=a.R.col1.x*b.x+a.R.col2.x*b.y+a.position.x;c.y=a.R.col1.y*b.x+a.R.col2.y*b.y+a.position.y},__class__:G});var If=x["box2D.dynamics.contacts.Type"]={__ename__:"box2D.dynamics.contacts.Type",
__constructs__:null,UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:0,__enum__:"box2D.dynamics.contacts.Type",toString:v},EDGE_A:{_hx_name:"EDGE_A",_hx_index:1,__enum__:"box2D.dynamics.contacts.Type",toString:v},EDGE_B:{_hx_name:"EDGE_B",_hx_index:2,__enum__:"box2D.dynamics.contacts.Type",toString:v}};If.__constructs__=[If.UNKNOWN,If.EDGE_A,If.EDGE_B];var ih=function(){Ta.call(this)};k["box2D.dynamics.contacts.B2PolygonContact"]=ih;ih.__name__="box2D.dynamics.contacts.B2PolygonContact";ih.create=function(a){return new ih};
ih.destroy=function(a,b){};ih.__super__=Ta;ih.prototype=u(Ta.prototype,{reset:function(a,b){Ta.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();Sa.collidePolygons(this.m_manifold,U.__cast(this.m_fixtureA.getShape(),Db),a.m_xf,U.__cast(this.m_fixtureB.getShape(),Db),b.m_xf)},__class__:ih});var $q=function(){};k["box2D.dynamics.controllers.B2Controller"]=$q;$q.__name__="box2D.dynamics.controllers.B2Controller";$q.prototype={step:function(a){},
draw:function(a){},addBody:function(a){var b=new En;b.controller=this;b.body=a;b.nextBody=this.m_bodyList;b.prevBody=null;this.m_bodyList=b;null!=b.nextBody&&(b.nextBody.prevBody=b);this.m_bodyCount++;b.nextController=a.m_controllerList;b.prevController=null;a.m_controllerList=b;null!=b.nextController&&(b.nextController.prevController=b);a.m_controllerCount++},removeBody:function(a){for(var b=a.m_controllerList;null!=b&&b.controller!=this;)b=b.nextController;null!=b.prevBody&&(b.prevBody.nextBody=
b.nextBody);null!=b.nextBody&&(b.nextBody.prevBody=b.prevBody);null!=b.nextController&&(b.nextController.prevController=b.prevController);null!=b.prevController&&(b.prevController.nextController=b.nextController);this.m_bodyList==b&&(this.m_bodyList=b.nextBody);a.m_controllerList==b&&(a.m_controllerList=b.nextController);a.m_controllerCount--;this.m_bodyCount--},clear:function(){for(;null!=this.m_bodyList;)this.removeBody(this.m_bodyList.body)},getNext:function(){return this.m_next},getWorld:function(){return this.m_world},
getBodyList:function(){return this.m_bodyList},m_next:null,m_prev:null,m_bodyList:null,m_bodyCount:null,m_world:null,__class__:$q};var En=function(){};k["box2D.dynamics.controllers.B2ControllerEdge"]=En;En.__name__="box2D.dynamics.controllers.B2ControllerEdge";En.prototype={controller:null,body:null,prevBody:null,nextBody:null,prevController:null,nextController:null,__class__:En};var Sb=function(a){this.m_edgeA=new Ck;this.m_edgeB=new Ck;this.m_localCenterA=new y;this.m_localCenterB=new y;ca.b2Assert(a.bodyA!=
a.bodyB);this.m_type=a.type;this.m_next=this.m_prev=null;this.m_bodyA=a.bodyA;this.m_bodyB=a.bodyB;this.m_collideConnected=a.collideConnected;this.m_islandFlag=!1;this.m_userData=a.userData};k["box2D.dynamics.joints.B2Joint"]=Sb;Sb.__name__="box2D.dynamics.joints.B2Joint";Sb.create=function(a,b){b=null;3==a.type?b=new ki(U.__cast(a,Eh)):5==a.type?b=new Dk(U.__cast(a,Ek)):2==a.type?b=new li(U.__cast(a,Fk)):1==a.type?b=new cg(U.__cast(a,Fh)):4==a.type?b=new sg(U.__cast(a,Gk)):6==a.type?b=new Hk(U.__cast(a,
Ik)):7==a.type?b=new qj(U.__cast(a,Gh)):8==a.type?b=new Jk(U.__cast(a,Kk)):9==a.type&&(b=new Lk(U.__cast(a,Mk)));return b};Sb.destroy=function(a,b){};Sb.prototype={getType:function(){return this.m_type},getAnchorA:function(){return null},getAnchorB:function(){return null},getReactionForce:function(a){return null},getReactionTorque:function(a){return 0},getBodyA:function(){return this.m_bodyA},getBodyB:function(){return this.m_bodyB},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},
setUserData:function(a){this.m_userData=a},isActive:function(){return this.m_bodyA.isActive()?this.m_bodyB.isActive():!1},initVelocityConstraints:function(a){},solveVelocityConstraints:function(a){},finalizeVelocityConstraints:function(){},solvePositionConstraints:function(a){return!1},m_type:null,m_prev:null,m_next:null,m_edgeA:null,m_edgeB:null,m_bodyA:null,m_bodyB:null,m_islandFlag:null,m_collideConnected:null,m_userData:null,m_localCenterA:null,m_localCenterB:null,m_invMassA:null,m_invMassB:null,
m_invIA:null,m_invIB:null,ID:null,__class__:Sb};var ki=function(a){Sb.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_u=new y;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_length=a.length;this.m_frequencyHz=a.frequencyHz;this.m_dampingRatio=a.dampingRatio;this.m_bias=this.m_gamma=this.m_impulse=0};k["box2D.dynamics.joints.B2DistanceJoint"]=ki;ki.__name__="box2D.dynamics.joints.B2DistanceJoint";ki.__super__=
Sb;ki.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*this.m_impulse*this.m_u.x,a*this.m_impulse*this.m_u.y)},getReactionTorque:function(a){return 0},getLength:function(){return this.m_length},setLength:function(a){this.m_length=a},getFrequency:function(){return this.m_frequencyHz},setFrequency:function(a){this.m_frequencyHz=
a},getDampingRatio:function(){return this.m_dampingRatio},setDampingRatio:function(a){this.m_dampingRatio=a},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchor1.x-b.m_sweep.localCenter.x,f=this.m_localAnchor1.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f;f=d.col1.y*e+d.col2.y*f;e=g;d=c.m_xf.R;var h=this.m_localAnchor2.x-c.m_sweep.localCenter.x,m=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*h+d.col2.x*m;m=d.col1.y*h+d.col2.y*m;h=g;
this.m_u.x=c.m_sweep.c.x+h-b.m_sweep.c.x-e;this.m_u.y=c.m_sweep.c.y+m-b.m_sweep.c.y-f;d=Math.sqrt(this.m_u.x*this.m_u.x+this.m_u.y*this.m_u.y);d>ca.b2_linearSlop?this.m_u.multiply(1/d):(g=this.m_u,g.x=0,g.y=0);g=e*this.m_u.y-f*this.m_u.x;var l=h*this.m_u.y-m*this.m_u.x;g=b.m_invMass+b.m_invI*g*g+c.m_invMass+c.m_invI*l*l;this.m_mass=0!=g?1/g:0;if(0<this.m_frequencyHz){d-=this.m_length;l=2*Math.PI*this.m_frequencyHz;var L=this.m_mass*l*l;this.m_gamma=a.dt*(2*this.m_mass*this.m_dampingRatio*l+a.dt*L);
this.m_gamma=0!=this.m_gamma?1/this.m_gamma:0;this.m_bias=d*a.dt*L*this.m_gamma;this.m_mass=g+this.m_gamma;this.m_mass=0!=this.m_mass?1/this.m_mass:0}a.warmStarting?(this.m_impulse*=a.dtRatio,a=this.m_impulse*this.m_u.x,d=this.m_impulse*this.m_u.y,b.m_linearVelocity.x-=b.m_invMass*a,b.m_linearVelocity.y-=b.m_invMass*d,b.m_angularVelocity-=b.m_invI*(e*d-f*a),c.m_linearVelocity.x+=c.m_invMass*a,c.m_linearVelocity.y+=c.m_invMass*d,c.m_angularVelocity+=c.m_invI*(h*d-m*a)):this.m_impulse=0},solveVelocityConstraints:function(a){a=
this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y;f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;f=-this.m_mass*(this.m_u.x*(b.m_linearVelocity.x+-b.m_angularVelocity*h-(a.m_linearVelocity.x+-a.m_angularVelocity*e))+this.m_u.y*(b.m_linearVelocity.y+
b.m_angularVelocity*g-(a.m_linearVelocity.y+a.m_angularVelocity*d))+this.m_bias+this.m_gamma*this.m_impulse);this.m_impulse+=f;c=f*this.m_u.x;f*=this.m_u.y;a.m_linearVelocity.x-=a.m_invMass*c;a.m_linearVelocity.y-=a.m_invMass*f;a.m_angularVelocity-=a.m_invI*(d*f-e*c);b.m_linearVelocity.x+=b.m_invMass*c;b.m_linearVelocity.y+=b.m_invMass*f;b.m_angularVelocity+=b.m_invI*(g*f-h*c)},solvePositionConstraints:function(a){if(0<this.m_frequencyHz)return!0;a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchor1.x-
a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y;f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;var m=b.m_sweep.c.x+g-a.m_sweep.c.x-d,l=b.m_sweep.c.y+h-a.m_sweep.c.y-e;c=Math.sqrt(m*m+l*l);m/=c;l/=c;c-=this.m_length;c=O.clamp(c,-ca.b2_maxLinearCorrection,ca.b2_maxLinearCorrection);f=-this.m_mass*c;var L=this.m_u;
null==l&&(l=0);null==m&&(m=0);L.x=m;L.y=l;l=f*this.m_u.x;f*=this.m_u.y;a.m_sweep.c.x-=a.m_invMass*l;a.m_sweep.c.y-=a.m_invMass*f;a.m_sweep.a-=a.m_invI*(d*f-e*l);b.m_sweep.c.x+=b.m_invMass*l;b.m_sweep.c.y+=b.m_invMass*f;b.m_sweep.a+=b.m_invI*(g*f-h*l);a.synchronizeTransform();b.synchronizeTransform();return O.abs(c)<ca.b2_linearSlop},m_localAnchor1:null,m_localAnchor2:null,m_u:null,m_frequencyHz:null,m_dampingRatio:null,m_gamma:null,m_bias:null,m_impulse:null,m_mass:null,m_length:null,__class__:ki});
var Vc=function(){this.type=0;this.bodyB=this.bodyA=this.userData=null;this.collideConnected=!1};k["box2D.dynamics.joints.B2JointDef"]=Vc;Vc.__name__="box2D.dynamics.joints.B2JointDef";Vc.prototype={type:null,userData:null,bodyA:null,bodyB:null,collideConnected:null,ID:null,actor1:null,actor2:null,__class__:Vc};var Eh=function(){Vc.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=3;this.length=1;this.dampingRatio=this.frequencyHz=0};k["box2D.dynamics.joints.B2DistanceJointDef"]=
Eh;Eh.__name__="box2D.dynamics.joints.B2DistanceJointDef";Eh.__super__=Vc;Eh.prototype=u(Vc.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;b=this.bodyB.getLocalPoint(d);a.x=b.x;a.y=b.y;a=d.x-c.x;c=d.y-c.y;this.length=Math.sqrt(a*a+c*c);this.dampingRatio=this.frequencyHz=0},localAnchorA:null,localAnchorB:null,length:null,frequencyHz:null,dampingRatio:null,__class__:Eh});var Lk=function(a){Sb.call(this,
a);this.m_localAnchorA=new y;this.m_localAnchorB=new y;this.m_linearMass=new zc;this.m_linearImpulse=new y;var b=this.m_localAnchorA,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchorB;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_linearMass.setZero();this.m_angularMass=0;b=this.m_linearImpulse;b.x=0;this.m_angularImpulse=b.y=0;this.m_maxForce=a.maxForce;this.m_maxTorque=a.maxTorque};k["box2D.dynamics.joints.B2FrictionJoint"]=Lk;Lk.__name__="box2D.dynamics.joints.B2FrictionJoint";Lk.__super__=Sb;Lk.prototype=
u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchorA)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchorB)},getReactionForce:function(a){return new y(a*this.m_linearImpulse.x,a*this.m_linearImpulse.y)},getReactionTorque:function(a){return a*this.m_angularImpulse},setMaxForce:function(a){this.m_maxForce=a},getMaxForce:function(){return this.m_maxForce},setMaxTorque:function(a){this.m_maxTorque=a},getMaxTorque:function(){return this.m_maxTorque},
initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchorA.x-b.m_sweep.localCenter.x,f=this.m_localAnchorA.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f;f=d.col1.y*e+d.col2.y*f;e=g;d=c.m_xf.R;var h=this.m_localAnchorB.x-c.m_sweep.localCenter.x,m=this.m_localAnchorB.y-c.m_sweep.localCenter.y;g=d.col1.x*h+d.col2.x*m;m=d.col1.y*h+d.col2.y*m;h=g;d=b.m_invMass;g=c.m_invMass;var l=b.m_invI,L=c.m_invI,p=new zc;p.col1.x=d+g;p.col2.x=0;p.col1.y=0;p.col2.y=d+
g;p.col1.x+=l*f*f;p.col2.x+=-l*e*f;p.col1.y+=-l*e*f;p.col2.y+=l*e*e;p.col1.x+=L*m*m;p.col2.x+=-L*h*m;p.col1.y+=-L*h*m;p.col2.y+=L*h*h;p.getInverse(this.m_linearMass);this.m_angularMass=l+L;0<this.m_angularMass&&(this.m_angularMass=1/this.m_angularMass);a.warmStarting?(this.m_linearImpulse.x*=a.dtRatio,this.m_linearImpulse.y*=a.dtRatio,this.m_angularImpulse*=a.dtRatio,a=this.m_linearImpulse,b.m_linearVelocity.x-=d*a.x,b.m_linearVelocity.y-=d*a.y,b.m_angularVelocity-=l*(e*a.y-f*a.x+this.m_angularImpulse),
c.m_linearVelocity.x+=g*a.x,c.m_linearVelocity.y+=g*a.y,c.m_angularVelocity+=L*(h*a.y-m*a.x+this.m_angularImpulse)):(b=this.m_linearImpulse,b.x=0,this.m_angularImpulse=b.y=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,g=c.m_angularVelocity,h=b.m_invMass,m=c.m_invMass,l=b.m_invI,L=c.m_invI,p=b.m_xf.R,n=this.m_localAnchorA.x-b.m_sweep.localCenter.x,q=this.m_localAnchorA.y-b.m_sweep.localCenter.y,k=p.col1.x*
n+p.col2.x*q;q=p.col1.y*n+p.col2.y*q;n=k;p=c.m_xf.R;var t=this.m_localAnchorB.x-c.m_sweep.localCenter.x,v=this.m_localAnchorB.y-c.m_sweep.localCenter.y;k=p.col1.x*t+p.col2.x*v;v=p.col1.y*t+p.col2.y*v;t=k;k=-this.m_angularMass*(g-e);var r=this.m_angularImpulse;p=a.dt*this.m_maxTorque;this.m_angularImpulse=O.clamp(this.m_angularImpulse+k,-p,p);k=this.m_angularImpulse-r;e-=l*k;g+=L*k;p=O.mulMV(this.m_linearMass,new y(-(f.x-g*v-d.x+e*q),-(f.y+g*t-d.y-e*n)));k=this.m_linearImpulse.copy();this.m_linearImpulse.add(p);
p=a.dt*this.m_maxForce;this.m_linearImpulse.lengthSquared()>p*p&&(this.m_linearImpulse.normalize(),this.m_linearImpulse.multiply(p));p=O.subtractVV(this.m_linearImpulse,k);d.x-=h*p.x;d.y-=h*p.y;e-=l*(n*p.y-q*p.x);f.x+=m*p.x;f.y+=m*p.y;g+=L*(t*p.y-v*p.x);b.m_angularVelocity=e;c.m_angularVelocity=g},solvePositionConstraints:function(a){return!0},m_localAnchorA:null,m_localAnchorB:null,m_linearMass:null,m_angularMass:null,m_linearImpulse:null,m_angularImpulse:null,m_maxForce:null,m_maxTorque:null,__class__:Lk});
var Mk=function(){Vc.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=9;this.maxTorque=this.maxForce=0};k["box2D.dynamics.joints.B2FrictionJointDef"]=Mk;Mk.__name__="box2D.dynamics.joints.B2FrictionJointDef";Mk.__super__=Vc;Mk.prototype=u(Vc.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;b=this.bodyB.getLocalPoint(c);a.x=b.x;a.y=b.y},localAnchorA:null,localAnchorB:null,maxForce:null,
maxTorque:null,__class__:Mk});var Hk=function(a){Sb.call(this,a);this.m_groundAnchor1=new y;this.m_groundAnchor2=new y;this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_J=new Fn;var b=a.joint1.m_type,c=a.joint2.m_type;this.m_prismatic2=this.m_revolute2=this.m_prismatic1=this.m_revolute1=null;this.m_ground1=a.joint1.getBodyA();this.m_bodyA=a.joint1.getBodyB();if(1==b){this.m_revolute1=U.__cast(a.joint1,cg);var d=this.m_groundAnchor1,e=this.m_revolute1.m_localAnchor1;d.x=e.x;d.y=e.y;d=this.m_localAnchor1;
e=this.m_revolute1.m_localAnchor2;d.x=e.x;d.y=e.y;b=this.m_revolute1.getJointAngle()}else this.m_prismatic1=U.__cast(a.joint1,li),d=this.m_groundAnchor1,e=this.m_prismatic1.m_localAnchor1,d.x=e.x,d.y=e.y,d=this.m_localAnchor1,e=this.m_prismatic1.m_localAnchor2,d.x=e.x,d.y=e.y,b=this.m_prismatic1.getJointTranslation();this.m_ground2=a.joint2.getBodyA();this.m_bodyB=a.joint2.getBodyB();1==c?(this.m_revolute2=U.__cast(a.joint2,cg),d=this.m_groundAnchor2,e=this.m_revolute2.m_localAnchor1,d.x=e.x,d.y=
e.y,d=this.m_localAnchor2,e=this.m_revolute2.m_localAnchor2,d.x=e.x,d.y=e.y,c=this.m_revolute2.getJointAngle()):(this.m_prismatic2=U.__cast(a.joint2,li),d=this.m_groundAnchor2,e=this.m_prismatic2.m_localAnchor1,d.x=e.x,d.y=e.y,d=this.m_localAnchor2,e=this.m_prismatic2.m_localAnchor2,d.x=e.x,d.y=e.y,c=this.m_prismatic2.getJointTranslation());this.m_ratio=a.ratio;this.m_constant=b+this.m_ratio*c;this.m_impulse=0};k["box2D.dynamics.joints.B2GearJoint"]=Hk;Hk.__name__="box2D.dynamics.joints.B2GearJoint";
Hk.__super__=Sb;Hk.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*this.m_impulse*this.m_J.linearB.x,a*this.m_impulse*this.m_J.linearB.y)},getReactionTorque:function(a){var b=this.m_bodyB.m_xf.R,c=this.m_localAnchor1.x-this.m_bodyB.m_sweep.localCenter.x,d=this.m_localAnchor1.y-this.m_bodyB.m_sweep.localCenter.y,e=b.col1.x*
c+b.col2.x*d;d=b.col1.y*c+b.col2.y*d;return a*(this.m_impulse*this.m_J.angularB-e*this.m_impulse*this.m_J.linearB.y+d*this.m_impulse*this.m_J.linearB.x)},getRatio:function(){return this.m_ratio},setRatio:function(a){this.m_ratio=a},initVelocityConstraints:function(a){var b=this.m_ground1,c=this.m_ground2,d=this.m_bodyA,e=this.m_bodyB,f=0;this.m_J.setZero();if(null!=this.m_revolute1)this.m_J.angularA=-1,f+=d.m_invI;else{var g=b.m_xf.R;var h=this.m_prismatic1.m_localXAxis1;b=g.col1.x*h.x+g.col2.x*h.y;
h=g.col1.y*h.x+g.col2.y*h.y;g=d.m_xf.R;var m=this.m_localAnchor1.x-d.m_sweep.localCenter.x;var l=this.m_localAnchor1.y-d.m_sweep.localCenter.y;var L=g.col1.x*m+g.col2.x*l;l=g.col1.y*m+g.col2.y*l;g=L*h-l*b;m=this.m_J.linearA;b=-b;h=-h;null==h&&(h=0);null==b&&(b=0);m.x=b;m.y=h;this.m_J.angularA=-g;f+=d.m_invMass+d.m_invI*g*g}null!=this.m_revolute2?(this.m_J.angularB=-this.m_ratio,f+=this.m_ratio*this.m_ratio*e.m_invI):(g=c.m_xf.R,h=this.m_prismatic2.m_localXAxis1,b=g.col1.x*h.x+g.col2.x*h.y,h=g.col1.y*
h.x+g.col2.y*h.y,g=e.m_xf.R,m=this.m_localAnchor2.x-e.m_sweep.localCenter.x,l=this.m_localAnchor2.y-e.m_sweep.localCenter.y,L=g.col1.x*m+g.col2.x*l,l=g.col1.y*m+g.col2.y*l,g=L*h-l*b,m=this.m_J.linearB,b*=-this.m_ratio,h*=-this.m_ratio,null==h&&(h=0),null==b&&(b=0),m.x=b,m.y=h,this.m_J.angularB=-this.m_ratio*g,f+=this.m_ratio*this.m_ratio*(e.m_invMass+e.m_invI*g*g));this.m_mass=0<f?1/f:0;a.warmStarting?(d.m_linearVelocity.x+=d.m_invMass*this.m_impulse*this.m_J.linearA.x,d.m_linearVelocity.y+=d.m_invMass*
this.m_impulse*this.m_J.linearA.y,d.m_angularVelocity+=d.m_invI*this.m_impulse*this.m_J.angularA,e.m_linearVelocity.x+=e.m_invMass*this.m_impulse*this.m_J.linearB.x,e.m_linearVelocity.y+=e.m_invMass*this.m_impulse*this.m_J.linearB.y,e.m_angularVelocity+=e.m_invI*this.m_impulse*this.m_J.angularB):this.m_impulse=0},solveVelocityConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=this.m_J.compute(a.m_linearVelocity,a.m_angularVelocity,b.m_linearVelocity,b.m_angularVelocity);c*=-this.m_mass;this.m_impulse+=
c;a.m_linearVelocity.x+=a.m_invMass*c*this.m_J.linearA.x;a.m_linearVelocity.y+=a.m_invMass*c*this.m_J.linearA.y;a.m_angularVelocity+=a.m_invI*c*this.m_J.angularA;b.m_linearVelocity.x+=b.m_invMass*c*this.m_J.linearB.x;b.m_linearVelocity.y+=b.m_invMass*c*this.m_J.linearB.y;b.m_angularVelocity+=b.m_invI*c*this.m_J.angularB},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB;var c=null!=this.m_revolute1?this.m_revolute1.getJointAngle():this.m_prismatic1.getJointTranslation();var d=
null!=this.m_revolute2?this.m_revolute2.getJointAngle():this.m_prismatic2.getJointTranslation();c=-this.m_mass*(this.m_constant-(c+this.m_ratio*d));a.m_sweep.c.x+=a.m_invMass*c*this.m_J.linearA.x;a.m_sweep.c.y+=a.m_invMass*c*this.m_J.linearA.y;a.m_sweep.a+=a.m_invI*c*this.m_J.angularA;b.m_sweep.c.x+=b.m_invMass*c*this.m_J.linearB.x;b.m_sweep.c.y+=b.m_invMass*c*this.m_J.linearB.y;b.m_sweep.a+=b.m_invI*c*this.m_J.angularB;a.synchronizeTransform();b.synchronizeTransform();return 0<ca.b2_linearSlop},
m_ground1:null,m_ground2:null,m_revolute1:null,m_prismatic1:null,m_revolute2:null,m_prismatic2:null,m_groundAnchor1:null,m_groundAnchor2:null,m_localAnchor1:null,m_localAnchor2:null,m_J:null,m_constant:null,m_ratio:null,m_mass:null,m_impulse:null,__class__:Hk});var Ik=function(){Vc.call(this);this.type=6;this.joint2=this.joint1=null;this.ratio=1};k["box2D.dynamics.joints.B2GearJointDef"]=Ik;Ik.__name__="box2D.dynamics.joints.B2GearJointDef";Ik.__super__=Vc;Ik.prototype=u(Vc.prototype,{joint1:null,
joint2:null,ratio:null,__class__:Ik});var Fn=function(){this.linearA=new y;this.linearB=new y};k["box2D.dynamics.joints.B2Jacobian"]=Fn;Fn.__name__="box2D.dynamics.joints.B2Jacobian";Fn.prototype={linearA:null,angularA:null,linearB:null,angularB:null,setZero:function(){var a=this.linearA;a.x=0;this.angularA=a.y=0;a=this.linearB;a.x=0;this.angularB=a.y=0},set:function(a,b,c,d){var e=this.linearA;e.x=a.x;e.y=a.y;this.angularA=b;e=this.linearB;e.x=c.x;e.y=c.y;this.angularB=d},compute:function(a,b,c,
d){return this.linearA.x*a.x+this.linearA.y*a.y+this.angularA*b+(this.linearB.x*c.x+this.linearB.y*c.y)+this.angularB*d},__class__:Fn};var Ck=function(){};k["box2D.dynamics.joints.B2JointEdge"]=Ck;Ck.__name__="box2D.dynamics.joints.B2JointEdge";Ck.prototype={other:null,joint:null,prev:null,next:null,__class__:Ck};var qj=function(a){Sb.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_localXAxis1=new y;this.m_localYAxis1=new y;this.m_axis=new y;this.m_perp=new y;this.m_K=new zc;
this.m_impulse=new y;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;b=this.m_localXAxis1;c=a.localAxisA;b.x=c.x;b.y=c.y;this.m_localYAxis1.x=-this.m_localXAxis1.y;this.m_localYAxis1.y=this.m_localXAxis1.x;b=this.m_impulse;b.x=0;this.m_motorImpulse=this.m_motorMass=b.y=0;this.m_lowerTranslation=a.lowerTranslation;this.m_upperTranslation=a.upperTranslation;this.m_maxMotorForce=a.maxMotorForce;this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=
a.enableLimit;this.m_enableMotor=a.enableMotor;this.m_limitState=0;b=this.m_axis;b.x=0;b.y=0;b=this.m_perp;b.x=0;b.y=0};k["box2D.dynamics.joints.B2LineJoint"]=qj;qj.__name__="box2D.dynamics.joints.B2LineJoint";qj.__super__=Sb;qj.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+
this.m_impulse.y)*this.m_axis.x),a*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.y))},getReactionTorque:function(a){return a*this.m_impulse.y},getJointTranslation:function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.getWorldPoint(this.m_localAnchor1),d=b.getWorldPoint(this.m_localAnchor2);b=d.x-c.x;c=d.y-c.y;a=a.getWorldVector(this.m_localXAxis1);return a.x*b+a.y*c},getJointSpeed:function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,
e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y;f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;c=b.m_sweep.c.x+g-(a.m_sweep.c.x+d);f=b.m_sweep.c.y+h-(a.m_sweep.c.y+e);var m=a.getWorldVector(this.m_localXAxis1),l=a.m_linearVelocity,L=b.m_linearVelocity;a=a.m_angularVelocity;b=b.m_angularVelocity;return c*-a*m.y+f*a*m.x+(m.x*(L.x+-b*
h-l.x- -a*e)+m.y*(L.y+b*g-l.y-a*d))},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerTranslation},getUpperLimit:function(){return this.m_upperTranslation},setLimits:function(a,b){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_lowerTranslation=a;this.m_upperTranslation=b},isMotorEnabled:function(){return this.m_enableMotor},enableMotor:function(a){this.m_bodyA.setAwake(!0);
this.m_bodyB.setAwake(!0);this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorForce:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_maxMotorForce=a},getMaxMotorForce:function(){return this.m_maxMotorForce},getMotorForce:function(){return this.m_motorImpulse},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=this.m_localCenterA,
e=b.getLocalCenter();d.x=e.x;d.y=e.y;d=this.m_localCenterB;e=c.getLocalCenter();d.x=e.x;d.y=e.y;var f=b.getTransform();c.getTransform();var g=b.m_xf.R,h=this.m_localAnchor1.x-this.m_localCenterA.x,m=this.m_localAnchor1.y-this.m_localCenterA.y,l=g.col1.x*h+g.col2.x*m;m=g.col1.y*h+g.col2.y*m;h=l;g=c.m_xf.R;var L=this.m_localAnchor2.x-this.m_localCenterB.x,p=this.m_localAnchor2.y-this.m_localCenterB.y;l=g.col1.x*L+g.col2.x*p;p=g.col1.y*L+g.col2.y*p;L=l;g=c.m_sweep.c.x+L-b.m_sweep.c.x-h;l=c.m_sweep.c.y+
p-b.m_sweep.c.y-m;this.m_invMassA=b.m_invMass;this.m_invMassB=c.m_invMass;this.m_invIA=b.m_invI;this.m_invIB=c.m_invI;d=this.m_axis;e=O.mulMV(f.R,this.m_localXAxis1);d.x=e.x;d.y=e.y;this.m_a1=(g+h)*this.m_axis.y-(l+m)*this.m_axis.x;this.m_a2=L*this.m_axis.y-p*this.m_axis.x;this.m_motorMass=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_a1*this.m_a1+this.m_invIB*this.m_a2*this.m_a2;this.m_motorMass=this.m_motorMass>Number.MIN_VALUE?1/this.m_motorMass:0;d=this.m_perp;e=O.mulMV(f.R,this.m_localYAxis1);
d.x=e.x;d.y=e.y;this.m_s1=(g+h)*this.m_perp.y-(l+m)*this.m_perp.x;this.m_s2=L*this.m_perp.y-p*this.m_perp.x;f=this.m_invMassA;h=this.m_invMassB;m=this.m_invIA;L=this.m_invIB;this.m_K.col1.x=f+h+m*this.m_s1*this.m_s1+L*this.m_s2*this.m_s2;this.m_K.col1.y=m*this.m_s1*this.m_a1+L*this.m_s2*this.m_a2;this.m_K.col2.x=this.m_K.col1.y;this.m_K.col2.y=f+h+m*this.m_a1*this.m_a1+L*this.m_a2*this.m_a2;this.m_enableLimit?(g=this.m_axis.x*g+this.m_axis.y*l,O.abs(this.m_upperTranslation-this.m_lowerTranslation)<
2*ca.b2_linearSlop?this.m_limitState=3:g<=this.m_lowerTranslation?1!=this.m_limitState&&(this.m_limitState=1,this.m_impulse.y=0):g>=this.m_upperTranslation?2!=this.m_limitState&&(this.m_limitState=2,this.m_impulse.y=0):(this.m_limitState=0,this.m_impulse.y=0)):this.m_limitState=0;0==this.m_enableMotor&&(this.m_motorImpulse=0);a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=a.dtRatio,a=this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.y)*
this.m_axis.x,g=this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.y,l=this.m_impulse.x*this.m_s1+(this.m_motorImpulse+this.m_impulse.y)*this.m_a1,f=this.m_impulse.x*this.m_s2+(this.m_motorImpulse+this.m_impulse.y)*this.m_a2,b.m_linearVelocity.x-=this.m_invMassA*a,b.m_linearVelocity.y-=this.m_invMassA*g,b.m_angularVelocity-=this.m_invIA*l,c.m_linearVelocity.x+=this.m_invMassB*a,c.m_linearVelocity.y+=this.m_invMassB*g,c.m_angularVelocity+=this.m_invIB*f):(d=this.m_impulse,
d.x=0,this.m_motorImpulse=d.y=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,g=c.m_angularVelocity;if(this.m_enableMotor&&3!=this.m_limitState){var h=this.m_motorMass*(this.m_motorSpeed-(this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e));var m=this.m_motorImpulse;a=a.dt*this.m_maxMotorForce;this.m_motorImpulse=O.clamp(this.m_motorImpulse+h,-a,a);h=this.m_motorImpulse-m;m=h*this.m_axis.x;
a=h*this.m_axis.y;var l=h*this.m_a1;h*=this.m_a2;d.x-=this.m_invMassA*m;d.y-=this.m_invMassA*a;e-=this.m_invIA*l;f.x+=this.m_invMassB*m;f.y+=this.m_invMassB*a;g+=this.m_invIB*h}a=this.m_perp.x*(f.x-d.x)+this.m_perp.y*(f.y-d.y)+this.m_s2*g-this.m_s1*e;this.m_enableLimit&&0!=this.m_limitState?(l=this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e,m=this.m_impulse.copy(),h=this.m_K.solve(new y,-a,-l),this.m_impulse.add(h),1==this.m_limitState?this.m_impulse.y=O.max(this.m_impulse.y,
0):2==this.m_limitState&&(this.m_impulse.y=O.min(this.m_impulse.y,0)),a=-a-(this.m_impulse.y-m.y)*this.m_K.col2.x,this.m_impulse.x=0!=this.m_K.col1.x?a/this.m_K.col1.x+m.x:m.x,h.x=this.m_impulse.x-m.x,h.y=this.m_impulse.y-m.y,m=h.x*this.m_perp.x+h.y*this.m_axis.x,a=h.x*this.m_perp.y+h.y*this.m_axis.y,l=h.x*this.m_s1+h.y*this.m_a1,h=h.x*this.m_s2+h.y*this.m_a2):(h=0!=this.m_K.col1.x?-a/this.m_K.col1.x:0,this.m_impulse.x+=h,m=h*this.m_perp.x,a=h*this.m_perp.y,l=h*this.m_s1,h*=this.m_s2);d.x-=this.m_invMassA*
m;d.y-=this.m_invMassA*a;e-=this.m_invIA*l;f.x+=this.m_invMassB*m;f.y+=this.m_invMassB*a;g+=this.m_invIB*h;m=b.m_linearVelocity;m.x=d.x;m.y=d.y;b.m_angularVelocity=e;m=c.m_linearVelocity;m.x=f.x;m.y=f.y;c.m_angularVelocity=g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_sweep.c,d=a.m_sweep.a,e=b.m_sweep.c,f=b.m_sweep.a,g=0;var h=!1;var m=0,l=zc.fromAngle(d);var L=zc.fromAngle(f);var p=l,n=this.m_localAnchor1.x-this.m_localCenterA.x;var q=this.m_localAnchor1.y-this.m_localCenterA.y;
var k=p.col1.x*n+p.col2.x*q;q=p.col1.y*n+p.col2.y*q;n=k;p=L;L=this.m_localAnchor2.x-this.m_localCenterB.x;var t=this.m_localAnchor2.y-this.m_localCenterB.y;k=p.col1.x*L+p.col2.x*t;t=p.col1.y*L+p.col2.y*t;L=k;p=e.x+L-c.x-n;k=e.y+t-c.y-q;if(this.m_enableLimit){this.m_axis=O.mulMV(l,this.m_localXAxis1);this.m_a1=(p+n)*this.m_axis.y-(k+q)*this.m_axis.x;this.m_a2=L*this.m_axis.y-t*this.m_axis.x;var v=this.m_axis.x*p+this.m_axis.y*k;O.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ca.b2_linearSlop?
(m=O.clamp(v,-ca.b2_maxLinearCorrection,ca.b2_maxLinearCorrection),g=O.abs(v),h=!0):v<=this.m_lowerTranslation?(m=O.clamp(v-this.m_lowerTranslation+ca.b2_linearSlop,-ca.b2_maxLinearCorrection,0),g=this.m_lowerTranslation-v,h=!0):v>=this.m_upperTranslation&&(m=O.clamp(v-this.m_upperTranslation+ca.b2_linearSlop,0,ca.b2_maxLinearCorrection),g=v-this.m_upperTranslation,h=!0)}this.m_perp=O.mulMV(l,this.m_localYAxis1);this.m_s1=(p+n)*this.m_perp.y-(k+q)*this.m_perp.x;this.m_s2=L*this.m_perp.y-t*this.m_perp.x;
l=new y;n=this.m_perp.x*p+this.m_perp.y*k;g=O.max(g,O.abs(n));h?(h=this.m_invMassA,q=this.m_invMassB,L=this.m_invIA,t=this.m_invIB,this.m_K.col1.x=h+q+L*this.m_s1*this.m_s1+t*this.m_s2*this.m_s2,this.m_K.col1.y=L*this.m_s1*this.m_a1+t*this.m_s2*this.m_a2,this.m_K.col2.x=this.m_K.col1.y,this.m_K.col2.y=h+q+L*this.m_a1*this.m_a1+t*this.m_a2*this.m_a2,this.m_K.solve(l,-n,-m)):(h=this.m_invMassA,q=this.m_invMassB,L=this.m_invIA,t=this.m_invIB,m=h+q+L*this.m_s1*this.m_s1+t*this.m_s2*this.m_s2,l.x=0!=m?
-n/m:0,l.y=0);m=l.x*this.m_perp.x+l.y*this.m_axis.x;h=l.x*this.m_perp.y+l.y*this.m_axis.y;n=l.x*this.m_s1+l.y*this.m_a1;l=l.x*this.m_s2+l.y*this.m_a2;c.x-=this.m_invMassA*m;c.y-=this.m_invMassA*h;d-=this.m_invIA*n;e.x+=this.m_invMassB*m;e.y+=this.m_invMassB*h;f+=this.m_invIB*l;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();return g<=ca.b2_linearSlop?0<=ca.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_localXAxis1:null,m_localYAxis1:null,m_axis:null,m_perp:null,
m_s1:null,m_s2:null,m_a1:null,m_a2:null,m_K:null,m_impulse:null,m_motorMass:null,m_motorImpulse:null,m_lowerTranslation:null,m_upperTranslation:null,m_maxMotorForce:null,m_motorSpeed:null,m_enableLimit:null,m_enableMotor:null,m_limitState:null,__class__:qj});var Gh=function(){Vc.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.localAxisA=new y;this.type=7;var a=this.localAxisA,b=1,c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=
0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};k["box2D.dynamics.joints.B2LineJointDef"]=Gh;Gh.__name__="box2D.dynamics.joints.B2LineJointDef";Gh.__super__=Vc;Gh.prototype=u(Vc.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);this.localAxisA=this.bodyA.getLocalVector(d)},localAnchorA:null,localAnchorB:null,localAxisA:null,enableLimit:null,lowerTranslation:null,upperTranslation:null,
enableMotor:null,maxMotorForce:null,motorSpeed:null,__class__:Gh});var Dk=function(a){Sb.call(this,a);this.K=new zc;this.K1=new zc;this.K2=new zc;this.m_localAnchor=new y;this.m_target=new y;this.m_impulse=new y;this.m_mass=new zc;this.m_C=new y;var b=this.m_target,c=a.target;b.x=c.x;b.y=c.y;b=this.m_target.x-this.m_bodyB.m_xf.position.x;c=this.m_target.y-this.m_bodyB.m_xf.position.y;var d=this.m_bodyB.m_xf.R;this.m_localAnchor.x=b*d.col1.x+c*d.col1.y;this.m_localAnchor.y=b*d.col2.x+c*d.col2.y;this.m_maxForce=
a.maxForce;b=this.m_impulse;b.x=0;b.y=0;this.m_frequencyHz=a.frequencyHz;this.m_dampingRatio=a.dampingRatio;this.m_gamma=this.m_beta=0};k["box2D.dynamics.joints.B2MouseJoint"]=Dk;Dk.__name__="box2D.dynamics.joints.B2MouseJoint";Dk.__super__=Sb;Dk.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_target},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor)},getReactionForce:function(a){return new y(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return 0},
getTarget:function(){return this.m_target},setTarget:function(a){0==this.m_bodyB.isAwake()&&this.m_bodyB.setAwake(!0);this.m_target=a},getMaxForce:function(){return this.m_maxForce},setMaxForce:function(a){this.m_maxForce=a},getFrequency:function(){return this.m_frequencyHz},setFrequency:function(a){this.m_frequencyHz=a},getDampingRatio:function(){return this.m_dampingRatio},setDampingRatio:function(a){this.m_dampingRatio=a},K:null,K1:null,K2:null,initVelocityConstraints:function(a){var b=this.m_bodyB,
c=b.getMass(),d=2*Math.PI*this.m_frequencyHz,e=c*d*d;this.m_gamma=a.dt*(2*c*this.m_dampingRatio*d+a.dt*e);this.m_gamma=0!=this.m_gamma?1/this.m_gamma:0;this.m_beta=a.dt*e*this.m_gamma;e=b.m_xf.R;c=this.m_localAnchor.x-b.m_sweep.localCenter.x;d=this.m_localAnchor.y-b.m_sweep.localCenter.y;var f=e.col1.x*c+e.col2.x*d;d=e.col1.y*c+e.col2.y*d;c=f;e=b.m_invMass;f=b.m_invI;this.K1.col1.x=e;this.K1.col2.x=0;this.K1.col1.y=0;this.K1.col2.y=e;this.K2.col1.x=f*d*d;this.K2.col2.x=-f*c*d;this.K2.col1.y=-f*c*
d;this.K2.col2.y=f*c*c;this.K.setM(this.K1);this.K.addM(this.K2);this.K.col1.x+=this.m_gamma;this.K.col2.y+=this.m_gamma;this.K.getInverse(this.m_mass);this.m_C.x=b.m_sweep.c.x+c-this.m_target.x;this.m_C.y=b.m_sweep.c.y+d-this.m_target.y;b.m_angularVelocity*=.98;this.m_impulse.x*=a.dtRatio;this.m_impulse.y*=a.dtRatio;b.m_linearVelocity.x+=e*this.m_impulse.x;b.m_linearVelocity.y+=e*this.m_impulse.y;b.m_angularVelocity+=f*(c*this.m_impulse.y-d*this.m_impulse.x)},solveVelocityConstraints:function(a){var b=
this.m_bodyB,c=b.m_xf.R,d=this.m_localAnchor.x-b.m_sweep.localCenter.x,e=this.m_localAnchor.y-b.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;f=b.m_linearVelocity.x+-b.m_angularVelocity*e;var g=b.m_linearVelocity.y+b.m_angularVelocity*d;c=this.m_mass;f=f+this.m_beta*this.m_C.x+this.m_gamma*this.m_impulse.x;var h=g+this.m_beta*this.m_C.y+this.m_gamma*this.m_impulse.y;g=-(c.col1.x*f+c.col2.x*h);h=-(c.col1.y*f+c.col2.y*h);c=this.m_impulse.x;f=this.m_impulse.y;this.m_impulse.x+=
g;this.m_impulse.y+=h;a=a.dt*this.m_maxForce;this.m_impulse.lengthSquared()>a*a&&this.m_impulse.multiply(a/this.m_impulse.length());g=this.m_impulse.x-c;h=this.m_impulse.y-f;b.m_linearVelocity.x+=b.m_invMass*g;b.m_linearVelocity.y+=b.m_invMass*h;b.m_angularVelocity+=b.m_invI*(d*h-e*g)},solvePositionConstraints:function(a){return!0},m_localAnchor:null,m_target:null,m_impulse:null,m_mass:null,m_C:null,m_maxForce:null,m_frequencyHz:null,m_dampingRatio:null,m_beta:null,m_gamma:null,__class__:Dk});var Ek=
function(){Vc.call(this);this.target=new y;this.type=5;this.maxForce=0;this.frequencyHz=5;this.dampingRatio=.7};k["box2D.dynamics.joints.B2MouseJointDef"]=Ek;Ek.__name__="box2D.dynamics.joints.B2MouseJointDef";Ek.__super__=Vc;Ek.prototype=u(Vc.prototype,{target:null,maxForce:null,frequencyHz:null,dampingRatio:null,__class__:Ek});var li=function(a){Sb.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_localXAxis1=new y;this.m_localYAxis1=new y;this.m_axis=new y;this.m_perp=new y;
this.m_K=new Ch;this.m_impulse=new We;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;b=this.m_localXAxis1;c=a.localAxisA;b.x=c.x;b.y=c.y;this.m_localYAxis1.x=-this.m_localXAxis1.y;this.m_localYAxis1.y=this.m_localXAxis1.x;this.m_refAngle=a.referenceAngle;this.m_impulse.setZero();this.m_motorImpulse=this.m_motorMass=0;this.m_lowerTranslation=a.lowerTranslation;this.m_upperTranslation=a.upperTranslation;this.m_maxMotorForce=a.maxMotorForce;
this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=a.enableLimit;this.m_enableMotor=a.enableMotor;this.m_limitState=0;b=this.m_axis;b.x=0;b.y=0;b=this.m_perp;b.x=0;b.y=0};k["box2D.dynamics.joints.B2PrismaticJoint"]=li;li.__name__="box2D.dynamics.joints.B2PrismaticJoint";li.__super__=Sb;li.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*
(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.x),a*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y))},getReactionTorque:function(a){return a*this.m_impulse.y},getJointTranslation:function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.getWorldPoint(this.m_localAnchor1),d=b.getWorldPoint(this.m_localAnchor2);b=d.x-c.x;c=d.y-c.y;a=a.getWorldVector(this.m_localXAxis1);return a.x*b+a.y*c},getJointSpeed:function(){var a=this.m_bodyA,b=
this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y;f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;c=b.m_sweep.c.x+g-(a.m_sweep.c.x+d);f=b.m_sweep.c.y+h-(a.m_sweep.c.y+e);var m=a.getWorldVector(this.m_localXAxis1),l=a.m_linearVelocity,L=b.m_linearVelocity;a=a.m_angularVelocity;
b=b.m_angularVelocity;return c*-a*m.y+f*a*m.x+(m.x*(L.x+-b*h-l.x- -a*e)+m.y*(L.y+b*g-l.y-a*d))},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerTranslation},getUpperLimit:function(){return this.m_upperTranslation},setLimits:function(a,b){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_lowerTranslation=a;this.m_upperTranslation=b},isMotorEnabled:function(){return this.m_enableMotor},
enableMotor:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorForce:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_maxMotorForce=a},getMotorForce:function(){return this.m_motorImpulse},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=this.m_localCenterA,e=b.getLocalCenter();
d.x=e.x;d.y=e.y;d=this.m_localCenterB;e=c.getLocalCenter();d.x=e.x;d.y=e.y;var f=b.getTransform();c.getTransform();var g=b.m_xf.R,h=this.m_localAnchor1.x-this.m_localCenterA.x,m=this.m_localAnchor1.y-this.m_localCenterA.y,l=g.col1.x*h+g.col2.x*m;m=g.col1.y*h+g.col2.y*m;h=l;g=c.m_xf.R;var L=this.m_localAnchor2.x-this.m_localCenterB.x,p=this.m_localAnchor2.y-this.m_localCenterB.y;l=g.col1.x*L+g.col2.x*p;p=g.col1.y*L+g.col2.y*p;L=l;g=c.m_sweep.c.x+L-b.m_sweep.c.x-h;l=c.m_sweep.c.y+p-b.m_sweep.c.y-m;
this.m_invMassA=b.m_invMass;this.m_invMassB=c.m_invMass;this.m_invIA=b.m_invI;this.m_invIB=c.m_invI;d=this.m_axis;e=O.mulMV(f.R,this.m_localXAxis1);d.x=e.x;d.y=e.y;this.m_a1=(g+h)*this.m_axis.y-(l+m)*this.m_axis.x;this.m_a2=L*this.m_axis.y-p*this.m_axis.x;this.m_motorMass=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_a1*this.m_a1+this.m_invIB*this.m_a2*this.m_a2;this.m_motorMass>Number.MIN_VALUE&&(this.m_motorMass=1/this.m_motorMass);d=this.m_perp;e=O.mulMV(f.R,this.m_localYAxis1);d.x=e.x;d.y=
e.y;this.m_s1=(g+h)*this.m_perp.y-(l+m)*this.m_perp.x;this.m_s2=L*this.m_perp.y-p*this.m_perp.x;f=this.m_invMassA;h=this.m_invMassB;m=this.m_invIA;L=this.m_invIB;this.m_K.col1.x=f+h+m*this.m_s1*this.m_s1+L*this.m_s2*this.m_s2;this.m_K.col1.y=m*this.m_s1+L*this.m_s2;this.m_K.col1.z=m*this.m_s1*this.m_a1+L*this.m_s2*this.m_a2;this.m_K.col2.x=this.m_K.col1.y;this.m_K.col2.y=m+L;this.m_K.col2.z=m*this.m_a1+L*this.m_a2;this.m_K.col3.x=this.m_K.col1.z;this.m_K.col3.y=this.m_K.col2.z;this.m_K.col3.z=f+h+
m*this.m_a1*this.m_a1+L*this.m_a2*this.m_a2;this.m_enableLimit?(g=this.m_axis.x*g+this.m_axis.y*l,O.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ca.b2_linearSlop?this.m_limitState=3:g<=this.m_lowerTranslation?1!=this.m_limitState&&(this.m_limitState=1,this.m_impulse.z=0):g>=this.m_upperTranslation?2!=this.m_limitState&&(this.m_limitState=2,this.m_impulse.z=0):(this.m_limitState=0,this.m_impulse.z=0)):this.m_limitState=0;0==this.m_enableMotor&&(this.m_motorImpulse=0);a.warmStarting?(this.m_impulse.x*=
a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=a.dtRatio,a=this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.x,g=this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y,l=this.m_impulse.x*this.m_s1+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a1,f=this.m_impulse.x*this.m_s2+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a2,b.m_linearVelocity.x-=this.m_invMassA*a,b.m_linearVelocity.y-=this.m_invMassA*
g,b.m_angularVelocity-=this.m_invIA*l,c.m_linearVelocity.x+=this.m_invMassB*a,c.m_linearVelocity.y+=this.m_invMassB*g,c.m_angularVelocity+=this.m_invIB*f):(this.m_impulse.setZero(),this.m_motorImpulse=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,g=c.m_angularVelocity;if(this.m_enableMotor&&3!=this.m_limitState){var h=this.m_motorMass*(this.m_motorSpeed-(this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*
g-this.m_a1*e));var m=this.m_motorImpulse;a=a.dt*this.m_maxMotorForce;this.m_motorImpulse=O.clamp(this.m_motorImpulse+h,-a,a);h=this.m_motorImpulse-m;m=h*this.m_axis.x;a=h*this.m_axis.y;var l=h*this.m_a1;h*=this.m_a2;d.x-=this.m_invMassA*m;d.y-=this.m_invMassA*a;e-=this.m_invIA*l;f.x+=this.m_invMassB*m;f.y+=this.m_invMassB*a;g+=this.m_invIB*h}l=this.m_perp.x*(f.x-d.x)+this.m_perp.y*(f.y-d.y)+this.m_s2*g-this.m_s1*e;a=g-e;this.m_enableLimit&&0!=this.m_limitState?(h=this.m_axis.x*(f.x-d.x)+this.m_axis.y*
(f.y-d.y)+this.m_a2*g-this.m_a1*e,m=this.m_impulse.copy(),h=this.m_K.solve33(new We,-l,-a,-h),this.m_impulse.add(h),1==this.m_limitState?this.m_impulse.z=O.max(this.m_impulse.z,0):2==this.m_limitState&&(this.m_impulse.z=O.min(this.m_impulse.z,0)),l=-l-(this.m_impulse.z-m.z)*this.m_K.col3.x,a=-a-(this.m_impulse.z-m.z)*this.m_K.col3.y,a=this.m_K.solve22(new y,l,a),a.x+=m.x,a.y+=m.y,this.m_impulse.x=a.x,this.m_impulse.y=a.y,h.x=this.m_impulse.x-m.x,h.y=this.m_impulse.y-m.y,h.z=this.m_impulse.z-m.z,m=
h.x*this.m_perp.x+h.z*this.m_axis.x,a=h.x*this.m_perp.y+h.z*this.m_axis.y,l=h.x*this.m_s1+h.y+h.z*this.m_a1,h=h.x*this.m_s2+h.y+h.z*this.m_a2):(h=this.m_K.solve22(new y,-l,-a),this.m_impulse.x+=h.x,this.m_impulse.y+=h.y,m=h.x*this.m_perp.x,a=h.x*this.m_perp.y,l=h.x*this.m_s1+h.y,h=h.x*this.m_s2+h.y);d.x-=this.m_invMassA*m;d.y-=this.m_invMassA*a;e-=this.m_invIA*l;f.x+=this.m_invMassB*m;f.y+=this.m_invMassB*a;g+=this.m_invIB*h;h=b.m_linearVelocity;h.x=d.x;h.y=d.y;b.m_angularVelocity=e;h=c.m_linearVelocity;
h.x=f.x;h.y=f.y;c.m_angularVelocity=g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_sweep.c,d=a.m_sweep.a,e=b.m_sweep.c,f=b.m_sweep.a,g=0;var h=!1;var m=0,l=zc.fromAngle(d),L=zc.fromAngle(f);var p=l;var n=this.m_localAnchor1.x-this.m_localCenterA.x;var q=this.m_localAnchor1.y-this.m_localCenterA.y;var k=p.col1.x*n+p.col2.x*q;q=p.col1.y*n+p.col2.y*q;n=k;p=L;L=this.m_localAnchor2.x-this.m_localCenterB.x;var t=this.m_localAnchor2.y-this.m_localCenterB.y;k=p.col1.x*L+p.col2.x*
t;t=p.col1.y*L+p.col2.y*t;L=k;p=e.x+L-c.x-n;k=e.y+t-c.y-q;if(this.m_enableLimit){this.m_axis=O.mulMV(l,this.m_localXAxis1);this.m_a1=(p+n)*this.m_axis.y-(k+q)*this.m_axis.x;this.m_a2=L*this.m_axis.y-t*this.m_axis.x;var v=this.m_axis.x*p+this.m_axis.y*k;O.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ca.b2_linearSlop?(m=O.clamp(v,-ca.b2_maxLinearCorrection,ca.b2_maxLinearCorrection),g=O.abs(v),h=!0):v<=this.m_lowerTranslation?(m=O.clamp(v-this.m_lowerTranslation+ca.b2_linearSlop,-ca.b2_maxLinearCorrection,
0),g=this.m_lowerTranslation-v,h=!0):v>=this.m_upperTranslation&&(m=O.clamp(v-this.m_upperTranslation+ca.b2_linearSlop,0,ca.b2_maxLinearCorrection),g=v-this.m_upperTranslation,h=!0)}this.m_perp=O.mulMV(l,this.m_localYAxis1);this.m_s1=(p+n)*this.m_perp.y-(k+q)*this.m_perp.x;this.m_s2=L*this.m_perp.y-t*this.m_perp.x;l=new We;q=this.m_perp.x*p+this.m_perp.y*k;L=f-d-this.m_refAngle;g=O.max(g,O.abs(q));n=O.abs(L);h?(h=this.m_invMassA,t=this.m_invMassB,p=this.m_invIA,k=this.m_invIB,this.m_K.col1.x=h+t+
p*this.m_s1*this.m_s1+k*this.m_s2*this.m_s2,this.m_K.col1.y=p*this.m_s1+k*this.m_s2,this.m_K.col1.z=p*this.m_s1*this.m_a1+k*this.m_s2*this.m_a2,this.m_K.col2.x=this.m_K.col1.y,this.m_K.col2.y=p+k,this.m_K.col2.z=p*this.m_a1+k*this.m_a2,this.m_K.col3.x=this.m_K.col1.z,this.m_K.col3.y=this.m_K.col2.z,this.m_K.col3.z=h+t+p*this.m_a1*this.m_a1+k*this.m_a2*this.m_a2,this.m_K.solve33(l,-q,-L,-m)):(h=this.m_invMassA,t=this.m_invMassB,p=this.m_invIA,k=this.m_invIB,m=p*this.m_s1+k*this.m_s2,v=p+k,this.m_K.col1.set(h+
t+p*this.m_s1*this.m_s1+k*this.m_s2*this.m_s2,m,0),this.m_K.col2.set(m,v,0),m=this.m_K.solve22(new y,-q,-L),l.x=m.x,l.y=m.y,l.z=0);m=l.x*this.m_perp.x+l.z*this.m_axis.x;h=l.x*this.m_perp.y+l.z*this.m_axis.y;q=l.x*this.m_s1+l.y+l.z*this.m_a1;l=l.x*this.m_s2+l.y+l.z*this.m_a2;c.x-=this.m_invMassA*m;c.y-=this.m_invMassA*h;d-=this.m_invIA*q;e.x+=this.m_invMassB*m;e.y+=this.m_invMassB*h;f+=this.m_invIB*l;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();return g<=ca.b2_linearSlop?
n<=ca.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_localXAxis1:null,m_localYAxis1:null,m_refAngle:null,m_axis:null,m_perp:null,m_s1:null,m_s2:null,m_a1:null,m_a2:null,m_K:null,m_impulse:null,m_motorMass:null,m_motorImpulse:null,m_lowerTranslation:null,m_upperTranslation:null,m_maxMotorForce:null,m_motorSpeed:null,m_enableLimit:null,m_enableMotor:null,m_limitState:null,__class__:li});var Fk=function(){Vc.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.localAxisA=new y;
this.type=2;var a=this.localAxisA,b=1,c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.referenceAngle=0;this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};k["box2D.dynamics.joints.B2PrismaticJointDef"]=Fk;Fk.__name__="box2D.dynamics.joints.B2PrismaticJointDef";Fk.__super__=Vc;Fk.prototype=u(Vc.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);
this.localAxisA=this.bodyA.getLocalVector(d);this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},localAnchorA:null,localAnchorB:null,localAxisA:null,referenceAngle:null,enableLimit:null,lowerTranslation:null,upperTranslation:null,enableMotor:null,maxMotorForce:null,motorSpeed:null,__class__:Fk});var sg=function(a){Sb.call(this,a);this.m_groundAnchor1=new y;this.m_groundAnchor2=new y;this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_u1=new y;this.m_u2=new y;this.m_ground=this.m_bodyA.m_world.m_groundBody;
this.m_groundAnchor1.x=a.groundAnchorA.x-this.m_ground.m_xf.position.x;this.m_groundAnchor1.y=a.groundAnchorA.y-this.m_ground.m_xf.position.y;this.m_groundAnchor2.x=a.groundAnchorB.x-this.m_ground.m_xf.position.x;this.m_groundAnchor2.y=a.groundAnchorB.y-this.m_ground.m_xf.position.y;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_ratio=a.ratio;this.m_constant=a.lengthA+this.m_ratio*a.lengthB;this.m_maxLength1=O.min(a.maxLengthA,
this.m_constant-this.m_ratio*sg.b2_minPulleyLength);this.m_maxLength2=O.min(a.maxLengthB,(this.m_constant-sg.b2_minPulleyLength)/this.m_ratio);this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0};k["box2D.dynamics.joints.B2PulleyJoint"]=sg;sg.__name__="box2D.dynamics.joints.B2PulleyJoint";sg.__super__=Sb;sg.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*
this.m_impulse*this.m_u2.x,a*this.m_impulse*this.m_u2.y)},getReactionTorque:function(a){return 0},getGroundAnchorA:function(){var a=this.m_ground.m_xf.position.copy();a.add(this.m_groundAnchor1);return a},getGroundAnchorB:function(){var a=this.m_ground.m_xf.position.copy();a.add(this.m_groundAnchor2);return a},getLength1:function(){var a=this.m_bodyA.getWorldPoint(this.m_localAnchor1),b=a.x-(this.m_ground.m_xf.position.x+this.m_groundAnchor1.x);a=a.y-(this.m_ground.m_xf.position.y+this.m_groundAnchor1.y);
return Math.sqrt(b*b+a*a)},getLength2:function(){var a=this.m_bodyB.getWorldPoint(this.m_localAnchor2),b=a.x-(this.m_ground.m_xf.position.x+this.m_groundAnchor2.x);a=a.y-(this.m_ground.m_xf.position.y+this.m_groundAnchor2.y);return Math.sqrt(b*b+a*a)},getRatio:function(){return this.m_ratio},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchor1.x-b.m_sweep.localCenter.x,f=this.m_localAnchor1.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f;f=d.col1.y*
e+d.col2.y*f;e=g;d=c.m_xf.R;var h=this.m_localAnchor2.x-c.m_sweep.localCenter.x,m=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*h+d.col2.x*m;m=d.col1.y*h+d.col2.y*m;h=g;g=c.m_sweep.c.x+h;var l=c.m_sweep.c.y+m,L=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x,p=this.m_ground.m_xf.position.y+this.m_groundAnchor2.y;d=this.m_u1;var n=b.m_sweep.c.x+e-(this.m_ground.m_xf.position.x+this.m_groundAnchor1.x),q=b.m_sweep.c.y+f-(this.m_ground.m_xf.position.y+this.m_groundAnchor1.y);null==q&&
(q=0);null==n&&(n=0);d.x=n;d.y=q;d=this.m_u2;n=g-L;q=l-p;null==q&&(q=0);null==n&&(n=0);d.x=n;d.y=q;g=this.m_u1.length();l=this.m_u2.length();g>ca.b2_linearSlop?this.m_u1.multiply(1/g):(d=this.m_u1,d.x=0,d.y=0);l>ca.b2_linearSlop?this.m_u2.multiply(1/l):(d=this.m_u2,d.x=0,d.y=0);0<this.m_constant-g-this.m_ratio*l?this.m_impulse=this.m_state=0:this.m_state=2;g<this.m_maxLength1?this.m_limitImpulse1=this.m_limitState1=0:this.m_limitState1=2;l<this.m_maxLength2?this.m_limitImpulse2=this.m_limitState2=
0:this.m_limitState2=2;d=e*this.m_u1.y-f*this.m_u1.x;g=h*this.m_u2.y-m*this.m_u2.x;this.m_limitMass1=b.m_invMass+b.m_invI*d*d;this.m_limitMass2=c.m_invMass+c.m_invI*g*g;this.m_pulleyMass=this.m_limitMass1+this.m_ratio*this.m_ratio*this.m_limitMass2;this.m_limitMass1=1/this.m_limitMass1;this.m_limitMass2=1/this.m_limitMass2;this.m_pulleyMass=1/this.m_pulleyMass;a.warmStarting?(this.m_impulse*=a.dtRatio,this.m_limitImpulse1*=a.dtRatio,this.m_limitImpulse2*=a.dtRatio,a=(-this.m_impulse-this.m_limitImpulse1)*
this.m_u1.x,d=(-this.m_impulse-this.m_limitImpulse1)*this.m_u1.y,g=(-this.m_ratio*this.m_impulse-this.m_limitImpulse2)*this.m_u2.x,l=(-this.m_ratio*this.m_impulse-this.m_limitImpulse2)*this.m_u2.y,b.m_linearVelocity.x+=b.m_invMass*a,b.m_linearVelocity.y+=b.m_invMass*d,b.m_angularVelocity+=b.m_invI*(e*d-f*a),c.m_linearVelocity.x+=c.m_invMass*g,c.m_linearVelocity.y+=c.m_invMass*l,c.m_angularVelocity+=c.m_invI*(h*l-m*g)):this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0},solveVelocityConstraints:function(a){a=
this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y;f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;if(2==this.m_state){c=a.m_linearVelocity.x+-a.m_angularVelocity*e;f=a.m_linearVelocity.y+a.m_angularVelocity*d;var m=b.m_linearVelocity.x+-b.m_angularVelocity*
h;var l=b.m_linearVelocity.y+b.m_angularVelocity*g;c=-(this.m_u1.x*c+this.m_u1.y*f)-this.m_ratio*(this.m_u2.x*m+this.m_u2.y*l);l=this.m_pulleyMass*-c;c=this.m_impulse;this.m_impulse=O.max(0,this.m_impulse+l);l=this.m_impulse-c;c=-l*this.m_u1.x;f=-l*this.m_u1.y;m=-this.m_ratio*l*this.m_u2.x;l=-this.m_ratio*l*this.m_u2.y;a.m_linearVelocity.x+=a.m_invMass*c;a.m_linearVelocity.y+=a.m_invMass*f;a.m_angularVelocity+=a.m_invI*(d*f-e*c);b.m_linearVelocity.x+=b.m_invMass*m;b.m_linearVelocity.y+=b.m_invMass*
l;b.m_angularVelocity+=b.m_invI*(g*l-h*m)}2==this.m_limitState1&&(c=a.m_linearVelocity.x+-a.m_angularVelocity*e,f=a.m_linearVelocity.y+a.m_angularVelocity*d,c=-(this.m_u1.x*c+this.m_u1.y*f),l=-this.m_limitMass1*c,c=this.m_limitImpulse1,this.m_limitImpulse1=O.max(0,this.m_limitImpulse1+l),l=this.m_limitImpulse1-c,c=-l*this.m_u1.x,f=-l*this.m_u1.y,a.m_linearVelocity.x+=a.m_invMass*c,a.m_linearVelocity.y+=a.m_invMass*f,a.m_angularVelocity+=a.m_invI*(d*f-e*c));2==this.m_limitState2&&(m=b.m_linearVelocity.x+
-b.m_angularVelocity*h,l=b.m_linearVelocity.y+b.m_angularVelocity*g,c=-(this.m_u2.x*m+this.m_u2.y*l),l=-this.m_limitMass2*c,c=this.m_limitImpulse2,this.m_limitImpulse2=O.max(0,this.m_limitImpulse2+l),l=this.m_limitImpulse2-c,m=-l*this.m_u2.x,l=-l*this.m_u2.y,b.m_linearVelocity.x+=b.m_invMass*m,b.m_linearVelocity.y+=b.m_invMass*l,b.m_angularVelocity+=b.m_invI*(g*l-h*m))},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=this.m_ground.m_xf.position.x+this.m_groundAnchor1.x,d=
this.m_ground.m_xf.position.y+this.m_groundAnchor1.y,e=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x,f=this.m_ground.m_xf.position.y+this.m_groundAnchor2.y,g=0;if(2==this.m_state){var h=a.m_xf.R;var m=this.m_localAnchor1.x-a.m_sweep.localCenter.x;var l=this.m_localAnchor1.y-a.m_sweep.localCenter.y;var L=h.col1.x*m+h.col2.x*l;l=h.col1.y*m+h.col2.y*l;m=L;h=b.m_xf.R;var p=this.m_localAnchor2.x-b.m_sweep.localCenter.x;var n=this.m_localAnchor2.y-b.m_sweep.localCenter.y;L=h.col1.x*p+h.col2.x*n;
n=h.col1.y*p+h.col2.y*n;p=L;var q=a.m_sweep.c.x+m;var k=a.m_sweep.c.y+l;L=b.m_sweep.c.x+p;var t=b.m_sweep.c.y+n;h=this.m_u1;q-=c;k-=d;null==k&&(k=0);null==q&&(q=0);h.x=q;h.y=k;h=this.m_u2;q=L-e;k=t-f;null==k&&(k=0);null==q&&(q=0);h.x=q;h.y=k;L=this.m_u1.length();k=this.m_u2.length();L>ca.b2_linearSlop?this.m_u1.multiply(1/L):(h=this.m_u1,h.x=0,h.y=0);k>ca.b2_linearSlop?this.m_u2.multiply(1/k):(h=this.m_u2,h.x=0,h.y=0);h=this.m_constant-L-this.m_ratio*k;g=O.max(g,-h);h=O.clamp(h+ca.b2_linearSlop,-ca.b2_maxLinearCorrection,
0);h*=-this.m_pulleyMass;q=-h*this.m_u1.x;k=-h*this.m_u1.y;L=-this.m_ratio*h*this.m_u2.x;t=-this.m_ratio*h*this.m_u2.y;a.m_sweep.c.x+=a.m_invMass*q;a.m_sweep.c.y+=a.m_invMass*k;a.m_sweep.a+=a.m_invI*(m*k-l*q);b.m_sweep.c.x+=b.m_invMass*L;b.m_sweep.c.y+=b.m_invMass*t;b.m_sweep.a+=b.m_invI*(p*t-n*L);a.synchronizeTransform();b.synchronizeTransform()}2==this.m_limitState1&&(h=a.m_xf.R,m=this.m_localAnchor1.x-a.m_sweep.localCenter.x,l=this.m_localAnchor1.y-a.m_sweep.localCenter.y,L=h.col1.x*m+h.col2.x*
l,l=h.col1.y*m+h.col2.y*l,m=L,q=a.m_sweep.c.x+m,k=a.m_sweep.c.y+l,h=this.m_u1,q-=c,k-=d,null==k&&(k=0),null==q&&(q=0),h.x=q,h.y=k,L=this.m_u1.length(),L>ca.b2_linearSlop?(this.m_u1.x*=1/L,this.m_u1.y*=1/L):(h=this.m_u1,h.x=0,h.y=0),h=this.m_maxLength1-L,g=O.max(g,-h),h=O.clamp(h+ca.b2_linearSlop,-ca.b2_maxLinearCorrection,0),h*=-this.m_limitMass1,q=-h*this.m_u1.x,k=-h*this.m_u1.y,a.m_sweep.c.x+=a.m_invMass*q,a.m_sweep.c.y+=a.m_invMass*k,a.m_sweep.a+=a.m_invI*(m*k-l*q),a.synchronizeTransform());2==
this.m_limitState2&&(h=b.m_xf.R,p=this.m_localAnchor2.x-b.m_sweep.localCenter.x,n=this.m_localAnchor2.y-b.m_sweep.localCenter.y,L=h.col1.x*p+h.col2.x*n,n=h.col1.y*p+h.col2.y*n,p=L,L=b.m_sweep.c.x+p,t=b.m_sweep.c.y+n,h=this.m_u2,q=L-e,k=t-f,null==k&&(k=0),null==q&&(q=0),h.x=q,h.y=k,k=this.m_u2.length(),k>ca.b2_linearSlop?(this.m_u2.x*=1/k,this.m_u2.y*=1/k):(h=this.m_u2,h.x=0,h.y=0),h=this.m_maxLength2-k,g=O.max(g,-h),h=O.clamp(h+ca.b2_linearSlop,-ca.b2_maxLinearCorrection,0),h*=-this.m_limitMass2,
L=-h*this.m_u2.x,t=-h*this.m_u2.y,b.m_sweep.c.x+=b.m_invMass*L,b.m_sweep.c.y+=b.m_invMass*t,b.m_sweep.a+=b.m_invI*(p*t-n*L),b.synchronizeTransform());return g<ca.b2_linearSlop},m_ground:null,m_groundAnchor1:null,m_groundAnchor2:null,m_localAnchor1:null,m_localAnchor2:null,m_u1:null,m_u2:null,m_constant:null,m_ratio:null,m_maxLength1:null,m_maxLength2:null,m_pulleyMass:null,m_limitMass1:null,m_limitMass2:null,m_impulse:null,m_limitImpulse1:null,m_limitImpulse2:null,m_state:null,m_limitState1:null,
m_limitState2:null,__class__:sg});var Gk=function(){Vc.call(this);this.groundAnchorA=new y;this.groundAnchorB=new y;this.localAnchorA=new y;this.localAnchorB=new y;this.type=4;var a=this.groundAnchorA,b=-1,c=1;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.groundAnchorB;c=b=1;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.localAnchorA;b=-1;c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.localAnchorB;b=1;c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.maxLengthB=this.lengthB=this.maxLengthA=
this.lengthA=0;this.ratio=1;this.collideConnected=!0};k["box2D.dynamics.joints.B2PulleyJointDef"]=Gk;Gk.__name__="box2D.dynamics.joints.B2PulleyJointDef";Gk.__super__=Vc;Gk.prototype=u(Vc.prototype,{initialize:function(a,b,c,d,e,f,g){this.bodyA=a;this.bodyB=b;a=this.groundAnchorA;a.x=c.x;a.y=c.y;a=this.groundAnchorB;a.x=d.x;a.y=d.y;this.localAnchorA=this.bodyA.getLocalPoint(e);this.localAnchorB=this.bodyB.getLocalPoint(f);a=e.x-c.x;c=e.y-c.y;this.lengthA=Math.sqrt(a*a+c*c);c=f.x-d.x;d=f.y-d.y;this.lengthB=
Math.sqrt(c*c+d*d);this.ratio=g;g=this.lengthA+this.ratio*this.lengthB;this.maxLengthA=g-this.ratio*sg.b2_minPulleyLength;this.maxLengthB=(g-sg.b2_minPulleyLength)/this.ratio},groundAnchorA:null,groundAnchorB:null,localAnchorA:null,localAnchorB:null,lengthA:null,maxLengthA:null,lengthB:null,maxLengthB:null,ratio:null,__class__:Gk});var cg=function(a){Sb.call(this,a);this.K=new zc;this.K1=new zc;this.K2=new zc;this.K3=new zc;this.impulse3=new We;this.impulse2=new y;this.reduced=new y;this.m_localAnchor1=
new y;this.m_localAnchor2=new y;this.m_impulse=new We;this.m_mass=new Ch;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_referenceAngle=a.referenceAngle;this.m_impulse.setZero();this.m_motorImpulse=0;this.m_lowerAngle=a.lowerAngle;this.m_upperAngle=a.upperAngle;this.m_maxMotorTorque=a.maxMotorTorque;this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=a.enableLimit;this.m_enableMotor=a.enableMotor;this.m_limitState=0};k["box2D.dynamics.joints.B2RevoluteJoint"]=
cg;cg.__name__="box2D.dynamics.joints.B2RevoluteJoint";cg.__super__=Sb;cg.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return a*this.m_impulse.z},getJointAngle:function(){return this.m_bodyB.m_sweep.a-this.m_bodyA.m_sweep.a-this.m_referenceAngle},getJointSpeed:function(){return this.m_bodyB.m_angularVelocity-
this.m_bodyA.m_angularVelocity},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerAngle},getUpperLimit:function(){return this.m_upperAngle},setLimits:function(a,b){this.m_lowerAngle=a;this.m_upperAngle=b},isMotorEnabled:function(){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);return this.m_enableMotor},enableMotor:function(a){this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);
this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorTorque:function(a){this.m_maxMotorTorque=a},getMotorTorque:function(){return this.m_maxMotorTorque},K:null,K1:null,K2:null,K3:null,initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchor1.x-b.m_sweep.localCenter.x,f=this.m_localAnchor1.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f;f=d.col1.y*e+d.col2.y*f;e=g;d=c.m_xf.R;var h=this.m_localAnchor2.x-
c.m_sweep.localCenter.x,m=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*h+d.col2.x*m;m=d.col1.y*h+d.col2.y*m;h=g;d=b.m_invMass;g=c.m_invMass;var l=b.m_invI,n=c.m_invI;this.m_mass.col1.x=d+g+f*f*l+m*m*n;this.m_mass.col2.x=-f*e*l-m*h*n;this.m_mass.col3.x=-f*l-m*n;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=d+g+e*e*l+h*h*n;this.m_mass.col3.y=e*l+h*n;this.m_mass.col1.z=this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;this.m_mass.col3.z=l+n;this.m_motorMass=1/(l+n);0==this.m_enableMotor&&
(this.m_motorImpulse=0);if(this.m_enableLimit){var p=c.m_sweep.a-b.m_sweep.a-this.m_referenceAngle;O.abs(this.m_upperAngle-this.m_lowerAngle)<2*ca.b2_angularSlop?this.m_limitState=3:p<=this.m_lowerAngle?(1!=this.m_limitState&&(this.m_impulse.z=0),this.m_limitState=1):p>=this.m_upperAngle?(2!=this.m_limitState&&(this.m_impulse.z=0),this.m_limitState=2):(this.m_limitState=0,this.m_impulse.z=0)}else this.m_limitState=0;a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=
a.dtRatio,a=this.m_impulse.x,p=this.m_impulse.y,b.m_linearVelocity.x-=d*a,b.m_linearVelocity.y-=d*p,b.m_angularVelocity-=l*(e*p-f*a+this.m_motorImpulse+this.m_impulse.z),c.m_linearVelocity.x+=g*a,c.m_linearVelocity.y+=g*p,c.m_angularVelocity+=n*(h*p-m*a+this.m_motorImpulse+this.m_impulse.z)):(this.m_impulse.setZero(),this.m_motorImpulse=0)},impulse3:null,impulse2:null,reduced:null,solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,
g=c.m_angularVelocity,h=b.m_invMass,m=c.m_invMass,l=b.m_invI,n=c.m_invI;if(this.m_enableMotor&&3!=this.m_limitState){var p=this.m_motorMass*-(g-e-this.m_motorSpeed);var q=this.m_motorImpulse;a=a.dt*this.m_maxMotorTorque;this.m_motorImpulse=O.clamp(this.m_motorImpulse+p,-a,a);p=this.m_motorImpulse-q;e-=l*p;g+=n*p}if(this.m_enableLimit&&0!=this.m_limitState){var k=b.m_xf.R;p=this.m_localAnchor1.x-b.m_sweep.localCenter.x;q=this.m_localAnchor1.y-b.m_sweep.localCenter.y;var t=k.col1.x*p+k.col2.x*q;q=k.col1.y*
p+k.col2.y*q;p=t;k=c.m_xf.R;a=this.m_localAnchor2.x-c.m_sweep.localCenter.x;var v=this.m_localAnchor2.y-c.m_sweep.localCenter.y;t=k.col1.x*a+k.col2.x*v;v=k.col1.y*a+k.col2.y*v;a=t;t=f.x+-g*v-d.x- -e*q;var r=f.y+g*a-d.y-e*p;this.m_mass.solve33(this.impulse3,-t,-r,-(g-e));3==this.m_limitState?this.m_impulse.add(this.impulse3):1==this.m_limitState?(k=this.m_impulse.z+this.impulse3.z,0>k&&(this.m_mass.solve22(this.reduced,-t,-r),this.impulse3.x=this.reduced.x,this.impulse3.y=this.reduced.y,this.impulse3.z=
-this.m_impulse.z,this.m_impulse.x+=this.reduced.x,this.m_impulse.y+=this.reduced.y,this.m_impulse.z=0)):2==this.m_limitState&&(k=this.m_impulse.z+this.impulse3.z,0<k&&(this.m_mass.solve22(this.reduced,-t,-r),this.impulse3.x=this.reduced.x,this.impulse3.y=this.reduced.y,this.impulse3.z=-this.m_impulse.z,this.m_impulse.x+=this.reduced.x,this.m_impulse.y+=this.reduced.y,this.m_impulse.z=0));d.x-=h*this.impulse3.x;d.y-=h*this.impulse3.y;e-=l*(p*this.impulse3.y-q*this.impulse3.x+this.impulse3.z);f.x+=
m*this.impulse3.x;f.y+=m*this.impulse3.y;g+=n*(a*this.impulse3.y-v*this.impulse3.x+this.impulse3.z)}else k=b.m_xf.R,p=this.m_localAnchor1.x-b.m_sweep.localCenter.x,q=this.m_localAnchor1.y-b.m_sweep.localCenter.y,t=k.col1.x*p+k.col2.x*q,q=k.col1.y*p+k.col2.y*q,p=t,k=c.m_xf.R,a=this.m_localAnchor2.x-c.m_sweep.localCenter.x,v=this.m_localAnchor2.y-c.m_sweep.localCenter.y,t=k.col1.x*a+k.col2.x*v,v=k.col1.y*a+k.col2.y*v,a=t,this.m_mass.solve22(this.impulse2,-(f.x+-g*v-d.x- -e*q),-(f.y+g*a-d.y-e*p)),this.m_impulse.x+=
this.impulse2.x,this.m_impulse.y+=this.impulse2.y,d.x-=h*this.impulse2.x,d.y-=h*this.impulse2.y,e-=l*(p*this.impulse2.y-q*this.impulse2.x),f.x+=m*this.impulse2.x,f.y+=m*this.impulse2.y,g+=n*(a*this.impulse2.y-v*this.impulse2.x);h=b.m_linearVelocity;h.x=d.x;h.y=d.y;b.m_angularVelocity=e;h=c.m_linearVelocity;h.x=f.x;h.y=f.y;c.m_angularVelocity=g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=0;if(this.m_enableLimit&&0!=this.m_limitState){var d=b.m_sweep.a-a.m_sweep.a-this.m_referenceAngle;
var e=0;3==this.m_limitState?(d=O.clamp(d-this.m_lowerAngle,-ca.b2_maxAngularCorrection,ca.b2_maxAngularCorrection),e=-this.m_motorMass*d,c=O.abs(d)):1==this.m_limitState?(d-=this.m_lowerAngle,c=-d,d=O.clamp(d+ca.b2_angularSlop,-ca.b2_maxAngularCorrection,0),e=-this.m_motorMass*d):2==this.m_limitState&&(c=d-=this.m_upperAngle,d=O.clamp(d-ca.b2_angularSlop,0,ca.b2_maxAngularCorrection),e=-this.m_motorMass*d);a.m_sweep.a-=a.m_invI*e;b.m_sweep.a+=b.m_invI*e;a.synchronizeTransform();b.synchronizeTransform()}var f=
a.m_xf.R;e=this.m_localAnchor1.x-a.m_sweep.localCenter.x;d=this.m_localAnchor1.y-a.m_sweep.localCenter.y;var g=f.col1.x*e+f.col2.x*d;d=f.col1.y*e+f.col2.y*d;e=g;f=b.m_xf.R;var h=this.m_localAnchor2.x-b.m_sweep.localCenter.x,m=this.m_localAnchor2.y-b.m_sweep.localCenter.y;g=f.col1.x*h+f.col2.x*m;m=f.col1.y*h+f.col2.y*m;h=g;var l=b.m_sweep.c.x+h-a.m_sweep.c.x-e;var n=b.m_sweep.c.y+m-a.m_sweep.c.y-d;var p=l*l+n*n;f=Math.sqrt(p);g=a.m_invMass;var q=b.m_invMass,k=a.m_invI,t=b.m_invI,v=10*ca.b2_linearSlop;
p>v*v&&(p=1/(g+q),l=p*-l,n=p*-n,a.m_sweep.c.x-=.5*g*l,a.m_sweep.c.y-=.5*g*n,b.m_sweep.c.x+=.5*q*l,b.m_sweep.c.y+=.5*q*n,l=b.m_sweep.c.x+h-a.m_sweep.c.x-e,n=b.m_sweep.c.y+m-a.m_sweep.c.y-d);this.K1.col1.x=g+q;this.K1.col2.x=0;this.K1.col1.y=0;this.K1.col2.y=g+q;this.K2.col1.x=k*d*d;this.K2.col2.x=-k*e*d;this.K2.col1.y=-k*e*d;this.K2.col2.y=k*e*e;this.K3.col1.x=t*m*m;this.K3.col2.x=-t*h*m;this.K3.col1.y=-t*h*m;this.K3.col2.y=t*h*h;this.K.setM(this.K1);this.K.addM(this.K2);this.K.addM(this.K3);this.K.solve(cg.tImpulse,
-l,-n);l=cg.tImpulse.x;n=cg.tImpulse.y;a.m_sweep.c.x-=a.m_invMass*l;a.m_sweep.c.y-=a.m_invMass*n;a.m_sweep.a-=a.m_invI*(e*n-d*l);b.m_sweep.c.x+=b.m_invMass*l;b.m_sweep.c.y+=b.m_invMass*n;b.m_sweep.a+=b.m_invI*(h*n-m*l);a.synchronizeTransform();b.synchronizeTransform();return f<=ca.b2_linearSlop?c<=ca.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_impulse:null,m_motorImpulse:null,m_mass:null,m_motorMass:null,m_enableMotor:null,m_maxMotorTorque:null,m_motorSpeed:null,m_enableLimit:null,
m_referenceAngle:null,m_lowerAngle:null,m_upperAngle:null,m_limitState:null,__class__:cg});var Fh=function(){Vc.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=1;var a=this.localAnchorA,b=0,c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.localAnchorB;c=b=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.motorSpeed=this.maxMotorTorque=this.upperAngle=this.lowerAngle=this.referenceAngle=0;this.enableMotor=this.enableLimit=!1};k["box2D.dynamics.joints.B2RevoluteJointDef"]=Fh;
Fh.__name__="box2D.dynamics.joints.B2RevoluteJointDef";Fh.__super__=Vc;Fh.prototype=u(Vc.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},localAnchorA:null,localAnchorB:null,referenceAngle:null,enableLimit:null,lowerAngle:null,upperAngle:null,enableMotor:null,motorSpeed:null,maxMotorTorque:null,__class__:Fh});var Jk=function(a){Sb.call(this,
a);this.m_localAnchorA=new y;this.m_localAnchorB=new y;this.m_impulse=new We;this.m_mass=new Ch;var b=this.m_localAnchorA,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchorB;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_referenceAngle=a.referenceAngle;this.m_impulse.setZero();this.m_mass=new Ch};k["box2D.dynamics.joints.B2WeldJoint"]=Jk;Jk.__name__="box2D.dynamics.joints.B2WeldJoint";Jk.__super__=Sb;Jk.prototype=u(Sb.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchorA)},
getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchorB)},getReactionForce:function(a){return new y(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return a*this.m_impulse.z},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchorA.x-b.m_sweep.localCenter.x,f=this.m_localAnchorA.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f;f=d.col1.y*e+d.col2.y*f;e=g;d=c.m_xf.R;var h=this.m_localAnchorB.x-c.m_sweep.localCenter.x,
m=this.m_localAnchorB.y-c.m_sweep.localCenter.y;g=d.col1.x*h+d.col2.x*m;m=d.col1.y*h+d.col2.y*m;h=g;d=b.m_invMass;g=c.m_invMass;var l=b.m_invI,n=c.m_invI;this.m_mass.col1.x=d+g+f*f*l+m*m*n;this.m_mass.col2.x=-f*e*l-m*h*n;this.m_mass.col3.x=-f*l-m*n;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=d+g+e*e*l+h*h*n;this.m_mass.col3.y=e*l+h*n;this.m_mass.col1.z=this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;this.m_mass.col3.z=l+n;a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=
a.dtRatio,this.m_impulse.z*=a.dtRatio,b.m_linearVelocity.x-=d*this.m_impulse.x,b.m_linearVelocity.y-=d*this.m_impulse.y,b.m_angularVelocity-=l*(e*this.m_impulse.y-f*this.m_impulse.x+this.m_impulse.z),c.m_linearVelocity.x+=g*this.m_impulse.x,c.m_linearVelocity.y+=g*this.m_impulse.y,c.m_angularVelocity+=n*(h*this.m_impulse.y-m*this.m_impulse.x+this.m_impulse.z)):this.m_impulse.setZero()},solveVelocityConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_linearVelocity,d=a.m_angularVelocity,
e=b.m_linearVelocity,f=b.m_angularVelocity,g=a.m_invMass,h=b.m_invMass,m=a.m_invI,l=b.m_invI,n=a.m_xf.R,p=this.m_localAnchorA.x-a.m_sweep.localCenter.x,q=this.m_localAnchorA.y-a.m_sweep.localCenter.y,k=n.col1.x*p+n.col2.x*q;q=n.col1.y*p+n.col2.y*q;p=k;n=b.m_xf.R;var t=this.m_localAnchorB.x-b.m_sweep.localCenter.x,v=this.m_localAnchorB.y-b.m_sweep.localCenter.y;k=n.col1.x*t+n.col2.x*v;v=n.col1.y*t+n.col2.y*v;t=k;n=e.x-f*v-c.x+d*q;k=e.y+f*t-c.y-d*p;var r=f-d,Ka=new We;this.m_mass.solve33(Ka,-n,-k,-r);
this.m_impulse.add(Ka);c.x-=g*Ka.x;c.y-=g*Ka.y;d-=m*(p*Ka.y-q*Ka.x+Ka.z);e.x+=h*Ka.x;e.y+=h*Ka.y;f+=l*(t*Ka.y-v*Ka.x+Ka.z);a.m_angularVelocity=d;b.m_angularVelocity=f},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchorA.x-a.m_sweep.localCenter.x,e=this.m_localAnchorA.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;c=b.m_xf.R;var g=this.m_localAnchorB.x-b.m_sweep.localCenter.x,h=this.m_localAnchorB.y-b.m_sweep.localCenter.y;
f=c.col1.x*g+c.col2.x*h;h=c.col1.y*g+c.col2.y*h;g=f;c=a.m_invMass;f=b.m_invMass;var m=a.m_invI,l=b.m_invI,n=b.m_sweep.c.x+g-a.m_sweep.c.x-d,p=b.m_sweep.c.y+h-a.m_sweep.c.y-e,q=b.m_sweep.a-a.m_sweep.a-this.m_referenceAngle,k=10*ca.b2_linearSlop,t=Math.sqrt(n*n+p*p),v=O.abs(q);t>k&&(m*=1,l*=1);this.m_mass.col1.x=c+f+e*e*m+h*h*l;this.m_mass.col2.x=-e*d*m-h*g*l;this.m_mass.col3.x=-e*m-h*l;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=c+f+d*d*m+g*g*l;this.m_mass.col3.y=d*m+g*l;this.m_mass.col1.z=
this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;this.m_mass.col3.z=m+l;k=new We;this.m_mass.solve33(k,-n,-p,-q);a.m_sweep.c.x-=c*k.x;a.m_sweep.c.y-=c*k.y;a.m_sweep.a-=m*(d*k.y-e*k.x+k.z);b.m_sweep.c.x+=f*k.x;b.m_sweep.c.y+=f*k.y;b.m_sweep.a+=l*(g*k.y-h*k.x+k.z);a.synchronizeTransform();b.synchronizeTransform();return t<=ca.b2_linearSlop?v<=ca.b2_angularSlop:!1},m_localAnchorA:null,m_localAnchorB:null,m_referenceAngle:null,m_impulse:null,m_mass:null,__class__:Jk});var Kk=function(){Vc.call(this);
this.localAnchorA=new y;this.localAnchorB=new y;this.type=8;this.referenceAngle=0};k["box2D.dynamics.joints.B2WeldJointDef"]=Kk;Kk.__name__="box2D.dynamics.joints.B2WeldJointDef";Kk.__super__=Vc;Kk.prototype=u(Vc.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;b=this.bodyB.getLocalPoint(c);a.x=b.x;a.y=b.y;this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},localAnchorA:null,localAnchorB:null,
referenceAngle:null,__class__:Kk});var Gn=function(){this.stringMapCloner=new Nk(this,ia);this.intMapCloner=new Nk(this,Xa);this.classHandles=new ia;this.classHandles.h.String=r(this,this.returnString);this.classHandles.h.Array=r(this,this.cloneArray);this.classHandles.h["haxe.ds.StringMap"]=(C=this.stringMapCloner,r(C,C.clone));this.classHandles.h["haxe.ds.IntMap"]=(C=this.intMapCloner,r(C,C.clone))};k["cloner.Cloner"]=Gn;Gn.__name__="cloner.Cloner";Gn.prototype={cache:null,classHandles:null,stringMapCloner:null,
intMapCloner:null,depth:null,returnString:function(a){return a},clone:function(a){this.cache=new Vb;this.depth=0;++this.depth;a=this.__clone(a);--this.depth;this.cache=null;return a},_clone:function(a){++this.depth;a=this.__clone(a);--this.depth;return a},__clone:function(a){if(30<this.depth)throw J.thrown("deep clone");if("string"==typeof a)return a;try{if(null!=a.__name__)return a}catch(c){xb.lastError=c}var b=Ia.typeof(a);switch(b._hx_index){case 0:return null;case 1:return a;case 2:return a;case 3:return a;
case 4:return this.handleAnonymous(a);case 5:return null;case 6:return b=b.c,null==this.cache.h.__keys__[a.__id__]&&this.cache.set(a,this.handleClass(b,a)),this.cache.h[a.__id__];case 7:return a;case 8:return null}},handleAnonymous:function(a){for(var b=X.fields(a),c={},d=0,e=b.length;d<e;){var f=d++;f=b[f];var g=X.getProperty(a,f);++this.depth;g=this.__clone(g);--this.depth;c[f]=g}return c},handleClass:function(a,b){a=this.classHandles.h[a.__name__];null==a&&(a=r(this,this.cloneClass));return a(b)},
cloneArray:function(a){a=a.slice();for(var b=0,c=a.length;b<c;){var d=b++;++this.depth;var e=this.__clone(a[d]);--this.depth;a[d]=e}return a},cloneClass:function(a){for(var b=Object.create(U.getClass(a).prototype),c=X.fields(a),d=0,e=c.length;d<e;){var f=d++;f=c[f];var g=X.getProperty(a,f);++this.depth;g=this.__clone(g);--this.depth;b[f]=g}return b},__class__:Gn};var Nk=function(a,b){this.cloner=a;this.type=b;this.noArgs=[]};k["cloner.MapCloner"]=Nk;Nk.__name__="cloner.MapCloner";Nk.prototype={cloner:null,
type:null,noArgs:null,clone:function(a){for(var b=Ia.createInstance(this.type,this.noArgs),c=a.keys();c.hasNext();){var d=c.next(),e=this.cloner,f=a.get(d);++e.depth;f=e.__clone(f);--e.depth;b.set(d,f)}return b},__class__:Nk};var Kg=function(a){null==a&&(a=!0);Ya.call(this);this.alignRight=a;this.start=!0;this.fps=this.mem_max=0;this.text=new ef;this.text.set_defaultTextFormat(new tg("_sans",10,16777215));this.text.set_wordWrap(!0);this.text.set_multiline(!0);this.text.set_width(70);this.text.set_height(50);
this.text.set_selectable(!1);this.text.mouseEnabled=!1;this.rectangle=new fa(69,0,1,50);this.addEventListener("addedToStage",r(this,this.init),!1,0,!0);this.addEventListener("removedFromStage",r(this,this.destroy),!1,0,!0)};k["com.nmefermmmtools.debug.Stats"]=Kg;Kg.__name__="com.nmefermmmtools.debug.Stats";Kg.__super__=Ya;Kg.prototype=u(Ya.prototype,{text:null,timer:null,fps:null,ms:null,ms_prev:null,mem:null,mem_max:null,graph:null,rectangle:null,alignRight:null,start:null,fps_graph:null,mem_graph:null,
ms_graph:null,mem_max_graph:null,_stage:null,fpsStr:null,memStr:null,memMaxStr:null,msStr:null,init:function(a){this._stage=Da.get_current().stage;this.get_graphics().beginFill(51);this.get_graphics().drawRect(0,0,70,50);this.get_graphics().endFill();this.addChild(this.text);this.graph=new La(70,50,!1,51);this.addEventListener("enterFrame",r(this,this.update))},destroy:function(a){for(this.get_graphics().clear();0<this.get_numChildren();)this.removeChildAt(0);this.graph.dispose();this.removeEventListener("enterFrame",
r(this,this.update))},update:function(a){this.start&&this.alignRight&&(this.set_x(this._stage.stageWidth-this.get_width()),this.start=!1);this.timer=Da.getTimer();this.timer-1E3>this.ms_prev?(this.mem=9.54E-7*dg.get_totalMemory(),this.mem_max=this.mem_max>this.mem?this.mem_max:this.mem,this.fps_graph=50-(Math.min(50,this.fps/this._stage.get_frameRate()*50)|0),this.mem_graph=50-this.normalizeMem(this.mem),this.mem_max_graph=50-this.normalizeMem(this.mem_max),this.ms_graph=50-(this.timer-this.ms>>1)|
0,this.graph.scroll(-1,0),this.get_graphics().clear(),this.get_graphics().beginFill(51),this.get_graphics().drawRect(0,0,70,50),this.get_graphics().endFill(),this.get_graphics().beginBitmapFill(this.graph,new wa(1,0,0,1,0,50)),this.get_graphics().drawRect(0,50,70,50),this.get_graphics().endFill(),this.graph.fillRect(this.rectangle,51),this.graph.lock(),this.graph.setPixel(69,this.fps_graph,16776960),this.graph.setPixel(69,this.mem_graph,65535),this.graph.setPixel(69,this.mem_max_graph,16711792),this.graph.setPixel(69,
this.ms_graph,65280),this.graph.unlock(),60<this.fps&&(this.fps=60),this.fpsStr="FPS: "+this.fps+" / 60",this.memStr="MEM: "+Math.round(this.mem),this.memMaxStr="MAX: "+Math.round(this.mem_max),this.fps=0,this.ms_prev=this.timer,this.text.set_htmlText("<font color='#ffff00'>"+this.fpsStr+"</font><br><font color='#00ffff'>"+this.memStr+"</font><br><font color='#ff0070'>"+this.memMaxStr+"</font>")):(this.fps++,this.ms=this.timer)},normalizeMem:function(a){return Math.min(50,Math.sqrt(Math.sqrt(5E3*
a)))-2|0},__class__:Kg});var ug=function(){};k["com.nmefermmmtools.debug.Colors"]=ug;ug.__name__="com.nmefermmmtools.debug.Colors";var ha=function(){};k["com.stencyl.Config"]=ha;ha.__name__="com.stencyl.Config";ha.load=function(){var a=W.getConfigText("config/game-config.json");ha.loadFromString(a)};ha.loadMap=function(a,b){for(var c=0,d=X.fields(a);c<d.length;){var e=d[c];++c;R.startsWith(e,"config-")?Object.prototype.hasOwnProperty.call(ha.defines.h,I.substr(e,7,null))&&ha.loadMap(X.field(a,e),
b):b[e]=X.field(a,e)}return b};ha.loadFromString=function(a,b){null==b&&(b=!0);if(null!=ha.data&&b){b=ha.data;ha.data=ha.loadMap(JSON.parse(a),{});ha.setStaticFields();for(var c=a=!1,d=0,e=X.fields(b);d<e.length;){var f=e[d];++d;var g=X.field(b,f),h=X.field(ha.data,f);if(g!=h)switch(Q.debug("value of "+f+" changed: "+g+" -> "+h,{fileName:"com/stencyl/Config.hx",lineNumber:110,className:"com.stencyl.Config",methodName:"loadFromString"}),f){case "debugDraw":(q.DEBUG_DRAW=ha.debugDraw)||null!=q.debugDrawer&&
null!=q.debugDrawer.m_sprite&&q.debugDrawer.m_sprite.get_graphics().clear();break;case "disposeImages":case "physicsMode":c=!0;break;case "antialias":case "forceHiResAssets":case "gameScale":case "scaleMode":case "scales":case "stageHeight":case "stageWidth":a=!0;break;case "keys":M.loadInputConfig();break;case "showConsole":q.engine.setStatsVisible(ha.showConsole)}}c?q.reloadGame():a&&q.engine.reloadScreen()}else ha.data=ha.loadMap(JSON.parse(a),{}),ha.setStaticFields()};ha.setStaticFields=function(){ha.landscape=
ha.data.landscape;ha.autorotate=ha.data.autorotate;ha.scaleMode=ii.fromString(ha.data.scaleMode);ha.stageWidth=ha.data.stageWidth;ha.stageHeight=ha.data.stageHeight;ha.initSceneID=ha.data.initSceneID;ha.physicsMode=Hn.fromString(ha.data.physicsMode);ha.gameScale=ha.data.gameScale;ha.forceHiResAssets=ha.data.forceHiResAssets;ha.antialias=ha.data.antialias;ha.pixelsnap=ha.data.pixelsnap;ha.startInFullScreen=ha.data.startInFullScreen;ha.disposeImages=ha.data.disposeImages;ha.releaseMode=ha.data.releaseMode;
ha.showConsole=ha.data.showConsole;ha.debugDraw=ha.data.debugDraw;ha.disableBackButton=ha.data.disableBackButton;ha.keys=ha.asMap(ha.data.keys);for(var a=ha.data.scales,b=Cd.fromString,c=Array(a.length),d=0,e=a.length;d<e;){var f=d++;c[f]=b(a[f])}ha.scales=Uc.array(c);ha.toolsetInterfaceHost=ha.data.toolsetInterfaceHost;ha.toolsetInterfacePort=ha.data.toolsetInterfacePort;ha.projectName=ha.data.projectName;ha.buildRecord=ha.data.buildRecord;ha.buildTime=ha.data.buildTime;ha.lockURL=ha.data.lockURL;
null!=ha.data.preloader?(null==ha.preloader&&(ha.preloader=new In),ha.preloader.setFields(ha.data.preloader)):ha.preloader=null};ha.asMap=function(a){for(var b=new ia,c=0,d=X.fields(a);c<d.length;){var e=d[c];++c;b.h[e]=X.field(a,e)}return b};var bc=function(){this.actorTypesLoaded=!1;this.resourceLookup=this.resourceNameLookup=this.behaviorLookup=this.behaviorReader=this.resourceReaderPool=null;if(null==va.getBytes("assets/data/game.mbs"))throw J.thrown("Data.hx - Could not load game. Check your logs for a possible cause.");
};k["com.stencyl.Data"]=bc;bc.__name__="com.stencyl.Data";bc.get=function(){null==bc.instance&&(bc.instance=new bc,bc.instance.loadAll());return bc.instance};bc.resetStatics=function(){bc.instance=null};bc.prototype={readers:null,gameMbs:null,resourceListMbs:null,sceneListMbs:null,behaviorListMbs:null,resources:null,resourceMap:null,behaviors:null,resourceLookup:null,resourceNameLookup:null,behaviorLookup:null,behaviorReader:null,resourceReaderPool:null,loadAll:function(){this.gameMbs=new Lg(ff.get(),
!1,!0);this.gameMbs.readData(Ab.toBytes(va.getBytes("assets/data/game.mbs")));this.sceneListMbs=new Lg(ff.get(),!1,!0);this.sceneListMbs.readData(Ab.toBytes(va.getBytes("assets/data/scenes.mbs")));this.resourceListMbs=new Lg(ff.get(),!1,!1);this.resourceListMbs.readData(Ab.toBytes(va.getBytes("assets/data/resources.mbs")));this.behaviorListMbs=new Lg(ff.get(),!1,!1);this.behaviorListMbs.readData(Ab.toBytes(va.getBytes("assets/data/behaviors.mbs")));this.behaviors=new Ok(new Xa,r(this,this.loadBehaviorFromMbs));
this.resources=new Ok(new Xa,r(this,this.loadResourceFromMbs));this.resourceMap=new Jn(new ia,r(this,this.loadResourceFromMbsByName));this.loadReaders();this.scanBehaviorMbs();this.scanResourceMbs()},readGameMbs:function(){var a=new Lg(ff.get(),!1,!0);a.readData(Ab.toBytes(va.getBytes("assets/data/game.mbs")));return a.getRoot()},loadReaders:function(){this.readers=[];this.readers.push(new Pk);this.readers.push(new Qk);this.readers.push(new Rk);this.readers.push(new Sk);this.readers.push(new Tk);
this.readers.push(new Uk)},scanBehaviorMbs:function(){this.behaviorLookup=new Xa;for(var a=this.behaviorListMbs.getRoot(),b=0,c=a.length();b<c;){b++;var d=a.elementAddress;this.behaviorReader=a.getNextObject();var e=this.behaviorLookup,f=this.behaviorReader.getId();e.h[f]=d}},scanResourceMbs:function(){this.resourceLookup=new Xa;this.resourceNameLookup=new ia;var a=this.resourceListMbs.getRoot();this.resourceReaderPool=be.createObjectPool(this.resourceListMbs);for(var b=new qb(this.resourceListMbs),
c=K.INTEGER.getSize(),d=0,e=a.length();d<e;){d++;var f=a.elementAddress,g=this.resourceListMbs.readInt(f+c);a.elementAddress+=a.elementSize;b.setAddress(g);g=this.resourceLookup;var h=b.getId();g.h[h]=f;this.resourceListMbs.readTypecode(f)==rc.MBS_SPRITE?(f=this.resourceNameLookup,g="Sprite_"+b.getName(),h=b.getId(),f.h[g]=h):(f=this.resourceNameLookup,g=b.getName(),h=b.getId(),f.h[g]=h)}},loadResourceFromMbsByName:function(a){var b=this.resourceNameLookup.h[a];return null==b?(Q.error("Error: Resource with name "+
a+" doesn't exist.\n"+jc.toString(jc.callStack()),{fileName:"com/stencyl/Data.hx",lineNumber:211,className:"com.stencyl.Data",methodName:"loadResourceFromMbsByName"}),null):this.loadResourceFromMbs(b)},loadResourceFromMbs:function(a){var b=this.resourceLookup.h[a];if(null==b)return Q.error("Error: resource with id "+a+" doesn't exist.\n"+jc.toString(jc.callStack()),{fileName:"com/stencyl/Data.hx",lineNumber:223,className:"com.stencyl.Data",methodName:"loadResourceFromMbs"}),null;a=be.readDynamicUsingPool(this.resourceListMbs,
b,this.resourceReaderPool);a=this.readResource(a.getMbsType().getName(),a);null!=a&&(this.resources.map.h[a.ID]=a,a instanceof mi?this.resourceMap.map.h["Sprite_"+a.name]=a:this.resourceMap.map.h[a.name]=a);return a},loadAllResourcesOfType:function(a){var b=this.resourceListMbs.getRoot(),c=new qb(this.resourceListMbs),d=K.INTEGER.getSize();b.elementAddress=b.getAddress()+2*d;for(var e=0,f=b.length();e<f;){e++;var g=b.elementAddress;this.resourceListMbs.readTypecode(g)==a&&(g=this.resourceListMbs.readInt(g+
d),c.setAddress(g),this.loadResourceFromMbs(c.getId()));b.elementAddress+=b.elementSize}},loadBehaviorFromMbs:function(a){a=this.behaviorLookup.h[a];if(null==a)return null;this.behaviorReader.setAddress(a);return ni.readBehavior(this.behaviorReader)},readResource:function(a,b){for(var c=0,d=this.readers;c<d.length;){var e=d[c];++c;if(e.accepts(a))return e.read(b)}return null},actorTypesLoaded:null,getAllActorTypes:function(){this.actorTypesLoaded||(this.loadAllResourcesOfType(Pa.MBS_ACTOR_TYPE),this.actorTypesLoaded=
!0);for(var a=[],b=this.resources.map.iterator();b.hasNext();){var c=b.next();c instanceof eg&&a.push(U.__cast(c,eg))}return a},loadAtlas:function(a){Q.debug("Load Atlas: "+a,{fileName:"com/stencyl/Data.hx",lineNumber:316,className:"com.stencyl.Data",methodName:"loadAtlas"});var b=Lb.get().atlases.h[a];if(null!=b&&!b.active)for(b.active=!0,a=0,b=b.members;a<b.length;){var c=b[a];++a;c=this.resources.get(c);null!=c&&c.loadGraphics()}},unloadAtlas:function(a){},reloadScaledResources:function(){for(var a=
this.resources.map.iterator();a.hasNext();){var b=a.next();null!=b&&(b instanceof Hh||b instanceof eg||b.isAtlasActive()&&b.reloadGraphics(-1))}},__class__:bc};var q=function(a,b){this.isHUDZoomable=this.sceneInitialized=this.keyPollOccurred=this.isFullScreen=this.ignoreResize=!1;this.zoomMultiplier=1;this.extensions=b;"opengl"==q.stage.window.context.type||"opengles"==q.stage.window.context.type||"webgl"==q.stage.window.context.type?Zc.initialize():Q.warn("WARNING: Unexpectedly running without a GL context.",
{fileName:"com/stencyl/Engine.hx",lineNumber:772,className:"com.stencyl.Engine",methodName:"new"});nd.get_isSupported()&&(this.shaderLayer=new Ya,this.shaderLayer.set_name("Shader Layer"));a.mouseChildren=!1;a.mouseEnabled=!1;ha.debugDraw&&(q.DEBUG_DRAW=!0);q.engine=this;n.engine=this;this.root=a;this.isFullScreen=ha.startInFullScreen;q.screenScaleX=q.unzoomedScaleX=a.get_scaleX();q.screenScaleY=q.unzoomedScaleY=a.get_scaleY();q.screenOffsetX=a.get_x()|0;q.screenOffsetY=a.get_y()|0;q.NO_PHYSICS=1==
ha.physicsMode;q.stage.addEventListener("enterFrame",r(this,this.onUpdate));q.stage.addEventListener("deactivate",r(this,this.onFocusLost));q.stage.addEventListener("activate",r(this,this.onFocus));q.stage.addEventListener("resize",r(this,this.onWindowResize));q.stage.window.onRestore.add(r(this,this.onWindowRestore));q.stage.window.onMaximize.add(r(this,this.onWindowMaximize));q.stage.window.onFullscreen.add(r(this,this.onWindowFullScreen));this.isFullScreen&&!q.stage.window.__fullscreen&&(q.stage.window.__fullscreen=
!0);this.begin(ha.initSceneID)};k["com.stencyl.Engine"]=q;q.__name__="com.stencyl.Engine";q.resetStatics=function(){q.stage.removeEventListener("enterFrame",(C=q.engine,r(C,C.onUpdate)));q.stage.removeEventListener("deactivate",(C=q.engine,r(C,C.onFocusLost)));q.stage.removeEventListener("activate",(C=q.engine,r(C,C.onFocus)));q.stage.removeEventListener("resize",(C=q.engine,r(C,C.onWindowResize)));q.stage.window.onRestore.remove((C=q.engine,r(C,C.onWindowRestore)));q.stage.window.onMaximize.remove((C=
q.engine,r(C,C.onWindowMaximize)));q.stage.window.onFullscreen.remove((C=q.engine,r(C,C.onWindowFullScreen)));null!=q.engine.stats&&q.stage.removeChild(q.engine.stats);q.NO_PHYSICS=!1;q.DEBUG_DRAW=!1;q.IMG_BASE="";q.SCALE=1;q.checkedWideScreen=!1;q.isStandardIOS=!1;q.isExtendedIOS=!1;q.isIPhone6=!1;q.isIPhone6Plus=!1;q.isTabletIOS=!1;q.engine=null;q.landscape=!1;q.cameraX=0;q.cameraY=0;q.screenScaleX=0;q.screenScaleY=0;q.unzoomedScaleX=0;q.unzoomedScaleY=0;q.screenOffsetX=0;q.screenOffsetY=0;q.screenWidth=
0;q.screenHeight=0;q.sceneWidth=0;q.sceneHeight=0;q.screenWidthHalf=0;q.screenHeightHalf=0;q.paused=!1;q.started=!1;q.ITERATIONS=3;q.physicsScale=10;q.preservePadding=!1;q.paddingLeft=0;q.paddingRight=0;q.paddingTop=0;q.paddingBottom=0;q.movieClip=null;q.stage=null;q.STEP_SIZE=10;q.MS_PER_SEC=1E3;q.elapsedTime=0;q.timeScale=1;q.totalElapsedTime=0;q.debug=!1;q.debugDrawer=null};q.initBehaviors=function(a,b,c,d,e){if(null!=b){var f=b.h;b=f;for(var g=Object.keys(f),h=g.length,m=0;m<h;){var l=b[g[m++]];
if(null!=l&&l.enabled){var n=bc.get().behaviors.get(l.behaviorID),p=new ia;if(null==n)Q.error("Non-Existent Behavior ID (Init): "+l.behaviorID,{fileName:"com/stencyl/Engine.hx",lineNumber:1284,className:"com.stencyl.Engine",methodName:"initBehaviors"});else{if(n.isEvent){f=n.attributes.h;f=Object.keys(f);for(var k=f.length,q=0;q<k;){var t=f[q++],v=n.attributes.h[t];if(null!=v){var r=v.type,Ka=v.ID;"list"==r?(v=new oi(Ka,v.fieldName,v.fullName,[],r,null,v.hidden),p.h[t]=v):"map"==r&&(v=new oi(Ka,v.fieldName,
v.fullName,new ia,r,null,v.hidden),p.h[t]=v)}}}f=Object.keys(l.values.h);k=f.length;for(q=0;q<k;)t=f[q++],v=n.attributes.h[t],null!=v&&(v=new oi(v.ID,v.fieldName,v.fullName,l.values.h[t],v.type,null,v.hidden),p.h[t]=v);l=new Vk(c,d,n.ID,n.name,n.classname,!0,!1,p,n.type,n.isEvent);a.add(l)}}}e&&a.initScripts()}};q.toPhysicalUnits=function(a){return a/=q.physicsScale};q.toPixelUnits=function(a){return a*=q.physicsScale};q.vToPhysicalUnits=function(a){a.x=q.toPhysicalUnits(a.x);a.y=q.toPhysicalUnits(a.y);
return a};q.vToPixelUnits=function(a){a.x=q.toPixelUnits(a.x);a.y=q.toPixelUnits(a.y);return a};q.reloadGame=function(){X.field(q.am,"reloadGame").apply(q.am,[])};q.addReloadListener=function(a){X.field(q.am,"reloadListeners").push(a)};q.reloadTracingConfig=function(){X.field(q.am,"reloadTracingConfig").apply(q.am,[])};q.prototype={zoomMultiplier:null,isHUDZoomable:null,world:null,gravityX:null,gravityY:null,physicalWidth:null,physicalHeight:null,leave:null,enter:null,sceneToEnter:null,shakeTimer:null,
shakeIntensity:null,isShaking:null,scene:null,camera:null,sceneInitialized:null,channels:null,tasks:null,regions:null,terrainRegions:null,joints:null,root:null,colorLayer:null,maskLayer:null,master:null,hudLayer:null,transitionLayer:null,debugLayer:null,g:null,extensions:null,groups:null,reverseGroups:null,allActors:null,nextID:null,actorsOfType:null,recycledActorsOfType:null,actorsToCreateInNextScene:null,layers:null,layersByName:null,interactiveLayers:null,backgroundLayers:null,dynamicTiles:null,
animatedTiles:null,topLayer:null,bottomLayer:null,middleLayer:null,layersToDraw:null,tileUpdated:null,loadedAtlases:null,atlasesToLoad:null,atlasesToUnload:null,actorsToCreate:null,gameAttributes:null,savableAttributes:null,behaviors:null,lastTime:null,acc:null,mx:null,my:null,collisionPairs:null,disableCollisionList:null,keyPollOccurred:null,whenKeyPressedEvents:null,whenAnyKeyPressed:null,whenAnyKeyReleased:null,whenAnyGamepadPressed:null,whenAnyGamepadReleased:null,whenTypeGroupCreatedEvents:null,
whenTypeGroupKilledEvents:null,whenTypeGroupPositionStateChangedEvents:null,whenCollidedEvents:null,whenSoundEndedEvents:null,whenChannelEndedEvents:null,whenUpdated:null,whenDrawing:null,whenMousePressed:null,whenMouseReleased:null,whenMouseMoved:null,whenMouseDragged:null,whenPaused:null,whenFullscreenChanged:null,whenScreenSizeChanged:null,whenGameScaleChanged:null,whenSwiped:null,whenMTStarted:null,whenMTDragged:null,whenMTEnded:null,whenFocusChanged:null,shader:null,shaderLayer:null,shaders:null,
isFullScreen:null,ignoreResize:null,stats:null,onKeyDown:function(a){this.isFullScreen&&27==a.keyCode&&this.setFullScreen(!1)},onWindowResize:function(a){!this.isFullScreen||q.stage.window.__fullscreen||q.stage.window.__minimized||this.ignoreResize||this.setFullScreen(!1)},onWindowRestore:function(){this.isFullScreen&&!q.stage.window.__fullscreen&&(q.stage.window.__fullscreen=!0)},onWindowMaximize:function(){this.isFullScreen&&!q.stage.window.__fullscreen&&(q.stage.window.__fullscreen=!0)},onWindowFullScreen:function(){this.isFullScreen||
this.setFullScreen(!0)},isInFullScreen:function(){return 1==Da.get_current().stage.get_displayState()},setFullScreen:function(a){Q.debug("Set fullScreen: "+(null==a?"null":""+a),{fileName:"com/stencyl/Engine.hx",lineNumber:569,className:"com.stencyl.Engine",methodName:"setFullScreen"});if(this.isFullScreen!=a){this.ignoreResize=!0;this.isFullScreen=a;this.reloadScreen();if(0<this.whenFullscreenChanged.length)for(this.whenFullscreenChanged._dispatchIndex=0;this.whenFullscreenChanged._dispatchIndex<
this.whenFullscreenChanged.length;){try{this.whenFullscreenChanged.listeners[this.whenFullscreenChanged._dispatchIndex]()}catch(b){a=J.caught(b),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"setFullScreen"})}++this.whenFullscreenChanged._dispatchIndex}this.ignoreResize=!1}},toggleFullScreen:function(){this.setFullScreen(!this.isFullScreen)},reloadScreen:function(){var a=q.IMG_BASE,b=q.SCALE,c=q.screenWidth,d=
q.screenHeight;this.root.initScreen(this.isFullScreen);q.screenWidth=xa.logicalWidth|0;q.screenWidthHalf=q.screenWidth/2|0;q.screenHeight=xa.logicalHeight|0;q.screenHeightHalf=q.screenHeight/2|0;this.setColorBackground(this.scene.colorBackground);c=q.screenWidth!=c||q.screenHeight!=d;d=b!=q.SCALE;a!=q.IMG_BASE&&bc.get().reloadScaledResources();if(b!=q.SCALE){null!=q.debugDrawer&&q.debugDrawer.setDrawScale(10*q.SCALE);this.g.scaleX=this.g.scaleY=q.SCALE;W.applyToAllChildren(this.root,function(a){U.__implements(a,
Ih)&&U.__cast(a,Ih).updateScale()});for(a=this.allActors.iterator();a.hasNext();)b=a.next(),null==b||b.dead||b.recycled||(b.updateMatrix=!0);for(b=this.recycledActorsOfType.iterator();b.hasNext();)for(var e=b.next(),f=0;f<e.length;)a=e[f],++f,null!=a.currAnimation&&a.currAnimation.framesUpdated(),a.updateMatrix=!0;this.g.resetFont();this.moveCamera(this.camera.realX,this.camera.realY)}q.unzoomedScaleX=q.screenScaleX=this.root.get_scaleX();q.unzoomedScaleY=q.screenScaleY=this.root.get_scaleY();q.screenOffsetX=
this.root.get_x()|0;q.screenOffsetY=this.root.get_y()|0;null!=this.stats&&(this.stats.set_x(q.stage.stageWidth-this.stats.get_width()),this.stats.set_y(0));this.resetShaders();if(d&&0<this.whenGameScaleChanged.length)for(this.whenGameScaleChanged._dispatchIndex=0;this.whenGameScaleChanged._dispatchIndex<this.whenGameScaleChanged.length;){try{this.whenGameScaleChanged.listeners[this.whenGameScaleChanged._dispatchIndex]()}catch(g){d=J.caught(g),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"reloadScreen"})}++this.whenGameScaleChanged._dispatchIndex}if(c&&0<this.whenScreenSizeChanged.length)for(this.whenScreenSizeChanged._dispatchIndex=0;this.whenScreenSizeChanged._dispatchIndex<this.whenScreenSizeChanged.length;){try{this.whenScreenSizeChanged.listeners[this.whenScreenSizeChanged._dispatchIndex]()}catch(g){d=J.caught(g),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",
methodName:"reloadScreen"})}++this.whenScreenSizeChanged._dispatchIndex}},addShader:function(a){if(nd.get_isSupported()){a=a.basicShader;null!=this.shaders&&(Q.debug("Enabling a shader over an existing shader. Clearing existing shader first.",{fileName:"com/stencyl/Engine.hx",lineNumber:854,className:"com.stencyl.Engine",methodName:"addShader"}),this.clearShaders());this.shaders=[a.model];for(a=a.multipassParent;null!=a;)this.shaders.splice(0,0,a.model),a=a.multipassParent;a=0;for(var b=this.shaders;a<
b.length;){var c=b[a];++a;this.shaderLayer.addChild(c)}}else Q.warn("Shaders are not supported on this platform.",{fileName:"com/stencyl/Engine.hx",lineNumber:873,className:"com.stencyl.Engine",methodName:"addShader"})},clearShaders:function(){W.removeAllChildren(this.shaderLayer);q.stage.context3D.setRenderToBackBuffer();this.shaders=[]},toggleShadersForHUD:function(){null!=this.shaderLayer&&null!=this.hudLayer&&null!=this.root&&this.root.swapChildren(this.shaderLayer,this.hudLayer)},resetShaders:function(){if(null!=
this.shaders)for(var a=0,b=this.shaders;a<b.length;){var c=b[a];++a;c.rebuild()}},begin:function(a){this.loadedAtlases=new Xa;this.atlasesToLoad=new Xa;this.atlasesToUnload=new Xa;M.enable();M.define("iSHIFT",[16]);M.define("iCTRL",[17]);M.define("iCOMMAND",[15]);q.landscape=ha.landscape;var b=xa.logicalWidth,c=xa.logicalHeight;q.screenWidth=b|0;q.screenHeight=c|0;q.screenWidthHalf=b/2|0;q.screenHeightHalf=c/2|0;bc.get();Lb.get().loadScenes();this.g=new Ld;q.started=!0;this.tileUpdated=!1;this.shakeTimer=
0;this.shakeIntensity=.01;this.isShaking=!1;this.enter=this.leave=null;q.cameraX=0;this.acc=q.cameraY=0;this.lastTime=Da.getTimer();q.sceneWidth=b|0;q.sceneHeight=c|0;this.colorLayer=new Ke;this.colorLayer.set_name("Color Layer");this.root.addChild(this.colorLayer);this.master=new Ya;this.master.set_name("Master");this.root.addChild(this.master);this.hudLayer=new Fc(-1,"__hud__",-1,0,0,1,10,null);this.hudLayer.set_name("HUD Layer");this.root.addChild(this.hudLayer);this.transitionLayer=new Ya;this.transitionLayer.set_name("Transition Layer");
this.root.addChild(this.transitionLayer);this.debugLayer=new Ya;this.debugLayer.set_name("Debug Layer");this.root.addChild(this.debugLayer);nd.get_isSupported()&&this.root.addChild(this.shaderLayer);this.root.addChild(this.root.maskLayer);this.actorsToCreateInNextScene=[];this.gameAttributes=new ia;this.savableAttributes=new ia;this.setStatsVisible(ha.showConsole);b=Lb.get().gameAttributes.h;b=Object.keys(b);c=b.length;for(var d=0;d<c;){var e=b[d++],f=Lb.get().gameAttributes.h[e];this.gameAttributes.h[e]=
f}this.channels=[];this.channels.push(new Xb(this,0));this.channels.push(new Xb(this,1));this.channels.push(new Xb(this,2));this.channels.push(new Xb(this,3));this.channels.push(new Xb(this,4));this.channels.push(new Xb(this,5));this.channels.push(new Xb(this,6));this.channels.push(new Xb(this,7));this.channels.push(new Xb(this,8));this.channels.push(new Xb(this,9));this.channels.push(new Xb(this,10));this.channels.push(new Xb(this,11));this.channels.push(new Xb(this,12));this.channels.push(new Xb(this,
13));this.channels.push(new Xb(this,14));this.channels.push(new Xb(this,15));this.channels.push(new Xb(this,16));this.channels.push(new Xb(this,17));this.channels.push(new Xb(this,18));this.channels.push(new Xb(this,19));this.channels.push(new Xb(this,20));this.channels.push(new Xb(this,21));this.channels.push(new Xb(this,22));this.channels.push(new Xb(this,23));this.channels.push(new Xb(this,24));this.channels.push(new Xb(this,25));this.channels.push(new Xb(this,26));this.channels.push(new Xb(this,
27));this.channels.push(new Xb(this,28));this.channels.push(new Xb(this,29));this.channels.push(new Xb(this,30));this.channels.push(new Xb(this,31));b=0;for(c=this.extensions;b<c.length;)d=c[b],++b,d.initialize();this.sceneToEnter=a;this.loadScene(a);this.sceneInitialized=!0},setStatsVisible:function(a){a!=(null!=this.stats)&&(a?(this.stats=new Kg,q.stage.addChild(this.stats),this.stats.set_x(q.stage.stageWidth-this.stats.get_width()),this.stats.set_y(0)):(q.stage.removeChild(this.stats),this.stats=
null))},loadScene:function(a){this.collisionPairs=new ve(32);q.preservePadding||(q.paddingTop=0,q.paddingLeft=0,q.paddingBottom=0,q.paddingRight=0);this.tasks=[];this.scene=Lb.get().scenes.h[a];if(-1==a||null==this.scene)if(this.scene=Lb.get().scenes.h[ha.initSceneID],null==this.scene){Q.error("Could not load scene: "+a,{fileName:"com/stencyl/Engine.hx",lineNumber:1079,className:"com.stencyl.Engine",methodName:"loadScene"});q.stage.removeEventListener("enterFrame",r(this,this.onUpdate));return}this.scene.load();
a=new Xa;if(this.scene.retainsAtlases)for(var b=this.loadedAtlases.iterator();b.hasNext();){var c=b.next();a.h[c]=c}else{for(b=this.loadedAtlases.iterator();b.hasNext();)c=b.next(),Lb.get().atlases.h[c].allScenes&&(a.h[c]=c);c=0;for(var d=this.scene.atlases;c<d.length;)b=d[c],++c,a.h[b]=b}for(c=this.atlasesToLoad.iterator();c.hasNext();)d=c.next(),a.h[d]=d;for(c=this.atlasesToUnload.iterator();c.hasNext();)d=c.next(),a.remove(d);for(c=this.loadedAtlases.iterator();c.hasNext();)d=c.next(),a.h.hasOwnProperty(d)||
(bc.get().unloadAtlas(d),this.loadedAtlases.remove(d));for(c=a.iterator();c.hasNext();)d=c.next(),this.loadedAtlases.h.hasOwnProperty(d)||(bc.get().loadAtlas(d),this.loadedAtlases.h[d]=d);this.atlasesToLoad=new Xa;this.atlasesToUnload=new Xa;q.sceneWidth=this.scene.sceneWidth;q.sceneHeight=this.scene.sceneHeight;this.behaviors=new rj;this.groups=new Xa;this.reverseGroups=new ia;c=0;for(d=Lb.get().groups;c<d.length;)a=d[c],++c,b=new pi(a.ID,a.name),this.groups.h[a.ID]=b,this.reverseGroups.h[a.name]=
b,b.name=a.name;a=new pi(-2,"Regions");this.groups.h[-2]=a;this.reverseGroups.h.Regions=a;this.disableCollisionList=[];this.actorsOfType=new Xa;this.recycledActorsOfType=new Xa;this.regions=new ve(32);this.regions.reuseIterator=!0;this.terrainRegions=new Xa;this.joints=new Xa;this.dynamicTiles=new ia;this.animatedTiles=[];this.allActors=new ve(256);this.allActors.reuseIterator=!0;this.nextID=0;this.whenKeyPressedEvents=new Kn;this.whenAnyKeyPressed=new Gc;this.whenAnyKeyReleased=new Gc;this.whenAnyGamepadPressed=
new Gc;this.whenAnyGamepadReleased=new Gc;this.whenTypeGroupCreatedEvents=new Vb;this.whenTypeGroupKilledEvents=new Vb;this.whenTypeGroupPositionStateChangedEvents=new Xa;this.whenCollidedEvents=new Xa;this.whenSoundEndedEvents=new Vb;this.whenChannelEndedEvents=new Xa;this.whenUpdated=new Gc;this.whenDrawing=new Gc;this.whenMousePressed=new Gc;this.whenMouseReleased=new Gc;this.whenMouseMoved=new Gc;this.whenMouseDragged=new Gc;this.whenPaused=new Gc;this.whenSwiped=new Gc;this.whenMTStarted=new Gc;
this.whenMTDragged=new Gc;this.whenMTEnded=new Gc;this.whenFocusChanged=new Gc;this.whenFullscreenChanged=new Gc;this.whenScreenSizeChanged=new Gc;this.whenGameScaleChanged=new Gc;c=0;for(d=this.extensions;c<d.length;)a=d[c],++c,a.loadScene(this.scene);q.NO_PHYSICS||this.initPhysics();this.gravityX=this.scene.gravityX;this.gravityY=this.scene.gravityY;this.loadTerrain();this.loadRegions();this.loadTerrainRegions();this.loadActors();this.loadCamera();this.loadJoints();this.loadDeferredActors();q.initBehaviors(this.behaviors,
this.scene.behaviorValues,this,this,!0);this.initActorScripts()},initPhysics:function(){var a=new y(this.scene.gravityX,this.scene.gravityY);this.world=new cc(a,!1);cc.m_continuousPhysics=!1;cc.m_warmStarting=!0;a=new Ha;a.lowerBound.x=0;a.lowerBound.y=0;a.upperBound.x=q.screenWidth/q.physicsScale;a.upperBound.y=q.screenHeight/q.physicsScale;this.world.setScreenBounds(a);q.debugDrawer=new Ce;q.debugDrawer.setSprite(this.debugLayer);q.debugDrawer.setLineThickness(3);q.debugDrawer.setDrawScale(10*q.SCALE);
q.debugDrawer.setFillAlpha(0);q.debugDrawer.setFlags(Ce.e_shapeBit|Ce.e_jointBit);this.world.setDebugDraw(q.debugDrawer)},loadActors:function(){this.actorsToCreate=[];for(var a=this.scene.actors.iterator();a.hasNext();){var b=a.next();this.actorsToCreate.push(this.createActor(b,!0))}a=0;for(b=this.interactiveLayers;a<b.length;){var c=b[a];++a;for(var d=0,e=c.actorContainer.get_numChildren();d<e;){var f=d++,g=c.actorContainer.getChildAt(f);for(g=this.scene.actors.h[g.ID];g.orderInLayer!=f;)c.actorContainer.swapChildrenAt(f,
g.orderInLayer),g=c.actorContainer.getChildAt(f),g=this.scene.actors.h[g.ID]}}},loadDeferredActors:function(){for(var a=0,b=this.actorsToCreateInNextScene;a<b.length;){var c=b[a];++a;n.lastCreatedActor=this.createActorOfType(c.type,c.x,c.y,c.layer)}this.actorsToCreateInNextScene=[]},initActorScripts:function(){for(var a=0,b=this.actorsToCreate;a<b.length;){var c=b[a];++a;c.initScripts()}this.actorsToCreate=null},loadCamera:function(){this.camera=new tb(this,-1,2,0,0,-1,2,2,null,null,null,null,!0,
!1,!0,!1,null,!0,!1);this.camera.set_name("Camera");this.camera.isCamera=!0;q.cameraX=0;q.cameraY=0},loadRegions:function(){this.regions=new ve(32);this.regions.reuseIterator=!0;for(var a=this.scene.regions.iterator();a.hasNext();){var b=a.next(),c=new md(this,b.x,b.y,b.shapes,b.simpleBounds);c.set_name(b.name);q.NO_PHYSICS||c.setXY(b.x+c.regionWidth/2,b.y+c.regionHeight/2);c.ID=b.ID;this.addRegion(c)}},loadTerrainRegions:function(){this.terrainRegions=new Xa;if(!q.NO_PHYSICS)for(var a=this.scene.terrainRegions.iterator();a.hasNext();){var b=
a.next(),c=new Jg(this,b.x,b.y,b.shapes,b.groupID,b.fillColor);c.set_name(b.name);c.setX(q.toPixelUnits(b.x)+c.regionWidth/2);c.setY(q.toPixelUnits(b.y)+c.regionHeight/2);c.ID=b.ID;this.addTerrainRegion(c)}},loadJoints:function(){if(!q.NO_PHYSICS)for(var a=this.scene.joints.iterator();a.hasNext();){var b=a.next(),c=b.actor1,d=b.actor2,e=b.collideConnected;if(3==b.type){var f=this.joints;var g=b.ID;b=this.createStickJoint(this.getActor(c).body,this.getActor(d).body,b.ID,e);f.h[g]=b}else if(1==b.type){g=
U.__cast(b,Fh);f=this.getActor(c).body.getLocalCenter().copy();f.x=q.toPixelUnits(f.x);f.y=q.toPixelUnits(f.y);c=this.getActor(c).body;d=-1==d?this.world.m_groundBody:this.getActor(d).body;var h=this.joints,m=b.ID;b=this.createHingeJoint(c,d,f,b.ID,e,g.enableLimit,g.enableMotor,g.lowerAngle,g.upperAngle,g.maxMotorTorque,-g.motorSpeed);h.h[m]=b}else if(2==b.type||7==b.type)g=U.__cast(b,Gh),f=this.getActor(c).body.getLocalCenter().copy(),f.x=q.toPixelUnits(f.x),f.y=q.toPixelUnits(f.y),c=this.getActor(c).body,
d=-1==d?this.world.m_groundBody:this.getActor(d).body,f=this.joints,h=b.ID,b=this.createSlidingJoint(c,d,g.localAxisA,b.ID,e,g.enableLimit,g.enableMotor,g.lowerTranslation,g.upperTranslation,g.maxMotorForce,g.motorSpeed),f.h[h]=b}},loadTerrain:function(){this.initLayers();for(var a=0,b=this.scene.wireframes;a<b.length;){var c=b[a];++a;var d=null;q.NO_PHYSICS||(d=new tb(this,1E8,1,c.x,c.y,-1,c.width|0,c.height|0,null,new ia,null,null,!1,!0,!1,!1,c.shape));d.set_name("Terrain");d.typeID=-1;d.set_visible(!1);
this.getGroup(1).addChild(d)}},initLayers:function(){this.setColorBackground(this.scene.colorBackground);this.animatedTiles=this.scene.animatedTiles;if(null!=this.animatedTiles)for(var a=0,b=this.animatedTiles;a<b.length;){var c=b[a];++a;c.currFrame=0;c.currTime=0;c.updateSource=!0}this.layers=this.scene.layers;this.layersToDraw=new Xa;this.layersByName=new ia;this.interactiveLayers=[];this.backgroundLayers=[];var d=c=!1,e=0,f=-1,g={};if(0==this.layers.mSize){a=new ke(0,this.scene,this.scene.sceneWidth/
this.scene.tileWidth|0,this.scene.sceneHeight/this.scene.tileHeight|0);var h=new Fc(0,"default",0,1,1,1,10,a);this.layers.set(h.ID,h)}for(h=this.layers.iterator();h.hasNext();)a=h.next(),f=Math.max(f,a.order)|0,g[a.order]=a,this.layersByName.h[a.layerName]=a,a instanceof Fc?this.interactiveLayers.push(U.__cast(a,Fc)):a instanceof Ud&&this.backgroundLayers.push(U.__cast(a,Ud));a=0;for(b=f+1;a<b;){h=a++;var m=f-h;h=g[h];h.order=m;this.layersToDraw.h[m]=h}a=0;for(b=f+1;a<b;)h=a++,h=this.layersToDraw.h[h],
h instanceof Ud?(h=U.__cast(h,Ud),h.load(),this.master.addChild(h)):h instanceof Fc&&(f=U.__cast(h,Fc),c||(c=!0,this.bottomLayer=f),d||e!=Math.floor(this.interactiveLayers.length/2)||(d=!0,this.middleLayer=f),this.master.addChild(f),this.topLayer=f,f.tiles.mountGrid(),++e)},setColorBackground:function(a){a.draw(this.colorLayer.get_graphics(),0,0,q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0)},optimizePool:function(){for(var a=this.recycledActorsOfType.iterator();a.hasNext();){for(var b=a.next(),
c=[],d=0;d<b.length;){var e=b[d];++d;null!=e&&e.recycled&&c.push(e)}for(d=0;d<c.length;)e=c[d],++d,I.remove(b,e),this.removeActor(e)}},cleanup:function(){null!=q.debugDrawer&&null!=q.debugDrawer.m_sprite&&q.debugDrawer.m_sprite.get_graphics().clear();for(var a=0,b=this.interactiveLayers;a<b.length;){var c=b[a];++a;c.clear()}this.hudLayer.clear();W.removeAllChildren(this.master);this.behaviors.destroy();this.camera.destroy();this.camera=null;if(null!=this.world){a=this.world.getBodyList();for(b=this.world.getJointList();null!=
b;)this.world.destroyJoint(b),b=b.getNext();for(;null!=a;)this.world.destroyBody(a),a=a.getNext()}for(a=this.actorsOfType.iterator();a.hasNext();)b=a.next(),b.length=0;for(b=this.recycledActorsOfType.iterator();b.hasNext();)for(c=b.next(),a=0;a<c.length;){var d=c[a];++a;d.destroyed||d.destroy()}for(a=this.recycledActorsOfType.iterator();a.hasNext();)b=a.next(),b.length=0;for(d=this.allActors.iterator();d.hasNext();)d.next().destroy();for(;0<Uc.count(this.allActors);)for(a=this.allActors.keys();a.hasNext();)b=
a.next(),this.allActors.unset(b);this.scene.unload();this.whenFocusChanged=this.whenMTEnded=this.whenMTDragged=this.whenMTStarted=this.whenSwiped=this.whenGameScaleChanged=this.whenScreenSizeChanged=this.whenFullscreenChanged=this.whenPaused=this.whenMouseDragged=this.whenMouseMoved=this.whenMouseReleased=this.whenMousePressed=this.whenDrawing=this.whenUpdated=this.whenChannelEndedEvents=this.whenSoundEndedEvents=this.whenCollidedEvents=this.whenTypeGroupPositionStateChangedEvents=this.whenTypeGroupKilledEvents=
this.whenTypeGroupCreatedEvents=this.whenAnyGamepadReleased=this.whenAnyGamepadPressed=this.whenAnyKeyReleased=this.whenAnyKeyPressed=this.whenKeyPressedEvents=this.disableCollisionList=this.collisionPairs=this.tasks=this.scene=this.allActors=this.reverseGroups=this.groups=this.joints=this.terrainRegions=this.regions=this.animatedTiles=this.dynamicTiles=this.layersToDraw=this.backgroundLayers=this.interactiveLayers=this.layersByName=this.layers=this.recycledActorsOfType=this.actorsOfType=null;a=0;
for(b=this.extensions;a<b.length;)c=b[a],++a,c.cleanupScene();n.lastCreatedActor=null;n.lastCreatedJoint=null;n.lastCreatedRegion=null;n.lastCreatedTerrainRegion=null;M.update();this.world=null},switchScene:function(a,b,c){if(!this.isTransitioning()){Q.info("Switching to scene "+a,{fileName:"com/stencyl/Engine.hx",lineNumber:1994,className:"com.stencyl.Engine",methodName:"switchScene"});null!=b&&b.isComplete()&&b.reset();if(null==b||0==b.duration)b=new kb(0);if(null==c||0==c.duration)c=new kb(1);
this.leave=b;this.enter=c;this.leave.isComplete()||this.leave.start();this.sceneToEnter=a}},enterScene:function(){this.enter.isComplete()||(this.enter.start(),null!=this.leave&&this.leave.cleanup());this.leave=null;this.sceneInitialized=!1;this.cleanup();this.loadScene(this.sceneToEnter);this.sceneInitialized=!0},isTransitioning:function(){return null!=this.enter&&this.enter.isActive()||null!=this.leave&&this.leave.isActive()?!0:!1},isTransitioningOut:function(){return null!=this.leave&&this.leave.isActive()?
!0:!1},createActorInNextScene:function(a,b,c,d){this.actorsToCreateInNextScene.push(new Ln(a,b,c,d))},createActor:function(a,b){b=U.__cast(bc.get().resources.get(a.actorType.spriteID),mi);b=new tb(this,a.elementID,a.groupID,a.x,a.y,a.layerID,-1,-1,b,a.behaviorValues,a.actorType,q.NO_PHYSICS?null:a.actorType.bodyDef,!1,!1,!1,!1,null,a.actorType.autoScale,a.actorType.ignoreGravity,a.actorType.physicsMode);if(0!=a.angle)if(0!=b.currOffset.x||0!=b.currOffset.y){var c=b.currOrigin.x|0,d=b.currOrigin.y|
0;b.setOriginPoint(b.cacheWidth/2|0,b.cacheHeight/2|0);b.setAngle(a.angle,!1);b.setOriginPoint(c,d)}else b.setAngle(a.angle,!1);if(1!=a.scaleX||1!=a.scaleY){var e=b.cacheWidth/2|0,f=b.cacheHeight/2|0;if(b.currOrigin.x!=e||b.currOrigin.y!=f)c=Math.sin(.01745329251994278*a.angle),d=Math.cos(.01745329251994278*a.angle),e=(b.currOrigin.x-e)*a.scaleX-b.currOffset.x,f=(b.currOrigin.y-f)*a.scaleY-b.currOffset.y,b.setX(b.getX(!1)+e*d-f*c),b.setY(b.getY(!1)+e*c+f*d);b.growTo(a.scaleX,a.scaleY,0)}b.set_name(a.actorType.name);
null==this.recycledActorsOfType.h[a.actorType.ID]&&(this.recycledActorsOfType.h[a.actorType.ID]=[]);c=this.recycledActorsOfType.h[a.actorType.ID];c.push(b);2!=a.actorType.physicsMode&&(c=this.groups.h[a.groupID],null!=c&&c.addChild(b));1E8==a.elementID?(this.nextID++,b.ID=this.nextID,this.allActors.set(b.ID,b)):(this.allActors.set(b.ID,b),this.nextID=Math.max(b.ID,this.nextID)|0);b.internalUpdate(0,!1);b.updateDrawingMatrix();null!=a.actorType&&-1!=a.actorType.ID&&(c=this.actorsOfType.h[a.actorType.ID],
null==c&&(c=[],this.actorsOfType.h[a.actorType.ID]=c),null!=c&&c.push(b));return n.lastCreatedActor=b},removeActor:function(a){this.allActors.unset(a.ID);this.removeActorFromLayer(a,a.layer);var b=this.groups,c=a.getGroupID();b.h[c].removeChild(a);a.destroy();null!=a.type&&-1!=a.typeID&&(b=this.actorsOfType.h[a.typeID],null!=b&&I.remove(b,a))},removeActorFromLayer:function(a,b){null!=b&&a.layer==b&&(b==this.hudLayer&&(0==a.physicsMode&&a.body.setAlwaysActive(a.alwaysSimulate),a.isHUD=!1,a.cachedLayer=
null),b.actorContainer.contains(a)&&(b.actorContainer.removeChild(a),a.layer=null))},moveActorToLayer:function(a,b){if(a.layer!=b&&null!=b){if(null==a.layer||a.layer.scrollFactorX!=b.scrollFactorX||a.layer.scrollFactorY!=b.scrollFactorY)a.updateMatrix=!0;b==this.hudLayer&&(0==a.physicsMode&&a.body.setAlwaysActive(!0),a.isHUD=!0,a.cachedLayer=a.layer);null!=a.layer&&this.removeActorFromLayer(a,a.layer);b.actorContainer.addChild(a);a.layer=b}},recycleActor:function(a){if(null!=a&&!a.recycled){var b=
q.engine.whenTypeGroupKilledEvents,c=a.getType(),d=b.h[c.__id__];b=q.engine.whenTypeGroupKilledEvents;c=a.getGroup();b=b.h[c.__id__];if(0<a.whenKilled.length)for(a.whenKilled._dispatchIndex=0;a.whenKilled._dispatchIndex<a.whenKilled.length;){try{a.whenKilled.listeners[a.whenKilled._dispatchIndex]()}catch(e){c=J.caught(e),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"recycleActor"})}++a.whenKilled._dispatchIndex}if(null!=
d&&0<d.length)for(d._dispatchIndex=0;d._dispatchIndex<d.length;){try{d.listeners[d._dispatchIndex](a)}catch(e){c=J.caught(e),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"recycleActor"})}++d._dispatchIndex}if(null!=b&&0<b.length)for(b._dispatchIndex=0;b._dispatchIndex<b.length;){try{b.listeners[b._dispatchIndex](a)}catch(e){c=J.caught(e),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"recycleActor"})}++b._dispatchIndex}a.isHUD&&a.unanchorFromScreen();a.alwaysSimulate&&a.makeSometimesSimulate(!1);a.firstMove=!1;a.setXY(1E6,1E6,!1,!0);a.colX=1E6;a.colY=1E6;a.recycled=!0;a.killLeaveScreen=!1;a.lastScreenState=!1;a.lastSceneState=!1;a.cancelTweens();a.clearFilters();a.resetBlendMode();a.set_alpha(1);a.realScaleX=1;a.realScaleY=1;a.switchToDefaultAnimation();a.disableActorDrawing();a.removeAttachedImages();if(0==a.physicsMode&&
null!=a.body)for(d=a.body.getContactList();null!=d;)q.engine.world.m_contactManager.m_contactListener.endContact(d.contact),d=d.next;a.removeAllListeners();a.resetListeners();this.removeActorFromLayer(a,a.layer);0==a.physicsMode&&(a.body.setActive(!1),a.body.setAwake(!1),a.body.setBullet(a.type.bodyDef.bullet),null!=a.body.m_prev&&(a.body.m_prev.m_next=a.body.m_next),null!=a.body.m_next&&(a.body.m_next.m_prev=a.body.m_prev),a.body==this.world.m_bodyList&&(this.world.m_bodyList=a.body.m_next),a.body.m_prev=
null,a.body.m_next=null,--this.world.m_bodyCount);a.xSpeed=0;a.ySpeed=0;a.rSpeed=0;a.continuousCollision=!1;for(d=0;d<this.tasks.length;)b=this.tasks[d],b.actor==a&&(I.remove(this.tasks,b),--d),++d;this.allActors.unset(a.ID)}},getRecycledActorOfType:function(a,b,c,d){a=this.getRecycledActorOfTypeOnLayer(a,b,c,this.getLayerByOrder(d).ID);q.paused&&(a.updateDrawingMatrix(),a.pause());return a},getRecycledActorOfTypeOnLayer:function(a,b,c,d){var e=null;if(null==this.recycledActorsOfType.h[a.ID]){var f=
a.ID;this.recycledActorsOfType.h[f]=[]}f=this.recycledActorsOfType.h[a.ID];if(null!=f){for(var g=0;g<f.length;)if(e=f[g],++g,null!=e&&e.recycled){e.createTime=Da.getTimer();this.allActors.set(e.ID,e);e.dead=!1;e.dying=!1;e.recycled=!1;e.killLeaveScreen=!1;e.switchToDefaultAnimation();e.customizedBehaviors?(e.customizedBehaviors=!1,e.behaviors=new rj,q.initBehaviors(e.behaviors,a.behaviorValues,e,this,!1)):e.enableAllBehaviors();0==e.physicsMode&&(e.body.setActive(!0),e.body.setAwake(!0),e.body.m_prev=
null,e.body.m_next=this.world.m_bodyList,null!=this.world.m_bodyList&&(this.world.m_bodyList.m_prev=e.body),this.world.m_bodyList=e.body,++this.world.m_bodyCount);e.registry=new ia;e.enableActorDrawing();e.setXY(b,c,!1,!0);0==e.physicsMode&&(e.colX=b,e.colY=c);e.setAngle(0,!1);e.setIgnoreGravity(e.defaultGravity);e.set_alpha(1);e.realScaleX=1;e.realScaleY=1;null!=e.bodyDef&&(e.continuousCollision=e.bodyDef.bullet);e.updateDrawingMatrix(!0);this.moveActorToLayer(e,this.getLayerById(d));e.initScripts();
a=this.whenTypeGroupCreatedEvents.h[a.__id__];b=this.whenTypeGroupCreatedEvents;f=e.getGroup();b=b.h[f.__id__];if(null!=a&&0<a.length)for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex](e)}catch(h){c=J.caught(h),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"getRecycledActorOfTypeOnLayer"})}++a._dispatchIndex}if(null!=b&&0<b.length)for(b._dispatchIndex=0;b._dispatchIndex<b.length;){try{b.listeners[b._dispatchIndex](e)}catch(h){a=
J.caught(h),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"getRecycledActorOfTypeOnLayer"})}++b._dispatchIndex}return e}e=this.createActorOfType(a,b,c,d)}return e},createActorOfType:function(a,b,c,d){if(null==a)return Q.error("Tried to create actor with null or invalid type.",{fileName:"com/stencyl/Engine.hx",lineNumber:2555,className:"com.stencyl.Engine",methodName:"createActorOfType"}),null;b=new Wk(1E8,b|0,
c|0,1,1,d,-1,0,a.groupID,a.ID,null,!1);b=this.createActor(b,!0);b.initScripts();a=this.whenTypeGroupCreatedEvents.h[a.__id__];c=this.whenTypeGroupCreatedEvents;d=b.getGroup();c=c.h[d.__id__];if(null!=a&&0<a.length)for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex](b)}catch(e){d=J.caught(e),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"createActorOfType"})}++a._dispatchIndex}if(null!=
c&&0<c.length)for(c._dispatchIndex=0;c._dispatchIndex<c.length;){try{c.listeners[c._dispatchIndex](b)}catch(e){d=J.caught(e),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"createActorOfType"})}++c._dispatchIndex}return b},getTopLayer:function(){return this.topLayer.ID},getBottomLayer:function(){return this.bottomLayer.ID},getMiddleLayer:function(){return this.middleLayer.ID},update:function(a){if(null!=this.scene){vb.update(a|
0);if(!q.NO_PHYSICS){var b=this.world.getScreenBounds();b.lowerBound.x=(q.cameraX/q.SCALE-q.paddingLeft)/q.physicsScale;b.lowerBound.y=(q.cameraY/q.SCALE-q.paddingTop)/q.physicsScale;b.upperBound.x=b.lowerBound.x+(q.screenWidth+q.paddingRight+q.paddingLeft)/q.physicsScale;b.upperBound.y=b.lowerBound.y+(q.screenHeight+q.paddingBottom+q.paddingTop)/q.physicsScale}b=M.mouseX/q.SCALE|0;var c=M.mouseY/q.SCALE|0;if(M.mousePressed&&(n.mpx=b,n.mpy=c,0<this.whenMousePressed.length))for(this.whenMousePressed._dispatchIndex=
0;this.whenMousePressed._dispatchIndex<this.whenMousePressed.length;){try{this.whenMousePressed.listeners[this.whenMousePressed._dispatchIndex]()}catch(h){var d=J.caught(h);Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++this.whenMousePressed._dispatchIndex}if(M.mouseReleased&&(n.mrx=b,n.mry=c,0<this.whenMouseReleased.length))for(this.whenMouseReleased._dispatchIndex=0;this.whenMouseReleased._dispatchIndex<
this.whenMouseReleased.length;){try{this.whenMouseReleased.listeners[this.whenMouseReleased._dispatchIndex]()}catch(h){d=J.caught(h),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++this.whenMouseReleased._dispatchIndex}if(this.mx!=b||this.my!=c){this.mx=b;this.my=c;if(0<this.whenMouseMoved.length)for(this.whenMouseMoved._dispatchIndex=0;this.whenMouseMoved._dispatchIndex<this.whenMouseMoved.length;){try{this.whenMouseMoved.listeners[this.whenMouseMoved._dispatchIndex]()}catch(h){d=
J.caught(h),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++this.whenMouseMoved._dispatchIndex}if(M.mouseDown&&!M.mousePressed&&0<this.whenMouseDragged.length)for(this.whenMouseDragged._dispatchIndex=0;this.whenMouseDragged._dispatchIndex<this.whenMouseDragged.length;){try{this.whenMouseDragged.listeners[this.whenMouseDragged._dispatchIndex]()}catch(h){d=J.caught(h),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++this.whenMouseDragged._dispatchIndex}}for(d=0;d<this.tasks.length;)b=this.tasks[d],b.done||b.update(q.STEP_SIZE),b.done&&(I.remove(this.tasks,b),--d),++d;if(0<this.whenKeyPressedEvents.keys.length){b=0;for(c=this.whenKeyPressedEvents.keys.length;b<c;){d=b++;d=this.whenKeyPressedEvents.keys[d];var e=M.pressed(d),f=M.released(d);if(e||f){var g=this.whenKeyPressedEvents.map.get(d);if(0<g.length)for(g._dispatchIndex=0;g._dispatchIndex<
g.length;){try{g.listeners[g._dispatchIndex](e,f)}catch(h){d=J.caught(h),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++g._dispatchIndex}}}this.keyPollOccurred=!0}b=0;for(c=this.extensions;b<c.length;)d=c[b],++b,d.preSceneUpdate();if(0<this.whenUpdated.length)for(this.whenUpdated._dispatchIndex=0;this.whenUpdated._dispatchIndex<this.whenUpdated.length;){try{this.whenUpdated.listeners[this.whenUpdated._dispatchIndex](a)}catch(h){d=
J.caught(h),Q.fullError(d.get_message(),d,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"update"})}++this.whenUpdated._dispatchIndex}q.NO_PHYSICS||(this.world.step(.01,3,3),this.world.clearForces(),q.DEBUG_DRAW&&this.world.drawDebugData());if(0!=this.regions.mSize)for(b=this.regions.iterator();b.hasNext();)c=b.next(),null!=c&&c.innerUpdate(a,!0);for(;0<this.disableCollisionList.length;)this.disableCollisionList.pop();if(0!=this.collisionPairs.mSize)for(b=
this.collisionPairs.keys();b.hasNext();)c=b.next(),this.collisionPairs.unset(c);ne.updateAll(a);if(0!=this.allActors.mSize)for(d=this.allActors.iterator();d.hasNext();)b=d.next(),null==b||b.dead||b.recycled||(c=(0!=b.physicsMode||b.body.isActive())&&b.colX+b.cacheWidth*b.realScaleX>=q.cameraX/q.SCALE-q.paddingLeft&&b.colY+b.cacheHeight*b.realScaleY>=q.cameraY/q.SCALE-q.paddingTop&&b.colX<q.cameraX/q.SCALE+q.screenWidth+q.paddingRight&&b.colY<q.cameraY/q.SCALE+q.screenHeight+q.paddingBottom,b.isOnScreenCache=
c||b.isHUD,0==b.physicsMode&&null!=b.body?b.killLeaveScreen&&!c?this.recycleActor(b):(b.body.isActive()||b.alwaysSimulate||b.isHUD)&&b.innerUpdate(a,!1):0!=b.physicsMode&&(b.killLeaveScreen&&!c?this.recycleActor(b):(c||b.alwaysSimulate||b.isHUD)&&b.innerUpdate(a,!1)),b.dead&&this.disableCollisionList.push(b));this.keyPollOccurred=!1;b=0;for(c=this.disableCollisionList.length;b<c;)d=b++,d=this.disableCollisionList[d],null!=d&&(d.handlesCollisions=!1);b=0;for(c=this.animatedTiles.length;b<c;)d=b++,
d=this.animatedTiles[d],d.update(a),this.tileUpdated=this.tileUpdated||d.updateSource;null!=this.leave&&this.leave.isActive()?this.leave.update(a):null!=this.enter&&this.enter.isActive()&&this.enter.update(a);for(b=this.layers.iterator();b.hasNext();)b.next().updatePosition(q.cameraX,q.cameraY,a);!q.NO_PHYSICS&&q.DEBUG_DRAW&&(this.debugLayer.set_x(-q.cameraX),this.debugLayer.set_y(-q.cameraY));this.isShaking&&(this.shakeTimer-=q.STEP_SIZE,0>=this.shakeTimer?this.stopShakingScreen():(a=-this.shakeIntensity*
q.screenHeight+2*Math.random()*this.shakeIntensity*q.screenHeight,this.master.set_x((-this.shakeIntensity*q.screenWidth+2*Math.random()*this.shakeIntensity*q.screenWidth)*q.SCALE),this.master.set_y(a*q.SCALE)))}},onUpdate:function(a){a=Da.getTimer();var b=a-this.lastTime;200<=b&&(b=200);this.acc+=b;q.elapsedTime=b;q.totalElapsedTime+=b|0;null!=this.leave?(this.leave.isComplete()&&(this.leave.deactivate(),this.enterScene()),this.postUpdate(a)):(null!=this.enter&&this.enter.isComplete()&&(this.enter.deactivate(),
this.enter.cleanup(),this.enter=null),this.sceneInitialized&&this.postUpdate(a))},postUpdate:function(a){for(;this.acc>q.STEP_SIZE;)this.update(q.STEP_SIZE),this.acc-=q.STEP_SIZE,M.update();this.lastTime=a;if(0!=this.allActors.mSize)for(a=this.allActors.iterator();a.hasNext();){var b=a.next();null==b||0==b.physicsMode&&null==b.body||(b.dead||b.dying?this.removeActor(b):b.updateMatrix||b.resetOrigin?(b.updateDrawingMatrix(),b.updateMatrix=!1,b.resetOrigin=!1):b.smoothMove&&(b.drawX!=b.realX||b.drawY!=
b.realY)&&b.updateDrawingMatrix())}this.draw()},onFocus:function(a){q.inFocus||(q.inFocus=!0,this.focusChanged(!1))},onFocusLost:function(a){q.inFocus&&(q.inFocus=!1,this.focusChanged(!0))},focusChanged:function(a){if(null!=this.whenFocusChanged&&0<this.whenFocusChanged.length)for(this.whenFocusChanged._dispatchIndex=0;this.whenFocusChanged._dispatchIndex<this.whenFocusChanged.length;){try{this.whenFocusChanged.listeners[this.whenFocusChanged._dispatchIndex](a)}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),
b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"focusChanged"})}++this.whenFocusChanged._dispatchIndex}},handleCollision:function(a,b){var c=a.typeID,d=b.otherActor.typeID;if(q.NO_PHYSICS){var e=1E6+b.thisActor.groupID;var f=1E6+b.otherActor.groupID}else{if(null!=b.thisShape){f=b.thisShape.groupID;if(-1E3==f){var g=b.thisShape.getBody();null!=g&&(f=g.getUserData().groupID)}e=1E6+f}else e=1E6+b.thisActor.groupID;null!=b.otherShape?(f=b.otherShape.groupID,
-1E3==f&&(g=b.otherShape.getBody(),null!=g&&(f=g.getUserData().groupID)),f=1E6+f):f=1E6+b.otherActor.groupID}if(null!=this.collisionPairs){g=a.ID;var h=this.collisionPairs.mH,m=h.mHash[73856093*g&h.mMask];if(-1==m)g=!1;else{var l=h.mData;if(l[m]==g)g=!0;else{h=!1;for(m=l[m+2];-1!=m;){if(l[m]==g){h=!0;break}m=l[m+2]}g=h}}g||this.collisionPairs.set(a.ID,new Xa);g=b.otherActor.ID;h=this.collisionPairs.mH;m=h.mHash[73856093*g&h.mMask];if(-1==m)g=!1;else if(l=h.mData,l[m]==g)g=!0;else{h=!1;for(m=l[m+2];-1!=
m;){if(l[m]==g){h=!0;break}m=l[m+2]}g=h}g||this.collisionPairs.set(b.otherActor.ID,new Xa);h=this.collisionPairs;g=a.ID;l=h.mH;m=l.mHash[73856093*g&l.mMask];if(-1==m)g=-2147483648;else if(l=l.mData,l[m]==g)g=l[m+1];else{var n=-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){n=l[m+1];break}m=l[m+2]}g=n}if((-2147483648==g?null:h.mVals[g]).h.hasOwnProperty(b.otherActor.ID))g=!0;else{h=this.collisionPairs;g=b.otherActor.ID;l=h.mH;m=l.mHash[73856093*g&l.mMask];if(-1==m)g=-2147483648;else if(l=l.mData,l[m]==
g)g=l[m+1];else{n=-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){n=l[m+1];break}m=l[m+2]}g=n}g=(-2147483648==g?null:h.mVals[g]).h.hasOwnProperty(a.ID)}if(g)return}if(-1<c||-1<d){if(!b.otherCollidedWithTerrain&&this.whenCollidedEvents.h.hasOwnProperty(c)&&this.whenCollidedEvents.h[c].h.hasOwnProperty(d)){g=this.whenCollidedEvents.h[c].h[d];if(0<g.length)for(g._dispatchIndex=0;g._dispatchIndex<g.length;){try{g.listeners[g._dispatchIndex](b)}catch(p){h=J.caught(p),Q.fullError(h.get_message(),h,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"handleCollision"})}++g._dispatchIndex}0==g.length&&this.whenCollidedEvents.h[c].remove(d)}if(c!=d&&this.whenCollidedEvents.h.hasOwnProperty(d)&&this.whenCollidedEvents.h[d].h.hasOwnProperty(c)){g=this.whenCollidedEvents.h[d].h[c];m=b.switchData(tc.get());if(0<g.length)for(g._dispatchIndex=0;g._dispatchIndex<g.length;){try{g.listeners[g._dispatchIndex](m)}catch(p){h=J.caught(p),Q.fullError(h.get_message(),h,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"handleCollision"})}++g._dispatchIndex}0==g.length&&this.whenCollidedEvents.h[d].remove(c)}}if(0<e&&0<f){if(this.whenCollidedEvents.h.hasOwnProperty(e)&&this.whenCollidedEvents.h[e].h.hasOwnProperty(f)){g=this.whenCollidedEvents.h[e].h[f];if(0<g.length)for(g._dispatchIndex=0;g._dispatchIndex<g.length;){try{g.listeners[g._dispatchIndex](b)}catch(p){h=J.caught(p),Q.fullError(h.get_message(),h,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,
className:"com.stencyl.Engine",methodName:"handleCollision"})}++g._dispatchIndex}0==g.length&&this.whenCollidedEvents.h[e].remove(f)}if(e!=f&&this.whenCollidedEvents.h.hasOwnProperty(f)&&this.whenCollidedEvents.h[f].h.hasOwnProperty(e)){g=this.whenCollidedEvents.h[f].h[e];m=b.switchData(tc.get());if(0<g.length)for(g._dispatchIndex=0;g._dispatchIndex<g.length;){try{g.listeners[g._dispatchIndex](m)}catch(p){h=J.caught(p),Q.fullError(h.get_message(),h,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"handleCollision"})}++g._dispatchIndex}0==g.length&&this.whenCollidedEvents.h[f].remove(e)}}if(null!=this.collisionPairs){h=this.collisionPairs;g=a.ID;l=h.mH;m=l.mHash[73856093*g&l.mMask];if(-1==m)g=-2147483648;else if(l=l.mData,l[m]==g)g=l[m+1];else{n=-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){n=l[m+1];break}m=l[m+2]}g=n}(-2147483648==g?null:h.mVals[g]).h[b.otherActor.ID]=!1;h=this.collisionPairs;g=b.otherActor.ID;l=h.mH;m=l.mHash[73856093*
g&l.mMask];if(-1==m)g=-2147483648;else if(l=l.mData,l[m]==g)g=l[m+1];else{n=-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){n=l[m+1];break}m=l[m+2]}g=n}(-2147483648==g?null:h.mVals[g]).h[a.ID]=!1}},soundFinished:function(a){var b=U.__cast(this.channels[a],Xb);if(null!=this.whenSoundEndedEvents){var c=this.whenSoundEndedEvents.h[b.currentClip.__id__];b.currentSound=null;if(null!=c&&0<c.length)for(c._dispatchIndex=0;c._dispatchIndex<c.length;){try{c.listeners[c._dispatchIndex]()}catch(d){b=J.caught(d),
Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"soundFinished"})}++c._dispatchIndex}}else b.currentSound=null;if(null!=this.whenChannelEndedEvents&&(a=this.whenChannelEndedEvents.h[a],null!=a&&0<a.length))for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex]()}catch(d){b=J.caught(d),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",
methodName:"soundFinished"})}++a._dispatchIndex}},addTask:function(a){this.tasks.push(a)},removeTask:function(a){I.remove(this.tasks,a)},shakeScreen:function(a,b){this.shakeTimer=q.MS_PER_SEC*b|0;this.isShaking=!0;this.shakeIntensity=a},stopShakingScreen:function(){this.shakeTimer=0;this.isShaking=!1;this.master.set_x(0);this.master.set_y(0)},cameraFollow:function(a,b,c){this.moveCamera(a.colX+a.cacheWidth/2,a.colY+a.cacheHeight/2)},moveCamera:function(a,b){this.camera.setLocation(a,b);q.cameraX=
this.camera.realX-q.screenWidthHalf;q.cameraY=this.camera.realY-q.screenHeightHalf;q.limitCameraToScene&&(q.cameraX=Math.max(0,Math.min(q.sceneWidth-q.screenWidth,q.cameraX)),q.cameraY=Math.max(0,Math.min(q.sceneHeight-q.screenHeight,q.cameraY)));q.cameraX*=q.SCALE;q.cameraY*=q.SCALE;1!=this.zoomMultiplier&&this.isHUDZoomable&&(this.hudLayer.set_x(-n.getScreenX()),this.hudLayer.set_y(-n.getScreenY()))},setZoom:function(a,b){null==b&&(b=!0);0>=a?Q.warn("You cannot set Zoom less than or equal to 0",
{fileName:"com/stencyl/Engine.hx",lineNumber:3268,className:"com.stencyl.Engine",methodName:"setZoom"}):this.zoomMultiplier!=a&&(this.zoomMultiplier=a,this.root.set_scaleX(q.screenScaleX=a*q.unzoomedScaleX),this.root.set_scaleY(q.screenScaleY=a*q.unzoomedScaleY),b&&(q.screenWidth=1/a*xa.logicalWidth|0,q.screenWidthHalf=q.screenWidth/2|0,q.screenHeight=1/a*xa.logicalHeight|0,q.screenHeightHalf=q.screenHeight/2|0),this.setColorBackground(this.scene.colorBackground),this.root.set_scrollRect(new fa(0,
0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE)),this.moveCamera(this.camera.realX,this.camera.realY),this.isHUDZoomable||(this.hudLayer.set_scaleX(1/a),this.hudLayer.set_scaleY(1/a)))},pause:function(){if(this.isTransitioning())Q.warn("Cannot pause while scene is transitioning.",{fileName:"com/stencyl/Engine.hx",lineNumber:3316,className:"com.stencyl.Engine",methodName:"pause"});else{q.paused=!0;if(0!=this.allActors.mSize)for(var a=this.allActors.keys();a.hasNext();){var b=a.next(),c=this.allActors,
d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)b=-2147483648;else if(d=d.mData,d[e]==b)b=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}b=f}c=-2147483648==b?null:c.mVals[b];null!=c&&c.pause()}if(0<this.whenPaused.length)for(this.whenPaused._dispatchIndex=0;this.whenPaused._dispatchIndex<this.whenPaused.length;){try{this.whenPaused.listeners[this.whenPaused._dispatchIndex](!0)}catch(g){a=J.caught(g),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Engine",methodName:"pause"})}++this.whenPaused._dispatchIndex}}},unpause:function(){q.paused=!1;if(0!=this.allActors.mSize)for(var a=this.allActors.keys();a.hasNext();){var b=a.next(),c=this.allActors,d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)b=-2147483648;else if(d=d.mData,d[e]==b)b=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}b=f}c=-2147483648==b?null:c.mVals[b];null!=c&&c.unpause()}if(0<this.whenPaused.length)for(this.whenPaused._dispatchIndex=
0;this.whenPaused._dispatchIndex<this.whenPaused.length;){try{this.whenPaused.listeners[this.whenPaused._dispatchIndex](!1)}catch(g){a=J.caught(g),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"unpause"})}++this.whenPaused._dispatchIndex}},isPaused:function(){return q.paused},draw:function(){for(var a=0,b=this.interactiveLayers;a<b.length;){var c=b[a];++a;c.overlay.get_graphics().clear()}this.hudLayer.overlay.get_graphics().clear();
this.g.graphics=this.transitionLayer.get_graphics();this.g.graphics.clear();this.g.resetGraphicsSettings();if(0!=this.allActors.mSize)for(a=this.allActors.iterator();a.hasNext();)if(b=a.next(),0<b.whenDrawing.length&&null!=b.layer&&(this.g.graphics=b.layer.overlay.get_graphics(),this.g.translateToActor(b),this.g.resetGraphicsSettings(),0<b.whenDrawing.length))for(b.whenDrawing._dispatchIndex=0;b.whenDrawing._dispatchIndex<b.whenDrawing.length;){try{b.whenDrawing.listeners[b.whenDrawing._dispatchIndex](this.g,
0,0)}catch(d){c=J.caught(d),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"draw"})}++b.whenDrawing._dispatchIndex}a=0;for(b=this.interactiveLayers;a<b.length;)if(c=b[a],++a,c.cameraMoved||this.tileUpdated)c.tiles.draw(q.cameraX*c.scrollFactorX|0,q.cameraY*c.scrollFactorY|0),c.cameraMoved=!1;this.tileUpdated=!1;this.g.graphics=this.transitionLayer.get_graphics();this.g.translateToScreen();this.g.resetGraphicsSettings();
if(0<this.whenDrawing.length)for(this.whenDrawing._dispatchIndex=0;this.whenDrawing._dispatchIndex<this.whenDrawing.length;){try{this.whenDrawing.listeners[this.whenDrawing._dispatchIndex](this.g,0,0)}catch(d){c=J.caught(d),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Engine",methodName:"draw"})}++this.whenDrawing._dispatchIndex}Ld.visitStringCache();null!=this.leave&&this.leave.isActive()?this.leave.draw(null):null!=this.enter&&
this.enter.isActive()&&this.enter.draw(null);null!=this.shaders&&0<this.shaders.length&&this.shaders[0].capture()},getValue:function(a,b){return this.behaviors.getAttribute(a,b)},setValue:function(a,b,c){this.behaviors.setAttribute(a,b,c)},say:function(a,b,c){return this.behaviors.call2(a,b,c)},shout:function(a,b){return this.behaviors.call(a,b)},getActor:function(a){var b=this.allActors,c=b.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;
for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648==a?null:b.mVals[a]},getActorsOfType:function(a){return null==a?(Q.error("Error: getActorsOfType was passed a null type\n"+jc.toString(jc.callStack()),{fileName:"com/stencyl/Engine.hx",lineNumber:3507,className:"com.stencyl.Engine",methodName:"getActorsOfType"}),[]):null!=this.actorsOfType.h[a.ID]?this.actorsOfType.h[a.ID]:[]},getRecycledActorsOfType:function(a){return this.recycledActorsOfType.h[a.ID]},getLayer:function(a,
b){return 0==a?this.getLayerById(A.parseInt(b)):this.getLayerByName(b)},getLayerById:function(a,b){null==b&&(b=!0);if(-1==a)return null;var c=q.engine.layers,d=c.mH,e=d.mHash[73856093*a&d.mMask];if(-1==e)e=-2147483648;else if(d=d.mData,d[e]==a)e=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==a){f=d[e+1];break}e=d[e+2]}e=f}c=-2147483648==e?null:c.mVals[e];null==c&&b&&(Q.error('Layer ID "'+a+'" does not exist -- assuming top layer',{fileName:"com/stencyl/Engine.hx",lineNumber:3554,className:"com.stencyl.Engine",
methodName:"getLayerById"}),c=this.topLayer);return c},getLayerByName:function(a,b){null==b&&(b=!0);var c=q.engine.layersByName.h[a];null==c&&b&&(Q.error('Layer name "'+a+'" does not exist -- assuming top layer',{fileName:"com/stencyl/Engine.hx",lineNumber:3567,className:"com.stencyl.Engine",methodName:"getLayerByName"}),c=this.topLayer);return c},getLayerByOrder:function(a){switch(a){case 0:return this.topLayer;case 1:return this.middleLayer;case 2:return this.bottomLayer;default:return Q.error('Layer order identifier "'+
a+'" is not FRONT, MIDDLE, or BACK -- assuming top layer',{fileName:"com/stencyl/Engine.hx",lineNumber:3582,className:"com.stencyl.Engine",methodName:"getLayerByOrder"}),this.topLayer}},sendToBack:function(a){a.isHUD||this.moveActorToLayer(a,this.bottomLayer)},sendBackward:function(a){if(!a.isHUD)for(var b=a.layer.order;this.layersToDraw.h.hasOwnProperty(--b);)if(this.layersToDraw.h[b]instanceof Fc){this.moveActorToLayer(a,this.layersToDraw.h[b]);break}},bringToFront:function(a){a.isHUD||this.moveActorToLayer(a,
this.topLayer)},bringForward:function(a){if(!a.isHUD)for(var b=a.layer.order;this.layersToDraw.h.hasOwnProperty(++b);)if(this.layersToDraw.h[b]instanceof Fc){this.moveActorToLayer(a,this.layersToDraw.h[b]);break}},getNumberOfActorsWithinLayer:function(a){return a instanceof Fc?U.__cast(a,Fc).actorContainer.get_numChildren():0},getNumberOfLayers:function(){return this.master.get_numChildren()},getOrderOfLayer:function(a){return a.order},moveLayerToOrder:function(a,b){0>b&&(b=0);b>this.master.get_numChildren()-
1&&(b=this.master.get_numChildren()-1);a.order!=b&&(this.master.setChildIndex(a,b),this.refreshLayers())},getNextLayerID:function(){for(var a=-1,b=this.layers.iterator();b.hasNext();){var c=b.next();a=Math.max(a,c.ID)|0}return a+1},insertLayer:function(a,b){this.master.addChildAt(a,b);a instanceof Ud?this.backgroundLayers.push(U.__cast(a,Ud)):a instanceof Fc&&this.interactiveLayers.push(U.__cast(a,Fc));this.layers.set(a.ID,a);this.layersByName.h[a.layerName]=a;this.refreshLayers()},removeLayer:function(a){this.master.removeChild(a);
a instanceof Ud?I.remove(this.backgroundLayers,U.__cast(a,Ud)):a instanceof Fc&&I.remove(this.interactiveLayers,U.__cast(a,Fc));this.layers.unset(a.ID);a=a.layerName;var b=this.layersByName;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];this.refreshLayers()},refreshLayers:function(){for(var a=!1,b=!1,c=0,d=0,e=this.master.get_numChildren();d<e;){var f=d++,g=U.__cast(this.master.getChildAt(f),vg);this.layersToDraw.h[f]=g;g.order=f;g instanceof Fc&&(a||(a=!0,this.bottomLayer=g),b||c!=Math.floor(this.interactiveLayers.length/
2)||(b=!0,this.middleLayer=g),this.topLayer=g,++c)}},getPhysicalWidth:function(){return this.physicalWidth},getPhysicalHeight:function(){return this.physicalHeight},enableGlobalSleeping:function(){this.world.m_allowSleep=!0},disableGlobalSleeping:function(){this.world.m_allowSleep=!1},getGroup:function(a,b){return-1E3==a&&null!=b?(a=this.groups,b=b.getGroupID(),a.h[b]):this.groups.h[a]},getGroupByName:function(a){a=this.reverseGroups.h[a];return null==a?this.groups.h[3]:a},nextJointID:function(){for(var a=
-1,b=this.joints.iterator();b.hasNext();){var c=b.next();null!=c&&(a=Math.max(a,c.ID)|0)}return a+1},addJoint:function(a){var b=this.nextJointID();a.ID=b;this.joints.h[b]=a},getJoint:function(a){return this.joints.h[a]},destroyJoint:function(a){this.joints.remove(a.ID);this.world.destroyJoint(a)},createStickJoint:function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=!1);null==c&&(c=-1);var g=a.getLocalCenter(),h=b.getLocalCenter();0==a.getType()&&(g.x=a.getUserData().getPhysicsWidth()/2,
g.y=a.getUserData().getPhysicsHeight()/2);0==b.getType()&&(h.x=b.getUserData().getPhysicsWidth()/2,h.y=b.getUserData().getPhysicsHeight()/2);g=a.getWorldPoint(g);h=b.getWorldPoint(h);var m=new Eh;m.initialize(a,b,g,h);m.collideConnected=d;m.dampingRatio=e;m.frequencyHz=f;a=this.world.createJoint(m);-1==c?this.addJoint(a):(this.joints.h[c]=a,a.ID=c);return U.__cast(a,ki)},createCustomStickJoint:function(a,b,c,d,e,f){b=new y(b,c);e=new y(e,f);b.x=q.toPhysicalUnits(b.x);b.y=q.toPhysicalUnits(b.y);e.x=
q.toPhysicalUnits(e.x);e.y=q.toPhysicalUnits(e.y);b=a.getWorldPoint(b);e=d.getWorldPoint(e);f=new Eh;f.initialize(a,d,b,e);a=this.world.createJoint(f);this.addJoint(a);return U.__cast(a,ki)},createHingeJoint:function(a,b,c,d,e,f,g,h,m,l,n){null==n&&(n=0);null==l&&(l=0);null==m&&(m=0);null==h&&(h=0);null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=-1);null==b&&(b=this.world.m_groundBody);null==c&&(c=a.getLocalCenter());var p=new Fh;p.bodyA=a;p.bodyB=b;c.x=q.toPhysicalUnits(c.x);c.y=q.toPhysicalUnits(c.y);
p.localAnchorA=c;p.localAnchorB=b.getLocalPoint(a.getWorldPoint(c));p.collideConnected=e;p.enableLimit=f;p.enableMotor=g;p.lowerAngle=h;p.upperAngle=m;p.maxMotorTorque=l;p.motorSpeed=n;a=this.world.createJoint(p);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return U.__cast(a,cg)},createSlidingJoint:function(a,b,c,d,e,f,g,h,m,l,n){null==n&&(n=0);null==l&&(l=0);null==m&&(m=0);null==h&&(h=0);null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=-1);null==b&&(b=this.world.m_groundBody);null==
c&&(c=new y(1,0));c.normalize();var p=a.getWorldCenter(),L=b.getWorldCenter();0==a.getType()&&null!=a.getUserData()&&(p.x=a.getUserData().getPhysicsWidth()/2,p.y=a.getUserData().getPhysicsHeight()/2,p=a.getWorldPoint(p));0==b.getType()&&null!=b.getUserData()&&(L.x=b.getUserData().getPhysicsWidth()/2,L.y=b.getUserData().getPhysicsHeight()/2,b.getWorldPoint(L));L=new Gh;L.initialize(a,b,p,c);L.collideConnected=e;L.enableLimit=f;L.enableMotor=g;L.lowerTranslation=q.toPhysicalUnits(h);L.upperTranslation=
q.toPhysicalUnits(m);L.maxMotorForce=l;L.motorSpeed=q.toPhysicalUnits(n);a=this.world.createJoint(L);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return U.__cast(a,qj)},createRegion:function(a,b,c,d){null==d&&(d=!1);var e=[];e.push(c);c=new md(this,a,b,e);d&&c.setXY(a+c.regionWidth/2,b+c.regionHeight/2);this.addRegion(c);return c},createBoxRegion:function(a,b,c,d){if(q.NO_PHYSICS)return a=new md(this,a,b,[],new fa(0,0,c,d)),this.addRegion(a),a;c=q.toPhysicalUnits(c);d=q.toPhysicalUnits(d);var e=
new Db;e.setAsBox(c/2,d/2);return this.createRegion(a,b,e,!0)},createCircularRegion:function(a,b,c){if(q.NO_PHYSICS)return a=new md(this,a,b,[],new fa(0,0,2*c,2*c)),this.addRegion(a),a;c=q.toPhysicalUnits(c);var d=new Lc;d.m_radius=c;return this.createRegion(a,b,d,!0)},addRegion:function(a){-1==a.ID&&(a.ID=this.nextRegionID());this.regions.set(a.ID,a);q.NO_PHYSICS&&this.groups.h[-2].addChild(a)},removeRegion:function(a){a=this.getRegion(a);this.regions.unset(a.ID);a.destroy();q.NO_PHYSICS&&this.groups.h[-2].removeChild(a)},
getRegion:function(a){var b=this.regions,c=b.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648==a?null:b.mVals[a]},getRegions:function(){return this.regions},nextRegionID:function(){for(var a=-1,b=this.regions.iterator();b.hasNext();){var c=b.next();null!=c&&(a=Math.max(a,c.ID)|0)}return a+1},isInRegion:function(a,b){if(null!=b){var c=this.regions;var d=b.getID(),
e=c.mH,f=e.mHash[73856093*d&e.mMask];if(-1==f)d=-2147483648;else if(e=e.mData,e[f]==d)d=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==d){g=e[f+1];break}f=e[f+2]}d=g}c=null!=(-2147483648==d?null:c.mVals[d])}else c=!1;if(c)return b.containsActor(a);Q.error("Region does not exist.",{fileName:"com/stencyl/Engine.hx",lineNumber:4199,className:"com.stencyl.Engine",methodName:"isInRegion"});return!1},createTerrainRegion:function(a,b,c,d,e){null==e&&(e=1);null==d&&(d=!1);var f=[];f.push(c);
c=new Jg(this,a,b,f,e);d&&c.setXY(a+c.regionWidth/2,b+c.regionHeight/2);this.addTerrainRegion(c);return c},createBoxTerrainRegion:function(a,b,c,d,e){null==e&&(e=1);c=q.toPhysicalUnits(c);d=q.toPhysicalUnits(d);var f=new Db;f.setAsBox(c/2,d/2);return this.createTerrainRegion(a,b,f,!0,e)},createCircularTerrainRegion:function(a,b,c,d){null==d&&(d=1);c=q.toPhysicalUnits(c);var e=new Lc;e.m_radius=c;return this.createTerrainRegion(a,b,e,!0,d)},addTerrainRegion:function(a){-1==a.ID&&(a.ID=this.nextTerrainRegionID());
this.terrainRegions.h[a.ID]=a},removeTerrainRegion:function(a){var b=this.getTerrainRegion(a);this.terrainRegions.remove(a);b.destroy()},getTerrainRegion:function(a){return this.terrainRegions.h[a]},getTerrainRegions:function(){return this.terrainRegions},nextTerrainRegionID:function(){for(var a=-1,b=this.terrainRegions.iterator();b.hasNext();){var c=b.next();null!=c&&(a=Math.max(a,c.ID)|0)}return a+1},setGameAttribute:function(a,b){this.gameAttributes.h[a]=b},getGameAttribute:function(a){return this.gameAttributes.h[a]},
restoreGameAttributes:function(){var a=bc.get().readGameMbs();a=oe.readMap(a.getGameAttributes());this.gameAttributes.h=Object.create(null);for(var b=Object.keys(a.h),c=b.length,d=0;d<c;){var e=b[d++];this.gameAttributes.h[e]=a.h[e]}},setOffscreenTolerance:function(a,b,c,d){q.paddingTop=a;q.paddingLeft=b;q.paddingBottom=c;q.paddingRight=d},setScrollFactor:function(a,b,c){this.setLayerScrollFactor(this.getLayerById(a),b,c)},setLayerScrollFactor:function(a,b,c){null==c&&(c=b);a.scrollFactorX=b;a.scrollFactorY=
c},__class__:q};var ar=function(){};k["com.stencyl.Extension"]=ar;ar.__name__="com.stencyl.Extension";ar.prototype={initialize:function(){},loadScene:function(a){},cleanupScene:function(){},preSceneUpdate:function(){},reloadGame:function(){},__class__:ar};var Mn=function(a,b){this.inputControlMap=a;this.getInputs=b};k["com.stencyl.InputMethod_Int"]=Mn;Mn.__name__="com.stencyl.InputMethod_Int";Mn.prototype={inputControlMap:null,getInputs:null,mapInputToControl:function(a,b){this.inputControlMap.exists(a)||
this.inputControlMap.set(a,[]);for(var c=this.inputControlMap.get(a),d=0;d<c.length;){var e=c[d];++d;e!=b&&(I.remove(this.getInputs(e),a),M.controlStateUpdated(e))}-1==this.getInputs(b).indexOf(a)&&(this.getInputs(b).push(a),c.push(b),M.controlStateUpdated(b))},unmapInput:function(a){var b=this.inputControlMap.get(a);if(null!=b)for(var c=0;c<b.length;){var d=b[c];++c;I.remove(this.getInputs(d),a);M.controlStateUpdated(d)}this.inputControlMap.remove(a)},addInputToControl:function(a,b){-1==this.getInputs(b).indexOf(a)&&
(this.getInputs(b).push(a),M.controlStateUpdated(b),this.inputControlMap.exists(a)||this.inputControlMap.set(a,[]),this.inputControlMap.get(a).push(b))},removeInputFromControl:function(a,b){if(-1!=this.getInputs(b).indexOf(a)){I.remove(this.getInputs(b),a);M.controlStateUpdated(b);var c=this.inputControlMap.get(a);I.remove(c,b);0==c.length&&this.inputControlMap.remove(a)}},getInputsForControl:function(a){return null!=a?this.getInputs(a):null},removeAllInputsFromControl:function(a){for(var b=this.getInputs(a);0<
b.length;){var c=b.pop(),d=this.inputControlMap.get(c);I.remove(d,a);0==d.length&&this.inputControlMap.remove(c)}M.controlStateUpdated(a)},__class__:Mn};var M=function(){};k["com.stencyl.Input"]=M;M.__name__="com.stencyl.Input";M.resetStatics=function(){q.stage.removeEventListener("keyDown",M.onKeyDown);q.stage.removeEventListener("keyUp",M.onKeyUp);q.stage.removeEventListener("mouseDown",M.onMouseDown);q.stage.removeEventListener("mouseUp",M.onMouseUp);q.stage.removeEventListener("mouseWheel",M.onMouseWheel);
q.stage.removeEventListener("rightMouseDown",M.onRightMouseDown);q.stage.removeEventListener("rightMouseUp",M.onRightMouseUp);q.stage.removeEventListener("middleMouseDown",M.onMiddleMouseDown);q.stage.removeEventListener("middleMouseUp",M.onMiddleMouseUp);Me.get_supportsTouchEvents()&&(q.stage.removeEventListener("touchBegin",M.onTouchBegin),q.stage.removeEventListener("touchMove",M.onTouchMove),q.stage.removeEventListener("touchEnd",M.onTouchEnd));M._roxAgent.detach();q.engine.root.removeEventListener("rox_gesture_swipe",
M.onSwipe);M.mouseX=0;M.mouseY=0;M.mouseDown=M.mousePressed=M.mouseReleased=M.mouseWheel=!1;M.rightMouseDown=M.rightMousePressed=M.rightMouseReleased=!1;M.middleMouseDown=M.middleMousePressed=M.middleMouseReleased=!1;M.mouseWheelDelta=0;M.accelX=M.accelY=M.accelZ=0;M.multiTouchPoints=null;M.numTouches=0;M._swipeDirection=0;M.swipedUp=M.swipedDown=M.swipedRight=M.swipedLeft=!1;M._roxAgent=null;M._enabled=!1;M._key=[];M._keyInput.inputControlMap=new Xa;M._controlMap=new ia;M._controlsToReset=[]};M.define=
function(a,b){if(null==M._controlMap.h[a]){var c=M._controlMap,d=new Xk(a);c.h[a]=d}else M.unmapControl(a);for(c=0;c<b.length;)d=b[c],++c,M.addKeyToControl(d,a)};M.mapKey=function(a,b){M._keyInput.mapInputToControl(a,M._controlMap.h[b])};M.unmapKey=function(a){M._keyInput.unmapInput(a)};M.addKeyToControl=function(a,b){M._keyInput.addInputToControl(a,M._controlMap.h[b])};M.removeKeyFromControl=function(a,b){M._keyInput.removeInputFromControl(a,M._controlMap.h[b])};M.getKeys=function(a){return M._keyInput.getInputsForControl(M._controlMap.h[a])};
M.mapJoystickButton=function(a,b){};M.unmapJoystickButton=function(a){};M.addJoystickButtonToControl=function(a,b){};M.removeJoystickButtonFromControl=function(a,b){};M.getJoystickButtons=function(a){return null};M.unmapControl=function(a){M._keyInput.removeAllInputsFromControl(M._controlMap.h[a])};M.unmapKeyboardFromControl=function(a){M._keyInput.removeAllInputsFromControl(M._controlMap.h[a])};M.unmapJoystickFromControl=function(a){};M.setJoySensitivity=function(a){};M.saveJoystickConfig=function(a){};
M.loadJoystickConfig=function(a){};M.clearJoystickConfig=function(){};M.loadInputConfig=function(){for(var a=Object.keys(ha.keys.h),b=a.length,c=0;c<b;){for(var d=a[c++],e=ha.keys.h[d],f=[],g=0;g<e.length;){var h=e[g];++g;f.push(Ja.keyFromName(h))}e=f;f=new Xk(d);M._controlMap.h[d]=f;for(d=0;d<e.length;)g=e[d],++d,M._keyInput.addInputToControl(g,f)}};M.check=function(a){a=M._controlMap.h[a];return null!=a?a.down:!1};M.pressed=function(a){a=M._controlMap.h[a];return null!=a?a.pressed:!1};M.released=
function(a){a=M._controlMap.h[a];return null!=a?a.released:!1};M.getButtonPressure=function(a){a=M._controlMap.h[a];return null!=a?a.pressure:0};M.simulateKeyPress=function(a){M.controlPressed(M._controlMap.h[a],1)};M.simulateKeyRelease=function(a){M.controlReleased(M._controlMap.h[a])};M.enableJoystick=function(){};M.enable=function(){M._enabled||null==q.stage||(q.stage.addEventListener("keyDown",M.onKeyDown,!1,2),q.stage.addEventListener("keyUp",M.onKeyUp,!1,2),q.stage.addEventListener("mouseDown",
M.onMouseDown,!1,2),q.stage.addEventListener("mouseUp",M.onMouseUp,!1,2),q.stage.addEventListener("mouseWheel",M.onMouseWheel,!1,2),q.stage.addEventListener("rightMouseDown",M.onRightMouseDown,!1,2),q.stage.addEventListener("rightMouseUp",M.onRightMouseUp,!1,2),q.stage.addEventListener("middleMouseDown",M.onMiddleMouseDown,!1,2),q.stage.addEventListener("middleMouseUp",M.onMiddleMouseUp,!1,2),Me.get_supportsTouchEvents()&&(M.multiTouchPoints=new ia,Me.inputMode=2,q.stage.addEventListener("touchBegin",
M.onTouchBegin),q.stage.addEventListener("touchMove",M.onTouchMove),q.stage.addEventListener("touchEnd",M.onTouchEnd)),M._roxAgent=new rb(q.engine.root,2),q.engine.root.addEventListener("rox_gesture_swipe",M.onSwipe),M._swipeDirection=-1,M.swipedLeft=!1,M.swipedRight=!1,M.swipedUp=!1,M.swipedDown=!1,M.mouseX=0,M.mouseY=0,M.accelX=0,M.accelY=0,M.accelZ=0,M.numTouches=0,M._enabled=!0)};M.update=function(){M.swipedLeft=!1;M.swipedRight=!1;M.swipedUp=!1;M.swipedDown=!1;if(-1<M._swipeDirection){switch(M._swipeDirection){case 0:M.swipedLeft=
!0;break;case 1:M.swipedRight=!0;break;case 2:M.swipedUp=!0;break;case 3:M.swipedDown=!0}if(null!=q.engine.whenSwiped&&0<q.engine.whenSwiped.length)for(q.engine.whenSwiped._dispatchIndex=0;q.engine.whenSwiped._dispatchIndex<q.engine.whenSwiped.length;){try{q.engine.whenSwiped.listeners[q.engine.whenSwiped._dispatchIndex]()}catch(c){var a=J.caught(c);Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Input",methodName:"update"})}++q.engine.whenSwiped._dispatchIndex}M._swipeDirection=
-1}M.mouseX=(q.stage.get_mouseX()-q.screenOffsetX)/q.screenScaleX;M.mouseY=(q.stage.get_mouseY()-q.screenOffsetY)/q.screenScaleY;for(a=M._controlsToReset.length;0<=--a;){var b=M._controlsToReset.pop();b.pressed=!1;b.released=!1}M.mousePressed&&(M.mousePressed=!1);M.mouseReleased&&(M.mouseReleased=!1);M.rightMousePressed&&(M.rightMousePressed=!1);M.rightMouseReleased&&(M.rightMouseReleased=!1);M.middleMousePressed&&(M.middleMousePressed=!1);M.middleMouseReleased&&(M.middleMouseReleased=!1);M.mouseWheelDelta=
0};M.onSwipe=function(a){a=U.__cast(a.extra,pa);Math.abs(a.x)<=Math.abs(a.y)?M._swipeDirection=0>=a.y?2:3:Math.abs(a.x)>Math.abs(a.y)&&(M._swipeDirection=0>=a.x?0:1)};M.controlsPressed=function(a,b){if(null!=a)for(var c=0;c<a.length;){var d=a[c];++c;M.controlPressed(d,b)}};M.controlsReleased=function(a){if(null!=a)for(var b=0;b<a.length;){var c=a[b];++b;M.controlReleased(c)}};M.controlPressed=function(a,b){if(null!=a)if(a.down)a.pressure=b;else if(a.down=!0,a.pressed=!0,a.pressure=b,M._controlsToReset.push(a),
q.engine.keyPollOccurred&&(a=q.engine.whenKeyPressedEvents.map.get(a.name),null!=a&&0<a.length))for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex](!0,!1)}catch(c){b=J.caught(c),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Input",methodName:"controlPressed"})}++a._dispatchIndex}};M.controlReleased=function(a){if(null!=a&&a.down&&(a.down=!1,a.released=!0,a.pressure=0,M._controlsToReset.push(a),q.engine.keyPollOccurred&&
(a=q.engine.whenKeyPressedEvents.map.get(a.name),null!=a&&0<a.length)))for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex](!1,!0)}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Input",methodName:"controlReleased"})}++a._dispatchIndex}};M.controlStateUpdated=function(a){for(var b=0,c=0,d=a.keys;c<d.length;){var e=d[c];++c;M._key[e]&&(b=1)}a.pressure=b;0<b&&!a.down?M.controlPressed(a,
b):0==b&&a.down&&M.controlReleased(a)};M.onKeyDown=function(a){var b=a.keyCode;if(!(7E3<b)){if(!M._key[b]&&(M._key[b]=!0,b=M._keyInput.inputControlMap.h[b],null!=b))for(var c=0;c<b.length;){var d=b[c];++c;M.controlPressed(d,1)}if(0<q.engine.whenAnyKeyPressed.length)for(q.engine.whenAnyKeyPressed._dispatchIndex=0;q.engine.whenAnyKeyPressed._dispatchIndex<q.engine.whenAnyKeyPressed.length;){try{q.engine.whenAnyKeyPressed.listeners[q.engine.whenAnyKeyPressed._dispatchIndex](a)}catch(e){b=J.caught(e),
Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Input",methodName:"onKeyDown"})}++q.engine.whenAnyKeyPressed._dispatchIndex}}};M.onKeyUp=function(a){var b=a.keyCode;if(!(7E3<b)){if(M._key[b]&&(M._key[b]=!1,b=M._keyInput.inputControlMap.h[b],null!=b))for(var c=0;c<b.length;){var d=b[c];++c;M.controlReleased(d)}if(0<q.engine.whenAnyKeyReleased.length)for(q.engine.whenAnyKeyReleased._dispatchIndex=0;q.engine.whenAnyKeyReleased._dispatchIndex<
q.engine.whenAnyKeyReleased.length;){try{q.engine.whenAnyKeyReleased.listeners[q.engine.whenAnyKeyReleased._dispatchIndex](a)}catch(e){b=J.caught(e),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.Input",methodName:"onKeyUp"})}++q.engine.whenAnyKeyReleased._dispatchIndex}}};M.onMouseDown=function(a){M.mouseX=(q.stage.get_mouseX()-q.screenOffsetX)/q.screenScaleX;M.mouseY=(q.stage.get_mouseY()-q.screenOffsetY)/q.screenScaleY;M.mouseDown||
(M.mouseDown=!0,M.mousePressed=!0)};M.onMouseUp=function(a){M.mouseX=(q.stage.get_mouseX()-q.screenOffsetX)/q.screenScaleX;M.mouseY=(q.stage.get_mouseY()-q.screenOffsetY)/q.screenScaleY;M.mouseDown=!1;M.mouseReleased=!0};M.onRightMouseDown=function(a){M.rightMouseDown||(M.rightMouseDown=!0,M.rightMousePressed=!0)};M.onRightMouseUp=function(a){M.rightMouseDown=!1;M.rightMouseReleased=!0};M.onMiddleMouseDown=function(a){M.middleMouseDown||(M.middleMouseDown=!0,M.middleMousePressed=!0)};M.onMiddleMouseUp=
function(a){M.middleMouseDown=!1;M.middleMouseReleased=!0};M.onMouseWheel=function(a){M.mouseWheel=!0;M.mouseWheelDelta=a.delta};M.onTouchBegin=function(a){if(0<q.engine.whenMTStarted.length)for(q.engine.whenMTStarted._dispatchIndex=0;q.engine.whenMTStarted._dispatchIndex<q.engine.whenMTStarted.length;){try{q.engine.whenMTStarted.listeners[q.engine.whenMTStarted._dispatchIndex](a)}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,
className:"com.stencyl.Input",methodName:"onTouchBegin"})}++q.engine.whenMTStarted._dispatchIndex}M.multiTouchPoints.h[null==a.touchPointID?"null":""+a.touchPointID]=a;M.numTouches++};M.onTouchMove=function(a){if(0<q.engine.whenMTDragged.length)for(q.engine.whenMTDragged._dispatchIndex=0;q.engine.whenMTDragged._dispatchIndex<q.engine.whenMTDragged.length;){try{q.engine.whenMTDragged.listeners[q.engine.whenMTDragged._dispatchIndex](a)}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Input",methodName:"onTouchMove"})}++q.engine.whenMTDragged._dispatchIndex}M.multiTouchPoints.h[null==a.touchPointID?"null":""+a.touchPointID]=a};M.onTouchEnd=function(a){if(0<q.engine.whenMTEnded.length)for(q.engine.whenMTEnded._dispatchIndex=0;q.engine.whenMTEnded._dispatchIndex<q.engine.whenMTEnded.length;){try{q.engine.whenMTEnded.listeners[q.engine.whenMTEnded._dispatchIndex](a)}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.Input",methodName:"onTouchEnd"})}++q.engine.whenMTEnded._dispatchIndex}a=null==a.touchPointID?"null":""+a.touchPointID;b=M.multiTouchPoints;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];M.numTouches--};var Xk=function(a){this.pressure=0;this.name=a;this.keys=[]};k["com.stencyl.Control"]=Xk;Xk.__name__="com.stencyl.Control";Xk.prototype={name:null,keys:null,pressed:null,released:null,down:null,pressure:null,__class__:Xk};var br=function(a,b){this.inputControlMap=
a;this.getInputs=b};k["com.stencyl.InputMethod"]=br;br.__name__="com.stencyl.InputMethod";br.prototype={inputControlMap:null,getInputs:null,mapInputToControl:function(a,b){this.inputControlMap.exists(a)||this.inputControlMap.set(a,[]);for(var c=this.inputControlMap.get(a),d=0;d<c.length;){var e=c[d];++d;e!=b&&(I.remove(this.getInputs(e),a),M.controlStateUpdated(e))}-1==this.getInputs(b).indexOf(a)&&(this.getInputs(b).push(a),c.push(b),M.controlStateUpdated(b))},unmapInput:function(a){var b=this.inputControlMap.get(a);
if(null!=b)for(var c=0;c<b.length;){var d=b[c];++c;I.remove(this.getInputs(d),a);M.controlStateUpdated(d)}this.inputControlMap.remove(a)},addInputToControl:function(a,b){-1==this.getInputs(b).indexOf(a)&&(this.getInputs(b).push(a),M.controlStateUpdated(b),this.inputControlMap.exists(a)||this.inputControlMap.set(a,[]),this.inputControlMap.get(a).push(b))},removeInputFromControl:function(a,b){if(-1!=this.getInputs(b).indexOf(a)){I.remove(this.getInputs(b),a);M.controlStateUpdated(b);var c=this.inputControlMap.get(a);
I.remove(c,b);0==c.length&&this.inputControlMap.remove(a)}},getInputsForControl:function(a){return null!=a?this.getInputs(a):null},removeAllInputsFromControl:function(a){for(var b=this.getInputs(a);0<b.length;){var c=b.pop(),d=this.inputControlMap.get(c);I.remove(d,a);0==d.length&&this.inputControlMap.remove(c)}M.controlStateUpdated(a)},__class__:br};var Ja=function(){};k["com.stencyl.Key"]=Ja;Ja.__name__="com.stencyl.Key";Ja.nameOfKey=function(a){if(97<=a&&122>=a)return String.fromCodePoint(a);if(112<=
a&&126>=a)return"F"+A.string(a-111);if(96<=a&&105>=a)return"NUMPAD "+A.string(a-96);switch(a){case 8:return"BACKSPACE";case 9:return"TAB";case 13:return"ENTER";case 15:return"COMMAND";case 16:return"SHIFT";case 17:return"CONTROL";case 20:return"CAPS LOCK";case 27:return"ESCAPE";case 32:return"SPACE";case 33:return"PAGE UP";case 34:return"PAGE DOWN";case 35:return"END";case 36:return"HOME";case 37:return"LEFT";case 38:return"UP";case 39:return"RIGHT";case 40:return"DOWN";case 45:return"INSERT";case 46:return"DELETE";
case 106:return"NUMPAD MULTIPLY";case 107:return"NUMPAD ADD";case 108:return"NUMPAD ENTER";case 109:return"NUMPAD SUBTRACT";case 110:return"NUMPAD DECIMAL";case 111:return"NUMPAD DIVIDE";default:return String.fromCodePoint(a)}};Ja.keyFromName=function(a){return Ja.keyboardNameMap.h[a]};var pa=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};k["openfl.geom.Point"]=pa;pa.__name__="openfl.geom.Point";pa.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};pa.interpolate=
function(a,b,c){return new pa(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};pa.polar=function(a,b){return new pa(a*Math.cos(b),a*Math.sin(b))};pa.prototype={x:null,y:null,add:function(a){return new pa(a.x+this.x,a.y+this.y)},clone:function(){return new pa(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},equals:function(a){return null!=a&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(0!=this.x||0!=this.y)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=
a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a){return new pa(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+", y="+this.y+")"},__toLimeVector2:function(){null==pa.__limeVector2&&(pa.__limeVector2=new Vd);var a=pa.__limeVector2;a.x=this.x;a.y=this.y;return pa.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:pa,__properties__:{get_length:"get_length"}};var fa=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==
b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};k["openfl.geom.Rectangle"]=fa;fa.__name__="openfl.geom.Rectangle";fa.prototype={height:null,width:null,x:null,y:null,clone:function(){return new fa(this.x,this.y,this.width,this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.contains(a.x,a.y)},containsRect:function(a){return 0>=a.width||0>=a.height?a.x>this.x&&a.y>this.y&&a.get_right()<
this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height},equals:function(a){return a==this?!0:null!=a&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b},inflatePoint:function(a){this.inflate(a.x,a.y)},intersection:function(a){var b=
this.x<a.x?a.x:this.x,c=this.get_right()>a.get_right()?a.get_right():this.get_right();if(c<=b)return new fa;var d=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();return a<=d?new fa:new fa(b,d,c-b,a-d)},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return 0>=
this.width?!0:0>=this.height},offset:function(a,b){this.x+=a;this.y+=b},offsetPoint:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},toString:function(){return"(x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"},union:function(a){if(0==this.width||0==this.height)return a.clone();if(0==a.width||0==a.height)return this.clone();var b=this.x>a.x?a.x:this.x,c=this.get_right()<
a.get_right()?a.get_right():this.get_right(),d=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();return new fa(b,d,c-b,a-d)},__contract:function(a,b,c,d){if(0!=this.width||0!=this.height){var e=0,f=0,g=0,h=0;this.x<a&&(e=a-this.x);this.y<b&&(f=b-this.y);this.get_right()>a+c&&(g=a+c-this.get_right());this.get_bottom()>b+d&&(h=b+d-this.get_bottom());this.x+=e;this.y+=f;this.width+=g-e;this.height+=h-f}},__expand:function(a,b,c,d){if(0==this.width&&0==this.height)this.x=
a,this.y=b,this.width=c,this.height=d;else{var e=this.get_right(),f=this.get_bottom();this.x>a&&(this.x=a,this.width=e-a);this.y>b&&(this.y=b,this.height=f-b);e<a+c&&(this.width=a+c-this.x);f<b+d&&(this.height=b+d-this.y)}},__toLimeRectangle:function(){null==fa.__limeRectangle&&(fa.__limeRectangle=new Dd);fa.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return fa.__limeRectangle},__transform:function(a,b){var c=b.a*this.x+b.c*this.y,d=c,e=b.b*this.x+b.d*this.y,f=e,g=b.a*(this.x+this.width)+
b.c*this.y,h=b.b*(this.x+this.width)+b.d*this.y;g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);g=b.a*(this.x+this.width)+b.c*(this.y+this.height);h=b.b*(this.x+this.width)+b.d*(this.y+this.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);g=b.a*this.x+b.c*(this.y+this.height);h=b.b*this.x+b.d*(this.y+this.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);a.setTo(c+b.tx,e+b.ty,d-c,f-e)},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new pa(this.x+
this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new pa(this.width,this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=
a-this.y;return this.y=a},get_topLeft:function(){return new pa(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:fa,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};
var n=function(){this.checkProperties=this.scriptInit=!1;this.nameMap=new ia;this.propertyChangeEvents=new ia;this.equalityPairs=new Vb;this.attributeTweens=new ia};k["com.stencyl.behavior.Script"]=n;n.__name__="com.stencyl.behavior.Script";n.resetStatics=function(){n.engine=null;n.lastCreatedActor=null;n.lastCreatedJoint=null;n.lastCreatedRegion=null;n.lastCreatedTerrainRegion=null;n.mpx=0;n.mpy=0;n.mrx=0;n.mry=0;n.imageApiAutoscale=!0};n.sameAs=function(a,b){return a==b};n.sameAsAny=function(a,
b,c){return a!=b?a==c:!0};n.asBoolean=function(a){return 1==a?!0:"true"==a?!0:!1};n.strCompare=function(a,b,c){return 0>c?a<b:a>b};n.strCompareBefore=function(a,b){return a<b};n.strCompareAfter=function(a,b){return a>b};n.asNumber=function(a){return null==a?0:"number"==typeof a?U.__cast(a,Lr):"number"==typeof a&&(a|0)===a?U.__cast(a,qi):"boolean"==typeof a?U.__cast(a,Mr)?1:0:"string"==typeof a?parseFloat(a):parseFloat(A.string(a))};n.hasValue=function(a){return n.isPrimitive(a)?!0:"string"==typeof a?
""!=U.__cast(a,String):null!=a};n.isPrimitive=function(a){return"boolean"==typeof a||"number"==typeof a||"number"==typeof a&&(a|0)===a?!0:!1};n.getDefaultValue=function(a){return"boolean"==typeof a?!1:"number"==typeof a||"number"==typeof a&&(a|0)===a?0:"string"==typeof a?"":null};n.getGroupByName=function(a){return n.engine.getGroupByName(a)};n.getLastCreatedRegion=function(){return n.lastCreatedRegion};n.getAllRegions=function(){for(var a=[],b=n.engine.regions.iterator();b.hasNext();){var c=b.next();
null!=c&&a.push(c)}return a};n.getRegion=function(a){return n.engine.getRegion(a)};n.removeRegion=function(a){n.engine.removeRegion(a)};n.createBoxRegion=function(a,b,c,d){return n.lastCreatedRegion=n.engine.createBoxRegion(a,b,c,d)};n.createCircularRegion=function(a,b,c){return n.lastCreatedRegion=n.engine.createCircularRegion(a,b,c)};n.isInRegion=function(a,b){return n.engine.isInRegion(a,b)};n.getActorsInRegion=function(a){var b=[];for(a=a.getContainedActors().iterator();a.hasNext();){var c=a.next();
b.push(n.engine.getActor(c))}return b};n.sceneHasBehavior=function(a){return n.engine.behaviors.hasBehavior(a)};n.enableBehaviorForScene=function(a){n.engine.behaviors.enableBehavior(a)};n.disableBehaviorForScene=function(a){n.engine.behaviors.disableBehavior(a)};n.isBehaviorEnabledForScene=function(a){return n.engine.behaviors.isBehaviorEnabled(a)};n.getValueForScene=function(a,b){return n.engine.getValue(a,b)};n.setValueForScene=function(a,b,c){n.engine.setValue(a,b,c)};n.shoutToScene=function(a,
b){return n.engine.shout(a,b)};n.sayToScene=function(a,b,c){return n.engine.say(a,b,c)};n.setGameAttribute=function(a,b){n.engine.gameAttributes.h[a]=b};n.getGameAttribute=function(a){return n.engine.getGameAttribute(a)};n.setSavable=function(a,b){n.engine.savableAttributes.h[a]=b};n.runLater=function(a,b,c){a=new Yk(b,a|0,!1,c);n.engine.addTask(a);return a};n.runPeriodically=function(a,b,c){a=new Yk(b,a|0,!0,c);n.engine.addTask(a);return a};n.getStepSize=function(){return q.STEP_SIZE};n.getScene=
function(){return n.engine.scene};n.getCurrentScene=function(){return n.getScene().ID};n.getIDForScene=function(a){for(var b=Lb.get().scenes.iterator();b.hasNext();){var c=b.next();if(a==c.name)return c.ID}return-1};n.getCurrentSceneName=function(){return n.getScene().name};n.getSceneWidth=function(){return n.getScene().sceneWidth};n.getSceneHeight=function(){return n.getScene().sceneHeight};n.getTileWidth=function(){return n.getScene().tileWidth};n.getTileHeight=function(){return n.getScene().tileHeight};
n.reloadCurrentScene=function(a,b){n.engine.switchScene(n.getCurrentScene(),a,b)};n.switchScene=function(a,b,c){n.engine.switchScene(a,b,c)};n.createPixelizeOut=function(a,b){return new sj(a,1,15)};n.createPixelizeIn=function(a,b){return new sj(a,15,1)};n.createBubblesOut=function(a,b){null==b&&(b=-16777216);return new tj(kb.OUT,a,50,b)};n.createBubblesIn=function(a,b){null==b&&(b=-16777216);return new tj(kb.IN,a,50,b)};n.createBlindsOut=function(a,b){null==b&&(b=-16777216);return new uj(kb.OUT,a,
10,b)};n.createBlindsIn=function(a,b){null==b&&(b=-16777216);return new uj(kb.IN,a,10,b)};n.createRectangleOut=function(a,b){null==b&&(b=-16777216);return new vj(kb.OUT,a,b)};n.createRectangleIn=function(a,b){null==b&&(b=-16777216);return new vj(kb.IN,a,b)};n.createSlideTransition=function(a,b){return new Ne(n.engine.master,n.engine.colorLayer,a,b)};n.createSlideUpTransition=function(a){return n.createSlideTransition(a,Ne.SLIDE_UP)};n.createSlideDownTransition=function(a){return n.createSlideTransition(a,
Ne.SLIDE_DOWN)};n.createSlideLeftTransition=function(a){return n.createSlideTransition(a,Ne.SLIDE_LEFT)};n.createSlideRightTransition=function(a){return n.createSlideTransition(a,Ne.SLIDE_RIGHT)};n.createCrossfadeTransition=function(a){return new Zk(n.engine.root,a)};n.createFadeOut=function(a,b){null==b&&(b=-16777216);return new $k(a,b)};n.createFadeIn=function(a,b){null==b&&(b=-16777216);return new al(a,b)};n.createCircleOut=function(a,b){null==b&&(b=-16777216);return new wj(kb.OUT,a,b)};n.createCircleIn=
function(a,b){null==b&&(b=-16777216);return new wj(kb.IN,a,b)};n.setBlendModeForLayer=function(a,b){a.set_blendMode(b);a instanceof Fc&&U.__cast(a,Fc).tiles.set_blendMode(b)};n.showTileLayer=function(a){a.set_alpha(1)};n.hideTileLayer=function(a){a.set_alpha(0)};n.fadeTileLayerTo=function(a,b,c,d){null==a.alphaTween&&(a.alphaTween=(new we).doOnUpdate(function(){a.set_alpha(a.alphaTween.value)}));a.alphaTween.tween(a.get_alpha(),b,d,1E3*c|0)};n.getTileLayerOpacity=function(a){return 100*a.get_alpha()};
n.setDrawingLayer=function(a){a instanceof Fc&&(q.engine.g.graphics=a.overlay.get_graphics())};n.setDrawingLayerToActorLayer=function(a){null!=a&&(q.engine.g.graphics=a.layer.overlay.get_graphics())};n.setDrawingLayerToSceneLayer=function(){q.engine.g.graphics=q.engine.transitionLayer.get_graphics()};n.getScreenX=function(){return q.cameraX/q.SCALE};n.getScreenY=function(){return q.cameraY/q.SCALE};n.getScreenXCenter=function(){return q.cameraX/q.SCALE+q.screenWidth/2};n.getScreenYCenter=function(){return q.cameraY/
q.SCALE+q.screenHeight/2};n.getCamera=function(){return n.engine.camera};n.isCtrlDown=function(){return M.check("iCTRL")?!0:M.check("iCOMMAND")};n.isShiftDown=function(){return M.check("iSHIFT")};n.simulateKeyPress=function(a){M.simulateKeyPress(a)};n.simulateKeyRelease=function(a){M.simulateKeyRelease(a)};n.isKeyDown=function(a){return M.check(a)};n.isKeyPressed=function(a){return M.pressed(a)};n.isKeyReleased=function(a){return M.released(a)};n.isMouseDown=function(){return M.mouseDown};n.isMousePressed=
function(){return M.mousePressed};n.isMouseReleased=function(){return M.mouseReleased};n.getMouseX=function(){return M.mouseX/q.SCALE};n.getMouseY=function(){return M.mouseY/q.SCALE};n.getMouseWorldX=function(){return M.mouseX/q.SCALE+q.cameraX};n.getMouseWorldY=function(){return M.mouseY/q.SCALE+q.cameraY};n.getMousePressedX=function(){return n.mpx};n.getMousePressedY=function(){return n.mpy};n.getMouseReleasedX=function(){return n.mrx};n.getMouseReleasedY=function(){return n.mry};n.showCursor=function(){le.show()};
n.hideCursor=function(){le.hide()};n.charFromCharCode=function(a){return 32>a||126<a&&160>a?"":String.fromCodePoint(a)};n.getLastCreatedActor=function(){return n.lastCreatedActor};n.createActor=function(a,b,c,d){a=n.engine.createActorOfType(a,b,c,d);return n.lastCreatedActor=a};n.createRecycledActor=function(a,b,c,d){a=n.engine.getRecycledActorOfType(a,b,c,d);return n.lastCreatedActor=a};n.createRecycledActorOnLayer=function(a,b,c,d){a=n.engine.getRecycledActorOfTypeOnLayer(a,b,c,d.ID);return n.lastCreatedActor=
a};n.recycleActor=function(a){n.engine.recycleActor(a)};n.createActorInNextScene=function(a,b,c,d){n.engine.createActorInNextScene(a,b,c,d)};n.getActorTypeByName=function(a){return bc.get().resourceMap.get(a)};n.getActorType=function(a){return bc.get().resources.get(a)};n.getAllActorTypes=function(){return bc.get().getAllActorTypes()};n.getActorsOfType=function(a){return n.engine.getActorsOfType(a)};n.getActor=function(a){return n.engine.getActor(a)};n.getActorGroup=function(a){return n.engine.getGroup(a)};
n.setGravity=function(a,b){n.engine.gravityX=a;n.engine.gravityY=b;null!=n.engine.world&&n.engine.world.setGravity(new y(a,b))};n.getGravity=function(){return null==n.engine.world?(n.dummyVec.x=n.engine.gravityX,n.dummyVec.y=n.engine.gravityY,n.dummyVec):n.engine.world.getGravity()};n.enableContinuousCollisions=function(){cc.m_continuousPhysics=!0};n.toPhysicalUnits=function(a){return q.toPhysicalUnits(a)};n.toPixelUnits=function(a){return q.toPixelUnits(a)};n.makeActorNotPassThroughTerrain=function(a){q.NO_PHYSICS?
null!=a&&1==a.physicsMode&&(a.continuousCollision=!0):(cc.m_continuousPhysics=!0,null!=a&&0==a.physicsMode&&a.body.setBullet(!0))};n.makeActorPassThroughTerrain=function(a){if(q.NO_PHYSICS)null!=a&&1==a.physicsMode&&(a.continuousCollision=!1);else if(null!=a&&0==a.physicsMode){a.body.setBullet(!1);a=!1;for(var b=n.engine.allActors.iterator();b.hasNext();){var c=b.next();if(null!=c.body&&c.body.isBullet()){a=!0;break}}a||(cc.m_continuousPhysics=!1)}};n.mute=function(){};n.unmute=function(){};n.getSound=
function(a){return bc.get().resources.get(a)};n.getSoundByName=function(a){return bc.get().resourceMap.get(a)};n.playSound=function(a){if(null!=a){for(var b=0;32>b;){var c=b++;c=n.engine.channels[c];if(null==c.currentSound){c.playSound(a);c.setVolume(1);c.setPanning(0);return}}Q.error("No channels available to play sound",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:1758,className:"com.stencyl.behavior.Script",methodName:"playSound"})}};n.loopSound=function(a){if(null!=a){for(var b=0;32>
b;){var c=b++;c=n.engine.channels[c];if(null==c.currentSound){c.loopSound(a);c.setVolume(1);c.setPanning(0);return}}Q.error("No channels available to loop sound",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:1783,className:"com.stencyl.behavior.Script",methodName:"loopSound"})}};n.playSoundOnChannel=function(a,b){b=n.engine.channels[b];b.playSound(a);b.setVolume(1);b.setPanning(0)};n.loopSoundOnChannel=function(a,b){b=n.engine.channels[b];b.loopSound(a);b.setVolume(1);b.setPanning(0)};n.stopSoundOnChannel=
function(a){n.engine.channels[a].stopSound()};n.pauseSoundOnChannel=function(a){n.engine.channels[a].setPause(!0)};n.resumeSoundOnChannel=function(a){n.engine.channels[a].setPause(!1)};n.setVolumeForChannel=function(a,b){n.engine.channels[b].setVolume(a)};n.setPanningForChannel=function(a,b){n.engine.channels[b].setPanning(a)};n.stopAllSounds=function(){for(var a=0;32>a;){var b=a++;n.engine.channels[b].stopSound()}};n.setVolumeForAllSounds=function(a){Xb.masterVolume=a;for(a=0;32>a;){var b=a++;b=
n.engine.channels[b];b.setVolume(b.volume)}};n.fadeInSoundOnChannel=function(a,b){n.engine.channels[a].fadeInSound(b)};n.fadeOutSoundOnChannel=function(a,b){n.engine.channels[a].fadeOutSound(b)};n.fadeSoundOnChannel=function(a,b,c){n.engine.channels[a].fadeSound(b,c/100)};n.fadeInForAllSounds=function(a){for(var b=0;32>b;){var c=b++;n.engine.channels[c].fadeInSound(a)}};n.fadeOutForAllSounds=function(a){for(var b=0;32>b;){var c=b++;n.engine.channels[c].fadeOutSound(a)}};n.fadeForAllSounds=function(a,
b){for(var c=0;32>c;){var d=c++;n.engine.channels[d].fadeSound(a,b/100)}};n.getPositionForChannel=function(a){a=n.engine.channels[a];return null!=a&&null!=a.currentSound?a.paused?a.position:a.currentSound.get_position():0};n.setPositionForChannel=function(a,b){a=n.engine.channels[a];null!=a&&null!=a.currentSound&&(a.paused?a.position=b:a.looping?a.loopSound(a.currentClip,b):a.playSound(a.currentClip,b))};n.getSoundLengthForChannel=function(a){a=n.engine.channels[a];return null!=a&&null!=a.currentSource?
a.currentSource.get_length():0};n.getSoundLength=function(a){return null!=a&&null!=a.src?a.src.get_length():0};n.setColorBackground=function(a,b){null==b&&(b=-2);n.engine.colorLayer.get_graphics().clear();a!=Jf.TRANSPARENT&&(b==Jf.TRANSPARENT?n.engine.setColorBackground(new Jf(a)):n.engine.setColorBackground(new ri(a,b)))};n.setScrollSpeedForBackground=function(a,b,c){if(null==a){a=0;for(var d=q.engine.backgroundLayers;a<d.length;){var e=d[a];++a;e.setScrollSpeed(b,c)}}else a instanceof Ud&&U.__cast(a,
Ud).setScrollSpeed(b,c)};n.setScrollFactorForLayer=function(a,b,c){a instanceof Ud?U.__cast(a,Ud).setScrollFactor(b,c):a instanceof Fc&&(a.scrollFactorX=b,a.scrollFactorY=c)};n.changeBackground=function(a,b){b=bc.get().resourceMap.get(b);null!=b&&a instanceof Ud&&U.__cast(a,Ud).reload(b.ID)};n.changeBackgroundImage=function(a,b){null!=b&&a instanceof Ud&&U.__cast(a,Ud).setImage(b)};n.addBackground=function(a,b,c){a=bc.get().resourceMap.get(a);b=new Ud(n.engine.getNextLayerID(),b,c,0,0,1,10,a.ID,!1);
b.load();n.engine.insertLayer(b,c)};n.addBackgroundFromImage=function(a,b,c,d){c=new Ud(n.engine.getNextLayerID(),c,d,0,0,1,10,-1,!1);c.loadFromImg(a,b);n.engine.insertLayer(c,d)};n.addTileLayer=function(a,b){var c=n.engine.scene.sceneWidth/n.engine.scene.tileWidth|0,d=n.engine.scene.sceneHeight/n.engine.scene.tileHeight|0,e=n.engine.getNextLayerID();c=new ke(e,n.engine.scene,c,d);c.set_name(a);a=new Fc(e,a,b,1,1,1,10,c);n.engine.insertLayer(a,b)};n.newImage=function(a,b){return n.imageApiAutoscale?
new La(a*q.SCALE|0,b*q.SCALE|0,!0,0):new La(a,b,!0,0)};n.captureScreenshot=function(){var a=new La(n.getStageWidth()|0,n.getStageHeight()|0);a.draw(Da.get_current().stage,null,null,null,null,ha.antialias);return a};n.getImageForActor=function(a){return a.getCurrentImage()};n.getExternalImage=function(a){return va.getBitmapData("assets/data/"+a,!1)};n.loadImageFromURL=function(a,b){var c=new xj;c.contentLoaderInfo.addEventListener("complete",function(a){a=U.__cast(U.__cast(a.currentTarget,Kf).content,
dd).get_bitmapData();b(a)});c.load(new Mg(a))};n.getSubImage=function(a,b,c,d,e){n.imageApiAutoscale&&(b=b*q.SCALE|0,c=c*q.SCALE|0,d=d*q.SCALE|0,e=e*q.SCALE|0);if(null!=a&&0<=b&&0<=c&&0<d&&0<e&&b<a.width&&c<a.height){var f=new La(d,e);n.dummyRect.x=b;n.dummyRect.y=c;n.dummyRect.width=d;n.dummyRect.height=e;n.dummyPoint.x=0;n.dummyPoint.y=0;f.copyPixels(a,n.dummyRect,n.dummyPoint);return f}return new La(1,1)};n.setOrderForImage=function(a,b){null!=a&&null!=a.parent&&0<=b&&b<a.parent.get_numChildren()&&
a.parent.setChildIndex(a,b)};n.getOrderForImage=function(a){return null!=a&&null!=a.parent?a.parent.getChildIndex(a):-1};n.bringImageBack=function(a){null!=a&&null!=a.parent&&n.setOrderForImage(a,a.parent.getChildIndex(a)-1)};n.bringImageForward=function(a){null!=a&&null!=a.parent&&n.setOrderForImage(a,a.parent.getChildIndex(a)+1)};n.bringImageToBack=function(a){null!=a&&null!=a.parent&&n.setOrderForImage(a,0)};n.bringImageToFront=function(a){null!=a&&null!=a.parent&&n.setOrderForImage(a,a.parent.get_numChildren()-
1)};n.attachImageToActor=function(a,b,c,d,e){null==e&&(e=1);null!=a&&(null!=a.parent&&n.removeImage(a),2==e?(b.addChild(a),b.setChildIndex(a,0)):b.addChild(a),a.cacheParentAnchor=b.cacheAnchor,a.set_imgX(c),a.set_imgY(d),a.set_smoothing(ha.antialias),b.attachedImages.push(a))};n.attachImageToHUD=function(a,b,c){null!=a&&(null!=a.parent&&n.removeImage(a),n.engine.hudLayer.addChild(a),n.engine.hudLayer.attachedImages.push(a),a.set_imgX(b),a.set_imgY(c),a.set_smoothing(ha.antialias))};n.attachImageToLayer=
function(a,b,c,d,e){null==e&&(e=1);null!=a&&(null!=a.parent&&n.removeImage(a),2==e?b.addChildAt(a,0):b.addChild(a),-1==b.attachedImages.indexOf(a)&&b.attachedImages.push(a),a.set_imgX(c),a.set_imgY(d),a.set_smoothing(ha.antialias))};n.removeImage=function(a){null!=a&&null!=a.parent&&(a.parent instanceof tb?I.remove(U.__cast(a.parent,tb).attachedImages,a):a.parent instanceof Fc&&I.remove(U.__cast(a.parent,Fc).attachedImages,a),a.parent.removeChild(a))};n.resizeImage=function(a,b,c,d){null==d&&(d=!0);
null==c&&(c=1);null==b&&(b=1);var e=new wa;e.scale(b,c);b=new La(a.width*b|0,a.height*c|0,!0,0);b.draw(a,e,null,null,null,d);return b};n.drawImageOnImage=function(a,b,c,d,e){n.imageApiAutoscale&&(c=c*q.SCALE|0,d=d*q.SCALE|0);if(null!=a&&null!=b)if(n.dummyPoint.x=c,n.dummyPoint.y=d,10==e)b.copyPixels(a,a.rect,n.dummyPoint,null,null,!0);else{var f=new wa;f.identity();f.translate(c,d);b.draw(a,f,null,e)}};n.drawTextOnImage=function(a,b,c,d,e){n.imageApiAutoscale&&(c=c*q.SCALE|0,d=d*q.SCALE|0);null!=
a&&e.font.renderToImg(a,b,0,1,c,d,e.fontScale,0,!1)};n.clearImagePartially=function(a,b,c,d,e){n.imageApiAutoscale&&(b=b*q.SCALE|0,c=c*q.SCALE|0,d=d*q.SCALE|0,e=e*q.SCALE|0);null!=a&&(n.dummyRect.x=b,n.dummyRect.y=c,n.dummyRect.width=d,n.dummyRect.height=e,a.fillRect(n.dummyRect,0))};n.clearImage=function(a){null!=a&&a.fillRect(a.rect,0)};n.clearImageUsingMask=function(a,b,c,d){n.imageApiAutoscale&&(c=c*q.SCALE|0,d=d*q.SCALE|0);var e=b.width,f=b.height,g=0,h=0;0>c?(e=c>a.width-e?a.width:e+c,g-=c,
c=0):c>a.width-e&&(e-=c-(a.width-e),c=a.width-e);0>d?(f=d>a.height-f?a.height:f+d,h-=d,d=0):d>a.height-f&&(f-=d-(a.height-f),d=a.height-f);if(!(0>=e||0>=f)){g=new fa(g,h,e,f);b=b.getPixels(g);c=new fa(c,d,e,f);d=a.getPixels(c);g=0;for(e*=f;g<e;){f=g++;b.position=4*f;d.position=4*f;h=b.readUnsignedByte();var m=d.readUnsignedByte();h=(256-h)*m>>8;d.position=4*f;d.writeByte(h)}b.position=0;d.position=0;a.setPixels(c,d)}};n.retainImageUsingMask=function(a,b,c,d){n.imageApiAutoscale&&(c=c*q.SCALE|0,d=
d*q.SCALE|0);n.dummyPoint.x=c;n.dummyPoint.y=d;a.copyChannel(b,b.rect,n.dummyPoint,8,8)};n.fillImage=function(a,b){null!=a&&a.fillRect(a.rect,-16777216|b)};n.filterImage=function(a,b){null!=a&&(n.dummyPoint.x=0,n.dummyPoint.y=0,a.applyFilter(a,a.rect,n.dummyPoint,b))};n.imageSetPixel=function(a,b,c,d){if(null!=a)if(n.imageApiAutoscale&&1!=q.SCALE){var e=(b+1)*q.SCALE|0,f=(c+1)*q.SCALE|0;b=b*q.SCALE|0;for(c=c*q.SCALE|0;b<e;)for(var g=b++,h=c,m=f;h<m;){var l=h++;a.setPixel32(g,l,d|-16777216)}}else a.setPixel32(b,
c,d|-16777216)};n.imageGetPixel=function(a,b,c){return null!=a?(n.imageApiAutoscale&&(b=b*q.SCALE|0,c=c*q.SCALE|0),a.getPixel(b,c)):0};n.imageSwapColor=function(a,b,c){null!=a&&(n.dummyPoint.x=0,n.dummyPoint.y=0,a.threshold(a,a.rect,n.dummyPoint,"==",-16777216|b,-16777216|c,-1,!0))};n.flipImageHorizontal=function(a){var b=new wa;b.scale(-1,1);b.translate(a.width,0);var c=new La(a.width,a.height,!0,0);c.draw(a,b);n.dummyPoint.x=0;n.dummyPoint.y=0;a.copyPixels(c,c.rect,n.dummyPoint)};n.flipImageVertical=
function(a){var b=new wa;b.scale(1,-1);b.translate(0,a.height);var c=new La(a.width,a.height,!0,0);c.draw(a,b);n.dummyPoint.x=0;n.dummyPoint.y=0;a.copyPixels(c,c.rect,n.dummyPoint)};n.setXForImage=function(a,b){null!=a&&a.set_imgX(b)};n.setYForImage=function(a,b){null!=a&&a.set_imgY(b)};n.fadeImageTo=function(a,b,c,d){null==c&&(c=1);a.get_tweenProps().alpha.tween(a.get_alpha(),b,d,1E3*c|0)};n.setOriginForImage=function(a,b,c){a.setOrigin(b,c)};n.growImageTo=function(a,b,c,d,e){null==d&&(d=1);null==
c&&(c=1);null==b&&(b=1);a.get_tweenProps().scaleXY.tween(a.get_scaleX(),b,a.get_scaleY(),c,e,1E3*d|0)};n.spinImageTo=function(a,b,c,d){null==c&&(c=1);a.get_tweenProps().angle.tween(a.get_rotation(),b,d,1E3*c|0)};n.moveImageTo=function(a,b,c,d,e){null==d&&(d=1);a.get_tweenProps().xy.tween(a.get_imgX(),b,a.get_imgY(),c,e,1E3*d|0)};n.spinImageBy=function(a,b,c,d){null==c&&(c=1);n.spinImageTo(a,a.get_rotation()+b,c,d)};n.moveImageBy=function(a,b,c,d,e){null==d&&(d=1);n.moveImageTo(a,a.get_imgX()+b,a.get_imgY()+
c,d,e)};n.setFilterForImage=function(a,b){null!=a&&a.set_filtersWrapper(a.get_filtersWrapper().concat([b]))};n.clearFiltersForImage=function(a){null!=a&&a.set_filtersWrapper([])};n.imageToText=function(a){var b=a.getPixels(a.rect);return a.width+";"+a.height+";"+n.toBase64(ib.ofData(Ab.toArrayBuffer(b)))};n.imageFromText=function(a){var b=a.split(";");a=A.parseInt(b[0]);var c=A.parseInt(b[1]),d=n.fromBase64(b[2]);b=new oc(0);for(var e=0,f=d.length;e<f;){var g=e++;b.writeByte(d.b[g])}b.position=0;
b.__endian=0;a=new La(a,c,!0,0);a.setPixels(a.rect,b);return a};n.toBase64=function(a){var b=ib.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");a=(new yj(b)).encodeBytes(a).toString();b=a.length%4;1<b&&(a+="=");2==b&&(a+="=");return a};n.fromBase64=function(a){var b=-1;"="==a.charAt(a.length-2)?b=2:"="==a.charAt(a.length-1)&&(b=1);-1!=b&&(a=I.substr(a,0,a.length-b));b=ib.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");return(new yj(b)).decodeBytes(ib.ofString(a))};
n.startShakingScreen=function(a,b){null==b&&(b=.5);null==a&&(a=.05);n.engine.shakeScreen(a,b)};n.stopShakingScreen=function(){n.engine.stopShakingScreen()};n.getTopLayer=function(){return n.engine.getTopLayer()};n.getBottomLayer=function(){return n.engine.getBottomLayer()};n.getMiddleLayer=function(){return n.engine.getMiddleLayer()};n.getTileLayerAt=function(a){return null!=a&&a instanceof Fc?U.__cast(a,Fc).tiles:null};n.getTilesetIDByName=function(a){a=bc.get().resourceMap.get(a);return a instanceof
qf?a.ID:-1};n.setTileAt=function(a,b,c,d,e){if(null!=c&&c instanceof Fc){n.removeTileAt(a,b,c);var f=U.__cast(c,Fc).tiles;d=bc.get().resources.get(d).tiles[e];f.setTileAt(a,b,d);null==d||null==d.pixels||W.contains(n.engine.animatedTiles,d)||1<d.durations.length&&n.engine.animatedTiles.push(d);if(null!=d&&-1!=d.collisionID){d=Lb.get().shapes.h[d.collisionID];f=d.getVertices();d=d.getVertexCount();f=Db.asArray(f,d);d=0;for(e=f.getVertices();d<e.length;){var g=e[d];++d;g.x*=n.engine.scene.tileWidth/
32;g.y*=n.engine.scene.tileHeight/32}d=b*n.engine.scene.tileWidth;e=a*n.engine.scene.tileHeight;q.NO_PHYSICS||null==f?null!=f&&n.getTileLayerAt(c).grid.setTile(b,a):n.createDynamicTile(f,d,e,c.ID,n.engine.scene.tileWidth,n.engine.scene.tileHeight)}n.engine.tileUpdated=!0}};n.tileExistsAt=function(a,b,c){return null!=n.getTileAt(a,b,c)};n.tileCollisionAt=function(a,b,c){if(null==c){c=0;for(var d=n.engine.interactiveLayers;c<d.length;){var e=d[c];++c;e=e.tiles.getTileAt(a,b);if(null!=e&&-1!=e.collisionID)return!0}return!1}e=
n.getTileAt(a,b,c);return null==e||-1==e.collisionID?!1:!0};n.getTilePosition=function(a,b){var c=n.engine.scene.tileHeight,d=n.engine.scene.tileWidth;return 0==a?Math.floor(b/d):Math.floor(b/c)};n.getTileIDAt=function(a,b,c){a=n.getTileAt(a,b,c);return null==a?-1:a.tileID};n.getTileColIDAt=function(a,b,c){a=n.getTileAt(a,b,c);return null==a?-1:a.collisionID};n.getTileDataAt=function(a,b,c){a=n.getTileAt(a,b,c);return null==a?"":a.metadata};n.getTilesetIDAt=function(a,b,c){a=n.getTileAt(a,b,c);return null==
a?-1:a.parent.ID};n.getTileAt=function(a,b,c){c=n.getTileLayerAt(c);return null==c?null:c.getTileAt(a,b)};n.removeTileAt=function(a,b,c){if(null!=c&&c instanceof Fc){var d=U.__cast(c,Fc).tiles,e=n.getTileAt(a,b,c);null!=e&&(q.NO_PHYSICS||-1==e.collisionID?-1!=e.collisionID&&(c=b,e=a,null==e&&(e=0),null==c&&(c=0),d.grid.setTile(c,e,!1)):(c="ID-"+b*n.engine.scene.tileWidth+"-"+a*n.engine.scene.tileHeight+"-"+c.ID,e=n.engine.dynamicTiles.h[c],null!=e&&(n.engine.removeActor(e),e=n.engine.dynamicTiles,
Object.prototype.hasOwnProperty.call(e.h,c)&&delete e.h[c])),d.setTileAt(a,b,null),n.engine.tileUpdated=!0)}};n.getTileForCollision=function(a,b){if(a.thisCollidedWithTile||a.otherCollidedWithTile){var c=Math.round(q.toPixelUnits(b.normalX)),d=Math.round(q.toPixelUnits(b.normalY)),e=Math.round(q.toPixelUnits(b.x));b=Math.round(q.toPixelUnits(b.y));a.thisCollidedWithTile&&(c=-c,d=-d);0>c&&0==e%n.engine.scene.tileWidth&&--e;0>d&&0==b%n.engine.scene.tileHeight&&--b;e=n.getTilePosition(0,e);b=n.getTilePosition(1,
b);a=0;for(c=n.engine.interactiveLayers;a<c.length;)if(d=c[a],++a,d=d.tiles.getTileAt(b,e),null!=d&&-1!=d.collisionID)return d}return null};n.getTileDataForCollision=function(a,b){a=n.getTileForCollision(a,b);return null!=a?a.metadata:""};n.getTilePositionForCollision=function(a,b,c){if(b.thisCollidedWithTile||b.otherCollidedWithTile){var d=Math.round(q.toPixelUnits(c.normalX)),e=Math.round(q.toPixelUnits(c.normalY)),f=Math.round(q.toPixelUnits(c.x));c=Math.round(q.toPixelUnits(c.y));b.thisCollidedWithTile&&
(d=-d,e=-e);0>d&&0==f%n.engine.scene.tileWidth&&--f;0>e&&0==c%n.engine.scene.tileHeight&&--c;f=n.getTilePosition(0,f);c=n.getTilePosition(1,c);return 0==a?f:c}return-1};n.createDynamicTile=function(a,b,c,d,e,f){a=new tb(n.engine,1E8,1,b,c,d,e,f,null,null,null,null,!1,!0,!1,!1,a,!1,!1);a.set_name("Terrain");a.set_visible(!1);n.engine.dynamicTiles.h["ID-"+b+"-"+c+"-"+d]=a};n.getFont=function(a){return bc.get().resources.get(a)};n.pause=function(){n.engine.pause()};n.unpause=function(){n.engine.unpause()};
n.toggleFullScreen=function(){q.engine.toggleFullScreen()};n.pauseAll=function(){q.paused=!0};n.unpauseAll=function(){q.paused=!1};n.getScreenWidth=function(){return q.screenWidth};n.getScreenHeight=function(){return q.screenHeight};n.getStageWidth=function(){return q.stage.stageWidth};n.getStageHeight=function(){return q.stage.stageHeight};n.setOffscreenTolerance=function(a,b,c,d){q.paddingTop=a;q.paddingLeft=b;q.paddingBottom=c;q.paddingRight=d};n.isTransitioning=function(){return n.engine.isTransitioning()};
n.setTimeScale=function(a){q.timeScale=a};n.randomFloat=function(){return Math.random()};n.randomFloatBetween=function(a,b){return a<=b?a+Math.random()*(b-a):b+Math.random()*(a-b)};n.randomInt=function(a,b){return a<=b?a+Math.floor(Math.random()*(b-a+1)):b+Math.floor(Math.random()*(a-b+1))};n.saveGame=function(a,b){a=id.getLocal(a,rd.current.meta.h.localSavePath);for(var c=Object.keys(n.engine.gameAttributes.h),d=c.length,e=0;e<d;){var f=c[e++];0!=n.engine.savableAttributes.h[f]&&W.saveToSharedObject(a,
f,n.engine.gameAttributes.h[f])}W.flushSharedObject(a,b)};n.loadGame=function(a,b){a=id.getLocal(a,rd.current.meta.h.localSavePath);for(var c=0,d=X.fields(a.data);c<d.length;){var e=d[c];++c;var f=n.engine.gameAttributes,g=W.loadFromSharedObject(a,e);f.h[e]=g}null!=b&&b(!0)};n.saveData=function(a,b,c,d){a=id.getLocal(a,rd.current.meta.h.localSavePath);W.saveToSharedObject(a,b,c);W.flushSharedObject(a,d)};n.loadData=function(a,b,c){a=id.getLocal(a,rd.current.meta.h.localSavePath);b=W.loadFromSharedObject(a,
b);null!=c&&c(!0);return b};n.checkData=function(a,b){a=id.getLocal(a,rd.current.meta.h.localSavePath);return null!=X.field(a.data,b)};n.defaultURLHandler=function(a){a=new kh(a.target);Q.info("Visited URL: "+A.string(a.data),{fileName:"com/stencyl/behavior/Script.hx",lineNumber:3528,className:"com.stencyl.behavior.Script",methodName:"defaultURLHandler"})};n.openURLInBrowser=function(a){Da.getURL(new Mg(a))};n.visitURL=function(a,b){null==b&&(b=n.defaultURLHandler);try{var c=new Mg(a);c.method="GET";
var d=new kh;d.addEventListener("complete",b);d.load(c)}catch(e){a=J.caught(e),Q.fullError("Cannot open URL.",a,{fileName:"com/stencyl/behavior/Script.hx",lineNumber:3577,className:"com.stencyl.behavior.Script",methodName:"visitURL"})}};n.postToURL=function(a,b,c){null==c&&(c=n.defaultURLHandler);a=new Mg(a);a.method="POST";null!=b&&(a.data=Nr._new(b));try{var d=new kh;d.addEventListener("complete",c);n.runLater(500,function(a){d.close()});d.load(a)}catch(e){b=J.caught(e),Q.fullError("Cannot open URL.",
b,{fileName:"com/stencyl/behavior/Script.hx",lineNumber:3620,className:"com.stencyl.behavior.Script",methodName:"postToURL"})}};n.convertToPseudoUnicode=function(a){return a};n.simpleTweet=function(a,b){n.openURLInBrowser("http://twitter.com/home?status="+encodeURIComponent(a+" "+b))};n.loadAtlas=function(a){n.engine.atlasesToLoad.h[a]=a};n.unloadAtlas=function(a){n.engine.atlasesToUnload.h[a]=a};n.atlasIsLoaded=function(a){a=Lb.get().atlases.h[a];return null!=a?a.active:!1};n.showAlert=function(a,
b){};n.vibrate=function(a){};n.showKeyboard=function(){};n.hideKeyboard=function(){};n.setKeyboardText=function(a){};n.setIconBadgeNumber=function(a){};n.enableDebugDrawing=function(){q.DEBUG_DRAW=!0;q.NO_PHYSICS||q.debugDrawer.m_sprite.get_graphics().clear()};n.disableDebugDrawing=function(){q.DEBUG_DRAW=!1;q.NO_PHYSICS||q.debugDrawer.m_sprite.get_graphics().clear()};n.gameURL=function(){return""};n.exitGame=function(){};n.createGrayscaleFilter=function(){var a=[];a=a.concat([.5,.5,.5,0,0]);a=a.concat([.5,
.5,.5,0,0]);a=a.concat([.5,.5,.5,0,0]);a=a.concat([0,0,0,1,0]);return new Xe(a)};n.createSepiaFilter=function(){var a=[];a=a.concat([.34,.33,.33,0,30]);a=a.concat([.33,.34,.33,0,20]);a=a.concat([.33,.33,.34,0,0]);a=a.concat([0,0,0,1,0]);return new Xe(a)};n.createNegativeFilter=function(){var a=[];a=a.concat([-1,0,0,0,255]);a=a.concat([0,-1,0,0,255]);a=a.concat([0,0,-1,0,255]);a=a.concat([0,0,0,1,0]);return new Xe(a)};n.createTintFilter=function(a,b){null==b&&(b=1);var c=new Oa;c.colorize(a,b);return c.getFilter()};
n.createHueFilter=function(a){var b=new Oa;b.adjustHue(a);b.adjustSaturation(1);return b.getFilter()};n.createSaturationFilter=function(a){var b=new Oa;b.adjustSaturation(a/100);return b.getFilter()};n.createBrightnessFilter=function(a){var b=new Oa;b.adjustBrightness(a/100);return b.getFilter()};n.prototype={wrapper:null,propertyChangeEvents:null,equalityPairs:null,checkProperties:null,nameMap:null,attributeTweens:null,scriptInit:null,toInternalName:function(a){if(null==this.nameMap)return a;var b=
this.nameMap.h[a];return null==b?a:b},forwardMessage:function(a){},clearListeners:function(){this.propertyChangeEvents=new ia},internalGetGroup:function(a,b,c){if(q.NO_PHYSICS)return b=U.__cast(c,tc),a==b.actorA?n.engine.getGroup(b.groupA):n.engine.getGroup(b.groupB);b=U.__cast(b,Gf);if(null==b)return Q.warn("internalGetGroup - Warning - null shape passed in",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:380,className:"com.stencyl.behavior.Script",methodName:"internalGetGroup"}),U.__cast(a,
tb).getGroup();a=b.groupID;if(-1E3==a){b=b.getBody();if(null!=b)return n.engine.getGroup(b.getUserData().groupID);Q.warn("internalGetGroup - Warning - shape inherits groupID from actor but is not attached to a body",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:397,className:"com.stencyl.behavior.Script",methodName:"internalGetGroup"})}return n.engine.getGroup(a)},init:function(){},addListener:function(a,b){a.add(b);this instanceof T&&U.__cast(this,T).actor.registerListener(a,b)},addListenerWithKey:function(a,
b,c){a.exists(b)||a.set(b,new Gc);a=a.get(b);a.add(c);this instanceof T&&U.__cast(this,T).actor.registerListener(a,c)},addListenerWithKey2:function(a,b,c,d){if(!a.h.hasOwnProperty(b)){var e=new Xa;a.h[b]=e}if(!a.h[b].h.hasOwnProperty(c)){var f=a.h[b];e=new Gc;f.h[c]=e}a=a.h[b].h[c];a.add(d);this instanceof T&&U.__cast(this,T).actor.registerListener(a,d)},addWhenCreatedListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null actor.",{fileName:"com/stencyl/behavior/Script.hx",
lineNumber:474,className:"com.stencyl.behavior.Script",methodName:"addWhenCreatedListener"}):this.addListener(a.whenCreated,function(){b(null)})},addWhenKilledListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null actor.",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:485,className:"com.stencyl.behavior.Script",methodName:"addWhenKilledListener"}):this.addListener(a.whenKilled,function(){b(null)})},addWhenUpdatedListener:function(a,
b){var c=this instanceof T;null==a&&c&&(a=U.__cast(this,T).actor);null!=a?(c=function(a){b(a,null)},this.addListener(a.whenUpdated,c)):(c=function(a){b(a,null)},this.addListener(n.engine.whenUpdated,c))},addWhenDrawingListener:function(a,b){var c=this instanceof T;null==a&&c&&(a=U.__cast(this,T).actor);null!=a?(c=function(a,c,f){b(a,c,f,null)},this.addListener(a.whenDrawing,c)):(c=function(a,c,f){b(a,c,f,null)},this.addListener(n.engine.whenDrawing,c))},addActorEntersRegionListener:function(a,b){null==
a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null region.",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:542,className:"com.stencyl.behavior.Script",methodName:"addActorEntersRegionListener"}):this.addListener(a.whenActorEntered,function(a){b(a,null)})},addActorExitsRegionListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null region.",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:553,className:"com.stencyl.behavior.Script",
methodName:"addActorExitsRegionListener"}):this.addListener(a.whenActorExited,function(a){b(a,null)})},addActorPositionListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null actor.",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:564,className:"com.stencyl.behavior.Script",methodName:"addActorPositionListener"}):this.addListener(a.whenPositionStateChanged,function(a,d,e,f){b(a,d,e,f,null)})},addActorTypeGroupPositionListener:function(a,
b){this.addListenerWithKey(n.engine.whenTypeGroupPositionStateChangedEvents,a,function(a,d,e,f,g){b(a,d,e,f,g,null)})},addSwipeListener:function(a){this.addListener(n.engine.whenSwiped,function(){a(null)})},addMultiTouchStartListener:function(a){this.addListener(n.engine.whenMTStarted,function(b){a(b,null)})},addMultiTouchMoveListener:function(a){this.addListener(n.engine.whenMTDragged,function(b){a(b,null)})},addMultiTouchEndListener:function(a){this.addListener(n.engine.whenMTEnded,function(b){a(b,
null)})},addKeyStateListener:function(a,b){this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(a),function(a,d){b(a,d,null)})},addAnyKeyPressedListener:function(a){this.addListener(n.engine.whenAnyKeyPressed,function(b){a(b,null)})},addAnyKeyReleasedListener:function(a){this.addListener(n.engine.whenAnyKeyReleased,function(b){a(b,null)})},addAnyGamepadPressedListener:function(a){this.addListener(n.engine.whenAnyGamepadPressed,function(b){a(b,null)})},addAnyGamepadReleasedListener:function(a){this.addListener(n.engine.whenAnyGamepadReleased,
function(b){a(b,null)})},addMousePressedListener:function(a){this.addListener(n.engine.whenMousePressed,function(){a(null)})},addMouseReleasedListener:function(a){this.addListener(n.engine.whenMouseReleased,function(){a(null)})},addMouseMovedListener:function(a){this.addListener(n.engine.whenMouseMoved,function(){a(null)})},addMouseDraggedListener:function(a){this.addListener(n.engine.whenMouseDragged,function(){a(null)})},addMouseOverActorListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+
": Cannot add listener function to null actor.",{fileName:"com/stencyl/behavior/Script.hx",lineNumber:645,className:"com.stencyl.behavior.Script",methodName:"addMouseOverActorListener"}):this.addListener(a.whenMousedOver,function(a){b(a,null)})},addPropertyChangeListener:function(a,b,c){var d=function(){c(null,null)};this.addListenerWithKey(this.propertyChangeEvents,a,d);null!=b&&this.addListenerWithKey(this.propertyChangeEvents,b,d);this.checkProperties=!0},propertyChanged:function(a){if(this.checkProperties&&
(a=this.propertyChangeEvents.h[a],null!=a&&0<a.length))for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex]()}catch(c){var b=J.caught(c);Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.behavior.Script",methodName:"propertyChanged"})}++a._dispatchIndex}},addCollisionListener:function(a,b){null==a?Q.error("Error in "+this.wrapper.classname+": Cannot add listener function to null actor.",{fileName:"com/stencyl/behavior/Script.hx",
lineNumber:684,className:"com.stencyl.behavior.Script",methodName:"addCollisionListener"}):this.addListener(a.whenCollided,function(a){b(a,null)})},addSceneCollisionListener:function(a,b,c){this.addListenerWithKey2(n.engine.whenCollidedEvents,a,b,function(a){c(a,null)})},addWhenTypeGroupCreatedListener:function(a,b){this.addListenerWithKey(n.engine.whenTypeGroupCreatedEvents,a,function(a){b(a,null)})},addWhenTypeGroupKilledListener:function(a,b){this.addListenerWithKey(n.engine.whenTypeGroupKilledEvents,
a,function(a){b(a,null)})},addSoundListener:function(a,b){a instanceof Hh?this.addListenerWithKey(n.engine.whenSoundEndedEvents,a,function(){b(null)}):this.addListenerWithKey(n.engine.whenChannelEndedEvents,a,function(){b(null)})},addFocusChangeListener:function(a){this.addListener(n.engine.whenFocusChanged,function(b){a(b,null)})},addPauseListener:function(a){this.addListener(n.engine.whenPaused,function(b){a(b,null)})},addFullscreenListener:function(a){this.addListener(n.engine.whenFullscreenChanged,
function(){a(null)})},addGameScaleListener:function(a){this.addListener(n.engine.whenGameScaleChanged,function(){a(null)})},addScreenSizeListener:function(a){this.addListener(n.engine.whenScreenSizeChanged,function(){a(null)})},disableThisBehavior:function(){n.engine.behaviors.disableBehavior(this.wrapper.name)},tweenNumber:function(a,b,c,d){null==c&&(c=1);var e=this,f=this.attributeTweens.h[a];null==f&&(f=new we,f.doOnUpdate(function(){e[a]=f.value}),this.attributeTweens.h[a]=f);f.tween(X.field(this,
a),b,d,1E3*c|0)},abortTweenNumber:function(a){a=this.attributeTweens.h[a];null!=a&&vb.cancel(a)},pauseTweens:function(){for(var a=this.attributeTweens.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].paused=!0},unpauseTweens:function(){for(var a=this.attributeTweens.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].paused=!1},__class__:n};var T=function(a){n.call(this);this.actor=a};k["com.stencyl.behavior.ActorScript"]=T;T.__name__="com.stencyl.behavior.ActorScript";T.__super__=n;T.prototype=u(n.prototype,
{actor:null,getValue:function(a,b){return this.actor.getValue(a,b)},setValue:function(a,b,c){this.actor.setValue(a,b,c)},shout:function(a,b){return this.actor.shout(a,b)},disableThisBehavior:function(){this.actor.disableBehavior(this.wrapper.name)},__class__:T});var oi=function(a,b,c,d,e,f,g){this.ID=a;this.fieldName=b;this.fullName=c;this.type=e;this.value=d;this.realValue=null;this.hidden=g};k["com.stencyl.behavior.Attribute"]=oi;oi.__name__="com.stencyl.behavior.Attribute";oi.prototype={ID:null,
fieldName:null,fullName:null,type:null,defaultValue:null,value:null,realValue:null,hidden:null,getRealValue:function(){null==this.realValue&&("int"==this.type?this.realValue=this.value:"float"==this.type||"number"==this.type?this.realValue=this.value:"bool"==this.type||"boolean"==this.type?this.realValue=this.value:"color"==this.type?this.realValue=this.value:"sound"==this.type||"actortype"==this.type||"font"==this.type?(this.realValue=-1==this.value?null:bc.get().resources.get(this.value),"font"!=
this.type||this.realValue instanceof Af||(this.realValue=null),"sound"!=this.type||this.realValue instanceof Hh||(this.realValue=null),"actortype"!=this.type||this.realValue instanceof eg||(this.realValue=null)):"actorgroup"==this.type?this.realValue=this.value:"control"==this.type?this.realValue=this.value:"animation"==this.type?this.realValue=this.value:"game-attribute"==this.type?this.realValue=this.value:"scene"==this.type?this.realValue=Lb.get().scenes.h[this.value]:"text"==this.type?this.realValue=
this.value:"list"==this.type?(this.realValue=this.value,null==this.value&&(this.realValue=[])):"map"==this.type?(this.realValue=this.value,null==this.value&&(this.realValue=new ia)):null!=this.value&&"actor"==this.type?this.realValue=this.value:null!=this.value&&"joint"==this.type?this.realValue=this.value:null!=this.value&&"region"==this.type&&(this.realValue=this.value));return this.realValue},__class__:oi};var Vk=function(a,b,c,d,e,f,g,h,m,l){this.isEvent=l;this.parent=a;this.engine=b;this.classname=
e;if(null!=b)try{this.cls=k[e]}catch(L){a=J.caught(L),Q.fullError("Could not load: "+e,a,{fileName:"com/stencyl/behavior/Behavior.hx",lineNumber:58,className:"com.stencyl.behavior.Behavior",methodName:"new"})}this.enabled=f;this.drawable=g;this.ID=c;this.name=d;this.type=m;this.attributes=h};k["com.stencyl.behavior.Behavior"]=Vk;Vk.__name__="com.stencyl.behavior.Behavior";Vk.prototype={parent:null,engine:null,enabled:null,drawable:null,isEvent:null,ID:null,name:null,type:null,classname:null,cls:null,
script:null,attributes:null,initScript:function(a){null==a&&(a=!1);if(null==this.cls)Q.error("Could not init Behavior: "+this.name+" with "+this.classname,{fileName:"com/stencyl/behavior/Behavior.hx",lineNumber:76,className:"com.stencyl.behavior.Behavior",methodName:"initScript"}),this.script=new sb;else{if("actor"==this.type){if(U.getClass(this.parent)==q){Q.error("Actor behavior "+this.name+" failed to init because parent is scene.  Open and save the scene to resolve this error.",{fileName:"com/stencyl/behavior/Behavior.hx",
lineNumber:85,className:"com.stencyl.behavior.Behavior",methodName:"initScript"});this.script=new sb;return}this.script=Ia.createInstance(this.cls,[0,this.parent,null])}else{if(U.getClass(this.parent)==tb){Q.error("Scene behavior "+this.name+" failed to init because parent is actor.  Open and save the actor to resolve this error.",{fileName:"com/stencyl/behavior/Behavior.hx",lineNumber:95,className:"com.stencyl.behavior.Behavior",methodName:"initScript"});this.script=new sb;return}this.script=Ia.createInstance(this.cls,
[0,null])}this.script.wrapper=this;this.initAttributes();if(!a)try{this.script.init(),this.script.scriptInit=!0}catch(b){a=J.caught(b),Q.fullError("Error in when created for behavior: "+this.name,a,{fileName:"com/stencyl/behavior/Behavior.hx",lineNumber:115,className:"com.stencyl.behavior.Behavior",methodName:"initScript"})}}},initAttributes:function(){for(var a=this.attributes.h,b=Object.keys(a),c=b.length,d=0;d<c;){var e=a[b[d++]];try{if(!(e.hidden||"actor"==e.type&&"actor"==e.fieldName&&this.script instanceof
T)){var f=this.script.toInternalName(e.fieldName);if("actor"==e.type||"joint"==e.type||"region"==e.type){var g=e.getRealValue();"actor"==e.type?this.script[f]=this.engine.getActor(g):"joint"!=e.type&&"region"==e.type&&(this.script[f]=this.engine.getRegion(g))}else if("actorgroup"==e.type){var h=e.getRealValue();this.script[f]=this.engine.getGroup(h)}else{var m=e.getRealValue();if("list"==e.type){var l=null;if(null!=m){l=U.__cast(m,Array);for(var n=[],p=0;p<l.length;){var q=l[p];++p;n.push(q)}l=n}else l=
[];this.script[f]=l}else if("map"==e.type){l=null;if(null!=m){n=m;l=new ia;for(var k=n.keys();k.hasNext();){var t=k.next(),v=n.get(t);l.h[t]=v}}else l=new ia;this.script[f]=l}else this.script[f]=m}}}catch(js){l=J.caught(js),Q.fullError("Could not init attribute: "+e.fieldName,l,{fileName:"com/stencyl/behavior/Behavior.hx",lineNumber:231,className:"com.stencyl.behavior.Behavior",methodName:"initAttributes"})}}},__class__:Vk};var zj=function(a,b){this.behaviorID=a;this.values=b;this.enabled=!0};k["com.stencyl.behavior.BehaviorInstance"]=
zj;zj.__name__="com.stencyl.behavior.BehaviorInstance";zj.prototype={behaviorID:null,values:null,enabled:null,__class__:zj};var rj=function(){this.behaviors=[];this.cache=new ia};k["com.stencyl.behavior.BehaviorManager"]=rj;rj.__name__="com.stencyl.behavior.BehaviorManager";rj.prototype={behaviors:null,cache:null,destroy:function(){this.cache=this.behaviors=null},add:function(a){this.cache.h[a.name]=a;this.behaviors.push(a)},hasBehavior:function(a){return null==this.cache?!1:null!=this.cache.h[a]},
enableBehavior:function(a){if(this.hasBehavior(a)){a=this.cache.h[a];if(null!=a.script&&!a.script.scriptInit)try{a.script.init(),a.script.scriptInit=!0}catch(c){var b=J.caught(c);Q.fullError("Error in when created for behavior: "+a.name,b,{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:68,className:"com.stencyl.behavior.BehaviorManager",methodName:"enableBehavior"})}a.enabled=!0}},disableBehavior:function(a){this.hasBehavior(a)&&(this.cache.h[a].enabled=!1)},isBehaviorEnabled:function(a){return this.hasBehavior(a)?
this.cache.h[a].enabled:!1},initScripts:function(){for(var a=0,b=this.behaviors.length;a<b;){var c=a++;c=this.behaviors[c];c.initScript(!c.enabled)}},getBehavior:function(a){var b=this.cache.h[a];if(null!=b&&null!=b.script)return b.script;Q.warn("Warning: Behavior does not exist - "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:122,className:"com.stencyl.behavior.BehaviorManager",methodName:"getBehavior"});return null},getAttribute:function(a,
b){var c=this.cache.h[a];if(null!=c&&null!=c.script){b=c.script.toInternalName(b);var d=X.field(c.script,b);null!=d||lh.hasField(c.script.wrapper.classname,b)||Q.warn("Get Warning: Attribute "+b+" does not exist for "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:139,className:"com.stencyl.behavior.BehaviorManager",methodName:"getAttribute"});return d}Q.warn("Warning: Behavior does not exist - "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",
lineNumber:147,className:"com.stencyl.behavior.BehaviorManager",methodName:"getAttribute"});return null},setAttribute:function(a,b,c){var d=this.cache.h[a];null!=d&&null!=d.script?lh.hasField(d.script.wrapper.classname,b)?(d.script[b]=c,d.script.propertyChanged(b)):Q.warn("Set Warning: Attribute "+b+" does not exist for "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:167,className:"com.stencyl.behavior.BehaviorManager",methodName:"setAttribute"}):
Q.warn("Warning: Behavior does not exist - "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:173,className:"com.stencyl.behavior.BehaviorManager",methodName:"setAttribute"})},call:function(a,b){if(null==this.cache)return null;for(var c=null,d=0,e=this.behaviors.length;d<e;){var f=d++;f=this.behaviors[f];if(f.enabled&&null!=f.script){var g=X.field(f.script,a);try{null!=g?c=g.apply(f.script,b):f.script.forwardMessage(a)}catch(h){g=J.caught(h),Q.fullError("Error in "+
a+" for behavior: "+f.name,g,{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:214,className:"com.stencyl.behavior.BehaviorManager",methodName:"call"})}}}return c},call2:function(a,b,c){if(null==this.cache)return null;var d=null,e=this.cache.h[a];if(null==e||null==e.script)return Q.warn("Warning: Behavior does not exist - "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:237,className:"com.stencyl.behavior.BehaviorManager",methodName:"call2"}),
d;if(!e.enabled)return Q.warn("Warning: Behavior is not enabled - "+a+("\n"+jc.toString(jc.callStack())),{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:243,className:"com.stencyl.behavior.BehaviorManager",methodName:"call2"}),d;a=X.field(e.script,b);try{null!=a?d=a.apply(e.script,c):e.script.forwardMessage(b)}catch(f){c=J.caught(f),Q.fullError("Error in "+b+" for behavior: "+e.name,c,{fileName:"com/stencyl/behavior/BehaviorManager.hx",lineNumber:262,className:"com.stencyl.behavior.BehaviorManager",
methodName:"call2"})}return d},__class__:rj};var lh=function(){};k["com.stencyl.behavior.ReflectionHelper"]=lh;lh.__name__="com.stencyl.behavior.ReflectionHelper";lh.getFieldMap=function(a){var b=lh.fieldMaps.h[a];if(null==b)try{for(var c=Ia.getInstanceFields(k[a]),d=new ia,e=0;e<c.length;){var f=c[e];++e;d.h[f]=!0}b=d;lh.fieldMaps.h[a]=b}catch(g){c=J.caught(g),Q.fullError("Could not load: "+a,c,{fileName:"com/stencyl/behavior/ReflectionHelper.hx",lineNumber:31,className:"com.stencyl.behavior.ReflectionHelper",
methodName:"getFieldMap"})}return b};lh.hasField=function(a,b){a=lh.getFieldMap(a);return null==a?!1:Object.prototype.hasOwnProperty.call(a.h,b)};var sb=function(){n.call(this)};k["com.stencyl.behavior.SceneScript"]=sb;sb.__name__="com.stencyl.behavior.SceneScript";sb.__super__=n;sb.prototype=u(n.prototype,{__class__:sb});var Yk=function(a,b,c,d){this.toExecute=a;this.interval=b;this.repeats=c;this.actor=d;this.done=!1;this.timer=b};k["com.stencyl.behavior.TimedTask"]=Yk;Yk.__name__="com.stencyl.behavior.TimedTask";
Yk.prototype={toExecute:null,interval:null,repeats:null,actor:null,timer:null,done:null,actorCreateTime:null,update:function(a){null==this.actor||this.actor.isAlive()?null==this.actor&&q.engine.isPaused()||null!=this.actor&&this.actor.isPaused()||(this.timer-=a,0>=this.timer&&(this.toExecute(this),this.done=!this.repeats,this.repeats&&(this.timer+=this.interval))):this.done=!0},__class__:Yk};var Gc=function(){this._dispatchIndex=-1;this.listeners=[];this.length=0};k["com.stencyl.event.Event"]=Gc;
Gc.__name__="com.stencyl.event.Event";Gc.prototype={listeners:null,length:null,_dispatchIndex:null,add:function(a){this.listeners.push(a);++this.length},has:function(a){for(var b=0,c=this.listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.listeners.length;0<=--b;)X.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),--this.length,this._dispatchIndex>=b&&--this._dispatchIndex)},removeAll:function(){this.listeners.splice(0,
this.length);this._dispatchIndex=this.length=0},__class__:Gc};var Yr=function(){};k["com.stencyl.event.EventDispatcher"]=Yr;Yr.__name__="com.stencyl.event.EventDispatcher";var Kn=function(){this.keys=[];this.map=new ia};k["com.stencyl.event.EventMap_String_func_Bool_Bool_Void"]=Kn;Kn.__name__="com.stencyl.event.EventMap_String_func_Bool_Bool_Void";Kn.prototype={keys:null,map:null,hasEvents:function(){return 0<this.keys.length},getOrCreateEvent:function(a){var b=this.map.get(a);null==b&&(b=new Gc,
this.map.set(a,b),this.keys.push(a));return b},getEvent:function(a){return this.map.get(a)},__class__:Kn};var rb=function(a,b){null==b&&(b=2);this.swipeTimeout=.1;this.longPressDelay=1;var c=this;if(!rb.initialized){rb.initialized=!0;var d=Da.get_current().stage;rb.moveToleSqr=.008*(new pa(d.stageWidth,d.stageHeight)).get_length();rb.moveToleSqr*=rb.moveToleSqr;Me.get_supportsTouchEvents()&&(Me.inputMode=2)}this.owner=a;this.mode=b;a=Me.get_supportsTouchEvents();this.owner.mouseEnabled=!0;this.listenEvents=
1==this.mode?a?rb.touchEvents:rb.mouseEvents:a?rb.geTouchEvents:rb.geMouseEvents;this.handler=1==this.mode?a?r(this,this.convertTouch):r(this,this.convertMouse):a?r(this,this.onTouch):r(this,this.onMouse);a=0;for(b=this.listenEvents;a<b.length;)d=b[a],++a,this.owner.addEventListener(d,this.handler);3==this.mode&&Da.get_current().stage.addEventListener("resize",function(a){c.overlay=null});this.touchList=new Dc;this.setReady()};k["com.stencyl.gestures.RoxGestureAgent"]=rb;rb.__name__="com.stencyl.gestures.RoxGestureAgent";
rb.__properties__={get_multitouchSupported:"get_multitouchSupported"};rb.init=function(){if(!rb.initialized){rb.initialized=!0;var a=Da.get_current().stage;rb.moveToleSqr=.008*(new pa(a.stageWidth,a.stageHeight)).get_length();rb.moveToleSqr*=rb.moveToleSqr;Me.get_supportsTouchEvents()&&(Me.inputMode=2)}};rb.localOffset=function(a,b){var c=a.parent.localToGlobal(new pa(a.get_x(),a.get_y()));c.offset(b.x,b.y);c=a.parent.globalToLocal(c);c.offset(-a.get_x(),-a.get_y());return c};rb.get_multitouchSupported=
function(){return Me.get_supportsTouchEvents()?1<Me.maxTouchPoints:!1};rb.initTypeMap=function(){for(var a=new ia,b=0,c=rb.MAP.length>>1;b<c;){var d=b++;a.h[rb.MAP[d<<1]]=rb.MAP[(d<<1)+1]}return a};rb.prototype={mode:null,longPressDelay:null,swipeTimeout:null,owner:null,touch0:null,touch1:null,touchList:null,listenEvents:null,handler:null,longPressTimer:null,tweener:null,overlay:null,state:null,detach:function(){null!=this.tweener&&(vb.cancel(this.tweener),this.tweener=null);this.setReady();for(var a=
0,b=this.listenEvents;a<b.length;){var c=b[a];++a;this.owner.removeEventListener(c,this.handler)}this.overlay=this.owner=null},getHandler:function(a){null==a&&(a=3);var b=r(this,this.handleEvent),c=a;return function(a){b(c,a)}},startTweenXY:function(a,b,c,d){var e=this;this.tweener=new Lf;this.tweener.tween(a.get_x(),c,a.get_y(),d,pb.linear,1E3*b|0).doOnUpdate(function(){a.set_x(e.tweener.value1);a.set_y(e.tweener.value2)})},stopTween:function(){null!=this.tweener&&(vb.cancel(this.tweener),this.tweener=
null)},handleEvent:function(a,b){var c=b.target;if(c==this.owner)switch(b.type){case "rox_gesture_pan":b=b.extra;var d=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));d.offset(b.x,b.y);d=c.parent.globalToLocal(d);d.offset(-c.get_x(),-c.get_y());b=d;0!=(a&1)&&c.set_x(c.get_x()+b.x);0!=(a&2)&&c.set_y(c.get_y()+b.y);break;case "rox_gesture_pinch":d=b.extra;var e=c.parent.localToGlobal(new pa(c.get_x(),c.get_y())),f=e.x-b.stageX;e=e.y-b.stageY;a=Math.atan2(e,f);f=(new pa(f,e)).get_length();f=pa.polar(f*
d,a);f.offset(b.stageX,b.stageY);f=c.parent.globalToLocal(f);c.set_scaleX(c.get_scaleX()*d);c.set_scaleY(c.get_scaleY()*d);c.set_x(f.x);c.set_y(f.y);break;case "rox_gesture_rotation":a=b.extra;e=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));f=e.x-b.stageX;e=e.y-b.stageY;d=Math.atan2(e,f);f=(new pa(f,e)).get_length();f=pa.polar(f,d+a);f.offset(b.stageX,b.stageY);f=c.parent.globalToLocal(f);c.set_rotation(c.get_rotation()+rb.R2D*a);c.set_x(f.x);c.set_y(f.y);break;case "rox_gesture_swipe":b=new pa(2*
b.extra.x,2*b.extra.y);d=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));d.offset(b.x,b.y);d=c.parent.globalToLocal(d);d.offset(-c.get_x(),-c.get_y());b=d;a=c.get_x()+b.x;b=c.get_y()+b.y;var g=this;this.tweener=new Lf;this.tweener.tween(c.get_x(),a,c.get_y(),b,pb.linear,2E3).doOnUpdate(function(){c.set_x(g.tweener.value1);c.set_y(g.tweener.value2)})}},convertTouch:function(a){this.owner.dispatchEvent(new Wc(rb.typeMap.h[a.type],a.bubbles,a.cancelable,a.localX,a.localY,a.stageX,a.stageY,a.touchPointID,
this))},convertMouse:function(a){var b=a.type;("mouseDown"==b||"mouseUp"==b||"click"==b||a.buttonDown)&&this.owner.dispatchEvent(new Wc(rb.typeMap.h[b],a.bubbles,a.cancelable,a.localX,a.localY,a.stageX,a.stageY,0,this))},onTouch:function(a){var b=a.touchPointID,c=null==this.touch0||this.touch0.tid==b;(c||null!=this.touch1&&this.touch1.tid==b||null!=this.touch0&&null==this.touch1&&this.touch0.tid!=b)&&this.handleTouch(rb.typeMap.h[a.type],a,c,b)},onMouse:function(a){var b=a.type;("mouseDown"==b||"mouseUp"==
b||a.buttonDown)&&this.handleTouch(rb.typeMap.h[b],a,!0,0)},handleTouch:function(a,b,c,d){var e=new Nn(this.owner,b,d);d=c?this.touch0:this.touch1;if("rox_touch_move"==a&&null!=d){var f=d.sx-e.sx;var g=d.sy-e.sy;f=f*f+g*g<rb.moveToleSqr}else f=!1;if(f)return!1;d=!0;switch(this.state){case 0:if(c&&"rox_touch_begin"==a){this.state=1;this.touch0=e;var h=r(this,this.sendLongPress);f=function(){h(e)};this.longPressTimer=vb.timer(1E3*this.longPressDelay|0).doOnComplete(f);null!=this.tweener&&(vb.cancel(this.tweener),
this.tweener=null);if(3==this.mode)for(c=Da.get_current().stage,null==this.overlay&&(this.overlay=new Ya,this.overlay.set_name("overlay"),this.overlay.get_graphics().beginFill(16777215,.00392156862745098),this.overlay.get_graphics().drawRect(0,0,c.stageWidth,c.stageHeight)),c.addChild(this.overlay),c=0,a=this.listenEvents;c<a.length;)f=a[c],++c,this.overlay.addEventListener(f,this.handler)}else d=!1;break;case 1:c&&"rox_touch_end"==a?(this.owner.dispatchEvent(new Wc("rox_gesture_tap",null,null,e.lx,
e.ly,e.sx,e.sy,null,this)),this.setReady()):c&&"rox_touch_move"==a?(c=new pa(e.sx-this.touch0.sx,e.sy-this.touch0.sy),this.owner.dispatchEvent(new Wc("rox_gesture_pan",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c)),this.state=4,null!=this.touch0&&this.touchList.push(this.touch0),this.touch0=e,null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null)):c||"rox_touch_begin"!=a?d=!1:(this.state=2,this.touch1=e,null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=
null));break;case 2:"rox_touch_end"==a?(this.owner.dispatchEvent(new Wc("rox_gesture_end",null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.setReady()):"rox_touch_move"==a?(b=c?this.touch1:this.touch0,g=c?this.touch0:this.touch1,f=pa.distance(e.spt,b.spt)/pa.distance(g.spt,b.spt),a=Math.atan2(e.sy-b.sy,e.sx-b.sx)-Math.atan2(g.sy-b.sy,g.sx-b.sx),b=pa.interpolate(b.lpt,g.lpt,.5),g=this.owner.localToGlobal(b),1!=f&&this.owner.dispatchEvent(new Wc("rox_gesture_pinch",null,null,b.x,b.y,g.x,g.y,null,this,
f)),0!=a&&this.owner.dispatchEvent(new Wc("rox_gesture_rotation",null,null,b.x,b.y,g.x,g.y,null,this,a)),c?this.touch0=e:this.touch1=e):d=!1;break;case 4:if(c&&"rox_touch_move"==a)c=new pa(e.sx-this.touch0.sx,e.sy-this.touch0.sy),this.owner.dispatchEvent(new Wc("rox_gesture_pan",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c)),this.state=4,null!=this.touch0&&this.touchList.push(this.touch0),this.touch0=e,null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null);else if(c&&("rox_touch_end"==
a||3!=this.mode&&"rox_touch_out"==a&&b.target==this.owner)){if(0>=this.swipeTimeout||e.time-this.touch0.time<this.swipeTimeout){c=this.touchList.pop();b=null;for(a=this.touchList.h;null!=a;){f=a.item;a=a.next;if(.2<c.time-f.time)break;b=f}null!=b&&(g=c.sy-b.sy,f=c.sx-b.sx,a=Math.atan2(g,f),c=pa.polar((new pa(f,g)).get_length()/(c.time-b.time)*.25,a),this.owner.dispatchEvent(new Wc("rox_gesture_swipe",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c)))}this.setReady()}else c||"rox_touch_begin"!=a?d=!1:(this.owner.dispatchEvent(new Wc("rox_gesture_begin",
null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.state=2,this.touch1=e,null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null))}return d},sendLongPress:function(a){this.owner.dispatchEvent(new Wc("rox_gesture_long_press",null,null,a.lx,a.ly,a.sx,a.sy,null,this));this.setReady()},setReady:function(){this.state=0;this.touch0=this.touch1=null;this.touchList.clear();null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null);if(null!=this.overlay&&3==
this.mode){for(var a=0,b=this.listenEvents;a<b.length;){var c=b[a];++a;this.overlay.removeEventListener(c,this.handler)}Da.get_current().stage.removeChild(this.overlay)}},setMove:function(a){this.state=4;null!=this.touch0&&this.touchList.push(this.touch0);this.touch0=a;null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null)},setTwoFingerMove:function(a){this.state=2;this.touch1=a;null!=this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null)},cancelLongPress:function(){null!=
this.longPressTimer&&(vb.cancel(this.longPressTimer),this.longPressTimer=null)},__class__:rb};var Nn=function(a,b,c){this.tid=c;this.sx=b.stageX;this.sy=b.stageY;this.spt=new pa(this.sx,this.sy);this.lpt=a.globalToLocal(this.spt);this.lx=this.lpt.x;this.ly=this.lpt.y;this.time=(new Date).getTime()/1E3};k["com.stencyl.gestures._RoxGestureAgent.TouchPoint"]=Nn;Nn.__name__="com.stencyl.gestures._RoxGestureAgent.TouchPoint";Nn.prototype={tid:null,lx:null,ly:null,sx:null,sy:null,lpt:null,spt:null,time:null,
distSqr:function(a){var b=a.sx-this.sx;a=a.sy-this.sy;return b*b+a*a},__class__:Nn};var la=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};k["openfl.events.Event"]=la;la.__name__="openfl.events.Event";la.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=new la(this.type,this.bubbles,this.cancelable);a.eventPhase=
this.eventPhase;a.target=this.target;a.currentTarget=this.currentTarget;return a},formatToString:function(a,b,c,d,e,f){var g=[];null!=b&&g.push(b);null!=c&&g.push(c);null!=d&&g.push(d);null!=e&&g.push(e);null!=f&&g.push(f);return r(this,this.__formatToString).apply(this,[a,g])},isDefaultPrevented:function(){return this.__preventDefault},preventDefault:function(){this.cancelable&&(this.__preventDefault=!0)},stopImmediatePropagation:function(){this.__isCanceledNow=this.__isCanceled=!0},stopPropagation:function(){this.__isCanceled=
!0},toString:function(){return this.__formatToString("Event",["type","bubbles","cancelable"])},__formatToString:function(a,b){a="["+a;for(var c,d=0;d<b.length;){var e=b[d];++d;c=X.field(this,e);a="string"==typeof c?a+(" "+e+'="'+A.string(c)+'"'):a+(" "+e+"="+A.string(c))}return a+"]"},__init:function(){this.currentTarget=this.target=null;this.cancelable=this.bubbles=!1;this.eventPhase=2;this.__preventDefault=this.__isCanceledNow=this.__isCanceled=!1},__class__:la};var Wc=function(a,b,c,d,e,f,g,h,
m,l){null==h&&(h=0);null==c&&(c=!1);null==b&&(b=!0);la.call(this,a,b,c);this.localX=d;this.localY=e;this.stageX=f;this.stageY=g;this.touchPointID=h;this.agent=m;this.extra=l};k["com.stencyl.gestures.RoxGestureEvent"]=Wc;Wc.__name__="com.stencyl.gestures.RoxGestureEvent";Wc.__super__=la;Wc.prototype=u(la.prototype,{localX:null,localY:null,stageX:null,stageY:null,touchPointID:null,agent:null,extra:null,toString:function(){return this.type+"("+this.touchPointID+"): local=("+this.localX+","+this.localY+
"), stage=("+this.stageX+","+this.stageY+"), extra="+(this.extra instanceof pa?"Point("+A.string(this.extra.x)+","+A.string(this.extra.y)+")":this.extra)},__class__:Wc});var bl=function(){};k["com.stencyl.graphics.AbstractAnimation"]=bl;bl.__name__="com.stencyl.graphics.AbstractAnimation";bl.__isInterface__=!0;bl.prototype={update:null,getCurrentFrame:null,getNumFrames:null,setFrame:null,isFinished:null,activate:null,reset:null,draw:null,getFrameDurations:null,setFrameDurations:null,setFrameDuration:null,
getCurrentImage:null,__class__:bl};var dd=function(a,b,c){null==c&&(c=!1);ab.call(this);this.__drawableType=2;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;null==b&&(this.pixelSnapping=1)};k["openfl.display.Bitmap"]=dd;dd.__name__="openfl.display.Bitmap";dd.__super__=ab;dd.prototype=u(ab.prototype,{pixelSnapping:null,smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,__enterFrame:function(a){null==this.__bitmapData||null==this.__bitmapData.image||this.__bitmapData.image.version==
this.__imageVersion||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=fa.__pool.get();null!=this.__bitmapData?c.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height):c.setTo(0,0,0,0);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||null==this.__bitmapData||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();
var g=this.__renderTransform,h=g.a*g.d-g.b*g.c;c=0==h?-g.tx:1/h*(g.c*(g.ty-b)+g.d*(a-g.tx));g=this.__renderTransform;h=g.a*g.d-g.b*g.c;a=0==h?-g.ty:1/h*(g.a*(b-g.ty)+g.b*(g.tx-a));if(0<c&&0<a&&c<=this.__bitmapData.width&&a<=this.__bitmapData.height){if(null!=this.__scrollRect&&!this.__scrollRect.contains(c,a))return!1;null==d||e||d.push(f);return!0}return!1},__hitTestMask:function(a,b){if(null==this.__bitmapData)return!1;this.__getRenderTransform();var c=this.__renderTransform,d=c.a*c.d-c.b*c.c,e=
0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;a=0==d?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a));return 0<e&&0<a&&e<=this.__bitmapData.width&&a<=this.__bitmapData.height?!0:!1},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=a;this.smoothing=!1;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());this.__imageVersion=-1;return this.__bitmapData},set_height:function(a){null!=this.__bitmapData?this.set_scaleY(a/
this.__bitmapData.height):this.set_scaleY(0);return a},set_width:function(a){null!=this.__bitmapData?this.set_scaleX(a/this.__bitmapData.width):this.set_scaleX(0);return a},__class__:dd,__properties__:u(ab.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var Aj=function(a){dd.call(this,a.frames[0]);this.model=a;this.set_x(Math.round(-a.frameWidth/2*q.SCALE));this.set_y(Math.round(-a.frameHeight/2*q.SCALE));this.frameIndex=this.timer=0;this.individualDurations=
!1;this.durations=a.durations;this.numFrames=this.durations.length;this.smoothing=ha.antialias;this.finished=1>=this.numFrames;null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ha.antialias};k["com.stencyl.graphics.BitmapAnimation"]=
Aj;Aj.__name__="com.stencyl.graphics.BitmapAnimation";Aj.__interfaces__=[bl];Aj.__super__=dd;Aj.prototype=u(dd.prototype,{model:null,frameIndex:null,timer:null,finished:null,durations:null,individualDurations:null,frames:null,numFrames:null,filter:null,filteredFrames:null,update:function(a){this.model.sync&&this.model.looping?(a=this.frameIndex,this.timer=this.model.sharedTimer,this.frameIndex=this.model.sharedFrameIndex,a!=this.frameIndex&&(null!=this.filter?(this.filteredFrames[this.frameIndex]||
(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ha.antialias)):(this.timer+=a,0<this.numFrames&&this.timer>this.durations[this.frameIndex]&&(a=this.frameIndex,this.timer-=this.durations[this.frameIndex],this.frameIndex++,this.frameIndex>=this.numFrames&&(this.model.looping?
this.frameIndex=0:(this.finished=!0,this.frameIndex--)),a!=this.frameIndex&&(null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ha.antialias)))},getCurrentFrame:function(){return this.frameIndex},getNumFrames:function(){return this.numFrames},
setFrame:function(a){if(0>a||a>=this.numFrames)a=0;a!=this.frameIndex&&(this.frameIndex=a,null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ha.antialias);this.timer=0;this.finished=!1},isFinished:function(){return this.finished},
reset:function(){this.frameIndex=this.timer=0;this.finished=!1;null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ha.antialias},updateBitmap:function(){null!=this.filter?(this.filteredFrames[this.frameIndex]||
(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ha.antialias},set_filter:function(a){this.filter=a;for(var b=[],c=0,d=this.numFrames;c<d;)c++,b.push(!1);this.filteredFrames=b;b=[];c=0;for(d=this.numFrames;c<d;)c++,b.push(null);this.frames=b;null!=this.filter?(this.filteredFrames[this.frameIndex]||
(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ha.antialias;return a},applyFilters:function(a,b,c){null==a&&(a=new La(b.width,b.height));for(var d=0;d<c.length;){var e=c[d];++d;b=e.__applyFilter(a,b,b.rect,W.zero)}return a},draw:function(a,b,c,d,e){ha.disposeImages&&
!this.model.checkImageReadable()||a.drawImage(this.get_bitmapData(),b,c,d)},getFrameDurations:function(){return this.durations},setFrameDurations:function(a){if(null!=this.durations){for(var b=[],c=0,d=this.durations.length;c<d;)c++,b.push(a);this.durations=b;this.individualDurations=!0}},setFrameDuration:function(a,b){if(!this.individualDurations){for(var c=[],d=0,e=this.durations.length;d<e;){var f=d++;c.push(this.durations[f])}this.durations=c;this.individualDurations=!0}0<=a&&a<this.durations.length&&
(this.durations[a]=b)},framesUpdated:function(){this.set_x(Math.round(-this.model.frameWidth/2*q.SCALE));this.set_y(Math.round(-this.model.frameHeight/2*q.SCALE));null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=
ha.antialias},getCurrentImage:function(){return ha.disposeImages&&!this.model.checkImageReadable()?ne.UNLOADED:this.get_bitmapData()},getCurrentImageInstance:function(){return new Bj(null,this.get_bitmapData())},activate:function(){},__class__:Aj,__properties__:u(dd.prototype.__properties__,{set_filter:"set_filter"})});var Ih=function(){};k["com.stencyl.graphics.EngineScaleUpdateListener"]=Ih;Ih.__name__="com.stencyl.graphics.EngineScaleUpdateListener";Ih.__isInterface__=!0;Ih.prototype={updateScale:null,
__class__:Ih};var Bj=function(a,b){this.cacheParentAnchor=W.zero;Ya.call(this);this.offsetY=this.offsetX=0;null!=a?this.initializeFromBitmap(a):null!=b?this.initializeFromBitmapData(b):Q.error("Couldn't initialize bitmap wrapper",{fileName:"com/stencyl/graphics/BitmapWrapper.hx",lineNumber:74,className:"com.stencyl.graphics.BitmapWrapper",methodName:"new"})};k["com.stencyl.graphics.BitmapWrapper"]=Bj;Bj.__name__="com.stencyl.graphics.BitmapWrapper";Bj.__interfaces__=[Ih];Bj.__super__=Ya;Bj.prototype=
u(Ya.prototype,{img:null,offsetX:null,offsetY:null,cacheParentAnchor:null,smoothing:null,imgX:null,imgY:null,tweenProps:null,bitmapFilters:null,filtersAsShader:null,usingSoftwareFilter:null,filtersWrapper:null,initializeFromBitmap:function(a){this.img=a;this.addChild(a)},initializeFromBitmapData:function(a){this.initializeFromBitmap(new dd(a))},set_imgX:function(a){this.set_x((a+this.offsetX)*q.SCALE-this.cacheParentAnchor.x);return this.imgX=a},get_imgX:function(){return this.imgX},set_imgY:function(a){this.set_y((a+
this.offsetY)*q.SCALE-this.cacheParentAnchor.y);return this.imgY=a},get_imgY:function(){return this.imgY},set_smoothing:function(a){return this.img.smoothing=a},get_smoothing:function(){return this.img.smoothing},setOrigin:function(a,b){this.set_x(this.get_x()+(a-this.offsetX)*q.SCALE);this.set_y(this.get_y()+(b-this.offsetY)*q.SCALE);this.offsetX=a;this.offsetY=b;this.img.set_x(-a*q.SCALE);this.img.set_y(-b*q.SCALE)},updateScale:function(){this.updatePosition()},updatePosition:function(){this.set_x((this.get_imgX()+
this.offsetX)*q.SCALE-this.cacheParentAnchor.x);this.set_y((this.get_imgY()+this.offsetY)*q.SCALE-this.cacheParentAnchor.y)},get_tweenProps:function(){null==this.tweenProps&&(this.tweenProps=new On(this));return this.tweenProps},get_filtersWrapper:function(){return null==this.filtersWrapper?[]:this.filtersWrapper.slice()},set_filtersWrapper:function(a){if(null==a||0==a.length)return this.bitmapFilters=null,this.usingSoftwareFilter=!1,this.filtersAsShader=null,this.img.set_shader(null),[];null==this.bitmapFilters&&
(this.bitmapFilters=[]);this.bitmapFilters=this.bitmapFilters.concat(a);if(this.usingSoftwareFilter=Uc.exists(this.bitmapFilters,function(a){return!(a instanceof Xe)}))this.filtersAsShader=null;else{a=new Oa;for(var b=0,c=this.bitmapFilters;b<c.length;){var d=c[b];++b;d=U.__cast(d,Xe);a.matrix=d.get_matrix()}b=new Cj;b.init(a.matrix);this.filtersAsShader=b}this.usingSoftwareFilter&&this.set_filters(this.bitmapFilters);this.img.set_shader(this.filtersAsShader);return this.bitmapFilters},__class__:Bj,
__properties__:u(Ya.prototype.__properties__,{set_filtersWrapper:"set_filtersWrapper",get_filtersWrapper:"get_filtersWrapper",get_tweenProps:"get_tweenProps",set_imgY:"set_imgY",get_imgY:"get_imgY",set_imgX:"set_imgX",get_imgX:"get_imgX",set_smoothing:"set_smoothing",get_smoothing:"get_smoothing"})});var On=function(a){this.bmp=a;this.xy=(new Lf).doOnUpdate(r(this,this.onUpdateXY));this.angle=(new we).doOnUpdate(r(this,this.onUpdateAngle));this.alpha=(new we).doOnUpdate(r(this,this.onUpdateAlpha));
this.scaleXY=(new Lf).doOnUpdate(r(this,this.onUpdateScaleXY))};k["com.stencyl.graphics.BitmapTweenProperties"]=On;On.__name__="com.stencyl.graphics.BitmapTweenProperties";On.prototype={xy:null,angle:null,alpha:null,scaleXY:null,bmp:null,pause:function(){this.xy.paused=!0;this.angle.paused=!0;this.alpha.paused=!0;this.scaleXY.paused=!0},unpause:function(){this.xy.paused=!1;this.angle.paused=!1;this.alpha.paused=!1;this.scaleXY.paused=!1},cancel:function(){this.xy.active&&vb.cancel(this.xy);this.angle.active&&
vb.cancel(this.angle);this.alpha.active&&vb.cancel(this.alpha);this.scaleXY.active&&vb.cancel(this.scaleXY)},onUpdateXY:function(){this.bmp.set_imgX(this.xy.value1);this.bmp.set_imgY(this.xy.value2)},onUpdateAngle:function(){this.bmp.set_rotation(this.angle.value)},onUpdateAlpha:function(){this.bmp.set_alpha(this.alpha.value)},onUpdateScaleXY:function(){this.bmp.set_scaleX(this.scaleXY.value1);this.bmp.set_scaleY(this.scaleXY.value2)},__class__:On};var cl=function(){};k["com.stencyl.graphics.BlendModes"]=
cl;cl.__name__="com.stencyl.graphics.BlendModes";cl.get=function(a){return cl.stringBlendMap.h[a]};var xe=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=1;this.__data=Or._new(a)};k["openfl.display.Shader"]=xe;xe.__name__="openfl.display.Shader";xe.prototype={byteCode:null,glProgram:null,precisionHint:null,program:null,__alpha:null,__bitmap:null,__colorMultiplier:null,__colorOffset:null,__context:null,__data:null,__glFragmentSource:null,__glSourceDirty:null,
__glVertexSource:null,__hasColorTransform:null,__inputBitmapData:null,__isGenerated:null,__matrix:null,__numPasses:null,__paramBool:null,__paramFloat:null,__paramInt:null,__position:null,__textureCoord:null,__texture:null,__textureSize:null,__clearUseArray:function(){for(var a=0,b=this.__paramBool;a<b.length;){var c=b[a];++a;c.__useArray=!1}a=0;for(b=this.__paramFloat;a<b.length;)c=b[a],++a,c.__useArray=!1;a=0;for(b=this.__paramInt;a<b.length;)c=b[a],++a,c.__useArray=!1},__createGLShader:function(a,
b){var c=this.__context.gl,d=c.createShader(b);c.shaderSource(d,a);c.compileShader(d);var e=c.getShaderInfoLog(d),f=null!=e&&""!=R.trim(e),g=c.getShaderParameter(d,c.COMPILE_STATUS);if(f||0==g)if(b=(0==g?"Error":"Info")+(b==c.VERTEX_SHADER?" compiling vertex shader":" compiling fragment shader"),b=b+("\n"+e)+("\n"+a),0==g){a=b;e={fileName:"openfl/display/Shader.hx",lineNumber:335,className:"openfl.display.Shader",methodName:"__createGLShader"};if(xc.throwErrors)throw d="["+e.className+"] ERROR: "+
A.string(a),J.thrown(d);Q.error(a,e)}else f&&Q.debug(b,{fileName:"openfl/display/Shader.hx",lineNumber:336,className:"openfl.display.Shader",methodName:"__createGLShader"});return d},__createGLProgram:function(a,b){var c=this.__context.gl;a=this.__createGLShader(a,c.VERTEX_SHADER);var d=this.__createGLShader(b,c.FRAGMENT_SHADER);b=c.createProgram();for(var e=0,f=this.__paramFloat;e<f.length;){var g=f[e];++e;if(-1<g.name.indexOf("Position")&&R.startsWith(g.name,"openfl_")){c.bindAttribLocation(b,0,
g.name);break}}c.attachShader(b,a);c.attachShader(b,d);c.linkProgram(b);if(0==c.getProgramParameter(b,c.LINK_STATUS)){c="Unable to initialize the shader program\n"+c.getProgramInfoLog(b);a={fileName:"openfl/display/Shader.hx",lineNumber:369,className:"openfl.display.Shader",methodName:"__createGLProgram"};if(xc.throwErrors)throw c="["+a.className+"] ERROR: "+A.string(c),J.thrown(c);Q.error(c,a)}return b},__disable:function(){null!=this.program&&this.__disableGL()},__disableGL:function(){for(var a=
this.__context.gl,b=0,c=0,d=this.__inputBitmapData;c<d.length;){var e=d[c];++c;e.__disableGL(this.__context,b);++b;if(b==a.MAX_TEXTURE_IMAGE_UNITS)break}c=0;for(d=this.__paramBool;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramFloat;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramInt;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);this.__context.__bindGLArrayBuffer(null);"opengl"==this.__context.__context.type&&a.disable(a.TEXTURE_2D)},__enable:function(){this.__init();
null!=this.program&&this.__enableGL()},__enableGL:function(){for(var a=0,b=this.__context.gl,c=0,d=this.__inputBitmapData;c<d.length;){var e=d[c];++c;b.uniform1i(e.index,a);++a}"opengl"==this.__context.__context.type&&0<a&&b.enable(b.TEXTURE_2D)},__init:function(){null==this.__data&&(this.__data=Or._new(null));null==this.__glFragmentSource||null==this.__glVertexSource||null!=this.program&&!this.__glSourceDirty||this.__initGL()},__initGL:function(){if(this.__glSourceDirty||null==this.__paramBool)this.__glSourceDirty=
!1,this.program=null,this.__inputBitmapData=[],this.__paramBool=[],this.__paramFloat=[],this.__paramInt=[],this.__processGLData(this.get_glVertexSource(),"attribute"),this.__processGLData(this.get_glVertexSource(),"uniform"),this.__processGLData(this.get_glFragmentSource(),"uniform");if(null!=this.__context&&null==this.program){var a=this.__context.gl,b=1==this.precisionHint?"precision mediump float;\n":"precision lowp float;\n",c=b+this.get_glVertexSource();b+=this.get_glFragmentSource();var d=c+
b;Object.prototype.hasOwnProperty.call(this.__context.__programs.h,d)?this.program=this.__context.__programs.h[d]:(this.program=this.__context.createProgram(1),this.program.__glProgram=this.__createGLProgram(c,b),this.__context.__programs.h[d]=this.program);if(null!=this.program){this.glProgram=this.program.__glProgram;c=0;for(b=this.__inputBitmapData;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramBool;c<
b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramFloat;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramInt;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name)}}},__processGLData:function(a,b){var c=0,d;for(d="uniform"==
b?new aa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new aa("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var e=d.matched(1);var f=d.matched(2);if(!R.startsWith(f,"gl_")){c="uniform"==b;if(R.startsWith(e,"sampler")){e=new dl;e.name=f;e.__isUniform=c;this.__inputBitmapData.push(e);switch(f){case "bitmap":this.__bitmap=e;break;case "openfl_Texture":this.__texture=e}this.__data[f]=e;this.__isGenerated&&(this[f]=e)}else if(!Object.prototype.hasOwnProperty.call(this.__data,f)||null==
X.field(this.__data,f)){switch(e){case "bool":var g=0;break;case "bvec2":g=1;break;case "bvec3":g=2;break;case "bvec4":g=3;break;case "dvec2":case "vec2":g=5;break;case "dvec3":case "vec3":g=6;break;case "double":case "float":g=4;break;case "ivec3":case "uvec3":g=10;break;case "ivec4":case "uvec4":g=11;break;case "mat2":case "mat2x2":g=12;break;case "mat2x3":g=13;break;case "mat2x4":g=14;break;case "mat3x2":g=15;break;case "mat3":case "mat3x3":g=16;break;case "mat3x4":g=17;break;case "mat4":case "mat4x4":g=
20;break;case "mat4x2":g=18;break;case "mat4x3":g=19;break;case "int":case "uint":g=8;break;case "ivec2":case "uvec2":g=9;break;case "dvec4":case "vec4":g=7;break;default:g=null}switch(g){case 1:case 5:case 9:e=2;break;case 3:case 7:case 11:case 12:e=4;break;case 2:case 6:case 10:e=3;break;case 16:e=9;break;case 20:e=16;break;default:e=1}switch(g){case 12:var h=2;break;case 16:h=3;break;case 20:h=4;break;default:h=1}switch(g){case 0:case 1:case 2:case 3:var m=new si;m.set_name(f);m.type=g;m.__arrayLength=
h;m.__isBool=!0;m.__isUniform=c;m.__length=e;this.__paramBool.push(m);"openfl_HasColorTransform"==f&&(this.__hasColorTransform=m);this.__data[f]=m;this.__isGenerated&&(this[f]=m);break;case 8:case 9:case 10:case 11:m=new si;m.set_name(f);m.type=g;m.__arrayLength=h;m.__isInt=!0;m.__isUniform=c;m.__length=e;this.__paramInt.push(m);this.__data[f]=m;this.__isGenerated&&(this[f]=m);break;default:m=new si;m.set_name(f);m.type=g;m.__arrayLength=h;0<h&&(g=h*h,g=null!=g?new Float32Array(g):null,m.__uniformMatrix=
g);m.__isFloat=!0;m.__isUniform=c;m.__length=e;this.__paramFloat.push(m);if(R.startsWith(f,"openfl_"))switch(f){case "openfl_Alpha":this.__alpha=m;break;case "openfl_ColorMultiplier":this.__colorMultiplier=m;break;case "openfl_ColorOffset":this.__colorOffset=m;break;case "openfl_Matrix":this.__matrix=m;break;case "openfl_Position":this.__position=m;break;case "openfl_TextureCoord":this.__textureCoord=m;break;case "openfl_TextureSize":this.__textureSize=m}this.__data[f]=m;this.__isGenerated&&(this[f]=
m)}}f=d.matchedPos();c=f.pos+f.len}}},__reinit:function(){var a=this.__data;this.__data=Or._new(null);if(null!=this.__glFragmentSource&&null!=this.__glVertexSource){this.__glSourceDirty=!0;this.__paramInt=this.__paramFloat=this.__paramBool=this.__inputBitmapData=this.program=null;this.__initGL();for(var b=0,c=this.__paramBool;b<c.length;){var d=c[b];++b;d.value=X.field(a,d.name).value}b=0;for(c=this.__paramFloat;b<c.length;)d=c[b],++b,d.value=X.field(a,d.name).value;b=0;for(c=this.__paramInt;b<c.length;)d=
c[b],++b,d.value=X.field(a,d.name).value}},__update:function(){null!=this.program&&this.__updateGL()},__updateFromBuffer:function(a,b){null!=this.program&&this.__updateGLFromBuffer(a,b)},__updateGL:function(){for(var a=0,b=0,c=this.__inputBitmapData;b<c.length;){var d=c[b];++b;d.__updateGL(this.__context,a);++a}b=0;for(c=this.__paramBool;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramFloat;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramInt;b<c.length;)a=
c[b],++b,a.__updateGL(this.__context)},__updateGLFromBuffer:function(a,b){for(var c=0,d,e,f,g,h,m=0,l=a.inputCount;m<l;)h=m++,d=a.inputRefs[h],e=a.inputs[h],f=a.inputFilter[h],g=a.inputMipFilter[h],h=a.inputWrap[h],null!=e&&(d.__updateGL(this.__context,c,e,f,g,h),++c);m=this.__context.gl;0<a.paramDataLength?(null==a.paramDataBuffer&&(a.paramDataBuffer=m.createBuffer()),this.__context.__bindGLArrayBuffer(a.paramDataBuffer),$b.bufferData(m,m.ARRAY_BUFFER,a.paramData,m.DYNAMIC_DRAW)):this.__context.__bindGLArrayBuffer(null);
e=d=c=0;f=a.paramBoolCount;g=a.paramFloatCount;var n=a.paramData,p=null,q=null,k=null;m=0;for(l=a.paramCount;m<l;){h=m++;var t=!1;if(h<f){var v=a.paramRefs_Bool[c];for(var r=0,Ka=a.overrideBoolCount;r<Ka;){var S=r++;if(v.name==a.overrideBoolNames[S]){p=a.overrideBoolValues[S];t=!0;break}}t?v.__updateGL(this.__context,p):v.__updateGLFromBuffer(this.__context,n,a.paramPositions[h],a.paramLengths[h],b);++c}else if(h<f+g){v=a.paramRefs_Float[d];r=0;for(Ka=a.overrideFloatCount;r<Ka;)if(S=r++,v.name==a.overrideFloatNames[S]){q=
a.overrideFloatValues[S];t=!0;break}t?v.__updateGL(this.__context,q):v.__updateGLFromBuffer(this.__context,n,a.paramPositions[h],a.paramLengths[h],b);++d}else{v=a.paramRefs_Int[e];r=0;for(Ka=a.overrideIntCount;r<Ka;)if(S=r++,v.name==a.overrideIntNames[S]){k=a.overrideIntValues[S];t=!0;break}t?v.__updateGL(this.__context,k):v.__updateGLFromBuffer(this.__context,n,a.paramPositions[h],a.paramLengths[h],b);++e}}},get_data:function(){(this.__glSourceDirty||null==this.__data)&&this.__init();return this.__data},
set_data:function(a){return this.__data=a},get_glFragmentSource:function(){return this.__glFragmentSource},set_glFragmentSource:function(a){a!=this.__glFragmentSource&&(this.__glSourceDirty=!0);return this.__glFragmentSource=a},get_glVertexSource:function(){return this.__glVertexSource},set_glVertexSource:function(a){a!=this.__glVertexSource&&(this.__glSourceDirty=!0);return this.__glVertexSource=a},__class__:xe,__properties__:{set_glVertexSource:"set_glVertexSource",get_glVertexSource:"get_glVertexSource",
set_glFragmentSource:"set_glFragmentSource",get_glFragmentSource:"get_glFragmentSource",set_data:"set_data",get_data:"get_data"}};var Cj=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\tuniform sampler2D openfl_Texture;\n\t\t\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\t\t\n\t\tvoid main(void)\n\t\t{\n\t\t\tvec4 color = texture2D(openfl_Texture, openfl_TextureCoordv);\n\t\t\t\n\t\t\tif(color.a == 0.0)\n\t\t\t{\n\t\t\t\tgl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec4(color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4(color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t}\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}");
xe.call(this);this.__isGenerated=!0;this.__initGL()};k["com.stencyl.graphics.ColorMatrixShader"]=Cj;Cj.__name__="com.stencyl.graphics.ColorMatrixShader";Cj.__super__=xe;Cj.prototype=u(xe.prototype,{init:function(a){if(null==a||null==this.uMultipliers.value)this.uMultipliers.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.uOffsets.value=[0,0,0,0];if(null!=a){var b=this.uMultipliers.value,c=this.uOffsets.value;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[5];b[5]=a[6];b[6]=a[7];b[7]=a[8];b[8]=a[10];b[9]=
a[11];b[10]=a[12];b[11]=a[13];b[12]=a[15];b[13]=a[16];b[14]=a[17];b[15]=a[18];c[0]=a[4]/255;c[1]=a[9]/255;c[2]=a[14]/255;c[3]=a[19]/255}},openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_Texture:null,uMultipliers:null,uOffsets:null,__class__:Cj});var Ld=function(){this.drawActor=!1;this.x=this.y=0;this.scaleX=this.scaleY=q.SCALE;this.alpha=1;this.blendMode=10;this.strokeColor=
this.fillColor=this.strokeSize=0;this.rect=new fa;this.rect2=new fa;this.point=new pa;this.point2=new pa;this.data=[0,0,0];this.drawPoly=!1;this.firstY=this.firstX=this.pointCounter=0;this.font=this.defaultFont=new Af(-1,0,"",!0);this.mtx=new wa};k["com.stencyl.graphics.G"]=Ld;Ld.__name__="com.stencyl.graphics.G";Ld.resetStatics=function(){Ld.fontCache=null};Ld.visitStringCache=function(){for(var a=Ld.drawnStringCacheKeys.length;0<a--;){var b=Ld.drawnStringCache.h[Ld.drawnStringCacheKeys[a]];--b.lifetime;
if(0==b.lifetime){b.img.dispose();b=Ld.drawnStringCacheKeys[a];var c=Ld.drawnStringCache;Object.prototype.hasOwnProperty.call(c.h,b)&&delete c.h[b];Ld.drawnStringCacheKeys[a]=Ld.drawnStringCacheKeys[Ld.drawnStringCacheKeys.length-1];Ld.drawnStringCacheKeys.pop()}}};Ld.prototype={defaultFont:null,graphics:null,x:null,y:null,scaleX:null,scaleY:null,alpha:null,blendMode:null,strokeSize:null,fillColor:null,strokeColor:null,font:null,fontData:null,mtx:null,rect:null,rect2:null,point:null,point2:null,data:null,
drawPoly:null,pointCounter:null,firstX:null,firstY:null,drawActor:null,actor:null,resetGraphicsSettings:function(){this.alpha=1;this.strokeColor=this.fillColor=this.strokeSize=0;this.font=this.defaultFont},setFont:function(a){null!=a&&a!=this.font&&(this.font=a)},startGraphics:function(){!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x-=q.cameraX,this.y-=q.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*q.SCALE,this.strokeColor,this.alpha)},
endGraphics:function(){this.drawActor&&!this.actor.isHUD&&(this.x+=q.cameraX,this.y+=q.cameraY);this.graphics.lineStyle()},translate:function(a,b){this.x+=a*this.scaleX;this.y+=b*this.scaleY},moveTo:function(a,b){this.drawActor?(null!=this.actor&&this.translateToActor(this.actor),this.x+=a*this.scaleX,this.y+=b*this.scaleY):(this.x=a*this.scaleX,this.y=b*this.scaleY)},translateToScreen:function(){this.drawActor=!1;this.actor=null;this.y=this.x=0},translateToActor:function(a){this.drawActor=!0;this.actor=
a;if(a.smoothMove){var b=a.drawY-Math.floor(a.cacheHeight/2)-a.currOffset.y;this.x=(a.drawX-Math.floor(a.cacheWidth/2)-a.currOffset.x)*this.scaleX;this.y=b*this.scaleY}else this.x=a.colX*this.scaleX,this.y=a.colY*this.scaleY},getCacheKey:function(a,b,c){return a+":"+b.ID+":"+c+":"+q.SCALE+":"+b.get_letterSpacing()},drawString:function(a,b,c){null==this.font&&this.resetFont();this.drawActor?null!=this.actor&&this.actor.isHUD?(b=this.x+b*this.scaleX,c=this.y+c*this.scaleY):(b=this.x+b*this.scaleX-q.cameraX,
c=this.y+c*this.scaleY-q.cameraY):(b=this.x+b*this.scaleX,c=this.y+c*this.scaleY);this.mtx.identity();this.mtx.translate(b,c);var d=null,e=this.font;e=a+":"+e.ID+":"+this.alpha+":"+q.SCALE+":"+e.get_letterSpacing();if(Object.prototype.hasOwnProperty.call(Ld.drawnStringCache.h,e))a=Ld.drawnStringCache.h[e],a.lifetime=5,d=a.img;else{var f=this.font.font.getTextWidth(a,this.font.fontScale),g=this.font.font.getFontHeight()*this.font.fontScale|0;0<f&&0<g&&(d=new La(f,g,!0,0),this.font.font.renderToImg(d,
a,0,this.alpha,0,0,this.font.fontScale,0,!1),a=new Pn,a.img=d,a.lifetime=5,Ld.drawnStringCache.h[e]=a,Ld.drawnStringCacheKeys.push(e))}null!=d&&(this.graphics.beginBitmapFill(d,this.mtx,!1,ha.antialias),this.graphics.drawRect(b,c,d.width,d.height),this.graphics.endFill())},drawLine:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;this.startGraphics();this.graphics.moveTo(this.x+a,this.y+b);this.graphics.lineTo(this.x+c,this.y+d);this.endGraphics()},fillPixel:function(a,
b){this.startGraphics();this.graphics.lineStyle();this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRect(this.x+(a*q.SCALE|0),this.y+(b*q.SCALE|0),q.SCALE|0,q.SCALE|0);this.graphics.endFill();this.endGraphics()},drawRect:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;this.startGraphics();this.graphics.drawRect(this.x+a,this.y+b,c,d);this.endGraphics()},fillRect:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;this.startGraphics();
this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRect(this.x+a,this.y+b,c,d);this.graphics.endFill();this.endGraphics()},drawRoundRect:function(a,b,c,d,e){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;this.startGraphics();this.graphics.drawRoundRect(this.x+a,this.y+b,c,d,e,e);this.endGraphics()},fillRoundRect:function(a,b,c,d,e){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;this.startGraphics();this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRoundRect(this.x+
a,this.y+b,c,d,e,e);this.graphics.endFill();this.endGraphics()},drawCircle:function(a,b,c){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;this.startGraphics();this.graphics.drawCircle(this.x+a,this.y+b,c);this.endGraphics()},fillCircle:function(a,b,c){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;this.startGraphics();this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawCircle(this.x+a,this.y+b,c);this.graphics.endFill();this.endGraphics()},beginFillPolygon:function(){this.drawPoly=!1;
this.startGraphics();this.graphics.moveTo(this.x,this.y);this.pointCounter=0},endDrawingPolygon:function(){2<=this.pointCounter&&(this.drawPoly?this.graphics.lineTo(this.x+this.firstX,this.y+this.firstY):(this.graphics.lineTo(this.x+this.firstX,this.y+this.firstY),this.graphics.endFill()),this.endGraphics())},beginDrawPolygon:function(){this.drawPoly=!0;this.startGraphics();this.graphics.moveTo(this.x,this.y);this.pointCounter=0},addPointToPolygon:function(a,b){a*=this.scaleX;b*=this.scaleY;0==this.pointCounter&&
(this.firstX=a,this.firstY=b,this.graphics.moveTo(this.x+a,this.y+b),this.drawPoly||this.graphics.beginFill(this.fillColor,this.alpha));this.pointCounter++;this.graphics.lineTo(this.x+a,this.y+b)},drawImage:function(a,b,c,d,e){null==d&&(d=0);b*=this.scaleX;c*=this.scaleY;this.rect.x=0;this.rect.y=0;this.rect.width=a.width;this.rect.height=a.height;this.drawActor?null!=this.actor&&this.actor.isHUD?(this.point.x=this.x+b,this.point.y=this.y+c):(this.point.x=this.x+b-q.cameraX,this.point.y=this.y+c-
q.cameraY):(this.point.x=this.x+b,this.point.y=this.y+c);this.mtx.identity();this.mtx.rotate(d);this.mtx.translate(this.point.x,this.point.y);0==d?(1!=this.alpha&&(this.point2.x=0,this.point2.y=0,this.rect2.width=a.width,this.rect2.height=a.height,b=new La(a.width,a.height,!0,this.toARGB(0,255*this.alpha|0)),c=new La(a.width,a.height,!0,0),c.copyPixels(a,this.rect2,this.point2,b,null,!0),a=c),this.graphics.beginBitmapFill(a,this.mtx),this.graphics.drawRect(this.point.x,this.point.y,a.width,a.height)):
(1!=this.alpha&&(this.point2.x=0,this.point2.y=0,this.rect2.width=a.width,this.rect2.height=a.height,b=new La(a.width,a.height,!0,this.toARGB(0,255*this.alpha|0)),c=new La(a.width,a.height,!0,0),c.copyPixels(a,this.rect2,this.point2,b,null,!0),a=c),b=new La(a.width+2,a.height+2,!0,0),c=Math.sqrt(Math.pow(b.width,2)+Math.pow(b.height,2))|0,d=new fa(0,0,a.width,a.height),e=new pa(1,1),b.copyPixels(a,d,e),this.graphics.beginBitmapFill(b,this.mtx,!1,ha.antialias),this.graphics.drawRect(this.x-(c-a.width)/
2,this.y-(c-a.height)/2,c,c));this.graphics.endFill()},toARGB:function(a,b){return a+(b<<24)},resetFont:function(){this.font=this.defaultFont;this.font.fontScale!=q.SCALE&&(this.font.fontScale=q.SCALE)},__class__:Ld};var Pn=function(){};k["com.stencyl.graphics._G.TemporaryImage"]=Pn;Pn.__name__="com.stencyl.graphics._G.TemporaryImage";Pn.prototype={lifetime:null,img:null,__class__:Pn};var Zc=function(){};k["com.stencyl.graphics.GLUtil"]=Zc;Zc.__name__="com.stencyl.graphics.GLUtil";Zc.initialize=function(){null==
Zc.gl&&(Zc.context=q.stage.window.context,Zc.context3D=q.stage.context3D,Zc.gl=$b.fromRenderContext(Zc.context),Zc.renderer=q.stage.__renderer,Zc.textureMaxSize=Zc.gl.getParameter(Zc.gl.MAX_TEXTURE_SIZE),Q.debug("GL value of MAX_TEXTURE_SIZE: "+Zc.textureMaxSize,{fileName:"com/stencyl/graphics/GLUtil.hx",lineNumber:39,className:"com.stencyl.graphics.GLUtil",methodName:"initialize"}),Zc.textureMaxSize=Zc.textureMaxSize/2|0,Zc.textureMaxSize>Zc.MAX_TEXTURE_CAP&&(Zc.textureMaxSize=Zc.MAX_TEXTURE_CAP),
null==ac.__supportsBGRA&&(new La(1,1,!0,0)).getTexture(Zc.context3D))};Zc.uploadTexture=function(a,b){a.getTexture(Zc.context3D);b&&Zc.disposeSoftwareBuffer(a)};Zc.disposeSoftwareBuffer=function(a){a.image.buffer.__srcCanvas=null;a.image.buffer.__srcContext=null;a.image.buffer.__srcImageData=null;a.image=null;a.readable=!1;a.__surface=null;a.__vertexBuffer=null;a.__framebuffer=null;a.__framebufferContext=null};Zc.createNewTexture=function(a){var b=Zc.context3D.createRectangleTexture(a,a,1,!1);b.uploadFromTypedArray(null);
var c=new La(0,0,!0,0);c.__resize(a,a);c.readable=!1;c.__texture=b;c.__textureContext=Zc.context;c.__isValid=!0;c.image=null;return c};Zc.clearTexture=function(a){a.__texture.uploadFromTypedArray(null)};var Cd=function(a){this.value=a};k["com.stencyl.graphics.Scale"]=Cd;Cd.__name__="com.stencyl.graphics.Scale";Cd.fromString=function(a){switch(a){case "1.5x":return Cd._1_5X;case "1x":return Cd._1X;case "2x":return Cd._2X;case "3x":return Cd._3X;case "4x":return Cd._4X;default:return Cd._1X}};Cd.prototype=
{value:null,toString:function(){return 1==this.value?"1x":1.5==this.value?"1.5x":2==this.value?"2x":3==this.value?"3x":4==this.value?"4x":""},__class__:Cd};var ii={_new:function(a){return a},fromString:function(a){switch(a){case "FULLSCREEN":return 1;case "NO_SCALING":return 0;case "SCALE_TO_FIT_FILL":return 4;case "SCALE_TO_FIT_FULLSCREEN":return 5;case "SCALE_TO_FIT_LETTERBOX":return 3;case "STRETCH_TO_FIT":return 2;default:return 0}},toString:function(a){switch(a){case 0:return"NO_SCALING";case 1:return"FULLSCREEN";
case 2:return"STRETCH_TO_FIT";case 3:return"SCALE_TO_FIT_LETTERBOX";case 4:return"SCALE_TO_FIT_FILL";case 5:return"SCALE_TO_FIT_FULLSCREEN";default:return"NO_SCALING"}}},wg=function(){this.xSpacing=this.ySpacing=this.lineHeight=this.baseline=0;this.isDefault=!1;this._point=new pa;this._glyphs=new Xa;this._num_letters=0};k["com.stencyl.graphics.fonts.BitmapFont"]=wg;wg.__name__="com.stencyl.graphics.fonts.BitmapFont";wg.store=function(a,b){wg._storedFonts.h[a]=b};wg.fetch=function(a){return wg._storedFonts.h[a]};
wg.prototype={_glyphs:null,_num_letters:null,_tileset:null,_glyphString:null,_point:null,isDefault:null,xSpacing:null,ySpacing:null,lineHeight:null,baseline:null,loadAngelCode:function(a,b){this.reset();if(null!=a){this._glyphString="";var c=new fa,d=0;this._tileset=new ti(a);a=null;for(b=b.elements();b.hasNext();){var e=b.next();if(e.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==e.nodeType?"null":Ga.toString(e.nodeType)));if("font"==e.nodeName)for(e=e.elements();e.hasNext();){var f=
e.next();if(f.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==f.nodeType?"null":Ga.toString(f.nodeType)));if("info"==f.nodeName){var g=[];var h=0;for(f=f.get("spacing").split(",");h<f.length;){var m=f[h];++h;g.push(A.parseInt(m))}this.xSpacing=g[0];this.ySpacing=g[1]}else{if(f.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==f.nodeType?"null":Ga.toString(f.nodeType)));if("common"==f.nodeName)this.lineHeight=A.parseInt(f.get("lineHeight")),
this.baseline=A.parseInt(f.get("base"));else{if(f.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==f.nodeType?"null":Ga.toString(f.nodeType)));"chars"==f.nodeName&&(a=f)}}}}if(null!=a)for(b=a.elements();b.hasNext();){e=b.next();if(e.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==e.nodeType?"null":Ga.toString(e.nodeType)));"char"==e.nodeName&&(a=new Qn,a.tileID=d,a.xoffset=A.parseInt(e.get("xoffset")),a.yoffset=A.parseInt(e.get("yoffset")),
a.xadvance=A.parseInt(e.get("xadvance")),c.x=A.parseInt(e.get("x")),c.y=A.parseInt(e.get("y")),c.width=A.parseInt(e.get("width")),c.height=A.parseInt(e.get("height")),e=A.parseInt(e.get("id")),g=String.fromCodePoint(e),this._glyphString+=g,a.tileID=" "!=g&&""!=g&&0<c.width&&0<c.height?this._tileset.addRect(c):-1,this._glyphs.h[e]=a,this._num_letters++,++d)}}return this},reset:function(){this.dispose();this._glyphs=new Xa;this._num_letters=0;this._glyphString=""},prepareBitmapData:function(a,b){for(var c=
a.getPixel(0,0),d=0,e;d<a.height;){var f=0;for(e=0;e<a.width;){if((a.getPixel(e,d)|0)!=c){for(var g=e,h=d;(a.getPixel(g,d)|0)!=c;)++g;for(;(a.getPixel(e,h)|0)!=c;)++h;g-=e;h-=d;b.push(new fa(e,d,g,h));h>f&&(f=h);e+=g}++e}d+=f+1}b=a.clone();f=a.getPixel32(0,0);for(d=0;d<a.height;){for(e=0;e<a.width;)c=a.getPixel32(e,d),c==f&&b.setPixel32(e,d,0),++e;++d}return b},dispose:function(){this._tileset=null;this._num_letters=0;this._glyphs=null},render:function(a,b,c,d,e,f,g){g=0;for(var h=b.length;g<h;){var m=
g++;m=I.cca(b,m);m=this._glyphs.h[m];if(null!=m){this._point.x=d+m.xoffset*f;this._point.y=e+m.yoffset*f;if(-1!=m.tileID){var l=new fg(m.tileID,this._point.x,this._point.y);l.set_scaleX(f);l.set_scaleY(f);l.set_alpha(c);a.addTile(l)}d+=(m.xadvance+this.xSpacing)*f}}},renderToImg:function(a,b,c,d,e,f,g,h,m){null==m&&(m=!0);null==h&&(h=0);var l=new mh(a.width,a.height,this._tileset,ha.antialias);this.render(l,b,d,e,f,g,h);m?a.draw(l,null,new Kc((c>>16&255)/255,(c>>8&255)/255,(c&255)/255)):a.draw(l);
l.removeTiles()},toARGB:function(a,b){return a+(b<<24)},getTextWidth:function(a,b){null==b&&(b=1);for(var c=0,d=a.length,e=0;e<d;){var f=e++;f=I.cca(a,f);f=this._glyphs.h[f];null!=f&&(c+=f.xadvance)}1<d&&(c+=(d-1)*this.xSpacing);return c*b|0},getFontHeight:function(a){null==a&&(a=1);return this.lineHeight*a|0},numLetters:null,get_numLetters:function(){return this._num_letters},containsCharacter:function(a){return 0<=this._glyphString.indexOf(a)},getTileset:function(){return this._tileset},__class__:wg,
__properties__:{get_numLetters:"get_numLetters"}};var Qn=function(){};k["com.stencyl.graphics.fonts.FontSymbol"]=Qn;Qn.__name__="com.stencyl.graphics.fonts.FontSymbol";Qn.prototype={tileID:null,xoffset:null,yoffset:null,xadvance:null,__class__:Qn};var ed=function(){};k["com.stencyl.graphics.shaders.BasicShader"]=ed;ed.__name__="com.stencyl.graphics.shaders.BasicShader";ed.prototype={multipassParent:null,multipassTarget:null,model:null,setProperty:function(a,b){this.model.setUniform(a,b)},getProperty:function(a){return this.model.getUniform(a)},
tweenProperty:function(a,b,c,d){null==c&&(c=1);this.model.tweenUniform(a,b,c,d)},enable:function(){q.engine.addShader(this.model)},disable:function(){q.engine.clearShaders()},setTimeScale:function(a){this.model.timeScale=a},combine:function(a){this.multipassTarget=a;a.multipassParent=this;return a},__class__:ed};var Rn=function(a,b,c,d,e,f,g,h,m){null==m&&(m=.0075);null==h&&(h=.009);null==g&&(g=.012);null==f&&(f=.6);null==e&&(e=.4);null==d&&(d=3);null==c&&(c=4);null==b&&(b=.004);null==a&&(a=.25);
this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform vec2 uResolution;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float currPixelWeight;\n\t\t\tuniform float neighborPixelWeight;\n\t\t\tuniform float lowThreshold;\n\t\t\tuniform float mediumThreshold;\n\t\t\tuniform float lowMultiplier;\n\t\t\tuniform float mediumMultiplier;\n\t\t\tuniform float highMultiplier;\n\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\tvec2 q1 = vTexCoord;\n\t\t\t\tvec4 oricol = texture2D(uImage0, vec2(q1.x, q1.y));\n\t\t\t\tvec3 col;\n\t\t\t\t\n\t\t\t\tfor(int i = -3; i < 3; i++) \n\t\t\t\t{\n\t\t\t\t\tfor(int j = -3; j < 3; j++) \n\t\t\t\t\t{\n\t\t\t\t\t\tsum += texture2D(uImage0, vec2(j, i) * neighborPixelWeight + vec2(q1.x, q1.y)) * currPixelWeight;\n\t\t\t\t\t}\n\t\t\t   \t}\n\t\t\t \n\t\t\t  \tif(oricol.r < lowThreshold) \n\t\t\t  \t{\n\t\t\t\t\tgl_FragColor = sum * sum * lowMultiplier + oricol;\n\t\t\t  \t} \n\t\t\t  \n\t\t\t  \telse \n\t\t\t  \t{\n\t\t\t\t\tif(oricol.r < mediumThreshold) \n\t\t\t\t\t{\n\t\t\t\t\t\tgl_FragColor = sum * sum * mediumMultiplier + oricol;\n\t\t\t\t   \t} \n\t\t\t\t   \t\n\t\t\t\t   \telse \n\t\t\t\t   \t{\n\t\t\t\t\t\tgl_FragColor = sum * sum * highMultiplier + oricol;\n\t\t\t\t   \t}\n\t\t\t   }\n\t\t\t}\n\t\t",
!0);this.setProperty("currPixelWeight",a);this.setProperty("neighborPixelWeight",b);this.setProperty("sampleX",c);this.setProperty("sampleY",d);this.setProperty("lowThreshold",e);this.setProperty("mediumThreshold",f);this.setProperty("lowMultiplier",g);this.setProperty("mediumMultiplier",h);this.setProperty("highMultiplier",m)};k["com.stencyl.graphics.shaders.BloomShader"]=Rn;Rn.__name__="com.stencyl.graphics.shaders.BloomShader";Rn.__super__=ed;Rn.prototype=u(ed.prototype,{__class__:Rn});var Sn=
function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=2);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\t//in attributes from our vertex shader\n\t\t\tvarying vec2 vTexCoord;\n\t\t\t\n\t\t\t//declare uniforms\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform vec2 uResolution;\n\t\t\t\n\t\t\tuniform float radius;\n\t\t\tuniform float dirx;\n\t\t\tuniform float diry;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\t//this will be our RGBA sum\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\n\t\t\t\t//our original texcoord for this fragment\n\t\t\t\tvec2 tc = vTexCoord;\n\t\t\t\n\t\t\t\t//the amount to blur, i.e. how far off center to sample from\n\t\t\t\t//1.0 -> blur by one pixel\n\t\t\t\t//2.0 -> blur by two pixels, etc.\n\t\t\t\tfloat blur = radius / uResolution.x;\n\t\t\t\n\t\t\t\t//the direction of our blur\n\t\t\t\t//(1.0, 0.0) -> x-axis blur\n\t\t\t\t//(0.0, 1.0) -> y-axis blur\n\t\t\t\tfloat hstep = dirx;\n\t\t\t\tfloat vstep = diry;\n\t\t\t\n\t\t\t\t//apply blurring, using a 9-tap filter with predefined gaussian weights\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 4.0*blur*hstep, tc.y - 4.0*blur*vstep)) * 0.0162162162;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 3.0*blur*hstep, tc.y - 3.0*blur*vstep)) * 0.0540540541;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 2.0*blur*hstep, tc.y - 2.0*blur*vstep)) * 0.1216216216;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 1.0*blur*hstep, tc.y - 1.0*blur*vstep)) * 0.1945945946;\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x, tc.y)) * 0.2270270270;\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 1.0*blur*hstep, tc.y + 1.0*blur*vstep)) * 0.1945945946;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 2.0*blur*hstep, tc.y + 2.0*blur*vstep)) * 0.1216216216;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 3.0*blur*hstep, tc.y + 3.0*blur*vstep)) * 0.0540540541;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 4.0*blur*hstep, tc.y + 4.0*blur*vstep)) * 0.0162162162;\n\t\t\t\n\t\t\t\t//discard alpha for our simple demo, multiply by vertex color and return\n\t\t\t\tgl_FragColor = vec4(sum.rgb, 1.0);\n\t\t\t}\n\t\t",
!0);this.setRadius(a);this.setDirectionX(b);this.setDirectionY(c)};k["com.stencyl.graphics.shaders.BlurShader"]=Sn;Sn.__name__="com.stencyl.graphics.shaders.BlurShader";Sn.__super__=ed;Sn.prototype=u(ed.prototype,{setRadius:function(a){this.setProperty("radius",a)},setDirectionX:function(a){this.setProperty("dirx",a)},setDirectionY:function(a){this.setProperty("diry",a)},__class__:Sn});var Jh=function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform float contrast;\n\t\t\tuniform float brightness;\n\t\t\tuniform float saturation;\n\n\t\t\tvec3 _mix(vec3 a, vec3 b, float amount) \n\t\t\t{ \n\t\t\t\treturn vec3(a.x * (1.0 - amount) + b.x * amount, a.y * (1.0 - amount) + b.y * amount, a.z * (1.0 - amount) + b.z * amount); \n\t\t\t}\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tconst vec3 luminanceCoefficient = vec3(0.2125, 0.7154, 0.0721);\n\t\t\t\tvec3 avgLuminance = vec3(0.5, 0.5, 0.5);\n\t\t\n\t\t\t\tvec3 brtColor = vec3(color.x * brightness, color.y * brightness, color.z * brightness);\n\t\t\t\tvec3 intensity = vec3(dot(brtColor, luminanceCoefficient));\n\t\t\t\tvec3 satColor = _mix(intensity, brtColor, saturation);\n\t\t\t\tvec3 conColor = _mix(avgLuminance, satColor, contrast);\n\t\t\n\t\t\t\tgl_FragColor = vec4(conColor, 1);\n\t\t\t}\n\t\t",
!0);this.setContrast(a);this.setBrightness(b);this.setSaturation(c)};k["com.stencyl.graphics.shaders.CSBShader"]=Jh;Jh.__name__="com.stencyl.graphics.shaders.CSBShader";Jh.create=function(a,b){null==b&&(b=1);null==a&&(a="contrast");return"contrast"==a?new Jh(b,1,1):"saturation"==a?new Jh(1,1,b):new Jh(1,b,1)};Jh.__super__=ed;Jh.prototype=u(ed.prototype,{setContrast:function(a){this.setProperty("contrast",a)},setBrightness:function(a){this.setProperty("brightness",a)},setSaturation:function(a){this.setProperty("saturation",
a)},__class__:Jh});var Tn=function(a){this.model=new nd(this,"assets/data/"+a)};k["com.stencyl.graphics.shaders.ExternalShader"]=Tn;Tn.__name__="com.stencyl.graphics.shaders.ExternalShader";Tn.__super__=ed;Tn.prototype=u(ed.prototype,{__class__:Tn});var Un=function(a,b,c,d,e){null==e&&(e=1);null==d&&(d=1.6);null==c&&(c=.6);null==b&&(b=!1);null==a&&(a=.05);this.model=new nd(this,"\n\t\t\t/*\n\t\t\t\tFilm Grain post-process shader v1.1\n\t\t\t\tMartins Upitis (martinsh) devlog-martinsh.blogspot.com\n\t\t\t*/\n\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tuniform sampler2D uImage0; //rendered scene sampler\n\t\t\tuniform vec2 uResolution; //scene sampler resolution\n\t\t\tuniform float uTime;\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\t\n\t\t\tconst float permTexUnit = 1.0/256.0;        // Perm texture texel-size\n\t\t\tconst float permTexUnitHalf = 0.5/256.0;    // Half perm texture texel-size\n\t\t\t\n\t\t\tfloat width;\n\t\t\tfloat height;\n\t\t\t\n\t\t\tuniform float grainamount; //grain amount\n\t\t\tuniform float colored; //colored noise?\n\t\t\tuniform float coloramount;\n\t\t\tuniform float grainsize; //grain particle size (1.5 - 2.5)\n\t\t\tuniform float lumamount; //\n\t\t\t\n\t\t\t//a random texture generator, but you can also use a pre-computed perturbation texture\n\t\t\tvec4 rnm(in vec2 tc)\n\t\t\t{\n\t\t\t\tfloat noise =  sin(dot(tc + vec2(uTime,uTime),vec2(12.9898,78.233))) * 43758.5453;\n\t\t\t\n\t\t\t\tfloat noiseR =  fract(noise)*2.0-1.0;\n\t\t\t\tfloat noiseG =  fract(noise*1.2154)*2.0-1.0;\n\t\t\t\tfloat noiseB =  fract(noise*1.3453)*2.0-1.0;\n\t\t\t\tfloat noiseA =  fract(noise*1.3647)*2.0-1.0;\n\t\t\t\n\t\t\t\treturn vec4(noiseR,noiseG,noiseB,noiseA);\n\t\t\t}\n\t\t\t\n\t\t\tfloat fade(in float t) {\n\t\t\t\treturn t*t*t*(t*(t*6.0-15.0)+10.0);\n\t\t\t}\n\t\t\t\n\t\t\tfloat pnoise3D(in vec3 p)\n\t\t\t{\n\t\t\t\tvec3 pi = permTexUnit*floor(p)+permTexUnitHalf; // Integer part, scaled so +1 moves permTexUnit texel\n\t\t\t\t// and offset 1/2 texel to sample texel centers\n\t\t\t\tvec3 pf = fract(p);     // Fractional part for interpolation\n\t\t\t\n\t\t\t\t// Noise contributions from (x=0, y=0), z=0 and z=1\n\t\t\t\tfloat perm00 = rnm(pi.xy).a ;\n\t\t\t\tvec3  grad000 = rnm(vec2(perm00, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n000 = dot(grad000, pf);\n\t\t\t\tvec3  grad001 = rnm(vec2(perm00, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n001 = dot(grad001, pf - vec3(0.0, 0.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=0, y=1), z=0 and z=1\n\t\t\t\tfloat perm01 = rnm(pi.xy + vec2(0.0, permTexUnit)).a ;\n\t\t\t\tvec3  grad010 = rnm(vec2(perm01, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n010 = dot(grad010, pf - vec3(0.0, 1.0, 0.0));\n\t\t\t\tvec3  grad011 = rnm(vec2(perm01, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n011 = dot(grad011, pf - vec3(0.0, 1.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=1, y=0), z=0 and z=1\n\t\t\t\tfloat perm10 = rnm(pi.xy + vec2(permTexUnit, 0.0)).a ;\n\t\t\t\tvec3  grad100 = rnm(vec2(perm10, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n100 = dot(grad100, pf - vec3(1.0, 0.0, 0.0));\n\t\t\t\tvec3  grad101 = rnm(vec2(perm10, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n101 = dot(grad101, pf - vec3(1.0, 0.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=1, y=1), z=0 and z=1\n\t\t\t\tfloat perm11 = rnm(pi.xy + vec2(permTexUnit, permTexUnit)).a ;\n\t\t\t\tvec3  grad110 = rnm(vec2(perm11, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n110 = dot(grad110, pf - vec3(1.0, 1.0, 0.0));\n\t\t\t\tvec3  grad111 = rnm(vec2(perm11, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n111 = dot(grad111, pf - vec3(1.0, 1.0, 1.0));\n\t\t\t\n\t\t\t\t// Blend contributions along x\n\t\t\t\tvec4 n_x = mix(vec4(n000, n001, n010, n011), vec4(n100, n101, n110, n111), fade(pf.x));\n\t\t\t\n\t\t\t\t// Blend contributions along y\n\t\t\t\tvec2 n_xy = mix(n_x.xy, n_x.zw, fade(pf.y));\n\t\t\t\n\t\t\t\t// Blend contributions along z\n\t\t\t\tfloat n_xyz = mix(n_xy.x, n_xy.y, fade(pf.z));\n\t\t\t\n\t\t\t\t// We're done, return the final noise value.\n\t\t\t\treturn n_xyz;\n\t\t\t}\n\t\t\t\n\t\t\t//2d coordinate orientation thing\n\t\t\tvec2 coordRot(in vec2 tc, in float angle)\n\t\t\t{\n\t\t\t\tfloat aspect = width/height;\n\t\t\t\tfloat rotX = ((tc.x*2.0-1.0)*aspect*cos(angle)) - ((tc.y*2.0-1.0)*sin(angle));\n\t\t\t\tfloat rotY = ((tc.y*2.0-1.0)*cos(angle)) + ((tc.x*2.0-1.0)*aspect*sin(angle));\n\t\t\t\trotX = ((rotX/aspect)*0.5+0.5);\n\t\t\t\trotY = rotY*0.5+0.5;\n\t\t\t\treturn vec2(rotX,rotY);\n\t\t\t}\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\twidth = uResolution.x;\n\t\t\t\theight = uResolution.y;\n\t\t\t\t\n\t\t\t\tvec2 texCoord = vTexCoord.st;\n\t\t\t\n\t\t\t\tvec3 rotOffset = vec3(1.425,3.892,5.835); //rotation offset values\n\t\t\t\tvec2 rotCoordsR = coordRot(texCoord, uTime + rotOffset.x);\n\t\t\t\tvec3 noise = vec3(pnoise3D(vec3(rotCoordsR*vec2(width/grainsize,height/grainsize),0.0)));\n\t\t\t\n\t\t\t\tif (colored == 1.0)\n\t\t\t\t{\n\t\t\t\t\tvec2 rotCoordsG = coordRot(texCoord, uTime + rotOffset.y);\n\t\t\t\t\tvec2 rotCoordsB = coordRot(texCoord, uTime + rotOffset.z);\n\t\t\t\t\tnoise.g = mix(noise.r,pnoise3D(vec3(rotCoordsG*vec2(width/grainsize,height/grainsize),1.0)),coloramount);\n\t\t\t\t\tnoise.b = mix(noise.r,pnoise3D(vec3(rotCoordsB*vec2(width/grainsize,height/grainsize),2.0)),coloramount);\n\t\t\t\t}\n\t\t\t\n\t\t\t\tvec3 col = texture2D(uImage0, texCoord).rgb;\n\t\t\t\n\t\t\t\t//noisiness response curve based on scene luminance\n\t\t\t\tvec3 lumcoeff = vec3(0.299,0.587,0.114);\n\t\t\t\tfloat luminance = mix(0.0,dot(col, lumcoeff),lumamount);\n\t\t\t\tfloat lum = smoothstep(0.2,0.0,luminance);\n\t\t\t\tlum += luminance;\n\t\t\t\n\t\t\t\n\t\t\t\tnoise = mix(noise,vec3(0.0),pow(lum,4.0));\n\t\t\t\tcol = col+noise*grainamount;\n\t\t\t\n\t\t\t\tgl_FragColor =  vec4(col,1.0);\n\t\t\t}\n\t\t",
!0);this.setGrainAmount(a);this.setColorAmount(c);this.setGrainSize(d);this.setLuminance(e);b?this.enableColor():this.disableColor()};k["com.stencyl.graphics.shaders.GrainShader"]=Un;Un.__name__="com.stencyl.graphics.shaders.GrainShader";Un.__super__=ed;Un.prototype=u(ed.prototype,{enableColor:function(){this.setProperty("colored",1)},disableColor:function(){this.setProperty("colored",0)},setGrainAmount:function(a){this.setProperty("grainamount",a)},setColorAmount:function(a){this.setProperty("coloramount",
a)},setGrainSize:function(a){this.setProperty("grainsize",a)},setLuminance:function(a){this.setProperty("lumamount",a)},__class__:Un});var Vn=function(){this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tfloat gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));\n\t\t\t\tgl_FragColor = vec4(gray, gray, gray, 1.0);\n\t\t\t}\n\t\t",
!0)};k["com.stencyl.graphics.shaders.GrayscaleShader"]=Vn;Vn.__name__="com.stencyl.graphics.shaders.GrayscaleShader";Vn.__super__=ed;Vn.prototype=u(ed.prototype,{__class__:Vn});var Wn=function(a,b){null==b&&(b=!0);null==a&&(a=0);b&&(a*=Math.PI/180);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float hue;\n\t\t\tconst mat3 rgb2yiq = mat3(0.299, 0.587, 0.114, 0.595716, -0.274453, -0.321263, 0.211456, -0.522591, 0.311135);\n\t\t\tconst mat3 yiq2rgb = mat3(1.0, 0.9563, 0.6210, 1.0, -0.2721, -0.6474, 1.0, -1.1070, 1.7046);\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tvec3 yColor = rgb2yiq * color; \n\n\t\t\t\tfloat originalHue = atan(yColor.b, yColor.g);\n\t\t\t\tfloat finalHue = originalHue + hue;\n\t\t\t\tfloat chroma = sqrt(yColor.b * yColor.b + yColor.g * yColor.g);\n\t\t\t\t\n\t\t\t\tvec3 yFinalColor = vec3(yColor.r, chroma * cos(finalHue), chroma * sin(finalHue));\n\t\t\t\tgl_FragColor = vec4(yiq2rgb * yFinalColor, 1.0);\n\t\t\t}\n\t\t",
!0);this.setHue(a,!1)};k["com.stencyl.graphics.shaders.HueShader"]=Wn;Wn.__name__="com.stencyl.graphics.shaders.HueShader";Wn.__super__=ed;Wn.prototype=u(ed.prototype,{setHue:function(a,b){null==b&&(b=!0);b&&(a*=Math.PI/180);this.setProperty("hue",a)},__class__:Wn});var Xn=function(a){this.model=new nd(this,a,!0)};k["com.stencyl.graphics.shaders.InlineShader"]=Xn;Xn.__name__="com.stencyl.graphics.shaders.InlineShader";Xn.__super__=ed;Xn.prototype=u(ed.prototype,{__class__:Xn});var Yn=function(){this.model=
new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tgl_FragColor = vec4(vec3(1.0, 1.0, 1.0) - color.rgb, color.a);\n\t\t\t}\n\t\t",!0)};k["com.stencyl.graphics.shaders.InvertShader"]=Yn;Yn.__name__="com.stencyl.graphics.shaders.InvertShader";Yn.__super__=ed;Yn.prototype=u(ed.prototype,{__class__:Yn});
var nd=function(a,b,c){null==c&&(c=!1);this.timeScale=1;this.time=0;ab.call(this);this.__drawableType=3;this.basicShader=a;this.gl=q.stage.__renderer.gl;this.uniforms=new ia;this.changedUniforms=[];this.uniformTweens=new ia;this.rebuild();a=this.gl.checkFramebufferStatus(36160);switch(a){case 36053:break;case 36054:Q.error("FRAMEBUFFER_INCOMPLETE_ATTACHMENT",{fileName:"com/stencyl/graphics/shaders/PostProcess.hx",lineNumber:113,className:"com.stencyl.graphics.shaders.PostProcess",methodName:"new"});
break;case 36061:Q.error("GL_FRAMEBUFFER_UNSUPPORTED",{fileName:"com/stencyl/graphics/shaders/PostProcess.hx",lineNumber:115,className:"com.stencyl.graphics.shaders.PostProcess",methodName:"new"});break;default:Q.error("Check frame buffer: "+a,{fileName:"com/stencyl/graphics/shaders/PostProcess.hx",lineNumber:118,className:"com.stencyl.graphics.shaders.PostProcess",methodName:"new"})}this.buffer=this.gl.createBuffer();this.gl.bindBuffer(34962,this.buffer);a=[-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,-1,1,0,1,
1,1,1,-1,1,0,1];a=null!=a?new Float32Array(a):null;$b.bufferData(this.gl,34962,a,35044);this.gl.bindBuffer(34962,null);if(c)this.fullScreenShader=new Dj([{src:"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}",fragment:!1},{src:b,fragment:!0}]);else if(6<b.length&&".glslx"==I.substr(b,-6,null)){c=ba.parse(va.getText(b)).firstElement();
if(c.nodeType!=ba.Document&&c.nodeType!=ba.Element)throw J.thrown("Invalid nodeType "+(null==c.nodeType?"null":Ga.toString(c.nodeType)));b=ks.resolve(c,"vertex")?Zr.get_innerData($r.resolve(c,"vertex")):"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}";c=Zr.get_innerData($r.resolve(c,"fragment"));this.fullScreenShader=
new Dj([{src:b,fragment:!1},{src:c,fragment:!0}])}else b=va.getText(b),this.fullScreenShader=new Dj([{src:"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}",fragment:!1},{src:b,fragment:!0}]);this.imageUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uImage0");this.timeUniform=t.context.getUniformLocation(this.fullScreenShader.program,
"uTime");this.resolutionUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uResolution");this.resolutionUsUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uResolutionUs");this.vertexSlot=t.context.getAttribLocation(this.fullScreenShader.program,"aVertex");this.texCoordSlot=t.context.getAttribLocation(this.fullScreenShader.program,"aTexCoord");this.addEventListener("renderOpenGL",r(this,this.renderGL))};k["com.stencyl.graphics.shaders.PostProcess"]=nd;nd.__name__=
"com.stencyl.graphics.shaders.PostProcess";nd.__properties__={get_vertices:"get_vertices",get_isSupported:"get_isSupported"};nd.get_isSupported=function(){if(!window.WebGLRenderingContext)return!1;if(null!=t.context)return!0;var a=window.document.createElement("canvas"),b=a.getContext("webgl");null==b&&(b=a.getContext("experimental-webgl"));return null!=b};nd.get_vertices=function(){return[-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,-1,1,0,1,1,1,1,-1,1,0,1]};nd.__super__=ab;nd.prototype=u(ab.prototype,{__added:null,
__initialized:null,gl:null,__enterFrame:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},renderGL:function(a){var b=a.renderer;if(null!=this.stage&&this.__renderable){a=q.stage;var c=a.context3D;b.__setBlendMode(null);null==this.basicShader.multipassTarget?c.setRenderToBackBuffer():c.setRenderToTexture(this.basicShader.multipassTarget.model.texture);c.clear();this.time+=q.elapsedTime*this.timeScale;t.context.useProgram(this.fullScreenShader.program);this.gl.enableVertexAttribArray(this.vertexSlot);
this.gl.enableVertexAttribArray(this.texCoordSlot);this.gl.activeTexture(33984);this.gl.bindTexture(3553,this.texture.__getTexture());"opengl"==a.window.context.type&&this.gl.enable(3553);this.gl.bindBuffer(34962,this.buffer);this.gl.vertexAttribPointer(this.vertexSlot,2,5126,!1,16,0);this.gl.vertexAttribPointer(this.texCoordSlot,2,5126,!1,16,8);this.gl.uniform1i(this.imageUniform,0);this.gl.uniform1f(this.timeUniform,this.time);this.gl.uniform2f(this.resolutionUniform,a.stageWidth|0,a.stageHeight|
0);this.gl.uniform2f(this.resolutionUsUniform,a.stageWidth/(q.SCALE*q.screenScaleX)|0,a.stageHeight/(q.SCALE*q.screenScaleY)|0);for(b=this.changedUniforms.length;0<b--;){var d=this.changedUniforms.pop();if(d.value instanceof Array){if(0!=d.value.length){var e=this.gl,f=d.id;d=d.value;d=null!=d?new Float32Array(d):null;e.uniform1fv(f,d)}}else this.gl.uniform1f(d.id,d.value)}this.gl.drawArrays(4,0,6);this.gl.bindBuffer(34962,null);"opengl"==a.window.context.type&&this.gl.disable(3553);this.gl.bindTexture(3553,
null);this.gl.disableVertexAttribArray(this.vertexSlot);this.gl.disableVertexAttribArray(this.texCoordSlot);c.__contextState.program=null;c.__flushGLProgram();c.__contextState.__currentGLElementArrayBuffer=null}},setUniform:function(a,b){if(Object.prototype.hasOwnProperty.call(this.uniforms.h,a))a=this.uniforms.h[a],a.value=b,this.changedUniforms.push(a);else{var c=t.context.getUniformLocation(this.fullScreenShader.program,a);c!=nd.UNIFORM_NOT_FOUND&&(b={id:c,value:b},this.uniforms.h[a]=b,this.changedUniforms.push(b))}},
getUniform:function(a){return Object.prototype.hasOwnProperty.call(this.uniforms.h,a)?this.uniforms.h[a].value:-1},tweenUniform:function(a,b,c,d){null==c&&(c=1);var e=this;if(Object.prototype.hasOwnProperty.call(this.uniforms.h,a)){var f=this.uniforms.h[a],g=this.uniformTweens.h[a];null==g&&(g=new we,g.doOnUpdate(function(){f.value=g.value;e.changedUniforms.push(f)}),this.uniformTweens.h[a]=g);g.tween(f.value,b,d,1E3*c|0)}},rebuild:function(){null!=this.texture&&this.texture.dispose();this.texture=
q.stage.context3D.createRectangleTexture(xa.windowWidth|0,xa.windowHeight|0,1,!0);this.texture.__context.__bindGLTexture2D(this.texture.__textureID);this.texture.__setSamplerState(new Ng);$b.texImage2D(this.gl,this.texture.__textureTarget,0,this.texture.__internalFormat,this.texture.__width,this.texture.__height,0,this.gl.RGB,this.gl.UNSIGNED_BYTE,null);this.texture.__context.__bindGLTexture2D(null)},createTexture:function(a,b){this.texture=q.stage.context3D.createRectangleTexture(a,b,1,!0);this.texture.__context.__bindGLTexture2D(this.texture.__textureID);
this.texture.__setSamplerState(new Ng);$b.texImage2D(this.gl,this.texture.__textureTarget,0,this.texture.__internalFormat,this.texture.__width,this.texture.__height,0,this.gl.RGB,this.gl.UNSIGNED_BYTE,null);this.texture.__context.__bindGLTexture2D(null)},capture:function(){q.stage.context3D.setRenderToTexture(this.texture);var a=this.texture.__getGLFramebuffer(!1,0,0);this.gl.bindFramebuffer(36160,a);this.gl.clear(16640);null!=q.stage&&null!=q.stage.__renderer&&(q.stage.__renderer.__cleared=!0)},
texture:null,fullScreenShader:null,buffer:null,basicShader:null,time:null,timeScale:null,vertexSlot:null,texCoordSlot:null,imageUniform:null,resolutionUniform:null,resolutionUsUniform:null,timeUniform:null,uniforms:null,changedUniforms:null,uniformTweens:null,__class__:nd});var Zn=function(a){null==a&&(a=1);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform vec2 uResolution;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float scale;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\tif (mod(floor(vTexCoord.y * uResolution.y / scale), 2.0) == 0.0)\n\t\t\t\t\tgl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n\t\t\t\telse\n\t\t\t\t\tgl_FragColor = texture2D(uImage0, vTexCoord);\n\t\t\t}\n\t\t",
!0);this.setScale(a)};k["com.stencyl.graphics.shaders.ScanlineShader"]=Zn;Zn.__name__="com.stencyl.graphics.shaders.ScanlineShader";Zn.__super__=ed;Zn.prototype=u(ed.prototype,{setScale:function(a){this.setProperty("scale",a)},__class__:Zn});var $n=function(){this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tgl_FragColor.r = dot(color, vec4(0.393,0.769,0.189,0));\n\t\t\t\tgl_FragColor.g = dot(color, vec4(0.349,0.686,0.168,0));\n\t\t\t\tgl_FragColor.b = dot(color, vec4(0.272,0.534,0.131,0));\n\t\t\t\tgl_FragColor.a = color.a;\n\t\t\t}\n\t\t",
!0)};k["com.stencyl.graphics.shaders.SepiaShader"]=$n;$n.__name__="com.stencyl.graphics.shaders.SepiaShader";$n.__super__=ed;$n.prototype=u(ed.prototype,{__class__:$n});var Dj=function(a){this.program=t.context.createProgram();for(var b=0;b<a.length;){var c=a[b];++b;c=this.compile(c.src,c.fragment?35632:35633);if(null==c)return;t.context.attachShader(this.program,c);t.context.deleteShader(c)}t.context.linkProgram(this.program);0==t.context.getProgramParameter(this.program,35714)&&(Q.error(t.context.getProgramInfoLog(this.program),
{fileName:"com/stencyl/graphics/shaders/Shader.hx",lineNumber:62,className:"com.stencyl.graphics.shaders.Shader",methodName:"new"}),Q.error("VALIDATE_STATUS: "+A.string(t.context.getProgramParameter(this.program,35715)),{fileName:"com/stencyl/graphics/shaders/Shader.hx",lineNumber:63,className:"com.stencyl.graphics.shaders.Shader",methodName:"new"}),Q.error("ERROR: "+t.context.getError(),{fileName:"com/stencyl/graphics/shaders/Shader.hx",lineNumber:64,className:"com.stencyl.graphics.shaders.Shader",
methodName:"new"}))};k["com.stencyl.graphics.shaders.Shader"]=Dj;Dj.__name__="com.stencyl.graphics.shaders.Shader";Dj.prototype={compile:function(a,b){b=t.context.createShader(b);t.context.shaderSource(b,a);t.context.compileShader(b);return 0==t.context.getShaderParameter(b,35713)?(Q.error(t.context.getShaderInfoLog(b),{fileName:"com/stencyl/graphics/shaders/Shader.hx",lineNumber:82,className:"com.stencyl.graphics.shaders.Shader",methodName:"compile"}),Q.error("From source:\n"+a,{fileName:"com/stencyl/graphics/shaders/Shader.hx",
lineNumber:83,className:"com.stencyl.graphics.shaders.Shader",methodName:"compile"}),null):b},attribute:function(a){return t.context.getAttribLocation(this.program,a)},uniform:function(a){return t.context.getUniformLocation(this.program,a)},bind:function(){t.context.useProgram(this.program)},program:null,__class__:Dj};var ao=function(a){null==a&&(a=2);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform vec2 uResolution;\n\t\t\t\n\t\t\tuniform float amount;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\t//this will be our RGBA sum\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\t\n\t\t\t\t//our original texcoord for this fragment\n\t\t\t\tvec2 tc = vTexCoord;\n\t\t\t\t\n\t\t\t\tfloat reach = 1.0 / uResolution.x;\n\n\t\t\t\t//current pixel\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x, tc.y));\n\t\t\t\t\n\t\t\t\t//sharpen\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x + 1.0 * reach, tc.y))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x - 1.0 * reach, tc.y))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x, tc.y + 1.0 * reach))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x, tc.y - 1.0 * reach))) * amount;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4(sum.rgb, 1.0);\n\t\t\t}\n\t\t",
!0);this.setAmount(a)};k["com.stencyl.graphics.shaders.SharpenShader"]=ao;ao.__name__="com.stencyl.graphics.shaders.SharpenShader";ao.__super__=ed;ao.prototype=u(ed.prototype,{setAmount:function(a){this.setProperty("amount",a)},__class__:ao});var bo=function(a,b){null==b&&(b=1);this.model=new nd(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform float amount;\n\t\t\tuniform float red;\n\t\t\tuniform float green;\n\t\t\tuniform float blue;\n\n\t\t\tvec3 _mix(vec3 a, vec3 b, float amount) \n\t\t\t{ \n\t\t\t\treturn vec3(a.x * (1.0 - amount) + b.x * amount, a.y * (1.0 - amount) + b.y * amount, a.z * (1.0 - amount) + b.z * amount); \n\t\t\t}\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tvec3 endColor = _mix(color, vec3(red, green, blue), amount);\n\t\t\t\tgl_FragColor = vec4(endColor.x, endColor.y, endColor.z, 1);\n\t\t\t}\n\t\t",
!0);this.setColor(a);this.setAmount(b)};k["com.stencyl.graphics.shaders.TintShader"]=bo;bo.__name__="com.stencyl.graphics.shaders.TintShader";bo.__super__=ed;bo.prototype=u(ed.prototype,{setAmount:function(a){this.setProperty("amount",a)},setColor:function(a){this.setProperty("red",(a>>16&255)/255);this.setProperty("green",(a>>8&255)/255);this.setProperty("blue",(a&255)/255)},__class__:bo});var kb=function(a){this.duration=a;this.complete=this.active=!1;0==a&&(this.active=this.complete=!0)};k["com.stencyl.graphics.transitions.Transition"]=
kb;kb.__name__="com.stencyl.graphics.transitions.Transition";kb.prototype={duration:null,direction:null,active:null,complete:null,start:function(){},reset:function(){this.complete=!1},stop:function(){this.complete=!0},deactivate:function(){this.active=!1},cleanup:function(){},isActive:function(){return this.active},isComplete:function(){return this.complete},update:function(a){},draw:function(a){},getDuration:function(){return this.duration},__class__:kb};var uj=function(a,b,c,d){null==c&&(c=10);
kb.call(this,b);this.color=d;this.direction=a;this.numBlinds=c;a==kb.IN?(this.beginBlindWidth=q.screenWidth*q.SCALE/c,this.endBlindWidth=0):a==kb.OUT?(this.beginBlindWidth=0,this.endBlindWidth=q.screenWidth*q.SCALE/c):(Q.error("Invalid transition direction: "+a,{fileName:"com/stencyl/graphics/transitions/BlindsTransition.hx",lineNumber:47,className:"com.stencyl.graphics.transitions.BlindsTransition",methodName:"new"}),this.complete=!0)};k["com.stencyl.graphics.transitions.BlindsTransition"]=uj;uj.__name__=
"com.stencyl.graphics.transitions.BlindsTransition";uj.__super__=kb;uj.prototype=u(kb.prototype,{color:null,numBlinds:null,blindWidth:null,beginBlindWidth:null,endBlindWidth:null,blindRect:null,rect:null,graphics:null,start:function(){this.active=!0;this.blindRect=new fa(0,0,this.beginBlindWidth,q.screenHeight*q.SCALE);this.blindWidth=new we;this.rect=new Ke;this.graphics=this.rect.get_graphics();this.direction==kb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,q.screenWidth*
q.SCALE,q.screenHeight*q.SCALE),this.graphics.endFill());q.engine.transitionLayer.addChild(this.rect);this.blindWidth.tween(this.beginBlindWidth,this.endBlindWidth,pb.linear,1E3*this.duration|0).doOnComplete(r(this,this.stop))},draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);this.blindRect.x=0;this.blindRect.width=this.blindWidth.value;this.direction==kb.IN&&(this.blindRect.x+=q.screenWidth*q.SCALE/this.numBlinds-this.blindWidth.value);a=0;for(var b=this.numBlinds;a<b;)a++,
this.graphics.drawRect(this.blindRect.x,this.blindRect.y,this.blindRect.width,this.blindRect.height),this.blindRect.x+=q.screenWidth*q.SCALE/this.numBlinds;this.graphics.endFill()},cleanup:function(){null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:uj});var tj=function(a,b,c,d){null==d&&(d=-16777216);null==c&&(c=50);kb.call(this,b);this.color=d;this.direction=a;this.numBubbles=c};k["com.stencyl.graphics.transitions.BubblesTransition"]=tj;tj.__name__="com.stencyl.graphics.transitions.BubblesTransition";
tj.__super__=kb;tj.prototype=u(kb.prototype,{color:null,numBubbles:null,radius:null,beginRadius:null,endRadius:null,rect:null,graphics:null,drawBitmap:null,bubblePositions:null,bubbleRect:null,screenWidth:null,screenHeight:null,start:function(){this.active=!0;this.rect=new Ke;this.graphics=this.rect.get_graphics();this.screenWidth=q.screenWidth*q.SCALE|0;this.screenHeight=q.screenHeight*q.SCALE|0;this.direction==kb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,this.screenWidth,
this.screenHeight),this.graphics.endFill());this.drawBitmap=new La(this.screenWidth,this.screenHeight);var a=this.screenWidth/this.screenHeight,b=Math.sqrt(this.numBubbles/a)|0,c=this.screenHeight/b;a=Math.ceil(b*a|0);b=Math.ceil(b);var d=a*c-this.screenWidth|0,e=new fa(-d/2,-(b*c-this.screenHeight|0)/2,c,c);this.bubblePositions=[];for(var f=0;f<b;){f++;for(var g=0,h=a;g<h;)g++,this.bubblePositions.push(new pa(e.x+Math.floor(Math.random()*(c+1)),e.y+Math.floor(Math.random()*(c+1)))),e.x+=c;e.x=-d/
2;e.y+=c}this.beginRadius=0;this.endRadius=Math.ceil(pa.distance(new pa(0,0),new pa(c,c)));this.radius=new we;q.engine.transitionLayer.addChild(this.rect);this.radius.tween(this.beginRadius,this.endRadius,pb.linear,1E3*this.duration|0).doOnComplete(r(this,this.stop))},draw:function(a){this.graphics.clear();if(this.direction==kb.IN){this.drawBitmap.draw(q.engine.colorLayer);this.drawBitmap.draw(q.engine.master);this.graphics.beginFill(this.color);this.graphics.drawRect(0,0,this.screenWidth,this.screenHeight);
this.graphics.endFill();a=0;for(var b=this.bubblePositions;a<b.length;){var c=b[a];++a;this.graphics.beginBitmapFill(this.drawBitmap);this.graphics.drawCircle(c.x,c.y,this.radius.value);this.graphics.endFill()}}else if(this.direction==kb.OUT)for(a=0,b=this.bubblePositions;a<b.length;)c=b[a],++a,this.graphics.beginFill(this.color),this.graphics.drawCircle(c.x,c.y,this.radius.value),this.graphics.endFill()},cleanup:function(){null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),this.rect=
null)},__class__:tj});var wj=function(a,b,c){null==c&&(c=-16777216);kb.call(this,b);this.color=c;this.direction=a;a==kb.IN?(this.beginRadius=0,this.endRadius=Math.ceil(pa.distance(new pa(0,0),new pa(q.screenWidthHalf*q.SCALE,q.screenHeightHalf*q.SCALE)))|0):a==kb.OUT&&(this.beginRadius=Math.ceil(pa.distance(new pa(0,0),new pa(q.screenWidthHalf*q.SCALE,q.screenHeightHalf*q.SCALE)))|0,this.endRadius=0)};k["com.stencyl.graphics.transitions.CircleTransition"]=wj;wj.__name__="com.stencyl.graphics.transitions.CircleTransition";
wj.__super__=kb;wj.prototype=u(kb.prototype,{color:null,radius:null,beginRadius:null,endRadius:null,circleImg:null,s:null,start:function(){this.active=!0;this.s=new Ke;this.circleImg=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.radius=new we;if(this.direction==kb.IN){var a=this.s.get_graphics();a.beginFill(this.color);a.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);a.endFill()}q.engine.transitionLayer.addChild(this.s);this.radius.tween(this.beginRadius,this.endRadius,
pb.linear,1E3*this.duration|0).doOnComplete(r(this,this.stop))},draw:function(a){this.s.get_graphics().clear();this.s.get_graphics().beginFill(this.color);this.s.get_graphics().drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);this.s.get_graphics().endFill();this.circleImg.draw(q.engine.colorLayer);this.circleImg.draw(q.engine.master);this.s.get_graphics().beginBitmapFill(this.circleImg);this.s.get_graphics().drawCircle(q.screenWidthHalf*q.SCALE,q.screenHeightHalf*q.SCALE,this.radius.value);
this.s.get_graphics().endFill()},cleanup:function(){null!=this.s&&(q.engine.transitionLayer.removeChild(this.s),this.s=null)},__class__:wj});var Zk=function(a,b){kb.call(this,b);this.oldImg=a};k["com.stencyl.graphics.transitions.CrossfadeTransition"]=Zk;Zk.__name__="com.stencyl.graphics.transitions.CrossfadeTransition";Zk.__super__=kb;Zk.prototype=u(kb.prototype,{oldImg:null,bitmap:null,rect:null,rectAlpha:null,start:function(){this.active=!0;this.bitmap=new La(q.screenWidth*q.SCALE|0,q.screenHeight*
q.SCALE|0);this.bitmap.draw(this.oldImg);this.rect=new Ke;var a=this.rect.get_graphics();a.beginBitmapFill(this.bitmap);a.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);a.endFill();q.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new we;this.rectAlpha.tween(1,0,pb.linear,1E3*this.duration|0).doOnComplete(r(this,this.stop))},update:function(a){this.rect.set_alpha(this.rectAlpha.value)},draw:function(a){},cleanup:function(){this.bitmap=this.oldImg=null;null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),
this.rect=null)},__class__:Zk});var al=function(a,b){null==b&&(b=-16777216);kb.call(this,a);this.color=b;this.direction=kb.IN};k["com.stencyl.graphics.transitions.FadeInTransition"]=al;al.__name__="com.stencyl.graphics.transitions.FadeInTransition";al.__super__=kb;al.prototype=u(kb.prototype,{color:null,rect:null,rectAlpha:null,start:function(){this.active=!0;this.rect=new Ke;var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,q.screenWidth*q.SCALE+4,q.screenHeight*q.SCALE+4);a.endFill();
a.drawCircle(1,1,1);q.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new we;this.rectAlpha.tween(1,0,pb.linear,1E3*this.duration|0).doOnComplete(r(this,this.stop))},update:function(a){this.rect.set_alpha(this.rectAlpha.value)},cleanup:function(){null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:al});var $k=function(a,b){null==b&&(b=-16777216);kb.call(this,a);this.color=b;this.direction=kb.IN};k["com.stencyl.graphics.transitions.FadeOutTransition"]=
$k;$k.__name__="com.stencyl.graphics.transitions.FadeOutTransition";$k.__super__=kb;$k.prototype=u(kb.prototype,{color:null,rect:null,rectAlpha:null,start:function(){this.active=!0;this.rect=new Ke;this.rect.set_alpha(0);var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,q.screenWidth*q.SCALE+4,q.screenHeight*q.SCALE+4);a.endFill();a.drawCircle(1,1,1);q.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new we;this.rectAlpha.tween(0,1,pb.linear,1E3*this.duration|0).doOnComplete(r(this,
this.stop))},update:function(a){this.rect.set_alpha(this.rectAlpha.value)},cleanup:function(){null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:$k});var sj=function(a,b,c){kb.call(this,a);this.beginPixelSize=b;this.endPixelSize=c};k["com.stencyl.graphics.transitions.PixelizeTransition"]=sj;sj.__name__="com.stencyl.graphics.transitions.PixelizeTransition";sj.__super__=kb;sj.prototype=u(kb.prototype,{pixelSizeTween:null,beginPixelSize:null,endPixelSize:null,
srcImg:null,displayImg:null,displayBitmap:null,c:null,r:null,xOverflow:null,yOverflow:null,pixelRect:null,halfSize:null,start:function(){this.active=!0;this.srcImg=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.displayImg=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.pixelRect=new fa(0,0,0,0);q.engine.transitionLayer.addChild(this.displayBitmap=new dd(this.displayImg));this.pixelSizeTween=new we;this.pixelSizeTween.tween(this.beginPixelSize,this.endPixelSize,pb.linear,
1E3*this.duration|0).doOnComplete(r(this,this.stop))},draw:function(a){a=this.pixelSizeTween.value|0;if(1==a)this.displayImg.draw(q.engine.colorLayer),this.displayImg.draw(q.engine.master);else{this.srcImg.draw(q.engine.colorLayer);this.srcImg.draw(q.engine.master);this.c=Math.ceil(q.screenWidth*q.SCALE/a);this.r=Math.ceil(q.screenHeight*q.SCALE/a);this.xOverflow=this.c*a-q.screenWidth*q.SCALE|0;this.yOverflow=this.r*a-q.screenHeight*q.SCALE|0;this.pixelRect.x=-this.xOverflow/2;this.pixelRect.y=-this.yOverflow/
2;this.pixelRect.height=this.pixelRect.width=a;this.halfSize=a/2|0;this.displayImg.lock();for(var b=0,c=this.r;b<c;){b++;for(var d=0,e=this.c;d<e;){d++;var f=this.srcImg.getPixel32(this.pixelRect.x+this.halfSize|0,this.pixelRect.y+this.halfSize|0);for(var g=this.pixelRect.x|0,h=this.pixelRect.x+this.pixelRect.width|0;g<h;)for(var m=g++,l=this.pixelRect.y|0,n=this.pixelRect.y+this.pixelRect.height|0;l<n;){var p=l++;this.displayImg.setPixel32(m,p,f)}this.pixelRect.x+=a}this.pixelRect.x=-this.xOverflow/
2;this.pixelRect.y+=a}this.displayImg.unlock()}},cleanup:function(){null!=this.displayBitmap&&q.engine.transitionLayer.removeChild(this.displayBitmap)},__class__:sj});var vj=function(a,b,c){kb.call(this,b);this.color=c;this.direction=a;a==kb.IN?(this.beginHeight=this.beginWidth=0,this.endWidth=q.screenWidth*q.SCALE|0,this.endHeight=q.screenHeight*q.SCALE|0):a==kb.OUT?(this.beginWidth=q.screenWidth*q.SCALE|0,this.beginHeight=q.screenHeight*q.SCALE|0,this.endHeight=this.endWidth=0):(Q.error("Invalid transition direction: "+
a,{fileName:"com/stencyl/graphics/transitions/RectangleTransition.hx",lineNumber:52,className:"com.stencyl.graphics.transitions.RectangleTransition",methodName:"new"}),this.complete=!0)};k["com.stencyl.graphics.transitions.RectangleTransition"]=vj;vj.__name__="com.stencyl.graphics.transitions.RectangleTransition";vj.__super__=kb;vj.prototype=u(kb.prototype,{rectangleImg:null,graphics:null,color:null,size:null,beginWidth:null,endWidth:null,beginHeight:null,endHeight:null,rect:null,start:function(){this.active=
!0;this.size=new Lf;this.rectangleImg=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.rect=new Ke;this.graphics=this.rect.get_graphics();this.direction==kb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE),this.graphics.endFill());q.engine.transitionLayer.addChild(this.rect);this.size.onComplete=r(this,this.stop);this.size.tween(this.beginWidth,this.endWidth,this.beginHeight,this.endHeight,pb.linear,1E3*this.duration|0)},
draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);this.graphics.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);this.graphics.endFill();this.rectangleImg.draw(q.engine.colorLayer);this.rectangleImg.draw(q.engine.master);this.graphics.beginBitmapFill(this.rectangleImg);this.graphics.drawRect((q.screenWidth*q.SCALE-this.size.value1)/2,(q.screenHeight*q.SCALE-this.size.value2)/2,this.size.value1,this.size.value2);this.graphics.endFill()},cleanup:function(){null!=this.rect&&
(q.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:vj});var Ne=function(a,b,c,d){kb.call(this,c);this.sceneSpr=a;this.sceneCol=b;this.oldSceneMatrix=new wa;this.newSceneMatrix=new wa;this.ty=this.tx=0;d==Ne.SLIDE_UP?(this.newSceneMatrix.ty=-q.screenHeight*q.SCALE,this.ty=q.screenHeight*q.SCALE):d==Ne.SLIDE_DOWN?(this.newSceneMatrix.ty=q.screenHeight*q.SCALE,this.ty=-q.screenHeight*q.SCALE):d==Ne.SLIDE_LEFT?(this.newSceneMatrix.tx=-q.screenWidth*q.SCALE,this.tx=q.screenWidth*
q.SCALE):d==Ne.SLIDE_RIGHT?(this.newSceneMatrix.tx=q.screenWidth*q.SCALE,this.tx=-q.screenWidth*q.SCALE):(Q.error("Invalid slide direction: "+d,{fileName:"com/stencyl/graphics/transitions/SlideTransition.hx",lineNumber:71,className:"com.stencyl.graphics.transitions.SlideTransition",methodName:"new"}),this.complete=!0)};k["com.stencyl.graphics.transitions.SlideTransition"]=Ne;Ne.__name__="com.stencyl.graphics.transitions.SlideTransition";Ne.__super__=kb;Ne.prototype=u(kb.prototype,{sceneSpr:null,sceneCol:null,
oldBitmap:null,newBitmap:null,drawBitmap:null,graphics:null,oldSceneMatrix:null,newSceneMatrix:null,osm_xy:null,nsm_xy:null,tx:null,ty:null,rect:null,start:function(){this.active=!0;this.oldBitmap=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.oldBitmap.draw(this.sceneCol);this.oldBitmap.draw(this.sceneSpr);this.newBitmap=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.drawBitmap=new La(q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);this.rect=new Ke;this.graphics=this.rect.get_graphics();
this.graphics.beginBitmapFill(this.oldBitmap);this.graphics.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);this.graphics.endFill();q.engine.transitionLayer.addChild(this.rect);this.osm_xy=new Lf;this.nsm_xy=new Lf;this.osm_xy.tween(this.oldSceneMatrix.tx,this.tx,this.oldSceneMatrix.ty,this.ty,pb.linear,1E3*this.duration|0);this.nsm_xy.tween(this.newSceneMatrix.tx,0,this.newSceneMatrix.ty,0,pb.linear,1E3*this.duration|0);this.nsm_xy.doOnComplete(r(this,this.stop))},update:function(a){this.oldSceneMatrix.tx=
this.osm_xy.value1;this.oldSceneMatrix.ty=this.osm_xy.value2;this.newSceneMatrix.tx=this.nsm_xy.value1;this.newSceneMatrix.ty=this.nsm_xy.value2},draw:function(a){this.graphics.clear();this.newBitmap.draw(this.sceneCol);this.newBitmap.draw(this.sceneSpr);this.drawBitmap.draw(this.newBitmap,this.newSceneMatrix);this.drawBitmap.draw(this.oldBitmap,this.oldSceneMatrix);this.graphics.beginBitmapFill(this.drawBitmap);this.graphics.drawRect(0,0,q.screenWidth*q.SCALE,q.screenHeight*q.SCALE);this.graphics.endFill()},
cleanup:function(){this.sceneSpr=null;null!=this.rect&&(q.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Ne});var Og=function(){};k["com.stencyl.io.AbstractReader"]=Og;Og.__name__="com.stencyl.io.AbstractReader";Og.__isInterface__=!0;Og.prototype={accepts:null,read:null,__class__:Og};var Sk=function(){};k["com.stencyl.io.ActorTypeReader"]=Sk;Sk.__name__="com.stencyl.io.ActorTypeReader";Sk.__interfaces__=[Og];Sk.prototype={accepts:function(a){return a==Pa.MBS_ACTOR_TYPE.getName()},
read:function(a){var b=a.getId(),c=a.getAtlasID(),d=a.getName(),e=new ji;e.fixedRotation=a.getFixedRotation();switch(a.getBodyType()){case 0:var f=oa.b2_staticBody;break;case 1:f=oa.b2_kinematicBody;break;default:f=oa.b2_dynamicBody}e.type=f;e.linearDamping=a.getLinearDamping();e.angularDamping=a.getAngularDamping();e.friction=a.getFriction();e.bounciness=a.getRestitution();e.mass=a.getMass();e.aMass=a.getInertia();e.active=!0;e.bullet=!1;e.allowSleep=!1;e.awake=!0;e.ignoreGravity=a.getIgnoreGravity();
e.bullet=a.getContinuous();f=a.getSprite();var g=a.getGroupID(),h=a.getPhysicsMode(),m=a.getAutoScale(),l=a.getPausable(),n=e.ignoreGravity||e.type==oa.b2_staticBody||e.type==oa.b2_kinematicBody,p=oe.readBehaviors(a.getSnippets());a=a.getEventSnippetID();if(-1<a){var q=new zj(a,new ia);p.h[""+a]=q}return new eg(b,c,d,g,f,p,e,h,m,l,n)},__class__:Sk};var oe=function(){};k["com.stencyl.io.AttributeValues"]=oe;oe.__name__="com.stencyl.io.AttributeValues";oe.readBehaviors=function(a){for(var b=new ia,
c=0,d=a.length();c<d;){c++;var e=a.getNextObject();if(e.getEnabled()){var f=e.getId();e=oe.readBehaviorProperties(e.getProperties());e=new zj(f,e);b.h[""+f]=e}}return b};oe.readBehaviorProperties=function(a){for(var b=new ia,c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getId(),g=e.getType();e=oe.readAttribute(g,e);b.h[""+f]=e}return b};oe.readAttribute=function(a,b){switch(a){case "list":return oe.readList(b.getValue());case "map":return oe.readMap(b.getValue());default:return b.getValue()}};
oe.readAttributeDef=function(a,b){switch(a){case "list":return oe.readList(b.getDefaultValue());case "map":return oe.readMap(b.getDefaultValue());default:return b.getDefaultValue()}};oe.readList=function(a){if(null==a)return null;for(var b=[],c=0,d=a.length();c<d;){var e=c++;b[e]=a.readObject()}return b};oe.readMap=function(a){if(null==a)return null;for(var b=new ia,c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getKey();e=e.getValue();if(e instanceof nh){for(var g=[],h=0,m=e.length();h<m;)h++,
g.push(e.readObject());e=g}else e instanceof bb&&(e=oe.readMap(e));b.h[f]=e}return b};var Pk=function(){};k["com.stencyl.io.BackgroundReader"]=Pk;Pk.__name__="com.stencyl.io.BackgroundReader";Pk.__interfaces__=[Og];Pk.prototype={accepts:function(a){return a==nb.MBS_BACKGROUND.getName()},read:function(a){var b=a.getId(),c=a.getAtlasID(),d=a.getName(),e=a.getXVelocity(),f=a.getYVelocity(),g=a.getXParallaxFactor(),h=a.getYParallaxFactor(),m=[];if(0<a.getNumFrames())for(var l=a.getDurations(),n=0,p=l.length();n<
p;)n++,m.push(l.readInt());a=a.getRepeats();return 0!=e||0!=f?new oh(b,c,d,m,g,h,a,e,f):new xg(b,c,d,m,g,h,a)},__class__:Pk};var ni=function(){};k["com.stencyl.io.BehaviorReader"]=ni;ni.__name__="com.stencyl.io.BehaviorReader";ni.readBehavior=function(a){var b=a.getId(),c=a.getName(),d=a.getPackageName()+"."+a.getClassname(),e=a.getAttachedEvent(),f=new ia,g=a.getType();a=a.getAttributes();for(var h=0,m=a.length();h<m;){h++;var l=a.getNextObject(),n=""+l.getId();l=ni.readAttribute(l,e);f.h[n]=l}return new Vk(null,
null,b,c,d,!0,!0,f,g,e)};ni.readAttribute=function(a,b){var c=a.getId(),d=a.getName(),e=a.getFullname();b=b||a.getHidden();var f=a.getType();a=oe.readAttributeDef(f,a);return new oi(c,d,e,a,f,null,b)};ni.prototype={__class__:ni};var Uk=function(){};k["com.stencyl.io.FontReader"]=Uk;Uk.__name__="com.stencyl.io.FontReader";Uk.__interfaces__=[Og];Uk.prototype={accepts:function(a){return a==dc.MBS_FONT.getName()},read:function(a){return new Af(a.getId(),a.getAtlasID(),a.getName(),!1)},__class__:Uk};var sd=
function(){};k["com.stencyl.io.ShapeReader"]=sd;sd.__name__="com.stencyl.io.ShapeReader";sd.readPoint=function(a){return new pa(a.getX(),a.getY())};sd.readPoints=function(a){for(var b=Array(a.length()),c=0,d=a.length();c<d;){var e=c++,f=a.getNextObject();b[e]=new pa(f.getX(),f.getY())}return b};sd.createCircle=function(a,b,c,d,e){null==e&&(e=-1);null==d&&(d=-1);var f=2*a,g=new Lc;g.m_radius=q.toPhysicalUnits(a);g.m_p.x=q.toPhysicalUnits(b-(d-f)/2);g.m_p.y=q.toPhysicalUnits(c-(e-f)/2);return g};sd.createPolygon=
function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);var e=[];var f=b.length;var g=0;c=-c/2|0;d=-d/2|0;if("MbsPolygon"==a||"MbsPolyRegion"==a){for(g=0;g<f;){var h=b[g];a=q.toPhysicalUnits(h.x+c);h=q.toPhysicalUnits(h.y+d);e[g]=new y(a,h);++g}sd.EnsureCorrectVertexDirection(e);return Db.asArray(e,e.length)}if("MbsWireframe"==a){for(;g<f;)h=b[g],e.push(new y(q.toPhysicalUnits(h.x),q.toPhysicalUnits(h.y))),++g;b=sd.getWidth(e);f=sd.getHeight(e);g=[];c=0;for(d=e.length+1;c<d;){var m=c++;a=new rg(e[m%e.length],
e[(m+1)%e.length]);g.push(a);a.m_hasVertex0=!0;a.m_hasVertex3=!0;h=e[(m-1)%e.length];m=e[(m+2)%e.length];null==h&&(h=e[e.length-1]);null==m&&(m=e[0]);a.m_v0=h;a.m_v3=m}e=new Xa;e.h[0]=g;e.h[1]=b;e.h[2]=f;return e}return null};sd.CheckVertexDirection=function(a){if(2<a.length){for(var b=0,c=0;0==b&&c<a.length-2;)b=a[c].winding(a[c+1],a[c+2]),++c;if(0>b)return!1}return!0};sd.EnsureCorrectVertexDirection=function(a){return sd.CheckVertexDirection(a)?!0:(Q.verbose("HAD TO REVERSE VERTICES: "+A.string(a),
{fileName:"com/stencyl/io/ShapeReader.hx",lineNumber:200,className:"com.stencyl.io.ShapeReader",methodName:"EnsureCorrectVertexDirection"}),sd.ReverseVertices(a),!1)};sd.ReverseVertices=function(a){for(var b=0,c=a.length-1,d;c>b;)d=a[b].x,a[b].x=a[c].x,a[c].x=d,d=a[b].y,a[b].y=a[c].y,a[c].y=d,++b,--c};sd.getWidth=function(a){for(var b=1E7,c=0,d=0;d<a.length;){var e=a[d];++d;b=Math.min(b,e.x);c=Math.max(c,e.x)}return c-b};sd.getHeight=function(a){for(var b=1E7,c=0,d=0;d<a.length;){var e=a[d];++d;b=
Math.min(b,e.y);c=Math.max(c,e.y)}return c-b};var Qk=function(){};k["com.stencyl.io.SoundReader"]=Qk;Qk.__name__="com.stencyl.io.SoundReader";Qk.__interfaces__=[Og];Qk.prototype={accepts:function(a){return a==sc.MBS_MUSIC.getName()},read:function(a){var b=a.getStream(),c=a.getLoop(),d=a.getPan(),e=a.getVolume(),f=a.getType();return new Hh(a.getId(),a.getName(),b,c,d,e,f,a.getAtlasID())},__class__:Qk};var Tk=function(){};k["com.stencyl.io.SpriteReader"]=Tk;Tk.__name__="com.stencyl.io.SpriteReader";
Tk.__interfaces__=[Og];Tk.prototype={accepts:function(a){return a==rc.MBS_SPRITE.getName()},read:function(a){var b=a.getDefaultAnimation(),c=a.getReadableImages();b=new mi(a.getId(),a.getAtlasID(),a.getName(),b,c);a=a.getAnimations();c=0;for(var d=a.length();c<d;){c++;var e=a.getNextObject();e=this.readAnimation(e,b);b.animations.h[e.animID]=e}return b},readAnimation:function(a,b){for(var c=a.getId(),d=a.getName(),e=a.getWidth(),f=a.getHeight(),g=a.getOriginX(),h=a.getOriginY(),m=a.getNumFrames(),
l=a.getAcross(),n=a.getDown(),p=this.readSimpleShapes(a,e/l|0,f/n|0),q=this.readShapes(a,e/l|0,f/n|0),k=a.getLoop(),t=a.getSync(),v=[],r=a.getDurations(),Ka=0,S=r.length();Ka<S;)a=Ka++,v[a]=r.readInt(),v[a]=Math.floor(v[a]/10),v[a]*=10;return new ne(c,d,b,p,q,k,t,e,f,g,h,v,m,l,n)},readSimpleShapes:function(a,b,c){b=new Xa;a=a.getShapes();c=0;for(var d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getId(),g=e.getGroupID(),h=e.getSensor();e=e.getShape();if(e instanceof Tc&&(e=e.getPoints(),4==e.length())){for(var m=
e.getNextObject(),l=0,n=1E7,p=1E7,q=0,k=0,t=m.getX()|0,v=m.getY()|0;l<e.length();)n=Math.min(n,m.getX())|0,p=Math.min(p,m.getY())|0,q=Math.max(q,m.getX())|0,k=Math.max(k,m.getY())|0,++l,l<e.length()&&(m=e.getNextObject());g=new fd(q-n,k-p,t,v,!h,g);b.h[f]=g}}return b},readShapes:function(a,b,c){var d=new Xa;a=a.getShapes();for(var e=0,f=a.length();e<f;){e++;var g=a.getNextObject(),h=g.getId();g.getGroupID();var m=g.getSensor(),l=g.getShape();if(l instanceof Ed)l=sd.createCircle(l.getRadius(),l.getPosition().getX(),
l.getPosition().getY(),b,c);else{var n=l;l=sd.createPolygon(l.getMbsType().getName(),sd.readPoints(n.getPoints()).slice(0),b,c)}n=new Hf;n.shape=l;n.density=g.getDensity();n.friction=g.getFriction();n.restitution=g.getRestitution();n.isSensor=m;n.groupID=g.getGroupID();d.h[h]=n}return d},__class__:Tk};var Rk=function(){};k["com.stencyl.io.TilesetReader"]=Rk;Rk.__name__="com.stencyl.io.TilesetReader";Rk.__interfaces__=[Og];Rk.prototype={accepts:function(a){return a==ec.MBS_TILESET.getName()},read:function(a){var b=
a.getAcross(),c=a.getDown(),d=a.getTileWidth(),e=a.getTileHeight(),f=a.getReadableImages(),g=[];b=new qf(a.getId(),a.getAtlasID(),a.getName(),b,c,d,e,f,g);a=a.getTiles();c=0;for(d=a.length();c<d;)c++,e=a.getNextObject(),g[e.getId()]=this.readTile(e,b);b.isAtlasActive()&&b.loadGraphics();return b},readTile:function(a,b){for(var c=a.getId(),d=a.getCollision(),e=a.getMetadata(),f=a.getFrames(),g=[],h=0,m=a.getDurations(),l=0,n=m.length();l<n;)l++,g[h]=m.readInt(),g[h]=Math.floor(g[h]/10),g[h]*=10,++h;
h=null;-1!=a.getAutotile()&&(l=Lb.get().autotileFormats,n=a.getAutotile(),h=l.h[n]);m=null;if(0!=a.getAutotileMerge().length())for(m=new Xa,a=a.getAutotileMerge(),l=0,n=a.length();l<n;){l++;var p=a.readInt();m.h[p]=p}return new Mc(c,d,e,f,g,h,m,b)},__class__:Rk};var fb=function(a){this.data=a};k["mbs.core.MbsObject"]=fb;fb.__name__="mbs.core.MbsObject";fb.prototype={data:null,address:null,getMbs:function(){return this.data},getAddress:function(){return this.address},setAddress:function(a){this.address=
a},getMbsType:function(){throw J.thrown("Must override getMbsType in MbsObject subclasses");},__class__:fb};var qb=function(a){this.data=a};k["com.stencyl.io.mbs.MbsResource"]=qb;qb.__name__="com.stencyl.io.mbs.MbsResource";qb.initializeType=function(){null==qb.MBS_RESOURCE&&(qb.MBS_RESOURCE=new yb("MbsResource"),qb.MBS_RESOURCE.setInstantiator(function(a){return new qb(a)}),qb.atlasID=qb.MBS_RESOURCE.createField("atlasID",K.INTEGER),qb.description=qb.MBS_RESOURCE.createField("description",K.STRING),
qb.id=qb.MBS_RESOURCE.createField("id",K.INTEGER),qb.$name=qb.MBS_RESOURCE.createField("name",K.STRING))};qb.new_MbsResource_list=function(a){return new bb(a,qb.MBS_RESOURCE,new qb(a))};qb.__super__=fb;qb.prototype=u(fb.prototype,{getMbsType:function(){return qb.MBS_RESOURCE},allocateNew:function(){this.setAddress(this.data.allocate(qb.MBS_RESOURCE.getSize()))},getAtlasID:function(){return this.data.readInt(this.address+qb.atlasID.address)},setAtlasID:function(a){this.data.writeInt(this.address+qb.atlasID.address,
a)},getDescription:function(){return this.data.readString(this.address+qb.description.address)},setDescription:function(a){this.data.writeString(this.address+qb.description.address,a)},getId:function(){return this.data.readInt(this.address+qb.id.address)},setId:function(a){this.data.writeInt(this.address+qb.id.address,a)},getName:function(){return this.data.readString(this.address+qb.$name.address)},setName:function(a){this.data.writeString(this.address+qb.$name.address,a)},__class__:qb});var nb=
function(a){this.data=a;this._durations=new Mf(a)};k["com.stencyl.io.mbs.MbsBackground"]=nb;nb.__name__="com.stencyl.io.mbs.MbsBackground";nb.initializeType=function(){null==nb.MBS_BACKGROUND&&(qb.initializeType(),nb.MBS_BACKGROUND=new yb("MbsBackground"),nb.MBS_BACKGROUND.setInstantiator(function(a){return new nb(a)}),nb.MBS_BACKGROUND.inherit(qb.MBS_RESOURCE),nb.readableImages=nb.MBS_BACKGROUND.createField("readableImages",K.BOOLEAN),nb.durations=nb.MBS_BACKGROUND.createField("durations",K.LIST),
nb.height=nb.MBS_BACKGROUND.createField("height",K.INTEGER),nb.numFrames=nb.MBS_BACKGROUND.createField("numFrames",K.INTEGER),nb.repeats=nb.MBS_BACKGROUND.createField("repeats",K.BOOLEAN),nb.resized=nb.MBS_BACKGROUND.createField("resized",K.BOOLEAN),nb.width=nb.MBS_BACKGROUND.createField("width",K.INTEGER),nb.xParallaxFactor=nb.MBS_BACKGROUND.createField("xParallaxFactor",K.FLOAT),nb.xVelocity=nb.MBS_BACKGROUND.createField("xVelocity",K.FLOAT),nb.yParallaxFactor=nb.MBS_BACKGROUND.createField("yParallaxFactor",
K.FLOAT),nb.yVelocity=nb.MBS_BACKGROUND.createField("yVelocity",K.FLOAT))};nb.new_MbsBackground_list=function(a){return new bb(a,nb.MBS_BACKGROUND,new nb(a))};nb.__super__=qb;nb.prototype=u(qb.prototype,{getMbsType:function(){return nb.MBS_BACKGROUND},_durations:null,allocateNew:function(){this.setAddress(this.data.allocate(nb.MBS_BACKGROUND.getSize()))},getReadableImages:function(){return this.data.readBool(this.address+nb.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+
nb.readableImages.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+nb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+nb.durations.address,this._durations.getAddress());return this._durations},getHeight:function(){return this.data.readInt(this.address+nb.height.address)},setHeight:function(a){this.data.writeInt(this.address+nb.height.address,a)},getNumFrames:function(){return this.data.readInt(this.address+
nb.numFrames.address)},setNumFrames:function(a){this.data.writeInt(this.address+nb.numFrames.address,a)},getRepeats:function(){return this.data.readBool(this.address+nb.repeats.address)},setRepeats:function(a){this.data.writeBool(this.address+nb.repeats.address,a)},getResized:function(){return this.data.readBool(this.address+nb.resized.address)},setResized:function(a){this.data.writeBool(this.address+nb.resized.address,a)},getWidth:function(){return this.data.readInt(this.address+nb.width.address)},
setWidth:function(a){this.data.writeInt(this.address+nb.width.address,a)},getXParallaxFactor:function(){return this.data.readFloat(this.address+nb.xParallaxFactor.address)},setXParallaxFactor:function(a){this.data.writeFloat(this.address+nb.xParallaxFactor.address,a)},getXVelocity:function(){return this.data.readFloat(this.address+nb.xVelocity.address)},setXVelocity:function(a){this.data.writeFloat(this.address+nb.xVelocity.address,a)},getYParallaxFactor:function(){return this.data.readFloat(this.address+
nb.yParallaxFactor.address)},setYParallaxFactor:function(a){this.data.writeFloat(this.address+nb.yParallaxFactor.address,a)},getYVelocity:function(){return this.data.readFloat(this.address+nb.yVelocity.address)},setYVelocity:function(a){this.data.writeFloat(this.address+nb.yVelocity.address,a)},__class__:nb});var td=function(a){this.data=a};k["com.stencyl.io.mbs.MbsBlank"]=td;td.__name__="com.stencyl.io.mbs.MbsBlank";td.initializeType=function(){null==td.MBS_BLANK&&(td.MBS_BLANK=new yb("MbsBlank"),
td.MBS_BLANK.setInstantiator(function(a){return new td(a)}),td.$name=td.MBS_BLANK.createField("name",K.STRING),td.type=td.MBS_BLANK.createField("type",K.STRING))};td.new_MbsBlank_list=function(a){return new bb(a,td.MBS_BLANK,new td(a))};td.__super__=fb;td.prototype=u(fb.prototype,{getMbsType:function(){return td.MBS_BLANK},allocateNew:function(){this.setAddress(this.data.allocate(td.MBS_BLANK.getSize()))},getName:function(){return this.data.readString(this.address+td.$name.address)},setName:function(a){this.data.writeString(this.address+
td.$name.address,a)},getType:function(){return this.data.readString(this.address+td.type.address)},setType:function(a){this.data.writeString(this.address+td.type.address,a)},__class__:td});var Eb=function(a){this.data=a;this._blanks=new bb(a,td.MBS_BLANK,new td(a))};k["com.stencyl.io.mbs.MbsCustomBlock"]=Eb;Eb.__name__="com.stencyl.io.mbs.MbsCustomBlock";Eb.initializeType=function(){null==Eb.MBS_CUSTOM_BLOCK&&(qb.initializeType(),Eb.MBS_CUSTOM_BLOCK=new yb("MbsCustomBlock"),Eb.MBS_CUSTOM_BLOCK.setInstantiator(function(a){return new Eb(a)}),
Eb.MBS_CUSTOM_BLOCK.inherit(qb.MBS_RESOURCE),Eb.blocktag=Eb.MBS_CUSTOM_BLOCK.createField("blocktag",K.STRING),Eb.blocktype=Eb.MBS_CUSTOM_BLOCK.createField("blocktype",K.STRING),Eb.code=Eb.MBS_CUSTOM_BLOCK.createField("code",K.STRING),Eb.global=Eb.MBS_CUSTOM_BLOCK.createField("global",K.BOOLEAN),Eb.gui=Eb.MBS_CUSTOM_BLOCK.createField("gui",K.STRING),Eb.message=Eb.MBS_CUSTOM_BLOCK.createField("message",K.STRING),Eb.returnType=Eb.MBS_CUSTOM_BLOCK.createField("returnType",K.STRING),Eb.snippetID=Eb.MBS_CUSTOM_BLOCK.createField("snippetID",
K.INTEGER),Eb.blanks=Eb.MBS_CUSTOM_BLOCK.createField("blanks",K.LIST))};Eb.new_MbsCustomBlock_list=function(a){return new bb(a,Eb.MBS_CUSTOM_BLOCK,new Eb(a))};Eb.__super__=qb;Eb.prototype=u(qb.prototype,{getMbsType:function(){return Eb.MBS_CUSTOM_BLOCK},_blanks:null,allocateNew:function(){this.setAddress(this.data.allocate(Eb.MBS_CUSTOM_BLOCK.getSize()))},getBlocktag:function(){return this.data.readString(this.address+Eb.blocktag.address)},setBlocktag:function(a){this.data.writeString(this.address+
Eb.blocktag.address,a)},getBlocktype:function(){return this.data.readString(this.address+Eb.blocktype.address)},setBlocktype:function(a){this.data.writeString(this.address+Eb.blocktype.address,a)},getCode:function(){return this.data.readString(this.address+Eb.code.address)},setCode:function(a){this.data.writeString(this.address+Eb.code.address,a)},getGlobal:function(){return this.data.readBool(this.address+Eb.global.address)},setGlobal:function(a){this.data.writeBool(this.address+Eb.global.address,
a)},getGui:function(){return this.data.readString(this.address+Eb.gui.address)},setGui:function(a){this.data.writeString(this.address+Eb.gui.address,a)},getMessage:function(){return this.data.readString(this.address+Eb.message.address)},setMessage:function(a){this.data.writeString(this.address+Eb.message.address,a)},getReturnType:function(){return this.data.readString(this.address+Eb.returnType.address)},setReturnType:function(a){this.data.writeString(this.address+Eb.returnType.address,a)},getSnippetID:function(){return this.data.readInt(this.address+
Eb.snippetID.address)},setSnippetID:function(a){this.data.writeInt(this.address+Eb.snippetID.address,a)},getBlanks:function(){this._blanks.setAddress(this.data.readInt(this.address+Eb.blanks.address));return this._blanks},createBlanks:function(a){this._blanks.allocateNew(a);this.data.writeInt(this.address+Eb.blanks.address,this._blanks.getAddress());return this._blanks},__class__:Eb});var dc=function(a){this.data=a};k["com.stencyl.io.mbs.MbsFont"]=dc;dc.__name__="com.stencyl.io.mbs.MbsFont";dc.initializeType=
function(){null==dc.MBS_FONT&&(qb.initializeType(),dc.MBS_FONT=new yb("MbsFont"),dc.MBS_FONT.setInstantiator(function(a){return new dc(a)}),dc.MBS_FONT.inherit(qb.MBS_RESOURCE),dc.alphabet=dc.MBS_FONT.createField("alphabet",K.STRING),dc.readableImages=dc.MBS_FONT.createField("readableImages",K.BOOLEAN),dc.height=dc.MBS_FONT.createField("height",K.INTEGER),dc.offsets=dc.MBS_FONT.createField("offsets",K.STRING),dc.prerendered=dc.MBS_FONT.createField("prerendered",K.BOOLEAN),dc.rowHeight=dc.MBS_FONT.createField("rowHeight",
K.INTEGER))};dc.new_MbsFont_list=function(a){return new bb(a,dc.MBS_FONT,new dc(a))};dc.__super__=qb;dc.prototype=u(qb.prototype,{getMbsType:function(){return dc.MBS_FONT},allocateNew:function(){this.setAddress(this.data.allocate(dc.MBS_FONT.getSize()))},getAlphabet:function(){return this.data.readString(this.address+dc.alphabet.address)},setAlphabet:function(a){this.data.writeString(this.address+dc.alphabet.address,a)},getReadableImages:function(){return this.data.readBool(this.address+dc.readableImages.address)},
setReadableImages:function(a){this.data.writeBool(this.address+dc.readableImages.address,a)},getHeight:function(){return this.data.readInt(this.address+dc.height.address)},setHeight:function(a){this.data.writeInt(this.address+dc.height.address,a)},getOffsets:function(){return this.data.readString(this.address+dc.offsets.address)},setOffsets:function(a){this.data.writeString(this.address+dc.offsets.address,a)},getPrerendered:function(){return this.data.readBool(this.address+dc.prerendered.address)},
setPrerendered:function(a){this.data.writeBool(this.address+dc.prerendered.address,a)},getRowHeight:function(){return this.data.readInt(this.address+dc.rowHeight.address)},setRowHeight:function(a){this.data.writeInt(this.address+dc.rowHeight.address,a)},__class__:dc});var sc=function(a){this.data=a};k["com.stencyl.io.mbs.MbsMusic"]=sc;sc.__name__="com.stencyl.io.mbs.MbsMusic";sc.initializeType=function(){null==sc.MBS_MUSIC&&(qb.initializeType(),sc.MBS_MUSIC=new yb("MbsMusic"),sc.MBS_MUSIC.setInstantiator(function(a){return new sc(a)}),
sc.MBS_MUSIC.inherit(qb.MBS_RESOURCE),sc.loop=sc.MBS_MUSIC.createField("loop",K.BOOLEAN),sc.pan=sc.MBS_MUSIC.createField("pan",K.INTEGER),sc.stream=sc.MBS_MUSIC.createField("stream",K.BOOLEAN),sc.type=sc.MBS_MUSIC.createField("type",K.STRING),sc.volume=sc.MBS_MUSIC.createField("volume",K.INTEGER))};sc.new_MbsMusic_list=function(a){return new bb(a,sc.MBS_MUSIC,new sc(a))};sc.__super__=qb;sc.prototype=u(qb.prototype,{getMbsType:function(){return sc.MBS_MUSIC},allocateNew:function(){this.setAddress(this.data.allocate(sc.MBS_MUSIC.getSize()))},
getLoop:function(){return this.data.readBool(this.address+sc.loop.address)},setLoop:function(a){this.data.writeBool(this.address+sc.loop.address,a)},getPan:function(){return this.data.readInt(this.address+sc.pan.address)},setPan:function(a){this.data.writeInt(this.address+sc.pan.address,a)},getStream:function(){return this.data.readBool(this.address+sc.stream.address)},setStream:function(a){this.data.writeBool(this.address+sc.stream.address,a)},getType:function(){return this.data.readString(this.address+
sc.type.address)},setType:function(a){this.data.writeString(this.address+sc.type.address,a)},getVolume:function(){return this.data.readInt(this.address+sc.volume.address)},setVolume:function(a){this.data.writeInt(this.address+sc.volume.address,a)},__class__:sc});var rf=function(a,b){this.name=a;this.size=b};k["mbs.core.MbsType"]=rf;rf.__name__="mbs.core.MbsType";rf.prototype={name:null,size:null,getName:function(){return this.name},getSize:function(){return this.size},toString:function(){return"MbsType [name="+
this.getName()+"]"},createInstance:function(a){throw J.thrown("Can't create an instance of type "+this.name);},__class__:rf};var K=function(){};k["mbs.core.MbsTypes"]=K;K.__name__="mbs.core.MbsTypes";var uc=function(a){this.data=a};k["mbs.core.header.MbsHeader"]=uc;uc.__name__="mbs.core.header.MbsHeader";uc.initializeType=function(){null==uc.MBS_HEADER&&(uc.MBS_HEADER=new yb("MbsHeader"),uc.MBS_HEADER.setInstantiator(function(a){return new uc(a)}),uc.version=uc.MBS_HEADER.createField("version",K.INTEGER),
uc.typeTableHash=uc.MBS_HEADER.createField("typeTableHash",K.INTEGER),uc.typeTablePointer=uc.MBS_HEADER.createField("typeTablePointer",K.INTEGER),uc.stringTablePointer=uc.MBS_HEADER.createField("stringTablePointer",K.INTEGER),uc.root=uc.MBS_HEADER.createField("root",K.DYNAMIC))};uc.new_MbsHeader_list=function(a){return new bb(a,uc.MBS_HEADER,new uc(a))};uc.__super__=fb;uc.prototype=u(fb.prototype,{getMbsType:function(){return uc.MBS_HEADER},allocateNew:function(){this.setAddress(this.data.allocate(uc.MBS_HEADER.getSize()))},
getVersion:function(){return this.data.readInt(this.address+uc.version.address)},setVersion:function(a){this.data.writeInt(this.address+uc.version.address,a)},getTypeTableHash:function(){return this.data.readInt(this.address+uc.typeTableHash.address)},setTypeTableHash:function(a){this.data.writeInt(this.address+uc.typeTableHash.address,a)},getTypeTablePointer:function(){return this.data.readInt(this.address+uc.typeTablePointer.address)},setTypeTablePointer:function(a){this.data.writeInt(this.address+
uc.typeTablePointer.address,a)},getStringTablePointer:function(){return this.data.readInt(this.address+uc.stringTablePointer.address)},setStringTablePointer:function(a){this.data.writeInt(this.address+uc.stringTablePointer.address,a)},getRoot:function(){return be.readDynamic(this.data,this.address+uc.root.address)},setRoot:function(a){be.writeDynamic(this.data,this.address+uc.root.address,a)},__class__:uc});var yb=function(a){rf.call(this,a,0);this.fields=[]};k["mbs.core.ComposedType"]=yb;yb.__name__=
"mbs.core.ComposedType";yb.__super__=rf;yb.prototype=u(rf.prototype,{parent:null,fields:null,inherit:function(a){this.parent=a;this.size=a.getSize()},createField:function(a,b){a=new ui(a,b,this.size);this.fields.push(a);this.size+=b.getSize();return a},getParent:function(){return this.parent},getFields:function(){return this.fields},instantiator:null,setInstantiator:function(a){this.instantiator=a},createInstance:function(a){return null!=this.instantiator?this.instantiator(a):rf.prototype.createInstance.call(this,
a)},createList:function(a){return new bb(a,this,this.createInstance(a))},__class__:yb});var Nc=function(a){this.data=a};k["mbs.core.header.MbsTypeInfo"]=Nc;Nc.__name__="mbs.core.header.MbsTypeInfo";Nc.initializeType=function(){null==Nc.MBS_TYPE_INFO&&(Nc.MBS_TYPE_INFO=new yb("MbsTypeInfo"),Nc.MBS_TYPE_INFO.setInstantiator(function(a){return new Nc(a)}),Nc.$name=Nc.MBS_TYPE_INFO.createField("name",K.STRING),Nc.parent=Nc.MBS_TYPE_INFO.createField("parent",K.STRING),Nc.fieldsPointer=Nc.MBS_TYPE_INFO.createField("fieldsPointer",
K.INTEGER),Nc.size=Nc.MBS_TYPE_INFO.createField("size",K.INTEGER))};Nc.new_MbsTypeInfo_list=function(a){return new bb(a,Nc.MBS_TYPE_INFO,new Nc(a))};Nc.__super__=fb;Nc.prototype=u(fb.prototype,{getMbsType:function(){return Nc.MBS_TYPE_INFO},allocateNew:function(){this.setAddress(this.data.allocate(Nc.MBS_TYPE_INFO.getSize()))},getName:function(){return this.data.readString(this.address+Nc.$name.address)},setName:function(a){this.data.writeString(this.address+Nc.$name.address,a)},getParent:function(){return this.data.readString(this.address+
Nc.parent.address)},setParent:function(a){this.data.writeString(this.address+Nc.parent.address,a)},getFieldsPointer:function(){return this.data.readInt(this.address+Nc.fieldsPointer.address)},setFieldsPointer:function(a){this.data.writeInt(this.address+Nc.fieldsPointer.address,a)},getSize:function(){return this.data.readInt(this.address+Nc.size.address)},setSize:function(a){this.data.writeInt(this.address+Nc.size.address,a)},__class__:Nc});var $c=function(a){this.data=a};k["mbs.core.header.MbsFieldInfo"]=
$c;$c.__name__="mbs.core.header.MbsFieldInfo";$c.initializeType=function(){null==$c.MBS_FIELD_INFO&&($c.MBS_FIELD_INFO=new yb("MbsFieldInfo"),$c.MBS_FIELD_INFO.setInstantiator(function(a){return new $c(a)}),$c.$name=$c.MBS_FIELD_INFO.createField("name",K.STRING),$c.type=$c.MBS_FIELD_INFO.createField("type",K.STRING),$c.fieldAddress=$c.MBS_FIELD_INFO.createField("fieldAddress",K.INTEGER))};$c.new_MbsFieldInfo_list=function(a){return new bb(a,$c.MBS_FIELD_INFO,new $c(a))};$c.__super__=fb;$c.prototype=
u(fb.prototype,{getMbsType:function(){return $c.MBS_FIELD_INFO},allocateNew:function(){this.setAddress(this.data.allocate($c.MBS_FIELD_INFO.getSize()))},getName:function(){return this.data.readString(this.address+$c.$name.address)},setName:function(a){this.data.writeString(this.address+$c.$name.address,a)},getType:function(){return this.data.readString(this.address+$c.type.address)},setType:function(a){this.data.writeString(this.address+$c.type.address,a)},getFieldAddress:function(){return this.data.readInt(this.address+
$c.fieldAddress.address)},setFieldAddress:function(a){this.data.writeInt(this.address+$c.fieldAddress.address,a)},__class__:$c});var Kh=function(){this.types=Kh.basicTypes.slice();this.typecodes=new Vb;this.addTypes();for(var a=0,b=0,c=this.types;b<c.length;){var d=c[b];++b;this.typecodes.set(d,a++)}};k["mbs.core.MbsTypedefSet"]=Kh;Kh.__name__="mbs.core.MbsTypedefSet";Kh.prototype={types:null,typecodes:null,getTypes:function(){return this.types},addTypes:function(){},getHash:function(){return 0},
getTypecode:function(a){return this.typecodes.h[a.__id__]},getType:function(a){return this.types[a]},__class__:Kh};var ff=function(){Kh.call(this)};k["com.stencyl.io.mbs.Typedefs"]=ff;ff.__name__="com.stencyl.io.mbs.Typedefs";ff.get=function(){null==ff.instance&&(ff.instance=new ff);return ff.instance};ff.__super__=Kh;ff.prototype=u(Kh.prototype,{addTypes:function(){qb.initializeType();this.types.push(qb.MBS_RESOURCE);nb.initializeType();this.types.push(nb.MBS_BACKGROUND);Eb.initializeType();this.types.push(Eb.MBS_CUSTOM_BLOCK);
td.initializeType();this.types.push(td.MBS_BLANK);dc.initializeType();this.types.push(dc.MBS_FONT);sc.initializeType();this.types.push(sc.MBS_MUSIC);Pa.initializeType();this.types.push(Pa.MBS_ACTOR_TYPE);rc.initializeType();this.types.push(rc.MBS_SPRITE);hb.initializeType();this.types.push(hb.MBS_ANIMATION);Mb.initializeType();this.types.push(Mb.MBS_ANIM_SHAPE);pc.initializeType();this.types.push(pc.MBS_GAME);Hc.initializeType();this.types.push(Hc.MBS_ATLAS);ud.initializeType();this.types.push(ud.MBS_COLLISION_SHAPE);
vd.initializeType();this.types.push(vd.MBS_COLLISION_GROUP);wd.initializeType();this.types.push(wd.MBS_COLLISION_PAIR);jd.initializeType();this.types.push(jd.MBS_SCENE_HEADER);ec.initializeType();this.types.push(ec.MBS_TILESET);Nb.initializeType();this.types.push(Nb.MBS_TILE);na.initializeType();this.types.push(na.MBS_SCENE);gb.initializeType();this.types.push(gb.MBS_ACTOR_INSTANCE);ce.initializeType();this.types.push(ce.MBS_COLOR_BACKGROUND);xd.initializeType();this.types.push(xd.MBS_GRADIENT_BACKGROUND);
Ra.initializeType();this.types.push(Ra.MBS_LAYER);de.initializeType();this.types.push(de.MBS_INTERACTIVE_LAYER);yd.initializeType();this.types.push(yd.MBS_IMAGE_BACKGROUND);Tb.initializeType();this.types.push(Tb.MBS_JOINT);zd.initializeType();this.types.push(zd.MBS_STICK_JOINT);fc.initializeType();this.types.push(fc.MBS_HINGE_JOINT);Ob.initializeType();this.types.push(Ob.MBS_SLIDING_JOINT);Yb.initializeType();this.types.push(Yb.MBS_REGION);Wd.initializeType();this.types.push(Wd.MBS_TERRAIN_REGION);
qc.initializeType();this.types.push(qc.MBS_POINT);Pd.initializeType();this.types.push(Pd.MBS_SHAPE);Ed.initializeType();this.types.push(Ed.MBS_CIRCLE);Tc.initializeType();this.types.push(Tc.MBS_POLYGON);od.initializeType();this.types.push(od.MBS_POLY_REGION);ee.initializeType();this.types.push(ee.MBS_WIREFRAME);db.initializeType();this.types.push(db.MBS_SNIPPET_DEF);Bb.initializeType();this.types.push(Bb.MBS_ATTRIBUTE_DEF);ad.initializeType();this.types.push(ad.MBS_BLOCK);gc.initializeType();this.types.push(gc.MBS_EVENT);
Ic.initializeType();this.types.push(Ic.MBS_SNIPPET);bd.initializeType();this.types.push(bd.MBS_ATTRIBUTE);Ad.initializeType();this.types.push(Ad.MBS_MAP_ELEMENT);hc.initializeType();this.types.push(hc.MBS_AUTOTILE_FORMAT);cd.initializeType();this.types.push(cd.MBS_CORNERS)},getHash:function(){return-1349349184},__class__:ff});var Pa=function(a){this.data=a;this._snippets=new bb(a,Ic.MBS_SNIPPET,new Ic(a))};k["com.stencyl.io.mbs.actortype.MbsActorType"]=Pa;Pa.__name__="com.stencyl.io.mbs.actortype.MbsActorType";
Pa.initializeType=function(){null==Pa.MBS_ACTOR_TYPE&&(qb.initializeType(),Pa.MBS_ACTOR_TYPE=new yb("MbsActorType"),Pa.MBS_ACTOR_TYPE.setInstantiator(function(a){return new Pa(a)}),Pa.MBS_ACTOR_TYPE.inherit(qb.MBS_RESOURCE),Pa.angularDamping=Pa.MBS_ACTOR_TYPE.createField("angularDamping",K.FLOAT),Pa.autoScale=Pa.MBS_ACTOR_TYPE.createField("autoScale",K.BOOLEAN),Pa.bodyType=Pa.MBS_ACTOR_TYPE.createField("bodyType",K.INTEGER),Pa.continuous=Pa.MBS_ACTOR_TYPE.createField("continuous",K.BOOLEAN),Pa.eventSnippetID=
Pa.MBS_ACTOR_TYPE.createField("eventSnippetID",K.INTEGER),Pa.fixedRotation=Pa.MBS_ACTOR_TYPE.createField("fixedRotation",K.BOOLEAN),Pa.friction=Pa.MBS_ACTOR_TYPE.createField("friction",K.FLOAT),Pa.groupID=Pa.MBS_ACTOR_TYPE.createField("groupID",K.INTEGER),Pa.ignoreGravity=Pa.MBS_ACTOR_TYPE.createField("ignoreGravity",K.BOOLEAN),Pa.inertia=Pa.MBS_ACTOR_TYPE.createField("inertia",K.FLOAT),Pa.linearDamping=Pa.MBS_ACTOR_TYPE.createField("linearDamping",K.FLOAT),Pa.mass=Pa.MBS_ACTOR_TYPE.createField("mass",
K.FLOAT),Pa.pausable=Pa.MBS_ACTOR_TYPE.createField("pausable",K.BOOLEAN),Pa.physicsMode=Pa.MBS_ACTOR_TYPE.createField("physicsMode",K.INTEGER),Pa.restitution=Pa.MBS_ACTOR_TYPE.createField("restitution",K.FLOAT),Pa.sprite=Pa.MBS_ACTOR_TYPE.createField("sprite",K.INTEGER),Pa.isStatic=Pa.MBS_ACTOR_TYPE.createField("isStatic",K.BOOLEAN),Pa.snippets=Pa.MBS_ACTOR_TYPE.createField("snippets",K.LIST))};Pa.new_MbsActorType_list=function(a){return new bb(a,Pa.MBS_ACTOR_TYPE,new Pa(a))};Pa.__super__=qb;Pa.prototype=
u(qb.prototype,{getMbsType:function(){return Pa.MBS_ACTOR_TYPE},_snippets:null,allocateNew:function(){this.setAddress(this.data.allocate(Pa.MBS_ACTOR_TYPE.getSize()))},getAngularDamping:function(){return this.data.readFloat(this.address+Pa.angularDamping.address)},setAngularDamping:function(a){this.data.writeFloat(this.address+Pa.angularDamping.address,a)},getAutoScale:function(){return this.data.readBool(this.address+Pa.autoScale.address)},setAutoScale:function(a){this.data.writeBool(this.address+
Pa.autoScale.address,a)},getBodyType:function(){return this.data.readInt(this.address+Pa.bodyType.address)},setBodyType:function(a){this.data.writeInt(this.address+Pa.bodyType.address,a)},getContinuous:function(){return this.data.readBool(this.address+Pa.continuous.address)},setContinuous:function(a){this.data.writeBool(this.address+Pa.continuous.address,a)},getEventSnippetID:function(){return this.data.readInt(this.address+Pa.eventSnippetID.address)},setEventSnippetID:function(a){this.data.writeInt(this.address+
Pa.eventSnippetID.address,a)},getFixedRotation:function(){return this.data.readBool(this.address+Pa.fixedRotation.address)},setFixedRotation:function(a){this.data.writeBool(this.address+Pa.fixedRotation.address,a)},getFriction:function(){return this.data.readFloat(this.address+Pa.friction.address)},setFriction:function(a){this.data.writeFloat(this.address+Pa.friction.address,a)},getGroupID:function(){return this.data.readInt(this.address+Pa.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+
Pa.groupID.address,a)},getIgnoreGravity:function(){return this.data.readBool(this.address+Pa.ignoreGravity.address)},setIgnoreGravity:function(a){this.data.writeBool(this.address+Pa.ignoreGravity.address,a)},getInertia:function(){return this.data.readFloat(this.address+Pa.inertia.address)},setInertia:function(a){this.data.writeFloat(this.address+Pa.inertia.address,a)},getLinearDamping:function(){return this.data.readFloat(this.address+Pa.linearDamping.address)},setLinearDamping:function(a){this.data.writeFloat(this.address+
Pa.linearDamping.address,a)},getMass:function(){return this.data.readFloat(this.address+Pa.mass.address)},setMass:function(a){this.data.writeFloat(this.address+Pa.mass.address,a)},getPausable:function(){return this.data.readBool(this.address+Pa.pausable.address)},setPausable:function(a){this.data.writeBool(this.address+Pa.pausable.address,a)},getPhysicsMode:function(){return this.data.readInt(this.address+Pa.physicsMode.address)},setPhysicsMode:function(a){this.data.writeInt(this.address+Pa.physicsMode.address,
a)},getRestitution:function(){return this.data.readFloat(this.address+Pa.restitution.address)},setRestitution:function(a){this.data.writeFloat(this.address+Pa.restitution.address,a)},getSprite:function(){return this.data.readInt(this.address+Pa.sprite.address)},setSprite:function(a){this.data.writeInt(this.address+Pa.sprite.address,a)},getIsStatic:function(){return this.data.readBool(this.address+Pa.isStatic.address)},setIsStatic:function(a){this.data.writeBool(this.address+Pa.isStatic.address,a)},
getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+Pa.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);this.data.writeInt(this.address+Pa.snippets.address,this._snippets.getAddress());return this._snippets},__class__:Pa});var Mb=function(a){this.data=a};k["com.stencyl.io.mbs.actortype.MbsAnimShape"]=Mb;Mb.__name__="com.stencyl.io.mbs.actortype.MbsAnimShape";Mb.initializeType=function(){null==Mb.MBS_ANIM_SHAPE&&(Mb.MBS_ANIM_SHAPE=
new yb("MbsAnimShape"),Mb.MBS_ANIM_SHAPE.setInstantiator(function(a){return new Mb(a)}),Mb.shape=Mb.MBS_ANIM_SHAPE.createField("shape",K.DYNAMIC),Mb.density=Mb.MBS_ANIM_SHAPE.createField("density",K.FLOAT),Mb.friction=Mb.MBS_ANIM_SHAPE.createField("friction",K.FLOAT),Mb.groupID=Mb.MBS_ANIM_SHAPE.createField("groupID",K.INTEGER),Mb.id=Mb.MBS_ANIM_SHAPE.createField("id",K.INTEGER),Mb.$name=Mb.MBS_ANIM_SHAPE.createField("name",K.STRING),Mb.restitution=Mb.MBS_ANIM_SHAPE.createField("restitution",K.FLOAT),
Mb.sensor=Mb.MBS_ANIM_SHAPE.createField("sensor",K.BOOLEAN))};Mb.new_MbsAnimShape_list=function(a){return new bb(a,Mb.MBS_ANIM_SHAPE,new Mb(a))};Mb.__super__=fb;Mb.prototype=u(fb.prototype,{getMbsType:function(){return Mb.MBS_ANIM_SHAPE},allocateNew:function(){this.setAddress(this.data.allocate(Mb.MBS_ANIM_SHAPE.getSize()))},getShape:function(){return be.readDynamic(this.data,this.address+Mb.shape.address)},setShape:function(a){be.writeDynamic(this.data,this.address+Mb.shape.address,a)},getDensity:function(){return this.data.readFloat(this.address+
Mb.density.address)},setDensity:function(a){this.data.writeFloat(this.address+Mb.density.address,a)},getFriction:function(){return this.data.readFloat(this.address+Mb.friction.address)},setFriction:function(a){this.data.writeFloat(this.address+Mb.friction.address,a)},getGroupID:function(){return this.data.readInt(this.address+Mb.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+Mb.groupID.address,a)},getId:function(){return this.data.readInt(this.address+Mb.id.address)},setId:function(a){this.data.writeInt(this.address+
Mb.id.address,a)},getName:function(){return this.data.readString(this.address+Mb.$name.address)},setName:function(a){this.data.writeString(this.address+Mb.$name.address,a)},getRestitution:function(){return this.data.readFloat(this.address+Mb.restitution.address)},setRestitution:function(a){this.data.writeFloat(this.address+Mb.restitution.address,a)},getSensor:function(){return this.data.readBool(this.address+Mb.sensor.address)},setSensor:function(a){this.data.writeBool(this.address+Mb.sensor.address,
a)},__class__:Mb});var hb=function(a){this.data=a;this._durations=new Mf(a);this._shapes=new bb(a,Mb.MBS_ANIM_SHAPE,new Mb(a))};k["com.stencyl.io.mbs.actortype.MbsAnimation"]=hb;hb.__name__="com.stencyl.io.mbs.actortype.MbsAnimation";hb.initializeType=function(){null==hb.MBS_ANIMATION&&(hb.MBS_ANIMATION=new yb("MbsAnimation"),hb.MBS_ANIMATION.setInstantiator(function(a){return new hb(a)}),hb.across=hb.MBS_ANIMATION.createField("across",K.INTEGER),hb.down=hb.MBS_ANIMATION.createField("down",K.INTEGER),
hb.durations=hb.MBS_ANIMATION.createField("durations",K.LIST),hb.height=hb.MBS_ANIMATION.createField("height",K.INTEGER),hb.id=hb.MBS_ANIMATION.createField("id",K.INTEGER),hb.loop=hb.MBS_ANIMATION.createField("loop",K.BOOLEAN),hb.$name=hb.MBS_ANIMATION.createField("name",K.STRING),hb.numFrames=hb.MBS_ANIMATION.createField("numFrames",K.INTEGER),hb.originX=hb.MBS_ANIMATION.createField("originX",K.INTEGER),hb.originY=hb.MBS_ANIMATION.createField("originY",K.INTEGER),hb.sync=hb.MBS_ANIMATION.createField("sync",
K.BOOLEAN),hb.version=hb.MBS_ANIMATION.createField("version",K.INTEGER),hb.width=hb.MBS_ANIMATION.createField("width",K.INTEGER),hb.shapes=hb.MBS_ANIMATION.createField("shapes",K.LIST))};hb.new_MbsAnimation_list=function(a){return new bb(a,hb.MBS_ANIMATION,new hb(a))};hb.__super__=fb;hb.prototype=u(fb.prototype,{getMbsType:function(){return hb.MBS_ANIMATION},_durations:null,_shapes:null,allocateNew:function(){this.setAddress(this.data.allocate(hb.MBS_ANIMATION.getSize()))},getAcross:function(){return this.data.readInt(this.address+
hb.across.address)},setAcross:function(a){this.data.writeInt(this.address+hb.across.address,a)},getDown:function(){return this.data.readInt(this.address+hb.down.address)},setDown:function(a){this.data.writeInt(this.address+hb.down.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+hb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+hb.durations.address,this._durations.getAddress());
return this._durations},getHeight:function(){return this.data.readInt(this.address+hb.height.address)},setHeight:function(a){this.data.writeInt(this.address+hb.height.address,a)},getId:function(){return this.data.readInt(this.address+hb.id.address)},setId:function(a){this.data.writeInt(this.address+hb.id.address,a)},getLoop:function(){return this.data.readBool(this.address+hb.loop.address)},setLoop:function(a){this.data.writeBool(this.address+hb.loop.address,a)},getName:function(){return this.data.readString(this.address+
hb.$name.address)},setName:function(a){this.data.writeString(this.address+hb.$name.address,a)},getNumFrames:function(){return this.data.readInt(this.address+hb.numFrames.address)},setNumFrames:function(a){this.data.writeInt(this.address+hb.numFrames.address,a)},getOriginX:function(){return this.data.readInt(this.address+hb.originX.address)},setOriginX:function(a){this.data.writeInt(this.address+hb.originX.address,a)},getOriginY:function(){return this.data.readInt(this.address+hb.originY.address)},
setOriginY:function(a){this.data.writeInt(this.address+hb.originY.address,a)},getSync:function(){return this.data.readBool(this.address+hb.sync.address)},setSync:function(a){this.data.writeBool(this.address+hb.sync.address,a)},getVersion:function(){return this.data.readInt(this.address+hb.version.address)},setVersion:function(a){this.data.writeInt(this.address+hb.version.address,a)},getWidth:function(){return this.data.readInt(this.address+hb.width.address)},setWidth:function(a){this.data.writeInt(this.address+
hb.width.address,a)},getShapes:function(){this._shapes.setAddress(this.data.readInt(this.address+hb.shapes.address));return this._shapes},createShapes:function(a){this._shapes.allocateNew(a);this.data.writeInt(this.address+hb.shapes.address,this._shapes.getAddress());return this._shapes},__class__:hb});var rc=function(a){this.data=a;this._animations=new bb(a,hb.MBS_ANIMATION,new hb(a))};k["com.stencyl.io.mbs.actortype.MbsSprite"]=rc;rc.__name__="com.stencyl.io.mbs.actortype.MbsSprite";rc.initializeType=
function(){null==rc.MBS_SPRITE&&(qb.initializeType(),rc.MBS_SPRITE=new yb("MbsSprite"),rc.MBS_SPRITE.setInstantiator(function(a){return new rc(a)}),rc.MBS_SPRITE.inherit(qb.MBS_RESOURCE),rc.defaultAnimation=rc.MBS_SPRITE.createField("defaultAnimation",K.INTEGER),rc.readableImages=rc.MBS_SPRITE.createField("readableImages",K.BOOLEAN),rc.height=rc.MBS_SPRITE.createField("height",K.INTEGER),rc.width=rc.MBS_SPRITE.createField("width",K.INTEGER),rc.animations=rc.MBS_SPRITE.createField("animations",K.LIST))};
rc.new_MbsSprite_list=function(a){return new bb(a,rc.MBS_SPRITE,new rc(a))};rc.__super__=qb;rc.prototype=u(qb.prototype,{getMbsType:function(){return rc.MBS_SPRITE},_animations:null,allocateNew:function(){this.setAddress(this.data.allocate(rc.MBS_SPRITE.getSize()))},getDefaultAnimation:function(){return this.data.readInt(this.address+rc.defaultAnimation.address)},setDefaultAnimation:function(a){this.data.writeInt(this.address+rc.defaultAnimation.address,a)},getReadableImages:function(){return this.data.readBool(this.address+
rc.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+rc.readableImages.address,a)},getHeight:function(){return this.data.readInt(this.address+rc.height.address)},setHeight:function(a){this.data.writeInt(this.address+rc.height.address,a)},getWidth:function(){return this.data.readInt(this.address+rc.width.address)},setWidth:function(a){this.data.writeInt(this.address+rc.width.address,a)},getAnimations:function(){this._animations.setAddress(this.data.readInt(this.address+
rc.animations.address));return this._animations},createAnimations:function(a){this._animations.allocateNew(a);this.data.writeInt(this.address+rc.animations.address,this._animations.getAddress());return this._animations},__class__:rc});var Hc=function(a){this.data=a;this._members=new Mf(a)};k["com.stencyl.io.mbs.game.MbsAtlas"]=Hc;Hc.__name__="com.stencyl.io.mbs.game.MbsAtlas";Hc.initializeType=function(){null==Hc.MBS_ATLAS&&(Hc.MBS_ATLAS=new yb("MbsAtlas"),Hc.MBS_ATLAS.setInstantiator(function(a){return new Hc(a)}),
Hc.id=Hc.MBS_ATLAS.createField("id",K.INTEGER),Hc.$name=Hc.MBS_ATLAS.createField("name",K.STRING),Hc.members=Hc.MBS_ATLAS.createField("members",K.LIST),Hc.allScenes=Hc.MBS_ATLAS.createField("allScenes",K.BOOLEAN))};Hc.new_MbsAtlas_list=function(a){return new bb(a,Hc.MBS_ATLAS,new Hc(a))};Hc.__super__=fb;Hc.prototype=u(fb.prototype,{getMbsType:function(){return Hc.MBS_ATLAS},_members:null,allocateNew:function(){this.setAddress(this.data.allocate(Hc.MBS_ATLAS.getSize()))},getId:function(){return this.data.readInt(this.address+
Hc.id.address)},setId:function(a){this.data.writeInt(this.address+Hc.id.address,a)},getName:function(){return this.data.readString(this.address+Hc.$name.address)},setName:function(a){this.data.writeString(this.address+Hc.$name.address,a)},getMembers:function(){this._members.setAddress(this.data.readInt(this.address+Hc.members.address));return this._members},createMembers:function(a){this._members.allocateNew(a);this.data.writeInt(this.address+Hc.members.address,this._members.getAddress());return this._members},
getAllScenes:function(){return this.data.readBool(this.address+Hc.allScenes.address)},setAllScenes:function(a){this.data.writeBool(this.address+Hc.allScenes.address,a)},__class__:Hc});var vd=function(a){this.data=a};k["com.stencyl.io.mbs.game.MbsCollisionGroup"]=vd;vd.__name__="com.stencyl.io.mbs.game.MbsCollisionGroup";vd.initializeType=function(){null==vd.MBS_COLLISION_GROUP&&(vd.MBS_COLLISION_GROUP=new yb("MbsCollisionGroup"),vd.MBS_COLLISION_GROUP.setInstantiator(function(a){return new vd(a)}),
vd.id=vd.MBS_COLLISION_GROUP.createField("id",K.INTEGER),vd.$name=vd.MBS_COLLISION_GROUP.createField("name",K.STRING))};vd.new_MbsCollisionGroup_list=function(a){return new bb(a,vd.MBS_COLLISION_GROUP,new vd(a))};vd.__super__=fb;vd.prototype=u(fb.prototype,{getMbsType:function(){return vd.MBS_COLLISION_GROUP},allocateNew:function(){this.setAddress(this.data.allocate(vd.MBS_COLLISION_GROUP.getSize()))},getId:function(){return this.data.readInt(this.address+vd.id.address)},setId:function(a){this.data.writeInt(this.address+
vd.id.address,a)},getName:function(){return this.data.readString(this.address+vd.$name.address)},setName:function(a){this.data.writeString(this.address+vd.$name.address,a)},__class__:vd});var wd=function(a){this.data=a};k["com.stencyl.io.mbs.game.MbsCollisionPair"]=wd;wd.__name__="com.stencyl.io.mbs.game.MbsCollisionPair";wd.initializeType=function(){null==wd.MBS_COLLISION_PAIR&&(wd.MBS_COLLISION_PAIR=new yb("MbsCollisionPair"),wd.MBS_COLLISION_PAIR.setInstantiator(function(a){return new wd(a)}),
wd.group1=wd.MBS_COLLISION_PAIR.createField("group1",K.INTEGER),wd.group2=wd.MBS_COLLISION_PAIR.createField("group2",K.INTEGER))};wd.new_MbsCollisionPair_list=function(a){return new bb(a,wd.MBS_COLLISION_PAIR,new wd(a))};wd.__super__=fb;wd.prototype=u(fb.prototype,{getMbsType:function(){return wd.MBS_COLLISION_PAIR},allocateNew:function(){this.setAddress(this.data.allocate(wd.MBS_COLLISION_PAIR.getSize()))},getGroup1:function(){return this.data.readInt(this.address+wd.group1.address)},setGroup1:function(a){this.data.writeInt(this.address+
wd.group1.address,a)},getGroup2:function(){return this.data.readInt(this.address+wd.group2.address)},setGroup2:function(a){this.data.writeInt(this.address+wd.group2.address,a)},__class__:wd});var ud=function(a){this.data=a;this._points=new bb(a,qc.MBS_POINT,new qc(a))};k["com.stencyl.io.mbs.game.MbsCollisionShape"]=ud;ud.__name__="com.stencyl.io.mbs.game.MbsCollisionShape";ud.initializeType=function(){null==ud.MBS_COLLISION_SHAPE&&(ud.MBS_COLLISION_SHAPE=new yb("MbsCollisionShape"),ud.MBS_COLLISION_SHAPE.setInstantiator(function(a){return new ud(a)}),
ud.id=ud.MBS_COLLISION_SHAPE.createField("id",K.INTEGER),ud.points=ud.MBS_COLLISION_SHAPE.createField("points",K.LIST))};ud.new_MbsCollisionShape_list=function(a){return new bb(a,ud.MBS_COLLISION_SHAPE,new ud(a))};ud.__super__=fb;ud.prototype=u(fb.prototype,{getMbsType:function(){return ud.MBS_COLLISION_SHAPE},_points:null,allocateNew:function(){this.setAddress(this.data.allocate(ud.MBS_COLLISION_SHAPE.getSize()))},getId:function(){return this.data.readInt(this.address+ud.id.address)},setId:function(a){this.data.writeInt(this.address+
ud.id.address,a)},getPoints:function(){this._points.setAddress(this.data.readInt(this.address+ud.points.address));return this._points},createPoints:function(a){this._points.allocateNew(a);this.data.writeInt(this.address+ud.points.address,this._points.getAddress());return this._points},__class__:ud});var pc=function(a){this.data=a;this._shapes=new bb(a,ud.MBS_COLLISION_SHAPE,new ud(a));this._atlases=new bb(a,Hc.MBS_ATLAS,new Hc(a));this._autotileFormats=new bb(a,hc.MBS_AUTOTILE_FORMAT,new hc(a));this._groups=
new bb(a,vd.MBS_COLLISION_GROUP,new vd(a));this._cgroups=new bb(a,wd.MBS_COLLISION_PAIR,new wd(a));this._gameAttributes=new bb(a,Ad.MBS_MAP_ELEMENT,new Ad(a))};k["com.stencyl.io.mbs.game.MbsGame"]=pc;pc.__name__="com.stencyl.io.mbs.game.MbsGame";pc.initializeType=function(){null==pc.MBS_GAME&&(pc.MBS_GAME=new yb("MbsGame"),pc.MBS_GAME.setInstantiator(function(a){return new pc(a)}),pc.shapes=pc.MBS_GAME.createField("shapes",K.LIST),pc.atlases=pc.MBS_GAME.createField("atlases",K.LIST),pc.autotileFormats=
pc.MBS_GAME.createField("autotileFormats",K.LIST),pc.groups=pc.MBS_GAME.createField("groups",K.LIST),pc.cgroups=pc.MBS_GAME.createField("cgroups",K.LIST),pc.gameAttributes=pc.MBS_GAME.createField("gameAttributes",K.LIST))};pc.new_MbsGame_list=function(a){return new bb(a,pc.MBS_GAME,new pc(a))};pc.__super__=fb;pc.prototype=u(fb.prototype,{getMbsType:function(){return pc.MBS_GAME},_shapes:null,_atlases:null,_autotileFormats:null,_groups:null,_cgroups:null,_gameAttributes:null,allocateNew:function(){this.setAddress(this.data.allocate(pc.MBS_GAME.getSize()))},
getShapes:function(){this._shapes.setAddress(this.data.readInt(this.address+pc.shapes.address));return this._shapes},createShapes:function(a){this._shapes.allocateNew(a);this.data.writeInt(this.address+pc.shapes.address,this._shapes.getAddress());return this._shapes},getAtlases:function(){this._atlases.setAddress(this.data.readInt(this.address+pc.atlases.address));return this._atlases},createAtlases:function(a){this._atlases.allocateNew(a);this.data.writeInt(this.address+pc.atlases.address,this._atlases.getAddress());
return this._atlases},getAutotileFormats:function(){this._autotileFormats.setAddress(this.data.readInt(this.address+pc.autotileFormats.address));return this._autotileFormats},createAutotileFormats:function(a){this._autotileFormats.allocateNew(a);this.data.writeInt(this.address+pc.autotileFormats.address,this._autotileFormats.getAddress());return this._autotileFormats},getGroups:function(){this._groups.setAddress(this.data.readInt(this.address+pc.groups.address));return this._groups},createGroups:function(a){this._groups.allocateNew(a);
this.data.writeInt(this.address+pc.groups.address,this._groups.getAddress());return this._groups},getCgroups:function(){this._cgroups.setAddress(this.data.readInt(this.address+pc.cgroups.address));return this._cgroups},createCgroups:function(a){this._cgroups.allocateNew(a);this.data.writeInt(this.address+pc.cgroups.address,this._cgroups.getAddress());return this._cgroups},getGameAttributes:function(){this._gameAttributes.setAddress(this.data.readInt(this.address+pc.gameAttributes.address));return this._gameAttributes},
createGameAttributes:function(a){this._gameAttributes.allocateNew(a);this.data.writeInt(this.address+pc.gameAttributes.address,this._gameAttributes.getAddress());return this._gameAttributes},__class__:pc});var hc=function(a){this.data=a;this._corners=new bb(a,cd.MBS_CORNERS,new cd(a));this._flags=new Mf(a)};k["com.stencyl.io.mbs.game.autotile.MbsAutotileFormat"]=hc;hc.__name__="com.stencyl.io.mbs.game.autotile.MbsAutotileFormat";hc.initializeType=function(){null==hc.MBS_AUTOTILE_FORMAT&&(hc.MBS_AUTOTILE_FORMAT=
new yb("MbsAutotileFormat"),hc.MBS_AUTOTILE_FORMAT.setInstantiator(function(a){return new hc(a)}),hc.id=hc.MBS_AUTOTILE_FORMAT.createField("id",K.INTEGER),hc.$name=hc.MBS_AUTOTILE_FORMAT.createField("name",K.STRING),hc.across=hc.MBS_AUTOTILE_FORMAT.createField("across",K.INTEGER),hc.down=hc.MBS_AUTOTILE_FORMAT.createField("down",K.INTEGER),hc.corners=hc.MBS_AUTOTILE_FORMAT.createField("corners",K.LIST),hc.flags=hc.MBS_AUTOTILE_FORMAT.createField("flags",K.LIST))};hc.new_MbsAutotileFormat_list=function(a){return new bb(a,
hc.MBS_AUTOTILE_FORMAT,new hc(a))};hc.__super__=fb;hc.prototype=u(fb.prototype,{getMbsType:function(){return hc.MBS_AUTOTILE_FORMAT},_corners:null,_flags:null,allocateNew:function(){this.setAddress(this.data.allocate(hc.MBS_AUTOTILE_FORMAT.getSize()))},getId:function(){return this.data.readInt(this.address+hc.id.address)},setId:function(a){this.data.writeInt(this.address+hc.id.address,a)},getName:function(){return this.data.readString(this.address+hc.$name.address)},setName:function(a){this.data.writeString(this.address+
hc.$name.address,a)},getAcross:function(){return this.data.readInt(this.address+hc.across.address)},setAcross:function(a){this.data.writeInt(this.address+hc.across.address,a)},getDown:function(){return this.data.readInt(this.address+hc.down.address)},setDown:function(a){this.data.writeInt(this.address+hc.down.address,a)},getCorners:function(){this._corners.setAddress(this.data.readInt(this.address+hc.corners.address));return this._corners},createCorners:function(a){this._corners.allocateNew(a);this.data.writeInt(this.address+
hc.corners.address,this._corners.getAddress());return this._corners},getFlags:function(){this._flags.setAddress(this.data.readInt(this.address+hc.flags.address));return this._flags},createFlags:function(a){this._flags.allocateNew(a);this.data.writeInt(this.address+hc.flags.address,this._flags.getAddress());return this._flags},__class__:hc});var cd=function(a){this.data=a;this._topLeft=new qc(a);this._topRight=new qc(a);this._bottomLeft=new qc(a);this._bottomRight=new qc(a)};k["com.stencyl.io.mbs.game.autotile.MbsCorners"]=
cd;cd.__name__="com.stencyl.io.mbs.game.autotile.MbsCorners";cd.initializeType=function(){null==cd.MBS_CORNERS&&(cd.MBS_CORNERS=new yb("MbsCorners"),cd.MBS_CORNERS.setInstantiator(function(a){return new cd(a)}),cd.topLeft=cd.MBS_CORNERS.createField("topLeft",qc.MBS_POINT),cd.topRight=cd.MBS_CORNERS.createField("topRight",qc.MBS_POINT),cd.bottomLeft=cd.MBS_CORNERS.createField("bottomLeft",qc.MBS_POINT),cd.bottomRight=cd.MBS_CORNERS.createField("bottomRight",qc.MBS_POINT))};cd.new_MbsCorners_list=function(a){return new bb(a,
cd.MBS_CORNERS,new cd(a))};cd.__super__=fb;cd.prototype=u(fb.prototype,{getMbsType:function(){return cd.MBS_CORNERS},_topLeft:null,_topRight:null,_bottomLeft:null,_bottomRight:null,allocateNew:function(){this.setAddress(this.data.allocate(cd.MBS_CORNERS.getSize()))},getTopLeft:function(){this._topLeft.setAddress(this.address+cd.topLeft.address);return this._topLeft},getTopRight:function(){this._topRight.setAddress(this.address+cd.topRight.address);return this._topRight},getBottomLeft:function(){this._bottomLeft.setAddress(this.address+
cd.bottomLeft.address);return this._bottomLeft},getBottomRight:function(){this._bottomRight.setAddress(this.address+cd.bottomRight.address);return this._bottomRight},__class__:cd});var gb=function(a){this.data=a;this._snippets=new bb(a,Ic.MBS_SNIPPET,new Ic(a))};k["com.stencyl.io.mbs.scene.MbsActorInstance"]=gb;gb.__name__="com.stencyl.io.mbs.scene.MbsActorInstance";gb.initializeType=function(){null==gb.MBS_ACTOR_INSTANCE&&(gb.MBS_ACTOR_INSTANCE=new yb("MbsActorInstance"),gb.MBS_ACTOR_INSTANCE.setInstantiator(function(a){return new gb(a)}),
gb.angle=gb.MBS_ACTOR_INSTANCE.createField("angle",K.FLOAT),gb.aid=gb.MBS_ACTOR_INSTANCE.createField("aid",K.INTEGER),gb.customized=gb.MBS_ACTOR_INSTANCE.createField("customized",K.BOOLEAN),gb.groupID=gb.MBS_ACTOR_INSTANCE.createField("groupID",K.INTEGER),gb.id=gb.MBS_ACTOR_INSTANCE.createField("id",K.INTEGER),gb.$name=gb.MBS_ACTOR_INSTANCE.createField("name",K.STRING),gb.scaleX=gb.MBS_ACTOR_INSTANCE.createField("scaleX",K.FLOAT),gb.scaleY=gb.MBS_ACTOR_INSTANCE.createField("scaleY",K.FLOAT),gb.x=
gb.MBS_ACTOR_INSTANCE.createField("x",K.INTEGER),gb.y=gb.MBS_ACTOR_INSTANCE.createField("y",K.INTEGER),gb.z=gb.MBS_ACTOR_INSTANCE.createField("z",K.INTEGER),gb.orderInLayer=gb.MBS_ACTOR_INSTANCE.createField("orderInLayer",K.INTEGER),gb.snippets=gb.MBS_ACTOR_INSTANCE.createField("snippets",K.LIST))};gb.new_MbsActorInstance_list=function(a){return new bb(a,gb.MBS_ACTOR_INSTANCE,new gb(a))};gb.__super__=fb;gb.prototype=u(fb.prototype,{getMbsType:function(){return gb.MBS_ACTOR_INSTANCE},_snippets:null,
allocateNew:function(){this.setAddress(this.data.allocate(gb.MBS_ACTOR_INSTANCE.getSize()))},getAngle:function(){return this.data.readFloat(this.address+gb.angle.address)},setAngle:function(a){this.data.writeFloat(this.address+gb.angle.address,a)},getAid:function(){return this.data.readInt(this.address+gb.aid.address)},setAid:function(a){this.data.writeInt(this.address+gb.aid.address,a)},getCustomized:function(){return this.data.readBool(this.address+gb.customized.address)},setCustomized:function(a){this.data.writeBool(this.address+
gb.customized.address,a)},getGroupID:function(){return this.data.readInt(this.address+gb.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+gb.groupID.address,a)},getId:function(){return this.data.readInt(this.address+gb.id.address)},setId:function(a){this.data.writeInt(this.address+gb.id.address,a)},getName:function(){return this.data.readString(this.address+gb.$name.address)},setName:function(a){this.data.writeString(this.address+gb.$name.address,a)},getScaleX:function(){return this.data.readFloat(this.address+
gb.scaleX.address)},setScaleX:function(a){this.data.writeFloat(this.address+gb.scaleX.address,a)},getScaleY:function(){return this.data.readFloat(this.address+gb.scaleY.address)},setScaleY:function(a){this.data.writeFloat(this.address+gb.scaleY.address,a)},getX:function(){return this.data.readInt(this.address+gb.x.address)},setX:function(a){this.data.writeInt(this.address+gb.x.address,a)},getY:function(){return this.data.readInt(this.address+gb.y.address)},setY:function(a){this.data.writeInt(this.address+
gb.y.address,a)},getZ:function(){return this.data.readInt(this.address+gb.z.address)},setZ:function(a){this.data.writeInt(this.address+gb.z.address,a)},getOrderInLayer:function(){return this.data.readInt(this.address+gb.orderInLayer.address)},setOrderInLayer:function(a){this.data.writeInt(this.address+gb.orderInLayer.address,a)},getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+gb.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);
this.data.writeInt(this.address+gb.snippets.address,this._snippets.getAddress());return this._snippets},__class__:gb});var na=function(a){this.data=a;this._actorInstances=new bb(a,gb.MBS_ACTOR_INSTANCE,new gb(a));this._atlasMembers=new Mf(a);this._layers=new nh(a);this._joints=new nh(a);this._regions=new bb(a,Yb.MBS_REGION,new Yb(a));this._snippets=new bb(a,Ic.MBS_SNIPPET,new Ic(a));this._terrain=new bb(a,ee.MBS_WIREFRAME,new ee(a));this._terrainRegions=new bb(a,Wd.MBS_TERRAIN_REGION,new Wd(a))};
k["com.stencyl.io.mbs.scene.MbsScene"]=na;na.__name__="com.stencyl.io.mbs.scene.MbsScene";na.initializeType=function(){null==na.MBS_SCENE&&(na.MBS_SCENE=new yb("MbsScene"),na.MBS_SCENE.setInstantiator(function(a){return new na(a)}),na.retainAtlases=na.MBS_SCENE.createField("retainAtlases",K.BOOLEAN),na.depth=na.MBS_SCENE.createField("depth",K.INTEGER),na.description=na.MBS_SCENE.createField("description",K.STRING),na.eventSnippetID=na.MBS_SCENE.createField("eventSnippetID",K.INTEGER),na.extendedHeight=
na.MBS_SCENE.createField("extendedHeight",K.INTEGER),na.extendedWidth=na.MBS_SCENE.createField("extendedWidth",K.INTEGER),na.extendedX=na.MBS_SCENE.createField("extendedX",K.INTEGER),na.extendedY=na.MBS_SCENE.createField("extendedY",K.INTEGER),na.format=na.MBS_SCENE.createField("format",K.STRING),na.gravityX=na.MBS_SCENE.createField("gravityX",K.FLOAT),na.gravityY=na.MBS_SCENE.createField("gravityY",K.FLOAT),na.height=na.MBS_SCENE.createField("height",K.INTEGER),na.id=na.MBS_SCENE.createField("id",
K.INTEGER),na.$name=na.MBS_SCENE.createField("name",K.STRING),na.revision=na.MBS_SCENE.createField("revision",K.STRING),na.savecount=na.MBS_SCENE.createField("savecount",K.INTEGER),na.tileDepth=na.MBS_SCENE.createField("tileDepth",K.INTEGER),na.tileHeight=na.MBS_SCENE.createField("tileHeight",K.INTEGER),na.tileWidth=na.MBS_SCENE.createField("tileWidth",K.INTEGER),na.type=na.MBS_SCENE.createField("type",K.STRING),na.width=na.MBS_SCENE.createField("width",K.INTEGER),na.actorInstances=na.MBS_SCENE.createField("actorInstances",
K.LIST),na.atlasMembers=na.MBS_SCENE.createField("atlasMembers",K.LIST),na.layers=na.MBS_SCENE.createField("layers",K.LIST),na.joints=na.MBS_SCENE.createField("joints",K.LIST),na.regions=na.MBS_SCENE.createField("regions",K.LIST),na.snippets=na.MBS_SCENE.createField("snippets",K.LIST),na.terrain=na.MBS_SCENE.createField("terrain",K.LIST),na.terrainRegions=na.MBS_SCENE.createField("terrainRegions",K.LIST))};na.new_MbsScene_list=function(a){return new bb(a,na.MBS_SCENE,new na(a))};na.__super__=fb;na.prototype=
u(fb.prototype,{getMbsType:function(){return na.MBS_SCENE},_actorInstances:null,_atlasMembers:null,_layers:null,_joints:null,_regions:null,_snippets:null,_terrain:null,_terrainRegions:null,allocateNew:function(){this.setAddress(this.data.allocate(na.MBS_SCENE.getSize()))},getRetainAtlases:function(){return this.data.readBool(this.address+na.retainAtlases.address)},setRetainAtlases:function(a){this.data.writeBool(this.address+na.retainAtlases.address,a)},getDepth:function(){return this.data.readInt(this.address+
na.depth.address)},setDepth:function(a){this.data.writeInt(this.address+na.depth.address,a)},getDescription:function(){return this.data.readString(this.address+na.description.address)},setDescription:function(a){this.data.writeString(this.address+na.description.address,a)},getEventSnippetID:function(){return this.data.readInt(this.address+na.eventSnippetID.address)},setEventSnippetID:function(a){this.data.writeInt(this.address+na.eventSnippetID.address,a)},getExtendedHeight:function(){return this.data.readInt(this.address+
na.extendedHeight.address)},setExtendedHeight:function(a){this.data.writeInt(this.address+na.extendedHeight.address,a)},getExtendedWidth:function(){return this.data.readInt(this.address+na.extendedWidth.address)},setExtendedWidth:function(a){this.data.writeInt(this.address+na.extendedWidth.address,a)},getExtendedX:function(){return this.data.readInt(this.address+na.extendedX.address)},setExtendedX:function(a){this.data.writeInt(this.address+na.extendedX.address,a)},getExtendedY:function(){return this.data.readInt(this.address+
na.extendedY.address)},setExtendedY:function(a){this.data.writeInt(this.address+na.extendedY.address,a)},getFormat:function(){return this.data.readString(this.address+na.format.address)},setFormat:function(a){this.data.writeString(this.address+na.format.address,a)},getGravityX:function(){return this.data.readFloat(this.address+na.gravityX.address)},setGravityX:function(a){this.data.writeFloat(this.address+na.gravityX.address,a)},getGravityY:function(){return this.data.readFloat(this.address+na.gravityY.address)},
setGravityY:function(a){this.data.writeFloat(this.address+na.gravityY.address,a)},getHeight:function(){return this.data.readInt(this.address+na.height.address)},setHeight:function(a){this.data.writeInt(this.address+na.height.address,a)},getId:function(){return this.data.readInt(this.address+na.id.address)},setId:function(a){this.data.writeInt(this.address+na.id.address,a)},getName:function(){return this.data.readString(this.address+na.$name.address)},setName:function(a){this.data.writeString(this.address+
na.$name.address,a)},getRevision:function(){return this.data.readString(this.address+na.revision.address)},setRevision:function(a){this.data.writeString(this.address+na.revision.address,a)},getSavecount:function(){return this.data.readInt(this.address+na.savecount.address)},setSavecount:function(a){this.data.writeInt(this.address+na.savecount.address,a)},getTileDepth:function(){return this.data.readInt(this.address+na.tileDepth.address)},setTileDepth:function(a){this.data.writeInt(this.address+na.tileDepth.address,
a)},getTileHeight:function(){return this.data.readInt(this.address+na.tileHeight.address)},setTileHeight:function(a){this.data.writeInt(this.address+na.tileHeight.address,a)},getTileWidth:function(){return this.data.readInt(this.address+na.tileWidth.address)},setTileWidth:function(a){this.data.writeInt(this.address+na.tileWidth.address,a)},getType:function(){return this.data.readString(this.address+na.type.address)},setType:function(a){this.data.writeString(this.address+na.type.address,a)},getWidth:function(){return this.data.readInt(this.address+
na.width.address)},setWidth:function(a){this.data.writeInt(this.address+na.width.address,a)},getActorInstances:function(){this._actorInstances.setAddress(this.data.readInt(this.address+na.actorInstances.address));return this._actorInstances},createActorInstances:function(a){this._actorInstances.allocateNew(a);this.data.writeInt(this.address+na.actorInstances.address,this._actorInstances.getAddress());return this._actorInstances},getAtlasMembers:function(){this._atlasMembers.setAddress(this.data.readInt(this.address+
na.atlasMembers.address));return this._atlasMembers},createAtlasMembers:function(a){this._atlasMembers.allocateNew(a);this.data.writeInt(this.address+na.atlasMembers.address,this._atlasMembers.getAddress());return this._atlasMembers},getLayers:function(){this._layers.setAddress(this.data.readInt(this.address+na.layers.address));return this._layers},createLayers:function(a){this._layers.allocateNew(a);this.data.writeInt(this.address+na.layers.address,this._layers.getAddress());return this._layers},
getJoints:function(){this._joints.setAddress(this.data.readInt(this.address+na.joints.address));return this._joints},createJoints:function(a){this._joints.allocateNew(a);this.data.writeInt(this.address+na.joints.address,this._joints.getAddress());return this._joints},getRegions:function(){this._regions.setAddress(this.data.readInt(this.address+na.regions.address));return this._regions},createRegions:function(a){this._regions.allocateNew(a);this.data.writeInt(this.address+na.regions.address,this._regions.getAddress());
return this._regions},getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+na.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);this.data.writeInt(this.address+na.snippets.address,this._snippets.getAddress());return this._snippets},getTerrain:function(){this._terrain.setAddress(this.data.readInt(this.address+na.terrain.address));return this._terrain},createTerrain:function(a){this._terrain.allocateNew(a);this.data.writeInt(this.address+
na.terrain.address,this._terrain.getAddress());return this._terrain},getTerrainRegions:function(){this._terrainRegions.setAddress(this.data.readInt(this.address+na.terrainRegions.address));return this._terrainRegions},createTerrainRegions:function(a){this._terrainRegions.allocateNew(a);this.data.writeInt(this.address+na.terrainRegions.address,this._terrainRegions.getAddress());return this._terrainRegions},__class__:na});var jd=function(a){this.data=a};k["com.stencyl.io.mbs.scene.MbsSceneHeader"]=
jd;jd.__name__="com.stencyl.io.mbs.scene.MbsSceneHeader";jd.initializeType=function(){null==jd.MBS_SCENE_HEADER&&(jd.MBS_SCENE_HEADER=new yb("MbsSceneHeader"),jd.MBS_SCENE_HEADER.setInstantiator(function(a){return new jd(a)}),jd.id=jd.MBS_SCENE_HEADER.createField("id",K.INTEGER),jd.$name=jd.MBS_SCENE_HEADER.createField("name",K.STRING),jd.description=jd.MBS_SCENE_HEADER.createField("description",K.STRING))};jd.new_MbsSceneHeader_list=function(a){return new bb(a,jd.MBS_SCENE_HEADER,new jd(a))};jd.__super__=
fb;jd.prototype=u(fb.prototype,{getMbsType:function(){return jd.MBS_SCENE_HEADER},allocateNew:function(){this.setAddress(this.data.allocate(jd.MBS_SCENE_HEADER.getSize()))},getId:function(){return this.data.readInt(this.address+jd.id.address)},setId:function(a){this.data.writeInt(this.address+jd.id.address,a)},getName:function(){return this.data.readString(this.address+jd.$name.address)},setName:function(a){this.data.writeString(this.address+jd.$name.address,a)},getDescription:function(){return this.data.readString(this.address+
jd.description.address)},setDescription:function(a){this.data.writeString(this.address+jd.description.address,a)},__class__:jd});var Nb=function(a){this.data=a;this._durations=new Mf(a);this._autotileMerge=new Mf(a)};k["com.stencyl.io.mbs.scene.MbsTile"]=Nb;Nb.__name__="com.stencyl.io.mbs.scene.MbsTile";Nb.initializeType=function(){null==Nb.MBS_TILE&&(Nb.MBS_TILE=new yb("MbsTile"),Nb.MBS_TILE.setInstantiator(function(a){return new Nb(a)}),Nb.collision=Nb.MBS_TILE.createField("collision",K.INTEGER),
Nb.metadata=Nb.MBS_TILE.createField("metadata",K.STRING),Nb.durations=Nb.MBS_TILE.createField("durations",K.LIST),Nb.frames=Nb.MBS_TILE.createField("frames",K.INTEGER),Nb.id=Nb.MBS_TILE.createField("id",K.INTEGER),Nb.order=Nb.MBS_TILE.createField("order",K.INTEGER),Nb.autotile=Nb.MBS_TILE.createField("autotile",K.INTEGER),Nb.autotileMerge=Nb.MBS_TILE.createField("autotileMerge",K.LIST))};Nb.new_MbsTile_list=function(a){return new bb(a,Nb.MBS_TILE,new Nb(a))};Nb.__super__=fb;Nb.prototype=u(fb.prototype,
{getMbsType:function(){return Nb.MBS_TILE},_durations:null,_autotileMerge:null,allocateNew:function(){this.setAddress(this.data.allocate(Nb.MBS_TILE.getSize()))},getCollision:function(){return this.data.readInt(this.address+Nb.collision.address)},setCollision:function(a){this.data.writeInt(this.address+Nb.collision.address,a)},getMetadata:function(){return this.data.readString(this.address+Nb.metadata.address)},setMetadata:function(a){this.data.writeString(this.address+Nb.metadata.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+
Nb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+Nb.durations.address,this._durations.getAddress());return this._durations},getFrames:function(){return this.data.readInt(this.address+Nb.frames.address)},setFrames:function(a){this.data.writeInt(this.address+Nb.frames.address,a)},getId:function(){return this.data.readInt(this.address+Nb.id.address)},setId:function(a){this.data.writeInt(this.address+Nb.id.address,
a)},getOrder:function(){return this.data.readInt(this.address+Nb.order.address)},setOrder:function(a){this.data.writeInt(this.address+Nb.order.address,a)},getAutotile:function(){return this.data.readInt(this.address+Nb.autotile.address)},setAutotile:function(a){this.data.writeInt(this.address+Nb.autotile.address,a)},getAutotileMerge:function(){this._autotileMerge.setAddress(this.data.readInt(this.address+Nb.autotileMerge.address));return this._autotileMerge},createAutotileMerge:function(a){this._autotileMerge.allocateNew(a);
this.data.writeInt(this.address+Nb.autotileMerge.address,this._autotileMerge.getAddress());return this._autotileMerge},__class__:Nb});var ec=function(a){this.data=a;this._tiles=new bb(a,Nb.MBS_TILE,new Nb(a))};k["com.stencyl.io.mbs.scene.MbsTileset"]=ec;ec.__name__="com.stencyl.io.mbs.scene.MbsTileset";ec.initializeType=function(){null==ec.MBS_TILESET&&(qb.initializeType(),ec.MBS_TILESET=new yb("MbsTileset"),ec.MBS_TILESET.setInstantiator(function(a){return new ec(a)}),ec.MBS_TILESET.inherit(qb.MBS_RESOURCE),
ec.across=ec.MBS_TILESET.createField("across",K.INTEGER),ec.down=ec.MBS_TILESET.createField("down",K.INTEGER),ec.readableImages=ec.MBS_TILESET.createField("readableImages",K.BOOLEAN),ec.tileWidth=ec.MBS_TILESET.createField("tileWidth",K.INTEGER),ec.tileHeight=ec.MBS_TILESET.createField("tileHeight",K.INTEGER),ec.tiles=ec.MBS_TILESET.createField("tiles",K.LIST))};ec.new_MbsTileset_list=function(a){return new bb(a,ec.MBS_TILESET,new ec(a))};ec.__super__=qb;ec.prototype=u(qb.prototype,{getMbsType:function(){return ec.MBS_TILESET},
_tiles:null,allocateNew:function(){this.setAddress(this.data.allocate(ec.MBS_TILESET.getSize()))},getAcross:function(){return this.data.readInt(this.address+ec.across.address)},setAcross:function(a){this.data.writeInt(this.address+ec.across.address,a)},getDown:function(){return this.data.readInt(this.address+ec.down.address)},setDown:function(a){this.data.writeInt(this.address+ec.down.address,a)},getReadableImages:function(){return this.data.readBool(this.address+ec.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+
ec.readableImages.address,a)},getTileWidth:function(){return this.data.readInt(this.address+ec.tileWidth.address)},setTileWidth:function(a){this.data.writeInt(this.address+ec.tileWidth.address,a)},getTileHeight:function(){return this.data.readInt(this.address+ec.tileHeight.address)},setTileHeight:function(a){this.data.writeInt(this.address+ec.tileHeight.address,a)},getTiles:function(){this._tiles.setAddress(this.data.readInt(this.address+ec.tiles.address));return this._tiles},createTiles:function(a){this._tiles.allocateNew(a);
this.data.writeInt(this.address+ec.tiles.address,this._tiles.getAddress());return this._tiles},__class__:ec});var ce=function(a){this.data=a};k["com.stencyl.io.mbs.scene.layers.MbsColorBackground"]=ce;ce.__name__="com.stencyl.io.mbs.scene.layers.MbsColorBackground";ce.initializeType=function(){null==ce.MBS_COLOR_BACKGROUND&&(ce.MBS_COLOR_BACKGROUND=new yb("MbsColorBackground"),ce.MBS_COLOR_BACKGROUND.setInstantiator(function(a){return new ce(a)}),ce.color=ce.MBS_COLOR_BACKGROUND.createField("color",
K.INTEGER))};ce.new_MbsColorBackground_list=function(a){return new bb(a,ce.MBS_COLOR_BACKGROUND,new ce(a))};ce.__super__=fb;ce.prototype=u(fb.prototype,{getMbsType:function(){return ce.MBS_COLOR_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(ce.MBS_COLOR_BACKGROUND.getSize()))},getColor:function(){return this.data.readInt(this.address+ce.color.address)},setColor:function(a){this.data.writeInt(this.address+ce.color.address,a)},__class__:ce});var xd=function(a){this.data=a};k["com.stencyl.io.mbs.scene.layers.MbsGradientBackground"]=
xd;xd.__name__="com.stencyl.io.mbs.scene.layers.MbsGradientBackground";xd.initializeType=function(){null==xd.MBS_GRADIENT_BACKGROUND&&(xd.MBS_GRADIENT_BACKGROUND=new yb("MbsGradientBackground"),xd.MBS_GRADIENT_BACKGROUND.setInstantiator(function(a){return new xd(a)}),xd.color1=xd.MBS_GRADIENT_BACKGROUND.createField("color1",K.INTEGER),xd.color2=xd.MBS_GRADIENT_BACKGROUND.createField("color2",K.INTEGER))};xd.new_MbsGradientBackground_list=function(a){return new bb(a,xd.MBS_GRADIENT_BACKGROUND,new xd(a))};
xd.__super__=fb;xd.prototype=u(fb.prototype,{getMbsType:function(){return xd.MBS_GRADIENT_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(xd.MBS_GRADIENT_BACKGROUND.getSize()))},getColor1:function(){return this.data.readInt(this.address+xd.color1.address)},setColor1:function(a){this.data.writeInt(this.address+xd.color1.address,a)},getColor2:function(){return this.data.readInt(this.address+xd.color2.address)},setColor2:function(a){this.data.writeInt(this.address+xd.color2.address,
a)},__class__:xd});var Ra=function(a){this.data=a};k["com.stencyl.io.mbs.scene.layers.MbsLayer"]=Ra;Ra.__name__="com.stencyl.io.mbs.scene.layers.MbsLayer";Ra.initializeType=function(){null==Ra.MBS_LAYER&&(Ra.MBS_LAYER=new yb("MbsLayer"),Ra.MBS_LAYER.setInstantiator(function(a){return new Ra(a)}),Ra.id=Ra.MBS_LAYER.createField("id",K.INTEGER),Ra.$name=Ra.MBS_LAYER.createField("name",K.STRING),Ra.order=Ra.MBS_LAYER.createField("order",K.INTEGER),Ra.opacity=Ra.MBS_LAYER.createField("opacity",K.INTEGER),
Ra.blendmode=Ra.MBS_LAYER.createField("blendmode",K.STRING),Ra.scrollFactorX=Ra.MBS_LAYER.createField("scrollFactorX",K.FLOAT),Ra.scrollFactorY=Ra.MBS_LAYER.createField("scrollFactorY",K.FLOAT),Ra.visible=Ra.MBS_LAYER.createField("visible",K.BOOLEAN),Ra.locked=Ra.MBS_LAYER.createField("locked",K.BOOLEAN))};Ra.new_MbsLayer_list=function(a){return new bb(a,Ra.MBS_LAYER,new Ra(a))};Ra.__super__=fb;Ra.prototype=u(fb.prototype,{getMbsType:function(){return Ra.MBS_LAYER},allocateNew:function(){this.setAddress(this.data.allocate(Ra.MBS_LAYER.getSize()))},
getId:function(){return this.data.readInt(this.address+Ra.id.address)},setId:function(a){this.data.writeInt(this.address+Ra.id.address,a)},getName:function(){return this.data.readString(this.address+Ra.$name.address)},setName:function(a){this.data.writeString(this.address+Ra.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+Ra.order.address)},setOrder:function(a){this.data.writeInt(this.address+Ra.order.address,a)},getOpacity:function(){return this.data.readInt(this.address+
Ra.opacity.address)},setOpacity:function(a){this.data.writeInt(this.address+Ra.opacity.address,a)},getBlendmode:function(){return this.data.readString(this.address+Ra.blendmode.address)},setBlendmode:function(a){this.data.writeString(this.address+Ra.blendmode.address,a)},getScrollFactorX:function(){return this.data.readFloat(this.address+Ra.scrollFactorX.address)},setScrollFactorX:function(a){this.data.writeFloat(this.address+Ra.scrollFactorX.address,a)},getScrollFactorY:function(){return this.data.readFloat(this.address+
Ra.scrollFactorY.address)},setScrollFactorY:function(a){this.data.writeFloat(this.address+Ra.scrollFactorY.address,a)},getVisible:function(){return this.data.readBool(this.address+Ra.visible.address)},setVisible:function(a){this.data.writeBool(this.address+Ra.visible.address,a)},getLocked:function(){return this.data.readBool(this.address+Ra.locked.address)},setLocked:function(a){this.data.writeBool(this.address+Ra.locked.address,a)},__class__:Ra});var yd=function(a){this.data=a};k["com.stencyl.io.mbs.scene.layers.MbsImageBackground"]=
yd;yd.__name__="com.stencyl.io.mbs.scene.layers.MbsImageBackground";yd.initializeType=function(){null==yd.MBS_IMAGE_BACKGROUND&&(Ra.initializeType(),yd.MBS_IMAGE_BACKGROUND=new yb("MbsImageBackground"),yd.MBS_IMAGE_BACKGROUND.setInstantiator(function(a){return new yd(a)}),yd.MBS_IMAGE_BACKGROUND.inherit(Ra.MBS_LAYER),yd.resourceID=yd.MBS_IMAGE_BACKGROUND.createField("resourceID",K.INTEGER),yd.customScroll=yd.MBS_IMAGE_BACKGROUND.createField("customScroll",K.BOOLEAN))};yd.new_MbsImageBackground_list=
function(a){return new bb(a,yd.MBS_IMAGE_BACKGROUND,new yd(a))};yd.__super__=Ra;yd.prototype=u(Ra.prototype,{getMbsType:function(){return yd.MBS_IMAGE_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(yd.MBS_IMAGE_BACKGROUND.getSize()))},getResourceID:function(){return this.data.readInt(this.address+yd.resourceID.address)},setResourceID:function(a){this.data.writeInt(this.address+yd.resourceID.address,a)},getCustomScroll:function(){return this.data.readBool(this.address+yd.customScroll.address)},
setCustomScroll:function(a){this.data.writeBool(this.address+yd.customScroll.address,a)},__class__:yd});var de=function(a){this.data=a};k["com.stencyl.io.mbs.scene.layers.MbsInteractiveLayer"]=de;de.__name__="com.stencyl.io.mbs.scene.layers.MbsInteractiveLayer";de.initializeType=function(){null==de.MBS_INTERACTIVE_LAYER&&(Ra.initializeType(),de.MBS_INTERACTIVE_LAYER=new yb("MbsInteractiveLayer"),de.MBS_INTERACTIVE_LAYER.setInstantiator(function(a){return new de(a)}),de.MBS_INTERACTIVE_LAYER.inherit(Ra.MBS_LAYER),
de.color=de.MBS_INTERACTIVE_LAYER.createField("color",K.INTEGER))};de.new_MbsInteractiveLayer_list=function(a){return new bb(a,de.MBS_INTERACTIVE_LAYER,new de(a))};de.__super__=Ra;de.prototype=u(Ra.prototype,{getMbsType:function(){return de.MBS_INTERACTIVE_LAYER},allocateNew:function(){this.setAddress(this.data.allocate(de.MBS_INTERACTIVE_LAYER.getSize()))},getColor:function(){return this.data.readInt(this.address+de.color.address)},setColor:function(a){this.data.writeInt(this.address+de.color.address,
a)},__class__:de});var Tb=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsJoint"]=Tb;Tb.__name__="com.stencyl.io.mbs.scene.physics.MbsJoint";Tb.initializeType=function(){null==Tb.MBS_JOINT&&(Tb.MBS_JOINT=new yb("MbsJoint"),Tb.MBS_JOINT.setInstantiator(function(a){return new Tb(a)}),Tb.id=Tb.MBS_JOINT.createField("id",K.INTEGER),Tb.$name=Tb.MBS_JOINT.createField("name",K.STRING),Tb.actor1=Tb.MBS_JOINT.createField("actor1",K.INTEGER),Tb.actor2=Tb.MBS_JOINT.createField("actor2",K.INTEGER),
Tb.collide=Tb.MBS_JOINT.createField("collide",K.BOOLEAN))};Tb.new_MbsJoint_list=function(a){return new bb(a,Tb.MBS_JOINT,new Tb(a))};Tb.__super__=fb;Tb.prototype=u(fb.prototype,{getMbsType:function(){return Tb.MBS_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(Tb.MBS_JOINT.getSize()))},getId:function(){return this.data.readInt(this.address+Tb.id.address)},setId:function(a){this.data.writeInt(this.address+Tb.id.address,a)},getName:function(){return this.data.readString(this.address+
Tb.$name.address)},setName:function(a){this.data.writeString(this.address+Tb.$name.address,a)},getActor1:function(){return this.data.readInt(this.address+Tb.actor1.address)},setActor1:function(a){this.data.writeInt(this.address+Tb.actor1.address,a)},getActor2:function(){return this.data.readInt(this.address+Tb.actor2.address)},setActor2:function(a){this.data.writeInt(this.address+Tb.actor2.address,a)},getCollide:function(){return this.data.readBool(this.address+Tb.collide.address)},setCollide:function(a){this.data.writeBool(this.address+
Tb.collide.address,a)},__class__:Tb});var fc=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsHingeJoint"]=fc;fc.__name__="com.stencyl.io.mbs.scene.physics.MbsHingeJoint";fc.initializeType=function(){null==fc.MBS_HINGE_JOINT&&(Tb.initializeType(),fc.MBS_HINGE_JOINT=new yb("MbsHingeJoint"),fc.MBS_HINGE_JOINT.setInstantiator(function(a){return new fc(a)}),fc.MBS_HINGE_JOINT.inherit(Tb.MBS_JOINT),fc.limit=fc.MBS_HINGE_JOINT.createField("limit",K.BOOLEAN),fc.motor=fc.MBS_HINGE_JOINT.createField("motor",
K.BOOLEAN),fc.lower=fc.MBS_HINGE_JOINT.createField("lower",K.FLOAT),fc.upper=fc.MBS_HINGE_JOINT.createField("upper",K.FLOAT),fc.torque=fc.MBS_HINGE_JOINT.createField("torque",K.FLOAT),fc.speed=fc.MBS_HINGE_JOINT.createField("speed",K.FLOAT))};fc.new_MbsHingeJoint_list=function(a){return new bb(a,fc.MBS_HINGE_JOINT,new fc(a))};fc.__super__=Tb;fc.prototype=u(Tb.prototype,{getMbsType:function(){return fc.MBS_HINGE_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(fc.MBS_HINGE_JOINT.getSize()))},
getLimit:function(){return this.data.readBool(this.address+fc.limit.address)},setLimit:function(a){this.data.writeBool(this.address+fc.limit.address,a)},getMotor:function(){return this.data.readBool(this.address+fc.motor.address)},setMotor:function(a){this.data.writeBool(this.address+fc.motor.address,a)},getLower:function(){return this.data.readFloat(this.address+fc.lower.address)},setLower:function(a){this.data.writeFloat(this.address+fc.lower.address,a)},getUpper:function(){return this.data.readFloat(this.address+
fc.upper.address)},setUpper:function(a){this.data.writeFloat(this.address+fc.upper.address,a)},getTorque:function(){return this.data.readFloat(this.address+fc.torque.address)},setTorque:function(a){this.data.writeFloat(this.address+fc.torque.address,a)},getSpeed:function(){return this.data.readFloat(this.address+fc.speed.address)},setSpeed:function(a){this.data.writeFloat(this.address+fc.speed.address,a)},__class__:fc});var Yb=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsRegion"]=
Yb;Yb.__name__="com.stencyl.io.mbs.scene.physics.MbsRegion";Yb.initializeType=function(){null==Yb.MBS_REGION&&(Yb.MBS_REGION=new yb("MbsRegion"),Yb.MBS_REGION.setInstantiator(function(a){return new Yb(a)}),Yb.color=Yb.MBS_REGION.createField("color",K.INTEGER),Yb.id=Yb.MBS_REGION.createField("id",K.INTEGER),Yb.$name=Yb.MBS_REGION.createField("name",K.STRING),Yb.shape=Yb.MBS_REGION.createField("shape",K.DYNAMIC),Yb.x=Yb.MBS_REGION.createField("x",K.INTEGER),Yb.y=Yb.MBS_REGION.createField("y",K.INTEGER))};
Yb.new_MbsRegion_list=function(a){return new bb(a,Yb.MBS_REGION,new Yb(a))};Yb.__super__=fb;Yb.prototype=u(fb.prototype,{getMbsType:function(){return Yb.MBS_REGION},allocateNew:function(){this.setAddress(this.data.allocate(Yb.MBS_REGION.getSize()))},getColor:function(){return this.data.readInt(this.address+Yb.color.address)},setColor:function(a){this.data.writeInt(this.address+Yb.color.address,a)},getId:function(){return this.data.readInt(this.address+Yb.id.address)},setId:function(a){this.data.writeInt(this.address+
Yb.id.address,a)},getName:function(){return this.data.readString(this.address+Yb.$name.address)},setName:function(a){this.data.writeString(this.address+Yb.$name.address,a)},getShape:function(){return be.readDynamic(this.data,this.address+Yb.shape.address)},setShape:function(a){be.writeDynamic(this.data,this.address+Yb.shape.address,a)},getX:function(){return this.data.readInt(this.address+Yb.x.address)},setX:function(a){this.data.writeInt(this.address+Yb.x.address,a)},getY:function(){return this.data.readInt(this.address+
Yb.y.address)},setY:function(a){this.data.writeInt(this.address+Yb.y.address,a)},__class__:Yb});var Ob=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsSlidingJoint"]=Ob;Ob.__name__="com.stencyl.io.mbs.scene.physics.MbsSlidingJoint";Ob.initializeType=function(){null==Ob.MBS_SLIDING_JOINT&&(Tb.initializeType(),Ob.MBS_SLIDING_JOINT=new yb("MbsSlidingJoint"),Ob.MBS_SLIDING_JOINT.setInstantiator(function(a){return new Ob(a)}),Ob.MBS_SLIDING_JOINT.inherit(Tb.MBS_JOINT),Ob.limit=Ob.MBS_SLIDING_JOINT.createField("limit",
K.BOOLEAN),Ob.motor=Ob.MBS_SLIDING_JOINT.createField("motor",K.BOOLEAN),Ob.lower=Ob.MBS_SLIDING_JOINT.createField("lower",K.FLOAT),Ob.upper=Ob.MBS_SLIDING_JOINT.createField("upper",K.FLOAT),Ob.force=Ob.MBS_SLIDING_JOINT.createField("force",K.FLOAT),Ob.speed=Ob.MBS_SLIDING_JOINT.createField("speed",K.FLOAT),Ob.x=Ob.MBS_SLIDING_JOINT.createField("x",K.FLOAT),Ob.y=Ob.MBS_SLIDING_JOINT.createField("y",K.FLOAT))};Ob.new_MbsSlidingJoint_list=function(a){return new bb(a,Ob.MBS_SLIDING_JOINT,new Ob(a))};
Ob.__super__=Tb;Ob.prototype=u(Tb.prototype,{getMbsType:function(){return Ob.MBS_SLIDING_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(Ob.MBS_SLIDING_JOINT.getSize()))},getLimit:function(){return this.data.readBool(this.address+Ob.limit.address)},setLimit:function(a){this.data.writeBool(this.address+Ob.limit.address,a)},getMotor:function(){return this.data.readBool(this.address+Ob.motor.address)},setMotor:function(a){this.data.writeBool(this.address+Ob.motor.address,a)},getLower:function(){return this.data.readFloat(this.address+
Ob.lower.address)},setLower:function(a){this.data.writeFloat(this.address+Ob.lower.address,a)},getUpper:function(){return this.data.readFloat(this.address+Ob.upper.address)},setUpper:function(a){this.data.writeFloat(this.address+Ob.upper.address,a)},getForce:function(){return this.data.readFloat(this.address+Ob.force.address)},setForce:function(a){this.data.writeFloat(this.address+Ob.force.address,a)},getSpeed:function(){return this.data.readFloat(this.address+Ob.speed.address)},setSpeed:function(a){this.data.writeFloat(this.address+
Ob.speed.address,a)},getX:function(){return this.data.readFloat(this.address+Ob.x.address)},setX:function(a){this.data.writeFloat(this.address+Ob.x.address,a)},getY:function(){return this.data.readFloat(this.address+Ob.y.address)},setY:function(a){this.data.writeFloat(this.address+Ob.y.address,a)},__class__:Ob});var zd=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsStickJoint"]=zd;zd.__name__="com.stencyl.io.mbs.scene.physics.MbsStickJoint";zd.initializeType=function(){null==zd.MBS_STICK_JOINT&&
(Tb.initializeType(),zd.MBS_STICK_JOINT=new yb("MbsStickJoint"),zd.MBS_STICK_JOINT.setInstantiator(function(a){return new zd(a)}),zd.MBS_STICK_JOINT.inherit(Tb.MBS_JOINT),zd.damping=zd.MBS_STICK_JOINT.createField("damping",K.FLOAT),zd.frequency=zd.MBS_STICK_JOINT.createField("frequency",K.FLOAT))};zd.new_MbsStickJoint_list=function(a){return new bb(a,zd.MBS_STICK_JOINT,new zd(a))};zd.__super__=Tb;zd.prototype=u(Tb.prototype,{getMbsType:function(){return zd.MBS_STICK_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(zd.MBS_STICK_JOINT.getSize()))},
getDamping:function(){return this.data.readFloat(this.address+zd.damping.address)},setDamping:function(a){this.data.writeFloat(this.address+zd.damping.address,a)},getFrequency:function(){return this.data.readFloat(this.address+zd.frequency.address)},setFrequency:function(a){this.data.writeFloat(this.address+zd.frequency.address,a)},__class__:zd});var Wd=function(a){this.data=a};k["com.stencyl.io.mbs.scene.physics.MbsTerrainRegion"]=Wd;Wd.__name__="com.stencyl.io.mbs.scene.physics.MbsTerrainRegion";
Wd.initializeType=function(){null==Wd.MBS_TERRAIN_REGION&&(Yb.initializeType(),Wd.MBS_TERRAIN_REGION=new yb("MbsTerrainRegion"),Wd.MBS_TERRAIN_REGION.setInstantiator(function(a){return new Wd(a)}),Wd.MBS_TERRAIN_REGION.inherit(Yb.MBS_REGION),Wd.groupID=Wd.MBS_TERRAIN_REGION.createField("groupID",K.INTEGER))};Wd.new_MbsTerrainRegion_list=function(a){return new bb(a,Wd.MBS_TERRAIN_REGION,new Wd(a))};Wd.__super__=Yb;Wd.prototype=u(Yb.prototype,{getMbsType:function(){return Wd.MBS_TERRAIN_REGION},allocateNew:function(){this.setAddress(this.data.allocate(Wd.MBS_TERRAIN_REGION.getSize()))},
getGroupID:function(){return this.data.readInt(this.address+Wd.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+Wd.groupID.address,a)},__class__:Wd});var Pd=function(a){this.data=a};k["com.stencyl.io.mbs.shape.MbsShape"]=Pd;Pd.__name__="com.stencyl.io.mbs.shape.MbsShape";Pd.initializeType=function(){null==Pd.MBS_SHAPE&&(Pd.MBS_SHAPE=new yb("MbsShape"),Pd.MBS_SHAPE.setInstantiator(function(a){return new Pd(a)}))};Pd.new_MbsShape_list=function(a){return new bb(a,Pd.MBS_SHAPE,
new Pd(a))};Pd.__super__=fb;Pd.prototype=u(fb.prototype,{getMbsType:function(){return Pd.MBS_SHAPE},allocateNew:function(){this.setAddress(this.data.allocate(Pd.MBS_SHAPE.getSize()))},__class__:Pd});var Ed=function(a){this.data=a;this._position=new qc(a)};k["com.stencyl.io.mbs.shape.MbsCircle"]=Ed;Ed.__name__="com.stencyl.io.mbs.shape.MbsCircle";Ed.initializeType=function(){null==Ed.MBS_CIRCLE&&(Pd.initializeType(),Ed.MBS_CIRCLE=new yb("MbsCircle"),Ed.MBS_CIRCLE.setInstantiator(function(a){return new Ed(a)}),
Ed.MBS_CIRCLE.inherit(Pd.MBS_SHAPE),Ed.position=Ed.MBS_CIRCLE.createField("position",qc.MBS_POINT),Ed.radius=Ed.MBS_CIRCLE.createField("radius",K.FLOAT))};Ed.new_MbsCircle_list=function(a){return new bb(a,Ed.MBS_CIRCLE,new Ed(a))};Ed.__super__=Pd;Ed.prototype=u(Pd.prototype,{getMbsType:function(){return Ed.MBS_CIRCLE},_position:null,allocateNew:function(){this.setAddress(this.data.allocate(Ed.MBS_CIRCLE.getSize()))},getPosition:function(){this._position.setAddress(this.address+Ed.position.address);
return this._position},getRadius:function(){return this.data.readFloat(this.address+Ed.radius.address)},setRadius:function(a){this.data.writeFloat(this.address+Ed.radius.address,a)},__class__:Ed});var qc=function(a){this.data=a};k["com.stencyl.io.mbs.shape.MbsPoint"]=qc;qc.__name__="com.stencyl.io.mbs.shape.MbsPoint";qc.initializeType=function(){null==qc.MBS_POINT&&(qc.MBS_POINT=new yb("MbsPoint"),qc.MBS_POINT.setInstantiator(function(a){return new qc(a)}),qc.x=qc.MBS_POINT.createField("x",K.FLOAT),
qc.y=qc.MBS_POINT.createField("y",K.FLOAT))};qc.new_MbsPoint_list=function(a){return new bb(a,qc.MBS_POINT,new qc(a))};qc.__super__=fb;qc.prototype=u(fb.prototype,{getMbsType:function(){return qc.MBS_POINT},allocateNew:function(){this.setAddress(this.data.allocate(qc.MBS_POINT.getSize()))},getX:function(){return this.data.readFloat(this.address+qc.x.address)},setX:function(a){this.data.writeFloat(this.address+qc.x.address,a)},getY:function(){return this.data.readFloat(this.address+qc.y.address)},
setY:function(a){this.data.writeFloat(this.address+qc.y.address,a)},__class__:qc});var Tc=function(a){this.data=a;this._points=new bb(a,qc.MBS_POINT,new qc(a))};k["com.stencyl.io.mbs.shape.MbsPolygon"]=Tc;Tc.__name__="com.stencyl.io.mbs.shape.MbsPolygon";Tc.initializeType=function(){null==Tc.MBS_POLYGON&&(Pd.initializeType(),Tc.MBS_POLYGON=new yb("MbsPolygon"),Tc.MBS_POLYGON.setInstantiator(function(a){return new Tc(a)}),Tc.MBS_POLYGON.inherit(Pd.MBS_SHAPE),Tc.points=Tc.MBS_POLYGON.createField("points",
K.LIST))};Tc.new_MbsPolygon_list=function(a){return new bb(a,Tc.MBS_POLYGON,new Tc(a))};Tc.__super__=Pd;Tc.prototype=u(Pd.prototype,{getMbsType:function(){return Tc.MBS_POLYGON},_points:null,allocateNew:function(){this.setAddress(this.data.allocate(Tc.MBS_POLYGON.getSize()))},getPoints:function(){this._points.setAddress(this.data.readInt(this.address+Tc.points.address));return this._points},createPoints:function(a){this._points.allocateNew(a);this.data.writeInt(this.address+Tc.points.address,this._points.getAddress());
return this._points},__class__:Tc});var od=function(a){Tc.call(this,a)};k["com.stencyl.io.mbs.shape.MbsPolyRegion"]=od;od.__name__="com.stencyl.io.mbs.shape.MbsPolyRegion";od.initializeType=function(){null==od.MBS_POLY_REGION&&(Tc.initializeType(),od.MBS_POLY_REGION=new yb("MbsPolyRegion"),od.MBS_POLY_REGION.setInstantiator(function(a){return new od(a)}),od.MBS_POLY_REGION.inherit(Tc.MBS_POLYGON),od.width=od.MBS_POLY_REGION.createField("width",K.INTEGER),od.height=od.MBS_POLY_REGION.createField("height",
K.INTEGER))};od.new_MbsPolyRegion_list=function(a){return new bb(a,od.MBS_POLY_REGION,new od(a))};od.__super__=Tc;od.prototype=u(Tc.prototype,{getMbsType:function(){return od.MBS_POLY_REGION},allocateNew:function(){this.setAddress(this.data.allocate(od.MBS_POLY_REGION.getSize()))},getWidth:function(){return this.data.readInt(this.address+od.width.address)},setWidth:function(a){this.data.writeInt(this.address+od.width.address,a)},getHeight:function(){return this.data.readInt(this.address+od.height.address)},
setHeight:function(a){this.data.writeInt(this.address+od.height.address,a)},__class__:od});var ee=function(a){Tc.call(this,a);this._position=new qc(a)};k["com.stencyl.io.mbs.shape.MbsWireframe"]=ee;ee.__name__="com.stencyl.io.mbs.shape.MbsWireframe";ee.initializeType=function(){null==ee.MBS_WIREFRAME&&(Tc.initializeType(),ee.MBS_WIREFRAME=new yb("MbsWireframe"),ee.MBS_WIREFRAME.setInstantiator(function(a){return new ee(a)}),ee.MBS_WIREFRAME.inherit(Tc.MBS_POLYGON),ee.position=ee.MBS_WIREFRAME.createField("position",
qc.MBS_POINT))};ee.new_MbsWireframe_list=function(a){return new bb(a,ee.MBS_WIREFRAME,new ee(a))};ee.__super__=Tc;ee.prototype=u(Tc.prototype,{getMbsType:function(){return ee.MBS_WIREFRAME},_position:null,allocateNew:function(){this.setAddress(this.data.allocate(ee.MBS_WIREFRAME.getSize()))},getPosition:function(){this._position.setAddress(this.address+ee.position.address);return this._position},__class__:ee});var bd=function(a){this.data=a};k["com.stencyl.io.mbs.snippet.MbsAttribute"]=bd;bd.__name__=
"com.stencyl.io.mbs.snippet.MbsAttribute";bd.initializeType=function(){null==bd.MBS_ATTRIBUTE&&(bd.MBS_ATTRIBUTE=new yb("MbsAttribute"),bd.MBS_ATTRIBUTE.setInstantiator(function(a){return new bd(a)}),bd.id=bd.MBS_ATTRIBUTE.createField("id",K.INTEGER),bd.type=bd.MBS_ATTRIBUTE.createField("type",K.STRING),bd.value=bd.MBS_ATTRIBUTE.createField("value",K.DYNAMIC))};bd.new_MbsAttribute_list=function(a){return new bb(a,bd.MBS_ATTRIBUTE,new bd(a))};bd.__super__=fb;bd.prototype=u(fb.prototype,{getMbsType:function(){return bd.MBS_ATTRIBUTE},
allocateNew:function(){this.setAddress(this.data.allocate(bd.MBS_ATTRIBUTE.getSize()))},getId:function(){return this.data.readInt(this.address+bd.id.address)},setId:function(a){this.data.writeInt(this.address+bd.id.address,a)},getType:function(){return this.data.readString(this.address+bd.type.address)},setType:function(a){this.data.writeString(this.address+bd.type.address,a)},getValue:function(){return be.readDynamic(this.data,this.address+bd.value.address)},setValue:function(a){be.writeDynamic(this.data,
this.address+bd.value.address,a)},__class__:bd});var Bb=function(a){this.data=a};k["com.stencyl.io.mbs.snippet.MbsAttributeDef"]=Bb;Bb.__name__="com.stencyl.io.mbs.snippet.MbsAttributeDef";Bb.initializeType=function(){null==Bb.MBS_ATTRIBUTE_DEF&&(Bb.MBS_ATTRIBUTE_DEF=new yb("MbsAttributeDef"),Bb.MBS_ATTRIBUTE_DEF.setInstantiator(function(a){return new Bb(a)}),Bb.type=Bb.MBS_ATTRIBUTE_DEF.createField("type",K.STRING),Bb.defaultValue=Bb.MBS_ATTRIBUTE_DEF.createField("defaultValue",K.DYNAMIC),Bb.description=
Bb.MBS_ATTRIBUTE_DEF.createField("description",K.STRING),Bb.dropdown=Bb.MBS_ATTRIBUTE_DEF.createField("dropdown",K.STRING),Bb.fullname=Bb.MBS_ATTRIBUTE_DEF.createField("fullname",K.STRING),Bb.hidden=Bb.MBS_ATTRIBUTE_DEF.createField("hidden",K.BOOLEAN),Bb.id=Bb.MBS_ATTRIBUTE_DEF.createField("id",K.INTEGER),Bb.$name=Bb.MBS_ATTRIBUTE_DEF.createField("name",K.STRING),Bb.order=Bb.MBS_ATTRIBUTE_DEF.createField("order",K.INTEGER))};Bb.new_MbsAttributeDef_list=function(a){return new bb(a,Bb.MBS_ATTRIBUTE_DEF,
new Bb(a))};Bb.__super__=fb;Bb.prototype=u(fb.prototype,{getMbsType:function(){return Bb.MBS_ATTRIBUTE_DEF},allocateNew:function(){this.setAddress(this.data.allocate(Bb.MBS_ATTRIBUTE_DEF.getSize()))},getType:function(){return this.data.readString(this.address+Bb.type.address)},setType:function(a){this.data.writeString(this.address+Bb.type.address,a)},getDefaultValue:function(){return be.readDynamic(this.data,this.address+Bb.defaultValue.address)},setDefaultValue:function(a){be.writeDynamic(this.data,
this.address+Bb.defaultValue.address,a)},getDescription:function(){return this.data.readString(this.address+Bb.description.address)},setDescription:function(a){this.data.writeString(this.address+Bb.description.address,a)},getDropdown:function(){return this.data.readString(this.address+Bb.dropdown.address)},setDropdown:function(a){this.data.writeString(this.address+Bb.dropdown.address,a)},getFullname:function(){return this.data.readString(this.address+Bb.fullname.address)},setFullname:function(a){this.data.writeString(this.address+
Bb.fullname.address,a)},getHidden:function(){return this.data.readBool(this.address+Bb.hidden.address)},setHidden:function(a){this.data.writeBool(this.address+Bb.hidden.address,a)},getId:function(){return this.data.readInt(this.address+Bb.id.address)},setId:function(a){this.data.writeInt(this.address+Bb.id.address,a)},getName:function(){return this.data.readString(this.address+Bb.$name.address)},setName:function(a){this.data.writeString(this.address+Bb.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+
Bb.order.address)},setOrder:function(a){this.data.writeInt(this.address+Bb.order.address,a)},__class__:Bb});var ad=function(a){this.data=a};k["com.stencyl.io.mbs.snippet.MbsBlock"]=ad;ad.__name__="com.stencyl.io.mbs.snippet.MbsBlock";ad.initializeType=function(){null==ad.MBS_BLOCK&&(ad.MBS_BLOCK=new yb("MbsBlock"),ad.MBS_BLOCK.setInstantiator(function(a){return new ad(a)}),ad.type=ad.MBS_BLOCK.createField("type",K.STRING),ad.id=ad.MBS_BLOCK.createField("id",K.INTEGER),ad.blockID=ad.MBS_BLOCK.createField("blockID",
K.INTEGER))};ad.new_MbsBlock_list=function(a){return new bb(a,ad.MBS_BLOCK,new ad(a))};ad.__super__=fb;ad.prototype=u(fb.prototype,{getMbsType:function(){return ad.MBS_BLOCK},allocateNew:function(){this.setAddress(this.data.allocate(ad.MBS_BLOCK.getSize()))},getType:function(){return this.data.readString(this.address+ad.type.address)},setType:function(a){this.data.writeString(this.address+ad.type.address,a)},getId:function(){return this.data.readInt(this.address+ad.id.address)},setId:function(a){this.data.writeInt(this.address+
ad.id.address,a)},getBlockID:function(){return this.data.readInt(this.address+ad.blockID.address)},setBlockID:function(a){this.data.writeInt(this.address+ad.blockID.address,a)},__class__:ad});var gc=function(a){this.data=a};k["com.stencyl.io.mbs.snippet.MbsEvent"]=gc;gc.__name__="com.stencyl.io.mbs.snippet.MbsEvent";gc.initializeType=function(){null==gc.MBS_EVENT&&(gc.MBS_EVENT=new yb("MbsEvent"),gc.MBS_EVENT.setInstantiator(function(a){return new gc(a)}),gc.displayName=gc.MBS_EVENT.createField("displayName",
K.STRING),gc.enabled=gc.MBS_EVENT.createField("enabled",K.BOOLEAN),gc.id=gc.MBS_EVENT.createField("id",K.INTEGER),gc.$name=gc.MBS_EVENT.createField("name",K.STRING),gc.order=gc.MBS_EVENT.createField("order",K.INTEGER),gc.repeats=gc.MBS_EVENT.createField("repeats",K.BOOLEAN))};gc.new_MbsEvent_list=function(a){return new bb(a,gc.MBS_EVENT,new gc(a))};gc.__super__=fb;gc.prototype=u(fb.prototype,{getMbsType:function(){return gc.MBS_EVENT},allocateNew:function(){this.setAddress(this.data.allocate(gc.MBS_EVENT.getSize()))},
getDisplayName:function(){return this.data.readString(this.address+gc.displayName.address)},setDisplayName:function(a){this.data.writeString(this.address+gc.displayName.address,a)},getEnabled:function(){return this.data.readBool(this.address+gc.enabled.address)},setEnabled:function(a){this.data.writeBool(this.address+gc.enabled.address,a)},getId:function(){return this.data.readInt(this.address+gc.id.address)},setId:function(a){this.data.writeInt(this.address+gc.id.address,a)},getName:function(){return this.data.readString(this.address+
gc.$name.address)},setName:function(a){this.data.writeString(this.address+gc.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+gc.order.address)},setOrder:function(a){this.data.writeInt(this.address+gc.order.address,a)},getRepeats:function(){return this.data.readBool(this.address+gc.repeats.address)},setRepeats:function(a){this.data.writeBool(this.address+gc.repeats.address,a)},__class__:gc});var Ad=function(a){this.data=a};k["com.stencyl.io.mbs.snippet.MbsMapElement"]=Ad;
Ad.__name__="com.stencyl.io.mbs.snippet.MbsMapElement";Ad.initializeType=function(){null==Ad.MBS_MAP_ELEMENT&&(Ad.MBS_MAP_ELEMENT=new yb("MbsMapElement"),Ad.MBS_MAP_ELEMENT.setInstantiator(function(a){return new Ad(a)}),Ad.key=Ad.MBS_MAP_ELEMENT.createField("key",K.STRING),Ad.value=Ad.MBS_MAP_ELEMENT.createField("value",K.DYNAMIC))};Ad.new_MbsMapElement_list=function(a){return new bb(a,Ad.MBS_MAP_ELEMENT,new Ad(a))};Ad.__super__=fb;Ad.prototype=u(fb.prototype,{getMbsType:function(){return Ad.MBS_MAP_ELEMENT},
allocateNew:function(){this.setAddress(this.data.allocate(Ad.MBS_MAP_ELEMENT.getSize()))},getKey:function(){return this.data.readString(this.address+Ad.key.address)},setKey:function(a){this.data.writeString(this.address+Ad.key.address,a)},getValue:function(){return be.readDynamic(this.data,this.address+Ad.value.address)},setValue:function(a){be.writeDynamic(this.data,this.address+Ad.value.address,a)},__class__:Ad});var Ic=function(a){this.data=a;this._properties=new bb(a,bd.MBS_ATTRIBUTE,new bd(a))};
k["com.stencyl.io.mbs.snippet.MbsSnippet"]=Ic;Ic.__name__="com.stencyl.io.mbs.snippet.MbsSnippet";Ic.initializeType=function(){null==Ic.MBS_SNIPPET&&(Ic.MBS_SNIPPET=new yb("MbsSnippet"),Ic.MBS_SNIPPET.setInstantiator(function(a){return new Ic(a)}),Ic.enabled=Ic.MBS_SNIPPET.createField("enabled",K.BOOLEAN),Ic.id=Ic.MBS_SNIPPET.createField("id",K.INTEGER),Ic.properties=Ic.MBS_SNIPPET.createField("properties",K.LIST))};Ic.new_MbsSnippet_list=function(a){return new bb(a,Ic.MBS_SNIPPET,new Ic(a))};Ic.__super__=
fb;Ic.prototype=u(fb.prototype,{getMbsType:function(){return Ic.MBS_SNIPPET},_properties:null,allocateNew:function(){this.setAddress(this.data.allocate(Ic.MBS_SNIPPET.getSize()))},getEnabled:function(){return this.data.readBool(this.address+Ic.enabled.address)},setEnabled:function(a){this.data.writeBool(this.address+Ic.enabled.address,a)},getId:function(){return this.data.readInt(this.address+Ic.id.address)},setId:function(a){this.data.writeInt(this.address+Ic.id.address,a)},getProperties:function(){this._properties.setAddress(this.data.readInt(this.address+
Ic.properties.address));return this._properties},createProperties:function(a){this._properties.allocateNew(a);this.data.writeInt(this.address+Ic.properties.address,this._properties.getAddress());return this._properties},__class__:Ic});var db=function(a){this.data=a;this._attributes=new bb(a,Bb.MBS_ATTRIBUTE_DEF,new Bb(a));this._blocks=new bb(a,ad.MBS_BLOCK,new ad(a));this._events=new bb(a,gc.MBS_EVENT,new gc(a))};k["com.stencyl.io.mbs.snippet.MbsSnippetDef"]=db;db.__name__="com.stencyl.io.mbs.snippet.MbsSnippetDef";
db.initializeType=function(){null==db.MBS_SNIPPET_DEF&&(db.MBS_SNIPPET_DEF=new yb("MbsSnippetDef"),db.MBS_SNIPPET_DEF.setInstantiator(function(a){return new db(a)}),db.attachedEvent=db.MBS_SNIPPET_DEF.createField("attachedEvent",K.BOOLEAN),db.actorID=db.MBS_SNIPPET_DEF.createField("actorID",K.INTEGER),db.classname=db.MBS_SNIPPET_DEF.createField("classname",K.STRING),db.description=db.MBS_SNIPPET_DEF.createField("description",K.STRING),db.design=db.MBS_SNIPPET_DEF.createField("design",K.BOOLEAN),db.drawOrder=
db.MBS_SNIPPET_DEF.createField("drawOrder",K.INTEGER),db.id=db.MBS_SNIPPET_DEF.createField("id",K.INTEGER),db.$name=db.MBS_SNIPPET_DEF.createField("name",K.STRING),db.packageName=db.MBS_SNIPPET_DEF.createField("packageName",K.STRING),db.sceneID=db.MBS_SNIPPET_DEF.createField("sceneID",K.INTEGER),db.type=db.MBS_SNIPPET_DEF.createField("type",K.STRING),db.attributes=db.MBS_SNIPPET_DEF.createField("attributes",K.LIST),db.blocks=db.MBS_SNIPPET_DEF.createField("blocks",K.LIST),db.events=db.MBS_SNIPPET_DEF.createField("events",
K.LIST))};db.new_MbsSnippetDef_list=function(a){return new bb(a,db.MBS_SNIPPET_DEF,new db(a))};db.__super__=fb;db.prototype=u(fb.prototype,{getMbsType:function(){return db.MBS_SNIPPET_DEF},_attributes:null,_blocks:null,_events:null,allocateNew:function(){this.setAddress(this.data.allocate(db.MBS_SNIPPET_DEF.getSize()))},getAttachedEvent:function(){return this.data.readBool(this.address+db.attachedEvent.address)},setAttachedEvent:function(a){this.data.writeBool(this.address+db.attachedEvent.address,
a)},getActorID:function(){return this.data.readInt(this.address+db.actorID.address)},setActorID:function(a){this.data.writeInt(this.address+db.actorID.address,a)},getClassname:function(){return this.data.readString(this.address+db.classname.address)},setClassname:function(a){this.data.writeString(this.address+db.classname.address,a)},getDescription:function(){return this.data.readString(this.address+db.description.address)},setDescription:function(a){this.data.writeString(this.address+db.description.address,
a)},getDesign:function(){return this.data.readBool(this.address+db.design.address)},setDesign:function(a){this.data.writeBool(this.address+db.design.address,a)},getDrawOrder:function(){return this.data.readInt(this.address+db.drawOrder.address)},setDrawOrder:function(a){this.data.writeInt(this.address+db.drawOrder.address,a)},getId:function(){return this.data.readInt(this.address+db.id.address)},setId:function(a){this.data.writeInt(this.address+db.id.address,a)},getName:function(){return this.data.readString(this.address+
db.$name.address)},setName:function(a){this.data.writeString(this.address+db.$name.address,a)},getPackageName:function(){return this.data.readString(this.address+db.packageName.address)},setPackageName:function(a){this.data.writeString(this.address+db.packageName.address,a)},getSceneID:function(){return this.data.readInt(this.address+db.sceneID.address)},setSceneID:function(a){this.data.writeInt(this.address+db.sceneID.address,a)},getType:function(){return this.data.readString(this.address+db.type.address)},
setType:function(a){this.data.writeString(this.address+db.type.address,a)},getAttributes:function(){this._attributes.setAddress(this.data.readInt(this.address+db.attributes.address));return this._attributes},createAttributes:function(a){this._attributes.allocateNew(a);this.data.writeInt(this.address+db.attributes.address,this._attributes.getAddress());return this._attributes},getBlocks:function(){this._blocks.setAddress(this.data.readInt(this.address+db.blocks.address));return this._blocks},createBlocks:function(a){this._blocks.allocateNew(a);
this.data.writeInt(this.address+db.blocks.address,this._blocks.getAddress());return this._blocks},getEvents:function(){this._events.setAddress(this.data.readInt(this.address+db.events.address));return this._events},createEvents:function(a){this._events.allocateNew(a);this.data.writeInt(this.address+db.events.address,this._events.getAddress());return this._events},__class__:db});var In=function(){};k["com.stencyl.loader.PreloaderConfig"]=In;In.__name__="com.stencyl.loader.PreloaderConfig";In.prototype=
{setFields:function(a){this.authorURL=a.authorURL;this.backgroundColor=a.backgroundColor;this.backgroundImage=a.backgroundImage;this.badgeImage=a.badgeImage;this.borderThickness=a.borderThickness;this.borderColor=a.borderColor;this.barLocation=a.barLocation;this.barWidth=a.barWidth;this.barHeight=a.barHeight;this.barColor=a.barColor;this.barOffsetX=a.barOffsetX;this.barOffsetY=a.barOffsetY;this.barBackgroundColor=a.barBackgroundColor},authorURL:null,backgroundColor:null,backgroundImage:null,badgeImage:null,
borderThickness:null,borderColor:null,barLocation:null,barWidth:null,barHeight:null,barColor:null,barOffsetX:null,barOffsetY:null,barBackgroundColor:null,__class__:In};var pk=function(){this.locked=!1;this.onComplete=new Bd;Ya.call(this)};k["com.stencyl.loader.SiteLock"]=pk;pk.__name__="com.stencyl.loader.SiteLock";pk.__super__=Ya;pk.prototype=u(Ya.prototype,{onComplete:null,locked:null,hasSiteLock:function(){return""!=ha.lockURL},getLockURL:function(){return ha.lockURL},isLocked:function(){return this.locked},
checkSiteLock:function(){if(this.locked=this.hasSiteLock()){var a=this.getLockURL(),b=Da.get_current().get_loaderInfo().url;if(null==b)this.locked=!1;else if(0>b.indexOf("http://")&&0>b.indexOf("https://"))this.locked=!1;else if(0<b.indexOf("stencyl.com")||0<b.indexOf("localhost"))this.locked=!1;if(this.locked){a=a.split(",");for(var c=0;c<a.length;){var d=a[c];++c;d=R.trim(d);0<=d.indexOf("*")||R.startsWith(d,"^")&&R.endsWith(d,"$")?this.locked=!(new aa(d,"")).match(b):this.locked=-1==b.indexOf(d);
if(!this.locked)break}this.locked&&this.showLockScreen(a[0])}}this.onComplete.dispatch()},showLockScreen:function(a){Da.get_current().addChild(this);var b=new dd(new La(this.getWidth()|0,this.getHeight()|0,!1,5658198));this.addChild(b);var c=new ef;c.set_width(this.getWidth()-16);c.set_height(this.getHeight()-16);c.set_x(8);c.set_y(8);c.set_textColor(16777215);c.set_multiline(!0);c.set_wordWrap(!0);c.set_text("Hi there!  It looks like somebody copied this game without my permission. Just click anywhere, or copy-paste this URL into your browser.\n\n"+
a+"\n\nThanks, and have fun!");a=new tg(null,25);c.setTextFormat(a);this.addChild(c);c.addEventListener("click",r(this,this.goToLockURL));b.addEventListener("click",r(this,this.goToLockURL))},goToLockURL:function(a){Da.getURL(new Mg(this.getLockURL().split(",")[0]),"_parent")},getWidth:function(){return xa.windowWidth},getHeight:function(){return xa.windowHeight},__class__:pk});var ok=function(){this.onComplete=new Bd;var a=this;Ya.call(this);Da.get_current().addChild(this);var b=ha.preloader,c=b.backgroundColor;
this.background=new Ya;this.background.get_graphics().beginFill(c,1);this.background.get_graphics().drawRect(0,0,this.getWidth(),this.getHeight());this.addChild(this.background);if(""!=b.backgroundImage)W.getConfigBitmap(b.backgroundImage).onComplete(function(b){a.addChildAt(b,a.getChildIndex(a.background)+1)});this.showPreloader()};k["com.stencyl.loader.StencylPreloader"]=ok;ok.__name__="com.stencyl.loader.StencylPreloader";ok.__super__=Ya;ok.prototype=u(Ya.prototype,{barBorder:null,bar:null,barBackground:null,
background:null,barWidth:null,barHeight:null,onComplete:null,adPlaying:null,ready:null,showPreloader:function(){var a=ha.preloader,b=a.borderColor,c=a.barBackgroundColor,d=a.barColor,e=q.SCALE*a.borderThickness;this.barWidth=q.SCALE*q.screenScaleX*a.barWidth|0;this.barHeight=q.SCALE*q.screenScaleY*a.barHeight|0;var f=q.SCALE*a.barOffsetX,g=q.SCALE*a.barOffsetY,h=this.getWidth()/2-this.barWidth/2;a=0==a.barLocation?this.getHeight()/2-this.barHeight/2:1==a.barLocation?e:this.getHeight()-this.barHeight-
e;this.barBorder=new Ya;this.barBorder.get_graphics().beginFill(b,1);this.barBorder.get_graphics().drawRect(-e,-e,this.barWidth+2*e,this.barHeight+2*e);this.barBorder.set_x(h+f);this.barBorder.set_y(a+g);this.addChild(this.barBorder);this.barBackground=new Ya;this.barBackground.get_graphics().beginFill(c,1);this.barBackground.get_graphics().drawRect(0,0,this.barWidth,this.barHeight);this.barBackground.set_x(h+f);this.barBackground.set_y(a+g);this.barBackground.set_scaleX(1);this.addChild(this.barBackground);
this.bar=new Ya;this.bar.get_graphics().beginFill(d,1);this.bar.get_graphics().drawRect(0,0,this.barWidth,this.barHeight);b=new fa(0,0,0,this.barHeight);this.bar.set_scrollRect(b);this.bar.set_x(h+f);this.bar.set_y(a+g);this.addChild(this.bar);this.showBadge();""!=this.getURL()&&this.addEventListener("mouseDown",r(this,this.onMouseDown),!1,2)},showBadge:function(){var a=this,b=ha.preloader;if(""!=b.badgeImage)W.getConfigBitmap(b.badgeImage).onComplete(function(b){a.addChild(b);b.set_x(a.getWidth()-
114-5);b.set_y(a.getHeight()-62-5)})},getURL:function(){return ha.preloader.authorURL},onMouseDown:function(a){this.removeEventListener("mouseDown",r(this,this.onMouseDown));Da.getURL(new Mg(this.getURL()),"_blank")},getWidth:function(){return xa.windowWidth},getHeight:function(){return xa.windowHeight},onUpdate:function(a,b){Da.get_current().get_loaderInfo().__update(a,b);null!=this.bar&&(a=new fa(0,0,a/b*this.barWidth,this.barHeight),this.bar.set_scrollRect(a))},onLoaded:function(){Da.get_current().get_loaderInfo().__complete();
this.ready=!0;this.adPlaying||this.unload()},adStarted:function(){this.adPlaying=!0},adFinished:function(){this.adPlaying=!1;this.ready&&this.unload()},unload:function(){this.parent==Da.get_current()&&Da.get_current().removeChild(this);Da.get_current().stage.set_focus(null);this.onComplete.dispatch()},__class__:ok});var tb=function(a,b,c,d,e,f,g,h,m,l,n,p,k,t,v,ag,u,Ka,S,P){null==P&&(P=0);null==S&&(S=!1);null==Ka&&(Ka=!0);null==ag&&(ag=!1);null==v&&(v=!1);null==t&&(t=!1);null==k&&(k=!1);null==h&&
(h=32);null==g&&(g=32);null==f&&(f=-1);null==e&&(e=0);null==d&&(d=0);this.customizedBehaviors=!1;this.maxMove=99999;this.minMove=3;this.moveXDistance=this.moveYDistance=0;this.moveMultiplier=.33;this.drawX=this.drawY=0;this.smoothMove=this.firstMove=this.snapOnSet=!1;this.attachedImages=null;Ya.call(this);q.NO_PHYSICS&&0==P&&(this.physicsMode=P=1);this.dummy=new y;this.zero=new y(0,0);this._point=W.point;this._moveX=this._moveY=0;this.HITBOX=new gg;this.set_shape(this.HITBOX);this instanceof md&&
q.NO_PHYSICS&&(u=this.HITBOX=new fd(g|0,h|0,0,0,!1,-2),this.set_shape(u));this.set_x(0);this.set_y(0);this.set_rotation(0);this.realAngle=this.realY=this.realX=0;this.realScaleY=this.realScaleX=1;this.collidable=!0;this.solid=!k;this.updateMatrix=!0;this.colY=this.colX=0;this.lastScale=new pa(1,1);this.lastY=this.lastX=-1E3;this.lastAngle=0;this.tweenProps=new co;this.tweenProps.xy.doOnUpdate(r(this,this.updateTweenXY));this.tweenProps.angle.doOnUpdate(r(this,this.updateTweenAngle));this.tweenProps.alpha.doOnUpdate(r(this,
this.updateTweenAlpha));this.tweenProps.realScaleXY.doOnUpdate(r(this,this.updateTweenScaleXY));this.transformPoint=new pa(0,0);this.transformMatrix=new wa;this.drawMatrix=new wa;this.currOrigin=new pa(0,0);this.currOffset=new pa(0,0);this.registry=new ia;this.attachedImages=[];this.physicsMode=P;this.autoScale=Ka;this.mouseState=this.rSpeed=this.ySpeed=this.xSpeed=0;this.isTerrainRegion=this.isRegion=this.isCamera=this.isOnScreenCache=this.lastSceneState=this.lastScreenState=!1;this.drawActor=!0;
this.fixedRotation=this.continuousCollision=this.isHUD=this.alwaysSimulate=this.killLeaveScreen=!1;this.defaultGravity=this.ignoreGravity=S;this.resetOrigin=!0;this.allListeners=new Xa;this.allEventReferences=[];this.whenCreated=new Gc;this.whenUpdated=new Gc;this.whenDrawing=new Gc;this.whenKilled=new Gc;this.whenMousedOver=new Gc;this.whenPositionStateChanged=new Gc;this.whenCollided=new Gc;this.destroyed=this.paused=this.recycled=!1;this.set_name("Unknown");this.ID=b;this.groupID=c;this.typeID=
null!=n?n.ID:-1;this.engine=a;this.collidedList=[];this.collisions=new ve(16);this.simpleCollisions=new ve(16);this.contacts=new ve(16);this.regionContacts=new ve(16);this.collisions.reuseIterator=!0;this.simpleCollisions.reuseIterator=!0;this.contacts.reuseIterator=!0;this.regionContacts.reuseIterator=!0;this.collisionsCount=this.contactCount=0;this.handlesCollisions=!0;this.behaviors=new rj;this.currAnimationName="";this.animationMap=new ia;this.shapeMap=new ia;this.originMap=new ia;this.sprite=
m;this.type=n;if(null!=m)for(b=m.animations.iterator();b.hasNext();)Ka=b.next(),this.addAnim(Ka),Ka.animID==m.defaultAnimation&&(this.defaultAnim=Ka.animName);null==tb.recycledAnimation&&(tb.recycledAnimation=new ne(-1,"recyclingDefault",null,null,null,!1,!1,1,1,0,0,[10],1,1,1));this.addAnim(tb.recycledAnimation);if(null!=p&&0==P)p.bullet&&(cc.m_continuousPhysics=!0),p.groupID=c,this.initFromBody(p),c=new Db,c.setAsBox(1,1),this.body.createFixture2(c,.1),this.md=new lj,this.md.mass=p.mass,this.md.I=
p.aMass,this.md.center.x=0,this.md.center.y=0,this.body.setMassData(this.md),this.bodyScale=new pa(1,1);else{if(null==u||Ia.typeof(u)==Ca.TFloat)u=tb.createBox(g,h);null!=p&&(this.continuousCollision=p.bullet);this instanceof md&&(k=!0,ag=!1);this instanceof Jg&&(ag=!1);null!=u&&u instanceof gg?(this.set_shape(u),this.isTerrain=!0):0==P&&this.initBody(c,k,t,v,ag,u)}this.cacheAnchor=new pa(0,0);this.switchToDefaultAnimation();null!=m?this.setLocation(d,e):null!=u&&u instanceof gg?(d=new dd(new La(1,
1,!0,0)),d.set_x(g),d.set_y(h),this.addChild(d),this.cacheWidth=this.set_width(g),this.cacheHeight=this.set_height(h)):0==P&&this.body.setPosition(new y(q.toPhysicalUnits(d),q.toPhysicalUnits(e)));null!=l?this.customizedBehaviors=!0:null!=n&&(l=n.behaviorValues);-1!=f&&a.moveActorToLayer(this,a.getLayerById(f));q.initBehaviors(this.behaviors,l,this,a,!1)};k["com.stencyl.models.Actor"]=tb;tb.__name__="com.stencyl.models.Actor";tb.resetStatics=function(){tb.lastCollided=null;tb.manifold=new kj};tb.createBox=
function(a,b){var c=new Db;c.setAsBox(q.toPhysicalUnits(a/2),q.toPhysicalUnits(b/2));return c};tb.scaleShape=function(a,b,c){if(a instanceof Lc)a.m_radius*=c;else if(a instanceof Db){for(var d=a.m_vertices,e=[],f=0;f<d.length;){var g=d[f];++f;g.subtract(b);g.multiply(c);g.add(b);e.push(g)}a.setAsArray(e)}};tb.__super__=Ya;tb.prototype=u(Ya.prototype,{engine:null,createTime:null,ID:null,groupID:null,cachedLayer:null,layer:null,typeID:null,type:null,recycled:null,paused:null,isRegion:null,isTerrainRegion:null,
isTerrain:null,destroyed:null,drawActor:null,isHUD:null,alwaysSimulate:null,isCamera:null,killLeaveScreen:null,physicsMode:null,autoScale:null,dead:null,dying:null,fixedRotation:null,ignoreGravity:null,defaultGravity:null,collidable:null,solid:null,resetOrigin:null,realX:null,realY:null,realAngle:null,realScaleX:null,realScaleY:null,lastX:null,lastY:null,lastAngle:null,lastScale:null,colX:null,colY:null,xSpeed:null,ySpeed:null,rSpeed:null,continuousCollision:null,tweenProps:null,cacheWidth:null,cacheHeight:null,
currAnimation:null,currAnimationName:null,animationMap:null,bitmapFilters:null,filtersAsShader:null,usingSoftwareFilter:null,sprite:null,shapeMap:null,originMap:null,defaultAnim:null,currOrigin:null,currOffset:null,cacheAnchor:null,transformObj:null,transformPoint:null,transformMatrix:null,updateMatrix:null,drawMatrix:null,attachedImages:null,smoothMove:null,firstMove:null,snapOnSet:null,drawX:null,drawY:null,moveMultiplier:null,moveXDistance:null,moveYDistance:null,minMove:null,maxMove:null,behaviors:null,
customizedBehaviors:null,registry:null,allListeners:null,allEventReferences:null,whenCreated:null,whenUpdated:null,whenDrawing:null,whenKilled:null,whenMousedOver:null,whenPositionStateChanged:null,whenCollided:null,mouseState:null,lastScreenState:null,lastSceneState:null,isOnScreenCache:null,body:null,bodyDef:null,md:null,bodyScale:null,handlesCollisions:null,contacts:null,regionContacts:null,collisions:null,dummy:null,zero:null,destroy:function(){if(!this.destroyed){this.destroyed=!0;for(var a=
this.animationMap.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].set_visible(!1);W.removeAllChildren(this);if(null!=this.body&&0==this.physicsMode){for(a=this.body.getContactList();null!=a;)q.engine.world.m_contactManager.m_contactListener.endContact(a.contact),a=a.next;q.engine.world.destroyBody(this.body)}this.cancelTweens();this.regionContacts=this.contacts=this.sprite=this.body=this.currOrigin=this.currOffset=this.currAnimation=this.animationMap=this.defaultAnim=this.originMap=this.shapeMap=
tb.lastCollided=null;this.collisionsCount=this.contactCount=0;this.registry=this.allEventReferences=this.allListeners=this.whenCollided=this.whenPositionStateChanged=this.whenMousedOver=this.whenKilled=this.whenDrawing=this.whenUpdated=this.whenCreated=this.transformMatrix=this.transformPoint=null;for(a=this.collisions.keys();a.hasNext();){c=a.next();b=this.collisions;var e=b.mH;d=e.mHash[73856093*c&e.mMask];if(-1==d)c=-2147483648;else if(e=e.mData,e[d]==c)c=e[d+1];else{var f=-2147483648;for(d=e[d+
2];-1!=d;){if(e[d]==c){f=e[d+1];break}d=e[d+2]}c=f}for(b=-2147483648==c?null:b.mVals[c];0<b.points.length;)Md.free(b.points.pop())}this.simpleCollisions=this.collisions=null;null!=this.bodyDef&&(this.bodyDef=this.bodyDef.userData=null);this.behaviors.destroy()}},resetListeners:function(){for(var a=this.allListeners.keys();a.hasNext();){var b=a.next();this.allListeners.remove(b)}for(;0<this.allEventReferences.length;)this.allEventReferences.pop();0<this.whenUpdated.length&&this.whenUpdated.removeAll();
0<this.whenDrawing.length&&this.whenDrawing.removeAll();0<this.whenKilled.length&&this.whenKilled.removeAll();0<this.whenMousedOver.length&&this.whenMousedOver.removeAll();0<this.whenPositionStateChanged.length&&this.whenPositionStateChanged.removeAll();0<this.whenCollided.length&&this.whenCollided.removeAll()},defaultHitbox:null,defaultMasklist:null,addAnim:function(a){var b=0==this.physicsMode?a.physicsShapes:a.simpleShapes;if(null!=b){var c=[];if(1==this.physicsMode)for(b=b.iterator();b.hasNext();){var d=
b.next();d instanceof fd&&0!=this.physicsMode&&(d=U.__cast(d,fd).clone(),d.assignTo(this));c.push(d)}else if(2!=this.physicsMode)for(b=b.iterator();b.hasNext();)d=b.next(),c.push(d);0!=this.physicsMode?(b=this.shapeMap,d=a.animName,c=new vi(c,this),b.h[d]=c):this.shapeMap.h[a.animName]=c}b=this.animationMap;d=a.animName;c=new Aj(a);b.h[d]=c;b=this.originMap;d=a.animName;c=new y(a.originX,a.originY);b.h[d]=c},reloadAnimationGraphics:function(a){if(-1==a){for(a=this.sprite.animations.iterator();a.hasNext();){var b=
a.next();b=this.animationMap.h[b.animName];b.framesUpdated()}this.updateChildrenPositions()}else a=this.sprite.animations.h[a],b=this.animationMap.h[a.animName],b.framesUpdated(),b==this.currAnimation&&this.updateChildrenPositions()},initScripts:function(){if(2==this.physicsMode)this.handlesCollisions=!1;else if(this.handlesCollisions=!0,this.behaviors.initScripts(),0<this.whenCreated.length)for(this.whenCreated._dispatchIndex=0;this.whenCreated._dispatchIndex<this.whenCreated.length;){try{this.whenCreated.listeners[this.whenCreated._dispatchIndex]()}catch(b){var a=
J.caught(b);Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"initScripts"})}++this.whenCreated._dispatchIndex}},initFromBody:function(a){a.allowSleep=!1;a.userData=this;this.bodyDef=a;this.body=q.engine.world.createBody(a)},initBody:function(a,b,c,d,e,f){var g=new ji;g.groupID=a;a=this.get_x();g.position.x=q.toPhysicalUnits(a);a=this.get_y();g.position.y=q.toPhysicalUnits(a);g.angle=0;g.fixedRotation=!e;g.allowSleep=
!1;g.type=c?oa.b2_staticBody:d?oa.b2_kinematicBody:oa.b2_dynamicBody;if(f instanceof Array)for(g.userData=this,this.body=q.engine.world.createBody(g),b=U.__cast(f,Array),f=0;f<b.length;)d=b[f],++f,c=new Hf,c.shape=d,c.friction=1,c.density=.1,c.restitution=0,c.isSensor=!1,c.groupID=1,c.userData=this,this.body.createFixture(c);else c=new Hf,c.shape=f,c.friction=1,c.density=.1,c.restitution=0,c.isSensor=b,c.groupID=-1E3,c.userData=this,g.userData=this,this.body=q.engine.world.createBody(g),this.body.createFixture(c);
this.bodyDef=g},addAnimation:function(a,b){this.animationMap.h[a]=b},getAnimation:function(){return this.currAnimationName},setAnimation:function(a){this.switchAnimation(a)},switchToDefaultAnimation:function(){null!=this.defaultAnim&&(this.switchAnimation(this.defaultAnim,this.defaultShapeChanged()),this.setCurrentFrame(0))},isAnimationPlaying:function(){return!this.currAnimation.isFinished()},getCurrentFrame:function(){return this.currAnimation.getCurrentFrame()},setCurrentFrame:function(a){this.currAnimation.setFrame(a)},
getNumFrames:function(){return this.currAnimation.getNumFrames()},defaultShapeChanged:function(){if(0!=this.physicsMode)return!0;var a=this.shapeMap.h[this.defaultAnim];if(null==this.getBody()||null==this.getBody().getFixtureList()||null==this.getBody().getFixtureList().getShape()){if(null!=a&&0<a.length)return!0}else{if(null==a||0==a.length||1<a.length)return!0;var b=a[0];if(null==b)return!0;var c=this.getBody().getFixtureList();a=this.getBody().getFixtureList().getShape();var d=b.shape;if(c.groupID==
b.groupID&&this.getBody().getFixtureList().isSensor()==b.isSensor&&U.getClass(a)==U.getClass(d))if(U.getClass(a)==Db){if(a.m_vertexCount!=d.m_vertexCount)return!0;b=0;for(c=a.m_vertexCount;b<c;){var e=b++;if(a.m_vertices[e].x!=d.m_vertices[e].x||a.m_vertices[e].y!=d.m_vertices[e].y)return!0}}else{if(U.getClass(a)==Lc&&(a.m_radius!=d.m_radius||a.m_p.x!=d.m_p.x||a.m_p.y!=d.m_p.y))return!0}else return!0}return!1},switchAnimation:function(a,b){null==b&&(b=!1);if(a!=this.currAnimationName||b){var c=this.animationMap.h[a];
if(null!=c){null!=this.currAnimation&&this.removeChild(this.currAnimation);if(null!=this.body&&0==this.physicsMode&&!b){var d=this.shapeMap.h[this.currAnimationName],e=this.shapeMap.h[a];if(null==d||null==e)b=!0;else if(d.length!=e.length||1<d.length)b=!0;else{var f=d[0],g=e[0];if(null==f||null==g)b=!0;else if(e=f.shape,d=g.shape,f.isSensor!=g.isSensor)b=!0;else if(f.groupID!=g.groupID)b=!0;else if(U.getClass(e)==U.getClass(d))if(U.getClass(e)==Db)if(e.m_vertexCount!=d.m_vertexCount)b=!0;else for(f=
0,g=e.m_vertexCount;f<g;){var h=f++;if(e.m_vertices[h].x!=d.m_vertices[h].x){b=!0;break}else if(e.m_vertices[h].y!=d.m_vertices[h].y){b=!0;break}}else U.getClass(e)!=Lc||e.m_radius==d.m_radius&&e.m_p.x==d.m_p.x&&e.m_p.y==d.m_p.y||(b=!0);else b=!0}}this.currAnimationName=a;this.currAnimation=c;null!=this.bitmapFilters&&this.usingSoftwareFilter?this.currAnimation.set_filter(this.bitmapFilters):this.currAnimation.set_filter(null);this.currAnimation.set_shader(this.filtersAsShader);this.currAnimation.set_visible(this.drawActor);
this.addChild(c);c=this.originMap.h[a];e=this.currAnimation.get_width()/q.SCALE/2-c.x;d=this.currAnimation.get_height()/q.SCALE/2-c.y;if(null!=this.body&&b&&0==this.physicsMode){b=[];for(f=this.body.getContactList();null!=f;)f.other.getUserData()instanceof md&&f.contact.isTouching()&&b.push(f.other.getUserData()),q.engine.world.m_contactManager.m_contactListener.endContact(f.contact),f=f.next;for(f=this.collisions.keys();f.hasNext();){g=f.next();var m=this.collisions,l=m.mH;h=l.mHash[73856093*g&l.mMask];
if(-1==h)h=-2147483648;else if(l=l.mData,l[h]==g)h=l[h+1];else{var n=-2147483648;for(h=l[h+2];-1!=h;){if(l[h]==g){n=l[h+1];break}h=l[h+2]}h=n}for(h=-2147483648==h?null:m.mVals[h];0<h.points.length;)Md.free(h.points.pop());this.collisions.unset(g)}this.collisions=new ve(16);this.simpleCollisions=new ve(16);this.contacts=new ve(16);this.regionContacts=new ve(16);this.collisions.reuseIterator=!0;this.simpleCollisions.reuseIterator=!0;this.contacts.reuseIterator=!0;this.regionContacts.reuseIterator=!0;
for(this.collisionsCount=this.contactCount=0;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());f=0;for(g=U.__cast(this.shapeMap.h[a],Array);f<g.length;){h=g[f];++f;a=new Hf;1.79769313486231E308>this.bodyDef.friction&&(a.friction=this.bodyDef.friction,a.restitution=this.bodyDef.bounciness,0<this.bodyDef.mass&&(a.density=.1));a.density=h.density;a.isSensor=h.isSensor;a.groupID=h.groupID;a.shape=h.shape;if(null!=c)if(this.body.origin.x=q.toPhysicalUnits(-c.x),this.body.origin.y=
q.toPhysicalUnits(-c.y),h.shape instanceof Db){l=new Ve;h=h.shape;n=new Db;n.setAsArray(h.m_vertices,h.m_vertices.length);var p=n.m_vertices,k=n.m_normals;m=l.position;h=q.toPhysicalUnits(e);var t=q.toPhysicalUnits(d);null==t&&(t=0);null==h&&(h=0);m.x=h;m.y=t;l.R.setAngle(0);m=0;for(t=n.m_vertexCount;m<t;)h=m++,p[h]=l.multiply(p[h]),k[h]=l.R.multiplyV(k[h]);n.setAsArray(p,p.length);n.m_normals=k;a.shape=n}else h.shape instanceof Lc&&(m=h.shape,h=new Lc,h.setRadius(m.getRadius()),l=m.m_p.x,n=q.toPhysicalUnits(e),
h.m_p.x=l+n,m=m.m_p.y,l=q.toPhysicalUnits(d),h.m_p.y=m+l,a.shape=h);this.body.createFixture(a).SetUserData(this)}if(null!=this.body.getFixtureList())for(this.bodyScale.x=1,this.bodyScale.y=1,f=0;f<b.length;)e=b[f],++f,d=this.body.getFixtureList().m_aabb,e.getBody().getFixtureList().m_aabb.testOverlap(d)&&e.addActor(this);null!=this.md&&this.body.setMassData(this.md)}else null!=this.shapeMap.h[a]&&1==this.physicsMode&&(this.set_shape(this.shapeMap.h[a]),this.HITBOX=this._mask);this.cacheWidth=this.currAnimation.get_width()/
q.SCALE;this.cacheHeight=this.currAnimation.get_height()/q.SCALE;null!=this.body&&(this.body.size.x=q.toPhysicalUnits(this.cacheWidth),this.body.size.y=q.toPhysicalUnits(this.cacheHeight));0==this.physicsMode&&(this.realX=this.getX(!1),this.realY=this.getY(!1),this.updateBodyScale());null!=c&&this.setOriginPoint(c.x|0,c.y|0);this.updateChildrenPositions();this.updateMatrix=!0;m=this.currAnimation;m.timer=0;m.frameIndex=0;m.finished=!1;null!=m.filter?(m.filteredFrames[m.frameIndex]||(m.frames[m.frameIndex]=
m.applyFilters(m.frames[m.frameIndex],m.model.frames[m.frameIndex],m.filter),m.filteredFrames[m.frameIndex]=!0),m.set_bitmapData(m.frames[m.frameIndex])):m.set_bitmapData(m.model.frames[m.frameIndex]);m.smoothing=ha.antialias}}},updateChildrenPositions:function(){var a=null!=this.currAnimation?new pa(-this.currAnimation.get_x(),-this.currAnimation.get_y()):new pa(0,0);if(!a.equals(this.cacheAnchor)){this.cacheAnchor.copyFrom(a);a=0;for(var b=this.attachedImages;a<b.length;){var c=b[a];++a;c.updatePosition()}}},
removeAttachedImages:function(){for(var a=0,b=this.attachedImages;a<b.length;){var c=b[a];++a;c.cacheParentAnchor=W.zero;this.removeChild(c)}this.attachedImages=[]},update:function(a){this.innerUpdate(a,!0)},innerUpdate:function(a,b){if(!(this.paused||this.isCamera||this.dying||this.dead||this.destroyed||b&&(this.isHUD||this.alwaysSimulate))){if(0<this.whenMousedOver.length)if(this.isMouseOver()){if(0>=this.mouseState){if(this.mouseState=1,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=
0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(S){var c=J.caught(S);Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else this.mouseState=2;if(M.mousePressed){if(this.mouseState=3,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=
0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(S){c=J.caught(S),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else if(M.mouseDown&&(this.mouseState=4,0<this.whenMousedOver.length))for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<
this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(S){c=J.caught(S),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}if(M.mouseReleased&&(this.mouseState=5,0<this.whenMousedOver.length))for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(S){c=
J.caught(S),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else if(0<this.mouseState){if(this.mouseState=-1,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(S){c=J.caught(S),Q.fullError(c.get_message(),
c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else-1==this.mouseState&&(this.mouseState=0);b=this.type.ID;var d=1E6+this.groupID,e=this.engine.whenCollidedEvents,f=this.engine.whenTypeGroupPositionStateChangedEvents;if(0==this.physicsMode&&(0<this.whenCollided.length||null!=e.h[b]||null!=e.h[d])){if(0<this.contactCount){c=0;for(var g,h=this.contacts.iterator();h.hasNext();){g=h.next();
var m=g.key;var l=this.collisions.mH;var n=l.mHash[73856093*m&l.mMask];if(-1==n)n=!1;else if(l=l.mData,l[n]==m)n=!0;else{var p=!1;for(n=l[n+2];-1!=n;){if(l[n]==m){p=!0;break}n=l[n+2]}n=p}if(n){n=this.collisions;p=n.mH;l=p.mHash[73856093*m&p.mMask];if(-1==l)m=-2147483648;else if(p=p.mData,p[l]==m)m=p[l+1];else{var k=-2147483648;for(l=p[l+2];-1!=l;){if(p[l]==m){k=p[l+1];break}l=p[l+2]}m=k}m=-2147483648==m?null:n.mVals[m];g.getWorldManifold(tb.manifold);n=0;for(l=tb.manifold.m_points;n<l.length;)p=l[n],
++n,0!=p.x&&0!=p.y&&(g=m.points[c],null==g?m.points[c]=Md.get(p.x,p.y,tb.manifold.m_normal.x,tb.manifold.m_normal.y):(g=m.points[c],g.x=p.x,g.y=p.y,g.normalX=tb.manifold.m_normal.x,g.normalY=tb.manifold.m_normal.y),++c);for(;m.points.length>c;)Md.free(m.points.pop());c=0}else{var q=g.getFixtureA().getUserData(),t=g.getFixtureB().getUserData();q==this?(n=t,l=g.getFixtureB(),p=g.getFixtureA()):(n=q,l=g.getFixtureA(),p=g.getFixtureB());k=new tc;k.otherActor=n;k.otherShape=l;k.thisActor=this;k.thisShape=
p;k.actorA=q;k.actorB=t;g.getWorldManifold(tb.manifold);this.collisions.set(m,k);this.collisionsCount++;m=this.getBody();q=n.getBody();t=g.getFixtureA().getBody();for(var v=g.getFixtureB().getBody(),r=0,Ka=tb.manifold.m_points;r<Ka.length;)(g=Ka[r],++r,0==g.x||0==g.y||p.isSensor())?p.isSensor()&&(null!=n&&(k.thisCollidedWithActor=k.thisCollidedWithActor||1!=n.groupID&&-2!=n.groupID&&!n.isTerrainRegion,k.thisCollidedWithTerrain=k.thisCollidedWithTerrain||n.isTerrainRegion,k.thisCollidedWithTile=k.thisCollidedWithTile||
1==n.groupID),k.otherCollidedWithActor=k.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,k.otherCollidedWithTerrain=k.otherCollidedWithTerrain||this.isTerrainRegion,k.otherCollidedWithTile=k.otherCollidedWithTile||1==this.groupID,k.thisCollidedWithSensor=k.thisCollidedWithSensor||l.isSensor(),k.otherCollidedWithSensor=k.otherCollidedWithSensor||p.isSensor()):(g=Md.get(g.x,g.y,tb.manifold.m_normal.x,tb.manifold.m_normal.y),k.points.push(g),t==m?(k.thisFromBottom=k.thisFromBottom||
0<g.normalY,k.thisFromTop=k.thisFromTop||0>g.normalY,k.thisFromLeft=k.thisFromLeft||0>g.normalX,k.thisFromRight=k.thisFromRight||0<g.normalX):v==m&&(k.thisFromBottom=k.thisFromBottom||0>g.normalY,k.thisFromTop=k.thisFromTop||0<g.normalY,k.thisFromLeft=k.thisFromLeft||0<g.normalX,k.thisFromRight=k.thisFromRight||0>g.normalX),t==q?(k.otherFromBottom=k.otherFromBottom||0<g.normalY,k.otherFromTop=k.otherFromTop||0>g.normalY,k.otherFromLeft=k.otherFromLeft||0>g.normalX,k.otherFromRight=k.otherFromRight||
0<g.normalX):v==q&&(k.otherFromBottom=k.otherFromBottom||0>g.normalY,k.otherFromTop=k.otherFromTop||0<g.normalY,k.otherFromLeft=k.otherFromLeft||0<g.normalX,k.otherFromRight=k.otherFromRight||0>g.normalX),null!=n&&(k.thisCollidedWithActor=k.thisCollidedWithActor||1!=n.groupID&&-2!=n.groupID&&!n.isTerrainRegion,k.thisCollidedWithTerrain=k.thisCollidedWithTerrain||n.isTerrainRegion,k.thisCollidedWithTile=k.thisCollidedWithTile||1==n.groupID),k.otherCollidedWithActor=k.otherCollidedWithActor||1!=this.groupID&&
-2!=this.groupID&&!this.isTerrainRegion,k.otherCollidedWithTerrain=k.otherCollidedWithTerrain||this.isTerrainRegion,k.otherCollidedWithTile=k.otherCollidedWithTile||1==this.groupID,k.thisCollidedWithSensor=k.thisCollidedWithSensor||l.isSensor(),k.otherCollidedWithSensor=k.otherCollidedWithSensor||p.isSensor())}}}if(0<this.collisionsCount)for(h=this.collisions.iterator();h.hasNext();)if(g=h.next(),null!=g&&null!=g.thisActor&&null!=g.otherActor&&g.thisActor.handlesCollisions&&g.otherActor.handlesCollisions){tb.lastCollided=
g.otherActor;if(0<this.whenCollided.length)for(this.whenCollided._dispatchIndex=0;this.whenCollided._dispatchIndex<this.whenCollided.length;){try{this.whenCollided.listeners[this.whenCollided._dispatchIndex](g)}catch(S){c=J.caught(S),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"handleCollisions"})}++this.whenCollided._dispatchIndex}this.engine.handleCollision(this,g)}}this.internalUpdate(a,!0);1==this.physicsMode&&
((0<this.whenCollided.length||null!=e.h[b]||null!=e.h[d])&&this.handleCollisionsSimple(),this.disposeRemovedCollisionInfo());if(2!=this.physicsMode&&0<this.whenUpdated.length)for(this.whenUpdated._dispatchIndex=0;this.whenUpdated._dispatchIndex<this.whenUpdated.length;){try{this.whenUpdated.listeners[this.whenUpdated._dispatchIndex](a)}catch(S){c=J.caught(S),Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"innerUpdate"})}++this.whenUpdated._dispatchIndex}(0<
this.whenPositionStateChanged.length||null!=f.h[b]||null!=f.h[d])&&this.checkScreenState()}},internalUpdate:function(a,b){if(!this.paused){if(0!=this.physicsMode){1!=this.physicsMode||this.ignoreGravity||this.isHUD||(this.xSpeed+=a*this.engine.gravityX*.001,this.ySpeed+=a*this.engine.gravityY*.001);if(0!=this.xSpeed||0!=this.ySpeed)this.resetReal(this.realX,this.realY),this.moveActorBy(10/q.STEP_SIZE*this.xSpeed*a*.01,10/q.STEP_SIZE*this.ySpeed*a*.01,!1);0!=this.rSpeed&&(this.realAngle+=a*this.rSpeed*
.001);this.fixedRotation&&(this.rSpeed=this.realAngle=0)}else{var c=this.body.getPosition();this.realX=c.x*q.physicsScale;this.realY=c.y*q.physicsScale;this.resetReal(this.realX,this.realY);this.realAngle=57.29577951308402*this.body.getAngle()}if(this.lastX!=this.realX||this.lastY!=this.realY||this.lastAngle!=this.realAngle||this.lastScale.x!=this.realScaleX||this.lastScale.y!=this.realScaleY)this.updateMatrix=!0;this.lastX=this.realX;this.lastY=this.realY;this.lastAngle=this.realAngle;this.lastScale.x=
this.realScaleX;this.lastScale.y=this.realScaleY;b&&null!=this.currAnimation&&this.currAnimation.update(a)}},updateDrawingMatrix:function(a){null==a&&(a=!1);if(!this.paused||a)this.smoothMove?(this.firstMove||(this.drawX=this.realX,this.drawY=this.realY,this.firstMove=!0),this.moveXDistance=this.realX-this.drawX,this.moveYDistance=this.realY-this.drawY,this.drawX=this.moveXDistance>this.minMove?this.moveXDistance*this.moveMultiplier>this.minMove?this.moveXDistance>this.maxMove?this.realX:this.drawX+
this.moveXDistance*this.moveMultiplier:this.drawX+this.minMove:this.moveXDistance<-1*this.minMove?this.moveXDistance*this.moveMultiplier<-1*this.minMove?this.moveXDistance<-1*this.maxMove?this.realX:this.drawX+this.moveXDistance*this.moveMultiplier:this.drawX-this.minMove:this.realX,this.drawY=this.moveYDistance>this.minMove?this.moveYDistance*this.moveMultiplier>this.minMove?this.moveYDistance>this.maxMove?this.realY:this.drawY+this.moveYDistance*this.moveMultiplier:this.drawY+this.minMove:this.moveYDistance<
-1*this.minMove?this.moveYDistance*this.moveMultiplier<-1*this.minMove?this.moveYDistance<-1*this.maxMove?this.realY:this.drawY+this.moveYDistance*this.moveMultiplier:this.drawY-this.minMove:this.realY):0!=this.physicsMode?(this.drawX=this.realX,this.drawY=this.realY):(a=this.body.getPosition(),this.drawX=a.x*q.physicsScale,this.drawY=a.y*q.physicsScale),this.transformPoint.x=(this.currOrigin.x-this.cacheWidth/2)*q.SCALE,this.transformPoint.y=(this.currOrigin.y-this.cacheHeight/2)*q.SCALE,this.transformMatrix.identity(),
this.transformMatrix.translate(-this.transformPoint.x,-this.transformPoint.y),this.transformMatrix.scale(this.realScaleX,this.realScaleY),0!=this.realAngle&&this.transformMatrix.rotate(.01745329251994278*this.realAngle),ha.pixelsnap?this.transformMatrix.translate(Math.round(this.drawX)*q.SCALE,Math.round(this.drawY)*q.SCALE):this.transformMatrix.translate(this.drawX*q.SCALE,this.drawY*q.SCALE),null==this.transformObj&&(this.transformObj=this.get_transform()),this.transformObj.set_matrix(this.transformMatrix)},
updateTweenAlpha:function(){this.set_alpha(this.tweenProps.alpha.value)},updateTweenScaleXY:function(){this.realScaleX=this.tweenProps.realScaleXY.value1;this.realScaleY=this.tweenProps.realScaleXY.value2;this.updateBodyScale()},updateTweenAngle:function(){this.setAngle(this.tweenProps.angle.value,!1)},updateTweenXY:function(){0==this.physicsMode?this.setXY(this.tweenProps.xy.value1,this.tweenProps.xy.value2):(this.moveActorBy(this.tweenProps.xy.value1-this.getX(!1),this.tweenProps.xy.value2-this.getY(!1),
!1),this.updateMatrix=!0);this.tweenProps.xy.finished&&null!=this.currOffset&&this.resetReal(this.realX,this.realY)},updateBodyScale:function(){this.autoScale&&0==this.physicsMode&&null!=this.body&&this.bodyDef.type!=oa.b2_staticBody&&0!=this.realScaleX&&0!=this.realScaleY&&this.scaleBody(this.realScaleX,this.realScaleY)},scaleBody:function(a,b){for(var c=[],d=this.body.getFixtureList();null!=d;)c.push(d),d=d.getNext();for(d=0;d<c.length;){var e=c[d];++d;var f=e.getShape();e=this.body.getLocalCenter();
if(f instanceof Lc){var g=f,h=1/this.bodyScale.x*a,m=1/this.bodyScale.y*b,l=g.m_p;l.subtract(e);l.x*=h;l.y*=m;g.m_p=e.copy();g.m_p.add(l);f.m_radius*=Math.abs(h)}else if(f instanceof Db){g=f.m_vertices;h=[];m=0<this.bodyScale.x&&0>a||0>this.bodyScale.x&&0<a;l=0<this.bodyScale.y&&0>b||0>this.bodyScale.y&&0<b;for(var n=0;n<g.length;){var p=g[n];++n;p.subtract(e);p.x=1/Math.abs(this.bodyScale.x)*p.x*Math.abs(a);p.y=1/Math.abs(this.bodyScale.y)*p.y*Math.abs(b);m&&(p.x=-p.x);l&&(p.y=-p.y);var k=e.copy();
k.add(p);h.push(k)}m&&l||!m&&!l||h.reverse();f.setAsArray(h,h.length)}}this.bodyScale.x=a;this.bodyScale.y=b;this.body.size.x=q.toPhysicalUnits(this.cacheWidth*a);this.body.size.y=q.toPhysicalUnits(this.cacheHeight*b)},checkScreenState:function(){var a=this.isOnScreen(),b=a||this.isInScene(),c=!this.lastScreenState&&a,d=!this.lastSceneState&&b,e=this.lastScreenState&&!a,f=this.lastSceneState&&!b;if(0<this.whenPositionStateChanged.length)for(this.whenPositionStateChanged._dispatchIndex=0;this.whenPositionStateChanged._dispatchIndex<
this.whenPositionStateChanged.length;){try{this.whenPositionStateChanged.listeners[this.whenPositionStateChanged._dispatchIndex](c,e,d,f)}catch(l){var g=J.caught(l);Q.fullError(g.get_message(),g,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"checkScreenState"})}++this.whenPositionStateChanged._dispatchIndex}var h=this.engine.whenTypeGroupPositionStateChangedEvents.h[this.groupID+1E6],m=this.engine.whenTypeGroupPositionStateChangedEvents.h[this.typeID];
if(null!=h&&0<h.length)for(h._dispatchIndex=0;h._dispatchIndex<h.length;){try{h.listeners[h._dispatchIndex](this,c,e,d,f)}catch(l){g=J.caught(l),Q.fullError(g.get_message(),g,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"checkScreenState"})}++h._dispatchIndex}if(null!=m&&0<m.length)for(m._dispatchIndex=0;m._dispatchIndex<m.length;){try{m.listeners[m._dispatchIndex](this,c,e,d,f)}catch(l){g=J.caught(l),Q.fullError(g.get_message(),g,
{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"checkScreenState"})}++m._dispatchIndex}this.lastScreenState=a;this.lastSceneState=b},contactCount:null,collisionsCount:null,handleCollisions:function(){if(0<this.contactCount)for(var a=0,b,c=this.contacts.iterator();c.hasNext();){b=c.next();var d=b.key;var e=this.collisions.mH;var f=e.mHash[73856093*d&e.mMask];if(-1==f)f=!1;else if(e=e.mData,e[f]==d)f=!0;else{var g=!1;for(f=e[f+2];-1!=f;){if(e[f]==
d){g=!0;break}f=e[f+2]}f=g}if(f){f=this.collisions;g=f.mH;e=g.mHash[73856093*d&g.mMask];if(-1==e)d=-2147483648;else if(g=g.mData,g[e]==d)d=g[e+1];else{var h=-2147483648;for(e=g[e+2];-1!=e;){if(g[e]==d){h=g[e+1];break}e=g[e+2]}d=h}d=-2147483648==d?null:f.mVals[d];b.getWorldManifold(tb.manifold);f=0;for(e=tb.manifold.m_points;f<e.length;)g=e[f],++f,0!=g.x&&0!=g.y&&(b=d.points[a],null==b?d.points[a]=Md.get(g.x,g.y,tb.manifold.m_normal.x,tb.manifold.m_normal.y):(b=d.points[a],b.x=g.x,b.y=g.y,b.normalX=
tb.manifold.m_normal.x,b.normalY=tb.manifold.m_normal.y),++a);for(;d.points.length>a;)Md.free(d.points.pop());a=0}else{var m=b.getFixtureA().getUserData(),l=b.getFixtureB().getUserData();m==this?(f=l,e=b.getFixtureB(),g=b.getFixtureA()):(f=m,e=b.getFixtureA(),g=b.getFixtureB());h=new tc;h.otherActor=f;h.otherShape=e;h.thisActor=this;h.thisShape=g;h.actorA=m;h.actorB=l;b.getWorldManifold(tb.manifold);this.collisions.set(d,h);this.collisionsCount++;d=this.getBody();m=f.getBody();l=b.getFixtureA().getBody();
for(var n=b.getFixtureB().getBody(),p=0,k=tb.manifold.m_points;p<k.length;)(b=k[p],++p,0==b.x||0==b.y||g.isSensor())?g.isSensor()&&(null!=f&&(h.thisCollidedWithActor=h.thisCollidedWithActor||1!=f.groupID&&-2!=f.groupID&&!f.isTerrainRegion,h.thisCollidedWithTerrain=h.thisCollidedWithTerrain||f.isTerrainRegion,h.thisCollidedWithTile=h.thisCollidedWithTile||1==f.groupID),h.otherCollidedWithActor=h.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,h.otherCollidedWithTerrain=
h.otherCollidedWithTerrain||this.isTerrainRegion,h.otherCollidedWithTile=h.otherCollidedWithTile||1==this.groupID,h.thisCollidedWithSensor=h.thisCollidedWithSensor||e.isSensor(),h.otherCollidedWithSensor=h.otherCollidedWithSensor||g.isSensor()):(b=Md.get(b.x,b.y,tb.manifold.m_normal.x,tb.manifold.m_normal.y),h.points.push(b),l==d?(h.thisFromBottom=h.thisFromBottom||0<b.normalY,h.thisFromTop=h.thisFromTop||0>b.normalY,h.thisFromLeft=h.thisFromLeft||0>b.normalX,h.thisFromRight=h.thisFromRight||0<b.normalX):
n==d&&(h.thisFromBottom=h.thisFromBottom||0>b.normalY,h.thisFromTop=h.thisFromTop||0<b.normalY,h.thisFromLeft=h.thisFromLeft||0<b.normalX,h.thisFromRight=h.thisFromRight||0>b.normalX),l==m?(h.otherFromBottom=h.otherFromBottom||0<b.normalY,h.otherFromTop=h.otherFromTop||0>b.normalY,h.otherFromLeft=h.otherFromLeft||0>b.normalX,h.otherFromRight=h.otherFromRight||0<b.normalX):n==m&&(h.otherFromBottom=h.otherFromBottom||0>b.normalY,h.otherFromTop=h.otherFromTop||0<b.normalY,h.otherFromLeft=h.otherFromLeft||
0<b.normalX,h.otherFromRight=h.otherFromRight||0>b.normalX),null!=f&&(h.thisCollidedWithActor=h.thisCollidedWithActor||1!=f.groupID&&-2!=f.groupID&&!f.isTerrainRegion,h.thisCollidedWithTerrain=h.thisCollidedWithTerrain||f.isTerrainRegion,h.thisCollidedWithTile=h.thisCollidedWithTile||1==f.groupID),h.otherCollidedWithActor=h.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,h.otherCollidedWithTerrain=h.otherCollidedWithTerrain||this.isTerrainRegion,h.otherCollidedWithTile=
h.otherCollidedWithTile||1==this.groupID,h.thisCollidedWithSensor=h.thisCollidedWithSensor||e.isSensor(),h.otherCollidedWithSensor=h.otherCollidedWithSensor||g.isSensor())}}if(0<this.collisionsCount)for(a=this.collisions.iterator();a.hasNext();)if(c=a.next(),null!=c&&null!=c.thisActor&&null!=c.otherActor&&c.thisActor.handlesCollisions&&c.otherActor.handlesCollisions){tb.lastCollided=c.otherActor;if(0<this.whenCollided.length)for(this.whenCollided._dispatchIndex=0;this.whenCollided._dispatchIndex<
this.whenCollided.length;){try{this.whenCollided.listeners[this.whenCollided._dispatchIndex](c)}catch($f){b=J.caught($f),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"handleCollisions"})}++this.whenCollided._dispatchIndex}this.engine.handleCollision(this,c)}},addContact:function(a){null!=this.contacts&&(this.contacts.set(a.key,a),this.contactCount++)},removeContact:function(a){if(null!=this.collisions){var b=
this.collisions,c=a.key,d=b.mH,e=d.mHash[73856093*c&d.mMask];if(-1==e)c=-2147483648;else if(d=d.mData,d[e]==c)c=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==c){f=d[e+1];break}e=d[e+2]}c=f}d=-2147483648==c?null:b.mVals[c];if(null!=d)for(this.collisions.unset(a.key),this.collisionsCount--;0<d.points.length;)Md.free(d.points.pop())}null!=this.contacts&&this.contacts.unset(a.key)&&this.contactCount--},addRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.set(a.key,
a)},removeRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.unset(a.key)},getID:function(){return this.ID},getName:function(){return this.get_name()},getGroupID:function(){return 0!=this.physicsMode?this.groupID:this.body.groupID},getLayerID:function(){return this.layer.ID},getLayer:function(){return this.layer},getLayerName:function(){return this.layer.layerName},getLayerOrder:function(){return this.layer.order},getType:function(){return this.type},isPausable:function(){return this.getType().pausable},
isPaused:function(){return this.paused},pause:function(){if(this.isPausable()){this.tweenProps.pause();for(var a=0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;null!=c.script&&c.script.pauseTweens()}this.paused=!0;0==this.physicsMode&&this.body.setPaused(!0)}},unpause:function(){if(this.isPausable()){this.tweenProps.unpause();for(var a=0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;null!=c.script&&c.script.unpauseTweens()}this.paused=!1;0==this.physicsMode&&this.body.setPaused(!1)}},
getGroup:function(){var a=this.engine.groups,b=this.getGroupID();return a.h[b]},getIsRegion:function(){return this.isRegion},getIsTerrainRegion:function(){return this.isTerrainRegion},moveToLayer:function(a){!this.isHUD&&a instanceof Fc&&this.engine.moveActorToLayer(this,a)},bringToFront:function(){this.isHUD||(this.engine.bringToFront(this),this.moveToTop())},bringForward:function(){this.isHUD||this.engine.bringForward(this)},sendToBack:function(){this.isHUD||(this.engine.sendToBack(this),this.moveToBottom())},
sendBackward:function(){this.isHUD||this.engine.sendBackward(this)},moveToBottom:function(){this.parent.setChildIndex(this,0)},moveToTop:function(){this.parent.setChildIndex(this,this.parent.get_numChildren()-1)},moveDown:function(){var a=this.parent.getChildIndex(this);0<a&&this.parent.setChildIndex(this,a-1)},moveUp:function(){var a=this.parent.getChildIndex(this),b=this.parent.get_numChildren()-1;a<b&&this.parent.setChildIndex(this,a+1)},getZIndex:function(){return this.parent.getChildIndex(this)},
setZIndex:function(a){var b=this.parent.get_numChildren()-1;a>b&&(a=b);0>a&&(a=0);this.parent.setChildIndex(this,a)},enableSmoothMotion:function(){this.smoothMove=!0},getX:function(a){null==a&&(a=!0);var b=-1;q.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=q.toPixelUnits(this.body.getPosition().x)-this.cacheWidth/2:0==this.physicsMode&&(b=this.body.getPosition().x*q.physicsScale-Math.floor(this.cacheWidth/2)-this.currOffset.x));if(q.NO_PHYSICS||0!=this.physicsMode)b=this.realX-Math.floor(this.cacheWidth/
2)-this.currOffset.x;return a?Math.round(b):b},getY:function(a){null==a&&(a=!0);var b=-1;q.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=q.toPixelUnits(this.body.getPosition().y)-this.cacheHeight/2:0==this.physicsMode&&(b=this.body.getPosition().y*q.physicsScale-Math.floor(this.cacheHeight/2)-this.currOffset.y));if(q.NO_PHYSICS||0!=this.physicsMode)b=this.realY-Math.floor(this.cacheHeight/2)-this.currOffset.y;return a?Math.round(b):b},getXCenter:function(){return 0==this.physicsMode?Math.round(q.toPixelUnits(this.body.getWorldCenter().x)-
this.currOffset.x):this.realX-this.currOffset.x},getYCenter:function(){return 0==this.physicsMode?Math.round(q.toPixelUnits(this.body.getWorldCenter().y)-this.currOffset.y):this.realY-this.currOffset.y},getScreenX:function(){return this.isHUD?this.getX(!0):this.getX(!0)-q.cameraX/q.SCALE},getScreenY:function(){return this.isHUD?this.getY(!0):this.getY(!0)-q.cameraY/q.SCALE},setX:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);1==this.physicsMode?(b=c||!this.continuousCollision,null==b&&(b=!0),this.moveActorBy(a+
Math.floor(this.cacheWidth/2)+this.currOffset.x-this.realX,this.realY-this.realY,b,!1)):2==this.physicsMode?this.resetReal(a+Math.floor(this.cacheWidth/2)+this.currOffset.x,this.realY):(this.dummy.x=this.isRegion||this.isTerrainRegion?q.toPhysicalUnits(a):q.toPhysicalUnits(a+Math.floor(this.cacheWidth/2)+this.currOffset.x),this.dummy.y=this.body.getPosition().y,this.body.setPosition(this.dummy),b&&this.body.setLinearVelocity(this.zero));this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);
this.updateMatrix=!0},setY:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);1==this.physicsMode?(b=c||!this.continuousCollision,null==b&&(b=!0),this.moveActorBy(this.realX-this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y-this.realY,b,!1)):2==this.physicsMode?this.resetReal(this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y):(this.dummy.y=this.isRegion||this.isTerrainRegion?q.toPhysicalUnits(a):q.toPhysicalUnits(a+Math.floor(this.cacheHeight/2)+this.currOffset.y),this.dummy.x=
this.body.getPosition().x,this.body.setPosition(this.dummy),b&&this.body.setLinearVelocity(this.zero));this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);this.updateMatrix=!0},setXY:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);1==this.physicsMode?(c=d||!this.continuousCollision,null==c&&(c=!0),this.moveActorBy(a+Math.floor(this.cacheWidth/2)+this.currOffset.x-this.realX,b+Math.floor(this.cacheHeight/2)+this.currOffset.y-this.realY,c,!1),0==this.colX&&0==this.colY&&this.resetReal(this.realX,
this.realY)):2==this.physicsMode?this.resetReal(a+Math.floor(this.cacheWidth/2)+this.currOffset.x,b+Math.floor(this.cacheHeight/2)+this.currOffset.y):(this.isRegion||this.isTerrainRegion?(this.dummy.x=q.toPhysicalUnits(a),this.dummy.y=q.toPhysicalUnits(b)):(this.dummy.x=q.toPhysicalUnits(a+Math.floor(this.cacheWidth/2)+this.currOffset.x),this.dummy.y=q.toPhysicalUnits(b+Math.floor(this.cacheHeight/2)+this.currOffset.y)),this.body.setPosition(this.dummy),c&&this.body.setLinearVelocity(this.zero));
this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);this.updateMatrix=!0},setXCenter:function(a){this.setX(a-this.getWidth()/2)},setYCenter:function(a){this.setY(a-this.getHeight()/2)},setScreenX:function(a){this.isHUD?this.setX(a):this.setX(a+q.cameraX/q.SCALE)},setScreenY:function(a){this.isHUD?this.setY(a):this.setY(a+q.cameraY/q.SCALE)},follow:function(a){if(null!=a)if(0!=this.physicsMode){var b=a.getXCenter();a=a.getYCenter();this.moveActorBy(b-this.realX,a-this.realY,!0,!1)}else this.body.setPosition(a.body.getWorldCenter())},
followWithOffset:function(a,b,c){0!=this.physicsMode?(b=a.getXCenter()+b,c=a.getYCenter()+c,this.moveActorBy(b-this.realX,c-this.realY,!0,!1)):(a=a.body.getWorldCenter(),a.x+=q.toPhysicalUnits(b),a.y+=q.toPhysicalUnits(c),this.body.setPosition(a))},setOriginPoint:function(a,b){var c=0==this.physicsMode?this.body.getPosition():new y(q.toPhysicalUnits(this.realX),q.toPhysicalUnits(this.realY));var d=new y(this.currOffset.x,this.currOffset.y),e=this.getAngle(),f=a-this.cacheWidth/2|0,g=b-this.cacheHeight/
2|0;if(null!=this.currOrigin&&((this.currOffset.x|0)!=f||(this.currOffset.y|0)!=g)&&0!=(57.29577951308402*e|0)){var h=e+Math.atan2(-this.currOffset.y,-this.currOffset.x);e+=Math.atan2(-g,-f);var m=Math.sqrt(Math.pow(this.currOffset.x,2)+Math.pow(this.currOffset.y,2)),l=Math.sqrt(Math.pow(f,2)+Math.pow(g,2)),n=Math.round(this.currOrigin.y+Math.sin(h)*m),p=Math.round(b+Math.sin(e)*l);c.x+=q.toPhysicalUnits(Math.round(this.currOrigin.x+Math.cos(h)*m)-Math.round(a+Math.cos(e)*l));c.y+=q.toPhysicalUnits(n-
p)}this.currOrigin.x=a;this.currOrigin.y=b;this.currOffset.x=f;this.currOffset.y=g;d.x=this.currOffset.x-d.x;d.y=this.currOffset.y-d.y;c.x+=q.toPhysicalUnits(d.x);c.y+=q.toPhysicalUnits(d.y);0==this.physicsMode?this.body.setPosition(c):(this.realX=q.toPixelUnits(c.x),this.realY=q.toPixelUnits(c.y));this.resetOrigin=!0},getXVelocity:function(){return 0!=this.physicsMode?this.xSpeed:this.body.getLinearVelocity().x},getYVelocity:function(){return 0!=this.physicsMode?this.ySpeed:this.body.getLinearVelocity().y},
setXVelocity:function(a){if(0!=this.physicsMode)this.xSpeed=a;else{var b=this.body.getLinearVelocity();b.x=a;this.body.setLinearVelocity(b);this.body.setAwake(!0)}},setYVelocity:function(a){if(0!=this.physicsMode)this.ySpeed=a;else{var b=this.body.getLinearVelocity();b.y=a;this.body.setLinearVelocity(b);this.body.setAwake(!0)}},setVelocity:function(a,b){this.setXVelocity(b*Math.cos(.01745329251994278*a));this.setYVelocity(b*Math.sin(.01745329251994278*a))},accelerateX:function(a){this.setXVelocity(this.getXVelocity()+
a)},accelerateY:function(a){this.setYVelocity(this.getYVelocity()+a)},accelerate:function(a,b){this.setXVelocity(this.getXVelocity()+b*Math.cos(.01745329251994278*a));this.setYVelocity(this.getYVelocity()+b*Math.sin(.01745329251994278*a))},getAngle:function(){return 0!=this.physicsMode?.01745329251994278*this.realAngle:this.body.getAngle()},getAngleInDegrees:function(){return 0!=this.physicsMode?this.realAngle:57.29577951308402*this.body.getAngle()},setAngle:function(a,b){null==b&&(b=!0);b?0!=this.physicsMode?
this.realAngle=57.29577951308402*a:this.body.setAngle(a):0!=this.physicsMode?this.realAngle=a:this.body.setAngle(.01745329251994278*a);this.updateMatrix=!0},rotate:function(a,b){null==b&&(b=!0);b?0!=this.physicsMode?this.realAngle+=57.29577951308402*a:this.body.setAngle(this.body.getAngle()+a):0!=this.physicsMode?this.realAngle+=a:this.body.setAngle(this.body.getAngle()+.01745329251994278*a)},getAngularVelocity:function(){return 0!=this.physicsMode?.01745329251994278*this.rSpeed:this.body.getAngularVelocity()},
setAngularVelocity:function(a){0!=this.physicsMode?this.rSpeed=57.29577951308402*a:(this.body.setAngularVelocity(a),this.body.setAwake(!0))},changeAngularVelocity:function(a){0!=this.physicsMode?this.rSpeed+=57.29577951308402*a:(this.body.setAngularVelocity(this.body.getAngularVelocity()+a),this.body.setAwake(!0))},push:function(a,b,c){if(0!=this.physicsMode)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.accelerateX(this.dummy.x*c*.01),this.accelerateY(this.dummy.y*c*.01);else if(0!=a||
0!=b)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.dummy.multiply(c),this.body.applyForce(this.dummy,this.body.getWorldCenter())},pushInDirection:function(a,b){this.push(Math.cos(.01745329251994278*a),Math.sin(.01745329251994278*a),b)},applyImpulse:function(a,b,c){if(0!=this.physicsMode)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.accelerateX(this.dummy.x*c),this.accelerateY(this.dummy.y*c);else if(0!=a||0!=b)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.dummy.multiply(c),
this.body.applyImpulse(this.dummy,this.body.getWorldCenter())},applyImpulseInDirection:function(a,b){this.applyImpulse(Math.cos(.01745329251994278*a),Math.sin(.01745329251994278*a),b)},applyTorque:function(a){0!=this.physicsMode?this.fixedRotation||(this.rSpeed-=a):(this.body.applyTorque(a),this.body.setAwake(!0))},getWidth:function(){return this.cacheWidth},getHeight:function(){return this.cacheHeight},getPhysicsWidth:function(){return this.cacheWidth/q.physicsScale},getPhysicsHeight:function(){return this.cacheHeight/
q.physicsScale},getBody:function(){return this.body},enableRotation:function(){0!=this.physicsMode?this.fixedRotation=!1:this.body.setFixedRotation(!1)},disableRotation:function(){0!=this.physicsMode?this.fixedRotation=!0:this.body.setFixedRotation(!0)},setIgnoreGravity:function(a){this.ignoreGravity=a;0==this.physicsMode&&this.body.setIgnoreGravity(a)},ignoresGravity:function(){return 0!=this.physicsMode?this.ignoreGravity:this.body.isIgnoringGravity()},getFriction:function(){return 0==this.physicsMode&&
null!=this.body.m_fixtureList?this.body.m_fixtureList.m_friction:0},getBounciness:function(){return 0==this.physicsMode&&null!=this.body.m_fixtureList?this.body.m_fixtureList.m_restitution:0},getMass:function(){return 0==this.physicsMode?this.md.mass:0},getAngularMass:function(){return 0==this.physicsMode?this.md.I:0},getLinearDamping:function(){return 0==this.physicsMode?this.body.getLinearDamping():0},getAngularDamping:function(){return 0==this.physicsMode?this.body.getAngularDamping():0},setFriction:function(a){0==
this.physicsMode&&this.body.setFriction(a)},setBounciness:function(a){0==this.physicsMode&&this.body.setBounciness(a)},setMass:function(a){0==this.physicsMode&&(this.md.mass=a,this.body.setMassData(this.md))},setAngularMass:function(a){0==this.physicsMode&&(this.md.I=a,this.body.setMassData(this.md))},setLinearDamping:function(a){0==this.physicsMode&&this.body.setLinearDamping(a)},setAngularDamping:function(a){0==this.physicsMode&&this.body.setAngularDamping(a)},isMouseOver:function(){if(this.isHUD){var a=
(M.mouseX-q.engine.hudLayer.get_x())/q.SCALE;var b=(M.mouseY-q.engine.hudLayer.get_y())/q.SCALE}else a=(M.mouseX+q.cameraX*this.layer.scrollFactorX)/q.SCALE,b=(M.mouseY+q.cameraY*this.layer.scrollFactorY)/q.SCALE;var c=Math.abs(this.realScaleX),d=Math.abs(this.realScaleY),e=this.currOrigin.x*(c-1),f=(this.cacheWidth-this.currOrigin.x)*(c-1),g=this.currOrigin.y*(d-1),h=(this.cacheHeight-this.currOrigin.y)*(d-1);0==this.physicsMode||this.currOrigin.x==this.cacheWidth/2&&this.currOrigin.y==this.cacheHeight/
2||this.resetReal(this.realX,this.realY);var m=this.colX-e,l=this.colY-g;if(0!=this.get_rotation()){c=m+this.currOrigin.x*c;d=l+this.currOrigin.y*d;a-=c;b-=d;var n=.01745329251994278*this.get_rotation();d=d-a*Math.sin(n)+b*Math.cos(n);a=c+a*Math.cos(n)+b*Math.sin(n);b=d}return this.isHUD&&!q.engine.isHUDZoomable?a>=m/q.engine.zoomMultiplier&&b>=l/q.engine.zoomMultiplier&&a<(m+this.cacheWidth+e+f)/q.engine.zoomMultiplier?b<(l+this.cacheHeight+g+h)/q.engine.zoomMultiplier:!1:a>=m&&b>=l&&a<m+this.cacheWidth+
e+f?b<l+this.cacheHeight+g+h:!1},isMouseHover:function(){return this.isMouseOver()?!M.mouseDown:!1},isMouseDown:function(){return this.isMouseOver()?M.mouseDown:!1},isMousePressed:function(){return this.isMouseOver()?M.mousePressed:!1},isMouseReleased:function(){return this.isMouseOver()?M.mouseReleased:!1},cancelTweens:function(){this.tweenProps.cancel()},fadeTo:function(a,b,c){null==b&&(b=1);this.tweenProps.alpha.tween(this.get_alpha(),a,c,1E3*b|0)},growTo:function(a,b,c,d){null==c&&(c=1);null==
b&&(b=1);null==a&&(a=1);this.tweenProps.realScaleXY.tween(this.realScaleX,a,this.realScaleY,b,d,1E3*c|0)},spinTo:function(a,b,c){null==b&&(b=1);this.tweenProps.angle.tween(this.getAngleInDegrees(),a,c,1E3*b|0)},moveTo:function(a,b,c,d){null==c&&(c=1);this.tweenProps.xy.tween(this.getX(!1),a,this.getY(!1),b,d,1E3*c|0)},spinBy:function(a,b,c){null==b&&(b=1);this.spinTo(this.getAngleInDegrees()+a,b,c)},moveBy:function(a,b,c,d){null==c&&(c=1);this.moveTo(this.getX(!1)+a,this.getY(!1)+b,c,d)},drawImage:function(a){if(null!=
this.currAnimation){var b=0,c=0;0<this.realAngle&&(this.drawMatrix.identity(),this.transformPoint.x=-(this.cacheWidth/2)*q.SCALE,this.transformPoint.y=-(this.cacheHeight/2)*q.SCALE,this.drawMatrix.translate(-this.transformPoint.x,-this.transformPoint.y),this.drawMatrix.scale(this.realScaleX,this.realScaleY),this.drawMatrix.rotate(.01745329251994278*this.realAngle),this.drawMatrix.translate(this.colX*q.SCALE,this.colY*q.SCALE),b+=this.transformMatrix.tx-this.drawMatrix.tx,c+=this.transformMatrix.ty-
this.drawMatrix.ty);var d=this.currAnimation.get_visible();this.currAnimation.set_visible(!0);var e=this.currAnimation,f=.01745329251994278*this.realAngle;ha.disposeImages&&!e.model.checkImageReadable()||a.drawImage(e.get_bitmapData(),b,c,f);this.currAnimation.set_visible(d)}},getCurrentImage:function(){return this.currAnimation.getCurrentImage()},enableActorDrawing:function(){this.drawActor=!0;null!=this.currAnimation&&this.currAnimation.set_visible(!0)},disableActorDrawing:function(){this.drawActor=
!1;null!=this.currAnimation&&this.currAnimation.set_visible(!1)},drawsImage:function(){return this.drawActor},setFilter:function(a){null==this.bitmapFilters&&(this.bitmapFilters=[]);this.bitmapFilters=this.bitmapFilters.concat(a);if(this.usingSoftwareFilter=Uc.exists(this.bitmapFilters,function(a){return!(a instanceof Xe)}))this.filtersAsShader=null;else{a=new Oa;for(var b=!0,c=0,d=this.bitmapFilters;c<d.length;){var e=d[c];++c;var f=U.__cast(e,Xe);if(b)b=f.get_matrix(),a.m11=b[0],a.m12=b[1],a.m13=
b[2],a.m14=b[3],a.m15=b[4],a.m21=b[5],a.m22=b[6],a.m23=b[7],a.m24=b[8],a.m25=b[9],a.m31=b[10],a.m32=b[11],a.m33=b[12],a.m34=b[13],a.m35=b[14],a.m41=b[15],a.m42=b[16],a.m43=b[17],a.m44=b[18],a.m45=b[19],a.matrix=b,b=!1;else{e=new Oa;f=f.get_matrix();e.m11=f[0];e.m12=f[1];e.m13=f[2];e.m14=f[3];e.m15=f[4];e.m21=f[5];e.m22=f[6];e.m23=f[7];e.m24=f[8];e.m25=f[9];e.m31=f[10];e.m32=f[11];e.m33=f[12];e.m34=f[13];e.m35=f[14];e.m41=f[15];e.m42=f[16];e.m43=f[17];e.m44=f[18];e.m45=f[19];e.matrix=f;f=new Oa;var g=
e.m11,h=e.m12,m=e.m13,l=e.m14;f.m11=e.m11*a.m11+e.m12*a.m21+e.m13*a.m31+e.m14*a.m41;f.m12=g*a.m12+e.m12*a.m22+e.m13*a.m32+e.m14*a.m42;f.m13=g*a.m13+h*a.m23+e.m13*a.m33+e.m14*a.m43;f.m14=g*a.m14+h*a.m24+m*a.m34+e.m14*a.m44;f.m15=g*a.m15+h*a.m25+m*a.m35+l*a.m45;g=e.m21;h=e.m22;m=e.m23;l=e.m24;f.m21=e.m21*a.m11+e.m22*a.m21+e.m23*a.m31+e.m24*a.m41;f.m22=g*a.m12+e.m22*a.m22+e.m23*a.m32+e.m24*a.m42;f.m23=g*a.m13+h*a.m23+e.m23*a.m33+e.m24*a.m43;f.m24=g*a.m14+h*a.m24+m*a.m34+e.m24*a.m44;f.m25=g*a.m15+h*a.m25+
m*a.m35+l*a.m45;g=e.m31;h=e.m32;m=e.m33;l=e.m34;f.m31=e.m31*a.m11+e.m32*a.m21+e.m33*a.m31+e.m34*a.m41;f.m32=g*a.m12+e.m32*a.m22+e.m33*a.m32+e.m34*a.m42;f.m33=g*a.m13+h*a.m23+e.m33*a.m33+e.m34*a.m43;f.m34=g*a.m14+h*a.m24+m*a.m34+e.m34*a.m44;f.m35=g*a.m15+h*a.m25+m*a.m35+l*a.m45;g=e.m41;h=e.m42;m=e.m43;l=e.m44;f.m41=e.m41*a.m11+e.m42*a.m21+e.m43*a.m31+e.m44*a.m41;f.m42=g*a.m12+e.m42*a.m22+e.m43*a.m32+e.m44*a.m42;f.m43=g*a.m13+h*a.m23+e.m43*a.m33+e.m44*a.m43;f.m44=g*a.m14+h*a.m24+m*a.m34+e.m44*a.m44;
f.m45=g*a.m15+h*a.m25+m*a.m35+l*a.m45;a=f.matrix;a[0]=f.m11;a[1]=f.m12;a[2]=f.m13;a[3]=f.m14;a[4]=f.m15;a[5]=f.m21;a[6]=f.m22;a[7]=f.m23;a[8]=f.m24;a[9]=f.m25;a[10]=f.m31;a[11]=f.m32;a[12]=f.m33;a[13]=f.m34;a[14]=f.m35;a[15]=f.m41;a[16]=f.m42;a[17]=f.m43;a[18]=f.m44;a[19]=f.m45;a=f}}c=new Cj;c.init(a.matrix);this.filtersAsShader=c}this.usingSoftwareFilter&&null!=this.currAnimation&&this.currAnimation.set_filter(this.bitmapFilters);this.currAnimation.set_shader(this.filtersAsShader)},clearFilters:function(){this.bitmapFilters=
null;this.usingSoftwareFilter=!1;this.filtersAsShader=null;null!=this.currAnimation&&this.currAnimation.set_filter(null);this.currAnimation.set_shader(null)},setBlendMode:function(a){this.set_blendMode(a)},resetBlendMode:function(){this.set_blendMode(10)},addBehavior:function(a){null!=this.behaviors&&this.behaviors.add(a)},hasBehavior:function(a){return null!=this.behaviors?this.behaviors.hasBehavior(a):!1},enableBehavior:function(a){null!=this.behaviors&&this.behaviors.enableBehavior(a)},disableBehavior:function(a){null!=
this.behaviors&&this.behaviors.disableBehavior(a)},isBehaviorEnabled:function(a){return null!=this.behaviors?this.behaviors.isBehaviorEnabled(a):!1},enableAllBehaviors:function(){if(null!=this.behaviors)for(var a=0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;c.enabled=!0}},getValue:function(a,b){return this.behaviors.getAttribute(a,b)},setValue:function(a,b,c){this.behaviors.setAttribute(a,b,c)},shout:function(a,b){return this.behaviors.call(a,b)},say:function(a,b,c){return this.behaviors.call2(a,
b,c)},setActorValue:function(a,b){null!=this.registry&&(this.registry.h[a]=b)},getActorValue:function(a){return null==this.registry?null:this.registry.h[a]},hasActorValue:function(a){return null==this.registry?null:null!=this.registry.h[a]},registerListener:function(a,b){var c=W.indexOf(this.allEventReferences,a);-1!=c?a=this.allListeners.h[c]:(this.allEventReferences.push(a),c=this.allEventReferences.length-1,a=[],this.allListeners.h[c]=a);a.push(b)},removeAllListeners:function(){for(var a=0,b=this.allEventReferences.length;a<
b;){var c=a++,d=this.allEventReferences[c];if(null!=d&&(c=U.__cast(this.allListeners.h[c],Array),null!=c))for(var e=0,f=c.length;e<f;){var g=e++;d.remove(c[g])}}this.allEventReferences.length=0},anchorToScreen:function(){this.isHUD||this.engine.moveActorToLayer(this,this.engine.hudLayer)},unanchorFromScreen:function(){this.isHUD&&this.engine.moveActorToLayer(this,this.cachedLayer)},isAnchoredToScreen:function(){return this.isHUD},makeAlwaysSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate||
(0==this.physicsMode&&a&&(this.body.setAlwaysActive(!0),this.body.setActive(!0)),this.alwaysSimulate=!0)},makeSometimesSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate&&(0==this.physicsMode&&a&&(this.body.setAlwaysActive(!1),this.body.setActive(!1)),this.alwaysSimulate=!1)},alwaysSimulates:function(){return this.alwaysSimulate},die:function(){this.dying=!0;var a=this.engine.whenTypeGroupKilledEvents,b=this.getType(),c=a.h[b.__id__];a=this.engine.whenTypeGroupKilledEvents;b=this.getGroup();
a=a.h[b.__id__];if(0<this.whenKilled.length)for(this.whenKilled._dispatchIndex=0;this.whenKilled._dispatchIndex<this.whenKilled.length;){try{this.whenKilled.listeners[this.whenKilled._dispatchIndex]()}catch(d){b=J.caught(d),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"die"})}++this.whenKilled._dispatchIndex}if(null!=c&&0<c.length)for(c._dispatchIndex=0;c._dispatchIndex<c.length;){try{c.listeners[c._dispatchIndex](this)}catch(d){b=
J.caught(d),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"die"})}++c._dispatchIndex}if(null!=a&&0<a.length)for(a._dispatchIndex=0;a._dispatchIndex<a.length;){try{a.listeners[a._dispatchIndex](this)}catch(d){b=J.caught(d),Q.fullError(b.get_message(),b,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"die"})}++a._dispatchIndex}this.removeAllListeners()},
isDying:function(){return this.dying},isAlive:function(){return!(this.dead||this.dying||this.recycled)},isOnScreen:function(){var a=q.cameraX/q.SCALE,b=q.cameraY/q.SCALE,c=q.paddingLeft,d=q.paddingTop,e=q.paddingRight,f=q.paddingBottom;return(0!=this.physicsMode||this.body.isActive())&&this.getX(!0)+this.cacheWidth*this.realScaleX>=a-c&&this.getY(!0)+this.cacheHeight*this.realScaleY>=b-d&&this.getX(!0)<a+q.screenWidth+e?this.getY(!0)<b+q.screenHeight+f:!1},isInScene:function(){return(0!=this.physicsMode||
this.body.isActive())&&0<=this.getX(!0)+this.cacheWidth*this.realScaleX&&0<=this.getY(!0)+this.cacheHeight*this.realScaleY&&this.getX(!0)<q.sceneWidth?this.getY(!0)<q.sceneHeight:!1},getLastCollidedActor:function(){return tb.lastCollided},killSelfAfterLeavingScreen:function(){this.killLeaveScreen=!0},toString:function(){return null==this.get_name()?"Unknown Actor "+this.ID:"[Actor "+this.ID+","+this.get_name()+"]"},addRectangularShape:function(a,b,c,d){if(0==this.physicsMode){var e=new Db,f=[];a=
q.toPhysicalUnits(a-Math.floor(this.cacheWidth/2)-this.currOffset.x);b=q.toPhysicalUnits(b-Math.floor(this.cacheHeight/2)-this.currOffset.y);c=q.toPhysicalUnits(c);d=q.toPhysicalUnits(d);f.push(new y(a,b));f.push(new y(a+c,b));f.push(new y(a+c,b+d));f.push(new y(a,b+d));e.setAsVector(f);this.createFixture(e).SetUserData(this)}},addCircularShape:function(a,b,c){if(0==this.physicsMode){var d=new Lc;d.m_radius=q.toPhysicalUnits(c);d.m_p.x=q.toPhysicalUnits(a);d.m_p.y=q.toPhysicalUnits(b);this.createFixture(d).SetUserData(this)}},
addVertex:function(a,b,c){b=q.toPhysicalUnits(b-Math.floor(this.cacheWidth/2)-this.currOffset.x);c=q.toPhysicalUnits(c-Math.floor(this.cacheHeight/2)-this.currOffset.y);a.push(new y(b,c))},addPolygonalShape:function(a){if(0==this.physicsMode){var b=new Db;b.setAsArray(a);this.createFixture(b).SetUserData(this)}},createFixture:function(a){var b=new Hf;b.shape=a;b.density=.1*this.bodyDef.mass;b.friction=this.bodyDef.friction;b.restitution=this.bodyDef.bounciness;return this.body.createFixture(b)},getLastCreatedFixture:function(){return 0==
this.physicsMode?this.body.getFixtureList():null},setLocation:function(a,b){this.realX=a;this.realY=b;this.setXY(a,b,!1,!0)},get_shape:function(){return this._mask},set_shape:function(a){if(this._mask==a)return a;null!=this._mask&&this._mask.assignTo(null);this._mask=a;null!=a&&this._mask.assignTo(this);return this._mask},collide:function(a,b,c){a=this.engine.getGroup(a);this._x=this.realX;this._y=this.realY;this.resetReal(b,c);if(null==this._mask){b=0;for(c=a.list;b<c.length;)if(a=c[b],++b,!a.recycled&&
this.colX+this.cacheWidth>=a.colX&&this.colY+this.cacheHeight>=a.colY&&this.colX<=a.colX+a.cacheWidth&&this.colY<=a.colY+a.cacheHeight&&a.collidable&&a!=this&&(null==a._mask||a._mask.collide(this.HITBOX)))return this.colMask=a._mask,this.resetReal(this._x,this._y),a;this.resetReal(this._x,this._y);return null}b=0;for(c=a.list;b<c.length;)if(a=c[b],++b,!a.recycled&&this.colX+this.cacheWidth>=a.colX&&this.colY+this.cacheHeight>=a.colY&&this.colX<=a.colX+a.cacheWidth&&this.colY<=a.colY+a.cacheHeight&&
a.collidable&&a!=this&&this._mask.collide(null!=a._mask?a._mask:a.HITBOX))return this.colMask=null!=a._mask?a._mask:a.HITBOX,this.resetReal(this._x,this._y),a;this.resetReal(this._x,this._y);return null},collideTypes:function(a,b,c){for(var d=this.collidedList.length,e,f=0;f<a.length;)e=a[f],++f,-2!=e&&this.collideInto(e,b,c,this.collidedList);return this.collidedList.length>d?this.collidedList[this.collidedList.length-1]:null},collideWith:function(a,b,c){this._x=this.realX;this._y=this.realY;this.resetReal(b,
c);if(this.colX+this.cacheWidth>=a.colX&&this.colY+this.cacheHeight>=a.colY&&this.colX<=a.colX+a.cacheWidth&&this.colY<=a.colY+a.cacheHeight&&this.collidable&&a.collidable){if(null==this._mask){if(null==a._mask||a._mask.collide(this.HITBOX))return this.resetReal(this._x,this._y),a;this.resetReal(this._x,this._y);return null}if(this._mask.collide(null!=a._mask?a._mask:a.HITBOX))return this.resetReal(this._x,this._y),a}this.resetReal(this._x,this._y);return null},collideInto:function(a,b,c,d){a=this.engine.getGroup(a);
this._x=this.realX;this._y=this.realY;this.resetReal(b,c);b=d.length;if(null==this._mask)for(c=0,a=a.list;c<a.length;){var e=a[c];++c;e.recycled||this.colX+this.cacheWidth>=e.colX&&this.colY+this.cacheHeight>=e.colY&&this.colX<=e.colX+e.cacheWidth&&this.colY<=e.colY+e.cacheHeight&&e.collidable&&e!=this&&(null==e._mask||e._mask.collide(this.HITBOX))&&(W.contains(d,e)||(d[b++]=e))}else for(c=0,a=a.list;c<a.length;)e=a[c],++c,this.colX+this.cacheWidth>=e.colX&&this.colY+this.cacheHeight>=e.colY&&this.colX<=
e.colX+e.cacheWidth&&this.colY<=e.colY+e.cacheHeight&&e.collidable&&e!=this&&this._mask.collide(null!=e._mask?e._mask:e.HITBOX)&&(W.contains(d,e)||(d[b++]=e));this.resetReal(this._x,this._y)},clearCollisionInfoList:function(){if(0<this.collisionsCount)for(var a=this.simpleCollisions.iterator();a.hasNext();){var b=a.next();b.remove=!0;null!=b.linkedCollision&&(b.linkedCollision.remove=!0)}},disposeRemovedCollisionInfo:function(){if(0<this.collisionsCount){for(var a=-1,b=this.simpleCollisions.keys();b.hasNext();){var c=
b.next(),d=this.simpleCollisions,e=d.mH,f=e.mHash[73856093*c&e.mMask];if(-1==f)f=-2147483648;else if(e=e.mData,e[f]==c)f=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==c){g=e[f+1];break}f=e[f+2]}f=g}(-2147483648==f?null:d.mVals[f]).remove?this.simpleCollisions.unset(c):c>a&&(a=c)}this.collisionsCount=a+1}},clearCollidedList:function(){for(;0<this.collidedList.length;)this.collidedList.pop();this.listChecked=0},addCollision:function(a){var b=this.alreadyCollided(a);if(-1!=b){var c=this.simpleCollisions,
d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)e=-2147483648;else if(d=d.mData,d[e]==b)e=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}e=f}c=-2147483648==e?null:c.mVals[e];a.switchData(c.linkedCollision);a.linkedCollision.remove=!1;a.remove=!1;tc.recycle(c);this.simpleCollisions.unset(b);this.simpleCollisions.set(b,a);return a}this.simpleCollisions.unset(this.collisionsCount);this.simpleCollisions.set(this.collisionsCount,a);this.collisionsCount++;return a},
alreadyCollided:function(a){for(var b=this.simpleCollisions.keys();b.hasNext();){var c=b.next(),d=this.simpleCollisions,e=d.mH,f=e.mHash[73856093*c&e.mMask];if(-1==f)f=-2147483648;else if(e=e.mData,e[f]==c)f=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==c){g=e[f+1];break}f=e[f+2]}f=g}d=-2147483648==f?null:d.mVals[f];if(null!=d&&(d.maskA==a.maskA&&d.maskB==a.maskB||d.maskA==a.maskB&&d.maskB==a.maskA))if(d.solidCollision)if(1==d.maskA.groupID||1==d.maskB.groupID){if(d.thisFromLeft||d.thisFromRight)if(a.thisFromLeft||
a.thisFromRight)return c;if(d.thisFromTop||d.thisFromBottom)if(a.thisFromTop||a.thisFromBottom)return c}else return c;else return c}return-1},resetReal:function(a,b){this.realX=a;this.realY=b;this.colX=this.realX-Math.floor(this.cacheWidth/2)-this.currOffset.x;this.colY=this.realY-Math.floor(this.cacheHeight/2)-this.currOffset.y},adjustByWidth:function(a){if(null!=this._mask&&null!=this._mask.lastCheckedMask&&this._mask.lastCheckedMask instanceof fd){var b=this._mask.lastCheckedMask;return a?this.cacheWidth/
2-(this.cacheWidth-(b._x+b._width)):this.cacheWidth/2-b._x}return this.cacheWidth/2},adjustByHeight:function(a){if(null!=this._mask&&null!=this._mask.lastCheckedMask&&this._mask.lastCheckedMask instanceof fd){var b=this._mask.lastCheckedMask;return a?this.cacheHeight/2-(this.cacheHeight-(b._y+b._height)):this.cacheHeight/2-b._y}return this.cacheHeight/2},getAllCollisionInfo:function(a,b){for(var c=null;this.listChecked<this.collidedList.length;){var d=tc.get();this.colMask=this.collidedList[this.listChecked]._mask;
this.fillCollisionInfo(d,this.collidedList[this.listChecked],a,b);this.addCollision(d);if(null==d.linkedCollision){var e=tc.get();d.switchData(e);this.collidedList[this.listChecked].addCollision(e)}d.solidCollision&&(c=d);this.listChecked++}return c},moveActorBy:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);if(0!=a||0!=b){this.clearCollisionInfoList();if(!c&&this.collidable&&null!=this.HITBOX.collideTypes){c=this.HITBOX.collideTypes;if(0!=a){var e=0<a?Math.ceil(this.realX+a):Math.floor(this.realX+
a);this.clearCollidedList();if(d||null!=this.collideTypes(c,e,this.realY))for(this.clearCollidedList();0!=a;){var f=1<=a||-1>=a?1:Math.abs(a);f=0<a?f:-f;e=0<f?Math.ceil(this.realX+f):Math.floor(this.realX+f);var g=this.collide(-2,e,this.realY);null!=g&&U.__cast(g,md).addActor(this);g=this.collideTypes(c,e,this.realY);if(null!=g&&(e=this.getAllCollisionInfo(f,0),null!=e)){this.xSpeed=0;e.useBounds&&(this.realX=0<f?e.bounds.x-Math.ceil(this.adjustByWidth(!0)):e.bounds.x+e.bounds.width+Math.floor(this.adjustByWidth(!1)));
break}this.realX+=f;a-=f}else this.realX+=a}if(0!=b)if(e=0<b?Math.ceil(this.realY+b):Math.floor(this.realY+b),this.clearCollidedList(),d||null!=this.collideTypes(c,this.realX,e))for(this.clearCollidedList();0!=b;){f=1<=b||-1>=b?1:Math.abs(b);f=0<b?f:-f;e=0<f?Math.ceil(this.realY+f):Math.floor(this.realY+f);g=this.collide(-2,this.realX,e);null!=g&&U.__cast(g,md).addActor(this);g=this.collideTypes(c,this.realX,e);if(null!=g&&(e=this.getAllCollisionInfo(0,f),null!=e)){this.ySpeed=0;e.useBounds&&(this.realY=
0<f?e.bounds.y-Math.ceil(this.adjustByHeight(!0)):e.bounds.y+e.bounds.height+Math.floor(this.adjustByHeight(!1)));break}this.realY+=f;b-=f}else this.realY+=b}else this.realX+=a,this.realY+=b;this.resetReal(this.realX,this.realY)}},moveActorTo:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.moveActorBy(a-this.realX,b-this.realY,c,d)},moveActorTowards:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!0);this._point.x=a-this.realX;this._point.y=b-this.realY;this._point.normalize(c);this.moveActorBy(this._point.x,
this._point.y,d,e)},moveCollideX:function(a,b){},moveCollideY:function(a,b){},fillCollisionInfo:function(a,b,c,d){if(b instanceof md)b.addActor(this);else{a.thisActor=a.actorA=this;a.otherActor=a.actorB=b;a.maskA=this._mask;a.maskB=this.colMask;a.solidCollision=this._mask.solid&&this.colMask.solid;a.groupA=this._mask.lastCheckedMask.groupID;a.groupB=this._mask.lastCheckedMask.lastColID;var e=tc.collisionResponses,f=this.getGroupID();e=e.h[f];var g=!1,h=!1;null!=e?(f=b.getGroupID(),f=null!=e.h[f]):
f=!1;f&&(f=b.getGroupID(),"sensor"==e.h[f]?(a.solidCollision=!1,g=!0):h=a.solidCollision=!0);null!=this.colMask&&(a.useBounds=!0,a.bounds.x=this.colMask.lastBounds.x,a.bounds.y=this.colMask.lastBounds.y,a.bounds.width=this.colMask.lastBounds.width,a.bounds.height=this.colMask.lastBounds.height);0!=c&&(1E8==b.ID?(a.thisFromLeft=0>c,a.thisFromRight=0<c):(a.thisFromLeft=b.colX<this.colX,a.thisFromRight=b.colX>this.colX),a.otherFromLeft=!a.thisFromLeft,a.otherFromRight=!a.thisFromRight,a.thisFromTop=
a.otherFromTop=!1,a.thisFromBottom=a.otherFromBottom=!1);0!=d&&(1E8==b.ID?(a.thisFromTop=0>d,a.thisFromBottom=0<d):(a.thisFromTop=b.colY<this.colY,a.thisFromBottom=b.colY>this.colY),a.otherFromTop=!a.thisFromTop,a.otherFromBottom=!a.thisFromBottom,a.thisFromLeft=a.otherFromLeft=!1,a.thisFromRight=a.otherFromRight=!1);a.thisCollidedWithActor=!0;a.thisCollidedWithTile=1E8==b.ID;a.thisCollidedWithSensor=null!=a?g||!h&&!a.maskB.solid:!1;a.thisCollidedWithTerrain=!1;a.otherCollidedWithActor=!0;a.otherCollidedWithTile=
1E8==b.ID;a.otherCollidedWithSensor=null!=a?!a.maskA.solid:!1;a.otherCollidedWithTerrain=!1}},handleCollisionsSimple:function(){if(0<this.collisionsCount)for(var a=this.simpleCollisions.iterator();a.hasNext();){var b=a.next();if(null!=b&&1!=b.remove){tb.lastCollided=b.otherActor;if(0<this.whenCollided.length)for(this.whenCollided._dispatchIndex=0;this.whenCollided._dispatchIndex<this.whenCollided.length;){try{this.whenCollided.listeners[this.whenCollided._dispatchIndex](b)}catch(d){var c=J.caught(d);
Q.fullError(c.get_message(),c,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Actor",methodName:"handleCollisionsSimple"})}++this.whenCollided._dispatchIndex}this.engine.handleCollision(this,b)}}},HITBOX:null,_mask:null,colMask:null,_x:null,_y:null,_moveX:null,_moveY:null,_point:null,simpleCollisions:null,collidedList:null,listChecked:null,__class__:tb,__properties__:u(Ya.prototype.__properties__,{set_shape:"set_shape",get_shape:"get_shape"})});var eo=
function(a,b,c,d){this.ID=a;this.name=b;this.allScenes=c;this.members=d;this.active=!0};k["com.stencyl.models.Atlas"]=eo;eo.__name__="com.stencyl.models.Atlas";eo.prototype={ID:null,name:null,allScenes:null,active:null,members:null,__class__:eo};var Lh=function(){};k["com.stencyl.models.Background"]=Lh;Lh.__name__="com.stencyl.models.Background";Lh.__isInterface__=!0;Lh.prototype={update:null,draw:null,__class__:Lh};var el=function(a,b){this.group1=a;this.group2=b};k["com.stencyl.models.CollisionGroupDef"]=
el;el.__name__="com.stencyl.models.CollisionGroupDef";el.prototype={group1:null,group2:null,__class__:el};var gd=function(a,b,c){this.ID=a;this.atlasID=c;this.name=b;this.sID=a+","+b};k["com.stencyl.models.Resource"]=gd;gd.__name__="com.stencyl.models.Resource";gd.prototype={ID:null,atlasID:null,name:null,sID:null,toString:function(){return this.sID},isAtlasActive:function(){var a=Lb.get().atlases.h[this.atlasID];return null==a?!1:a.active},loadGraphics:function(){},unloadGraphics:function(){},reloadGraphics:function(a){this.unloadGraphics();
this.loadGraphics()},__class__:gd};var Af=function(a,b,c,d){gd.call(this,a,c,b);this.isDefault=d;this.isAtlasActive()&&this.loadGraphics()};k["com.stencyl.models.Font"]=Af;Af.__name__="com.stencyl.models.Font";Af.resetStatics=function(){Af.defaultFont=null};Af.__super__=gd;Af.prototype=u(gd.prototype,{font:null,fontScale:null,isDefault:null,graphicsLoaded:null,getHeight:function(){return null!=this.font?this.font.getFontHeight(this.fontScale):0},getTextWidth:function(a){return null!=this.font?this.font.getTextWidth(a,
this.fontScale):0},loadGraphics:function(){if(!this.graphicsLoaded){if(this.isDefault){var a=va.getText("assets/graphics/default-font.fnt");a=ba.parse(a);Af.defaultFont=this.font=(new wg).loadAngelCode(va.getBitmapData("assets/graphics/default-font.png"),a);this.fontScale=q.SCALE;Af.defaultFont.isDefault=!0}else{a=va.getText("assets/graphics/"+q.IMG_BASE+"/font-"+this.ID+".fnt");a=ba.parse(a);var b=va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/font-"+this.ID+".png",!1);this.font=(new wg).loadAngelCode(b,
a);this.fontScale=1}this.graphicsLoaded=!0}},unloadGraphics:function(){this.graphicsLoaded&&(this.font=Af.defaultFont,this.fontScale=1,this.graphicsLoaded=!1)},reloadGraphics:function(a){gd.prototype.reloadGraphics.call(this,a)},get_letterSpacing:function(){return this.font.xSpacing},set_letterSpacing:function(a){return this.font.xSpacing=a},get_lineSpacing:function(){return this.font.ySpacing},set_lineSpacing:function(a){return this.font.ySpacing=a},isBitmapFont:function(a){null==a&&(a=va.getText("assets/graphics/"+
q.IMG_BASE+"/font-"+this.ID+".fnt"),a=ba.parse(a));for(a=a.elements();a.hasNext();){var b=a.next();if(b.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==b.nodeType?"null":Ga.toString(b.nodeType)));if("font"==b.nodeName)for(b=b.elements();b.hasNext();){var c=b.next();if(c.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==c.nodeType?"null":Ga.toString(c.nodeType)));if("info"==c.nodeName)for(c=c.attributes();c.hasNext();)if("lspace"==
c.next())return!0}}return!1},__class__:Af,__properties__:{set_lineSpacing:"set_lineSpacing",get_lineSpacing:"get_lineSpacing",set_letterSpacing:"set_letterSpacing",get_letterSpacing:"get_letterSpacing"}});var Lb=function(){var a=bc.get().gameMbs.getRoot();this.shapes=this.readShapes(a);this.atlases=this.readAtlases(a);this.autotileFormats=this.readAutotileFormats(a);this.groups=this.readGroups(a);this.groups.push(new ph(-2,"Regions"));this.groups.push(new ph(0,"Players"));this.groups.push(new ph(1,
"Terrain"));this.groups.push(new ph(2,"Doodads"));this.groups.push(new ph(3,"Actors"));this.groupsCollidesWith=new Xa;this.collisionGroups=this.readCollisionGroups(a);Lb.collisionMap=[];for(var b=0,c=0,d=this.groups;c<d.length;){var e=d[c];++c;b=Math.max(e.ID|0,b)|0}++b;c=0;for(d=b;c<d;){e=c++;Lb.collisionMap.push([]);for(var f=0,g=b;f<g;)f++,Lb.collisionMap[e].push(!1)}if(q.NO_PHYSICS)for(c=0,d=this.groups;c<d.length;)e=d[c],++c,this.collisionGroups.push(new el(e.ID,-2));c=0;for(d=this.collisionGroups;c<
d.length;){e=d[c];++c;b=e.group1;e=e.group2;this.groupsCollidesWith.h.hasOwnProperty(b)||(this.groupsCollidesWith.h[b]=[]);this.groupsCollidesWith.h.hasOwnProperty(e)||(this.groupsCollidesWith.h[e]=[]);if(!q.NO_PHYSICS||0<=b&&0<=e)Lb.collisionMap[b][e]=!0,Lb.collisionMap[e][b]=!0;this.groupsCollidesWith.h[b].push(e);this.groupsCollidesWith.h[e].push(b)}this.gameAttributes=Lb.readGameAttributes(a);bc.get().gameMbs=null};k["com.stencyl.models.GameModel"]=Lb;Lb.__name__="com.stencyl.models.GameModel";
Lb.resetStatics=function(){Lb.instance=null;Lb.collisionMap=null};Lb.get=function(){null==Lb.instance&&(Lb.instance=new Lb);return Lb.instance};Lb.readGameAttributes=function(a){return oe.readMap(a.getGameAttributes())};Lb.prototype={groups:null,groupsCollidesWith:null,collisionGroups:null,gameAttributes:null,shapes:null,atlases:null,scenes:null,autotileFormats:null,loadScenes:function(){this.scenes=new Xa;for(var a=bc.get().sceneListMbs.getRoot(),b=0,c=a.length();b<c;){b++;var d=a.getNextObject(),
e=d.getId(),f=this.scenes;d=new fl(e,d.getName());f.h[e]=d}bc.get().sceneListMbs=null},readShapes:function(a){var b=new Xa;a=a.getShapes();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getPoints(),g=[],h=0;for(f=sd.readPoints(f);h<f.length;){var m=f[h];++h;g.push(new y(3.1*m.x,3.1*m.y))}sd.EnsureCorrectVertexDirection(g);h=new Db;h.setAsArray(g,g.length);e=e.getId();b.h[e]=h}return b},readAtlases:function(a){var b=new Xa;a=a.getAtlases();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),
f=e.getId(),g=e.getName(),h=e.getAllScenes();e=e.getMembers();for(var m=[],l=0,n=e.length();l<n;)l++,m.push(e.readInt());g=new eo(f,g,h,m);b.h[f]=g}return b},readAutotileFormats:function(a){var b=new Xa;a=a.getAutotileFormats();for(var c=0,d=a.length();c<d;){c++;for(var e=a.getNextObject(),f=e.getName(),g=e.getId(),h=e.getAcross(),m=e.getDown(),l=[],n=[],p=e.getCorners(),k=0,q=p.length();k<q;){k++;var t=p.getNextObject(),v=t.getTopLeft();v=new pa(v.getX(),v.getY());var r=t.getTopRight();r=new pa(r.getX(),
r.getY());var Ka=t.getBottomLeft();Ka=new pa(Ka.getX(),Ka.getY());t=t.getBottomRight();n.push(new fo(v,r,Ka,new pa(t.getX(),t.getY())))}e=e.getFlags();p=0;for(k=e.length();p<k;)q=p++,l[q]=n[e.readInt()];f=new go(f,g,h,m,l);b.h[g]=f}return b},readGroups:function(a){var b=[];a=a.getGroups();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject();b.push(new ph(e.getId(),e.getName()))}return b},readCollisionGroups:function(a){var b=[];a=a.getCgroups();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject();
b.push(new el(e.getGroup1(),e.getGroup2()))}return b},__class__:Lb};var ph=function(a,b){this.ID=a;this.name=b};k["com.stencyl.models.GroupDef"]=ph;ph.__name__="com.stencyl.models.GroupDef";ph.prototype={ID:null,name:null,__class__:ph};var Hn={_new:function(a){return a},fromInt:function(a){return Hn._new(a)},fromString:function(a){switch(a){case "MINIMAL_PHYSICS":return 2;case "NORMAL_PHYSICS":return 0;case "SIMPLE_PHYSICS":return 1;default:return 0}},toString:function(a){switch(a){case 0:return"NORMAL_PHYSICS";
case 1:return"SIMPLE_PHYSICS";case 2:return"MINIMAL_PHYSICS";default:return"NORMAL_PHYSICS"}}},md=function(a,b,c,d,e){tb.call(this,a,-1,-2,b,c,-1,q.NO_PHYSICS?e.width:1,q.NO_PHYSICS?e.height:1,null,null,null,null,!1,!1,!1,!1,q.NO_PHYSICS?null:d[0],q.NO_PHYSICS);this.isRegion=this.alwaysSimulate=!0;this.solid=this.isTerrainRegion=!1;this.set_name("Region");this.simpleBounds=e;this.copy=d[0];this.containedActors=new Xa;this.whenActorEntered=new Gc;this.whenActorExited=new Gc;this.justAdded=[];this.justRemoved=
[];q.NO_PHYSICS||(this.body.setSleepingAllowed(!0),this.body.setAwake(!1),this.body.setIgnoreGravity(!0));a=0;var f=0;if(q.NO_PHYSICS){var g=e.width;e=e.height;this.cacheWidth=this.originalWidth=this.regionWidth=Math.round(Math.abs(a-g));this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(Math.abs(f-e));this.currOffset.x=-(this.cacheWidth/2);this.currOffset.y=-(this.cacheHeight/2);this.resetReal(b,c)}else if(d[0]instanceof Db){this.isCircle=!1;b=new Ve;b.setIdentity();c=new Ha;U.__cast(d[0],
Db).computeAABB(c,b);a=c.lowerBound.x;g=c.upperBound.x;f=c.lowerBound.y;e=c.upperBound.y;for(var h=0,m=d.length;h<m;){var l=h++,n=new Hf;n.isSensor=!0;n.userData=this;n.shape=d[l];n.friction=1;n.density=.1;n.restitution=0;n.groupID=-1E3;this.body.createFixture(n);U.__cast(d[l],Db).computeAABB(c,b);a=Math.min(a,c.lowerBound.x);g=Math.max(g,c.upperBound.x);f=Math.min(f,c.lowerBound.y);e=Math.max(e,c.upperBound.y)}this.cacheWidth=this.originalWidth=this.regionWidth=Math.round(q.toPixelUnits(Math.abs(a-
g)));this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(q.toPixelUnits(Math.abs(f-e)))}else d[0]instanceof Lc&&(this.isCircle=!0,this.cacheWidth=this.originalWidth=this.regionWidth=q.toPixelUnits(2*U.__cast(d[0],Lc).m_radius),this.cacheHeight=this.originalHeight=this.regionHeight=q.toPixelUnits(2*U.__cast(d[0],Lc).m_radius))};k["com.stencyl.models.Region"]=md;md.__name__="com.stencyl.models.Region";md.__super__=tb;md.prototype=u(tb.prototype,{isCircle:null,containedActors:null,copy:null,
simpleBounds:null,regionWidth:null,regionHeight:null,originalWidth:null,originalHeight:null,whenActorEntered:null,whenActorExited:null,justAdded:null,justRemoved:null,containsActor:function(a){return null!=a?this.containedActors.h.hasOwnProperty(a.ID):!1},getContainedActors:function(){return this.containedActors},addActor:function(a){if(null!=a&&-1!=a.ID&&!this.containedActors.h.hasOwnProperty(a.ID)){this.containedActors.h[a.ID]=a.ID;var b=W.indexOf(this.justRemoved,a);-1==b?this.justAdded.push(a):
this.justRemoved.splice(b,1)}},removeActor:function(a){null!=a&&-1!=a.ID&&-1==W.indexOf(this.justRemoved,a)&&(this.containedActors.remove(a.ID),this.justRemoved.push(a))},follow:function(a){var b=a.realY+a.cacheHeight/2;this.setX(a.realX+a.cacheWidth/2);this.setY(b)},resetSize:function(){this.setRegionSize(this.originalWidth,this.originalHeight)},setRegionDiameter:function(a){this.setRegionSize(a,a)},setRegionSize:function(a,b){var c=this.regionWidth,d=this.regionHeight;a=q.toPhysicalUnits(a);b=q.toPhysicalUnits(b);
if(this.isCircle){var e=new Lc;e.m_radius=a/2}else e=new Db,e.setAsBox(a/2,b/2);var f=new Hf;f.isSensor=!0;f.userData=this;f.shape=e;f.groupID=-1E3;if(null!=this.body&&null!=this.body.getFixtureList()){for(;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());this.body.createFixture(f);this.cacheWidth=this.regionWidth=q.toPixelUnits(a);this.cacheHeight=this.regionHeight=q.toPixelUnits(b)}a=this.regionWidth-c;d=this.regionHeight-d;this.setLocation(this.getX()+a/2,this.getY()+
d/2)},setLocation:function(a,b){this.setX(a+this.regionWidth/2);this.setY(b+this.regionHeight/2)},getWidth:function(){return this.regionWidth},getHeight:function(){return this.regionHeight},isMouseOver:function(){var a=(M.mouseX+q.cameraX)/q.SCALE,b=(M.mouseY+q.cameraY)/q.SCALE,c=this.getX(),d=this.getY();return a>=c&&b>=d&&a<c+this.regionWidth?b<d+this.regionHeight:!1},innerUpdate:function(a,b){this.clearCollisionInfoList();if(q.NO_PHYSICS)for(a=this.containedActors.iterator();a.hasNext();)b=a.next(),
b=q.engine.getActor(b),null==this.HITBOX||null==b||this.HITBOX.collide(b.HITBOX)||this.removeActor(b);for(;null!=this.justAdded&&0<this.justAdded.length;)if(b=U.__cast(this.justAdded.pop(),tb),0<this.whenActorEntered.length)for(this.whenActorEntered._dispatchIndex=0;this.whenActorEntered._dispatchIndex<this.whenActorEntered.length;){try{this.whenActorEntered.listeners[this.whenActorEntered._dispatchIndex](b)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenActorEntered._dispatchIndex}for(;null!=this.justRemoved&&0<this.justRemoved.length;)if(b=U.__cast(this.justRemoved.pop(),tb),0<this.whenActorExited.length)for(this.whenActorExited._dispatchIndex=0;this.whenActorExited._dispatchIndex<this.whenActorExited.length;){try{this.whenActorExited.listeners[this.whenActorExited._dispatchIndex](b)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenActorExited._dispatchIndex}if(null!=this.whenMousedOver&&0<this.whenMousedOver.length)if(this.isMouseOver()){if(0>=this.mouseState){if(this.mouseState=1,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),
a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else this.mouseState=2;if(M.mousePressed){if(this.mouseState=3,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),
a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else if(M.mouseDown&&(this.mouseState=4,0<this.whenMousedOver.length))for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",
lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}if(M.mouseReleased&&(this.mouseState=5,0<this.whenMousedOver.length))for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Region",
methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else if(0<this.mouseState){if(this.mouseState=-1,0<this.whenMousedOver.length)for(this.whenMousedOver._dispatchIndex=0;this.whenMousedOver._dispatchIndex<this.whenMousedOver.length;){try{this.whenMousedOver.listeners[this.whenMousedOver._dispatchIndex](this.mouseState)}catch(c){a=J.caught(c),Q.fullError(a.get_message(),a,{fileName:"com/stencyl/event/EventDispatcher.hx",lineNumber:39,className:"com.stencyl.models.Region",methodName:"innerUpdate"})}++this.whenMousedOver._dispatchIndex}}else-1==
this.mouseState&&(this.mouseState=0)},__class__:md});var fl=function(a,b){this.currW=this.currH=0;this.ID=a;this.name=b};k["com.stencyl.models.Scene"]=fl;fl.__name__="com.stencyl.models.Scene";fl.prototype={ID:null,name:null,sceneWidth:null,sceneHeight:null,tileWidth:null,tileHeight:null,gravityX:null,gravityY:null,eventID:null,colorBackground:null,layers:null,actors:null,behaviorValues:null,atlases:null,retainsAtlases:null,wireframes:null,joints:null,regions:null,terrainRegions:null,animatedTiles:null,
load:function(){var a=new Lg(ff.get(),!1,!0);a.readData(Ab.toBytes(va.getBytes("assets/data/scene-"+this.ID+".mbs")));a=a.getRoot();var b=a.getDepth();this.sceneWidth=a.getWidth();this.sceneHeight=a.getHeight();this.tileWidth=a.getTileWidth();this.tileHeight=a.getTileHeight();this.gravityX=a.getGravityX();this.gravityY=a.getGravityY();this.animatedTiles=[];this.actors=this.readActors(a.getActorInstances());this.behaviorValues=oe.readBehaviors(a.getSnippets());var c=a.getEventSnippetID();if(-1<c){var d=
this.behaviorValues,e=new zj(c,new ia);d.h[""+c]=e}this.joints=this.readJoints(a.getJoints());this.regions=this.readRegions(a.getRegions());this.terrainRegions=this.readTerrainRegions(a.getTerrainRegions());this.wireframes=this.readWireframes(a.getTerrain());c=va.getBytes("assets/data/scene-"+this.ID+".scn");c.__endian=0;b=this.readRawLayers(c,b);this.layers=this.readAllLayers(a.getLayers(),b);this.atlases=(this.retainsAtlases=a.getRetainAtlases())?[]:this.readAtlases(a.getAtlasMembers())},unload:function(){this.animatedTiles=
this.terrainRegions=this.regions=this.joints=this.wireframes=this.layers=this.behaviorValues=this.actors=this.colorBackground=null},readRegions:function(a){for(var b=new Xa,c=0,d=a.length();c<d;){c++;var e=this.readRegion(a.getNextObject());b.h[e.ID]=e}return b},readRegion:function(a){var b=a.getId(),c=a.getName(),d=a.getX(),e=a.getY();this.shapeList=[];var f=a.getShape();if(f instanceof od){a=this.currW=f.getWidth();var g=this.currH=f.getHeight();f=f.getPoints();q.NO_PHYSICS?b=new wi(this.shapeList,
b,c,d,e,0,new fa(0,0,a,g)):(a=sd.readPoints(f).slice(0),(new Ac(a)).decompose(r(this,this.addPolygonRegion)),b=new wi(this.shapeList,b,c,d,e))}else g=f.getRadius(),q.NO_PHYSICS?b=new wi(this.shapeList,b,c,d,e,0,new fa(0,0,2*g,2*g)):(a=new Lc,a.m_radius=q.toPhysicalUnits(g),this.shapeList[0]=a,b=new wi(this.shapeList,b,c,d,e));return b},shapeList:null,currW:null,currH:null,addPolygonRegion:function(a){Q.verbose("THE POLY: "+A.string(a.points),{fileName:"com/stencyl/models/Scene.hx",lineNumber:252,
className:"com.stencyl.models.Scene",methodName:"addPolygonRegion"});Q.verbose(this.currW+", "+this.currH,{fileName:"com/stencyl/models/Scene.hx",lineNumber:253,className:"com.stencyl.models.Scene",methodName:"addPolygonRegion"});a=U.__cast(sd.createPolygon("MbsPolyRegion",a.points,this.currW,this.currH),Db);this.shapeList.push(a)},addPolygonTerrain:function(a){Q.verbose("THE POLY: "+A.string(a.points),{fileName:"com/stencyl/models/Scene.hx",lineNumber:261,className:"com.stencyl.models.Scene",methodName:"addPolygonTerrain"});
Q.verbose(this.currW+", "+this.currH,{fileName:"com/stencyl/models/Scene.hx",lineNumber:262,className:"com.stencyl.models.Scene",methodName:"addPolygonTerrain"});a=U.__cast(sd.createPolygon("MbsPolyRegion",a.points,this.currW,this.currH),Db);this.shapeList.push(a)},readTerrainRegions:function(a){for(var b=new Xa,c=0,d=a.length();c<d;){c++;var e=this.readTerrainRegion(a.getNextObject());b.h[e.ID]=e}return b},readTerrainRegion:function(a){var b=a.getId(),c=a.getName(),d=a.getGroupID(),e=q.toPhysicalUnits(a.getX()),
f=q.toPhysicalUnits(a.getY()),g=a.getColor();this.shapeList=[];a=a.getShape();if(a instanceof od)this.currW=a.getWidth(),this.currH=a.getHeight(),a=sd.readPoints(a.getPoints()).slice(0),(new Ac(a)).decompose(r(this,this.addPolygonTerrain));else{var h=a.getRadius();a=new Lc;a.m_radius=q.toPhysicalUnits(h);this.shapeList[0]=a}return new ho(this.shapeList,b,c,e,f,d,g)},readJoints:function(a){for(var b=new Xa,c=0,d=a.length();c<d;){c++;var e=this.readJoint(a.readObject());b.h[e.ID]=e}return b},readJoint:function(a){var b=
a.getId(),c=a.getActor1(),d=a.getActor2(),e=a.getCollide();if(a instanceof zd){var f=new Eh;f.ID=b;f.actor1=c;f.actor2=d;f.localAnchorA=null;f.localAnchorB=null;f.collideConnected=e;f.dampingRatio=a.getDamping();f.frequencyHz=a.getFrequency();return f}if(a instanceof fc)return f=new Fh,f.ID=b,f.actor1=c,f.actor2=d,f.localAnchorA=null,f.localAnchorB=null,f.collideConnected=e,f.enableLimit=a.getLimit(),f.enableMotor=a.getMotor(),f.lowerAngle=a.getLower(),f.upperAngle=a.getUpper(),f.maxMotorTorque=a.getTorque(),
f.motorSpeed=a.getSpeed(),f;if(a instanceof Ob)return f=new Gh,f.ID=b,f.actor1=c,f.actor2=d,f.localAnchorA=null,f.localAnchorB=null,f.collideConnected=e,f.enableLimit=a.getLimit(),f.enableMotor=a.getMotor(),f.lowerTranslation=a.getLower(),f.upperTranslation=a.getUpper(),f.maxMotorForce=a.getForce(),f.motorSpeed=a.getSpeed(),f.localAxisA.x=a.getX(),f.localAxisA.y=a.getY(),f;Q.error("Error: unsuppported joint type: "+A.string(na.type),{fileName:"com/stencyl/models/Scene.hx",lineNumber:415,className:"com.stencyl.models.Scene",
methodName:"readJoint"});return null},readAllLayers:function(a,b){var c=new ve(16);c.reuseIterator=!0;for(var d=0,e=a.length();d<e;){d++;var f=a.readObject();if(f instanceof ce||f instanceof xd)this.colorBackground=this.readColorBackground(f);else{var g=f,h=g.getId(),m=g.getName(),l=g.getOrder(),n=g.getScrollFactorX(),p=g.getScrollFactorY(),k=g.getOpacity()/100;g=cl.get(g.getBlendmode());if(f instanceof de){var q=b.mH;f=q.mHash[73856093*h&q.mMask];if(-1==f)f=-2147483648;else if(q=q.mData,q[f]==h)f=
q[f+1];else{var t=-2147483648;for(f=q[f+2];-1!=f;){if(q[f]==h){t=q[f+1];break}f=q[f+2]}f=t}f=-2147483648==f?null:b.mVals[f];null==f&&(f=new ke(h,this,Math.floor(this.sceneWidth/this.tileWidth)|0,Math.floor(this.sceneHeight/this.tileHeight)|0));f.set_name(m);h=new Fc(h,m,l,n,p,k,g,f);c.set(h.ID,h)}else f instanceof yd&&(q=f,f=q.getResourceID(),q=q.getCustomScroll(),h=new Ud(h,m,l,n,p,k,g,f,q),c.set(h.ID,h))}}return c},readColorBackground:function(a){if(a instanceof ce){var b=a.getColor();return new Jf(b)}return a instanceof
xd?(b=a.getColor1(),a=a.getColor2(),new ri(b,a)):null},readRawLayers:function(a,b){var c=new ve(16);c.reuseIterator=!0;var d=[];if(null!=a){for(var e=0,f=b;e<f;){var g=e++;d[g]=a.readInt()}e=0;for(f=b;e<f;)g=e++,b=this.readRawLayer(a,d[g]),c.set(b.layerID,b)}return c},readRawLayer:function(a,b){var c=Math.floor(this.sceneWidth/this.tileWidth)|0,d=Math.floor(this.sceneHeight/this.tileHeight)|0,e=a.readInt();b-=4;a.readInt();b-=4;d=new ke(e,this,c,d);var f=e=0;b=b/8|0;var g=new gl(this.sceneWidth,this.sceneHeight,
this.tileWidth,this.tileHeight);d.grid=g;for(var h=0;h<b;){h++;var m=a.readShort(),l=a.readShort(),n=a.readShort(),p=a.readShort(),k=null;-1!=l&&(k=bc.get().resources.get(l));0>m&&(m=Math.abs(m+1)|0);for(l=0;l<p;){l++;if(null==k||0>n)d.setTileAt(e,f,null,!1);else{var q=k.tiles[n];if(null==q)d.setTileAt(e,f,null,!1);else if(d.setTileAt(e,f,q,!1),d.autotileData[e][f]=m,0<=q.collisionID&&g.setTile(f,e,!0),1<q.durations.length){for(var t=!1,v=0,r=this.animatedTiles;v<r.length&&!(t=r[v],++v,t=t==q););
t||this.animatedTiles.push(q)}}++f;f>=c&&(f=0,++e)}}return d},readAtlases:function(a){for(var b=[],c=0,d=a.length();c<d;){c++;var e=a.readInt();Lb.get().atlases.h[e].allScenes||b.push(e)}return b},readWireframes:function(a){if(q.NO_PHYSICS)return[];for(var b=[],c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getPosition();f=new pa(f.getX(),f.getY());e=sd.readPoints(e.getPoints()).slice(0);e=sd.createPolygon("MbsWireframe",e);b.push(new io(f.x,f.y,e.h[1],e.h[2],e.h[0],null))}return b},readActors:function(a){for(var b=
new Xa,c=0,d=a.length();c<d;){c++;var e=this.readActorInstance(a.getNextObject());null!=e&&(b.h[e.elementID]=e)}return b},readActorInstance:function(a){var b=a.getAid(),c=a.getX(),d=a.getY(),e=a.getScaleX(),f=a.getScaleY(),g=a.getZ(),h=a.getOrderInLayer(),m=a.getAngle()|0,l=a.getGroupID(),n=a.getId(),p=a.getCustomized(),k=null;p&&(k=oe.readBehaviors(a.getSnippets()));if(0==e||0==f)f=e=1;p||(k=null);if(null==bc.get().resources.get(n))return null;a=new Wk(b,c,d,e,f,g,h,m,l,n,k,p);null!=a.actorType&&
(a.groupID=a.actorType.groupID);return a},getID:function(){return this.ID},__class__:fl};var Hh=function(a,b,c,d,e,f,g,h){gd.call(this,a,b,-1);this.streaming=c;this.looping=d;this.panning=e;this.volume=f;this.ext=g;this.atlasID=h;this.ext="ogg";a=Lb.get().atlases.h[h];null!=a&&a.active&&this.loadGraphics()};k["com.stencyl.models.Sound"]=Hh;Hh.__name__="com.stencyl.models.Sound";Hh.__super__=gd;Hh.prototype=u(gd.prototype,{streaming:null,looping:null,panning:null,volume:null,ext:null,src:null,loadGraphics:function(){this.src=
va.getSound("assets/"+(this.streaming?"music":"sfx")+"/sound-"+this.ID+"."+this.ext,!1)},unloadGraphics:function(){this.streaming||(null!=this.src&&(this.stopInstances(),this.src.close()),this.src=null)},play:function(a,b){null==b&&(b=0);this.streaming&&null==this.src&&(this.src=this.getStreamingSource());return null==this.src?(Q.error("Trying to play uninitialized sound: "+this.name+" - "+this.ID,{fileName:"com/stencyl/models/Sound.hx",lineNumber:89,className:"com.stencyl.models.Sound",methodName:"play"}),
null):this.src.play(b)},loop:function(a,b){null==b&&(b=0);this.streaming&&null==this.src&&(this.src=this.getStreamingSource());return null==this.src?(Q.error("Trying to play uninitialized sound: "+this.name+" - "+this.ID,{fileName:"com/stencyl/models/Sound.hx",lineNumber:105,className:"com.stencyl.models.Sound",methodName:"loop"}),null):this.src.play(b,1E8)},getStreamingSource:function(){return va.getSound("assets/music/sound-"+this.ID+"."+this.ext,!1)},stopInstances:function(){for(var a=0;32>a;){var b=
a++;b=q.engine.channels[b];b.currentSource==this.src&&b.stopSound()}},__class__:Hh});var Xb=function(a,b){this.paused=!1;this.currentClip=this.currentSound=null;this.looping=!1;this.volume=1;this.position=this.panning=0;this.channelNum=b;this.engine=a;this.transform=new gf;this.tweenVolume=new we;this.tweenVolume.doOnUpdate(r(this,this.tweenUpdated))};k["com.stencyl.models.SoundChannel"]=Xb;Xb.__name__="com.stencyl.models.SoundChannel";Xb.resetStatics=function(){Xb.muted=!1;Xb.masterVolume=1};Xb.prototype=
{currentSource:null,currentSound:null,currentClip:null,volume:null,panning:null,channelNum:null,looping:null,paused:null,position:null,engine:null,transform:null,tweenVolume:null,playSound:function(a,b){null==b&&(b=0);null!=this.currentSound&&(this.currentSound.stop(),this.paused=!1);if(null!=a){a.volume=this.volume*Xb.masterVolume;this.currentClip=a;this.currentSound=a.play(this.channelNum,b);if(null==this.currentSound)return this.currentClip=null;this.setVolume(this.volume);this.setPanning(this.panning);
this.currentSound.addEventListener("soundComplete",r(this,this.stopped))}null!=a&&(this.currentSource=a.src);this.looping=!1;return this.currentSound},loopSound:function(a,b){null==b&&(b=0);null!=this.currentSound&&this.currentSound.stop();if(null!=a){a.volume=this.volume*Xb.masterVolume;this.currentClip=a;this.currentSound=a.play(this.channelNum,b);if(null==this.currentSound)return this.currentClip=null;this.setVolume(this.volume);this.setPanning(this.panning);this.currentSound.addEventListener("soundComplete",
r(this,this.looped))}null!=a&&(this.currentSource=a.src);this.looping=!0;return this.currentSound},setPause:function(a){null!=this.currentSound&&(a?(this.currentSound.removeEventListener("soundComplete",r(this,this.looped)),this.position=this.currentSound.get_position(),this.currentSound.stop(),this.paused=!0):null!=this.currentSource&&this.paused&&(this.currentSound=this.currentClip.play(this.channelNum,this.position),this.currentSound.set_soundTransform(this.transform),this.currentSound.addEventListener("soundComplete",
r(this,this.stopped)),this.looping&&this.currentSound.addEventListener("soundComplete",r(this,this.looped)),this.paused=!1))},looped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",r(this,this.looped));this.loopSound(this.currentClip)},stopped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",r(this,this.stopped));q.engine.soundFinished(this.channelNum)},stopSound:function(){null!=this.currentSound&&(this.currentSound.stop(),
this.position=0,this.currentSound=this.currentSource=null,this.paused=!1)},tweenUpdated:function(){this.setVolume(this.tweenVolume.value)},fadeInSound:function(a){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,1,pb.linear,1E3*a|0)},fadeOutSound:function(a){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,0,pb.linear,1E3*a|0)},fadeSound:function(a,b){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,b,pb.linear,1E3*a|0)},setVolume:function(a){this.volume=
a;null!=this.currentSound&&(this.transform.volume=a*Xb.masterVolume,this.currentSound.set_soundTransform(this.transform))},setPanning:function(a){this.panning=a;null!=this.currentSound&&(this.transform.pan=a,this.currentSound.set_soundTransform(this.transform))},__class__:Xb};var Jg=function(a,b,c,d,e,f){null==f&&(f=0);tb.call(this,a,-1,e,b,c,-1,1,1,null,null,null,null,!1,!0,!1,!1,d[0]);0==f&&(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),f=a<<16|b<<8|c);this.fillColor=f;this.alwaysSimulate=
!0;this.isRegion=!1;this.isTerrainRegion=!0;this.copy=d[0];this.body.setSleepingAllowed(!0);this.body.setAwake(!1);this.body.setIgnoreGravity(!0);if(d[0]instanceof Db){this.isCircle=!1;var g=new Ve;g.setIdentity();var h=new Ha;U.__cast(d[0],Db).computeAABB(h,g);a=h.lowerBound.x;b=h.upperBound.x;c=h.lowerBound.y;f=h.upperBound.y;for(var m=0,l=d.length;m<l;){var n=m++,p=new Hf;p.isSensor=!1;p.userData=this;p.shape=d[n];p.friction=1;p.density=.1;p.restitution=0;p.groupID=e;this.body.createFixture(p);
U.__cast(d[n],Db).computeAABB(h,g);a=Math.min(a,h.lowerBound.x);b=Math.max(b,h.upperBound.x);c=Math.min(c,h.lowerBound.y);f=Math.max(f,h.upperBound.y)}this.originalWidth=this.regionWidth=Math.round(q.toPixelUnits(Math.abs(a-b)));this.originalHeight=this.regionHeight=Math.round(q.toPixelUnits(Math.abs(c-f)))}else d[0]instanceof Lc&&(this.isCircle=!0,this.originalWidth=this.regionWidth=q.toPixelUnits(2*U.__cast(d[0],Lc).m_radius),this.originalHeight=this.regionHeight=q.toPixelUnits(2*U.__cast(d[0],
Lc).m_radius))};k["com.stencyl.models.Terrain"]=Jg;Jg.__name__="com.stencyl.models.Terrain";Jg.__super__=tb;Jg.prototype=u(tb.prototype,{isCircle:null,fillColor:null,copy:null,originalWidth:null,originalHeight:null,regionWidth:null,regionHeight:null,follow:function(a){var b=a.realY+a.cacheHeight/2;this.setX(a.realX+a.cacheWidth/2);this.setY(b)},resetSize:function(){this.setRegionSize(this.originalWidth,this.originalHeight)},setRegionDiameter:function(a){this.setRegionSize(a,a)},setRegionSize:function(a,
b){var c=this.regionWidth,d=this.regionHeight;a=q.toPhysicalUnits(a);b=q.toPhysicalUnits(b);if(this.isCircle){var e=new Lc;e.m_radius=a/2}else e=new Db,e.setAsBox(a/2,b/2);var f=new Hf;f.isSensor=!0;f.userData=this;f.shape=e;if(null!=this.body&&null!=this.body.getFixtureList()){for(;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());this.body.createFixture(f);this.regionWidth=q.toPixelUnits(a);this.regionHeight=q.toPixelUnits(b)}a=this.regionWidth-c;d=this.regionHeight-
d;this.setLocation(this.getX()+a/2,this.getY()+d/2)},setLocation:function(a,b){this.setX(a+this.regionWidth/2);this.setY(b+this.regionHeight/2)},getWidth:function(){return this.regionWidth},getHeight:function(){return this.regionHeight},getFillColor:function(){return this.fillColor},__class__:Jg});var co=function(){this.xy=new Lf;this.angle=new we;this.alpha=new we;this.realScaleXY=new Lf};k["com.stencyl.models.actor.ActorTweenProperties"]=co;co.__name__="com.stencyl.models.actor.ActorTweenProperties";
co.prototype={xy:null,angle:null,alpha:null,realScaleXY:null,pause:function(){this.xy.paused=!0;this.angle.paused=!0;this.alpha.paused=!0;this.realScaleXY.paused=!0},unpause:function(){this.xy.paused=!1;this.angle.paused=!1;this.alpha.paused=!1;this.realScaleXY.paused=!1},cancel:function(){this.xy.active&&vb.cancel(this.xy);this.angle.active&&vb.cancel(this.angle);this.alpha.active&&vb.cancel(this.alpha);this.realScaleXY.active&&vb.cancel(this.realScaleXY)},__class__:co};var eg=function(a,b,c,d,e,
f,g,h,m,l,n){gd.call(this,a,c,b);this.groupID=d;this.spriteID=e;this.behaviorValues=f;this.bodyDef=g;this.physicsMode=h;this.autoScale=m;this.pausable=l;this.ignoreGravity=n};k["com.stencyl.models.actor.ActorType"]=eg;eg.__name__="com.stencyl.models.actor.ActorType";eg.__super__=gd;eg.prototype=u(gd.prototype,{groupID:null,spriteID:null,behaviorValues:null,bodyDef:null,physicsMode:null,autoScale:null,pausable:null,ignoreGravity:null,toString:function(){return this.name},loadGraphics:function(){bc.get().resources.get(this.spriteID).loadGraphics()},
unloadGraphics:function(){bc.get().resources.get(this.spriteID).unloadGraphics()},__class__:eg});var ne=function(a,b,c,d,e,f,g,h,m,l,n,p,k,q,t){this.sharedTimer=this.sharedFrameIndex=0;this.animID=a;this.animName=b;this.parent=c;this.simpleShapes=d;this.physicsShapes=e;this.looping=f;this.sync=g;this.durations=p;null==ne.UNLOADED&&(ne.UNLOADED=new La(1,1));a=[];for(b=0;b<k;)b++,a.push(ne.UNLOADED);this.frames=a;this.frameWidth=h/q|0;this.frameHeight=m/t|0;this.imgWidth=h;this.imgHeight=m;this.frameCount=
k;this.framesAcross=q;this.framesDown=t;this.originX=l;this.originY=n;null==c?this.frames=[ne.UNLOADED]:(c=Lb.get().atlases.h[c.atlasID],null!=c&&c.active&&this.loadGraphics(),1<k&&f&&ne.allAnimations.push(this))};k["com.stencyl.models.actor.Animation"]=ne;ne.__name__="com.stencyl.models.actor.Animation";ne.resetStatics=function(){ne.allAnimations=[]};ne.updateAll=function(a){for(var b=0,c=ne.allAnimations;b<c.length;){var d=c[b];++b;d.update(a)}};ne.prototype={animID:null,animName:null,parent:null,
simpleShapes:null,physicsShapes:null,looping:null,sync:null,durations:null,frames:null,frameWidth:null,frameHeight:null,originX:null,originY:null,sharedTimer:null,sharedFrameIndex:null,imgWidth:null,imgHeight:null,frameCount:null,framesAcross:null,framesDown:null,graphicsLoaded:null,loadGraphics:function(){if(!this.graphicsLoaded){var a=va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/sprite-"+this.parent.ID+"-"+this.animID+".png",!1);null==a.rect&&(Q.error("Error: trying to load from a disposed BitmapData. \n"+
jc.toString(jc.callStack()),{fileName:"com/stencyl/models/actor/Animation.hx",lineNumber:144,className:"com.stencyl.models.actor.Animation",methodName:"loadGraphics"}),a=null);if(null==a){var b=[],c=0;for(a=this.frameCount;c<a;)c++,b.push(ne.UNLOADED);this.frames=b}else{if(1==this.frameCount)this.frames[0]=a;else{var d=this.frameWidth*q.SCALE|0,e=this.frameHeight*q.SCALE|0,f=new pa(0,0);b=0;for(c=this.frameCount;b<c;){var g=b++;var h=new fa(g%this.framesAcross*d,Math.floor(g/this.framesAcross)*e,
d,e),m=new La(d,e,!0,0);m.copyPixels(a,h,f);this.frames[g]=m}a.dispose()}if(ha.disposeImages&&null!=this.parent&&!this.parent.readableImages)for(b=0,c=this.frames;b<c.length;)a=c[b],++b,Zc.uploadTexture(a,!0);this.graphicsLoaded=!0}}},unloadGraphics:function(){if(this.graphicsLoaded){for(var a=0,b=this.frameCount;a<b;){var c=a++;this.frames[c].readable&&this.frames[c].dispose();this.frames[c]=ne.UNLOADED}this.graphicsLoaded=!1}},checkImageReadable:function(){if(this.frames[0].readable)return!0;Q.error("Can't get actor image with disposeImages enabled: "+
bc.get().resources.get(this.parent.ID-1).name,{fileName:"com/stencyl/models/actor/Animation.hx",lineNumber:242,className:"com.stencyl.models.actor.Animation",methodName:"checkImageReadable"});return!1},update:function(a){this.sharedTimer+=a;1<this.frameCount&&this.sharedTimer>this.durations[this.sharedFrameIndex]&&(this.sharedTimer-=this.durations[this.sharedFrameIndex],this.sharedFrameIndex++,this.sharedFrameIndex>=this.frameCount&&(this.looping?this.sharedFrameIndex=0:this.sharedFrameIndex--))},
__class__:ne};var tc=function(){this.points=[];this.bounds=new fa;this.clear()};k["com.stencyl.models.actor.Collision"]=tc;tc.__name__="com.stencyl.models.actor.Collision";tc.resetStatics=function(){tc.recycledCollisions=[];tc.collisionResponses=new Xa};tc.addResponse=function(a,b,c){var d=-1,e=-1;a instanceof eg?d=a.groupID:a instanceof pi&&(d=a.ID);b instanceof eg?e=b.groupID:b instanceof pi&&(e=b.ID);null==tc.collisionResponses.h[d]&&(a=tc.collisionResponses,b=new Xa,a.h[d]=b);null==tc.collisionResponses.h[e]&&
(a=tc.collisionResponses,b=new Xa,a.h[e]=b);tc.collisionResponses.h[d].h[e]=c;tc.collisionResponses.h[e].h[d]=c};tc.preSolve=function(a,b){b=a.getFixtureA().getBody().groupID;var c=a.getFixtureB().getBody().groupID;null!=tc.collisionResponses.h[b]&&"sensor"==tc.collisionResponses.h[b].h[c]&&a.setEnabled(!1)};tc.get=function(){return 0<tc.recycledCollisions.length?tc.recycledCollisions.pop():new tc};tc.recycle=function(a){a.clear();tc.recycledCollisions.push(a)};tc.prototype={thisFromTop:null,thisFromLeft:null,
thisFromBottom:null,thisFromRight:null,thisCollidedWithActor:null,thisCollidedWithTile:null,thisCollidedWithSensor:null,thisCollidedWithTerrain:null,otherFromTop:null,otherFromLeft:null,otherFromBottom:null,otherFromRight:null,otherCollidedWithActor:null,otherCollidedWithTile:null,otherCollidedWithSensor:null,otherCollidedWithTerrain:null,points:null,thisActor:null,otherActor:null,thisShape:null,otherShape:null,actorA:null,actorB:null,maskA:null,maskB:null,groupA:null,groupB:null,bounds:null,useBounds:null,
remove:null,solidCollision:null,linkedCollision:null,clear:function(){for(;0<this.points.length;)this.points.pop();this.remove=this.solidCollision=this.useBounds=this.otherCollidedWithTerrain=this.otherCollidedWithSensor=this.otherCollidedWithTile=this.otherCollidedWithActor=this.otherFromRight=this.otherFromBottom=this.otherFromLeft=this.otherFromTop=this.thisCollidedWithTerrain=this.thisCollidedWithSensor=this.thisCollidedWithTile=this.thisCollidedWithActor=this.thisFromRight=this.thisFromBottom=
this.thisFromLeft=this.thisFromTop=!1;this.linkedCollision=this.maskA=this.maskB=this.actorB=this.actorA=this.otherShape=this.thisShape=this.otherActor=this.thisActor=null;this.bounds.setEmpty()},switchData:function(a){if(null==a)return null;a.thisActor=this.otherActor;a.thisShape=this.otherShape;a.thisFromTop=this.otherFromTop;a.thisFromLeft=this.otherFromLeft;a.thisFromBottom=this.otherFromBottom;a.thisFromRight=this.otherFromRight;a.thisCollidedWithActor=this.otherCollidedWithActor;a.thisCollidedWithTile=
this.otherCollidedWithTile;a.thisCollidedWithSensor=this.otherCollidedWithSensor;a.thisCollidedWithTerrain=this.otherCollidedWithTerrain;a.otherActor=this.thisActor;a.otherShape=this.thisShape;a.otherFromTop=this.thisFromTop;a.otherFromLeft=this.thisFromLeft;a.otherFromBottom=this.thisFromBottom;a.otherFromRight=this.thisFromRight;a.otherCollidedWithActor=this.thisCollidedWithActor;a.otherCollidedWithTile=this.thisCollidedWithTile;a.otherCollidedWithSensor=this.thisCollidedWithSensor;a.otherCollidedWithTerrain=
this.thisCollidedWithTerrain;a.actorA=this.actorA;a.actorB=this.actorB;a.points=this.points;a.useBounds=this.useBounds;a.maskA=this.maskA;a.maskB=this.maskB;a.solidCollision=this.solidCollision;a.groupA=this.groupA;a.groupB=this.groupB;a.linkedCollision=this;return this.linkedCollision=a},__class__:tc};var Md=function(a,b,c,d){this.x=a;this.y=b;this.normalX=c;this.normalY=d};k["com.stencyl.models.actor.CollisionPoint"]=Md;Md.__name__="com.stencyl.models.actor.CollisionPoint";Md.resetStatics=function(){Md.freedCollisionPoints=
[]};Md.get=function(a,b,c,d){if(0<Md.freedCollisionPoints.length){var e=Md.freedCollisionPoints.pop();e.x=a;e.y=b;e.normalX=c;e.normalY=d;return e}return new Md(a,b,c,d)};Md.free=function(a){Md.freedCollisionPoints.push(a)};Md.prototype={x:null,y:null,normalX:null,normalY:null,__class__:Md};var pi=function(a,b){this.name=b;this.ID=a;this.sID="[Group "+a+","+b+"]";this.list=[]};k["com.stencyl.models.actor.Group"]=pi;pi.__name__="com.stencyl.models.actor.Group";pi.prototype={list:null,name:null,ID:null,
sID:null,addChild:function(a){this.list.push(a)},removeChild:function(a){},toString:function(){return this.sID},__class__:pi};var mi=function(a,b,c,d,e){gd.call(this,a,c,b);this.defaultAnimation=d;this.readableImages=e;this.animations=new Xa};k["com.stencyl.models.actor.Sprite"]=mi;mi.__name__="com.stencyl.models.actor.Sprite";mi.__super__=gd;mi.prototype=u(gd.prototype,{defaultAnimation:null,animations:null,readableImages:null,loadGraphics:function(){for(var a=this.animations.iterator();a.hasNext();)a.next().loadGraphics()},
unloadGraphics:function(){for(var a=this.animations.iterator();a.hasNext();)a.next().unloadGraphics()},reloadGraphics:function(a){-1==a?(this.unloadGraphics(),this.loadGraphics()):(this.animations.h[a].unloadGraphics(),this.animations.h[a].loadGraphics());for(var b=q.engine.allActors.iterator();b.hasNext();){var c=b.next();null==c||c.dead||c.recycled||c.type.spriteID==this.ID&&c.reloadAnimationGraphics(a)}},get_width:function(){var a=this.animations.h[this.defaultAnimation];return a.imgWidth/a.framesAcross|
0},get_height:function(){var a=this.animations.h[this.defaultAnimation];return a.imgHeight/a.framesDown|0},__class__:mi,__properties__:{get_height:"get_height",get_width:"get_width"}});var Jf=function(a){gd.call(this,0,"Color Background",-1);this.bgColor=a;a==Jf.WHITE&&(this.bgColor=16777215)};k["com.stencyl.models.background.ColorBackground"]=Jf;Jf.__name__="com.stencyl.models.background.ColorBackground";Jf.__interfaces__=[Lh];Jf.__super__=gd;Jf.prototype=u(gd.prototype,{bgColor:null,update:function(){},
draw:function(a,b,c,d,e){this.bgColor!=Jf.TRANSPARENT&&(a.clear(),a.beginFill(this.bgColor),a.drawRect(0,0,d,e),a.endFill(),a.drawCircle(1,1,1))},__class__:Jf});var ri=function(a,b){gd.call(this,0,"Gradient Background",-1);this.topColor=a;this.bottomColor=b};k["com.stencyl.models.background.GradientBackground"]=ri;ri.__name__="com.stencyl.models.background.GradientBackground";ri.__interfaces__=[Lh];ri.__super__=gd;ri.prototype=u(gd.prototype,{topColor:null,bottomColor:null,update:function(){},draw:function(a,
b,c,d,e){b=[this.topColor,this.bottomColor];c=new wa;c.createGradientBox(d,e,Math.PI/2,0,0);a.clear();var f=new La(1,1);a.beginBitmapFill(f);a.endFill();a.beginGradientFill(0,b,[100,100],[0,255],c,0);a.drawRect(0,0,d,e);a.endFill()},__class__:ri});var xg=function(a,b,c,d,e,f,g){gd.call(this,a,c,b);this.parallaxX=e;this.parallaxY=f;this.durations=d;this.repeats=g;this.currFrame=this.currTime=0;this.isAtlasActive()&&this.loadGraphics();this.repeated=!1};k["com.stencyl.models.background.ImageBackground"]=
xg;xg.__name__="com.stencyl.models.background.ImageBackground";xg.__interfaces__=[Lh];xg.__super__=gd;xg.prototype=u(gd.prototype,{currFrame:null,currTime:null,img:null,frames:null,durations:null,parallaxX:null,parallaxY:null,repeats:null,repeated:null,graphicsLoaded:null,update:function(){},draw:function(a,b,c,d,e){},drawRepeated:function(a,b,c){a=this.img.width;var d=this.img.height,e=new fa(0,0,a,d);if(!(a>=b&&d>=c)){a<b&&(b+=(a|0)-b%(a|0));d<c&&(c+=(d|0)-c%(d|0));var f=new La(Math.max(b,a)|0,
Math.max(c,d)|0),g=0;for(c=(c/d|0)+1;g<c;)for(var h=g++,m=0,l=(b/a|0)+1;m<l;){var n=m++;f.copyPixels(this.img,e,new pa(n*a,h*d))}this.img=f}this.repeated=!0},loadGraphics:function(){if(!this.graphicsLoaded){var a=[],b=this.durations.length;if(0<b)for(var c=0;c<b;){var d=c++;a.push(va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/background-"+this.ID+"-"+d+".png",!1))}else a.push(va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/background-"+this.ID+"-0.png",!1));this.frames=[];c=0;for(b=a.length;c<
b;)d=c++,this.repeats?(this.img=a[d],this.drawRepeated(null,q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0),this.frames.push(this.img)):this.frames.push(a[d]);this.img=this.frames[0];this.graphicsLoaded=!0}},unloadGraphics:function(){if(this.graphicsLoaded){this.img=new La(1,1);this.currFrame=0;this.repeated=!1;this.frames=[];for(var a=0,b=this.durations;a<b.length;)++a,this.frames.push(this.img);this.graphicsLoaded=!1}},reloadGraphics:function(a){gd.prototype.reloadGraphics.call(this,a);a=0;for(var b=
q.engine.backgroundLayers;a<b.length;){var c=b[a];++a;c.model==this&&c.reload(c.resourceID)}},__class__:xg});var oh=function(a,b,c,d,e,f,g,h,m){xg.call(this,a,b,c,d,e,f,g);this.xVelocity=h;this.yVelocity=m};k["com.stencyl.models.background.ScrollingBackground"]=oh;oh.__name__="com.stencyl.models.background.ScrollingBackground";oh.__interfaces__=[Lh];oh.__super__=xg;oh.prototype=u(xg.prototype,{xVelocity:null,yVelocity:null,update:function(){},draw:function(a,b,c,d,e){},__class__:oh});var Bf=function(){this.reset()};
k["com.stencyl.models.collision.CollisionInfo"]=Bf;Bf.__name__="com.stencyl.models.collision.CollisionInfo";Bf.resetStatics=function(){Bf.infoArray=[]};Bf.getCollisionInfo=function(){return 0<Bf.infoArray.length?Bf.infoArray.pop():new Bf};Bf.recycle=function(a){Bf.infoArray.push(a)};Bf.prototype={max:null,min:null,maskA:null,maskB:null,solidCollision:null,reset:function(){this.max=this.min=0;this.maskA=this.maskB=null;this.solidCollision=!0},__class__:Bf};var gg=function(){this.collideTypes=[];this.solid=
!0;this._class=U.getClass(this).__name__;var a=this._check=new ia,b=gg.__name__;a.h[b]=r(this,this.collideMask);a=this._check;b=vi.__name__;a.h[b]=r(this,this.collideMasklist);this.lastBounds=new fa;this.lastColID=-1};k["com.stencyl.models.collision.Mask"]=gg;gg.__name__="com.stencyl.models.collision.Mask";gg.prototype={parent:null,groupID:null,list:null,lastBounds:null,lastCheckedMask:null,lastColID:null,solid:null,collideTypes:null,collide:function(a){if(null==this.parent)throw J.thrown("Mask must be attached to a parent Entity");
var b=this._check.h[a._class];if(null!=b)return b(a);b=a._check.h[this._class];return null!=b?b(this):!1},collideMask:function(a){return this.parent.colX+this.parent.cacheWidth>a.parent.colX&&this.parent.colY+this.parent.cacheHeight>a.parent.colY&&this.parent.colX<a.parent.colX+a.parent.cacheWidth&&this.parent.colY<a.parent.colY+a.parent.cacheHeight?(this.lastBounds.x=this.parent.colX,this.lastBounds.y=this.parent.colY,this.lastBounds.width=this.parent.cacheWidth,this.lastBounds.height=this.parent.cacheHeight,
this.lastCheckedMask=this,!0):!1},collideMasklist:function(a){return a.collide(this)},assignTo:function(a){this.parent=a;null!=a&&this.update()},debugDraw:function(a,b,c){},update:function(){},projectMask:function(a,b){var c=-9999999999,d=9999999999,e=-this.parent.currOffset.x*a.x-this.parent.currOffset.y*a.y;e<d&&(d=e);e>c&&(c=e);e=(-this.parent.currOffset.x+this.parent.cacheWidth)*a.x-this.parent.currOffset.y*a.y;e<d&&(d=e);e>c&&(c=e);e=-this.parent.currOffset.x*a.x+(-this.parent.currOffset.y+this.parent.cacheHeight)*
a.y;e<d&&(d=e);e>c&&(c=e);e=(-this.parent.currOffset.x+this.parent.cacheWidth)*a.x+(-this.parent.currOffset.y+this.parent.cacheHeight)*a.y;e<d&&(d=e);e>c&&(c=e);b.min=d;b.max=c},_class:null,_check:null,__class__:gg};var fd=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=1);null==a&&(a=1);gg.call(this);this.lastBounds.width=this._width=a;this.lastBounds.height=this._height=b;this._x=c;this._y=d;this.solid=e;this.groupID=f;this._check.h[fd.__name__]=r(this,
this.collideHitbox)};k["com.stencyl.models.collision.Hitbox"]=fd;fd.__name__="com.stencyl.models.collision.Hitbox";fd.__super__=gg;fd.prototype=u(gg.prototype,{clone:function(){return new fd(this._width,this._height,this._x,this._y,this.solid,this.groupID)},collideMask:function(a){return this.parent.colX+this._x+this._width>a.parent.colX&&this.parent.colY+this._y+this._height>a.parent.colY&&this.parent.colX+this._x<a.parent.colX+a.parent.cacheWidth&&this.parent.colY+this._y<a.parent.colY+a.parent.cacheHeight?
(this.lastBounds.x=this.parent.colX+this.parent.cacheWidth,this.lastBounds.y=this.parent.colY+this.parent.cacheHeight,this.lastBounds.width=this.parent.cacheWidth,this.lastBounds.height=this.parent.cacheHeight,this.lastCheckedMask=this,!0):!1},collideHitbox:function(a){return this.parent.colX+this._x+this._width>a.parent.colX+a._x&&this.parent.colY+this._y+this._height>a.parent.colY+a._y&&this.parent.colX+this._x<a.parent.colX+a._x+a._width&&this.parent.colY+this._y<a.parent.colY+a._y+a._height?(this.lastBounds.x=
this.parent.colX+this._x,this.lastBounds.y=this.parent.colY+this._y,this.lastBounds.width=this._width,this.lastBounds.height=this._height,this.lastCheckedMask=this,!0):!1},get_x:function(){return this._x},set_x:function(a){if(this._x==a)return a;this._x=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._x},get_y:function(){return this._y},set_y:function(a){if(this._y==a)return a;this._y=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._y},
get_width:function(){return this._width},set_width:function(a){if(this._width==a)return a;this._width=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._width},get_height:function(){return this._height},set_height:function(a){if(this._height==a)return a;this._height=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._height},update:function(){null!=this.parent&&null!=this.list&&this.list.update()},_width:null,_height:null,_x:null,_y:null,
__class__:fd,__properties__:{set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var gl=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);fd.call(this);if(0==a||0==b||0==c||0==d)throw J.thrown("Illegal Grid, sizes cannot be 0.");this._rect=W.rect;this._point=W.point;this._point2=W.point2;this.columns=a/c|0;this.rows=b/d|0;this._tile=new fa(0,0,c,d);this._x=e;this._y=f;this._width=a;this._height=b;
this.usePositions=!1;this.groupID=1;a=this._check;b=gg.__name__;a.h[b]=r(this,this.collideMask);a=this._check;b=fd.__name__;a.h[b]=r(this,this.collideHitbox);a=this._check;b=Ej.__name__;a.h[b]=r(this,this.collidePixelmask);this.data=[];a=0;for(b=this.rows;a<b;)a++,this.data.push([])};k["com.stencyl.models.collision.Grid"]=gl;gl.__name__="com.stencyl.models.collision.Grid";gl.__super__=fd;gl.prototype=u(fd.prototype,{usePositions:null,setTile:function(a,b,c){null==c&&(c=!0);null==b&&(b=0);null==a&&
(a=0);0>a||a>this.columns-1||0>b||b>this.rows-1||(this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0),this.data[b][a]=c)},clearTile:function(a,b){null==b&&(b=0);null==a&&(a=0);this.setTile(a,b,!1)},checkTile:function(a,b){return 0>a||a>this.columns-1||0>b||b>this.rows-1?!1:!0},getTile:function(a,b){null==b&&(b=0);null==a&&(a=0);if(0>a||a>this.columns-1||0>b||b>this.rows-1)return!1;this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0);return this.data[b][a]},setRect:function(a,
b,c,d,e){null==e&&(e=!0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0,c=c/this._tile.width|0,d=d/this._tile.height|0);var f=b;for(b+=d;f<b;){d=f++;for(var g=a,h=a+c;g<h;){var m=g++;this.setTile(m,d,e)}}},clearRect:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);this.setRect(a,b,c,d,!1)},get_tileWidth:function(){return this._tile.width|0},get_tileHeight:function(){return this._tile.height|
0},columns:null,rows:null,data:null,collideMask:function(a){this._rect.x=a.parent.colX-this.parent.colX;this._rect.y=a.parent.colY-this.parent.colY;var b=((this._rect.x+a.parent.cacheWidth-1)/this._tile.width|0)+1,c=this._rect.x/this._tile.width|0,d=this._rect.y/this._tile.height|0;for(a=((this._rect.y+a.parent.cacheHeight-1)/this._tile.height|0)+1;d<a;)for(var e=d++,f=c,g=b;f<g;){var h=f++;if(this.getTile(h,e))return!0}return!1},collideHitbox:function(a){this._rect.x=a.parent.colX+a._x;this._rect.y=
a.parent.colY+a._y;for(var b=((this._rect.x+a._width-1)/this._tile.width|0)+1,c=this._rect.x/this._tile.width|0,d=this._rect.y/this._tile.height|0,e=((this._rect.y+a._height-1)/this._tile.height|0)+1;d<e;)for(var f=d++,g=c,h=b;g<h;){var m=g++;if(this.getTile(m,f))return this.lastBounds.x=m*this._tile.width,this.lastBounds.y=f*this._tile.height,this.lastBounds.width=this._tile.width,this.lastBounds.height=this._tile.height,a.lastColID=this.groupID,!0}return!1},collidePixelmask:function(a){Q.warn("Pixelmasks will not work in targets other than flash due to hittest not being implemented in openfl.",
{fileName:"com/stencyl/models/collision/Grid.hx",lineNumber:300,className:"com.stencyl.models.collision.Grid",methodName:"collidePixelmask"});return!1},squareProjection:function(a,b){a.x<a.y?(b.x=a.x,b.y=a.y):(b.y=a.x,b.x=a.y)},_tile:null,_rect:null,_point:null,_point2:null,__class__:gl,__properties__:u(fd.prototype.__properties__,{get_tileHeight:"get_tileHeight",get_tileWidth:"get_tileWidth"})});var vi=function(a,b){this._count=0;fd.call(this);this._masks=[];this._temp=[];this.solid=!1;this.parent=
b;for(var c=0;c<a.length;)b=a[c],++c,this.add(b)};k["com.stencyl.models.collision.Masklist"]=vi;vi.__name__="com.stencyl.models.collision.Masklist";vi.__super__=fd;vi.prototype=u(fd.prototype,{collide:function(a){for(var b,c=0,d=this._masks;c<d.length;)if(b=d[c],++c,b.groupID=-1E3==b.groupID?b.parent.groupID:b.groupID,(a instanceof vi||-2==a.groupID||Lb.collisionMap[b.groupID][a.groupID])&&b.collide(a))return this.lastBounds.x=b.lastBounds.x,this.lastBounds.y=b.lastBounds.y,this.lastBounds.width=
b.lastBounds.width,this.lastBounds.height=b.lastBounds.height,this.lastCheckedMask=b,this.lastColID=a.groupID,!0;return!1},collideMasklist:function(a){for(var b,c,d=0,e=this._masks;d<e.length;){b=e[d];++d;b.groupID=-1E3==b.groupID?b.parent.groupID:b.groupID;for(var f=0,g=a._masks;f<g.length;)if(c=g[f],++f,c.groupID=-1E3==c.groupID?c.parent.groupID:c.groupID,b.collide(c))return a.lastBounds.x=c.lastBounds.x,a.lastBounds.y=c.lastBounds.y,a.lastBounds.width=c.lastBounds.width,a.lastBounds.height=c.lastBounds.height,
a.lastCheckedMask=c,a.lastColID=b.groupID,!0}return!0},add:function(a){this._masks[this._count++]=a;a.list=this;a.parent=this.parent;this.solid=this.solid||a.solid;this.update();a.groupID=-1E3==a.groupID?this.parent.groupID:a.groupID;var b=Lb.get().groupsCollidesWith.h[a.groupID];if(null!=b)for(var c=0;c<b.length;){var d=b[c];++c;W.contains(this.collideTypes,d)||this.collideTypes.push(d)}return a},remove:function(a){if(0>Uc.indexOf(this._masks,a))return a;this._temp.length=0;for(var b,c=0,d=this._masks;c<
d.length;)b=d[c],++c,b==a?(a.list=null,a.parent=null,this._count--,this.update()):this._temp[this._temp.length]=b;b=this._masks;this._masks=this._temp;this._temp=b;return a},removeAt:function(a){null==a&&(a=0);this._temp.length=0;var b=this._masks.length;for(a%=b;0<b--;)b==a?(this._masks[a].list=null,this._count--,this.update()):this._temp[this._temp.length]=this._masks[a];a=this._masks;this._masks=this._temp;this._temp=a},removeAll:function(){for(var a,b=0,c=this._masks;b<c.length;)a=c[b],++b,a.list=
null;this._count=0;this._masks.length=0;this._temp.length=0;this.update()},getMask:function(a){null==a&&(a=0);return this._masks[a%this._masks.length]},assignTo:function(a){for(var b=0,c=this._masks;b<c.length;){var d=c[b];++b;d.parent=a}fd.prototype.assignTo.call(this,a)},update:function(){for(var a=1E5,b=1E5,c=0,d=0,e,f=this._count;0<f--;)e=U.__cast(this._masks[f],fd),null!=e&&(e._x<b&&(b=e._x),e._y<a&&(a=e._y),e._x+e._width>c&&(c=e._x+e._width),e._y+e._height>d&&(d=e._y+e._height));this._x=b;this._y=
a;this._width=c-b;this._height=d-a;fd.prototype.update.call(this)},count:null,get_count:function(){return this._count},_masks:null,_temp:null,_count:null,__class__:vi,__properties__:u(fd.prototype.__properties__,{get_count:"get_count"})});var Ej=function(a,b,c){null==c&&(c=0);null==b&&(b=0);fd.call(this);a instanceof La&&(this._data=a);if(null==this._data)throw J.thrown("Invalid Pixelmask source image.");this.threshold=1;this._rect=W.rect;this._point=W.point;this._point2=W.point2;this._width=this.get_data().width;
this._height=this.get_data().height;this._x=b;this._y=c;a=this._check;b=gg.__name__;a.h[b]=r(this,this.collideMask);a=this._check;b=Ej.__name__;a.h[b]=r(this,this.collidePixelmask);a=this._check;b=fd.__name__;a.h[b]=r(this,this.collideHitbox)};k["com.stencyl.models.collision.Pixelmask"]=Ej;Ej.__name__="com.stencyl.models.collision.Pixelmask";Ej.__super__=fd;Ej.prototype=u(fd.prototype,{threshold:null,collideMask:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;
this._rect.x=a.parent.colX;this._rect.y=a.parent.colY;this._rect.width=a.parent.cacheWidth;this._rect.height=a.parent.cacheHeight;return!1},collideHitbox:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;this._rect.x=a.parent.colX+a._x;this._rect.y=a.parent.colY+a._y;this._rect.width=a._width;this._rect.height=a._height;return!1},collidePixelmask:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;this._point2.x=a.parent.colX+
a._x;this._point2.y=a.parent.colY+a._y;return!1},get_data:function(){return this._data},set_data:function(a){this._data=a;this._width=a.width;this._height=a.height;this.update();return this._data},_data:null,_rect:null,_point:null,_point2:null,__class__:Ej,__properties__:u(fd.prototype.__properties__,{set_data:"set_data",get_data:"get_data"})});var Wk=function(a,b,c,d,e,f,g,h,m,l,n,p){this.elementID=a;this.x=b;this.y=c;this.scaleX=d;this.scaleY=e;this.layerID=f;this.orderInLayer=g;this.angle=h;this.groupID=
m;this.actorID=l;this.behaviorValues=n;this.isCustomized=p;this.actorType=U.__cast(bc.get().resources.get(l),eg)};k["com.stencyl.models.scene.ActorInstance"]=Wk;Wk.__name__="com.stencyl.models.scene.ActorInstance";Wk.prototype={elementID:null,x:null,y:null,scaleX:null,scaleY:null,layerID:null,orderInLayer:null,angle:null,groupID:null,actorID:null,isCustomized:null,behaviorValues:null,actorType:null,__class__:Wk};var Ee=function(){};k["com.stencyl.models.scene.Autotile"]=Ee;Ee.__name__="com.stencyl.models.scene.Autotile";
var go=function(a,b,c,d,e){this.animIndex=[];this.defaultAnimationIndex=0;this.name=a;this.id=b;this.tilesAcross=c;this.tilesDown=d;a=0;b=new Vb;c=0;for(d=256;c<d;){var f=c++;null!=b.h.__keys__[e[f].__id__]?this.animIndex[f]=b.h[e[f].__id__]:(this.animIndex[f]=a,b.set(e[f],a),++a)}this.defaultAnimationIndex=this.animIndex[255];this.autotileArrayLength=a;this.animCorners=[];c=0;for(d=256;c<d;)f=c++,this.animCorners[this.animIndex[f]]=e[f]};k["com.stencyl.models.scene.AutotileFormat"]=go;go.__name__=
"com.stencyl.models.scene.AutotileFormat";go.prototype={autotileArrayLength:null,defaultAnimationIndex:null,name:null,id:null,tilesAcross:null,tilesDown:null,animIndex:null,animCorners:null,__class__:go};var fo=function(a,b,c,d){this.tl=a;this.tr=b;this.bl=c;this.br=d};k["com.stencyl.models.scene.Corners"]=fo;fo.__name__="com.stencyl.models.scene.Corners";fo.prototype={tl:null,tr:null,bl:null,br:null,toString:function(){return"TL: "+A.string(this.tl)+", TR: "+A.string(this.tr)+", BL: "+A.string(this.bl)+
", BR: "+A.string(this.br)},__class__:fo};var Ln=function(a,b,c,d){this.type=a;this.x=b;this.y=c;this.layer=d};k["com.stencyl.models.scene.DeferredActor"]=Ln;Ln.__name__="com.stencyl.models.scene.DeferredActor";Ln.prototype={type:null,x:null,y:null,layer:null,__class__:Ln};var vg=function(a,b,c,d,e,f,g){Ya.call(this);this.ID=a;this.set_name(b);this.layerName=b;this.order=c;this.scrollFactorX=d;this.scrollFactorY=e;this.set_alpha(f);this.set_blendMode(g)};k["com.stencyl.models.scene.layers.RegularLayer"]=
vg;vg.__name__="com.stencyl.models.scene.layers.RegularLayer";vg.__super__=Ya;vg.prototype=u(Ya.prototype,{ID:null,layerName:null,order:null,scrollFactorX:null,scrollFactorY:null,opacity:null,alphaTween:null,updatePosition:function(a,b,c){},__class__:vg});var Fc=function(a,b,c,d,e,f,g,h){this.cameraOldX=this.cameraOldY=-1;this.cameraMoved=!0;vg.call(this,a,b,c,d,e,f,g);this.tiles=h;null!=this.tiles&&(this.tiles.set_name(b+" - TileLayer"),this.tiles.set_blendMode(g));this.actorContainer=new Ya;this.actorContainer.set_name(b+
" - ActorLayer");this.overlay=new Ya;this.overlay.set_name(b+" - Overlay");null!=this.tiles&&this.addChild(this.tiles);this.addChild(this.actorContainer);this.addChild(this.overlay);this.attachedImages=[]};k["com.stencyl.models.scene.Layer"]=Fc;Fc.__name__="com.stencyl.models.scene.Layer";Fc.__super__=vg;Fc.prototype=u(vg.prototype,{tiles:null,actorContainer:null,overlay:null,attachedImages:null,cameraMoved:null,cameraOldX:null,cameraOldY:null,updatePosition:function(a,b,c){if(ha.pixelsnap){c=a*this.scrollFactorX|
0;var d=b*this.scrollFactorY|0;a=Math.round(a);b=Math.round(b);this.set_x(-(a*this.scrollFactorX|0));this.set_y(-(b*this.scrollFactorY|0));var e=c/(q.engine.scene.tileWidth*q.SCALE)|0;var f=d/(q.engine.scene.tileHeight*q.SCALE)|0}else c=a*this.scrollFactorX,d=b*this.scrollFactorY,this.set_x(-a*this.scrollFactorX),this.set_y(-b*this.scrollFactorY),e=c/(q.engine.scene.tileWidth*q.SCALE),f=d/(q.engine.scene.tileHeight*q.SCALE);this.tiles.setPosition(c,d);this.overlay.set_x(a);this.overlay.set_y(b);this.cameraMoved=
this.cameraMoved||this.cameraOldX!=e||this.cameraOldY!=f;this.cameraOldX=e;this.cameraOldY=f},clear:function(){for(var a=0,b=this.attachedImages;a<b.length;){var c=b[a];++a;this.removeChild(c)}this.attachedImages=[];W.removeAllChildren(this.actorContainer);this.overlay.get_graphics().clear();null!=this.tiles&&this.tiles.clear()},__class__:Fc});var wi=function(a,b,c,d,e,f,g){null==f&&(f=0);this.x=d;this.y=e;this.shapes=a;this.shape=this.shapes[0];this.ID=b;this.name=c;this.shapeID=f;this.simpleBounds=
g};k["com.stencyl.models.scene.RegionDef"]=wi;wi.__name__="com.stencyl.models.scene.RegionDef";wi.prototype={x:null,y:null,shape:null,shapes:null,ID:null,name:null,shapeID:null,simpleBounds:null,__class__:wi};var Nf=function(a,b,c,d,e,f,g){null==g&&(g=!0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);Ya.call(this);this.curStep=0;this.running=!0;this.repeats=g;this.image1=new dd(a);this.addChild(this.image1);this.cacheWidth=this.image1.get_width();this.cacheHeight=this.image1.get_height();g&&(this.image2=
new dd(a),this.image2.set_x(this.image1.get_x()-this.cacheWidth),this.addChild(this.image2),this.image3=new dd(a),this.image3.set_x(this.image1.get_x()+this.cacheWidth),this.addChild(this.image3),this.image4=new dd(a),this.image4.set_x(this.image1.get_x()-this.cacheWidth),this.image4.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image4),this.image5=new dd(a),this.image5.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image5),this.image6=new dd(a),this.image6.set_x(this.image1.get_x()+
this.cacheWidth),this.image6.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image6),this.image7=new dd(a),this.image7.set_x(this.image1.get_x()-this.cacheWidth),this.image7.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image7),this.image8=new dd(a),this.image8.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image8),this.image9=new dd(a),this.image9.set_x(this.image1.get_x()+this.cacheWidth),this.image9.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image9));
this.yPos=this.xPos=this.yP=this.xP=0;this.xVelocity=b;this.yVelocity=c;this.parallaxX=d;this.parallaxY=e;this.scrolling=0!=b||0!=c;this.parallax=0!=d||0!=e;this.backgroundID=f};k["com.stencyl.models.scene.ScrollingBitmap"]=Nf;Nf.__name__="com.stencyl.models.scene.ScrollingBitmap";Nf.__super__=Ya;Nf.prototype=u(Ya.prototype,{image1:null,image2:null,image3:null,image4:null,image5:null,image6:null,image7:null,image8:null,image9:null,speed:null,curStep:null,running:null,parallax:null,scrolling:null,
cacheWidth:null,cacheHeight:null,xP:null,yP:null,xPos:null,yPos:null,xVelocity:null,yVelocity:null,parallaxX:null,parallaxY:null,backgroundID:null,repeats:null,update:function(a,b,c){c=!1;this.parallax?(this.xPos=-(a*this.parallaxX|0),this.yPos=-(b*this.parallaxY|0),c=!0):this.running?this.yPos=this.xPos=0:(this.xPos=this.xP,this.yPos=this.yP);if(this.scrolling&&this.running){a=this.cacheWidth;b=this.cacheHeight;this.xP+=this.xVelocity/10*q.SCALE;this.yP+=this.yVelocity/10*q.SCALE;if(this.repeats){if(this.xP<
-a||this.xP>a)this.xP=0;if(this.yP<-b||this.yP>b)this.yP=0}this.xPos+=Math.floor(this.xP);this.yPos+=Math.floor(this.yP);this.curStep+=1;1<=this.curStep&&(c=!0,this.curStep-=Math.floor(this.curStep))}c&&this.resetPositions()},resetPositions:function(){this.cacheWidth=this.image1.get_width();this.cacheHeight=this.image1.get_height();this.repeats&&(this.xPos<-this.cacheWidth&&(this.xPos%=this.cacheWidth),this.yPos<-this.cacheHeight&&(this.yPos%=this.cacheHeight));this.image1.set_x(this.xPos);this.image1.set_y(this.yPos);
this.repeats&&(this.image2.set_x(this.xPos-this.cacheWidth),this.image2.set_y(this.yPos),this.image3.set_x(this.xPos+this.cacheWidth),this.image3.set_y(this.yPos),this.image4.set_x(this.xPos-this.cacheWidth),this.image4.set_y(this.yPos-this.cacheHeight),this.image5.set_x(this.xPos),this.image5.set_y(this.yPos-this.cacheHeight),this.image6.set_x(this.xPos+this.cacheWidth),this.image6.set_y(this.yPos-this.cacheHeight),this.image7.set_x(this.xPos-this.cacheWidth),this.image7.set_y(this.yPos+this.cacheHeight),
this.image8.set_x(this.xPos),this.image8.set_y(this.yPos+this.cacheHeight),this.image9.set_x(this.xPos+this.cacheWidth),this.image9.set_y(this.yPos+this.cacheHeight))},start:function(){this.running=!0},stop:function(){this.running=!1},__class__:Nf});var ho=function(a,b,c,d,e,f,g){null==g&&(g=0);null==f&&(f=0);this.x=d;this.y=e;this.shapes=a;this.shape=this.shapes[0];this.ID=b;this.name=c;this.groupID=f;0==this.fillColor&&(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),this.fillColor=a<<16|b<<
8|c);this.fillColor=g};k["com.stencyl.models.scene.TerrainDef"]=ho;ho.__name__="com.stencyl.models.scene.TerrainDef";ho.prototype={x:null,y:null,shape:null,shapes:null,ID:null,name:null,groupID:null,fillColor:null,__class__:ho};var Mc=function(a,b,c,d,e,f,g,h){this.tileID=a;this.collisionID=b;this.metadata=c;this.frameIndex=d;this.durations=e;this.parent=h;var m=Lb.get().atlases.h[h.atlasID];if(null!=f){this.autotileFormat=f;this.autotileMergeSet=g;g=[];var l=0;for(f=f.autotileArrayLength;l<f;)l++,
g.push(new Mc(a,b,c,d,e,null,null,h));this.autotiles=g}null!=m&&m.active&&this.loadGraphics();this.currTime=this.currFrame=0;this.updateSource=!1};k["com.stencyl.models.scene.Tile"]=Mc;Mc.__name__="com.stencyl.models.scene.Tile";Mc.prototype={tileID:null,collisionID:null,metadata:null,frameIndex:null,parent:null,autotileFormat:null,autotiles:null,autotileMergeSet:null,pixels:null,durations:null,frames:null,currFrame:null,currTime:null,updateSource:null,data:null,update:function(a){1==this.durations.length||
q.paused||(this.currTime+=Math.floor(a),this.currTime>(this.durations[this.currFrame]|0)&&(this.currTime-=this.durations[this.currFrame]|0,this.currFrame+1<this.durations.length?this.currFrame++:this.currFrame=0,this.updateSource=!0))},getSource:function(a,b){return new fa(this.currFrame*a*q.SCALE,0,a*q.SCALE,b*q.SCALE)},loadGraphics:function(){var a=null;if(1<this.durations.length||null!=this.autotileFormat)a=va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/tileset-"+this.parent.ID+"-"+this.tileID+
".png",!1);if(null!=this.autotileFormat){var b=0,c=0;for(a=this.createAutotileAnimations(a,this.autotileFormat);c<a.length;){var d=a[c];++c;this.autotiles[b++].loadAnimationPixels(d)}}else this.loadAnimationPixels(a)},unloadGraphics:function(){this.data=this.pixels=null;if(null!=this.autotiles)for(var a=0,b=this.autotiles;a<b.length;){var c=b[a];++a;c.pixels=null;c.data=null}},loadAnimationPixels:function(a){if(null!=a){this.pixels=a;this.data=new ti(a);a=0;for(var b=this.durations.length;a<b;)this.currFrame=
a++,this.data.addRect(this.getSource(this.parent.tileWidth,this.parent.tileHeight))}},createAutotileAnimations:function(a,b){var c=[],d=this.durations.length,e=a.width/d/b.tilesAcross|0,f=a.height/b.tilesDown|0,g=e/2|0,h=f/2|0;Mc.dummyRect.width=g;Mc.dummyRect.height=h;for(var m=0,l=b.animCorners;m<l.length;){var n=l[m];++m;for(var p=new La(e*d,f),k=function(a,b){return function(c,d){a[0](b[0],c,d)}}([r(p,p.copyPixels)],[a]),q=0,t=d;q<t;){var v=q++,u=e*b.tilesAcross*v;v*=e;var Ka=n.tl;Mc.dummyRect.x=
u+Ka.x*Mc.dummyRect.width;Mc.dummyRect.y=Ka.y*Mc.dummyRect.height;k(Mc.dummyRect,new pa(v,0));Ka=n.tr;Mc.dummyRect.x=u+Ka.x*Mc.dummyRect.width;Mc.dummyRect.y=Ka.y*Mc.dummyRect.height;k(Mc.dummyRect,new pa(v+g,0));Ka=n.br;Mc.dummyRect.x=u+Ka.x*Mc.dummyRect.width;Mc.dummyRect.y=Ka.y*Mc.dummyRect.height;k(Mc.dummyRect,new pa(v+g,h));Ka=n.bl;Mc.dummyRect.x=u+Ka.x*Mc.dummyRect.width;Mc.dummyRect.y=Ka.y*Mc.dummyRect.height;k(Mc.dummyRect,new pa(v,h))}c.push(p)}return c},sourceRect:function(a,b){Mc.dummyRect.x=
b+a.x*Mc.dummyRect.width;Mc.dummyRect.y=a.y*Mc.dummyRect.height;return Mc.dummyRect},__class__:Mc};var ke=function(a,b,c,d){Ya.call(this);this.layerID=a;this.scene=b;this.numRows=d;this.numCols=c;this.clear();this.tilemaps=new Vb};k["com.stencyl.models.scene.TileLayer"]=ke;ke.__name__="com.stencyl.models.scene.TileLayer";ke.__interfaces__=[Ih];ke.resetStatics=function(){ke.cacheSource=new Xa};ke.__super__=Ya;ke.prototype=u(Ya.prototype,{layerID:null,rows:null,autotileData:null,grid:null,scene:null,
numRows:null,numCols:null,tilemaps:null,noTiles:null,clear:function(){if(null!=this.tilemaps)for(var a=this.tilemaps.iterator();a.hasNext();)a.next().removeTiles();this.noTiles=!0;this.rows=[];this.autotileData=[];a=0;for(var b=this.numRows;a<b;){var c=a++;this.rows[c]=[];this.autotileData[c]=[];for(var d=0,e=this.numCols;d<e;){var f=d++;this.rows[c][f]=null;this.autotileData[c][f]=0}}},setPosition:function(a,b){},mountGrid:function(){if(null!=this.grid){var a=new tb(q.engine,1E8,1,0,0,-1,this.grid.get_width(),
this.grid.get_height(),null,new ia,null,null,!1,!0,!1,!1,this.grid,q.NO_PHYSICS);a.set_name("Terrain");a.typeID=-1;a.set_visible(!1);a.ignoreGravity=!0;q.engine.getGroup(1).addChild(a)}},setTileAt:function(a,b,c,d){null==d&&(d=!0);if(!(0>b||0>a||b>=this.numCols||a>=this.numRows)){this.noTiles&&null!=c&&(this.noTiles=!1);var e=this.rows[a][b];d&&(d=null!=e&&null!=e.autotiles||null!=c&&null!=c.autotiles);this.rows[a][b]=c;this.autotileData[a][b]=0;d&&this.updateAutotilesNear(a,b)}},getTileAt:function(a,
b){return 0>b||0>a||b>=this.numCols||a>=this.numRows?null:this.rows[a][b]},updateAutotilesNear:function(a,b){var c=a-1;for(a+=2;c<a;)for(var d=c++,e=b-1,f=b+2;e<f;){var g=e++;0>g||0>d||g>=this.numCols||d>=this.numRows||this.updateAutotile(d,g)}},updateAutotile:function(a,b){var c=this.rows[a][b];if(null!=c&&null!=c.autotiles){for(var d=0,e=ke.autotileFlagPointMap.keys();e.hasNext();){var f=e.next(),g=ke.autotileFlagPointMap.h[f],h=b+g.x|0;g=a+g.y|0;0>h||0>g||h>=this.numCols||g>=this.numRows||this.rows[g][h]==
c||(d|=f)}this.autotileData[a][b]=c.autotileFormat.animIndex[d]}},draw:function(a,b){if(!this.noTiles){for(var c=this.tilemaps.iterator();c.hasNext();)c.next().removeTiles();a=Math.floor(a);b=Math.floor(b);var d=this.numRows;c=this.scene.tileWidth;var e=this.scene.tileHeight;a=a/q.SCALE/c|0;var f=b/q.SCALE/e|0;b=2+a+(q.screenWidth/c|0);var g=2+f+(q.screenHeight/e|0);b=Math.min(b,this.numCols)|0;g=Math.min(g,d)|0;for(d=f;d<g;){for(f=a;f<b;){var h=this.getTileAt(d,f);if(null!=h)if(h.parent.graphicsLoaded){if(null==
ke.cacheSource.h[1E6*h.parent.ID+h.tileID]||h.updateSource)if(h.updateSource=!1,null==h.pixels&&null==h.autotiles){var m=ke.cacheSource,l=1E6*h.parent.ID+h.tileID,n=h.parent.getImageSourceForTile(h.tileID,c,e);m.h[l]=n}else m=ke.cacheSource,l=1E6*h.parent.ID+h.tileID,n=h.getSource(c,e),m.h[l]=n;null!=ke.cacheSource.h[1E6*h.parent.ID+h.tileID]&&(null!=h.autotiles&&(h=h.autotiles[this.autotileData[d][f]]),null==h.data?(m=h.parent.sheetMap.h[h.tileID],this.getTilemap(h.parent.flTileset).addTile(new fg(m,
f*c*q.SCALE,d*e*q.SCALE))):(m=h.currFrame,this.getTilemap(h.data).addTile(new fg(m,f*c*q.SCALE,d*e*q.SCALE))))}else Q.warn('Warning: atlas unloaded for tileset "'+h.parent.name+'"',{fileName:"com/stencyl/models/scene/TileLayer.hx",lineNumber:358,className:"com.stencyl.models.scene.TileLayer",methodName:"draw"});++f}++d}}},updateScale:function(){for(var a=this.tilemaps.iterator();a.hasNext();){var b=a.next();b.set_width(q.sceneWidth*q.SCALE);b.set_height(q.sceneHeight*q.SCALE)}},getTilemap:function(a){if(null==
this.tilemaps.h.__keys__[a.__id__]){var b=new mh(q.sceneWidth*q.SCALE|0,q.sceneHeight*q.SCALE|0,a,ha.antialias);this.tilemaps.set(a,b);this.addChild(b)}return this.tilemaps.h[a.__id__]},__class__:ke});var qf=function(a,b,c,d,e,f,g,h,m){gd.call(this,a,c,b);this.framesAcross=d;this.framesDown=e;this.tileWidth=f;this.tileHeight=g;this.readableImages=h;this.tiles=m};k["com.stencyl.models.scene.Tileset"]=qf;qf.__name__="com.stencyl.models.scene.Tileset";qf.__super__=gd;qf.prototype=u(gd.prototype,{framesAcross:null,
framesDown:null,tileWidth:null,tileHeight:null,tiles:null,readableImages:null,pixels:null,graphicsLoaded:null,flTileset:null,sheetMap:null,setupFLTileset:function(){this.sheetMap=new Xa;if(null!=this.pixels){this.flTileset=new ti(this.convertPixels(this.pixels));for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;if(null!=c){var d=this.getImageSourceForTile(c.tileID,this.tileWidth|0,this.tileHeight|0),e=this.sheetMap;c=c.tileID;d=this.flTileset.addRect(d);e.h[c]=d}}}},getImageSourceForTile:function(a,
b,c){var d=this.tiles[a];null==d?(qf.temp.x=0,qf.temp.y=0):(a=Math.floor(d.frameIndex/this.framesAcross),d=Math.floor(d.frameIndex%this.framesAcross),qf.temp.x=d*b*q.SCALE+2*d+1,qf.temp.y=a*c*q.SCALE+2*a+1);qf.temp.width=b*q.SCALE;qf.temp.height=c*q.SCALE;return qf.temp.clone()},loadGraphics:function(){if(!this.graphicsLoaded){this.pixels=va.getBitmapData("assets/graphics/"+q.IMG_BASE+"/tileset-"+this.ID+".png",!1);for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.loadGraphics()}this.setupFLTileset();
ha.disposeImages&&!this.readableImages&&this.pixels.dispose();this.graphicsLoaded=!0}},unloadGraphics:function(){if(this.graphicsLoaded){this.pixels.readable&&this.pixels.dispose();this.flTileset=this.pixels=null;for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.unloadGraphics()}this.graphicsLoaded=!1}},reloadGraphics:function(a){if(-1==a){this.unloadGraphics();this.loadGraphics();a=0;for(var b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&(c.updateSource=!0)}}else a=this.tiles[a],
null!=a&&(a.unloadGraphics(),a.loadGraphics());q.engine.tileUpdated=!0},convertPixels:function(a){for(var b=this.tileWidth*q.SCALE|0,c=this.tileHeight*q.SCALE|0,d=a.width/b|0,e=a.height/c|0,f=new La(a.width+2*d|0,a.height+2*e|0,!0,0),g,h,m,l,n=0;n<e;){for(g=0;g<d;)h=g*b+2*g+1|0,m=n*c+2*n+1|0,l=new fa(g*b,n*c,b,c),h=new pa(h,m),f.copyPixels(a,l,h),++g;++n}for(n=0;n<e;){for(g=0;g<d;){h=g*b+2*g+1|0;m=n*c+2*n+1|0;for(a=0;a<b;)l=f.getPixel32(h+a,m),f.setPixel32(h+a,m-1,l),l=f.getPixel32(h+a,m+c-1),f.setPixel32(h+
a,m+c,l),++a;for(a=0;a<c;)l=f.getPixel32(h,m+a),f.setPixel32(h-1,m+a,l),l=f.getPixel32(h+b-1,m+a),f.setPixel32(h+b,m+a,l),++a;++g}++n}return f},__class__:qf});var io=function(a,b,c,d,e,f){this.x=a;this.y=b;this.width=c;this.height=d;this.shape=e;this.shape2=f};k["com.stencyl.models.scene.Wireframe"]=io;io.__name__="com.stencyl.models.scene.Wireframe";io.prototype={x:null,y:null,shape:null,shape2:null,width:null,height:null,__class__:io};var Ud=function(a,b,c,d,e,f,g,h,m){vg.call(this,a,b,c,d,e,f,
g);this.resourceID=h;this.customScroll=m;this.model=U.__cast(bc.get().resources.get(h),xg)};k["com.stencyl.models.scene.layers.BackgroundLayer"]=Ud;Ud.__name__="com.stencyl.models.scene.layers.BackgroundLayer";Ud.__super__=vg;Ud.prototype=u(vg.prototype,{model:null,bitmap:null,resourceID:null,customScroll:null,isAnimated:null,frameCount:null,currIndex:null,currTime:null,cacheIndex:null,cacheWidth:null,cacheHeight:null,bgChild:null,load:function(){if(null==this.model||null==this.model.img)Q.warn("Warning: Could not load a background. Ignoring...",
{fileName:"com/stencyl/models/scene/layers/BackgroundLayer.hx",lineNumber:49,className:"com.stencyl.models.scene.layers.BackgroundLayer",methodName:"load"});else{this.bitmap=new dd(this.model.img,1,!0);this.bitmap.smoothing=ha.antialias;this.currTime=this.currIndex=0;this.isAnimated=1<this.model.frames.length;this.frameCount=this.model.frames.length;this.model.repeats&&!this.model.repeated&&this.model.drawRepeated(this,q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0);var a=0,b=0;if(this.customScroll)a=
this.scrollFactorX,b=this.scrollFactorY;else if(this.model.repeats)a=this.model.parallaxX,b=this.model.parallaxY;else{var c=this.model.img.width,d=this.model.img.height,e=q.screenWidth*q.SCALE|0,f=q.screenHeight*q.SCALE|0,g=q.sceneWidth*q.SCALE|0,h=q.sceneHeight*q.SCALE|0;c>e&&c<g&&(a=1-(g-c)/(g-e));d>f&&d<h&&(b=1-(h-d)/(h-f))}this.model instanceof oh?(c=U.__cast(this.model,oh),a=new Nf(this.model.img,c.xVelocity,c.yVelocity,a,b,this.resourceID,this.model.repeats),this.addChild(this.bgChild=a)):this.model.repeats?
(a=new Nf(this.model.img,0,0,a,b,this.resourceID),this.addChild(this.bgChild=a)):(this.cacheWidth=this.model.img.width,this.cacheHeight=this.model.img.height,this.scrollFactorX=a,this.scrollFactorY=b,this.addChild(this.bgChild=this.bitmap))}},loadFromImg:function(a,b){this.model=new oh(-1,-1,"",[100],0,0,b,0,0);this.model.img=a;this.model.frames=[a];this.load()},setScrollFactor:function(a,b){this.scrollFactorX=a;this.scrollFactorY=b;if(this.bgChild instanceof Nf){var c=U.__cast(this.bgChild,Nf);c.parallaxX=
a;c.parallaxY=b;c.parallax=0!=a||0!=b}},setScrollSpeed:function(a,b){if(this.bgChild instanceof Nf){var c=U.__cast(this.bgChild,Nf);c.xVelocity=a;c.yVelocity=b;c.scrolling=0!=a||0!=b}},reload:function(a){null!=this.bgChild&&(this.removeChild(this.bgChild),this.bgChild=null);this.resourceID=a;this.model=U.__cast(bc.get().resources.get(this.resourceID),xg);this.load()},setImage:function(a){this.bitmap.set_bitmapData(a);this.currTime=this.currIndex=0;this.isAnimated=1<this.model.frames.length;this.frameCount=
this.model.frames.length},updateAnimation:function(a){this.currTime+=a;null!=this.model&&this.currTime>=this.model.durations[this.currIndex]&&(this.currTime=0,this.currIndex++,this.currIndex>=this.frameCount&&(this.currIndex=0),this.bgChild instanceof Nf?(this.cacheIndex=this.currIndex,this.model.repeats&&this.model.drawRepeated(this,q.screenWidth*q.SCALE|0,q.screenHeight*q.SCALE|0),this.currIndex=this.cacheIndex,a=this.bgChild.image1,a.set_bitmapData(this.model.frames[this.currIndex]),this.model.repeats&&
(a=this.bgChild.image2,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image3,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image4,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image5,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image6,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image7,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image8,a.set_bitmapData(this.model.frames[this.currIndex]),
a=this.bgChild.image9,a.set_bitmapData(this.model.frames[this.currIndex]))):this.bitmap.set_bitmapData(this.model.frames[this.currIndex]))},updatePosition:function(a,b,c){this.bgChild instanceof Nf?U.__cast(this.bgChild,Nf).update(a,b,c):(this.set_x(-(a*this.scrollFactorX|0)),this.set_y(-(b*this.scrollFactorY|0)));this.isAnimated&&this.updateAnimation(c)},getBitmap:function(){return this.bgChild},__class__:Ud});var Oc=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.a=
a;this.r=b;this.g=c;this.b=d};k["com.stencyl.utils.ARGB"]=Oc;Oc.__name__="com.stencyl.utils.ARGB";Oc.setARGBi=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};Oc.setARGBf=function(a,b,c,d){a=255*(0>a?0:1<a?1:a);b=255*(0>b?0:1<b?1:b);c=255*(0>c?0:1<c?1:c);d=255*(0>d?0:1<d?1:d);return(((0<a?a+.5:0>a?a-.5:0)|0)&255)<<24|(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|(((0<c?c+.5:0>c?c-.5:0)|0)&255)<<8|((0<d?d+.5:0>d?d-.5:0)|0)&255};Oc.toARGB=function(a){return new Oc(.00392156862745098*(a>>>24),
.00392156862745098*(a>>>16&255),.00392156862745098*(a>>>8&255),.00392156862745098*(a&255))};Oc.getRGB=function(a){return a&16777215};Oc.setRGB=function(a,b,c,d){return b<<16|c<<8|d|a&-16777216};Oc.getA=function(a){return a>>>24};Oc.getAf=function(a){return.00392156862745098*(a>>>24)};Oc.getR=function(a){return a>>>16&255};Oc.getRf=function(a){return.00392156862745098*(a>>>16&255)};Oc.getG=function(a){return a>>>8&255};Oc.getGf=function(a){return.00392156862745098*(a>>>8&255)};Oc.getB=function(a){return a&
255};Oc.getBf=function(a){return.00392156862745098*(a&255)};Oc.setA=function(a,b){return b<<24|a&16777215};Oc.setAf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)<<24|a&16777215};Oc.setR=function(a,b){return(b&255)<<16|a&-16711681};Oc.setRf=function(a,b){b=255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|a&-16711681};Oc.setG=function(a,b){return b<<8|a&-65281};Oc.setGf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)<<8|a&-65281};Oc.setB=function(a,
b){return b|a&-256};Oc.setBf=function(a,b){b=255*(0>b?0:1<b?1:b);return(0<b?b+.5:0>b?b-.5:0)|0|a&-256};Oc.prototype={a:null,r:null,g:null,b:null,set:function(a,b,c,d){this.a=a;this.r=b;this.g=c;this.b=d},lerp:function(a,b,c){c.a=this.a+(a.a-this.a)*b;c.r=this.r+(a.r-this.r)*b;c.g=this.g+(a.g-this.g)*b;c.b=this.b+(a.b-this.b)*b},getA8:function(){var a=255*this.a;return(0<a?a+.5:0>a?a-.5:0)|0},getR8:function(){var a=255*this.r;return(0<a?a+.5:0>a?a-.5:0)|0},getG8:function(){var a=255*this.g;return(0<
a?a+.5:0>a?a-.5:0)|0},getB8:function(){var a=255*this.b;return(0<a?a+.5:0>a?a-.5:0)|0},get24:function(){var a=255*this.r,b=255*this.g,c=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<16|((0<b?b+.5:0>b?b-.5:0)|0)<<8|(0<c?c+.5:0>c?c-.5:0)|0},set24:function(a,b,c){this.a=this.a;this.r=.00392156862745098*(a&255);this.g=.00392156862745098*(b&255);this.b=.00392156862745098*(c&255)},get32:function(){var a=255*this.a,b=255*this.r,c=255*this.g,d=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<24|((0<b?b+.5:0>b?b-
.5:0)|0)<<16|((0<c?c+.5:0>c?c-.5:0)|0)<<8|(0<d?d+.5:0>d?d-.5:0)|0},set32:function(a,b,c,d){this.a=.00392156862745098*(a&255);this.r=.00392156862745098*(b&255);this.g=.00392156862745098*(c&255);this.b=.00392156862745098*(d&255)},copy:function(a){a.a=this.a;a.r=this.r;a.g=this.g;a.b=this.b;return a},__class__:Oc};var Mh=x["com.stencyl.utils.ColorDeficiencyTypes"]={__ename__:"com.stencyl.utils.ColorDeficiencyTypes",__constructs__:null,Protanopia:{_hx_name:"Protanopia",_hx_index:0,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",
toString:v},Protanomaly:{_hx_name:"Protanomaly",_hx_index:1,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Deuteranopia:{_hx_name:"Deuteranopia",_hx_index:2,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Deuteranomaly:{_hx_name:"Deuteranomaly",_hx_index:3,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Tritanopia:{_hx_name:"Tritanopia",_hx_index:4,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Tritanomaly:{_hx_name:"Tritanomaly",_hx_index:5,
__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Achromatopsia:{_hx_name:"Achromatopsia",_hx_index:6,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v},Achromatomaly:{_hx_name:"Achromatomaly",_hx_index:7,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:v}};Mh.__constructs__=[Mh.Protanopia,Mh.Protanomaly,Mh.Deuteranopia,Mh.Deuteranomaly,Mh.Tritanopia,Mh.Tritanomaly,Mh.Achromatopsia,Mh.Achromatomaly];var Oa=function(){this.identity();this.matrix=[]};k["com.stencyl.utils.ColorMatrix"]=
Oa;Oa.__name__="com.stencyl.utils.ColorMatrix";Oa.mulMatrixMatrix=function(a,b,c){var d=a.m11,e=a.m12,f=a.m13,g=a.m14;c.m11=a.m11*b.m11+a.m12*b.m21+a.m13*b.m31+a.m14*b.m41;c.m12=d*b.m12+a.m12*b.m22+a.m13*b.m32+a.m14*b.m42;c.m13=d*b.m13+e*b.m23+a.m13*b.m33+a.m14*b.m43;c.m14=d*b.m14+e*b.m24+f*b.m34+a.m14*b.m44;c.m15=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m21;e=a.m22;f=a.m23;g=a.m24;c.m21=a.m21*b.m11+a.m22*b.m21+a.m23*b.m31+a.m24*b.m41;c.m22=d*b.m12+a.m22*b.m22+a.m23*b.m32+a.m24*b.m42;c.m23=d*b.m13+e*b.m23+
a.m23*b.m33+a.m24*b.m43;c.m24=d*b.m14+e*b.m24+f*b.m34+a.m24*b.m44;c.m25=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m31;e=a.m32;f=a.m33;g=a.m34;c.m31=a.m31*b.m11+a.m32*b.m21+a.m33*b.m31+a.m34*b.m41;c.m32=d*b.m12+a.m32*b.m22+a.m33*b.m32+a.m34*b.m42;c.m33=d*b.m13+e*b.m23+a.m33*b.m33+a.m34*b.m43;c.m34=d*b.m14+e*b.m24+f*b.m34+a.m34*b.m44;c.m35=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m41;e=a.m42;f=a.m43;g=a.m44;c.m41=a.m41*b.m11+a.m42*b.m21+a.m43*b.m31+a.m44*b.m41;c.m42=d*b.m12+a.m42*b.m22+a.m43*b.m32+a.m44*b.m42;
c.m43=d*b.m13+e*b.m23+a.m43*b.m33+a.m44*b.m43;c.m44=d*b.m14+e*b.m24+f*b.m34+a.m44*b.m44;c.m45=d*b.m15+e*b.m25+f*b.m35+g*b.m45;return c};Oa.blendMatrixMatrix=function(a,b,c,d){var e=1-d;c.m11=e*a.m11+d*b.m11;c.m12=e*a.m12+d*b.m12;c.m13=e*a.m13+d*b.m13;c.m14=e*a.m14+d*b.m14;c.m15=e*a.m15+d*b.m15;c.m21=e*a.m21+d*b.m21;c.m22=e*a.m22+d*b.m22;c.m23=e*a.m23+d*b.m23;c.m24=e*a.m24+d*b.m24;c.m25=e*a.m25+d*b.m25;c.m31=e*a.m31+d*b.m31;c.m32=e*a.m32+d*b.m32;c.m33=e*a.m33+d*b.m33;c.m34=e*a.m34+d*b.m34;c.m35=e*
a.m35+d*b.m35;c.m41=e*a.m41+d*b.m41;c.m42=e*a.m42+d*b.m42;c.m43=e*a.m43+d*b.m43;c.m44=e*a.m44+d*b.m44;c.m45=e*a.m45+d*b.m45;return c};Oa.prototype={m11:null,m12:null,m13:null,m14:null,m15:null,m21:null,m22:null,m23:null,m24:null,m25:null,m31:null,m32:null,m33:null,m34:null,m35:null,m41:null,m42:null,m43:null,m44:null,m45:null,matrix:null,preHue:null,postHue:null,hueInitialized:null,getFilter:function(){var a=this.matrix;a[0]=this.m11;a[1]=this.m12;a[2]=this.m13;a[3]=this.m14;a[4]=this.m15;a[5]=this.m21;
a[6]=this.m22;a[7]=this.m23;a[8]=this.m24;a[9]=this.m25;a[10]=this.m31;a[11]=this.m32;a[12]=this.m33;a[13]=this.m34;a[14]=this.m35;a[15]=this.m41;a[16]=this.m42;a[17]=this.m43;a[18]=this.m44;a[19]=this.m45;return new Xe(this.matrix)},identity:function(){this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},invert:function(){var a=this.m11,b=this.m12,
c=this.m13,d=this.m14;this.m11=-1*this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*a+-1*this.m12+0*this.m13+0*this.m14;this.m13=0*a+0*b+-1*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=255*a+255*b+255*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=-1*this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*a+-1*this.m22+0*this.m23+0*this.m24;this.m23=0*a+0*b+-1*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=255*a+255*b+255*c+0*d;a=this.m31;b=this.m32;c=this.m33;
d=this.m34;this.m31=-1*this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*a+-1*this.m32+0*this.m33+0*this.m34;this.m33=0*a+0*b+-1*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=255*a+255*b+255*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=-1*this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*a+-1*this.m42+0*this.m43+0*this.m44;this.m43=0*a+0*b+-1*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=255*a+255*b+255*c+0*d;return this},adjustSaturation:function(a){var b=
1-a,c=b*Oa.LUMA_R,d=b*Oa.LUMA_G;b*=Oa.LUMA_B;var e=c+a,f=d+a;a=b+a;var g=this.m11,h=this.m12,m=this.m13,l=this.m14;this.m11=this.m11*e+this.m12*c+this.m13*c+0*this.m14;this.m12=g*d+this.m12*f+this.m13*d+0*this.m14;this.m13=g*b+h*b+this.m13*a+0*this.m14;this.m14=0*g+0*h+0*m+this.m14;this.m15=0*g+0*h+0*m+0*l;g=this.m21;h=this.m22;m=this.m23;l=this.m24;this.m21=this.m21*e+this.m22*c+this.m23*c+0*this.m24;this.m22=g*d+this.m22*f+this.m23*d+0*this.m24;this.m23=g*b+h*b+this.m23*a+0*this.m24;this.m24=0*
g+0*h+0*m+this.m24;this.m25=0*g+0*h+0*m+0*l;g=this.m31;h=this.m32;m=this.m33;l=this.m34;this.m31=this.m31*e+this.m32*c+this.m33*c+0*this.m34;this.m32=g*d+this.m32*f+this.m33*d+0*this.m34;this.m33=g*b+h*b+this.m33*a+0*this.m34;this.m34=0*g+0*h+0*m+this.m34;this.m35=0*g+0*h+0*m+0*l;g=this.m41;h=this.m42;m=this.m43;l=this.m44;this.m41=this.m41*e+this.m42*c+this.m43*c+0*this.m44;this.m42=g*d+this.m42*f+this.m43*d+0*this.m44;this.m43=g*b+h*b+this.m43*a+0*this.m44;this.m44=0*g+0*h+0*m+this.m44;this.m45=
0*g+0*h+0*m+0*l;return this},adjustBrightness:function(a){this.adjustBrightnessRGB(a,a,a);return this},adjustBrightnessRGB:function(a,b,c){a*=255;b*=255;c*=255;var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*d+this.m12+0*this.m13+0*this.m14;this.m13=0*d+0*e+this.m13+0*this.m14;this.m14=0*d+0*e+0*f+this.m14;this.m15=d*a+e*b+f*c+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*
d+this.m22+0*this.m23+0*this.m24;this.m23=0*d+0*e+this.m23+0*this.m24;this.m24=0*d+0*e+0*f+this.m24;this.m25=d*a+e*b+f*c+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*d+this.m32+0*this.m33+0*this.m34;this.m33=0*d+0*e+this.m33+0*this.m34;this.m34=0*d+0*e+0*f+this.m34;this.m35=d*a+e*b+f*c+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*d+this.m42+0*this.m43+0*this.m44;this.m43=
0*d+0*e+this.m43+0*this.m44;this.m44=0*d+0*e+0*f+this.m44;this.m45=d*a+e*b+f*c+0*g;return this},adjustContrast:function(a){this.adjustContrastRGB(a,a,a);return this},adjustContrastRGB:function(a,b,c){a+=1;b+=1;c+=1;var d=128*(1-a),e=128*(1-b),f=128*(1-c),g=this.m11,h=this.m12,m=this.m13,l=this.m14;this.m11=this.m11*a+0*this.m12+0*this.m13+0*this.m14;this.m12=0*g+this.m12*b+0*this.m13+0*this.m14;this.m13=0*g+0*h+this.m13*c+0*this.m14;this.m14=0*g+0*h+0*m+this.m14;this.m15=g*d+h*e+m*f+0*l;g=this.m21;
h=this.m22;m=this.m23;l=this.m24;this.m21=this.m21*a+0*this.m22+0*this.m23+0*this.m24;this.m22=0*g+this.m22*b+0*this.m23+0*this.m24;this.m23=0*g+0*h+this.m23*c+0*this.m24;this.m24=0*g+0*h+0*m+this.m24;this.m25=g*d+h*e+m*f+0*l;g=this.m31;h=this.m32;m=this.m33;l=this.m34;this.m31=this.m31*a+0*this.m32+0*this.m33+0*this.m34;this.m32=0*g+this.m32*b+0*this.m33+0*this.m34;this.m33=0*g+0*h+this.m33*c+0*this.m34;this.m34=0*g+0*h+0*m+this.m34;this.m35=g*d+h*e+m*f+0*l;g=this.m41;h=this.m42;m=this.m43;l=this.m44;
this.m41=this.m41*a+0*this.m42+0*this.m43+0*this.m44;this.m42=0*g+this.m42*b+0*this.m43+0*this.m44;this.m43=0*g+0*h+this.m43*c+0*this.m44;this.m44=0*g+0*h+0*m+this.m44;this.m45=g*d+h*e+m*f+0*l;return this},adjustHue:function(a){a*=.01745329251994278;var b=Math.cos(a),c=Math.sin(a);a=Oa.LUMA_R+b*(1-Oa.LUMA_R)+c*-Oa.LUMA_R;var d=Oa.LUMA_G+b*-Oa.LUMA_G+c*-Oa.LUMA_G,e=Oa.LUMA_B+b*-Oa.LUMA_B+c*(1-Oa.LUMA_B),f=Oa.LUMA_R+b*-Oa.LUMA_R+.143*c,g=Oa.LUMA_G+b*(1-Oa.LUMA_G)+.14*c,h=Oa.LUMA_B+b*-Oa.LUMA_B+-.283*
c,m=Oa.LUMA_R+b*-Oa.LUMA_R+c*-(1-Oa.LUMA_R),l=Oa.LUMA_G+b*-Oa.LUMA_G+c*Oa.LUMA_G;b=Oa.LUMA_B+b*(1-Oa.LUMA_B)+c*Oa.LUMA_B;c=this.m11;var n=this.m12,p=this.m13,k=this.m14;this.m11=this.m11*a+this.m12*f+this.m13*m+0*this.m14;this.m12=c*d+this.m12*g+this.m13*l+0*this.m14;this.m13=c*e+n*h+this.m13*b+0*this.m14;this.m14=0*c+0*n+0*p+this.m14;this.m15=0*c+0*n+0*p+0*k;c=this.m21;n=this.m22;p=this.m23;k=this.m24;this.m21=this.m21*a+this.m22*f+this.m23*m+0*this.m24;this.m22=c*d+this.m22*g+this.m23*l+0*this.m24;
this.m23=c*e+n*h+this.m23*b+0*this.m24;this.m24=0*c+0*n+0*p+this.m24;this.m25=0*c+0*n+0*p+0*k;c=this.m31;n=this.m32;p=this.m33;k=this.m34;this.m31=this.m31*a+this.m32*f+this.m33*m+0*this.m34;this.m32=c*d+this.m32*g+this.m33*l+0*this.m34;this.m33=c*e+n*h+this.m33*b+0*this.m34;this.m34=0*c+0*n+0*p+this.m34;this.m35=0*c+0*n+0*p+0*k;c=this.m41;n=this.m42;p=this.m43;k=this.m44;this.m41=this.m41*a+this.m42*f+this.m43*m+0*this.m44;this.m42=c*d+this.m42*g+this.m43*l+0*this.m44;this.m43=c*e+n*h+this.m43*b+
0*this.m44;this.m44=0*c+0*n+0*p+this.m44;this.m45=0*c+0*n+0*p+0*k;return this},luminance2Alpha:function(){var a=Oa.LUMA_R,b=Oa.LUMA_G,c=Oa.LUMA_B,d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*this.m12+0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+
0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*this.m33+this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+
0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},adjustAlphaContrast:function(a){a+=1;var b=128*(1-a),c=this.m11,d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*c+this.m12+0*this.m13+0*this.m14;this.m13=0*c+0*d+this.m13+0*this.m14;this.m14=0*c+0*d+0*e+this.m14*a;this.m15=0*c+0*d+0*e+f*b;c=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+
0*this.m24;this.m22=0*c+this.m22+0*this.m23+0*this.m24;this.m23=0*c+0*d+this.m23+0*this.m24;this.m24=0*c+0*d+0*e+this.m24*a;this.m25=0*c+0*d+0*e+f*b;c=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*c+this.m32+0*this.m33+0*this.m34;this.m33=0*c+0*d+this.m33+0*this.m34;this.m34=0*c+0*d+0*e+this.m34*a;this.m35=0*c+0*d+0*e+f*b;c=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*c+this.m42+0*
this.m43+0*this.m44;this.m43=0*c+0*d+this.m43+0*this.m44;this.m44=0*c+0*d+0*e+this.m44*a;this.m45=0*c+0*d+0*e+f*b;return this},colorize:function(a,b){null==b&&(b=1);var c=.00392156862745098*(a>>>16&255),d=.00392156862745098*(a>>>8&255),e=.00392156862745098*(a&255),f=1-b;a=f+b*c*Oa.LUMA_R;var g=b*c*Oa.LUMA_G;c=b*c*Oa.LUMA_B;var h=b*d*Oa.LUMA_R,m=f+b*d*Oa.LUMA_G;d=b*d*Oa.LUMA_B;var l=b*e*Oa.LUMA_R,n=b*e*Oa.LUMA_G;b=f+b*e*Oa.LUMA_B;e=this.m11;f=this.m12;var p=this.m13,k=this.m14;this.m11=this.m11*a+
this.m12*h+this.m13*l+0*this.m14;this.m12=e*g+this.m12*m+this.m13*n+0*this.m14;this.m13=e*c+f*d+this.m13*b+0*this.m14;this.m14=0*e+0*f+0*p+this.m14;this.m15=0*e+0*f+0*p+0*k;e=this.m21;f=this.m22;p=this.m23;k=this.m24;this.m21=this.m21*a+this.m22*h+this.m23*l+0*this.m24;this.m22=e*g+this.m22*m+this.m23*n+0*this.m24;this.m23=e*c+f*d+this.m23*b+0*this.m24;this.m24=0*e+0*f+0*p+this.m24;this.m25=0*e+0*f+0*p+0*k;e=this.m31;f=this.m32;p=this.m33;k=this.m34;this.m31=this.m31*a+this.m32*h+this.m33*l+0*this.m34;
this.m32=e*g+this.m32*m+this.m33*n+0*this.m34;this.m33=e*c+f*d+this.m33*b+0*this.m34;this.m34=0*e+0*f+0*p+this.m34;this.m35=0*e+0*f+0*p+0*k;e=this.m41;f=this.m42;p=this.m43;k=this.m44;this.m41=this.m41*a+this.m42*h+this.m43*l+0*this.m44;this.m42=e*g+this.m42*m+this.m43*n+0*this.m44;this.m43=e*c+f*d+this.m43*b+0*this.m44;this.m44=0*e+0*f+0*p+this.m44;this.m45=0*e+0*f+0*p+0*k;return this},rotateHue:function(a){if(!this.hueInitialized){this.hueInitialized=!0;this.preHue=new Oa;this.preHue.rotateRed(45);
this.preHue.rotateGreen(-39.182655);var b=[];b[0]=Oa.LUMA_R2;b[1]=Oa.LUMA_G2;b[2]=Oa.LUMA_B2;b[3]=1;this.preHue.transformVector(b);var c=b[0]/b[2];b=b[1]/b[2];this.preHue.shearBlue(c,b);this.postHue=new Oa;this.postHue.shearBlue(-c,-b);this.postHue.rotateGreen(39.182655);this.postHue.rotateRed(-45)}c=this.preHue;b=this.m11;var d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11*c.m11+this.m12*c.m21+this.m13*c.m31+this.m14*c.m41;this.m12=b*c.m12+this.m12*c.m22+this.m13*c.m32+this.m14*c.m42;this.m13=
b*c.m13+d*c.m23+this.m13*c.m33+this.m14*c.m43;this.m14=b*c.m14+d*c.m24+e*c.m34+this.m14*c.m44;this.m15=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21*c.m11+this.m22*c.m21+this.m23*c.m31+this.m24*c.m41;this.m22=b*c.m12+this.m22*c.m22+this.m23*c.m32+this.m24*c.m42;this.m23=b*c.m13+d*c.m23+this.m23*c.m33+this.m24*c.m43;this.m24=b*c.m14+d*c.m24+e*c.m34+this.m24*c.m44;this.m25=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=
this.m31*c.m11+this.m32*c.m21+this.m33*c.m31+this.m34*c.m41;this.m32=b*c.m12+this.m32*c.m22+this.m33*c.m32+this.m34*c.m42;this.m33=b*c.m13+d*c.m23+this.m33*c.m33+this.m34*c.m43;this.m34=b*c.m14+d*c.m24+e*c.m34+this.m34*c.m44;this.m35=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41*c.m11+this.m42*c.m21+this.m43*c.m31+this.m44*c.m41;this.m42=b*c.m12+this.m42*c.m22+this.m43*c.m32+this.m44*c.m42;this.m43=b*c.m13+d*c.m23+this.m43*c.m33+this.m44*c.m43;this.m44=
b*c.m14+d*c.m24+e*c.m34+this.m44*c.m44;this.m45=b*c.m15+d*c.m25+e*c.m35+f*c.m45;this.rotateBlue(a);c=this.postHue;b=this.m11;d=this.m12;e=this.m13;f=this.m14;this.m11=this.m11*c.m11+this.m12*c.m21+this.m13*c.m31+this.m14*c.m41;this.m12=b*c.m12+this.m12*c.m22+this.m13*c.m32+this.m14*c.m42;this.m13=b*c.m13+d*c.m23+this.m13*c.m33+this.m14*c.m43;this.m14=b*c.m14+d*c.m24+e*c.m34+this.m14*c.m44;this.m15=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21*c.m11+
this.m22*c.m21+this.m23*c.m31+this.m24*c.m41;this.m22=b*c.m12+this.m22*c.m22+this.m23*c.m32+this.m24*c.m42;this.m23=b*c.m13+d*c.m23+this.m23*c.m33+this.m24*c.m43;this.m24=b*c.m14+d*c.m24+e*c.m34+this.m24*c.m44;this.m25=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31*c.m11+this.m32*c.m21+this.m33*c.m31+this.m34*c.m41;this.m32=b*c.m12+this.m32*c.m22+this.m33*c.m32+this.m34*c.m42;this.m33=b*c.m13+d*c.m23+this.m33*c.m33+this.m34*c.m43;this.m34=b*c.m14+d*c.m24+
e*c.m34+this.m34*c.m44;this.m35=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41*c.m11+this.m42*c.m21+this.m43*c.m31+this.m44*c.m41;this.m42=b*c.m12+this.m42*c.m22+this.m43*c.m32+this.m44*c.m42;this.m43=b*c.m13+d*c.m23+this.m43*c.m33+this.m44*c.m43;this.m44=b*c.m14+d*c.m24+e*c.m34+this.m44*c.m44;this.m45=b*c.m15+d*c.m25+e*c.m35+f*c.m45;return this},setChannels:function(a,b,c,d){null==d&&(d=8);null==c&&(c=4);null==b&&(b=2);null==a&&(a=1);var e=(1==(a&1)?
1:0)+(2==(a&2)?1:0)+(4==(a&4)?1:0)+(8==(a&8)?1:0);0<e&&(e=1/e);var f=(1==(b&1)?1:0)+(2==(b&2)?1:0)+(4==(b&4)?1:0)+(8==(b&8)?1:0);0<f&&(f=1/f);var g=(1==(c&1)?1:0)+(2==(c&2)?1:0)+(4==(c&4)?1:0)+(8==(c&8)?1:0);0<g&&(g=1/g);var h=(1==(d&1)?1:0)+(2==(d&2)?1:0)+(4==(d&4)?1:0)+(8==(d&8)?1:0);0<h&&(h=1/h);var m=1==(a&1)?e:0,l=2==(a&2)?e:0,n=4==(a&4)?e:0;a=8==(a&8)?e:0;e=1==(b&1)?f:0;var p=2==(b&2)?f:0,k=4==(b&4)?f:0;b=8==(b&8)?f:0;f=1==(c&1)?g:0;var q=2==(c&2)?g:0,t=4==(c&4)?g:0;c=8==(c&8)?g:0;g=1==(d&1)?
h:0;var v=2==(d&2)?h:0,r=4==(d&4)?h:0;d=8==(d&8)?h:0;h=this.m11;var Ka=this.m12,S=this.m13,u=this.m14;this.m11=this.m11*m+this.m12*e+this.m13*f+this.m14*g;this.m12=h*l+this.m12*p+this.m13*q+this.m14*v;this.m13=h*n+Ka*k+this.m13*t+this.m14*r;this.m14=h*a+Ka*b+S*c+this.m14*d;this.m15=0*h+0*Ka+0*S+0*u;h=this.m21;Ka=this.m22;S=this.m23;u=this.m24;this.m21=this.m21*m+this.m22*e+this.m23*f+this.m24*g;this.m22=h*l+this.m22*p+this.m23*q+this.m24*v;this.m23=h*n+Ka*k+this.m23*t+this.m24*r;this.m24=h*a+Ka*b+
S*c+this.m24*d;this.m25=0*h+0*Ka+0*S+0*u;h=this.m31;Ka=this.m32;S=this.m33;u=this.m34;this.m31=this.m31*m+this.m32*e+this.m33*f+this.m34*g;this.m32=h*l+this.m32*p+this.m33*q+this.m34*v;this.m33=h*n+Ka*k+this.m33*t+this.m34*r;this.m34=h*a+Ka*b+S*c+this.m34*d;this.m35=0*h+0*Ka+0*S+0*u;h=this.m41;Ka=this.m42;S=this.m43;u=this.m44;this.m41=this.m41*m+this.m42*e+this.m43*f+this.m44*g;this.m42=h*l+this.m42*p+this.m43*q+this.m44*v;this.m43=h*n+Ka*k+this.m43*t+this.m44*r;this.m44=h*a+Ka*b+S*c+this.m44*d;
this.m45=0*h+0*Ka+0*S+0*u;return this},average:function(a,b,c){null==c&&(c=.33333333);null==b&&(b=.33333333);null==a&&(a=.33333333);var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=this.m11*a+this.m12*a+this.m13*a+0*this.m14;this.m12=d*b+this.m12*b+this.m13*b+0*this.m14;this.m13=d*c+e*c+this.m13*c+0*this.m14;this.m14=0*d+0*e+0*f+this.m14;this.m15=0*d+0*e+0*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=this.m21*a+this.m22*a+this.m23*a+0*this.m24;this.m22=d*b+this.m22*b+this.m23*
b+0*this.m24;this.m23=d*c+e*c+this.m23*c+0*this.m24;this.m24=0*d+0*e+0*f+this.m24;this.m25=0*d+0*e+0*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=this.m31*a+this.m32*a+this.m33*a+0*this.m34;this.m32=d*b+this.m32*b+this.m33*b+0*this.m34;this.m33=d*c+e*c+this.m33*c+0*this.m34;this.m34=0*d+0*e+0*f+this.m34;this.m35=0*d+0*e+0*f+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=this.m41*a+this.m42*a+this.m43*a+0*this.m44;this.m42=d*b+this.m42*b+this.m43*b+0*this.m44;this.m43=d*c+e*
c+this.m43*c+0*this.m44;this.m44=0*d+0*e+0*f+this.m44;this.m45=0*d+0*e+0*f+0*g;return this},threshold:function(a,b){null==b&&(b=256);var c=Oa.LUMA_R*b,d=Oa.LUMA_G*b,e=Oa.LUMA_B*b,f=-b*a,g=Oa.LUMA_R*b,h=Oa.LUMA_G*b,m=Oa.LUMA_B*b,l=-b*a,n=Oa.LUMA_R*b,p=Oa.LUMA_G*b,k=Oa.LUMA_B*b;a*=-b;b=this.m11;var q=this.m12,t=this.m13,v=this.m14;this.m11=this.m11*c+this.m12*g+this.m13*n+0*this.m14;this.m12=b*d+this.m12*h+this.m13*p+0*this.m14;this.m13=b*e+q*m+this.m13*k+0*this.m14;this.m14=0*b+0*q+0*t+this.m14;this.m15=
b*f+q*l+t*a+0*v;b=this.m21;q=this.m22;t=this.m23;v=this.m24;this.m21=this.m21*c+this.m22*g+this.m23*n+0*this.m24;this.m22=b*d+this.m22*h+this.m23*p+0*this.m24;this.m23=b*e+q*m+this.m23*k+0*this.m24;this.m24=0*b+0*q+0*t+this.m24;this.m25=b*f+q*l+t*a+0*v;b=this.m31;q=this.m32;t=this.m33;v=this.m34;this.m31=this.m31*c+this.m32*g+this.m33*n+0*this.m34;this.m32=b*d+this.m32*h+this.m33*p+0*this.m34;this.m33=b*e+q*m+this.m33*k+0*this.m34;this.m34=0*b+0*q+0*t+this.m34;this.m35=b*f+q*l+t*a+0*v;b=this.m41;
q=this.m42;t=this.m43;v=this.m44;this.m41=this.m41*c+this.m42*g+this.m43*n+0*this.m44;this.m42=b*d+this.m42*h+this.m43*p+0*this.m44;this.m43=b*e+q*m+this.m43*k+0*this.m44;this.m44=0*b+0*q+0*t+this.m44;this.m45=b*f+q*l+t*a+0*v;return this},desaturate:function(){var a=Oa.LUMA_R,b=Oa.LUMA_G,c=Oa.LUMA_B,d=Oa.LUMA_R,e=Oa.LUMA_G,f=Oa.LUMA_B,g=Oa.LUMA_R,h=Oa.LUMA_G,m=Oa.LUMA_B,l=this.m11,n=this.m12,p=this.m13,k=this.m14;this.m11=this.m11*a+this.m12*d+this.m13*g+0*this.m14;this.m12=l*b+this.m12*e+this.m13*
h+0*this.m14;this.m13=l*c+n*f+this.m13*m+0*this.m14;this.m14=0*l+0*n+0*p+this.m14;this.m15=0*l+0*n+0*p+0*k;l=this.m21;n=this.m22;p=this.m23;k=this.m24;this.m21=this.m21*a+this.m22*d+this.m23*g+0*this.m24;this.m22=l*b+this.m22*e+this.m23*h+0*this.m24;this.m23=l*c+n*f+this.m23*m+0*this.m24;this.m24=0*l+0*n+0*p+this.m24;this.m25=0*l+0*n+0*p+0*k;l=this.m31;n=this.m32;p=this.m33;k=this.m34;this.m31=this.m31*a+this.m32*d+this.m33*g+0*this.m34;this.m32=l*b+this.m32*e+this.m33*h+0*this.m34;this.m33=l*c+n*
f+this.m33*m+0*this.m34;this.m34=0*l+0*n+0*p+this.m34;this.m35=0*l+0*n+0*p+0*k;l=this.m41;n=this.m42;p=this.m43;k=this.m44;this.m41=this.m41*a+this.m42*d+this.m43*g+0*this.m44;this.m42=l*b+this.m42*e+this.m43*h+0*this.m44;this.m43=l*c+n*f+this.m43*m+0*this.m44;this.m44=0*l+0*n+0*p+this.m44;this.m45=0*l+0*n+0*p+0*k;return this},setMultiplicators:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);var e=this.m11,f=this.m12,g=this.m13,h=this.m14;this.m11=this.m11*a+0*this.m12+
0*this.m13+0*this.m14;this.m12=0*e+this.m12*b+0*this.m13+0*this.m14;this.m13=0*e+0*f+this.m13*c+0*this.m14;this.m14=0*e+0*f+0*g+this.m14*d;this.m15=0*e+0*f+0*g+0*h;e=this.m21;f=this.m22;g=this.m23;h=this.m24;this.m21=this.m21*a+0*this.m22+0*this.m23+0*this.m24;this.m22=0*e+this.m22*b+0*this.m23+0*this.m24;this.m23=0*e+0*f+this.m23*c+0*this.m24;this.m24=0*e+0*f+0*g+this.m24*d;this.m25=0*e+0*f+0*g+0*h;e=this.m31;f=this.m32;g=this.m33;h=this.m34;this.m31=this.m31*a+0*this.m32+0*this.m33+0*this.m34;this.m32=
0*e+this.m32*b+0*this.m33+0*this.m34;this.m33=0*e+0*f+this.m33*c+0*this.m34;this.m34=0*e+0*f+0*g+this.m34*d;this.m35=0*e+0*f+0*g+0*h;e=this.m41;f=this.m42;g=this.m43;h=this.m44;this.m41=this.m41*a+0*this.m42+0*this.m43+0*this.m44;this.m42=0*e+this.m42*b+0*this.m43+0*this.m44;this.m43=0*e+0*f+this.m43*c+0*this.m44;this.m44=0*e+0*f+0*g+this.m44*d;this.m45=0*e+0*f+0*g+0*h;return this},clearChannels:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);null==a&&(a=!1);a&&(this.m11=this.m12=
this.m13=this.m14=this.m15=0);b&&(this.m21=this.m22=this.m23=this.m24=this.m25=0);c&&(this.m31=this.m32=this.m33=this.m34=this.m35=0);d&&(this.m41=this.m42=this.m43=this.m44=this.m45=0);return this},thresholdAlpha:function(a,b){null==b&&(b=256);a*=-b;var c=this.m11,d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*c+this.m12+0*this.m13+0*this.m14;this.m13=0*c+0*d+this.m13+0*this.m14;this.m14=0*c+0*d+0*e+this.m14*b;this.m15=0*c+0*d+0*e+f*a;c=this.m21;d=
this.m22;e=this.m23;f=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*c+this.m22+0*this.m23+0*this.m24;this.m23=0*c+0*d+this.m23+0*this.m24;this.m24=0*c+0*d+0*e+this.m24*b;this.m25=0*c+0*d+0*e+f*a;c=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*c+this.m32+0*this.m33+0*this.m34;this.m33=0*c+0*d+this.m33+0*this.m34;this.m34=0*c+0*d+0*e+this.m34*b;this.m35=0*c+0*d+0*e+f*a;c=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=
this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*c+this.m42+0*this.m43+0*this.m44;this.m43=0*c+0*d+this.m43+0*this.m44;this.m44=0*c+0*d+0*e+this.m44*b;this.m45=0*c+0*d+0*e+f*a;return this},averageRGB2Alpha:function(){var a=Oa.INV3,b=Oa.INV3,c=Oa.INV3,d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*this.m12+0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=
this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*this.m33+this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=
this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},invertAlpha:function(){var a=this.m11,b=this.m12,c=this.m13,d=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*a+this.m12+0*this.m13+0*this.m14;this.m13=0*a+0*b+this.m13+0*this.m14;this.m14=0*a+0*b+0*c+-1*this.m14;this.m15=0*a+0*b+0*c+
255*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*a+this.m22+0*this.m23+0*this.m24;this.m23=0*a+0*b+this.m23+0*this.m24;this.m24=0*a+0*b+0*c+-1*this.m24;this.m25=0*a+0*b+0*c+255*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*a+this.m32+0*this.m33+0*this.m34;this.m33=0*a+0*b+this.m33+0*this.m34;this.m34=0*a+0*b+0*c+-1*this.m34;this.m35=0*a+0*b+0*c+255*d;a=this.m41;b=this.m42;c=
this.m43;d=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*a+this.m42+0*this.m43+0*this.m44;this.m43=0*a+0*b+this.m43+0*this.m44;this.m44=0*a+0*b+0*c+-1*this.m44;this.m45=0*a+0*b+0*c+255*d;return this},rgb2Alpha:function(a,b,c){var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*this.m12+0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=
this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*this.m33+this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=
this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},setAlpha:function(a){var b=this.m11,c=this.m12,d=this.m13,e=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*b+this.m12+0*this.m13+0*this.m14;this.m13=0*b+0*c+this.m13+0*this.m14;this.m14=0*b+0*c+0*d+this.m14*a;this.m15=0*b+0*c+0*d+0*
e;b=this.m21;c=this.m22;d=this.m23;e=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*b+this.m22+0*this.m23+0*this.m24;this.m23=0*b+0*c+this.m23+0*this.m24;this.m24=0*b+0*c+0*d+this.m24*a;this.m25=0*b+0*c+0*d+0*e;b=this.m31;c=this.m32;d=this.m33;e=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*b+this.m32+0*this.m33+0*this.m34;this.m33=0*b+0*c+this.m33+0*this.m34;this.m34=0*b+0*c+0*d+this.m34*a;this.m35=0*b+0*c+0*d+0*e;b=this.m41;c=this.m42;d=this.m43;
e=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*b+this.m42+0*this.m43+0*this.m44;this.m43=0*b+0*c+this.m43+0*this.m44;this.m44=0*b+0*c+0*d+this.m44*a;this.m45=0*b+0*c+0*d+0*e;return this},rotateRed:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=b;this.m23=-a;this.m31=this.m25=this.m24=0;this.m32=a;this.m33=b;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},
rotateGreen:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=b;this.m12=0;this.m13=a;this.m21=this.m15=this.m14=0;this.m22=1;this.m25=this.m24=this.m23=0;this.m31=-a;this.m32=0;this.m33=b;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},rotateBlue:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=b;this.m12=-a;this.m15=this.m14=this.m13=0;this.m21=a;this.m22=b;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=
1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearRed:function(a,b){this.m11=1;this.m12=a;this.m13=b;this.m21=this.m15=this.m14=0;this.m22=1;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearGreen:function(a,b){this.m11=1;this.m15=this.m14=this.m13=this.m12=0;this.m21=a;this.m22=1;this.m23=b;this.m32=this.m31=this.m25=this.m24=0;this.m33=1;this.m43=this.m42=this.m41=
this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearBlue:function(a,b){this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=1;this.m25=this.m24=this.m23=0;this.m31=a;this.m32=b;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},applyColorDeficiency:function(a){switch(a._hx_index){case 0:a=this.m11;var b=this.m12,c=this.m13,d=this.m14;this.m11=.567*this.m11+.558*this.m12+0*this.m13+0*this.m14;this.m12=.433*a+.442*this.m12+.242*this.m13+
0*this.m14;this.m13=0*a+0*b+.758*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.567*this.m21+.558*this.m22+0*this.m23+0*this.m24;this.m22=.433*a+.442*this.m22+.242*this.m23+0*this.m24;this.m23=0*a+0*b+.758*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.567*this.m31+.558*this.m32+0*this.m33+0*this.m34;this.m32=.433*a+.442*this.m32+.242*
this.m33+0*this.m34;this.m33=0*a+0*b+.758*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.567*this.m41+.558*this.m42+0*this.m43+0*this.m44;this.m42=.433*a+.442*this.m42+.242*this.m43+0*this.m44;this.m43=0*a+0*b+.758*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 1:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=.817*this.m11+.333*this.m12+0*this.m13+0*this.m14;this.m12=.183*
a+.667*this.m12+.125*this.m13+0*this.m14;this.m13=0*a+0*b+.875*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.817*this.m21+.333*this.m22+0*this.m23+0*this.m24;this.m22=.183*a+.667*this.m22+.125*this.m23+0*this.m24;this.m23=0*a+0*b+.875*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.817*this.m31+.333*this.m32+0*this.m33+0*this.m34;this.m32=
.183*a+.667*this.m32+.125*this.m33+0*this.m34;this.m33=0*a+0*b+.875*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.817*this.m41+.333*this.m42+0*this.m43+0*this.m44;this.m42=.183*a+.667*this.m42+.125*this.m43+0*this.m44;this.m43=0*a+0*b+.875*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 2:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=.625*this.m11+.7*this.m12+0*this.m13+
0*this.m14;this.m12=.375*a+.3*this.m12+.3*this.m13+0*this.m14;this.m13=0*a+0*b+.7*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.625*this.m21+.7*this.m22+0*this.m23+0*this.m24;this.m22=.375*a+.3*this.m22+.3*this.m23+0*this.m24;this.m23=0*a+0*b+.7*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.625*this.m31+.7*this.m32+0*this.m33+0*this.m34;
this.m32=.375*a+.3*this.m32+.3*this.m33+0*this.m34;this.m33=0*a+0*b+.7*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.625*this.m41+.7*this.m42+0*this.m43+0*this.m44;this.m42=.375*a+.3*this.m42+.3*this.m43+0*this.m44;this.m43=0*a+0*b+.7*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 3:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=.8*this.m11+.258*this.m12+0*this.m13+0*this.m14;
this.m12=.2*a+.742*this.m12+.142*this.m13+0*this.m14;this.m13=0*a+0*b+.858*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.8*this.m21+.258*this.m22+0*this.m23+0*this.m24;this.m22=.2*a+.742*this.m22+.142*this.m23+0*this.m24;this.m23=0*a+0*b+.858*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.8*this.m31+.258*this.m32+0*this.m33+0*this.m34;
this.m32=.2*a+.742*this.m32+.142*this.m33+0*this.m34;this.m33=0*a+0*b+.858*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.8*this.m41+.258*this.m42+0*this.m43+0*this.m44;this.m42=.2*a+.742*this.m42+.142*this.m43+0*this.m44;this.m43=0*a+0*b+.858*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 4:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=.95*this.m11+0*this.m12+0*this.m13+
0*this.m14;this.m12=.05*a+.433*this.m12+.475*this.m13+0*this.m14;this.m13=0*a+.567*b+.525*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.95*this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=.05*a+.433*this.m22+.475*this.m23+0*this.m24;this.m23=0*a+.567*b+.525*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.95*this.m31+0*this.m32+0*this.m33+
0*this.m34;this.m32=.05*a+.433*this.m32+.475*this.m33+0*this.m34;this.m33=0*a+.567*b+.525*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.95*this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=.05*a+.433*this.m42+.475*this.m43+0*this.m44;this.m43=0*a+.567*b+.525*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 5:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=.967*this.m11+0*this.m12+
0*this.m13+0*this.m14;this.m12=.033*a+.733*this.m12+.183*this.m13+0*this.m14;this.m13=0*a+.267*b+.817*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.967*this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=.033*a+.733*this.m22+.183*this.m23+0*this.m24;this.m23=0*a+.267*b+.817*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=.967*this.m31+0*
this.m32+0*this.m33+0*this.m34;this.m32=.033*a+.733*this.m32+.183*this.m33+0*this.m34;this.m33=0*a+.267*b+.817*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.967*this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=.033*a+.733*this.m42+.183*this.m43+0*this.m44;this.m43=0*a+.267*b+.817*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;case 6:a=this.m11;b=this.m12;c=this.m13;d=this.m14;this.m11=
.299*this.m11+.299*this.m12+.299*this.m13+0*this.m14;this.m12=.587*a+.587*this.m12+.587*this.m13+0*this.m14;this.m13=.114*a+.114*b+.114*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=0*a+0*b+0*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=.299*this.m21+.299*this.m22+.299*this.m23+0*this.m24;this.m22=.587*a+.587*this.m22+.587*this.m23+0*this.m24;this.m23=.114*a+.114*b+.114*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=0*a+0*b+0*c+0*d;a=this.m31;b=this.m32;c=this.m33;
d=this.m34;this.m31=.299*this.m31+.299*this.m32+.299*this.m33+0*this.m34;this.m32=.587*a+.587*this.m32+.587*this.m33+0*this.m34;this.m33=.114*a+.114*b+.114*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=0*a+0*b+0*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=.299*this.m41+.299*this.m42+.299*this.m43+0*this.m44;this.m42=.587*a+.587*this.m42+.587*this.m43+0*this.m44;this.m43=.114*a+.114*b+.114*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=0*a+0*b+0*c+0*d;break;
case 7:a=this.m11,b=this.m12,c=this.m13,d=this.m14,this.m11=.618*this.m11+.163*this.m12+.163*this.m13+0*this.m14,this.m12=.32*a+.775*this.m12+.32*this.m13+0*this.m14,this.m13=.062*a+.062*b+.516*this.m13+0*this.m14,this.m14=0*a+0*b+0*c+this.m14,this.m15=0*a+0*b+0*c+0*d,a=this.m21,b=this.m22,c=this.m23,d=this.m24,this.m21=.618*this.m21+.163*this.m22+.163*this.m23+0*this.m24,this.m22=.32*a+.775*this.m22+.32*this.m23+0*this.m24,this.m23=.062*a+.062*b+.516*this.m23+0*this.m24,this.m24=0*a+0*b+0*c+this.m24,
this.m25=0*a+0*b+0*c+0*d,a=this.m31,b=this.m32,c=this.m33,d=this.m34,this.m31=.618*this.m31+.163*this.m32+.163*this.m33+0*this.m34,this.m32=.32*a+.775*this.m32+.32*this.m33+0*this.m34,this.m33=.062*a+.062*b+.516*this.m33+0*this.m34,this.m34=0*a+0*b+0*c+this.m34,this.m35=0*a+0*b+0*c+0*d,a=this.m41,b=this.m42,c=this.m43,d=this.m44,this.m41=.618*this.m41+.163*this.m42+.163*this.m43+0*this.m44,this.m42=.32*a+.775*this.m42+.32*this.m43+0*this.m44,this.m43=.062*a+.062*b+.516*this.m43+0*this.m44,this.m44=
0*a+0*b+0*c+this.m44,this.m45=0*a+0*b+0*c+0*d}return this},applyMatrix:function(a,b){var c=a.a,d=a.r,e=a.g,f=a.b;a=W.clamp(.5+d*this.m41+e*this.m42+f*this.m43+c*this.m44+this.m45|0,0,255);var g=W.clamp(.5+d*this.m11+e*this.m12+f*this.m13+c*this.m14+this.m15|0,0,255),h=W.clamp(.5+d*this.m21+e*this.m22+f*this.m23+c*this.m24+this.m25|0,0,255);c=W.clamp(.5+d*this.m31+e*this.m32+f*this.m33+c*this.m34+this.m35|0,0,255);b.a=a;b.r=g;b.g=h;b.b=c;return b},transformVector:function(a){var b=a[0],c=a[1],d=a[2],
e=a[3],f=b*this.m21+c*this.m22+d*this.m23+e*this.m24+this.m25,g=b*this.m31+c*this.m32+d*this.m33+e*this.m34+this.m35,h=b*this.m41+c*this.m42+d*this.m43+e*this.m44+this.m45;a[0]=b*this.m11+c*this.m12+d*this.m13+e*this.m14+this.m15;a[1]=f;a[2]=g;a[3]=h;return a},initHue:function(){if(!this.hueInitialized){this.hueInitialized=!0;this.preHue=new Oa;this.preHue.rotateRed(45);this.preHue.rotateGreen(-39.182655);var a=[];a[0]=Oa.LUMA_R2;a[1]=Oa.LUMA_G2;a[2]=Oa.LUMA_B2;a[3]=1;this.preHue.transformVector(a);
var b=a[0]/a[2];a=a[1]/a[2];this.preHue.shearBlue(b,a);this.postHue=new Oa;this.postHue.shearBlue(-b,-a);this.postHue.rotateGreen(39.182655);this.postHue.rotateRed(-45)}},toArray:function(a){a[0]=this.m11;a[1]=this.m12;a[2]=this.m13;a[3]=this.m14;a[4]=this.m15;a[5]=this.m21;a[6]=this.m22;a[7]=this.m23;a[8]=this.m24;a[9]=this.m25;a[10]=this.m31;a[11]=this.m32;a[12]=this.m33;a[13]=this.m34;a[14]=this.m35;a[15]=this.m41;a[16]=this.m42;a[17]=this.m43;a[18]=this.m44;a[19]=this.m45;return a},setArray:function(a){this.m11=
a[0];this.m12=a[1];this.m13=a[2];this.m14=a[3];this.m15=a[4];this.m21=a[5];this.m22=a[6];this.m23=a[7];this.m24=a[8];this.m25=a[9];this.m31=a[10];this.m32=a[11];this.m33=a[12];this.m34=a[13];this.m35=a[14];this.m41=a[15];this.m42=a[16];this.m43=a[17];this.m44=a[18];this.m45=a[19];this.matrix=a},set:function(a,b,c,d,e,f,g,h,m,l,n,p,k,q,t,v,r,Ka,S,u){this.m11=a;this.m12=b;this.m13=c;this.m14=d;this.m15=e;this.m21=f;this.m22=g;this.m23=h;this.m24=m;this.m25=l;this.m31=n;this.m32=p;this.m33=k;this.m34=
q;this.m35=t;this.m41=v;this.m42=r;this.m43=Ka;this.m44=S;this.m45=u},mul:function(a,b,c,d,e,f,g,h,m,l,n,p,k,q,t,v,r,Ka,S,u){var L=this.m11,of=this.m12,$f=this.m13,ag=this.m14;this.m11=this.m11*a+this.m12*f+this.m13*n+this.m14*v;this.m12=L*b+this.m12*g+this.m13*p+this.m14*r;this.m13=L*c+of*h+this.m13*k+this.m14*Ka;this.m14=L*d+of*m+$f*q+this.m14*S;this.m15=L*e+of*l+$f*t+ag*u;L=this.m21;of=this.m22;$f=this.m23;ag=this.m24;this.m21=this.m21*a+this.m22*f+this.m23*n+this.m24*v;this.m22=L*b+this.m22*g+
this.m23*p+this.m24*r;this.m23=L*c+of*h+this.m23*k+this.m24*Ka;this.m24=L*d+of*m+$f*q+this.m24*S;this.m25=L*e+of*l+$f*t+ag*u;L=this.m31;of=this.m32;$f=this.m33;ag=this.m34;this.m31=this.m31*a+this.m32*f+this.m33*n+this.m34*v;this.m32=L*b+this.m32*g+this.m33*p+this.m34*r;this.m33=L*c+of*h+this.m33*k+this.m34*Ka;this.m34=L*d+of*m+$f*q+this.m34*S;this.m35=L*e+of*l+$f*t+ag*u;L=this.m41;of=this.m42;$f=this.m43;ag=this.m44;this.m41=this.m41*a+this.m42*f+this.m43*n+this.m44*v;this.m42=L*b+this.m42*g+this.m43*
p+this.m44*r;this.m43=L*c+of*h+this.m43*k+this.m44*Ka;this.m44=L*d+of*m+$f*q+this.m44*S;this.m45=L*e+of*l+$f*t+ag*u},__class__:Oa};var as=function(){};k["com.stencyl.utils.HaxeDefines"]=as;as.__name__="com.stencyl.utils.HaxeDefines";var Ok=function(a,b){this.map=a;this.initializer=b};k["com.stencyl.utils.LazyIntMap"]=Ok;Ok.__name__="com.stencyl.utils.LazyIntMap";Ok.prototype={map:null,initializer:null,get:function(a){var b=this.map.h[a];null==b&&(b=this.initializer(a),this.map.h[a]=b);return b},set:function(a,
b){this.map.h[a]=b},exists:function(a){return this.map.h.hasOwnProperty(a)},remove:function(a){return this.map.remove(a)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},__class__:Ok};var Jn=function(a,b){this.map=a;this.initializer=b};k["com.stencyl.utils.LazyStringMap"]=Jn;Jn.__name__="com.stencyl.utils.LazyStringMap";Jn.prototype={map:null,initializer:null,get:function(a){var b=this.map.h[a];null==b&&(b=this.initializer(a),this.map.h[a]=b);return b},set:function(a,
b){this.map.h[a]=b},exists:function(a){return Object.prototype.hasOwnProperty.call(this.map.h,a)},remove:function(a){var b=this.map;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},keys:function(){return new hj(this.map.h)},iterator:function(){return new xi(this.map.h)},__class__:Jn};var hf=function(a,b){this.level=a;this.time=b};k["com.stencyl.utils.ExtraInfo"]=hf;hf.__name__="com.stencyl.utils.ExtraInfo";hf.prototype={level:null,time:null,__class__:hf};var Q=function(){};
k["com.stencyl.utils.Log"]=Q;Q.__name__="com.stencyl.utils.Log";Q.debug=function(a,b){if(4<=Q.level){var c=new hf(4,(new Date).getTime()/1E3);null==b.customParams?b.customParams=[c]:b.customParams.push(c);mf.trace(A.string(a),b)}};Q.error=function(a,b){if(1<=Q.level){var c=new hf(1,(new Date).getTime()/1E3);null==b.customParams?b.customParams=[c]:b.customParams.push(c);mf.trace(A.string(a),b)}};Q.fullError=function(a,b,c){if(1<=Q.level){var d=new hf(1,(new Date).getTime()/1E3);null==c.customParams?
c.customParams=[d]:c.customParams.push(d);0<b.get_stack().length?mf.trace(A.string(a)+"\n"+b.details(),c):mf.trace(A.string(a)+" (Run in Debug mode to see the exception stack.)\n"+b.details(),c)}};Q.info=function(a,b){if(3<=Q.level){var c=new hf(3,(new Date).getTime()/1E3);null==b.customParams?b.customParams=[c]:b.customParams.push(c);mf.trace(A.string(a),b)}};Q.verbose=function(a,b){if(5<=Q.level){var c=new hf(5,(new Date).getTime()/1E3);null==b.customParams?b.customParams=[c]:b.customParams.push(c);
mf.trace(A.string(a),b)}};Q.warn=function(a,b){if(2<=Q.level){var c=new hf(2,(new Date).getTime()/1E3);null==b.customParams?b.customParams=[c]:b.customParams.push(c);mf.trace(A.string(a),b)}};Q.getExtraInfo=function(a){if(null==a.customParams||0==a.customParams.length)return new hf(3,(new Date).getTime()/1E3);a=a.customParams[a.customParams.length-1];return a instanceof hf?a:new hf(3,(new Date).getTime()/1E3)};Q.stamp=function(a,b){b=new hf(b,(new Date).getTime()/1E3);null==a.customParams?a.customParams=
[b]:a.customParams.push(b)};Q.ensureStamped=function(a,b){null!=a.customParams&&0<a.customParams.length&&a.customParams[a.customParams.length-1]instanceof hf||(b=new hf(b,(new Date).getTime()/1E3),null==a.customParams?a.customParams=[b]:a.customParams.push(b))};var jo=function(){};k["com.stencyl.utils.Mathematics"]=jo;jo.__name__="com.stencyl.utils.Mathematics";jo.round=function(a){return(0<a?a+.5:0>a?a-.5:0)|0};jo.clamp=function(a,b,c){return a<b?b:a>c?c:a};jo.fclamp=function(a,b,c){return a<b?b:
a>c?c:a};var Ac=function(a){this.points=a;this.combineClosePoints();this.combineColinearPoints();this.makeCCW()};k["com.stencyl.utils.PolyDecompBayazit"]=Ac;Ac.__name__="com.stencyl.utils.PolyDecompBayazit";Ac.area=function(a,b,c){return(b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y)};Ac.right=function(a,b,c){return 0>Ac.area(a,b,c)};Ac.rightOn=function(a,b,c){return 0>=Ac.area(a,b,c)};Ac.left=function(a,b,c){return 0<Ac.area(a,b,c)};Ac.leftOn=function(a,b,c){return 0<=Ac.area(a,b,c)};Ac.sqdist=function(a,
b){var c=b.x-a.x;a=b.y-a.y;return c*c+a*a};Ac.getIntersection=function(a,b,c,d){var e=b.y-a.y;b=a.x-b.x;a=e*a.x+b*a.y;var f=d.y-c.y;d=c.x-d.x;c=f*c.x+d*c.y;var g=e*d-f*b;return Math.abs(g)>Number.MIN_VALUE?new pa((d*a-b*c)/g,(e*c-f*a)/g):null};Ac.prototype={combineColinearPoints:function(){for(var a=[],b=0,c=this.points.length;b<c;){var d=b++,e=this.at(d-1),f=this.at(d);d=this.at(d+1);null!=Ac.getIntersection(e,f,f,d)&&a.push(f)}this.points=a},points:null,combineClosePoints:function(){for(var a=[],
b=0,c=this.points.length;b<c;){var d=b++,e=this.at(d);d=this.at(d+1);Ac.sqdist(e,d)>Number.MIN_VALUE&&a.push(e)}this.points=a},at:function(a){var b=this.points.length;return this.points[(a+b)%b]},isReflex:function(a){return Ac.right(this.at(a-1),this.at(a),this.at(a+1))},polyFromRange:function(a,b){return a<b?new Ac(this.points.slice(a,b+1)):new Ac(this.points.slice(a).concat(this.points.slice(0,b+1)))},decompose:function(a){if(!(3>this.points.length)){for(var b=0,c=this.points.length;b<c;){var d=
b++;if(this.isReflex(d)){var e=Number.MAX_VALUE,f=null;b=0;for(var g=Number.MAX_VALUE,h=null,m=c=0,l=this.points.length;m<l;){var n=m++;if(Ac.left(this.at(d-1),this.at(d),this.at(n))&&Ac.rightOn(this.at(d-1),this.at(d),this.at(n-1))){var p=Ac.getIntersection(this.at(d-1),this.at(d),this.at(n),this.at(n-1));if(Ac.right(this.at(d+1),this.at(d),p)){var k=Ac.sqdist(this.at(d),p);k<g&&(g=k,h=p,c=n)}}Ac.left(this.at(d+1),this.at(d),this.at(n+1))&&Ac.rightOn(this.at(d+1),this.at(d),this.at(n))&&(p=Ac.getIntersection(this.at(d+
1),this.at(d),this.at(n),this.at(n+1)),Ac.left(this.at(d-1),this.at(d),p)&&(k=Ac.sqdist(this.at(d),p),k<e&&(e=k,f=p,b=n)))}if(c==(b+1)%this.points.length)e=new pa(.5*(h.x+f.x),.5*(h.y+f.y)),f=this.polyFromRange(d,b),f.points.push(e),d=d<b?this.polyFromRange(c,d):this.polyFromRange(0,d),d.points.push(e);else{c>b&&(b+=this.points.length);e=0;for(f=Number.MAX_VALUE;c<=b;)Ac.leftOn(this.at(d-1),this.at(d),this.at(c))&&Ac.rightOn(this.at(d+1),this.at(d),this.at(c))&&(g=Ac.sqdist(this.at(d),this.at(c)),
g<f&&(f=g,this.at(c),e=c%this.points.length)),++c;f=this.polyFromRange(d,e);d=this.polyFromRange(e,d)}f.points.length<d.points.length?(f.decompose(a),d.decompose(a)):(d.decompose(a),f.decompose(a));return}}3<=this.points.length&&a(this)}},makeCCW:function(){for(var a=0,b=1,c=this.points.length;b<c;){var d=b++;if(this.at(d).y<this.at(a).y||this.at(d).y==this.at(a).y&&this.at(d).x>this.at(a).x)a=d}Ac.left(this.at(a-1),this.at(a),this.at(a+1))||this.points.reverse()},__class__:Ac};var Fd=function(a,
b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.r=a;this.g=b;this.b=c};k["com.stencyl.utils.RGB"]=Fd;Fd.__name__="com.stencyl.utils.RGB";Fd.setRGBi=function(a,b,c){return(a&255)<<16|(b&255)<<8|c&255};Fd.setRGBf=function(a,b,c){a=255*(0>a?0:1<a?1:a);b=255*(0>b?0:1<b?1:b);c=255*(0>c?0:1<c?1:c);return(((0<a?a+.5:0>a?a-.5:0)|0)&255)<<16|(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<8|((0<c?c+.5:0>c?c-.5:0)|0)&255};Fd.getR=function(a){return a>>>16&255};Fd.getRf=function(a){return.00392156862745098*(a>>>16&
255)};Fd.getG=function(a){return a>>>8&255};Fd.getGf=function(a){return.00392156862745098*(a>>>8&255)};Fd.getB=function(a){return a&255};Fd.getBf=function(a){return.00392156862745098*(a&255)};Fd.setR=function(a,b){return(b&255)<<16|a&-16711681};Fd.setRf=function(a,b){b=255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|a&-16711681};Fd.setG=function(a,b){return(b&255)<<8|a&-65281};Fd.setGf=function(a,b){b=255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<8|a&-65281};Fd.setB=function(a,
b){return b&255|a&-256};Fd.setBf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)&255|a&-256};Fd.prototype={r:null,g:null,b:null,set:function(a,b,c){this.r=a;this.g=b;this.b=c},lerp:function(a,b,c){b.r=this.r+(a.r-this.r)*c;b.g=this.g+(a.g-this.g)*c;b.b=this.b+(a.b-this.b)*c},getR8:function(){var a=255*this.r;return(0<a?a+.5:0>a?a-.5:0)|0},getG8:function(){var a=255*this.g;return(0<a?a+.5:0>a?a-.5:0)|0},getB8:function(){var a=255*this.b;return(0<a?a+.5:0>a?a-.5:0)|0},get24:function(){var a=
255*this.r,b=255*this.g,c=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<16|((0<b?b+.5:0>b?b-.5:0)|0)<<8|(0<c?c+.5:0>c?c-.5:0)|0},set24:function(a,b,c){this.r=.00392156862745098*(a&255);this.g=.00392156862745098*(b&255);this.b=.00392156862745098*(c&255)},copy:function(a){a.r=this.r;a.g=this.g;a.b=this.b;return a},__class__:Fd};var gf=function(a,b){null==b&&(b=0);null==a&&(a=1);this.volume=a;this.pan=b;this.rightToRight=this.rightToLeft=this.leftToRight=this.leftToLeft=0};k["openfl.media.SoundTransform"]=
gf;gf.__name__="openfl.media.SoundTransform";gf.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new gf(this.volume,this.pan)},__class__:gf};var ia=function(){this.h=Object.create(null)};k["haxe.ds.StringMap"]=ia;ia.__name__="haxe.ds.StringMap";ia.__interfaces__=[Od];ia.stringify=function(a){var b="{",c=!0,d;for(d in a)c?c=!1:b+=",",b+=d+" => "+A.string(a[d]);return b+"}"};ia.prototype={h:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this.h,
a)},get:function(a){return this.h[a]},set:function(a,b){this.h[a]=b},remove:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)?(delete this.h[a],!0):!1},keys:function(){return new hj(this.h)},iterator:function(){return new xi(this.h)},keyValueIterator:function(){return new ko(this.h)},__class__:ia};var Xa=function(){this.h={}};k["haxe.ds.IntMap"]=Xa;Xa.__name__="haxe.ds.IntMap";Xa.__interfaces__=[Od];Xa.prototype={h:null,set:function(a,b){this.h[a]=b},get:function(a){return this.h[a]},
exists:function(a){return this.h.hasOwnProperty(a)},remove:function(a){if(!this.h.hasOwnProperty(a))return!1;delete this.h[a];return!0},keys:function(){var a=[],b;for(b in this.h)this.h.hasOwnProperty(b)&&a.push(b|0);return new se(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a]}}},keyValueIterator:function(){return new ch(this)},__class__:Xa};var Nh=function(a,b,c,d,e,f){null==f&&(f=0);null==
e&&(e=0);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};k["lime.math.Matrix3"]=Nh;Nh.__name__="lime.math.Matrix3";Nh.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,clone:function(){return new Nh(this.a,this.b,this.c,this.d,this.tx,this.ty)},concat:function(a){var b=this.a*a.a+this.b*a.c;this.b=this.a*a.b+this.b*a.d;this.a=b;b=this.c*a.a+this.d*a.c;this.d=this.c*a.b+this.d*a.d;this.c=b;b=this.tx*a.a+this.ty*a.c+a.tx;this.ty=
this.tx*a.b+this.ty*a.d+a.ty;this.tx=b},copyColumnFrom:function(a,b){if(2<a)throw J.thrown("Column "+a+" out of bounds (2)");0==a?(this.a=b.x,this.b=b.y):1==a?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw J.thrown("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=0):1==a?(b.x=this.c,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},copyFrom:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty},copyRowFrom:function(a,
b){if(2<a)throw J.thrown("Row "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y,this.tx=b.z):1==a&&(this.b=b.x,this.d=b.y,this.ty=b.z)},copyRowTo:function(a,b){if(2<a)throw J.thrown("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=this.tx):1==a?(b.x=this.b,b.y=this.d,b.z=this.ty):(b.x=0,b.y=0,b.z=1)},createBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.a=f*a;this.b=c*b;this.c=-c*a;this.d=f*b}else this.a=a,this.c=
this.b=0,this.d=b;this.tx=d;this.ty=e},createGradientBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=f;this.d*=f}else this.c=this.b=0;this.tx=d+a/2;this.ty=e+b/2},equals:function(a){return null!=a&&this.tx==a.tx&&this.ty==a.ty&&this.a==a.a&&this.b==a.b&&this.c==a.c?this.d==a.d:!1},deltaTransformVector:function(a,b){null==b&&(b=new Vd);b.x=a.x*this.a+a.y*this.c;b.y=
a.x*this.b+a.y*this.d;return b},identity:function(){this.a=1;this.c=this.b=0;this.d=1;this.ty=this.tx=0},invert:function(){var a=this.a*this.d-this.b*this.c;if(0==a)this.a=this.b=this.c=this.d=0,this.tx=-this.tx,this.ty=-this.ty;else{a=1/a;var b=this.d*a;this.d=this.a*a;this.a=b;this.b*=-a;this.c*=-a;a=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=a}return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.a*b-this.b*a;this.b=this.a*a+this.b*b;this.a=
c;c=this.c*b-this.d*a;this.d=this.c*a+this.d*b;this.c=c;c=this.tx*b-this.ty*a;this.ty=this.tx*a+this.ty*b;this.tx=c},scale:function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b},setRotation:function(a,b){null==b&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f},to3DString:function(a){null==a&&(a=!1);return a?"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+
", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+this.tx+", "+this.ty+", 0, 1)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformRect:function(a,b){null==b&&(b=new Dd);var c=this.a*a.x+this.c*a.y,d=c,e=this.b*a.x+this.d*a.y,f=e,g=this.a*(a.x+a.width)+this.c*a.y,h=this.b*(a.x+a.width)+this.d*a.y;g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&
(f=h);g=this.a*(a.x+a.width)+this.c*(a.y+a.height);h=this.b*(a.x+a.width)+this.d*(a.y+a.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);g=this.a*a.x+this.c*(a.y+a.height);h=this.b*a.x+this.d*(a.y+a.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);b.setTo(c+g,e+h,d-c,f-e);return b},transformVector:function(a,b){null==b&&(b=new Vd);b.x=a.x*this.a+a.y*this.c+this.tx;b.y=a.x*this.b+a.y*this.d+this.ty;return b},translate:function(a,b){this.tx+=a;this.ty+=b},__class__:Nh};var wa=function(a,b,c,d,
e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};k["openfl.geom.Matrix"]=wa;wa.__name__="openfl.geom.Matrix";wa.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new wa(this.a,this.b,this.c,this.d,this.tx,this.ty)},concat:function(a){var b=this.a*a.a+this.b*a.c;this.b=this.a*a.b+this.b*a.d;this.a=b;b=this.c*a.a+this.d*a.c;this.d=this.c*a.b+this.d*a.d;this.c=
b;b=this.tx*a.a+this.ty*a.c+a.tx;this.ty=this.tx*a.b+this.ty*a.d+a.ty;this.tx=b},copyColumnFrom:function(a,b){if(2<a)throw J.thrown("Column "+a+" out of bounds (2)");0==a?(this.a=b.x,this.b=b.y):1==a?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw J.thrown("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=0):1==a?(b.x=this.c,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},copyFrom:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;
this.tx=a.tx;this.ty=a.ty},copyRowFrom:function(a,b){if(2<a)throw J.thrown("Row "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y,this.tx=b.z):1==a&&(this.b=b.x,this.d=b.y,this.ty=b.z)},copyRowTo:function(a,b){if(2<a)throw J.thrown("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=this.tx):1==a?(b.x=this.b,b.y=this.d,b.z=this.ty):b.setTo(0,0,1)},createBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.a=f*a;this.b=c*
b;this.c=-c*a;this.d=f*b}else this.a=a,this.c=this.b=0,this.d=b;this.tx=d;this.ty=e},createGradientBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=f;this.d*=f}else this.c=this.b=0;this.tx=d+a/2;this.ty=e+b/2},deltaTransformPoint:function(a){return new pa(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},equals:function(a){return null!=a&&this.tx==a.tx&&this.ty==a.ty&&
this.a==a.a&&this.b==a.b&&this.c==a.c?this.d==a.d:!1},identity:function(){this.a=1;this.c=this.b=0;this.d=1;this.ty=this.tx=0},invert:function(){var a=this.a*this.d-this.b*this.c;if(0==a)this.a=this.b=this.c=this.d=0,this.tx=-this.tx,this.ty=-this.ty;else{a=1/a;var b=this.d*a;this.d=this.a*a;this.a=b;this.b*=-a;this.c*=-a;a=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=a}return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.a*b-this.b*a;this.b=
this.a*a+this.b*b;this.a=c;c=this.c*b-this.d*a;this.d=this.c*a+this.d*b;this.c=c;c=this.tx*b-this.ty*a;this.ty=this.tx*a+this.ty*b;this.tx=c},scale:function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b},setRotation:function(a,b){null==b&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f},to3DString:function(a){null==a&&(a=!1);return a?"matrix3d("+this.a+", "+this.b+
", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+this.tx+", "+this.ty+", 0, 1)"},toMozString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+"px, "+this.ty+"px)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformPoint:function(a){return new pa(a.x*this.a+a.y*this.c+this.tx,
a.x*this.b+a.y*this.d+this.ty)},translate:function(a,b){this.tx+=a;this.ty+=b},toArray:function(a){null==a&&(a=!1);null==this.__array&&(this.__array=new Float32Array(9));a?(this.__array[0]=this.a,this.__array[1]=this.b,this.__array[2]=0,this.__array[3]=this.c,this.__array[4]=this.d,this.__array[5]=0,this.__array[6]=this.tx,this.__array[7]=this.ty):(this.__array[0]=this.a,this.__array[1]=this.c,this.__array[2]=this.tx,this.__array[3]=this.b,this.__array[4]=this.d,this.__array[5]=this.ty,this.__array[6]=
0,this.__array[7]=0);this.__array[8]=1;return this.__array},__cleanValues:function(){this.a=Math.round(1E3*this.a)/1E3;this.b=Math.round(1E3*this.b)/1E3;this.c=Math.round(1E3*this.c)/1E3;this.d=Math.round(1E3*this.d)/1E3;this.tx=Math.round(10*this.tx)/10;this.ty=Math.round(10*this.ty)/10},__toMatrix3:function(){wa.__matrix3.setTo(this.a,this.b,this.c,this.d,this.tx,this.ty);return wa.__matrix3},__transformInversePoint:function(a){var b=this.a*this.d-this.b*this.c;if(0==b)a.x=-this.tx,a.y=-this.ty;
else{var c=1/b*(this.c*(this.ty-a.y)+this.d*(a.x-this.tx));a.y=1/b*(this.a*(a.y-this.ty)+this.b*(this.tx-a.x));a.x=c}},__transformInverseX:function(a,b){var c=this.a*this.d-this.b*this.c;return 0==c?-this.tx:1/c*(this.c*(this.ty-b)+this.d*(a-this.tx))},__transformInverseY:function(a,b){var c=this.a*this.d-this.b*this.c;return 0==c?-this.ty:1/c*(this.a*(b-this.ty)+this.b*(this.tx-a))},__transformPoint:function(a){var b=a.x,c=a.y;a.x=b*this.a+c*this.c+this.tx;a.y=b*this.b+c*this.d+this.ty},__transformX:function(a,
b){return a*this.a+b*this.c+this.tx},__transformY:function(a,b){return a*this.b+b*this.d+this.ty},__translateTransformed:function(a,b){this.tx=a*this.a+b*this.c+this.tx;this.ty=a*this.b+b*this.d+this.ty},__class__:wa};var Kc=function(a,b,c,d,e,f,g,h){null==h&&(h=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.redMultiplier=a;this.greenMultiplier=b;this.blueMultiplier=c;this.alphaMultiplier=d;this.redOffset=e;this.greenOffset=f;this.blueOffset=
g;this.alphaOffset=h};k["openfl.geom.ColorTransform"]=Kc;Kc.__name__="openfl.geom.ColorTransform";Kc.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,concat:function(a){this.redOffset=a.redOffset*this.redMultiplier+this.redOffset;this.greenOffset=a.greenOffset*this.greenMultiplier+this.greenOffset;this.blueOffset=a.blueOffset*this.blueMultiplier+this.blueOffset;this.alphaOffset=a.alphaOffset*
this.alphaMultiplier+this.alphaOffset;this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier},toString:function(){return"(redMultiplier="+this.redMultiplier+", greenMultiplier="+this.greenMultiplier+", blueMultiplier="+this.blueMultiplier+", alphaMultiplier="+this.alphaMultiplier+", redOffset="+this.redOffset+", greenOffset="+this.greenOffset+", blueOffset="+this.blueOffset+", alphaOffset="+this.alphaOffset+
")"},__clone:function(){return new Kc(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},__copyFrom:function(a){this.redMultiplier=a.redMultiplier;this.greenMultiplier=a.greenMultiplier;this.blueMultiplier=a.blueMultiplier;this.alphaMultiplier=a.alphaMultiplier;this.redOffset=a.redOffset;this.greenOffset=a.greenOffset;this.blueOffset=a.blueOffset;this.alphaOffset=a.alphaOffset},__combine:function(a){this.redMultiplier*=
a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset+=a.redOffset;this.greenOffset+=a.greenOffset;this.blueOffset+=a.blueOffset;this.alphaOffset+=a.alphaOffset},__identity:function(){this.alphaMultiplier=this.blueMultiplier=this.greenMultiplier=this.redMultiplier=1;this.alphaOffset=this.blueOffset=this.greenOffset=this.redOffset=0},__invert:function(){this.redMultiplier=0!=this.redMultiplier?1/this.redMultiplier:
1;this.greenMultiplier=0!=this.greenMultiplier?1/this.greenMultiplier:1;this.blueMultiplier=0!=this.blueMultiplier?1/this.blueMultiplier:1;this.alphaMultiplier=0!=this.alphaMultiplier?1/this.alphaMultiplier:1;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},__equals:function(a,b){return null==a||this.redMultiplier!=a.redMultiplier||this.greenMultiplier!=a.greenMultiplier||this.blueMultiplier!=a.blueMultiplier||!b&&
this.alphaMultiplier!=a.alphaMultiplier||this.redOffset!=a.redOffset||this.greenOffset!=a.greenOffset||this.blueOffset!=a.blueOffset?!1:this.alphaOffset==a.alphaOffset},__isDefault:function(a){return a?1==this.redMultiplier&&1==this.greenMultiplier&&1==this.blueMultiplier&&0==this.redOffset&&0==this.greenOffset&&0==this.blueOffset?0==this.alphaOffset:!1:1==this.redMultiplier&&1==this.greenMultiplier&&1==this.blueMultiplier&&1==this.alphaMultiplier&&0==this.redOffset&&0==this.greenOffset&&0==this.blueOffset?
0==this.alphaOffset:!1},__setArrays:function(a,b){a[0]=this.redMultiplier;a[1]=this.greenMultiplier;a[2]=this.blueMultiplier;a[3]=this.alphaMultiplier;b[0]=this.redOffset;b[1]=this.greenOffset;b[2]=this.blueOffset;b[3]=this.alphaOffset},get_color:function(){return(this.redOffset|0)<<16|(this.greenOffset|0)<<8|this.blueOffset|0},set_color:function(a){this.redOffset=a>>16&255;this.greenOffset=a>>8&255;this.blueOffset=a&255;this.blueMultiplier=this.greenMultiplier=this.redMultiplier=0;return this.get_color()},
__toLimeColorMatrix:function(){if(null==Kc.__limeColorMatrix){var a=new Float32Array(20);Kc.__limeColorMatrix=a}Kc.__limeColorMatrix[0]=this.redMultiplier;Kc.__limeColorMatrix[4]=this.redOffset/255;Kc.__limeColorMatrix[6]=this.greenMultiplier;Kc.__limeColorMatrix[9]=this.greenOffset/255;Kc.__limeColorMatrix[12]=this.blueMultiplier;Kc.__limeColorMatrix[14]=this.blueOffset/255;Kc.__limeColorMatrix[18]=this.alphaMultiplier;Kc.__limeColorMatrix[19]=this.alphaOffset/255;return Kc.__limeColorMatrix},__class__:Kc,
__properties__:{set_color:"set_color",get_color:"get_color"}};var W=function(){};k["com.stencyl.utils.Utils"]=W;W.__name__="com.stencyl.utils.Utils";W.__properties__={set_time:"set_time",set_pan:"set_pan",get_pan:"get_pan",set_volume:"set_volume",get_volume:"get_volume"};W.toBoolean=function(a){return"true"==a?!0:!1};W.clear=function(a){a.length=0};W.removeValueFromArray=function(a,b){for(var c=a.length-1;-1<c;)a[c]==b&&a.splice(c,1),--c};W.contains=function(a,b){if(null==a)return!1;for(var c=a.length-
1;-1<c;){if(a[c]==b)return!0;--c}return!1};W.mapContainsValue=function(a,b){a=a.h;for(var c=Object.keys(a),d=c.length,e=0;e<d;)if(a[c[e++]]==b)return!0;return!1};W.mapCount=function(a){var b=0;a=Object.keys(a.h).length;for(var c=0;c<a;)c++,++b;return b};W.mapToList=function(a,b){var c=[];if("keys"==b){b=a.h;b=Object.keys(b);for(var d=b.length,e=0;e<d;){var f=b[e++];c.push(f)}}else for(a=b=a.h,b=Object.keys(b),d=b.length,e=0;e<d;)f=a[b[e++]],c.push(f);return c};W.clone=function(a){return W.cloner.clone(a)};
W.copyMap=function(a){for(var b=new ia,c=Object.keys(a.h),d=c.length,e=0;e<d;){var f=c[e++];b.h[f]=a.h[f]}return b};W.applyToAllChildren=function(a,b){for(var c=0,d=a.get_numChildren();c<d;){var e=c++;e=a.getChildAt(e);e instanceof jb&&W.applyToAllChildren(e,b);b(e)}};W.removeAllChildren=function(a){for(;0<a.get_numChildren();){var b=a.getChildAt(0);b instanceof jb&&W.removeAllChildren(U.__cast(b,jb));b instanceof mh&&W.removeAllTiles(b);a.removeChild(b)}};W.removeAllTiles=function(a){for(;0<a.get_numTiles();){var b=
a.getTileAt(0);U.__implements(b,yi)&&W.removeAllTiles(b);a.removeTile(b)}};W.demouse=function(a){for(var b=0,c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);d instanceof jb&&W.demouse(U.__cast(d,jb));a.mouseChildren=!1;a.mouseEnabled=!1}};W.getAnchorPoint=function(a){a=a.getRect(a);return new pa(-1*a.x,-1*a.y)};W.setCamera=function(a,b){null==b&&(b=0);null==a&&(a=0);W.camera.x=a;W.camera.y=b};W.resetCamera=function(){W.camera.x=W.camera.y=0};W.get_volume=function(){return W._volume};W.set_volume=
function(a){0>a&&(a=0);if(W._volume==a)return a;W._soundTransform.volume=W._volume=a;return W._volume};W.get_pan=function(){return W._pan};W.set_pan=function(a){-1>a&&(a=-1);1<a&&(a=1);if(W._pan==a)return a;W._soundTransform.pan=W._pan=a;return W._pan};W.sign=function(a){return 0>a?-1:0<a?1:0};W.approach=function(a,b,c){return a<b?b<a+c?b:a+c:b>a-c?b:a-c};W.lerp=function(a,b,c){null==c&&(c=1);return a+(b-a)*c};W.colorLerp=function(a,b,c){null==c&&(c=1);if(0>=c)return a;if(1<=c)return b;var d=a>>24&
255,e=a>>16&255,f=a>>8&255;a&=255;return d+(((b>>24&255)-d)*c|0)<<24|e+(((b>>16&255)-e)*c|0)<<16|f+(((b>>8&255)-f)*c|0)<<8|a+(((b&255)-a)*c|0)};W.stepTowards=function(a,b,c,d){null==d&&(d=1);W.point.x=b-a.x;W.point.y=c-a.y;W.point.get_length()<=d?(a.x=b,a.y=c):(W.point.normalize(d),a.x+=W.point.x,a.y+=W.point.y)};W.anchorTo=function(a,b,c){null==c&&(c=0);W.point.x=a.x-b.x;W.point.y=a.y-b.y;W.point.get_length()>c&&W.point.normalize(c);a.x=b.x+W.point.x;a.y=b.y+W.point.y};W.angle=function(a,b,c,d){a=
57.29577951308402*Math.atan2(d-b,c-a);return 0>a?a+360:a};W.angleXY=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=1);b*=.01745329251994278;a.x=Math.cos(b)*c+d;a.y=Math.sin(b)*c+e};W.rotateAround=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=0);d&&(d=57.29577951308402*Math.atan2(a.y-b.y,a.x-b.x),c+=0>d?d+360:d);d=b.x;var e=b.y,f=a.x,g=a.y;null==g&&(g=0);null==f&&(f=0);d=Math.sqrt((f-d)*(f-d)+(g-e)*(g-e));e=b.x;b=b.y;null==b&&(b=0);null==e&&(e=0);null==d&&(d=1);c*=.01745329251994278;
a.x=Math.cos(c)*d+e;a.y=Math.sin(c)*d+b};W.distance=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))};W.distanceSquared=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);return(c-a)*(c-a)+(d-b)*(d-b)};W.distanceRects=function(a,b,c,d,e,f,g,h){if(a<e+g&&e<a+c)return b<f+h&&f<b+d?0:b>f?b-(f+h):f-(b+d);if(b<f+h&&f<b+d)return a>e?a-(e+g):e-(a+c);if(a>e){if(b>f)return e+=g,f+=h,null==f&&(f=0),null==e&&(e=0),Math.sqrt((e-a)*(e-a)+(f-b)*(f-b));b+=d;e+=g;null==f&&(f=
0);null==e&&(e=0);return Math.sqrt((e-a)*(e-a)+(f-b)*(f-b))}if(b>f)return a+=c,f+=h,null==f&&(f=0),null==e&&(e=0),Math.sqrt((e-a)*(e-a)+(f-b)*(f-b));a+=c;b+=d;null==f&&(f=0);null==e&&(e=0);return Math.sqrt((e-a)*(e-a)+(f-b)*(f-b))};W.distanceRectPoint=function(a,b,c,d,e,f){if(a>=c&&a<=c+e)return b>=d&&b<=d+f?0:b>d?b-(d+f):d-b;if(b>=d&&b<=d+f)return a>c?a-(c+e):c-a;if(a>c){if(b>d)return c+=e,d+=f,null==d&&(d=0),null==c&&(c=0),Math.sqrt((c-a)*(c-a)+(d-b)*(d-b));c+=e;null==d&&(d=0);null==c&&(c=0);return Math.sqrt((c-
a)*(c-a)+(d-b)*(d-b))}if(b>d)return d+=f,null==d&&(d=0),null==c&&(c=0),Math.sqrt((c-a)*(c-a)+(d-b)*(d-b));null==d&&(d=0);null==c&&(c=0);return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))};W.clamp=function(a,b,c){if(c>b)return a<c||(a=c),a>b?a:b;a<b||(a=b);return a>c?a:c};W.clampInRect=function(a,b,c,d,e,f){null==f&&(f=0);a.x=W.clamp(a.x,b+f,b+d-f);a.y=W.clamp(a.y,c+f,c+e-f)};W.scale=function(a,b,c,d,e){return d+(a-b)/(c-b)*(e-d)};W.scaleClamp=function(a,b,c,d,e){a=d+(a-b)/(c-b)*(e-d);if(e>d)return a<e||(a=
e),a>d?a:d;a<d||(a=d);return a>e?a:e};W.indexOf=function(a,b){for(var c=0,d=0;d<a.length;){var e=a[d];++d;if(b==e)return c;++c}return-1};W.next=function(a,b,c){null==c&&(c=!0);return c?b[(W.indexOf(b,a)+1)%b.length]:b[Math.max(W.indexOf(b,a)+1,b.length-1)|0]};W.prev=function(a,b,c){null==c&&(c=!0);return c?b[(W.indexOf(b,a)-1+b.length)%b.length]:b[Math.max(W.indexOf(b,a)-1,0)|0]};W.swap=function(a,b,c){return a==b?c:b};W.getColorRGB=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);return a<<
16|b<<8|c};W.getRed=function(a){return a>>16&255};W.getGreen=function(a){return a>>8&255};W.getBlue=function(a){return a&255};W.convertColor=function(a){return 0>a?a+16777216:a};W.timeFlag=function(){var a=(new Date).getTime()/1E3,b=a-W._time;W._time=a;return b};W.frames=function(a,b,c){null==c&&(c=0);var d=[];++c;if(a<b)for(;a<=b;)d.push(a),a+=c;else for(;a>=b;)d.push(a),a-=c;return d};W.set_time=function(a){W._time=a;return W._time};W.printCallstackIfAvailable=function(){return"\n"+jc.toString(jc.callStack())};
W.printExceptionstackIfAvailable=function(){return"\n"+jc.toString(jc.exceptionStack())};W.saveToSharedObject=function(a,b,c){try{a.data[b]=W.clone(c)}catch(d){if(a=J.caught(d),"deep clone"==a.get_message())Q.fullError("Error: can't save attribute due to recursion [name="+b+"]",a,{fileName:"com/stencyl/utils/Utils.hx",lineNumber:896,className:"com.stencyl.utils.Utils",methodName:"saveToSharedObject"});else throw J.thrown(a);}};W.loadFromSharedObject=function(a,b){return W.cloner.clone(X.field(a.data,
b))};W.flushSharedObject=function(a,b){var c=null;try{c=a.flush()}catch(d){a=J.caught(d);Q.fullError("Error: Failed to flush save file: "+a.get_message(),a,{fileName:"com/stencyl/utils/Utils.hx",lineNumber:950,className:"com.stencyl.utils.Utils",methodName:"flushSharedObject"});null!=b&&b(!1);return}0==c&&null!=b&&b(!0)};W.saveMap=function(a,b,c){b=id.getLocal(b,rd.current.meta.h.localSavePath);for(var d=Object.keys(a.h),e=d.length,f=0;f<e;){var g=d[f++];b.data[g]=a.h[g]}W.flushSharedObject(b,c)};
W.loadMap=function(a,b,c){b=id.getLocal(b,rd.current.meta.h.localSavePath);for(var d=0,e=X.fields(b.data);d<e.length;){var f=e[d];++d;a.h[f]=X.field(b.data,f)}null!=c&&c(!0)};W.convertLegacySharedObject=function(a,b){};W.getFlatName=function(a){a=R.replace(a,"/","_");a=R.replace(a,".","_");return a=R.replace(a,"-","_")};W.getAssetClass=function(a){a="__ASSET__"+W.getFlatName(a);return k[a]};W.getConfigBytes=function(a){return qh.getBytes(W.getFlatName(a))};W.getConfigText=function(a){return qh.getString(W.getFlatName(a))};
W.getConfigBitmap=function(a){try{var b=W.getFlatName(R.replace(a,".png",".txt")),c=qh.getString(b);return La.loadFromBase64(c,"png").then(function(a){return eb.withValue(new dd(a))})}catch(d){return a=J.caught(d),Q.fullError("(You probably have a old browser) Error occurred: "+a.get_message(),a,{fileName:"com/stencyl/utils/Utils.hx",lineNumber:1105,className:"com.stencyl.utils.Utils",methodName:"getConfigBitmap"}),eb.withError("(You probably have a old browser) Error occurred: "+a.get_message())}};
W.loadBytes=function(a){a=Ia.createInstance(W.getAssetClass(a),[]);return ic.ofData(Ab.toArrayBuffer(a))};W.loadText=function(a){a=W.loadBytes(a);return a.getString(0,a.length)};W.loadBitmapData=function(a){a=Fb.fromFile(a);return La.fromImage(a)};W.resetStatics=function(){W.width=0;W.height=0;W.elapsed=0;W.rate=1;W.bounds=null;W.camera=new pa;W._time=0;W._updateTime=0;W._renderTime=0;W._gameTime=0;W._flashTime=0;W._bitmap=new ia;W._seed=0;W._getSeed=0;W._volume=1;W._pan=0;W._soundTransform=new gf;
W.stage=null;W.point=new pa;W.point2=new pa;W.zero=new pa;W.rect=new fa;W.matrix=new wa;W.sprite=new Ya;W.collision=new tc};var Ma=function(){};k["com.stencyl.utils.motion.EasingFunction"]=Ma;Ma.__name__="com.stencyl.utils.motion.EasingFunction";Ma.prototype={apply:function(a){return 0},__class__:Ma};var hl=function(){};k["com.stencyl.utils.motion.BackIn"]=hl;hl.__name__="com.stencyl.utils.motion.BackIn";hl.__super__=Ma;hl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:a*a*(2.70158*
a-1.70158)},__class__:hl});var il=function(){};k["com.stencyl.utils.motion.BackInOut"]=il;il.__name__="com.stencyl.utils.motion.BackInOut";il.__super__=Ma;il.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*a*a*(3.5949095*a-2.5949095):.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)},__class__:il});var jl=function(){};k["com.stencyl.utils.motion.BackOut"]=jl;jl.__name__="com.stencyl.utils.motion.BackOut";jl.__super__=Ma;jl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?
0:1==a?1:--a*a*(2.70158*a+1.70158)+1},__class__:jl});var kl=function(){};k["com.stencyl.utils.motion.BackOutIn"]=kl;kl.__name__="com.stencyl.utils.motion.BackOutIn";kl.__super__=Ma;kl.prototype=u(Ma.prototype,{apply:function(a){if(0==a)return 0;if(1==a)return 1;if(.5>a)return a=2*a-1,.5*(a*a*(2.70158*a+1.70158)+1);a=2*a-1;return.5*a*a*(2.70158*a-1.70158)+.5},__class__:kl});var ll=function(){};k["com.stencyl.utils.motion.BounceIn"]=ll;ll.__name__="com.stencyl.utils.motion.BounceIn";ll.__super__=Ma;
ll.prototype=u(Ma.prototype,{apply:function(a){a=1-a;return.36363636363636365>a?1-7.5625*a*a:.7272727272727273>a?1-(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)},__class__:ll});var ml=function(){};k["com.stencyl.utils.motion.BounceInOut"]=ml;ml.__name__="com.stencyl.utils.motion.BounceInOut";ml.__super__=Ma;ml.prototype=u(Ma.prototype,{apply:function(a){if(.5>a)return a=1-2*a,.36363636363636365>a?.5*
(1-7.5625*a*a):.7272727272727273>a?.5*(1-(7.5625*(a-=.5454545454545454)*a+.75)):.9090909090909091>a?.5*(1-(7.5625*(a-=.8181818181818182)*a+.9375)):.5*(1-(7.5625*(a-=.9545454545454546)*a+.984375));a=2*a-1;return.36363636363636365>a?7.5625*a*a*.5+.5:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5},__class__:ml});var nl=function(){};k["com.stencyl.utils.motion.BounceOut"]=
nl;nl.__name__="com.stencyl.utils.motion.BounceOut";nl.__super__=Ma;nl.prototype=u(Ma.prototype,{apply:function(a){return.36363636363636365>a?7.5625*a*a:.7272727272727273>a?7.5625*(a-=.5454545454545454)*a+.75:.9090909090909091>a?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375},__class__:nl});var ol=function(){};k["com.stencyl.utils.motion.BounceOutIn"]=ol;ol.__name__="com.stencyl.utils.motion.BounceOutIn";ol.__super__=Ma;ol.prototype=u(Ma.prototype,{apply:function(a){if(.5>
a)return.36363636363636365>(a*=2)?3.78125*a*a:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375):.5*(7.5625*(a-=.9545454545454546)*a+.984375);a=1-(2*a-1);return.36363636363636365>a?.5-3.78125*a*a+.5:.7272727272727273>a?.5-.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5-.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5-.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5},__class__:ol});var pl=function(){};k["com.stencyl.utils.motion.CircIn"]=
pl;pl.__name__="com.stencyl.utils.motion.CircIn";pl.__super__=Ma;pl.prototype=u(Ma.prototype,{apply:function(a){return-1>a||1<a?0:1-Math.sqrt(1-a*a)},__class__:pl});var ql=function(){};k["com.stencyl.utils.motion.CircInOut"]=ql;ql.__name__="com.stencyl.utils.motion.CircInOut";ql.__super__=Ma;ql.prototype=u(Ma.prototype,{apply:function(a){return-.5>a||1.5<a?.5:1>(a*=2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},__class__:ql});var rl=function(){};k["com.stencyl.utils.motion.CircOut"]=rl;
rl.__name__="com.stencyl.utils.motion.CircOut";rl.__super__=Ma;rl.prototype=u(Ma.prototype,{apply:function(a){return 0>a||2<a?0:Math.sqrt(a*(2-a))},__class__:rl});var sl=function(){};k["com.stencyl.utils.motion.CircOutIn"]=sl;sl.__name__="com.stencyl.utils.motion.CircOutIn";sl.__super__=Ma;sl.prototype=u(Ma.prototype,{apply:function(a){if(0>a)return 0;if(1<a)return 1;if(.5>a)return a=2*a-1,.5*Math.sqrt(1-a*a);a=2*a-1;return-.5*(Math.sqrt(1-a*a)-1-1)},__class__:sl});var tl=function(){};k["com.stencyl.utils.motion.CubicIn"]=
tl;tl.__name__="com.stencyl.utils.motion.CubicIn";tl.__super__=Ma;tl.prototype=u(Ma.prototype,{apply:function(a){return a*a*a},__class__:tl});var ul=function(){};k["com.stencyl.utils.motion.CubicInOut"]=ul;ul.__name__="com.stencyl.utils.motion.CubicInOut";ul.__super__=Ma;ul.prototype=u(Ma.prototype,{apply:function(a){return 1>(a*=2)?.5*a*a*a:.5*((a-=2)*a*a+2)},__class__:ul});var vl=function(){};k["com.stencyl.utils.motion.CubicOut"]=vl;vl.__name__="com.stencyl.utils.motion.CubicOut";vl.__super__=
Ma;vl.prototype=u(Ma.prototype,{apply:function(a){return--a*a*a+1},__class__:vl});var wl=function(){};k["com.stencyl.utils.motion.CubicOutIn"]=wl;wl.__name__="com.stencyl.utils.motion.CubicOutIn";wl.__super__=Ma;wl.prototype=u(Ma.prototype,{apply:function(a){a=2*a-1;return.5*(a*a*a+1)},__class__:wl});var xl=function(){};k["com.stencyl.utils.motion.ElasticIn"]=xl;xl.__name__="com.stencyl.utils.motion.ElasticIn";xl.__super__=Ma;xl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:-(Math.exp(6.931471805599453*
--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))},__class__:xl});var yl=function(){};k["com.stencyl.utils.motion.ElasticInOut"]=yl;yl.__name__="com.stencyl.utils.motion.ElasticInOut";yl.__super__=Ma;yl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?-.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4):Math.exp(-6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)*.5+1},__class__:yl});var zl=function(){};k["com.stencyl.utils.motion.ElasticOut"]=
zl;zl.__name__="com.stencyl.utils.motion.ElasticOut";zl.__super__=Ma;zl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+1},__class__:zl});var Al=function(){};k["com.stencyl.utils.motion.ElasticOutIn"]=Al;Al.__name__="com.stencyl.utils.motion.ElasticOutIn";Al.__super__=Ma;Al.prototype=u(Ma.prototype,{apply:function(a){if(.5>a)return 0==(a*=2)?0:.5*Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*
(.001*a-7.5E-5)/3E-4)+.5;if(.5==a)return.5;if(1==a)return 1;a=2*a-1;return-(.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))+.5},__class__:Al});var Bl=function(){};k["com.stencyl.utils.motion.ExpoIn"]=Bl;Bl.__name__="com.stencyl.utils.motion.ExpoIn";Bl.__super__=Ma;Bl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:Math.exp(6.931471805599453*(a-1))},__class__:Bl});var Cl=function(){};k["com.stencyl.utils.motion.ExpoInOut"]=Cl;Cl.__name__="com.stencyl.utils.motion.ExpoInOut";
Cl.__super__=Ma;Cl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*(a-1)))},__class__:Cl});var Dl=function(){};k["com.stencyl.utils.motion.ExpoOut"]=Dl;Dl.__name__="com.stencyl.utils.motion.ExpoOut";Dl.__super__=Ma;Dl.prototype=u(Ma.prototype,{apply:function(a){return 1==a?1:1-Math.exp(-6.931471805599453*a)},__class__:Dl});var El=function(){};k["com.stencyl.utils.motion.ExpoOutIn"]=El;El.__name__="com.stencyl.utils.motion.ExpoOutIn";
El.__super__=Ma;El.prototype=u(Ma.prototype,{apply:function(a){return.5>a?.5*(1-Math.exp(-13.862943611198906*a)):.5==a?.5:.5*(Math.exp(13.862943611198906*(a-1))+1)},__class__:El});var Fl=function(){};k["com.stencyl.utils.motion.Linear"]=Fl;Fl.__name__="com.stencyl.utils.motion.Linear";Fl.__super__=Ma;Fl.prototype=u(Ma.prototype,{apply:function(a){return a},__class__:Fl});var Gl=function(){};k["com.stencyl.utils.motion.QuadIn"]=Gl;Gl.__name__="com.stencyl.utils.motion.QuadIn";Gl.__super__=Ma;Gl.prototype=
u(Ma.prototype,{apply:function(a){return a*a},__class__:Gl});var Hl=function(){};k["com.stencyl.utils.motion.QuadInOut"]=Hl;Hl.__name__="com.stencyl.utils.motion.QuadInOut";Hl.__super__=Ma;Hl.prototype=u(Ma.prototype,{apply:function(a){return.5>a?2*a*a:-2*--a*a+1},__class__:Hl});var Il=function(){};k["com.stencyl.utils.motion.QuadOut"]=Il;Il.__name__="com.stencyl.utils.motion.QuadOut";Il.__super__=Ma;Il.prototype=u(Ma.prototype,{apply:function(a){return-a*(a-2)},__class__:Il});var Jl=function(){};
k["com.stencyl.utils.motion.QuadOutIn"]=Jl;Jl.__name__="com.stencyl.utils.motion.QuadOutIn";Jl.__super__=Ma;Jl.prototype=u(Ma.prototype,{apply:function(a){if(.5>a)return-.5*(a*=2)*(a-2);a=2*a-1;return.5*a*a+.5},__class__:Jl});var Kl=function(){};k["com.stencyl.utils.motion.QuartIn"]=Kl;Kl.__name__="com.stencyl.utils.motion.QuartIn";Kl.__super__=Ma;Kl.prototype=u(Ma.prototype,{apply:function(a){return(a*=a)*a},__class__:Kl});var Ll=function(){};k["com.stencyl.utils.motion.QuartInOut"]=Ll;Ll.__name__=
"com.stencyl.utils.motion.QuartInOut";Ll.__super__=Ma;Ll.prototype=u(Ma.prototype,{apply:function(a){if(1>(a*=2))return.5*(a*=a)*a;a*=a-=2;return-.5*(a*a-2)},__class__:Ll});var Ml=function(){};k["com.stencyl.utils.motion.QuartOut"]=Ml;Ml.__name__="com.stencyl.utils.motion.QuartOut";Ml.__super__=Ma;Ml.prototype=u(Ma.prototype,{apply:function(a){a*=--a;return 1-a*a},__class__:Ml});var Nl=function(){};k["com.stencyl.utils.motion.QuartOutIn"]=Nl;Nl.__name__="com.stencyl.utils.motion.QuartOutIn";Nl.__super__=
Ma;Nl.prototype=u(Ma.prototype,{apply:function(a){if(.5>a)return a=2*a-1,-.5*(a*=a)*a+.5;a=2*a-1;return.5*(a*=a)*a+.5},__class__:Nl});var Ol=function(){};k["com.stencyl.utils.motion.QuintIn"]=Ol;Ol.__name__="com.stencyl.utils.motion.QuintIn";Ol.__super__=Ma;Ol.prototype=u(Ma.prototype,{apply:function(a){return a*(a*=a)*a},__class__:Ol});var Pl=function(){};k["com.stencyl.utils.motion.QuintInOut"]=Pl;Pl.__name__="com.stencyl.utils.motion.QuintInOut";Pl.__super__=Ma;Pl.prototype=u(Ma.prototype,{apply:function(a){return 1>
(a*=2)?.5*a*(a*=a)*a:.5*(a-=2)*(a*=a)*a+1},__class__:Pl});var Ql=function(){};k["com.stencyl.utils.motion.QuintOut"]=Ql;Ql.__name__="com.stencyl.utils.motion.QuintOut";Ql.__super__=Ma;Ql.prototype=u(Ma.prototype,{apply:function(a){return--a*(a*=a)*a+1},__class__:Ql});var Rl=function(){};k["com.stencyl.utils.motion.QuintOutIn"]=Rl;Rl.__name__="com.stencyl.utils.motion.QuintOutIn";Rl.__super__=Ma;Rl.prototype=u(Ma.prototype,{apply:function(a){a=2*a-1;return.5*(a*(a*=a)*a+1)},__class__:Rl});var Sl=function(){};
k["com.stencyl.utils.motion.SineIn"]=Sl;Sl.__name__="com.stencyl.utils.motion.SineIn";Sl.__super__=Ma;Sl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:1-Math.cos(1.5707963267948966*a)},__class__:Sl});var Tl=function(){};k["com.stencyl.utils.motion.SineInOut"]=Tl;Tl.__name__="com.stencyl.utils.motion.SineInOut";Tl.__super__=Ma;Tl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:-.5*(Math.cos(3.141592653589793*a)-1)},__class__:Tl});var Ul=function(){};k["com.stencyl.utils.motion.SineOut"]=
Ul;Ul.__name__="com.stencyl.utils.motion.SineOut";Ul.__super__=Ma;Ul.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:Math.sin(1.5707963267948966*a)},__class__:Ul});var Vl=function(){};k["com.stencyl.utils.motion.SineOutIn"]=Vl;Vl.__name__="com.stencyl.utils.motion.SineOutIn";Vl.__super__=Ma;Vl.prototype=u(Ma.prototype,{apply:function(a){return 0==a?0:1==a?1:.5>a?.5*Math.sin(3.141592653589793*a):-.5*Math.cos(1.5707963267948966*(2*a-1))+1},__class__:Vl});var Wl=function(){};k["com.stencyl.utils.motion.WarpIn"]=
Wl;Wl.__name__="com.stencyl.utils.motion.WarpIn";Wl.__super__=Ma;Wl.prototype=u(Ma.prototype,{apply:function(a){return 1>a?0:1},__class__:Wl});var Xl=function(){};k["com.stencyl.utils.motion.WarpInOut"]=Xl;Xl.__name__="com.stencyl.utils.motion.WarpInOut";Xl.__super__=Ma;Xl.prototype=u(Ma.prototype,{apply:function(a){return.5>a?0:1},__class__:Xl});var Yl=function(){};k["com.stencyl.utils.motion.WarpOut"]=Yl;Yl.__name__="com.stencyl.utils.motion.WarpOut";Yl.__super__=Ma;Yl.prototype=u(Ma.prototype,
{apply:function(a){return 0>=a?0:1},__class__:Yl});var Zl=function(){};k["com.stencyl.utils.motion.WarpOutIn"]=Zl;Zl.__name__="com.stencyl.utils.motion.WarpOutIn";Zl.__super__=Ma;Zl.prototype=u(Ma.prototype,{apply:function(a){return 0>=a?0:1>a?.5:1},__class__:Zl});var pb=function(){};k["com.stencyl.utils.motion.Easing"]=pb;pb.__name__="com.stencyl.utils.motion.Easing";var Oh=function(){};k["com.stencyl.utils.motion.EasingConstants"]=Oh;Oh.__name__="com.stencyl.utils.motion.EasingConstants";var hg=
function(){this.paused=this.finished=this.active=!1};k["com.stencyl.utils.motion.TweenObject"]=hg;hg.__name__="com.stencyl.utils.motion.TweenObject";hg.prototype={easing:null,time:null,duration:null,active:null,paused:null,updated:null,finished:null,onUpdate:null,onComplete:null,_tween:function(a,b){null==a&&(a=pb.linear);this.easing=a;this.duration=b;this.active||vb.markActive(this);this.time=0;this.active=!0;this.paused=this.finished=this.updated=!1;0==b&&(this.duration=1,vb.finish(this))},update:function(a){if(!this.paused)if(this.time+=
a,this.time>this.duration&&(this.time=this.duration),this.updateValue(),this.updated=!0,this.time==this.duration){this.active=!1;this.finished=!0;if(null!=this.onUpdate)this.onUpdate();if(null!=this.onComplete)this.onComplete()}else if(null!=this.onUpdate)this.onUpdate()},updateValue:function(){},doOnUpdate:function(a){this.onUpdate=a;return this},doOnComplete:function(a){this.onComplete=a;return this},__class__:hg};var we=function(){hg.call(this)};k["com.stencyl.utils.motion.TweenFloat"]=we;we.__name__=
"com.stencyl.utils.motion.TweenFloat";we.__super__=hg;we.prototype=u(hg.prototype,{startValue:null,endValue:null,value:null,tween:function(a,b,c,d){this.startValue=a;this.endValue=b;this.value=a;this._tween(c,d);return this},updateValue:function(){var a=this.easing.apply(this.time/this.duration);this.value=this.startValue*(1-a)+this.endValue*a},__class__:we});var Lf=function(){hg.call(this)};k["com.stencyl.utils.motion.TweenFloat2"]=Lf;Lf.__name__="com.stencyl.utils.motion.TweenFloat2";Lf.__super__=
hg;Lf.prototype=u(hg.prototype,{startValue1:null,endValue1:null,value1:null,startValue2:null,endValue2:null,value2:null,tween:function(a,b,c,d,e,f){this.startValue1=a;this.endValue1=b;this.value1=a;this.startValue2=c;this.endValue2=d;this.value2=c;this._tween(e,f);return this},updateValue:function(){var a=this.easing.apply(this.time/this.duration);this.value1=this.startValue1*(1-a)+this.endValue1*a;this.value2=this.startValue2*(1-a)+this.endValue2*a},__class__:Lf});var vb=function(){};k["com.stencyl.utils.motion.TweenManager"]=
vb;vb.__name__="com.stencyl.utils.motion.TweenManager";vb.resetStatics=function(){vb.activeObjects=[];vb.finishedObjects=[]};vb.markActive=function(a){vb.activeObjects.push(a)};vb.cancel=function(a){var b=vb.activeObjects.indexOf(a);-1!=b&&(a.active=!1,a.updated=!1,a.finished=!1,a.paused=!1,vb.activeObjects[b]=vb.activeObjects[vb.activeObjects.length-1],vb.activeObjects.pop())};vb.finish=function(a){var b=vb.activeObjects.indexOf(a);-1!=b&&(a.update(a.duration-a.time),vb.activeObjects[b]=vb.activeObjects[vb.activeObjects.length-
1],vb.activeObjects.pop(),vb.finishedObjects.push(a))};vb.update=function(a){for(var b=vb.finishedObjects.length;0<b--;)vb.finishedObjects.pop().updated=!1;for(b=vb.activeObjects.length;0<b--;){var c=vb.activeObjects[b];c.update(a);c.finished&&(vb.activeObjects[b]=vb.activeObjects[vb.activeObjects.length-1],vb.activeObjects.pop(),vb.finishedObjects.push(c))}};vb.timer=function(a){return(new $l).tween(a)};var $l=function(){hg.call(this)};k["com.stencyl.utils.motion.TweenTimer"]=$l;$l.__name__="com.stencyl.utils.motion.TweenTimer";
$l.__super__=hg;$l.prototype=u(hg.prototype,{tween:function(a){this._tween(pb.linear,a);return this},updateValue:function(){},__class__:$l});var ig=x["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:null,CFunction:{_hx_name:"CFunction",_hx_index:0,__enum__:"haxe.StackItem",toString:v},Module:(C=function(a){return{_hx_index:1,m:a,__enum__:"haxe.StackItem",toString:v}},C._hx_name="Module",C.__params__=["m"],C),FilePos:(C=function(a,b,c,d){return{_hx_index:2,s:a,file:b,line:c,column:d,__enum__:"haxe.StackItem",
toString:v}},C._hx_name="FilePos",C.__params__=["s","file","line","column"],C),Method:(C=function(a,b){return{_hx_index:3,classname:a,method:b,__enum__:"haxe.StackItem",toString:v}},C._hx_name="Method",C.__params__=["classname","method"],C),LocalFunction:(C=function(a){return{_hx_index:4,v:a,__enum__:"haxe.StackItem",toString:v}},C._hx_name="LocalFunction",C.__params__=["v"],C)};ig.__constructs__=[ig.CFunction,ig.Module,ig.FilePos,ig.Method,ig.LocalFunction];var jc={callStack:function(){return xb.toHaxe(xb.callStack())},
exceptionStack:function(a){null==a&&(a=!1);var b=xb.toHaxe(xb.exceptionStack());return a?b:jc.subtract(b,jc.callStack())},toString:function(a){for(var b=new Wa,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";jc.itemToString(b,d)}return b.b},subtract:function(a,b){for(var c=-1,d=-1;++d<a.length;){for(var e=0,f=b.length;e<f;){var g=e++;if(jc.equalItems(a[d],b[g])){if(0>c&&(c=d),++d,d>=a.length)break}else c=-1}if(0<=c)break}return 0<=c?a.slice(0,c):a},equalItems:function(a,b){if(null==a)return null==
b?!0:!1;switch(a._hx_index){case 0:return null==b?!1:0==b._hx_index?!0:!1;case 1:return null==b?!1:1==b._hx_index?a.m==b.m:!1;case 2:if(null==b)return!1;if(2==b._hx_index){var c=b.s,d=b.line,e=b.column,f=a.column,g=a.line,h=a.s;return a.file==b.file&&g==d&&f==e?jc.equalItems(h,c):!1}return!1;case 3:return null==b?!1:3==b._hx_index?(c=b.method,d=a.method,a.classname==b.classname?d==c:!1):!1;case 4:return null==b?!1:4==b._hx_index?a.v==b.v:!1}},itemToString:function(a,b){switch(b._hx_index){case 0:a.b+=
"a C function";break;case 1:b=b.m;a.b+="module ";a.b+=null==b?"null":""+b;break;case 2:var c=b.s,d=b.file,e=b.line;b=b.column;null!=c&&(jc.itemToString(a,c),a.b+=" (");a.b+=null==d?"null":""+d;a.b+=" line ";a.b+=null==e?"null":""+e;null!=b&&(a.b+=" column ",a.b+=null==b?"null":""+b);null!=c&&(a.b+=")");break;case 3:c=b.classname;b=b.method;a.b+=A.string(null==c?"<unknown>":c);a.b+=".";a.b+=null==b?"null":""+b;break;case 4:b=b.v,a.b+="local function #",a.b+=null==b?"null":""+b}}},J=function(a,b,c){Error.call(this,
a);this.message=a;this.__previousException=b;this.__nativeException=null!=c?c:this;this.__skipStack=0;a=Error.prepareStackTrace;Error.prepareStackTrace=function(a){return a.stack};if(c instanceof Error)this.stack=c.stack;else{c=null;if(Error.captureStackTrace)Error.captureStackTrace(this,J),c=this;else if(c=Error(),"undefined"==typeof c.stack){try{throw c;}catch(d){}this.__skipStack++}this.stack=c.stack}Error.prepareStackTrace=a};k["haxe.Exception"]=J;J.__name__="haxe.Exception";J.caught=function(a){return a instanceof
J?a:a instanceof Error?new J(a.message,null,a):new Fj(a,null,a)};J.thrown=function(a){if(a instanceof J)return a.get_native();if(a instanceof Error)return a;a=new Fj(a);a.__skipStack++;return a};J.__super__=Error;J.prototype=u(Error.prototype,{__skipStack:null,__nativeException:null,__previousException:null,unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},details:function(){if(null==this.get_previous()){var a="Exception: "+this.toString(),b=this.get_stack();
return a+(null==b?"null":jc.toString(b))}b="";var c=this;for(a=null;null!=c;){if(null==a){var d="Exception: "+c.get_message();a=c.get_stack();b=d+(null==a?"null":jc.toString(a))+b}else a=jc.subtract(c.get_stack(),a.get_stack()),b="Exception: "+c.get_message()+(null==a?"null":jc.toString(a))+"\n\nNext "+b;a=c;c=c.get_previous()}return b},__shiftStack:function(){this.__skipStack++},get_message:function(){return this.message},get_previous:function(){return this.__previousException},get_native:function(){return this.__nativeException},
get_stack:function(){var a=this.__exceptionStack;null==a&&(a=xb.toHaxe(xb.normalize(this.stack),this.__skipStack),this.setProperty("__exceptionStack",a));return a},setProperty:function(a,b){try{Object.defineProperty(this,a,{value:b})}catch(c){this[a]=b}},__class__:J,__properties__:{get_native:"get_native",get_previous:"get_previous",get_stack:"get_stack",get_message:"get_message"}});var lo={ucompare:function(a,b){return 0>a?0>b?~b-~a|0:1:0>b?-1:a-b|0}},bs={toString:function(a){var b=a;if(0==b.high&&
0==b.low)return"0";var c="",d=!1;0>b.high&&(d=!0);for(var e=a=new Ua(0,10);0!=b.high||0!=b.low;)if(a=bs.divMod(b,e),0>a.modulus.high){var f=a.modulus;b=~f.high;f=~f.low+1|0;0==f&&b++;c=f+c;b=a.quotient;a=~b.high;b=~b.low+1|0;0==b&&(a++,a|=0);b=a=new Ua(a,b)}else c=a.modulus.low+c,b=a.quotient;d&&(c="-"+c);return c},divMod:function(a,b){if(0==b.high)switch(b.low){case 0:throw J.thrown("divide by zero");case 1:var c=new Ua(a.high,a.low),d=new Ua(0,0);return{quotient:c,modulus:d}}var e=0>a.high!=0>b.high;
if(0>a.high){var f=~a.high;c=~a.low+1|0;0==c&&(f++,f|=0);c=new Ua(f,c)}else c=new Ua(a.high,a.low);var g=c;0>b.high&&(f=~b.high,c=~b.low+1|0,0==c&&(f++,f|=0),b=c=new Ua(f,c));for(var h=c=new Ua(0,0),m=c=new Ua(0,1);!(0>b.high||(f=lo.ucompare(b.high,g.high),f=0!=f?f:lo.ucompare(b.low,g.low),c=1,c&=63,b=0==c?c=new Ua(b.high,b.low):32>c?d=new Ua(b.high<<c|b.low>>>32-c,b.low<<c):c=new Ua(b.low<<c-32,0),c=1,c&=63,m=0==c?new Ua(m.high,m.low):32>c?new Ua(m.high<<c|m.low>>>32-c,m.low<<c):c=new Ua(m.low<<
c-32,0),0<=f)););for(;0!=m.high||0!=m.low;)f=lo.ucompare(g.high,b.high),0<=(0!=f?f:lo.ucompare(g.low,b.low))&&(h=c=new Ua(h.high|m.high,h.low|m.low),f=g.high-b.high|0,c=g.low-b.low|0,0>lo.ucompare(g.low,b.low)&&(f--,f|=0),g=d=new Ua(f,c)),c=1,c&=63,m=0==c?c=new Ua(m.high,m.low):32>c?new Ua(m.high>>>c,m.high<<32-c|m.low>>>c):new Ua(0,m.high>>>c-32),c=1,c&=63,b=0==c?c=new Ua(b.high,b.low):32>c?new Ua(b.high>>>c,b.high<<32-c|b.low>>>c):new Ua(0,b.high>>>c-32);e&&(f=~h.high,c=~h.low+1|0,0==c&&(f++,f|=
0),h=c=new Ua(f,c));0>a.high&&(f=~g.high,c=~g.low+1|0,0==c&&(f++,f|=0),g=c=new Ua(f,c));return{quotient:h,modulus:g}}},Ua=function(a,b){this.high=a;this.low=b};k["haxe._Int64.___Int64"]=Ua;Ua.__name__="haxe._Int64.___Int64";Ua.prototype={high:null,low:null,__class__:Ua};var mf=function(){};k["haxe.Log"]=mf;mf.__name__="haxe.Log";mf.formatOutput=function(a,b){var c=A.string(a);if(null==b)return c;var d=b.fileName+":"+b.lineNumber;if(null!=b.customParams){var e=0;for(b=b.customParams;e<b.length;)a=
b[e],++e,c+=", "+A.string(a)}return d+": "+c};mf.trace=function(a,b){a=mf.formatOutput(a,b);"undefined"!=typeof console&&null!=console.log&&console.log(a)};var xb=function(){};k["haxe.NativeStackTrace"]=xb;xb.__name__="haxe.NativeStackTrace";xb.saveStack=function(a){xb.lastError=a};xb.callStack=function(){var a=Error(""),b=xb.tryHaxeStack(a);if("undefined"==typeof b){try{throw a;}catch(c){}b=a.stack}return xb.normalize(b,2)};xb.exceptionStack=function(){return xb.normalize(xb.tryHaxeStack(xb.lastError))};
xb.toHaxe=function(a,b){null==b&&(b=0);if(null==a)return[];if("string"==typeof a){a=a.split("\n");"Error"==a[0]&&a.shift();for(var c=[],d=0,e=a.length;d<e;){var f=d++;if(!(b>f)){var g=a[f];f=g.match(/^    at ([A-Za-z0-9_. ]+) \(([^)]+):([0-9]+):([0-9]+)\)$/);if(null!=f){g=f[1].split(".");"$hxClasses"==g[0]&&g.shift();var h=g.pop(),m=f[2],l=A.parseInt(f[3]);f=A.parseInt(f[4]);c.push(ig.FilePos("Anonymous function"==h?ig.LocalFunction():"Global code"==h?null:ig.Method(g.join("."),h),m,l,f))}else c.push(ig.Module(R.trim(g)))}}return c}return 0<
b&&Array.isArray(a)?a.slice(b):a};xb.tryHaxeStack=function(a){if(null==a)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=xb.prepareHxStackTrace;a=a.stack;Error.prepareStackTrace=b;return a};xb.prepareHxStackTrace=function(a,b){a=[];for(var c=0;c<b.length;){var d=b[c];++c;null!=xb.wrapCallSite&&(d=xb.wrapCallSite(d));var e=null,f=d.getFunctionName();if(null!=f){var g=f.lastIndexOf(".");0<=g?(e=f.substring(0,g),f=f.substring(g+1),e=ig.Method(e,f)):e=ig.Method(null,f)}f=d.getFileName();
g=null==f?-1:f.indexOf("file:");null!=xb.wrapCallSite&&0<g&&(f=f.substring(g+6));a.push(ig.FilePos(e,f,d.getLineNumber(),d.getColumnNumber()))}return a};xb.normalize=function(a,b){null==b&&(b=0);if(Array.isArray(a)&&0<b)return a.slice(b);if("string"==typeof a){switch(a.substring(0,6)){case "Error\n":case "Error:":++b}return xb.skipLines(a,b)}return a};xb.skipLines=function(a,b,c){null==c&&(c=0);return 0<b?(c=a.indexOf("\n",c),0>c?"":xb.skipLines(a,--b,c+1)):a.substring(c)};var qh=function(){};k["haxe.Resource"]=
qh;qh.__name__="haxe.Resource";qh.getString=function(a){for(var b=0,c=qh.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?d.str:rh.decode(d.data).toString()}return null};qh.getBytes=function(a){for(var b=0,c=qh.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?ib.ofString(d.str):rh.decode(d.data)}return null};var ye=function(){this.buf=new Wa;this.cache=[];this.useCache=ye.USE_CACHE;this.useEnumIndex=ye.USE_ENUM_INDEX;this.shash=new ia;this.scount=0};k["haxe.Serializer"]=
ye;ye.__name__="haxe.Serializer";ye.run=function(a){var b=new ye;b.serialize(a);return b.toString()};ye.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(a){var b=this.shash.h[a];null!=b?(this.buf.b+="R",this.buf.b+=null==b?"null":""+b):(this.shash.h[a]=this.scount++,this.buf.b+="y",a=encodeURIComponent(a),this.buf.b+=A.string(a.length),this.buf.b+=":",this.buf.b+=null==a?"null":""+a)},serializeRef:function(a){for(var b=
typeof a,c=0,d=this.cache.length;c<d;){var e=c++,f=this.cache[e];if(typeof f==b&&f==a)return this.buf.b+="r",this.buf.b+=null==e?"null":""+e,!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=0,c=X.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(X.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=Ia.typeof(a);switch(b._hx_index){case 0:this.buf.b+="n";break;case 1:if(0==a){this.buf.b+="z";break}this.buf.b+="i";this.buf.b+=null==a?"null":""+a;
break;case 2:isNaN(a)?this.buf.b+="k":isFinite(a)?(this.buf.b+="d",this.buf.b+=null==a?"null":""+a):this.buf.b+=0>a?"m":"p";break;case 3:this.buf.b+=a?"t":"f";break;case 4:U.__instanceof(a,cr)?(a=a.__name__,this.buf.b+="A",this.serializeString(a)):U.__instanceof(a,cs)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+="o",this.serializeFields(a));break;case 5:throw J.thrown("Cannot serialize function");case 6:b=b.c;if(b==String){this.serializeString(a);
break}if(this.useCache&&this.serializeRef(a))break;switch(b){case Array:var c=0;this.buf.b+="a";for(var d=0,e=a.length;d<e;)b=d++,null==a[b]?++c:(0<c&&(1==c?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==c?"null":""+c),c=0),this.serialize(a[b]));0<c&&(1==c?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==c?"null":""+c));this.buf.b+="h";break;case Date:this.buf.b+="v";this.buf.b+=A.string(a.getTime());break;case Xa:this.buf.b+="q";for(b=a.keys();b.hasNext();)c=b.next(),this.buf.b+=":",this.buf.b+=
null==c?"null":""+c,this.serialize(a.h[c]);this.buf.b+="h";break;case Dc:this.buf.b+="l";for(a=a.h;null!=a;)b=a.item,a=a.next,this.serialize(b);this.buf.b+="h";break;case Vb:this.buf.b+="M";for(b=a.keys();b.hasNext();){c=b.next();var f=X.field(c,"__id__");X.deleteField(c,"__id__");this.serialize(c);c.__id__=f;this.serialize(a.h[c.__id__])}this.buf.b+="h";break;case ia:this.buf.b+="b";c=Object.keys(a.h);f=c.length;for(d=0;d<f;)b=c[d++],this.serializeString(b),this.serialize(a.h[b]);this.buf.b+="h";
break;case ib:this.buf.b+="s";this.buf.b+=A.string(Math.ceil(8*a.length/6));this.buf.b+=":";b=0;c=a.length-2;f=ye.BASE64_CODES;if(null==f){f=Array(ye.BASE64.length);d=0;for(e=ye.BASE64.length;d<e;){var g=d++;f[g]=I.cca(ye.BASE64,g)}ye.BASE64_CODES=f}for(;b<c;)d=a.b[b++],e=a.b[b++],g=a.b[b++],this.buf.b+=String.fromCodePoint(f[d>>2]),this.buf.b+=String.fromCodePoint(f[(d<<4|e>>4)&63]),this.buf.b+=String.fromCodePoint(f[(e<<2|g>>6)&63]),this.buf.b+=String.fromCodePoint(f[g&63]);b==c?(d=a.b[b++],e=a.b[b++],
this.buf.b+=String.fromCodePoint(f[d>>2]),this.buf.b+=String.fromCodePoint(f[(d<<4|e>>4)&63]),this.buf.b+=String.fromCodePoint(f[e<<2&63])):b==c+1&&(d=a.b[b++],this.buf.b+=String.fromCodePoint(f[d>>2]),this.buf.b+=String.fromCodePoint(f[d<<4&63]));break;default:this.useCache&&this.cache.pop(),null!=a.hxSerialize?(this.buf.b+="C",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),a.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),
this.serializeFields(a))}break;case 7:b=b.e;if(this.useCache){if(this.serializeRef(a))break;this.cache.pop()}this.buf.b+=A.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=":",this.buf.b+=A.string(a._hx_index)):(b=a,this.serializeString(x[b.__enum__].__constructs__[b._hx_index]._hx_name));this.buf.b+=":";c=Ia.enumParameters(a);this.buf.b+=A.string(c.length);for(b=0;b<c.length;)f=c[b],++b,this.serialize(f);this.useCache&&this.cache.push(a);break;default:throw J.thrown("Cannot serialize "+
A.string(a));}},__class__:ye};var Oe=function(a){var b=this;this.id=setInterval(function(){b.run()},a)};k["haxe.Timer"]=Oe;Oe.__name__="haxe.Timer";Oe.delay=function(a,b){var c=new Oe(b);c.run=function(){c.stop();a()};return c};Oe.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();mf.trace((new Date).getTime()/1E3-c+"s",b);return a};Oe.stamp=function(){return(new Date).getTime()/1E3};Oe.prototype={id:null,stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},
__class__:Oe};var am=function(){};k["haxe._Unserializer.DefaultResolver"]=am;am.__name__="haxe._Unserializer.DefaultResolver";am.prototype={resolveClass:function(a){return k[a]},resolveEnum:function(a){return x[a]},__class__:am};var Fe=function(a){this.buf=a;this.length=this.buf.length;this.pos=0;this.scache=[];this.cache=[];a=Fe.DEFAULT_RESOLVER;null==a&&(a=new am,Fe.DEFAULT_RESOLVER=a);this.resolver=a};k["haxe.Unserializer"]=Fe;Fe.__name__="haxe.Unserializer";Fe.initCodes=function(){for(var a=[],
b=0,c=Fe.BASE64.length;b<c;){var d=b++;a[Fe.BASE64.charCodeAt(d)]=d}return a};Fe.run=function(a){return(new Fe(a)).unserialize()};Fe.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){null==a?(null==zi.instance&&(zi.instance=new zi),this.resolver=zi.instance):this.resolver=a},readDigits:function(){for(var a=0,b=!1,c=this.pos;;){var d=this.buf.charCodeAt(this.pos);if(d!=d)break;if(45==d){if(this.pos!=c)break;b=!0}else{if(48>d||57<d)break;a=10*a+(d-
48)}this.pos++}b&&(a*=-1);return a},readFloat:function(){for(var a=this.pos;;){var b=this.buf.charCodeAt(this.pos);if(b!=b)break;if(43<=b&&58>b||101==b||69==b)this.pos++;else break}return parseFloat(I.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw J.thrown("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var b=this.unserialize();if("string"!=typeof b)throw J.thrown("Invalid object key");var c=this.unserialize();a[b]=c}this.pos++},
unserializeEnum:function(a,b){if(58!=this.buf.charCodeAt(this.pos++))throw J.thrown("Invalid enum format");var c=this.readDigits();if(0==c)return Ia.createEnum(a,b);for(var d=[];0<c--;)d.push(this.unserialize());return Ia.createEnum(a,b,d)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var a=this.unserialize(),b=this.resolver.resolveClass(a);if(null==b)throw J.thrown("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw J.thrown("Enum not found "+
a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw J.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);b.hxUnserialize(this);if(103!=this.buf.charCodeAt(this.pos++))throw J.thrown("Invalid custom data");return b;case 77:a=new Vb;this.cache.push(a);for(var c;104!=this.buf.charCodeAt(this.pos);)b=this.unserialize(),a.set(b,this.unserialize());this.pos++;return a;case 82:a=this.readDigits();if(0>a||a>=this.scache.length)throw J.thrown("Invalid string reference");
return this.scache[a];case 97:b=[];for(this.cache.push(b);;){c=this.buf.charCodeAt(this.pos);if(104==c){this.pos++;break}117==c?(this.pos++,a=this.readDigits(),b[b.length+a-1]=null):b.push(this.unserialize())}return b;case 98:a=new ia;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)b=this.unserialize(),c=this.unserialize(),a.h[b]=c;this.pos++;return a;case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw J.thrown("Class not found "+a);b=Object.create(b.prototype);
this.cache.push(b);this.unserializeObject(b);return b;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:a=this.unserialize();c=this.resolver.resolveEnum(a);if(null==c)throw J.thrown("Enum not found "+a);this.pos++;for(var d=this.readDigits(),e=c.__constructs__,f=Array(e.length),g=0,h=e.length;g<h;)b=g++,f[b]=e[b]._hx_name;b=f[d];if(null==b)throw J.thrown("Unknown enum index "+a+"@"+d);b=this.unserializeEnum(c,b);this.cache.push(b);return b;case 107:return NaN;
case 108:b=new Dc;for(this.cache.push(b);104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());this.pos++;return b;case 109:return-Infinity;case 110:return null;case 111:return b={},this.cache.push(b),this.unserializeObject(b),b;case 112:return Infinity;case 113:a=new Xa;this.cache.push(a);for(c=this.buf.charCodeAt(this.pos++);58==c;)b=this.readDigits(),c=this.unserialize(),a.h[b]=c,c=this.buf.charCodeAt(this.pos++);if(104!=c)throw J.thrown("Invalid IntMap format");return a;case 114:a=this.readDigits();
if(0>a||a>=this.cache.length)throw J.thrown("Invalid reference");return this.cache[a];case 115:a=this.readDigits();c=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw J.thrown("Invalid bytes length");d=Fe.CODES;null==d&&(d=Fe.initCodes(),Fe.CODES=d);b=this.pos;e=a&3;f=b+(a-e);g=new ib(new ArrayBuffer(3*(a>>2)+(2<=e?e-1:0)));for(h=0;b<f;){var m=d[c.charCodeAt(b++)],l=d[c.charCodeAt(b++)];g.b[h++]=(m<<2|l>>4)&255;m=d[c.charCodeAt(b++)];g.b[h++]=(l<<4|m>>2)&255;l=d[c.charCodeAt(b++)];
g.b[h++]=(m<<6|l)&255}2<=e&&(m=d[c.charCodeAt(b++)],l=d[c.charCodeAt(b++)],g.b[h++]=(m<<2|l>>4)&255,3==e&&(m=d[c.charCodeAt(b++)],g.b[h++]=(l<<4|m>>2)&255));this.pos+=a;this.cache.push(g);return g;case 116:return!0;case 118:return 48<=this.buf.charCodeAt(this.pos)&&57>=this.buf.charCodeAt(this.pos)&&48<=this.buf.charCodeAt(this.pos+1)&&57>=this.buf.charCodeAt(this.pos+1)&&48<=this.buf.charCodeAt(this.pos+2)&&57>=this.buf.charCodeAt(this.pos+2)&&48<=this.buf.charCodeAt(this.pos+3)&&57>=this.buf.charCodeAt(this.pos+
3)&&45==this.buf.charCodeAt(this.pos+4)?(b=I.strDate(I.substr(this.buf,this.pos,19)),this.pos+=19):b=new Date(this.readFloat()),this.cache.push(b),b;case 119:a=this.unserialize();c=this.resolver.resolveEnum(a);if(null==c)throw J.thrown("Enum not found "+a);b=this.unserializeEnum(c,this.unserialize());this.cache.push(b);return b;case 120:throw J.thrown(this.unserialize());case 121:a=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw J.thrown("Invalid string length");
b=I.substr(this.buf,this.pos,a);this.pos+=a;b=decodeURIComponent(b.split("+").join(" "));this.scache.push(b);return b;case 122:return 0}this.pos--;throw J.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Fe};var zi=function(){};k["haxe._Unserializer.NullResolver"]=zi;zi.__name__="haxe._Unserializer.NullResolver";zi.prototype={resolveClass:function(a){return null},resolveEnum:function(a){return null},__class__:zi};var Fj=function(a,b,c){J.call(this,String(a),b,
c);this.value=a;this.__skipStack++};k["haxe.ValueException"]=Fj;Fj.__name__="haxe.ValueException";Fj.__super__=J;Fj.prototype=u(J.prototype,{value:null,unwrap:function(){return this.value},__class__:Fj});var Ai=function(){this.a1=1;this.a2=0};k["haxe.crypto.Adler32"]=Ai;Ai.__name__="haxe.crypto.Adler32";Ai.read=function(a){var b=new Ai,c=a.readByte(),d=a.readByte(),e=a.readByte();a=a.readByte();b.a1=e<<8|a;b.a2=c<<8|d;return b};Ai.prototype={a1:null,a2:null,update:function(a,b,c){var d=this.a1,e=
this.a2,f=b;for(b+=c;f<b;)c=f++,d=(d+a.b[c])%65521,e=(e+d)%65521;this.a1=d;this.a2=e},equals:function(a){return a.a1==this.a1?a.a2==this.a2:!1},__class__:Ai};var ib=function(a){this.length=a.byteLength;this.b=new Uint8Array(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};k["haxe.io.Bytes"]=ib;ib.__name__="haxe.io.Bytes";ib.alloc=function(a){return new ib(new ArrayBuffer(a))};ib.ofString=function(a,b){b=[];for(var c=0;c<a.length;){var d=a.charCodeAt(c++);55296<=d&&56319>=d&&(d=d-55232<<10|a.charCodeAt(c++)&
1023);127>=d?b.push(d):(2047>=d?b.push(192|d>>6):(65535>=d?b.push(224|d>>12):(b.push(240|d>>18),b.push(128|d>>12&63)),b.push(128|d>>6&63)),b.push(128|d&63))}return new ib((new Uint8Array(b)).buffer)};ib.ofData=function(a){var b=a.hxBytes;return null!=b?b:new ib(a)};ib.ofHex=function(a){if(0!=(a.length&1))throw J.thrown("Not a hex string (odd number of digits)");for(var b=[],c=0,d=a.length>>1;c<d;){var e=a.charCodeAt(2*c),f=a.charCodeAt(2*c+1);e=(e&15)+9*((e&64)>>6);f=(f&15)+9*((f&64)>>6);b.push((e<<
4|f)&255);++c}return new ib((new Uint8Array(b)).buffer)};ib.fastGet=function(a,b){return a.bytes[b]};ib.prototype={length:null,b:null,data:null,get:function(a){return this.b[a]},set:function(a,b){this.b[a]=b&255},blit:function(a,b,c,d){if(0>a||0>c||0>d||a+d>this.length||c+d>b.length)throw J.thrown(Of.OutsideBounds);0==c&&d==b.b.byteLength?this.b.set(b.b,a):this.b.set(b.b.subarray(c,c+d),a)},fill:function(a,b,c){for(var d=0;d<b;)d++,this.b[a++]=c&255},sub:function(a,b){if(0>a||0>b||a+b>this.length)throw J.thrown(Of.OutsideBounds);
return new ib(this.b.buffer.slice(a+this.b.byteOffset,a+this.b.byteOffset+b))},compare:function(a){for(var b=this.b,c=a.b,d=0,e=this.length<a.length?this.length:a.length;d<e;){var f=d++;if(b[f]!=c[f])return b[f]-c[f]}return this.length-a.length},initData:function(){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength))},getDouble:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat64(a,
!0)},getFloat:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat32(a,!0)},setDouble:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat64(a,b,!0)},setFloat:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat32(a,b,!0)},getUInt16:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,
this.b.byteOffset,this.b.byteLength));return this.data.getUint16(a,!0)},setUInt16:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setUint16(a,b,!0)},getInt32:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getInt32(a,!0)},setInt32:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setInt32(a,
b,!0)},getInt64:function(a){return new Ua(this.getInt32(a+4),this.getInt32(a))},setInt64:function(a,b){this.setInt32(a,b.low);this.setInt32(a+4,b.high)},getString:function(a,b,c){if(0>a||0>b||a+b>this.length)throw J.thrown(Of.OutsideBounds);c="";var d=this.b,e=ma.fromCharCode,f=a;for(a+=b;f<a;)if(b=d[f++],128>b){if(0==b)break;c+=e(b)}else if(224>b)c+=e((b&63)<<6|d[f++]&127);else if(240>b){var g=d[f++];c+=e((b&31)<<12|(g&127)<<6|d[f++]&127)}else{g=d[f++];var h=d[f++];b=(b&15)<<18|(g&127)<<12|(h&127)<<
6|d[f++]&127;c+=e((b>>10)+55232);c+=e(b&1023|56320)}return c},readString:function(a,b){return this.getString(a,b)},toString:function(){return this.getString(0,this.length)},toHex:function(){for(var a="",b=[],c=0,d=16;c<d;){var e=c++;b.push(I.cca("0123456789abcdef",e))}c=0;for(d=this.length;c<d;)e=c++,e=this.b[e],a+=String.fromCodePoint(b[e>>4]),a+=String.fromCodePoint(b[e&15]);return a},getData:function(){return this.b.bufferValue},__class__:ib};var rh=function(){};k["haxe.crypto.Base64"]=rh;rh.__name__=
"haxe.crypto.Base64";rh.decode=function(a,b){null==b&&(b=!0);if(b)for(;61==I.cca(a,a.length-1);)a=I.substr(a,0,-1);return(new yj(rh.BYTES)).decodeBytes(ib.ofString(a))};var yj=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(8<c||b!=1<<c)throw J.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};k["haxe.crypto.BaseCode"]=yj;yj.__name__="haxe.crypto.BaseCode";yj.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(a){for(var b=this.nbits,c=this.base,d=8*a.length/
b|0,e=new ib(new ArrayBuffer(d+(0==8*a.length%b?0:1))),f=0,g=0,h=(1<<b)-1,m=0,l=0;l<d;){for(;g<b;)g+=8,f<<=8,f|=a.b[m++];g-=b;e.b[l++]=c.b[f>>g&h]&255}0<g&&(e.b[l++]=c.b[f<<b-g&h]&255);return e},initTable:function(){for(var a=[],b=0;256>b;){var c=b++;a[c]=-1}b=0;for(var d=this.base.length;b<d;)c=b++,a[this.base.b[c]]=c;this.tbl=a},decodeBytes:function(a){var b=this.nbits;null==this.tbl&&this.initTable();for(var c=this.tbl,d=a.length*b>>3,e=new ib(new ArrayBuffer(d)),f=0,g=0,h=0,m=0;m<d;){for(;8>g;){g+=
b;f<<=b;var l=c[a.b[h++]];if(-1==l)throw J.thrown("BaseCode : invalid encoded char");f|=l}g-=8;e.b[m++]=f>>g&255}return e},__class__:yj};var fe=function(){};k["haxe.ds.ArraySort"]=fe;fe.__name__="haxe.ds.ArraySort";fe.sort=function(a,b){fe.rec(a,b,0,a.length)};fe.rec=function(a,b,c,d){var e=c+d>>1;if(12>d-c){if(!(d<=c))for(e=c+1;e<d;)for(var f=e++;f>c;){if(0>b(a[f],a[f-1]))fe.swap(a,f-1,f);else break;--f}}else fe.rec(a,b,c,e),fe.rec(a,b,e,d),fe.doMerge(a,b,c,e,d,e-c,d-e)};fe.doMerge=function(a,b,
c,d,e,f,g){if(0!=f&&0!=g)if(2==f+g)0>b(a[d],a[c])&&fe.swap(a,d,c);else{if(f>g){var h=f>>1;var m=c+h;var l=fe.lower(a,b,d,e,m);var n=l-d}else n=g>>1,l=d+n,m=fe.upper(a,b,c,d,l),h=m-c;fe.rotate(a,b,m,d,l);d=m+n;fe.doMerge(a,b,c,m,d,h,n);fe.doMerge(a,b,d,l,e,f-h,g-n)}};fe.rotate=function(a,b,c,d,e){if(c!=d&&d!=e)for(b=fe.gcd(e-c,d-c);0!=b--;){for(var f=a[c+b],g=d-c,h=c+b,m=c+b+g;m!=c+b;)a[h]=a[m],h=m,m=e-m>g?m+g:c+(g-(e-m));a[h]=f}};fe.gcd=function(a,b){for(;0!=b;){var c=a%b;a=b;b=c}return a};fe.upper=
function(a,b,c,d,e){d-=c;for(var f,g;0<d;)f=d>>1,g=c+f,0>b(a[e],a[g])?d=f:(c=g+1,d=d-f-1);return c};fe.lower=function(a,b,c,d,e){d-=c;for(var f,g;0<d;)f=d>>1,g=c+f,0>b(a[g],a[e])?(c=g+1,d=d-f-1):d=f;return c};fe.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var Pg=function(){};k["haxe.ds.BalancedTree"]=Pg;Pg.__name__="haxe.ds.BalancedTree";Pg.__interfaces__=[Od];Pg.iteratorLoop=function(a,b){null!=a&&(Pg.iteratorLoop(a.left,b),b.push(a.value),Pg.iteratorLoop(a.right,b))};Pg.prototype={root:null,
set:function(a,b){this.root=this.setLoop(a,b,this.root)},get:function(a){for(var b=this.root;null!=b;){var c=this.compare(a,b.key);if(0==c)return b.value;b=0>c?b.left:b.right}return null},remove:function(a){try{return this.root=this.removeLoop(a,this.root),!0}catch(b){xb.lastError=b;if("string"==typeof J.caught(b).unwrap())return!1;throw b;}},exists:function(a){for(var b=this.root;null!=b;){var c=this.compare(a,b.key);if(0==c)return!0;b=0>c?b.left:b.right}return!1},iterator:function(){var a=[];Pg.iteratorLoop(this.root,
a);return new se(a)},keyValueIterator:function(){return new ch(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return new se(a)},setLoop:function(a,b,c){if(null==c)return new Ye(null,a,b,null);var d=this.compare(a,c.key);if(0==d)return new Ye(c.left,a,b,c.right,null==c?0:c._height);if(0>d)return a=this.setLoop(a,b,c.left),this.balance(a,c.key,c.value,c.right);a=this.setLoop(a,b,c.right);return this.balance(c.left,c.key,c.value,a)},removeLoop:function(a,b){if(null==b)throw J.thrown("Not_found");
var c=this.compare(a,b.key);return 0==c?this.merge(b.left,b.right):0>c?this.balance(this.removeLoop(a,b.left),b.key,b.value,b.right):this.balance(b.left,b.key,b.value,this.removeLoop(a,b.right))},keysLoop:function(a,b){null!=a&&(this.keysLoop(a.left,b),b.push(a.key),this.keysLoop(a.right,b))},merge:function(a,b){if(null==a)return b;if(null==b)return a;var c=this.minBinding(b);return this.balance(a,c.key,c.value,this.removeMinBinding(b))},minBinding:function(a){if(null==a)throw J.thrown("Not_found");
return null==a.left?a:this.minBinding(a.left)},removeMinBinding:function(a){return null==a.left?a.right:this.balance(this.removeMinBinding(a.left),a.key,a.value,a.right)},balance:function(a,b,c,d){var e=null==a?0:a._height,f=null==d?0:d._height;return e>f+2?(e=a.left,f=a.right,(null==e?0:e._height)>=(null==f?0:f._height)?new Ye(a.left,a.key,a.value,new Ye(a.right,b,c,d)):new Ye(new Ye(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new Ye(a.right.right,b,c,d))):f>e+2?(e=d.right,f=d.left,
(null==e?0:e._height)>(null==f?0:f._height)?new Ye(new Ye(a,b,c,d.left),d.key,d.value,d.right):new Ye(new Ye(a,b,c,d.left.left),d.left.key,d.left.value,new Ye(d.left.right,d.key,d.value,d.right))):new Ye(a,b,c,d,(e>f?e:f)+1)},compare:function(a,b){return X.compare(a,b)},__class__:Pg};var Ye=function(a,b,c,d,e){null==e&&(e=-1);this.left=a;this.key=b;this.value=c;this.right=d;-1==e?(a=this.left,b=this.right,a=(null==a?0:a._height)>(null==b?0:b._height)?this.left:this.right,this._height=(null==a?0:a._height)+
1):this._height=e};k["haxe.ds.TreeNode"]=Ye;Ye.__name__="haxe.ds.TreeNode";Ye.prototype={left:null,right:null,key:null,value:null,_height:null,__class__:Ye};var Gj=function(){};k["haxe.ds.EnumValueMap"]=Gj;Gj.__name__="haxe.ds.EnumValueMap";Gj.__interfaces__=[Od];Gj.__super__=Pg;Gj.prototype=u(Pg.prototype,{compare:function(a,b){var c=a._hx_index-b._hx_index;if(0!=c)return c;a=Ia.enumParameters(a);b=Ia.enumParameters(b);return 0==a.length&&0==b.length?0:this.compareArgs(a,b)},compareArgs:function(a,
b){var c=a.length-b.length;if(0!=c)return c;c=0;for(var d=a.length;c<d;){var e=c++;e=this.compareArg(a[e],b[e]);if(0!=e)return e}return 0},compareArg:function(a,b){return X.isEnumValue(a)&&X.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):X.compare(a,b)},__class__:Gj});var qk=function(a,b){this.item=a;this.next=b};k["haxe.ds._List.ListNode"]=qk;qk.__name__="haxe.ds._List.ListNode";qk.prototype={item:null,next:null,__class__:qk};var tn=function(a){this.head=
a};k["haxe.ds._List.ListIterator"]=tn;tn.__name__="haxe.ds._List.ListIterator";tn.prototype={head:null,hasNext:function(){return null!=this.head},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:tn};var hj=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};k["haxe.ds._StringMap.StringMapKeyIterator"]=hj;hj.__name__="haxe.ds._StringMap.StringMapKeyIterator";hj.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<
this.length},next:function(){return this.keys[this.current++]},__class__:hj};var xi=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};k["haxe.ds._StringMap.StringMapValueIterator"]=xi;xi.__name__="haxe.ds._StringMap.StringMapValueIterator";xi.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.h[this.keys[this.current++]]},__class__:xi};var ko=function(a){this.h=a;this.keys=Object.keys(a);
this.length=this.keys.length;this.current=0};k["haxe.ds._StringMap.StringMapKeyValueIterator"]=ko;ko.__name__="haxe.ds._StringMap.StringMapKeyValueIterator";ko.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){var a=this.keys[this.current++];return{key:a,value:this.h[a]}},__class__:ko};var Bi=function(a,b,c){J.call(this,a,b);this.posInfos=null==c?{fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:
c;this.__skipStack++};k["haxe.exceptions.PosException"]=Bi;Bi.__name__="haxe.exceptions.PosException";Bi.__super__=J;Bi.prototype=u(J.prototype,{posInfos:null,toString:function(){return""+J.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:Bi});var bm=function(a,b,c){null==a&&(a="Not implemented");Bi.call(this,a,b,c);this.__skipStack++};k["haxe.exceptions.NotImplementedException"]=bm;bm.__name__=
"haxe.exceptions.NotImplementedException";bm.__super__=Bi;bm.prototype=u(Bi.prototype,{__class__:bm});var cm=function(){this.size=this.pos=0};k["haxe.io.BytesBuffer"]=cm;cm.__name__="haxe.io.BytesBuffer";cm.prototype={buffer:null,view:null,u8:null,pos:null,size:null,addByte:function(a){this.pos==this.size&&this.grow(1);this.view.setUint8(this.pos++,a)},add:function(a){this.pos+a.length>this.size&&this.grow(a.length);if(0!=this.size){var b=new Uint8Array(a.b.buffer,a.b.byteOffset,a.length);this.u8.set(b,
this.pos);this.pos+=a.length}},addBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw J.thrown(Of.OutsideBounds);this.pos+c>this.size&&this.grow(c);0!=this.size&&(a=new Uint8Array(a.b.buffer,a.b.byteOffset+b,c),this.u8.set(a,this.pos),this.pos+=c)},grow:function(a){var b=this.pos+a;for(a=0==this.size?16:this.size;a<b;)a=3*a>>1;b=new ArrayBuffer(a);var c=new Uint8Array(b);0<this.size&&c.set(this.u8);this.size=a;this.buffer=b;this.u8=c;this.view=new DataView(this.buffer)},getBytes:function(){if(0==
this.size)return new ib(new ArrayBuffer(0));var a=new ib(this.buffer);a.length=this.pos;return a},__class__:cm};var dm=function(){};k["haxe.io.Input"]=dm;dm.__name__="haxe.io.Input";dm.prototype={bigEndian:null,readByte:function(){throw new bm(null,null,{fileName:"haxe/io/Input.hx",lineNumber:53,className:"haxe.io.Input",methodName:"readByte"});},readBytes:function(a,b,c){var d=c,e=a.b;if(0>b||0>c||b+c>a.length)throw J.thrown(Of.OutsideBounds);try{for(;0<d;)e[b]=this.readByte(),++b,--d}catch(f){if(xb.lastError=
f,!(J.caught(f).unwrap()instanceof Hj))throw f;}return c-d},readFullBytes:function(a,b,c){for(;0<c;){var d=this.readBytes(a,b,c);if(0==d)throw J.thrown(Of.Blocked);b+=d;c-=d}},read:function(a){for(var b=new ib(new ArrayBuffer(a)),c=0;0<a;){var d=this.readBytes(b,c,a);if(0==d)throw J.thrown(Of.Blocked);c+=d;a-=d}return b},readInt16:function(){var a=this.readByte(),b=this.readByte();a=this.bigEndian?b|a<<8:a|b<<8;return 0!=(a&32768)?a-65536:a},readUInt16:function(){var a=this.readByte(),b=this.readByte();
return this.bigEndian?b|a<<8:a|b<<8},readInt32:function(){var a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte();return this.bigEndian?d|c<<8|b<<16|a<<24:a|b<<8|c<<16|d<<24},readString:function(a,b){var c=new ib(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:dm};var em=function(a,b,c){null==b&&(b=0);null==c&&(c=a.length-b);if(0>b||0>c||b+c>a.length)throw J.thrown(Of.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=this.len=c};k["haxe.io.BytesInput"]=
em;em.__name__="haxe.io.BytesInput";em.__super__=dm;em.prototype=u(dm.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(0==this.len)throw J.thrown(new Hj);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw J.thrown(Of.OutsideBounds);if(0==this.len&&0<c)throw J.thrown(new Hj);this.len<c&&(c=this.len);var d=this.b;a=a.b;for(var e=0,f=c;e<f;){var g=e++;a[b+g]=d[this.pos+g]}this.pos+=c;this.len-=c;return c},__class__:em});var Pr=x["haxe.io.Encoding"]=
{__ename__:"haxe.io.Encoding",__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:v},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:v}};Pr.__constructs__=[Pr.UTF8,Pr.RawNative];var Hj=function(){};k["haxe.io.Eof"]=Hj;Hj.__name__="haxe.io.Eof";Hj.prototype={toString:function(){return"Eof"},__class__:Hj};var Of=x["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",
toString:v},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:v},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:v},Custom:(C=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",toString:v}},C._hx_name="Custom",C.__params__=["e"],C)};Of.__constructs__=[Of.Blocked,Of.Overflow,Of.OutsideBounds,Of.Custom];var Xd=function(){};k["haxe.io.FPHelper"]=Xd;Xd.__name__="haxe.io.FPHelper";Xd.i32ToFloat=function(a){Xd.helper.setInt32(0,a,
!0);return Xd.helper.getFloat32(0,!0)};Xd.floatToI32=function(a){Xd.helper.setFloat32(0,a,!0);return Xd.helper.getInt32(0,!0)};Xd.i64ToDouble=function(a,b){Xd.helper.setInt32(0,a,!0);Xd.helper.setInt32(4,b,!0);return Xd.helper.getFloat64(0,!0)};Xd.doubleToI64=function(a){var b=Xd.i64tmp;Xd.helper.setFloat64(0,a,!0);b.low=Xd.helper.getInt32(0,!0);b.high=Xd.helper.getInt32(4,!0);return b};var Ze=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");
b<c?(this.dir=I.substr(a,0,c),a=I.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=I.substr(a,0,b),a=I.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");-1!=b?(this.ext=I.substr(a,b+1,null),this.file=I.substr(a,0,b)):(this.ext=null,this.file=a)};k["haxe.io.Path"]=Ze;Ze.__name__="haxe.io.Path";Ze.directory=function(a){a=new Ze(a);return null==a.dir?"":a.dir};Ze.join=function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;null!=d&&""!=d&&b.push(d)}a=b;if(0==a.length)return"";d=a[0];b=1;for(c=
a.length;b<c;){var e=b++;d=Ze.addTrailingSlash(d);d+=a[e]}return Ze.normalize(d)};Ze.normalize=function(a){a=a.split("\\").join("/");if("/"==a)return"/";for(var b=[],c=0,d=a.split("/");c<d.length;){var e=d[c];++c;".."==e&&0<b.length&&".."!=b[b.length-1]?b.pop():""==e?(0<b.length||47==I.cca(a,0))&&b.push(e):"."!=e&&b.push(e)}a="";d=c=!1;e=0;for(b=b.join("/");e<b.length;){var f=b,g=e++,h=f.charCodeAt(g);55296<=h&&56319>=h&&(h=h-55232<<10|f.charCodeAt(g+1)&1023);f=h;65536<=f&&++e;switch(f){case 47:c?
(c=!1,d&&(a+="/",d=!1),a+=String.fromCodePoint(f)):d=!0;break;case 58:a+=":";c=!0;break;default:c=!1,d&&(a+="/",d=!1),a+=String.fromCodePoint(f)}}return a};Ze.addTrailingSlash=function(a){if(0==a.length)return"/";var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");return b<c?c!=a.length-1?a+"\\":a:b!=a.length-1?a+"/":a};Ze.prototype={dir:null,file:null,ext:null,backslash:null,__class__:Ze};var se=function(a){this.current=0;this.array=a};k["haxe.iterators.ArrayIterator"]=se;se.__name__="haxe.iterators.ArrayIterator";
se.prototype={array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:se};var ch=function(a){this.map=a;this.keys=a.keys()};k["haxe.iterators.MapKeyValueIterator"]=ch;ch.__name__="haxe.iterators.MapKeyValueIterator";ch.prototype={map:null,keys:null,hasNext:function(){return this.keys.hasNext()},next:function(){var a=this.keys.next();return{value:this.map.get(a),key:a}},__class__:ch};var $r={resolve:function(a,b){var c=
a.elementsNamed(b).next();if(null==c){if(a.nodeType==ba.Document)a="Document";else{if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));a=a.nodeName}throw J.thrown(a+" is missing element "+b);}if(c.nodeType!=ba.Document&&c.nodeType!=ba.Element)throw J.thrown("Invalid nodeType "+(null==c.nodeType?"null":Ga.toString(c.nodeType)));return c}},ks={resolve:function(a,b){return a.elementsNamed(b).hasNext()}},Zr={__properties__:{get_innerData:"get_innerData"},
get_innerData:function(a){if(a.nodeType!=ba.Document&&a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));var b=0,c=a.children;if(b>=c.length){if(a.nodeType==ba.Document)var d="Document";else{if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));d=a.nodeName}throw J.thrown(d+" does not have data");}d=c[b++];if(b<c.length){var e=
c[b++];if(d.nodeType==ba.PCData&&e.nodeType==ba.CData){if(d.nodeType==ba.Document||d.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==d.nodeType?"null":Ga.toString(d.nodeType)));d=""==R.trim(d.nodeValue)}else d=!1;if(d){if(b>=c.length){if(e.nodeType==ba.Document||e.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==e.nodeType?"null":Ga.toString(e.nodeType)));return e.nodeValue}d=c[b++];if(d.nodeType==ba.PCData){if(d.nodeType==ba.Document||d.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+
(null==d.nodeType?"null":Ga.toString(d.nodeType)));d=""==R.trim(d.nodeValue)}else d=!1;if(d&&b>=c.length){if(e.nodeType==ba.Document||e.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==e.nodeType?"null":Ga.toString(e.nodeType)));return e.nodeValue}}if(a.nodeType==ba.Document)d="Document";else{if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));d=a.nodeName}throw J.thrown(d+" does not only have data");
}if(d.nodeType!=ba.PCData&&d.nodeType!=ba.CData){if(a.nodeType==ba.Document)d="Document";else{if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));d=a.nodeName}throw J.thrown(d+" does not have data");}if(d.nodeType==ba.Document||d.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==d.nodeType?"null":Ga.toString(d.nodeType)));return d.nodeValue}},ge=function(a,b,c){this.xml=b;this.message=a;this.position=
c;this.lineNumber=1;for(a=this.positionAtLine=0;a<c;){var d=a++;d=b.charCodeAt(d);10==d?(this.lineNumber++,this.positionAtLine=0):13!=d&&this.positionAtLine++}};k["haxe.xml.XmlParserException"]=ge;ge.__name__="haxe.xml.XmlParserException";ge.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return U.getClass(this).__name__+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:ge};var dh=function(){};k["haxe.xml.Parser"]=
dh;dh.__name__="haxe.xml.Parser";dh.parse=function(a,b){null==b&&(b=!1);var c=ba.createDocument();dh.doParse(a,b,0,c);return c};dh.doParse=function(a,b,c,d){null==c&&(c=0);for(var e=null,f=1,g=1,h=null,m=0,l=0,n=0,p=new Wa,k=1,q=-1;c<a.length;){var t=a.charCodeAt(c);switch(f){case 0:switch(t){case 9:case 10:case 13:case 32:break;default:f=g;continue}break;case 1:if(60==t)f=0,g=2;else{m=c;f=13;continue}break;case 2:switch(t){case 33:if(91==a.charCodeAt(c+1)){c+=2;if("CDATA["!=I.substr(a,c,6).toUpperCase())throw J.thrown(new ge("Expected <![CDATA[",
a,c));c+=5;f=17}else if(68==a.charCodeAt(c+1)||100==a.charCodeAt(c+1)){if("OCTYPE"!=I.substr(a,c+2,6).toUpperCase())throw J.thrown(new ge("Expected <!DOCTYPE",a,c));c+=8;f=16}else{if(45!=a.charCodeAt(c+1)||45!=a.charCodeAt(c+2))throw J.thrown(new ge("Expected \x3c!--",a,c));c+=2;f=15}m=c+1;break;case 47:if(null==d)throw J.thrown(new ge("Expected node name",a,c));m=c+1;f=0;g=10;break;case 63:f=14;m=c;break;default:f=3;m=c;continue}break;case 3:if(!(97<=t&&122>=t||65<=t&&90>=t||48<=t&&57>=t||58==t||
46==t||95==t||45==t)){if(c==m)throw J.thrown(new ge("Expected node name",a,c));e=ba.createElement(I.substr(a,m,c-m));d.addChild(e);++l;f=0;g=4;continue}break;case 4:switch(t){case 47:f=11;break;case 62:f=9;break;default:f=5;m=c;continue}break;case 5:if(!(97<=t&&122>=t||65<=t&&90>=t||48<=t&&57>=t||58==t||46==t||95==t||45==t)){if(m==c)throw J.thrown(new ge("Expected attribute name",a,c));h=I.substr(a,m,c-m);if(e.exists(h))throw J.thrown(new ge("Duplicate attribute ["+h+"]",a,c));f=0;g=6;continue}break;
case 6:if(61==t)f=0,g=7;else throw J.thrown(new ge("Expected =",a,c));break;case 7:switch(t){case 34:case 39:p=new Wa;f=8;m=c+1;q=t;break;default:throw J.thrown(new ge('Expected "',a,c));}break;case 8:switch(t){case 38:k=c-m;p.b+=null==k?I.substr(a,m,null):I.substr(a,m,k);f=18;k=8;m=c+1;break;case 60:case 62:if(b)throw J.thrown(new ge("Invalid unescaped "+String.fromCodePoint(t)+" in attribute value",a,c));t==q&&(g=c-m,p.b+=null==g?I.substr(a,m,null):I.substr(a,m,g),g=p.b,p=new Wa,e.set(h,g),f=0,
g=4);break;default:t==q&&(g=c-m,p.b+=null==g?I.substr(a,m,null):I.substr(a,m,g),g=p.b,p=new Wa,e.set(h,g),f=0,g=4)}break;case 9:m=c=dh.doParse(a,b,c,e);f=1;break;case 10:if(!(97<=t&&122>=t||65<=t&&90>=t||48<=t&&57>=t||58==t||46==t||95==t||45==t)){if(m==c)throw J.thrown(new ge("Expected node name",a,c));g=I.substr(a,m,c-m);if(null==d||0!=d.nodeType)throw J.thrown(new ge("Unexpected </"+g+">, tag is not open",a,c));if(d.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==d.nodeType?"null":Ga.toString(d.nodeType)));if(g!=d.nodeName){if(d.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==d.nodeType?"null":Ga.toString(d.nodeType)));throw J.thrown(new ge("Expected </"+d.nodeName+">",a,c));}f=0;g=12;continue}break;case 11:if(62==t)f=1;else throw J.thrown(new ge("Expected >",a,c));break;case 12:if(62==t)return 0==l&&d.addChild(ba.createPCData("")),c;throw J.thrown(new ge("Expected >",a,c));case 13:60==t?(g=c-m,p.b+=null==g?I.substr(a,
m,null):I.substr(a,m,g),g=ba.createPCData(p.b),p=new Wa,d.addChild(g),++l,f=0,g=2):38==t&&(k=c-m,p.b+=null==k?I.substr(a,m,null):I.substr(a,m,k),f=18,k=13,m=c+1);break;case 14:63==t&&62==a.charCodeAt(c+1)&&(++c,f=I.substr(a,m+1,c-m-2),d.addChild(ba.createProcessingInstruction(f)),++l,f=1);break;case 15:45==t&&45==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(d.addChild(ba.createComment(I.substr(a,m,c-m))),++l,c+=2,f=1);break;case 16:91==t?++n:93==t?--n:62==t&&0==n&&(d.addChild(ba.createDocType(I.substr(a,
m,c-m))),++l,f=1);break;case 17:93==t&&93==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(f=ba.createCData(I.substr(a,m,c-m)),d.addChild(f),++l,c+=2,f=1);break;case 18:if(59==t){m=I.substr(a,m,c-m);if(35==m.charCodeAt(0))m=120==m.charCodeAt(1)?A.parseInt("0"+I.substr(m,1,m.length-1)):A.parseInt(I.substr(m,1,m.length-1)),p.b+=String.fromCodePoint(m);else if(Object.prototype.hasOwnProperty.call(dh.escapes.h,m))p.b+=A.string(dh.escapes.h[m]);else{if(b)throw J.thrown(new ge("Undefined entity: "+m,a,c));p.b+=
A.string("&"+m+";")}m=c+1;f=k}else if(!(97<=t&&122>=t||65<=t&&90>=t||48<=t&&57>=t||58==t||46==t||95==t||45==t)&&35!=t){if(b)throw J.thrown(new ge("Invalid character in entity: "+String.fromCodePoint(t),a,c));p.b+=String.fromCodePoint(38);f=c-m;p.b+=null==f?I.substr(a,m,null):I.substr(a,m,f);--c;m=c+1;f=k}}++c}1==f&&(m=c,f=13);if(13==f){if(0==d.nodeType){if(d.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==d.nodeType?"null":Ga.toString(d.nodeType)));throw J.thrown(new ge("Unclosed node <"+
d.nodeName+">",a,c));}if(c!=m||0==l)k=c-m,p.b+=null==k?I.substr(a,m,null):I.substr(a,m,k),d.addChild(ba.createPCData(p.b));return c}if(!b&&18==f&&13==k)return p.b+=String.fromCodePoint(38),k=c-m,p.b+=null==k?I.substr(a,m,null):I.substr(a,m,k),d.addChild(ba.createPCData(p.b)),c;throw J.thrown(new ge("Unexpected end",a,c));};var ij=function(a){this.output=new Wa;this.pretty=a};k["haxe.xml.Printer"]=ij;ij.__name__="haxe.xml.Printer";ij.print=function(a,b){null==b&&(b=!1);b=new ij(b);b.writeNode(a,"");
return b.output.b};ij.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=A.string(b+"<");if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));this.output.b+=A.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=A.string(" "+d+'="');d=R.htmlEscape(a.get(d),!0);this.output.b+=A.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=
">";this.pretty&&(this.output.b+="\n");if(a.nodeType!=ba.Document&&a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;){var e=d[c++];this.writeNode(e,this.pretty?b+"\t":b)}this.output.b+=A.string(b+"</");if(a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));this.output.b+=A.string(a.nodeName);
this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==ba.Document||a.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));a=a.nodeValue;0!=a.length&&(d=b+R.htmlEscape(a),this.output.b+=A.string(d),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=A.string(b+"<![CDATA[");if(a.nodeType==ba.Document||a.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==
a.nodeType?"null":Ga.toString(a.nodeType)));this.output.b+=A.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==ba.Document||a.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));a=a.nodeValue;a=a.replace(/[\n\r\t]+/g,"");this.output.b+=null==b?"null":""+b;d=R.trim("\x3c!--"+a+"--\x3e");this.output.b+=A.string(d);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==ba.Document||
a.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));this.output.b+=A.string("<!DOCTYPE "+a.nodeValue+">");this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==ba.Document||a.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));this.output.b+=A.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=ba.Document&&a.nodeType!=
ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;)e=d[c++],this.writeNode(e,b)}},hasChildren:function(a){if(a.nodeType!=ba.Document&&a.nodeType!=ba.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Ga.toString(a.nodeType)));var b=0;for(a=a.children;b<a.length;){var c=a[b++];switch(c.nodeType){case 0:case 1:return!0;case 2:case 3:if(c.nodeType==
ba.Document||c.nodeType==ba.Element)throw J.thrown("Bad node type, unexpected "+(null==c.nodeType?"null":Ga.toString(c.nodeType)));if(0!=R.ltrim(c.nodeValue).length)return!0}}return!1},__class__:ij};var Ci=x["haxe.zip.ExtraField"]={__ename__:"haxe.zip.ExtraField",__constructs__:null,FUnknown:(C=function(a,b){return{_hx_index:0,tag:a,bytes:b,__enum__:"haxe.zip.ExtraField",toString:v}},C._hx_name="FUnknown",C.__params__=["tag","bytes"],C),FInfoZipUnicodePath:(C=function(a,b){return{_hx_index:1,name:a,
crc:b,__enum__:"haxe.zip.ExtraField",toString:v}},C._hx_name="FInfoZipUnicodePath",C.__params__=["name","crc"],C),FUtf8:{_hx_name:"FUtf8",_hx_index:2,__enum__:"haxe.zip.ExtraField",toString:v}};Ci.__constructs__=[Ci.FUnknown,Ci.FInfoZipUnicodePath,Ci.FUtf8];var jg=x["haxe.zip.Huffman"]={__ename__:"haxe.zip.Huffman",__constructs__:null,Found:(C=function(a){return{_hx_index:0,i:a,__enum__:"haxe.zip.Huffman",toString:v}},C._hx_name="Found",C.__params__=["i"],C),NeedBit:(C=function(a,b){return{_hx_index:1,
left:a,right:b,__enum__:"haxe.zip.Huffman",toString:v}},C._hx_name="NeedBit",C.__params__=["left","right"],C),NeedBits:(C=function(a,b){return{_hx_index:2,n:a,table:b,__enum__:"haxe.zip.Huffman",toString:v}},C._hx_name="NeedBits",C.__params__=["n","table"],C)};jg.__constructs__=[jg.Found,jg.NeedBit,jg.NeedBits];var mo=function(){};k["haxe.zip.HuffTools"]=mo;mo.__name__="haxe.zip.HuffTools";mo.prototype={treeDepth:function(a){switch(a._hx_index){case 0:return 0;case 1:var b=a.right;a=this.treeDepth(a.left);
b=this.treeDepth(b);return 1+(a<b?a:b);case 2:throw J.thrown("assert");}},treeCompress:function(a){var b=this.treeDepth(a);if(0==b)return a;if(1==b){if(1==a._hx_index)return b=a.right,jg.NeedBit(this.treeCompress(a.left),this.treeCompress(b));throw J.thrown("assert");}for(var c=[],d=0,e=1<<b;d<e;)d++,c.push(jg.Found(-1));this.treeWalk(c,0,0,b,a);return jg.NeedBits(b,c)},treeWalk:function(a,b,c,d,e){if(1==e._hx_index){var f=e.left,g=e.right;0<d?(this.treeWalk(a,b,c+1,d-1,f),this.treeWalk(a,b|1<<c,
c+1,d-1,g)):a[b]=this.treeCompress(e)}else a[b]=this.treeCompress(e)},treeMake:function(a,b,c,d){if(d>b)throw J.thrown("Invalid huffman");var e=c<<5|d;if(a.h.hasOwnProperty(e))return jg.Found(a.h[e]);c<<=1;++d;return jg.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){if(1==c)return jg.NeedBit(jg.Found(0),jg.Found(0));var e=[],f=[];if(32<d)throw J.thrown("Invalid huffman");for(var g=0,h=d;g<h;)g++,e.push(0),f.push(0);g=0;for(h=c;g<h;){var m=g++;m=a[m+b];if(m>=d)throw J.thrown("Invalid huffman");
e[m]++}var l=0;g=1;for(h=d-1;g<h;)m=g++,l=l+e[m]<<1,f[m]=l;e=new Xa;g=0;for(h=c;g<h;)m=g++,c=a[m+b],0!=c&&(l=f[c-1],f[c-1]=l+1,e.h[l<<5|c]=m);return this.treeCompress(jg.NeedBit(this.treeMake(e,d,0,1),this.treeMake(e,d,1,1)))},__class__:mo};var no=function(a){this.buffer=new ib(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new Ai)};k["haxe.zip._InflateImpl.Window"]=no;no.__name__="haxe.zip._InflateImpl.Window";no.prototype={buffer:null,pos:null,crc:null,slide:function(){null!=this.crc&&this.crc.update(this.buffer,
0,32768);var a=new ib(new ArrayBuffer(65536));this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=a},addBytes:function(a,b,c){65536<this.pos+c&&this.slide();this.buffer.blit(this.pos,a,b,c);this.pos+=c},addByte:function(a){65536==this.pos&&this.slide();this.buffer.b[this.pos]=a&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){null!=this.crc&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:no};
var Qd=x["haxe.zip._InflateImpl.State"]={__ename__:"haxe.zip._InflateImpl.State",__constructs__:null,Head:{_hx_name:"Head",_hx_index:0,__enum__:"haxe.zip._InflateImpl.State",toString:v},Block:{_hx_name:"Block",_hx_index:1,__enum__:"haxe.zip._InflateImpl.State",toString:v},CData:{_hx_name:"CData",_hx_index:2,__enum__:"haxe.zip._InflateImpl.State",toString:v},Flat:{_hx_name:"Flat",_hx_index:3,__enum__:"haxe.zip._InflateImpl.State",toString:v},Crc:{_hx_name:"Crc",_hx_index:4,__enum__:"haxe.zip._InflateImpl.State",
toString:v},Dist:{_hx_name:"Dist",_hx_index:5,__enum__:"haxe.zip._InflateImpl.State",toString:v},DistOne:{_hx_name:"DistOne",_hx_index:6,__enum__:"haxe.zip._InflateImpl.State",toString:v},Done:{_hx_name:"Done",_hx_index:7,__enum__:"haxe.zip._InflateImpl.State",toString:v}};Qd.__constructs__=[Qd.Head,Qd.Block,Qd.CData,Qd.Flat,Qd.Crc,Qd.Dist,Qd.DistOne,Qd.Done];var ze=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);this.isFinal=!1;this.htools=new mo;this.huffman=this.buildFixedHuffman();this.huffdist=
null;this.dist=this.len=0;this.state=b?Qd.Head:Qd.Block;this.input=a;this.needed=this.nbits=this.bits=0;this.output=null;this.outpos=0;this.lengths=[];this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);
this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.window=new no(c)};k["haxe.zip.InflateImpl"]=ze;ze.__name__="haxe.zip.InflateImpl";ze.prototype={nbits:null,bits:null,state:null,isFinal:null,huffman:null,huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,window:null,buildFixedHuffman:function(){if(null!=ze.FIXED_HUFFMAN)return ze.FIXED_HUFFMAN;for(var a=[],b=0;288>b;){var c=b++;a.push(143>=c?8:255>=c?9:279>=c?7:8)}ze.FIXED_HUFFMAN=
this.htools.make(a,0,288,10);return ze.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=b;this.output=a;if(0<c)for(;this.inflateLoop(););return c-this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=a;return b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());var a=1==(this.bits&1);this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return 0==
a?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a&255;this.needed--;this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},
applyHuffman:function(a){switch(a._hx_index){case 0:var b=a.i;return b;case 1:return b=a.left,a=a.right,this.applyHuffman(this.getBit()?a:b);case 2:return b=a.n,this.applyHuffman(a.table[this.getBits(b)])}},inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var e=this.applyHuffman(this.huffman);switch(e){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:d=e;a[c]=e;++c;break;case 16:e=c+3+this.getBits(2);if(e>b)throw J.thrown("Invalid data");
for(;c<e;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);if(c>b)throw J.thrown("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw J.thrown("Invalid data");break;default:throw J.thrown("Invalid data");}}},inflateLoop:function(){switch(this.state._hx_index){case 0:var a=this.input.readByte();if(8!=(a&15))throw J.thrown("Invalid data");var b=this.input.readByte(),c=0!=(b&32);if(0!=((a<<8)+b)%31)throw J.thrown("Invalid data");if(c)throw J.thrown("Unsupported dictionary");this.state=Qd.Block;
return!0;case 1:switch(this.isFinal=this.getBit(),this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw J.thrown("Invalid data");this.state=Qd.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=Qd.CData,!0;case 2:a=this.getBits(5)+257;b=this.getBits(5)+1;var d=this.getBits(4)+4;c=0;for(var e=d;c<e;){var f=c++;this.lengths[ze.CODE_LENGTHS_POS[f]]=this.getBits(3)}c=
d;for(e=19;c<e;)f=c++,this.lengths[ze.CODE_LENGTHS_POS[f]]=0;this.huffman=this.htools.make(this.lengths,0,19,8);d=[];c=0;for(e=a+b;c<e;)c++,d.push(0);this.inflateLengths(d,a+b);this.huffdist=this.htools.make(d,a,b,16);this.huffman=this.htools.make(d,0,a,16);this.state=Qd.CData;return!0;default:throw J.thrown("Invalid data");}case 2:b=this.applyHuffman(this.huffman);if(256>b)return this.addByte(b),0<this.needed;if(256==b)this.state=this.isFinal?Qd.Crc:Qd.Block;else{b-=257;a=ze.LEN_EXTRA_BITS_TBL[b];
if(-1==a)throw J.thrown("Invalid data");this.len=ze.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);a=ze.DIST_EXTRA_BITS_TBL[b];if(-1==a)throw J.thrown("Invalid data");this.dist=ze.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw J.thrown("Invalid data");this.state=1==this.dist?Qd.DistOne:Qd.Dist}return!0;case 3:return a=this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,
0,a),0==this.len&&(this.state=this.isFinal?Qd.Crc:Qd.Block),0<this.needed;case 4:a=this.window.checksum();if(null==a)return this.state=Qd.Done,!0;b=Ai.read(this.input);if(!a.equals(b))throw J.thrown("Invalid CRC");this.state=Qd.Done;return!0;case 5:for(;0<this.len&&0<this.needed;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;0==this.len&&(this.state=Qd.CData);return 0<this.needed;case 6:return a=this.len<this.needed?this.len:this.needed,
this.addDistOne(a),this.len-=a,0==this.len&&(this.state=Qd.CData),0<this.needed;case 7:return!1}},__class__:ze};var Ij=function(a){this.i=a};k["haxe.zip.Reader"]=Ij;Ij.__name__="haxe.zip.Reader";Ij.readZip=function(a){return(new Ij(a)).read()};Ij.prototype={i:null,readZipDate:function(){var a=this.i.readUInt16(),b=a>>11&31,c=a>>5&63;a&=31;var d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,d&31,b,c,a<<1)},readExtraFields:function(a){for(var b=new Dc;0<a;){if(4>a)throw J.thrown("Invalid extra fields data");
var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw J.thrown("Invalid extra fields data");if(28789==c){var e=this.i.readByte();if(1!=e){var f=new cm;f.addByte(e);f.add(this.i.read(d-1));b.add(Ci.FUnknown(c,f.getBytes()))}else c=this.i.readInt32(),e=this.i.read(d-5).toString(),b.add(Ci.FInfoZipUnicodePath(e,c))}else b.add(Ci.FUnknown(c,this.i.read(d)));a-=4+d}return b},readEntryHeader:function(){var a=this.i,b=a.readInt32();if(33639248==b||101010256==b)return null;if(67324752!=b)throw J.thrown("Invalid Zip Data");
a.readUInt16();b=a.readUInt16();var c=0!=(b&2048);if(0!=(b&63473))throw J.thrown("Unsupported flags "+b);var d=a.readUInt16(),e=0!=d;if(e&&8!=d)throw J.thrown("Unsupported compression "+d);d=this.readZipDate();var f=a.readInt32(),g=a.readInt32(),h=a.readInt32(),m=a.readInt16(),l=a.readInt16();a=a.readString(m);l=this.readExtraFields(l);c&&l.push(Ci.FUtf8);0!=(b&8)&&(f=null);return{fileName:a,fileSize:h,fileTime:d,compressed:e,dataSize:g,data:null,crc32:f,extraFields:l}},read:function(){for(var a=
new Dc,b=null;;){var c=this.readEntryHeader();if(null==c)break;if(null==c.crc32){if(c.compressed){null==b&&(b=new ib(new ArrayBuffer(65536)));for(var d=new cm,e=new ze(this.i,!1,!1);;){var f=e.readBytes(b,0,65536);d.addBytes(b,0,f);if(65536>f)break}c.data=d.getBytes()}else c.data=this.i.read(c.dataSize);c.crc32=this.i.readInt32();134695760==c.crc32&&(c.crc32=this.i.readInt32());c.dataSize=this.i.readInt32();c.fileSize=this.i.readInt32();c.dataSize=c.fileSize;c.compressed=!1}else c.data=this.i.read(c.dataSize);
a.add(c)}return a},__class__:Ij};var U=function(){};k["js.Boot"]=U;U.__name__="js.Boot";U.getClass=function(a){if(null==a)return null;if(a instanceof Array)return Array;var b=a.__class__;if(null!=b)return b;a=U.__nativeClassName(a);return null!=a?U.__resolveNativeClass(a):null};U.__string_rec=function(a,b){if(null==a)return"null";if(5<=b.length)return"<...>";var c=typeof a;"function"==c&&(a.__name__||a.__ename__)&&(c="object");switch(c){case "function":return"<function>";case "object":if(a.__enum__){var d=
x[a.__enum__].__constructs__[a._hx_index];c=d._hx_name;if(d.__params__){b+="\t";var e=[],f=0;for(d=d.__params__;f<d.length;){var g=d[f];f+=1;e.push(U.__string_rec(a[g],b))}return c+"("+e.join(",")+")"}return c}if(a instanceof Array){c="[";b+="\t";e=0;for(f=a.length;e<f;)d=e++,c+=(0<d?",":"")+U.__string_rec(a[d],b);return c+"]"}try{e=a.toString}catch(h){return xb.lastError=h,"???"}if(null!=e&&e!=Object.toString&&"function"==typeof e&&(c=a.toString(),"[object Object]"!=c))return c;c="{\n";b+="\t";e=
null!=a.hasOwnProperty;f=null;for(f in a)e&&!a.hasOwnProperty(f)||"prototype"==f||"__class__"==f||"__super__"==f||"__interfaces__"==f||"__properties__"==f||(2!=c.length&&(c+=", \n"),c+=b+f+" : "+U.__string_rec(a[f],b));b=b.substring(1);return c+("\n"+b+"}");case "string":return a;default:return String(a)}};U.__interfLoop=function(a,b){if(null==a)return!1;if(a==b)return!0;var c=a.__interfaces__;if(null!=c)for(var d=0,e=c.length;d<e;){var f=d++;f=c[f];if(f==b||U.__interfLoop(f,b))return!0}return U.__interfLoop(a.__super__,
b)};U.__instanceof=function(a,b){if(null==b)return!1;switch(b){case Array:return a instanceof Array;case Mr:return"boolean"==typeof a;case ls:return null!=a;case Lr:return"number"==typeof a;case qi:return"number"==typeof a?(a|0)===a:!1;case String:return"string"==typeof a;default:if(null!=a)if("function"==typeof b){if(U.__downcastCheck(a,b))return!0}else{if("object"==typeof b&&U.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==cr&&null!=a.__name__||b==cs&&null!=a.__ename__?!0:null!=
a.__enum__?x[a.__enum__]==b:!1}};U.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?U.__interfLoop(U.getClass(a),b):!1};U.__implements=function(a,b){return U.__interfLoop(U.getClass(a),b)};U.__cast=function(a,b){if(null==a||U.__instanceof(a,b))return a;throw J.thrown("Cannot cast "+A.string(a)+" to "+A.string(b));};U.__nativeClassName=function(a){a=U.__toStr.call(a).slice(8,-1);return"Object"==a||"Function"==a||"Math"==a||"JSON"==a?null:a};U.__isNativeObj=function(a){return null!=
U.__nativeClassName(a)};U.__resolveNativeClass=function(a){return N[a]};var Qg=function(){};k["js.Browser"]=Qg;Qg.__name__="js.Browser";Qg.__properties__={get_supported:"get_supported"};Qg.get_supported=function(){return"undefined"!=typeof window&&"undefined"!=typeof window.location?"string"==typeof window.location.protocol:!1};Qg.getLocalStorage=function(){try{var a=window.localStorage;a.getItem("");if(0==a.length){var b="_hx_"+Math.random();a.setItem(b,b);a.removeItem(b)}return a}catch(c){return xb.lastError=
c,null}};var dr=function(){};k["js.html._CanvasElement.CanvasUtil"]=dr;dr.__name__="js.html._CanvasElement.CanvasUtil";dr.getContextWebGL=function(a,b){var c=a.getContext("webgl",b);if(null!=c)return c;c=a.getContext("experimental-webgl",b);return null!=c?c:null};var er=function(){};k["js.lib._ArrayBuffer.ArrayBufferCompat"]=er;er.__name__="js.lib._ArrayBuffer.ArrayBufferCompat";er.sliceImpl=function(a,b){a=new Uint8Array(this,a,null==b?null:b-a);b=new Uint8Array(a.byteLength);b.set(a);return b.buffer};
var oo=function(a){this.gameDeviceCache=new Xa;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;pe.init();this.accelerometer=Pf.registerSensor(Qr.ACCELEROMETER,0)};k["lime._internal.backend.html5.HTML5Application"]=oo;oo.__name__="lime._internal.backend.html5.HTML5Application";oo.prototype={accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,gameDeviceCache:null,hidden:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(a){if(65<=
a&&90>=a)return a+32;switch(a){case 12:return 1073741980;case 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;case 19:return 1073741896;case 20:return 1073741881;case 33:return 1073741899;case 34:return 1073741902;case 35:return 1073741901;case 36:return 1073741898;case 37:return 1073741904;case 38:return 1073741906;case 39:return 1073741903;case 40:return 1073741905;case 41:return 1073741943;case 43:return 1073741940;case 44:return 1073741894;case 45:return 1073741897;case 46:return 127;
case 91:return 1073742051;case 92:return 1073742055;case 93:return 1073742055;case 95:return 1073742106;case 96:return 1073741922;case 97:return 1073741913;case 98:return 1073741914;case 99:return 1073741915;case 100:return 1073741916;case 101:return 1073741917;case 102:return 1073741918;case 103:return 1073741919;case 104:return 1073741920;case 105:return 1073741921;case 106:return 1073741909;case 107:return 1073741911;case 108:return 1073741923;case 109:return 1073741910;case 110:return 1073741923;
case 111:return 1073741908;case 112:return 1073741882;case 113:return 1073741883;case 114:return 1073741884;case 115:return 1073741885;case 116:return 1073741886;case 117:return 1073741887;case 118:return 1073741888;case 119:return 1073741889;case 120:return 1073741890;case 121:return 1073741891;case 122:return 1073741892;case 123:return 1073741893;case 124:return 1073741928;case 125:return 1073741929;case 126:return 1073741930;case 127:return 1073741931;case 128:return 1073741932;case 129:return 1073741933;
case 130:return 1073741934;case 131:return 1073741935;case 132:return 1073741936;case 133:return 1073741937;case 134:return 1073741938;case 135:return 1073741939;case 144:return 1073741907;case 145:return 1073741895;case 160:return 94;case 161:return 33;case 163:return 35;case 164:return 36;case 166:return 1073742094;case 167:return 1073742095;case 168:return 1073742097;case 169:return 41;case 170:return 42;case 171:return 96;case 172:return 1073741898;case 173:return 45;case 174:return 1073741953;
case 175:return 1073741952;case 176:return 1073742082;case 177:return 1073742083;case 178:return 1073742084;case 179:return 1073742085;case 180:return 1073742089;case 181:return 1073742086;case 182:return 1073741953;case 183:return 1073741952;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 193:return 63;case 194:return 1073741923;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39;case 223:return 96;
case 224:return 1073742051;case 226:return 92}return a},exec:function(){window.addEventListener("keydown",r(this,this.handleKeyEvent),!1);window.addEventListener("keyup",r(this,this.handleKeyEvent),!1);window.addEventListener("focus",r(this,this.handleWindowEvent),!1);window.addEventListener("blur",r(this,this.handleWindowEvent),!1);window.addEventListener("resize",r(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",r(this,this.handleWindowEvent),!1);Object.prototype.hasOwnProperty.call(window,
"Accelerometer")&&window.addEventListener("devicemotion",r(this,this.handleSensorEvent),!1);CanvasRenderingContext2D.prototype.isPointInStroke||(CanvasRenderingContext2D.prototype.isPointInStroke=function(a,b,c){return!1});CanvasRenderingContext2D.prototype.isPointInPath||(CanvasRenderingContext2D.prototype.isPointInPath=function(a,b,c){return!1});0=="performance"in window&&(window.performance={});if(0=="now"in window.performance){var a=Date.now();performance.timing&&performance.timing.navigationStart&&
(a=performance.timing.navigationStart);window.performance.now=function(){return Date.now()-a}}for(var b=0,c=["ms","moz","webkit","o"],d=0;d<c.length&&!window.requestAnimationFrame;++d)window.requestAnimationFrame=window[c[d]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[d]+"CancelAnimationFrame"]||window[c[d]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a,c){var d=(new Date).getTime(),e=Math.max(0,16-(d-b));c=window.setTimeout(function(){a(d+
e)},e);b=d+e;return c});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=(new Date).getTime();this.handleApplicationEvent();return 0},exit:function(){},handleApplicationEvent:function(a){a=0;for(var b=this.parent.__windows;a<b.length;){var c=b[a];++a;c.__backend.updateSize()}this.updateGameDevices();this.currentUpdate=(new Date).getTime();if(this.currentUpdate>=this.nextUpdate){this.deltaTime=
this.currentUpdate-this.lastUpdate;a=0;for(b=this.parent.__windows;a<b.length;)c=b[a],++a,this.parent.onUpdate.dispatch(this.deltaTime|0),null!=c.context&&c.onRender.dispatch(c.context);this.nextUpdate=0>this.framePeriod?this.currentUpdate:this.currentUpdate-this.currentUpdate%this.framePeriod+this.framePeriod;this.lastUpdate=this.currentUpdate}window.requestAnimationFrame(r(this,this.handleApplicationEvent))},handleKeyEvent:function(a){if(null!=this.parent.__window){switch(a.keyCode){case 32:case 37:case 38:case 39:case 40:a.preventDefault()}var b=
this.convertKeyCode(null!=a.keyCode?a.keyCode:a.which),c=(a.shiftKey?3:0)|(a.ctrlKey?192:0)|(a.altKey?768:0)|(a.metaKey?3072:0);"keydown"==a.type?(this.parent.__window.onKeyDown.dispatch(b,c),this.parent.__window.onKeyDown.canceled&&a.cancelable&&a.preventDefault()):(this.parent.__window.onKeyUp.dispatch(b,c),this.parent.__window.onKeyUp.canceled&&a.cancelable&&a.preventDefault())}},handleSensorEvent:function(a){this.accelerometer.onUpdate.dispatch(a.accelerationIncludingGravity.x,a.accelerationIncludingGravity.y,
a.accelerationIncludingGravity.z)},handleWindowEvent:function(a){if(null!=this.parent.__window)switch(a.type){case "blur":this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0);break;case "focus":this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1);break;case "resize":this.parent.__window.__backend.handleResizeEvent(a);break;case "visibilitychange":window.document.hidden?this.hidden||
(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0):this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1)}},updateGameDevices:function(){var a=Xc.__getDeviceData();if(null!=a)for(var b,c,d,e,f,g=0,h=a.length;g<h;)if(b=g++,e=a[b],null!=e){if(!this.gameDeviceCache.h.hasOwnProperty(b)){f=new po;f.id=b;f.connected=e.connected;c=0;for(d=e.buttons.length;c<d;){var m=c++;f.buttons.push(e.buttons[m].value)}c=
0;for(d=e.axes.length;c<d;)m=c++,f.axes.push(e.axes[m]);"standard"==e.mapping&&(f.isGamepad=!0);this.gameDeviceCache.h[b]=f;e.connected&&(Xc.__connect(b),f.isGamepad&&Gd.__connect(b))}f=this.gameDeviceCache.h[b];d=Xc.devices.h[b];c=Gd.devices.h[b];if(e.connected){for(var l=0,n=e.buttons.length;l<n;){var p=l++;m=e.buttons[p].value;if(m!=f.buttons[p]){if(6==p)d.onAxisMove.dispatch(e.axes.length,m),null!=c&&c.onAxisMove.dispatch(4,m);else if(7==p)d.onAxisMove.dispatch(e.axes.length+1,m),null!=c&&c.onAxisMove.dispatch(5,
m);else if(0<m?d.onButtonDown.dispatch(p):d.onButtonUp.dispatch(p),null!=c){switch(p){case 0:b=0;break;case 1:b=1;break;case 2:b=2;break;case 3:b=3;break;case 4:b=9;break;case 5:b=10;break;case 8:b=4;break;case 9:b=6;break;case 10:b=7;break;case 11:b=8;break;case 12:b=11;break;case 13:b=12;break;case 14:b=13;break;case 15:b=14;break;case 16:b=5;break;default:continue}0<m?c.onButtonDown.dispatch(b):c.onButtonUp.dispatch(b)}f.buttons[p]=m}}b=0;for(m=e.axes.length;b<m;)l=b++,e.axes[l]!=f.axes[l]&&(d.onAxisMove.dispatch(l,
e.axes[l]),null!=c&&c.onAxisMove.dispatch(l,e.axes[l]),f.axes[l]=e.axes[l])}else f.connected&&(f.connected=!1,Xc.__disconnect(b),Gd.__disconnect(b))}},__class__:oo};var po=function(){this.connected=!0;this.buttons=[];this.axes=[]};k["lime._internal.backend.html5.GameDeviceData"]=po;po.__name__="lime._internal.backend.html5.GameDeviceData";po.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:po};var qo=function(a){this.parent=a;this.id=-1;this.gain=1};k["lime._internal.backend.html5.HTML5AudioSource"]=
qo;qo.__name__="lime._internal.backend.html5.HTML5AudioSource";qo.prototype={completed:null,gain:null,id:null,length:null,loops:null,parent:null,playing:null,dispose:function(){},init:function(){},play:function(){if(!this.playing&&null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){this.playing=!0;var a=this.getCurrentTime();this.completed=!1;var b=this.parent.buffer.__srcHowl._volume;this.parent.buffer.__srcHowl._volume=this.parent.get_gain();this.id=this.parent.buffer.__srcHowl.play();
this.parent.buffer.__srcHowl._volume=b;null!=this.parent.get_pan()&&this.setPan(this.parent.get_pan());null!=this.parent.get_position()&&this.setPosition(this.parent.get_position());this.parent.buffer.__srcHowl.on("end",r(this,this.howl_onEnd),this.id);this.setCurrentTime(a)}},pause:function(){this.playing=!1;null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&this.parent.buffer.__srcHowl.pause(this.id)},stop:function(){this.playing=!1;null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&
(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",r(this,this.howl_onEnd),this.id))},howl_onEnd:function(){this.playing=!1;0<this.loops?(this.loops--,this.stop(),this.play()):(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",r(this,this.howl_onEnd),this.id)),this.completed=!0,this.parent.onComplete.dispatch())},getCurrentTime:function(){if(-1==this.id)return 0;if(this.completed)return this.getLength();
if(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){var a=(1E3*this.parent.buffer.__srcHowl.seek(this.id)|0)-this.parent.offset;return 0>a?0:a}return 0},setCurrentTime:function(a){if(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){var b=(a+this.parent.offset)/1E3;0>b&&(b=0);this.parent.buffer.__srcHowl.seek(b,this.id)}return a},getGain:function(){return this.gain},setGain:function(a){null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&-1!=this.id&&this.parent.buffer.__srcHowl.volume(a,
this.id);return this.gain=a},getLength:function(){return 0!=this.length?this.length:null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl?1E3*this.parent.buffer.__srcHowl.duration()|0:0},setLength:function(a){return this.length=a},getLoops:function(){return this.loops},setLoops:function(a){return this.loops=a},setPan:function(a){null!=this.parent.buffer.__srcHowl&&null!=this.parent.buffer.__srcHowl.stereo&&this.parent.buffer.__srcHowl.stereo(a,this.id);return a},getPitch:function(){return this.parent.buffer.__srcHowl.rate()},
setPitch:function(a){this.parent.buffer.__srcHowl.rate(a);return this.getPitch()},setPosition:function(a){null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&null!=this.parent.buffer.__srcHowl.pos&&this.parent.buffer.__srcHowl.pos(a.x,a.y,a.z,this.id);return a},__class__:qo};var $a=function(){this.validStatus0=(new aa("Tizen","gi")).match(window.navigator.userAgent)};k["lime._internal.backend.html5.HTML5HTTPRequest"]=$a;$a.__name__="lime._internal.backend.html5.HTML5HTTPRequest";$a.loadImage=
function(a){var b=new Yd;$a.activeRequests<$a.requestLimit?($a.activeRequests++,$a.__loadImage(a,b,0)):$a.requestQueue.add({instance:null,uri:a,promise:b,type:"IMAGE",options:0});return b.future};$a.loadImageFromBytes=function(a,b){var c=URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}));return null!=c?(a=new Yd,$a.activeRequests<$a.requestLimit?($a.activeRequests++,$a.__loadImage(c,a,1)):$a.requestQueue.add({instance:null,uri:c,promise:a,type:"IMAGE",options:1}),a.future):$a.loadImage("data:"+
b+";base64,"+Qf.encode(a))};$a.processQueue=function(){if($a.activeRequests<$a.requestLimit&&0<$a.requestQueue.length){$a.activeRequests++;var a=$a.requestQueue.pop();switch(a.type){case "BINARY":a.instance.__loadData(a.uri,a.promise);break;case "IMAGE":$a.__loadImage(a.uri,a.promise,a.options);break;case "TEXT":a.instance.__loadText(a.uri,a.promise);break;default:$a.activeRequests--}}};$a.__createBlobURIFromBytes=function(a,b){return URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}))};$a.__fixHostname=
function(a){return null==a?"":a};$a.__fixPort=function(a,b){if(null==a||""==a)switch(b){case "ftp:":return"21";case "gopher:":return"70";case "http:":return"80";case "https:":return"443";case "ws:":return"80";case "wss:":return"443";default:return""}return a};$a.__fixProtocol=function(a){return null==a||""==a?"http:":a};$a.__isInMemoryURI=function(a){return R.startsWith(a,"data:")?!0:R.startsWith(a,"blob:")};$a.__isSameOrigin=function(a){if(null==a||""==a||$a.__isInMemoryURI(a))return!0;null==$a.originElement&&
($a.originElement=window.document.createElement("a"),$a.originHostname=$a.__fixHostname(N.location.hostname),$a.originProtocol=$a.__fixProtocol(N.location.protocol),$a.originPort=$a.__fixPort(N.location.port,$a.originProtocol));var b=$a.originElement;b.href=a;""==b.hostname&&(b.href=b.href);var c=$a.__fixHostname(b.hostname);a=$a.__fixProtocol(b.protocol);b=$a.__fixPort(b.port,a);c=""==c||c==$a.originHostname;b=""==b||b==$a.originPort;return"file:"!=a&&c?b:!1};$a.__loadImage=function(a,b,c){var d=
new Image;$a.__isSameOrigin(a)||(d.crossOrigin="Anonymous");null==$a.supportsImageProgress&&($a.supportsImageProgress="onprogress"in d);if($a.supportsImageProgress||$a.__isInMemoryURI(a))d.addEventListener("load",function(e){$a.__revokeBlobURI(a,c);e=new Rf(null,d.width,d.height);e.__srcImage=d;$a.activeRequests--;$a.processQueue();b.complete(new Fb(e))},!1),d.addEventListener("progress",function(a){b.progress(a.loaded,a.total)},!1),d.addEventListener("error",function(d){$a.__revokeBlobURI(a,c);$a.activeRequests--;
$a.processQueue();b.error(d.detail)},!1),d.src=a;else{var e=new XMLHttpRequest;e.onload=function(a){$a.activeRequests--;$a.processQueue();(new Fb).__fromBytes(ib.ofData(e.response),function(a){b.complete(a)})};e.onerror=function(a){b.error(a.message)};e.onprogress=function(a){a.lengthComputable&&b.progress(a.loaded,a.total)};e.open("GET",a,!0);e.responseType="arraybuffer";e.overrideMimeType("text/plain; charset=x-user-defined");e.send(null)}};$a.__revokeBlobURI=function(a,b){0!=(b&1)&&URL.revokeObjectURL(a)};
$a.prototype={binary:null,parent:null,request:null,validStatus0:null,cancel:function(){null!=this.request&&this.request.abort()},init:function(a){this.parent=a},load:function(a,b,c){this.request=new XMLHttpRequest;"POST"==this.parent.method?this.request.upload.addEventListener("progress",b,!1):this.request.addEventListener("progress",b,!1);this.request.onreadystatechange=c;b="";if(null==this.parent.data){c=Object.keys(this.parent.formData.h);for(var d=c.length,e=0;e<d;){var f=c[e++];0<b.length&&(b+=
"&");var g=this.parent.formData.h[f];if(-1<f.indexOf("[]")&&g instanceof Array){var h=[];for(g=E(g);g.hasNext();){var m=g.next();h.push(encodeURIComponent(m))}h=h.join("&amp;"+f+"=");b+=encodeURIComponent(f)+"="+h}else h=encodeURIComponent(f)+"=",f=A.string(g),b+=h+encodeURIComponent(f)}"GET"==this.parent.method&&""!=b&&(a=-1<a.indexOf("?")?a+("&"+b):a+("?"+b),b="")}this.request.open(A.string(this.parent.method),a,!0);0<this.parent.timeout&&(this.request.timeout=this.parent.timeout);this.binary&&
(this.request.responseType="arraybuffer");a=null;h=0;for(c=this.parent.headers;h<c.length;)d=c[h],++h,"Content-Type"==d.name?a=d.value:this.request.setRequestHeader(d.name,d.value);null!=this.parent.contentType&&(a=this.parent.contentType);null==a&&(null!=this.parent.data?a="application/octet-stream":""!=b&&(a="application/x-www-form-urlencoded"));null!=a&&this.request.setRequestHeader("Content-Type",a);this.parent.withCredentials&&(this.request.withCredentials=!0);null!=this.parent.data?this.request.send(this.parent.data.b.bufferValue):
this.request.send(b)},loadData:function(a){var b=new Yd;$a.activeRequests<$a.requestLimit?($a.activeRequests++,this.__loadData(a,b)):$a.requestQueue.add({instance:this,uri:a,promise:b,type:"BINARY",options:0});return b.future},loadText:function(a){var b=new Yd;$a.activeRequests<$a.requestLimit?($a.activeRequests++,this.__loadText(a,b)):$a.requestQueue.add({instance:this,uri:a,promise:b,type:"TEXT",options:0});return b.future},processResponse:function(){if(this.parent.enableResponseHeaders){this.parent.responseHeaders=
[];for(var a,b,c=0,d=this.request.getAllResponseHeaders().split("\n");c<d.length;)b=d[c],++c,a=R.trim(I.substr(b,0,b.indexOf(":"))),b=R.trim(I.substr(b,b.indexOf(":")+1,null)),""!=a&&this.parent.responseHeaders.push(new fm(a,b))}this.parent.responseStatus=this.request.status},__loadData:function(a,b){var c=this;this.binary=!0;this.load(a,function(a){b.progress(a.loaded,a.total)},function(a){4==c.request.readyState&&(null!=c.request.status&&(200<=c.request.status&&400>c.request.status||c.validStatus0&&
0==c.request.status)?(a=null,""==c.request.responseType?null!=c.request.responseText&&(a=ib.ofString(c.request.responseText)):null!=c.request.response&&(a=ib.ofData(c.request.response)),c.processResponse(),b.complete(a)):(c.processResponse(),b.error(c.request.status)),c.request=null,$a.activeRequests--,$a.processQueue())})},__loadText:function(a,b){var c=this;this.binary=!1;this.load(a,function(a){b.progress(a.loaded,a.total)},function(a){4==c.request.readyState&&(null!=c.request.status&&(200<=c.request.status&&
400>=c.request.status||c.validStatus0&&0==c.request.status)?(c.processResponse(),b.complete(c.request.responseText)):(c.processResponse(),b.error(c.request.status)),c.request=null,$a.activeRequests--,$a.processQueue())})},__class__:$a};var ob=function(a){this.imeCompositionActive=!1;this.unusedTouchesPool=new Dc;this.scale=1;this.currentTouches=new Xa;this.parent=a;this.cursor=kc.DEFAULT;this.cacheMouseY=this.cacheMouseX=0;var b=a.__attributes;Object.prototype.hasOwnProperty.call(b,"context")||(b.context=
{});this.renderType=b.context.type;Object.prototype.hasOwnProperty.call(b,"element")&&(a.element=b.element);var c=a.element;Object.prototype.hasOwnProperty.call(b,"allowHighDPI")&&b.allowHighDPI&&"dom"!=this.renderType&&(this.scale=window.devicePixelRatio);a.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(b,"width")?b.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(b,"height")?b.height:0;a.__width=this.setWidth;a.__height=this.setHeight;a.id=ob.windowID++;c instanceof
HTMLCanvasElement?this.canvas=c:"dom"==this.renderType?this.div=window.document.createElement("div"):this.canvas=window.document.createElement("canvas");if(null!=this.canvas){var d=this.canvas.style;d.setProperty("-webkit-transform","translateZ(0)",null);d.setProperty("transform","translateZ(0)",null)}else null!=this.div&&(d=this.div.style,d.setProperty("-webkit-transform","translate3D(0,0,0)",null),d.setProperty("transform","translate3D(0,0,0)",null),d.position="relative",d.overflow="hidden",d.setProperty("-webkit-user-select",
"none",null),d.setProperty("-moz-user-select","none",null),d.setProperty("-ms-user-select","none",null),d.setProperty("-o-user-select","none",null));0==a.__width&&0==a.__height&&(null!=c?(a.__width=c.clientWidth,a.__height=c.clientHeight):(a.__width=window.innerWidth,a.__height=window.innerHeight),this.cacheElementWidth=a.__width,this.cacheElementHeight=a.__height,this.resizeElement=!0);null!=this.canvas?(this.canvas.width=Math.round(a.__width*this.scale),this.canvas.height=Math.round(a.__height*
this.scale),this.canvas.style.width=a.__width+"px",this.canvas.style.height=a.__height+"px"):(this.div.style.width=a.__width+"px",this.div.style.height=a.__height+"px");if(Object.prototype.hasOwnProperty.call(b,"resizable")&&b.resizable||!Object.prototype.hasOwnProperty.call(b,"width")&&0==this.setWidth&&0==this.setHeight)a.__resizable=!0;this.updateSize();if(null!=c){null!=this.canvas?c!=this.canvas&&c.appendChild(this.canvas):c.appendChild(this.div);b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" ");
for(d=0;d<b.length;){var e=b[d];++d;c.addEventListener(e,r(this,this.handleMouseEvent),!0)}c.addEventListener("contextmenu",r(this,this.handleContextMenuEvent),!0);c.addEventListener("dragstart",r(this,this.handleDragEvent),!0);c.addEventListener("dragover",r(this,this.handleDragEvent),!0);c.addEventListener("drop",r(this,this.handleDragEvent),!0);c.addEventListener("touchstart",r(this,this.handleTouchEvent),!0);c.addEventListener("touchmove",r(this,this.handleTouchEvent),!0);c.addEventListener("touchend",
r(this,this.handleTouchEvent),!0);c.addEventListener("touchcancel",r(this,this.handleTouchEvent),!0);c.addEventListener("gamepadconnected",r(this,this.handleGamepadEvent),!0);c.addEventListener("gamepaddisconnected",r(this,this.handleGamepadEvent),!0)}this.createContext();"webgl"==a.context.type&&(this.canvas.addEventListener("webglcontextlost",r(this,this.handleContextEvent),!1),this.canvas.addEventListener("webglcontextrestored",r(this,this.handleContextEvent),!1))};k["lime._internal.backend.html5.HTML5Window"]=
ob;ob.__name__="lime._internal.backend.html5.HTML5Window";ob.prototype={canvas:null,div:null,cacheElementHeight:null,cacheElementWidth:null,cacheMouseX:null,cacheMouseY:null,cursor:null,currentTouches:null,isFullscreen:null,parent:null,primaryTouch:null,renderType:null,requestedFullscreen:null,resizeElement:null,scale:null,setHeight:null,setWidth:null,textInputEnabled:null,textInputRect:null,unusedTouchesPool:null,__focusPending:null,alert:function(a,b){null!=a&&window.alert(A.string(a))},close:function(){this.parent.application.__removeWindow(this.parent)},
createContext:function(){var a=new ro,b=this.parent.__attributes.context;a.window=this.parent;a.attributes=b;if(null!=this.div)a.dom=this.div,a.type="dom",a.version="";else if(null!=this.canvas){var c=null,d="canvas"==this.renderType,e="opengl"==this.renderType||"opengles"==this.renderType||"webgl"==this.renderType,f=!Object.prototype.hasOwnProperty.call(b,"version")||"1"!=b.version,g=!1;if(e||!d&&(!Object.prototype.hasOwnProperty.call(b,"hardware")||b.hardware)){d=Object.prototype.hasOwnProperty.call(b,
"background")&&null==b.background;e=Object.prototype.hasOwnProperty.call(b,"colorDepth")?b.colorDepth:16;var h=Object.prototype.hasOwnProperty.call(b,"antialiasing")&&0<b.antialiasing,m=Object.prototype.hasOwnProperty.call(b,"depth")?b.depth:!0;b=Object.prototype.hasOwnProperty.call(b,"stencil")&&b.stencil;b={alpha:d||16<e,antialias:h,depth:m,premultipliedAlpha:!0,stencil:b,preserveDrawingBuffer:!1,failIfMajorPerformanceCaveat:!1};d=["webgl","experimental-webgl"];f&&d.unshift("webgl2");for(f=0;f<
d.length&&(e=d[f],++f,c=this.canvas.getContext(e,b),null!=c&&"webgl2"==e&&(g=!0),null==c););}null==c?(a.canvas2D=this.canvas.getContext("2d"),a.type="canvas",a.version=""):(a.webgl=$b.fromWebGL2RenderContext(c),g&&(a.webgl2=c),null==t.context&&(t.context=c,t.type="webgl",t.version=g?2:1),a.type="webgl",a.version=g?"2":"1")}this.parent.context=a},focus:function(){},focusTextInput:function(){var a=this;this.__focusPending||(this.__focusPending=!0,Oe.delay(function(){a.__focusPending=!1;a.textInputEnabled&&
ob.textInput.focus()},20))},getCursor:function(){return this.cursor},getDisplay:function(){return Qa.getDisplay(0)},getDisplayMode:function(){return Qa.getDisplay(0).currentMode},getFrameRate:function(){return null==this.parent.application?0:0>this.parent.application.__backend.framePeriod?60:1E3==this.parent.application.__backend.framePeriod?0:1E3/this.parent.application.__backend.framePeriod},getMouseLock:function(){return!1},getTextInputEnabled:function(){return this.textInputEnabled},handleContextEvent:function(a){switch(a.type){case "webglcontextlost":a.cancelable&&
a.preventDefault();this.parent.context=null;this.parent.onRenderContextLost.dispatch();break;case "webglcontextrestored":this.createContext(),this.parent.onRenderContextRestored.dispatch(this.parent.context)}},handleContextMenuEvent:function(a){(this.parent.onMouseUp.canceled||this.parent.onMouseDown.canceled)&&a.cancelable&&a.preventDefault()},handleCutOrCopyEvent:function(a){var b=he.get_text();null==b&&(b="");a.clipboardData.setData("text/plain",b);a.cancelable&&a.preventDefault()},handleDragEvent:function(a){switch(a.type){case "dragover":return a.preventDefault(),
!1;case "dragstart":if("img"==U.__cast(a.target,HTMLElement).nodeName.toLowerCase()&&a.cancelable)return a.preventDefault(),!1;break;case "drop":if(null!=a.dataTransfer&&0<a.dataTransfer.files.length)return this.parent.onDropFile.dispatch(a.dataTransfer.files),a.preventDefault(),!1}return!0},handleFocusEvent:function(a){this.textInputEnabled&&(null==a.relatedTarget||this.isDescendent(a.relatedTarget))&&this.focusTextInput()},handleFullscreenEvent:function(a){if(null!=(document.fullscreenElement||
document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement))this.isFullscreen=!0,this.parent.__fullscreen=!0,this.requestedFullscreen&&(this.requestedFullscreen=!1,this.parent.onFullscreen.dispatch());else{this.isFullscreen=!1;this.parent.__fullscreen=!1;this.parent.onRestore.dispatch();a=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];for(var b=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror","MSFullscreenError"],
c=0,d=a.length;c<d;){var e=c++;window.document.removeEventListener(a[e],r(this,this.handleFullscreenEvent),!1);window.document.removeEventListener(b[e],r(this,this.handleFullscreenEvent),!1)}}},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":Xc.__connect(a.gamepad.index);"standard"==a.gamepad.mapping&&Gd.__connect(a.gamepad.index);break;case "gamepaddisconnected":Xc.__disconnect(a.gamepad.index),Gd.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){this.imeCompositionActive||
ob.textInput.value==ob.dummyCharacter||(a=R.replace(ob.textInput.value,ob.dummyCharacter,""),0<a.length&&this.parent.onTextInput.dispatch(a),ob.textInput.value=ob.dummyCharacter)},handleMouseEvent:function(a){if("wheel"!=a.type){if(null!=this.parent.element)if(null!=this.canvas){var b=this.canvas.getBoundingClientRect();var c=this.parent.__width/b.width*(a.clientX-b.left);b=this.parent.__height/b.height*(a.clientY-b.top)}else null!=this.div?(b=this.div.getBoundingClientRect(),c=a.clientX-b.left,b=
a.clientY-b.top):(b=this.parent.element.getBoundingClientRect(),c=this.parent.__width/b.width*(a.clientX-b.left),b=this.parent.__height/b.height*(a.clientY-b.top));else c=a.clientX,b=a.clientY;switch(a.type){case "mousedown":a.currentTarget==this.parent.element&&window.addEventListener("mouseup",r(this,this.handleMouseEvent));this.parent.onMouseDown.dispatch(c,b,a.button);this.parent.onMouseDown.canceled&&a.cancelable&&a.preventDefault();break;case "mouseenter":a.target==this.parent.element&&(this.parent.onEnter.dispatch(),
this.parent.onEnter.canceled&&a.cancelable&&a.preventDefault());break;case "mouseleave":a.target==this.parent.element&&(this.parent.onLeave.dispatch(),this.parent.onLeave.canceled&&a.cancelable&&a.preventDefault());break;case "mousemove":if(c!=this.cacheMouseX||b!=this.cacheMouseY)this.parent.onMouseMove.dispatch(c,b),this.parent.onMouseMoveRelative.dispatch(c-this.cacheMouseX,b-this.cacheMouseY),(this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&a.cancelable&&a.preventDefault();
break;case "mouseup":window.removeEventListener("mouseup",r(this,this.handleMouseEvent)),a.currentTarget==this.parent.element&&a.stopPropagation(),this.parent.onMouseUp.dispatch(c,b,a.button),this.parent.onMouseUp.canceled&&a.cancelable&&a.preventDefault()}this.cacheMouseX=c;this.cacheMouseY=b}else{switch(a.deltaMode){case 0:c=sh.PIXELS;break;case 1:c=sh.LINES;break;case 2:c=sh.PAGES;break;default:c=sh.UNKNOWN}this.parent.onMouseWheel.dispatch(a.deltaX,-a.deltaY,c);this.parent.onMouseWheel.canceled&&
a.cancelable&&a.preventDefault()}},handlePasteEvent:function(a){if(-1<a.clipboardData.types.indexOf("text/plain")){var b=a.clipboardData.getData("text/plain");he.set_text(b);this.textInputEnabled&&this.parent.onTextInput.dispatch(b);a.cancelable&&a.preventDefault()}},handleResizeEvent:function(a){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(a){a.cancelable&&a.preventDefault();var b=null;null!=this.parent.element&&(b=null!=this.canvas?this.canvas.getBoundingClientRect():null!=
this.div?this.div.getBoundingClientRect():this.parent.element.getBoundingClientRect());var c=this.setWidth,d=this.setHeight;if(0==c||0==d)null!=b?(c=b.width,d=b.height):d=c=1;for(var e,f,g,h,m,l=0,n=a.changedTouches;l<n.length;){var p=n[l];++l;null!=b?(f=c/b.width*(p.clientX-b.left),g=d/b.height*(p.clientY-b.top)):(f=p.clientX,g=p.clientY);if("touchstart"==a.type)e=this.unusedTouchesPool.pop(),null==e?e=new kd(f/c,g/d,p.identifier,0,0,p.force,this.parent.id):(e.x=f/c,e.y=g/d,e.id=p.identifier,e.dx=
0,e.dy=0,e.pressure=p.force,e.device=this.parent.id),this.currentTouches.h[p.identifier]=e,kd.onStart.dispatch(e),null==this.primaryTouch&&(this.primaryTouch=e),e==this.primaryTouch&&this.parent.onMouseDown.dispatch(f,g,0);else if(e=this.currentTouches.h[p.identifier],null!=e)switch(h=e.x,m=e.y,e.x=f/c,e.y=g/d,e.dx=e.x-h,e.dy=e.y-m,e.pressure=p.force,a.type){case "touchcancel":kd.onCancel.dispatch(e);this.currentTouches.remove(p.identifier);this.unusedTouchesPool.add(e);e==this.primaryTouch&&(this.primaryTouch=
null);break;case "touchend":kd.onEnd.dispatch(e);this.currentTouches.remove(p.identifier);this.unusedTouchesPool.add(e);e==this.primaryTouch&&(this.parent.onMouseUp.dispatch(f,g,0),this.primaryTouch=null);break;case "touchmove":kd.onMove.dispatch(e),e==this.primaryTouch&&this.parent.onMouseMove.dispatch(f,g)}}},isDescendent:function(a){if(a==this.parent.element)return!0;for(;null!=a;){if(a.parentNode==this.parent.element)return!0;a=a.parentNode}return!1},move:function(a,b){},readPixels:function(a){if(null!=
this.canvas){var b=new Dd(0,0,this.canvas.width,this.canvas.height);null==a?a=b:a.intersection(b,a);if(0<a.width&&0<a.height)return b=window.document.createElement("canvas"),b.width=a.width|0,b.height=a.height|0,b.getContext("2d").drawImage(this.canvas,-a.x,-a.y),Fb.fromCanvas(b)}return null},resize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){null==ob.textArea&&(ob.textArea=window.document.createElement("textarea"),ob.textArea.style.height="0px",ob.textArea.style.left=
"-100px",ob.textArea.style.opacity="0",ob.textArea.style.position="fixed",ob.textArea.style.top="-100px",ob.textArea.style.width="0px",window.document.body.appendChild(ob.textArea));ob.textArea.value=a;ob.textArea.focus();ob.textArea.select();window.document.queryCommandEnabled("copy")&&window.document.execCommand("copy");this.textInputEnabled&&this.focusTextInput()},setCursor:function(a){if(this.cursor!=a){if(null==a)this.parent.element.style.cursor="none";else{switch(a._hx_index){case 0:var b="default";
break;case 1:b="crosshair";break;case 3:b="move";break;case 4:b="pointer";break;case 5:b="nesw-resize";break;case 6:b="ns-resize";break;case 7:b="nwse-resize";break;case 8:b="ew-resize";break;case 9:b="text";break;case 10:b="wait";break;case 11:b="wait";break;default:b="auto"}this.parent.element.style.cursor=b}this.cursor=a}return this.cursor},setDisplayMode:function(a){return a},setFrameRate:function(a){null!=this.parent.application&&(60<=a?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=
-1):0<a?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=1E3/a):this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=1E3));return a},setFullscreen:function(a){a?this.requestedFullscreen||this.isFullscreen||(this.requestedFullscreen=!0,(C=this.parent.element,r(C,C.requestFullscreen))?(document.addEventListener("fullscreenchange",r(this,this.handleFullscreenEvent),!1),document.addEventListener("fullscreenerror",r(this,
this.handleFullscreenEvent),!1),this.parent.element.requestFullscreen()):this.parent.element.mozRequestFullScreen?(document.addEventListener("mozfullscreenchange",r(this,this.handleFullscreenEvent),!1),document.addEventListener("mozfullscreenerror",r(this,this.handleFullscreenEvent),!1),this.parent.element.mozRequestFullScreen()):this.parent.element.webkitRequestFullscreen?(document.addEventListener("webkitfullscreenchange",r(this,this.handleFullscreenEvent),!1),document.addEventListener("webkitfullscreenerror",
r(this,this.handleFullscreenEvent),!1),this.parent.element.webkitRequestFullscreen()):this.parent.element.msRequestFullscreen&&(document.addEventListener("MSFullscreenChange",r(this,this.handleFullscreenEvent),!1),document.addEventListener("MSFullscreenError",r(this,this.handleFullscreenEvent),!1),this.parent.element.msRequestFullscreen())):this.isFullscreen&&(this.requestedFullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():
document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen());return a},setIcon:function(a){ya.convertToCanvas(a);var b=window.document.querySelector("link[rel*='icon']");null==b&&(b=window.document.createElement("link"));b.type="image/x-icon";b.rel="shortcut icon";b.href=a.buffer.get_src().toDataURL("image/x-icon");window.document.getElementsByTagName("head")[0].appendChild(b)},setMaximized:function(a){return!1},setMinimized:function(a){return!1},
setMouseLock:function(a){},setResizable:function(a){return a},setTextInputEnabled:function(a){a?(null==ob.textInput&&(ob.textInput=window.document.createElement("input"),ob.textInput.type="password",ob.textInput.style.position="absolute",ob.textInput.style.opacity="0",ob.textInput.style.color="transparent",ob.textInput.value=ob.dummyCharacter,ob.textInput.autocapitalize="off",ob.textInput.autocorrect="off",ob.textInput.autocomplete="off",ob.textInput.style.left="0px",ob.textInput.style.top="50%",
(new aa("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(ob.textInput.style.fontSize="0px",ob.textInput.style.width="0px",ob.textInput.style.height="0px"):(ob.textInput.style.width="1px",ob.textInput.style.height="1px"),ob.textInput.style.pointerEvents="none",ob.textInput.style.zIndex="-10000000"),null==ob.textInput.parentNode&&this.parent.element.appendChild(ob.textInput),this.textInputEnabled||(ob.textInput.addEventListener("input",r(this,this.handleInputEvent),!0),ob.textInput.addEventListener("blur",
r(this,this.handleFocusEvent),!0),ob.textInput.addEventListener("cut",r(this,this.handleCutOrCopyEvent),!0),ob.textInput.addEventListener("copy",r(this,this.handleCutOrCopyEvent),!0),ob.textInput.addEventListener("paste",r(this,this.handlePasteEvent),!0),ob.textInput.addEventListener("compositionstart",r(this,this.handleCompositionstartEvent),!0),ob.textInput.addEventListener("compositionend",r(this,this.handleCompositionendEvent),!0)),ob.textInput.focus(),ob.textInput.select()):null!=ob.textInput&&
(ob.textInput.blur(),ob.textInput.removeEventListener("input",r(this,this.handleInputEvent),!0),ob.textInput.removeEventListener("blur",r(this,this.handleFocusEvent),!0),ob.textInput.removeEventListener("cut",r(this,this.handleCutOrCopyEvent),!0),ob.textInput.removeEventListener("copy",r(this,this.handleCutOrCopyEvent),!0),ob.textInput.removeEventListener("paste",r(this,this.handlePasteEvent),!0),ob.textInput.removeEventListener("compositionstart",r(this,this.handleCompositionstartEvent),!0),ob.textInput.removeEventListener("compositionend",
r(this,this.handleCompositionendEvent),!0));return this.textInputEnabled=a},setTextInputRect:function(a){return this.textInputRect=a},imeCompositionActive:null,handleCompositionstartEvent:function(a){this.imeCompositionActive=!0},handleCompositionendEvent:function(a){this.imeCompositionActive=!1;this.handleInputEvent(a)},setTitle:function(a){null!=a&&(window.document.title=a);return a},updateSize:function(){if(this.parent.__resizable){if(null!=this.parent.element){var a=this.parent.element.clientWidth;
var b=this.parent.element.clientHeight}else a=window.innerWidth,b=window.innerHeight;if(a!=this.cacheElementWidth||b!=this.cacheElementHeight){this.cacheElementWidth=a;this.cacheElementHeight=b;var c=this.resizeElement||0==this.setWidth&&0==this.setHeight;if(null!=this.parent.element&&(null==this.div||null!=this.div&&c))if(c){if(this.parent.__width!=a||this.parent.__height!=b)this.parent.__width=a,this.parent.__height=b,null!=this.canvas?this.parent.element!=this.canvas&&(this.canvas.width=Math.round(a*
this.scale),this.canvas.height=Math.round(b*this.scale),this.canvas.style.width=a+"px",this.canvas.style.height=b+"px"):(this.div.style.width=a+"px",this.div.style.height=b+"px"),this.parent.onResize.dispatch(a,b)}else{c=0!=this.setWidth?a/this.setWidth:1;var d=0!=this.setHeight?b/this.setHeight:1,e=a,f=b,g=0,h=0;c<d?(f=Math.floor(this.setHeight*c),h=Math.floor((b-f)/2)):(e=Math.floor(this.setWidth*d),g=Math.floor((a-e)/2));null!=this.canvas?this.parent.element!=this.canvas&&(this.canvas.style.width=
e+"px",this.canvas.style.height=f+"px",this.canvas.style.marginLeft=g+"px",this.canvas.style.marginTop=h+"px"):(this.div.style.width=e+"px",this.div.style.height=f+"px",this.div.style.marginLeft=g+"px",this.div.style.marginTop=h+"px")}}}},warpMouse:function(a,b){},__class__:ob};var ds=function(){};k["lime._internal.backend.native.NativeCFFI"]=ds;ds.__name__="lime._internal.backend.native.NativeCFFI";var fr=function(){};k["lime._internal.format.BMP"]=fr;fr.__name__="lime._internal.format.BMP";fr.encode=
function(a,b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);null==b&&(b=Ph.RGB);var c=14,d=40,e=a.width*a.height*4;if(null!=b)switch(b._hx_index){case 0:e=(3*a.width+3*a.width%4)*a.height;break;case 1:d=108;break;case 2:c=0,e+=a.width*a.height}var f=new ib(new ArrayBuffer(c+d+e)),g=0;0<c&&(f.b[g++]=66,f.b[g++]=77,f.setInt32(g,f.length),g+=4,f.setUInt16(g,0),g+=2,f.setUInt16(g,0),g+=2,f.setInt32(g,c+d),g+=4);f.setInt32(g,d);g+=4;f.setInt32(g,a.width);
g+=4;f.setInt32(g,b==Ph.ICO?2*a.height:a.height);g+=4;f.setUInt16(g,1);g+=2;f.setUInt16(g,b==Ph.RGB?24:32);g+=2;f.setInt32(g,b==Ph.BITFIELD?3:0);g+=4;f.setInt32(g,e);g+=4;f.setInt32(g,11824);g+=4;f.setInt32(g,11824);g+=4;f.setInt32(g,0);g+=4;f.setInt32(g,0);g+=4;if(b==Ph.BITFIELD)for(f.setInt32(g,16711680),g+=4,f.setInt32(g,65280),g+=4,f.setInt32(g,255),g+=4,f.setInt32(g,-16777216),g+=4,f.b[g++]=32,f.b[g++]=110,f.b[g++]=105,f.b[g++]=87,c=0;48>c;)c++,f.b[g++]=0;d=a.getPixels(new Dd(0,0,a.width,a.height),
1);if(null!=b)switch(b._hx_index){case 0:c=0;for(b=a.height;c<b;){var h=c++;h=4*(a.height-1-h)*a.width;for(var m=0,l=a.width;m<l;){m++;h++;var n=d.b[h++];var p=d.b[h++];var k=d.b[h++];f.b[g++]=k&255;f.b[g++]=p&255;f.b[g++]=n&255}e=0;for(var q=3*a.width%4;e<q;)e++,f.b[g++]=0}break;case 1:c=0;for(b=a.height;c<b;)for(h=c++,h=4*(a.height-1-h)*a.width,m=0,l=a.width;m<l;){m++;var t=d.b[h++];n=d.b[h++];p=d.b[h++];k=d.b[h++];f.b[g++]=k&255;f.b[g++]=p&255;f.b[g++]=n&255;f.b[g++]=t&255}break;case 2:e=new ib(new ArrayBuffer(a.width*
a.height));c=q=0;for(b=a.height;c<b;)for(h=c++,h=4*(a.height-1-h)*a.width,m=0,l=a.width;m<l;)m++,t=d.b[h++],n=d.b[h++],p=d.b[h++],k=d.b[h++],f.b[g++]=k&255,f.b[g++]=p&255,f.b[g++]=n&255,f.b[g++]=t&255,e.b[q++]=0;f.blit(g,e,0,a.width*a.height)}return f};var Ph=x["lime._internal.format.BMPType"]={__ename__:"lime._internal.format.BMPType",__constructs__:null,RGB:{_hx_name:"RGB",_hx_index:0,__enum__:"lime._internal.format.BMPType",toString:v},BITFIELD:{_hx_name:"BITFIELD",_hx_index:1,__enum__:"lime._internal.format.BMPType",
toString:v},ICO:{_hx_name:"ICO",_hx_index:2,__enum__:"lime._internal.format.BMPType",toString:v}};Ph.__constructs__=[Ph.RGB,Ph.BITFIELD,Ph.ICO];var Qf=function(){};k["lime._internal.format.Base64"]=Qf;Qf.__name__="lime._internal.format.Base64";Qf.decode=function(a){return rh.decode(a)};Qf.encode=function(a){var b=[],c=Qf.DICTIONARY,d=Qf.EXTENDED_DICTIONARY,e=a.length,f=Math.floor(e/3),g=2*f;b.length=2*Math.ceil(e/3);for(var h=0,m=0,l;m<g;)l=a.b[h]<<16|a.b[h+1]<<8|a.b[h+2],b[m]=d[l>>12&4095],b[m+1]=
d[l&4095],h+=3,m+=2;switch(e-3*f){case 1:l=a.b[h]<<16;b[m]=d[l>>12&4095];b[m+1]="==";break;case 2:l=a.b[h]<<16|a.b[h+1]<<8,b[m]=d[l>>12&4095],b[m+1]=c[l>>6&63]+"="}return b.join("")};var gm=function(){};k["lime._internal.format.Deflate"]=gm;gm.__name__="lime._internal.format.Deflate";gm.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);return ib.ofData(a)};gm.decompress=function(a){a=pako.inflateRaw(a.b.bufferValue);return ib.ofData(a)};var hm=function(){};k["lime._internal.format.GZip"]=hm;
hm.__name__="lime._internal.format.GZip";hm.compress=function(a){a=pako.gzip(a.b.bufferValue);return ib.ofData(a)};hm.decompress=function(a){a=pako.ungzip(a.b.bufferValue);return ib.ofData(a)};var im=function(){};k["lime._internal.format.JPEG"]=im;im.__name__="lime._internal.format.JPEG";im.decodeBytes=function(a,b){return null};im.decodeFile=function(a,b){return null};im.encode=function(a,b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);ya.convertToCanvas(a,
!1);if(null!=a.buffer.__srcCanvas){a=a.buffer.__srcCanvas.toDataURL("image/jpeg",b/100);a=window.atob(a.split(";base64,")[1]);b=new ib(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var e=c++;b.b[e]=I.cca(a,e)&255}return b}return null};var jm=function(){};k["lime._internal.format.LZMA"]=jm;jm.__name__="lime._internal.format.LZMA";jm.compress=function(a){return null};jm.decompress=function(a){return null};var Jj=function(){};k["lime._internal.format.PNG"]=Jj;Jj.__name__="lime._internal.format.PNG";
Jj.decodeBytes=function(a,b){return null};Jj.decodeFile=function(a,b){return null};Jj.encode=function(a){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);ya.convertToCanvas(a,!1);if(null!=a.buffer.__srcCanvas){a=a.buffer.__srcCanvas.toDataURL("image/png");a=window.atob(a.split(";base64,")[1]);for(var b=new ib(new ArrayBuffer(a.length)),c=0,d=a.length;c<d;){var e=c++;b.b[e]=I.cca(a,e)&255}return b}return null};var km=function(){};k["lime._internal.format.Zlib"]=
km;km.__name__="lime._internal.format.Zlib";km.compress=function(a){a=pako.deflate(a.b.bufferValue);return ib.ofData(a)};km.decompress=function(a){a=pako.inflate(a.b.bufferValue);return ib.ofData(a)};var ya=function(){};k["lime._internal.graphics.ImageCanvasUtil"]=ya;ya.__name__="lime._internal.graphics.ImageCanvasUtil";ya.colorTransform=function(a,b,c){ya.convertToData(a);Za.colorTransform(a,b,c)};ya.convertToCanvas=function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage?(null==c.__srcCanvas&&
(ya.createCanvas(a,c.__srcImage.width,c.__srcImage.height),c.__srcContext.drawImage(c.__srcImage,0,0)),c.__srcImage=null):null==c.__srcCanvas&&null!=c.data?(a.set_transparent(!0),ya.createCanvas(a,c.width,c.height),ya.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,0,0)):a.type==qe.DATA&&null!=c.__srcImageData&&a.dirty&&(c.__srcContext.putImageData(c.__srcImageData,0,0),a.dirty=!1);b?(c.data=null,c.__srcImageData=null):null==c.data&&null!=c.__srcImageData&&(c.data=c.__srcImageData.data);
a.type=qe.CANVAS};ya.convertToData=function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage&&ya.convertToCanvas(a);if(null!=c.__srcCanvas&&null==c.data)ya.createImageData(a),a.type==qe.CANVAS&&(a.dirty=!1);else if(a.type==qe.CANVAS&&null!=c.__srcCanvas&&a.dirty){if(null==c.__srcImageData)ya.createImageData(a);else{c.__srcImageData=c.__srcContext.getImageData(0,0,c.width,c.height);var d=c.__srcImageData.data.buffer;d=null!=d?new Uint8Array(d):null;c.data=d}a.dirty=!1}b&&(a.buffer.__srcCanvas=
null,a.buffer.__srcContext=null);a.type=qe.DATA};ya.copyChannel=function(a,b,c,d,e,f){ya.convertToData(b);ya.convertToData(a);Za.copyChannel(a,b,c,d,e,f)};ya.copyPixels=function(a,b,c,d,e,f,g){null==g&&(g=!1);null==d||d.x>=a.width||d.y>=a.height||null==c||1>c.width||1>c.height||(null!=e&&e.get_transparent()&&(null==f&&(f=new Vd),b=b.clone(),b.copyChannel(e,new Dd(c.x+f.x,c.y+f.y,c.width,c.height),new Vd(c.x,c.y),jf.ALPHA,jf.ALPHA)),ya.convertToCanvas(a,!0),g||a.get_transparent()&&b.get_transparent()&&
a.buffer.__srcContext.clearRect(d.x+a.offsetX,d.y+a.offsetY,c.width+a.offsetX,c.height+a.offsetY),ya.convertToCanvas(b),null!=b.buffer.get_src()&&(a.buffer.__srcContext.globalCompositeOperation="source-over",a.buffer.__srcContext.drawImage(b.buffer.get_src(),c.x+b.offsetX|0,c.y+b.offsetY|0,c.width|0,c.height|0,d.x+a.offsetX|0,d.y+a.offsetY|0,c.width|0,c.height|0)),a.dirty=!0,a.version++)};ya.createCanvas=function(a,b,c){var d=a.buffer;null==d.__srcCanvas&&(d.__srcCanvas=window.document.createElement("canvas"),
d.__srcCanvas.width=b,d.__srcCanvas.height=c,a.get_transparent()?d.__srcContext=d.__srcCanvas.getContext("2d"):(a.get_transparent()||d.__srcCanvas.setAttribute("moz-opaque","true"),d.__srcContext=d.__srcCanvas.getContext("2d",{alpha:!1})))};ya.createImageData=function(a){a=a.buffer;if(null==a.__srcImageData){null==a.data?a.__srcImageData=a.__srcContext.getImageData(0,0,a.width,a.height):(a.__srcImageData=a.__srcContext.createImageData(a.width,a.height),a.__srcImageData.data.set(a.data));var b=a.__srcImageData.data.buffer;
b=null!=b?new Uint8Array(b):null;a.data=b}};ya.fillRect=function(a,b,c,d){ya.convertToCanvas(a);if(1==d){d=c>>16&255;var e=c>>8&255;var f=c&255;c=a.get_transparent()?c>>24&255:255}else d=c>>24&255,e=c>>16&255,f=c>>8&255,c=a.get_transparent()?c&255:255;0==b.x&&0==b.y&&b.width==a.width&&b.height==a.height&&a.get_transparent()&&0==c?a.buffer.__srcCanvas.width=a.buffer.width:(255>c&&a.buffer.__srcContext.clearRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY),0<c&&(a.buffer.__srcContext.fillStyle=
"rgba("+d+", "+e+", "+f+", "+c/255+")",a.buffer.__srcContext.fillRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY)),a.dirty=!0,a.version++)};ya.floodFill=function(a,b,c,d,e){ya.convertToData(a);Za.floodFill(a,b,c,d,e)};ya.getPixel=function(a,b,c,d){ya.convertToData(a);return Za.getPixel(a,b,c,d)};ya.getPixel32=function(a,b,c,d){ya.convertToData(a);return Za.getPixel32(a,b,c,d)};ya.getPixels=function(a,b,c){ya.convertToData(a);return Za.getPixels(a,b,c)};ya.merge=function(a,b,
c,d,e,f,g,h){ya.convertToData(b);ya.convertToData(a);Za.merge(a,b,c,d,e,f,g,h)};ya.resize=function(a,b,c){var d=a.buffer;if(null==d.__srcCanvas)ya.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{ya.convertToCanvas(a,!0);var e=d.__srcCanvas;d.__srcCanvas=null;ya.createCanvas(a,b,c);d.__srcContext.drawImage(e,0,0,b,c)}d.__srcImageData=null;d.data=null;a.dirty=!0;a.version++};ya.scroll=function(a,b,c){if(0!=b%a.width||0!=c%a.height){var d=a.clone();ya.convertToCanvas(a,!0);a.buffer.__srcContext.clearRect(b,
c,a.width,a.height);a.buffer.__srcContext.drawImage(d.get_src(),b,c);a.dirty=!0;a.version++}};ya.setPixel=function(a,b,c,d,e){ya.convertToData(a);Za.setPixel(a,b,c,d,e)};ya.setPixel32=function(a,b,c,d,e){ya.convertToData(a);Za.setPixel32(a,b,c,d,e)};ya.setPixels=function(a,b,c,d,e){ya.convertToData(a);Za.setPixels(a,b,c,d,e)};ya.sync=function(a,b){null!=a&&(a.type!=qe.CANVAS||null==a.buffer.__srcCanvas&&null==a.buffer.data?a.type==qe.DATA&&ya.convertToData(a,b):ya.convertToCanvas(a,b))};var Za=function(){};
k["lime._internal.graphics.ImageDataUtil"]=Za;Za.__name__="lime._internal.graphics.ImageDataUtil";Za.displaceMap=function(a,b,c,d,e,f,g){var h=a.buffer.data,m=b.buffer.data,l=c.buffer.data,n=a.buffer.format,p=b.buffer.format,k=c.buffer.format,q=a.get_premultiplied(),t=b.get_premultiplied(),v=c.get_premultiplied();b=new Ge(b);c=new Ge(c);for(var r,Ka,S=0,u=0,P,x,C,F=0,z=0,y=0,ka=0,B,I=0,G=b.height;I<G;){var A=I++;r=b.byteOffset+b.stride*A;for(var D=0,K=b.width;D<K;){var w=D++;Ka=r+4*w;C=d.x|0;P=d.y|
0;if(g){u=b.byteOffset+b.stride*(A-P+1)+4*(w-C);x=k;B=v;null==B&&(B=!1);null==x&&(x=0);switch(x){case 0:F=(l[u]&255)<<24|(l[u+1]&255)<<16|(l[u+2]&255)<<8|l[u+3]&255;break;case 1:F=(l[u+1]&255)<<24|(l[u+2]&255)<<16|(l[u+3]&255)<<8|l[u]&255;break;case 2:F=(l[u+2]&255)<<24|(l[u+1]&255)<<16|(l[u]&255)<<8|l[u+3]&255}B&&0!=(F&255)&&255!=(F&255)&&(H.unmult=255/(F&255),F=(H.__clamp[Math.round((F>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((F>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((F>>>
8&255)*H.unmult)]&255)<<8|F&255);u=b.byteOffset+b.stride*(A-P)+4*(w-C+1);x=k;B=v;null==B&&(B=!1);null==x&&(x=0);switch(x){case 0:z=(l[u]&255)<<24|(l[u+1]&255)<<16|(l[u+2]&255)<<8|l[u+3]&255;break;case 1:z=(l[u+1]&255)<<24|(l[u+2]&255)<<16|(l[u+3]&255)<<8|l[u]&255;break;case 2:z=(l[u+2]&255)<<24|(l[u+1]&255)<<16|(l[u]&255)<<8|l[u+3]&255}B&&0!=(z&255)&&255!=(z&255)&&(H.unmult=255/(z&255),z=(H.__clamp[Math.round((z>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((z>>>16&255)*H.unmult)]&255)<<16|
(H.__clamp[Math.round((z>>>8&255)*H.unmult)]&255)<<8|z&255);u=b.byteOffset+b.stride*(A-P+1)+4*(w-C+1);x=k;B=v;null==B&&(B=!1);null==x&&(x=0);switch(x){case 0:y=(l[u]&255)<<24|(l[u+1]&255)<<16|(l[u+2]&255)<<8|l[u+3]&255;break;case 1:y=(l[u+1]&255)<<24|(l[u+2]&255)<<16|(l[u+3]&255)<<8|l[u]&255;break;case 2:y=(l[u+2]&255)<<24|(l[u+1]&255)<<16|(l[u]&255)<<8|l[u+3]&255}B&&0!=(y&255)&&255!=(y&255)&&(H.unmult=255/(y&255),y=(H.__clamp[Math.round((y>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((y>>>
16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((y>>>8&255)*H.unmult)]&255)<<8|y&255);u=b.byteOffset+b.stride*(A-P)+4*(w-C);x=k;B=v;null==B&&(B=!1);null==x&&(x=0);switch(x){case 0:ka=(l[u]&255)<<24|(l[u+1]&255)<<16|(l[u+2]&255)<<8|l[u+3]&255;break;case 1:ka=(l[u+1]&255)<<24|(l[u+2]&255)<<16|(l[u+3]&255)<<8|l[u]&255;break;case 2:ka=(l[u+2]&255)<<24|(l[u+1]&255)<<16|(l[u]&255)<<8|l[u+3]&255}B&&0!=(ka&255)&&255!=(ka&255)&&(H.unmult=255/(ka&255),ka=(H.__clamp[Math.round((ka>>>24&255)*H.unmult)]&255)<<
24|(H.__clamp[Math.round((ka>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((ka>>>8&255)*H.unmult)]&255)<<8|ka&255);u=Za.bilinear(F,z,y,ka,d.x-C,d.y-P)}else{C=c.byteOffset+c.stride*(A-P)+4*(w-C);P=k;x=v;null==x&&(x=!1);null==P&&(P=0);switch(P){case 0:u=(l[C]&255)<<24|(l[C+1]&255)<<16|(l[C+2]&255)<<8|l[C+3]&255;break;case 1:u=(l[C+1]&255)<<24|(l[C+2]&255)<<16|(l[C+3]&255)<<8|l[C]&255;break;case 2:u=(l[C+2]&255)<<24|(l[C+1]&255)<<16|(l[C]&255)<<8|l[C+3]&255}x&&0!=(u&255)&&255!=(u&255)&&(H.unmult=
255/(u&255),u=(H.__clamp[Math.round((u>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((u>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((u>>>8&255)*H.unmult)]&255)<<8|u&255)}C=(u&255)/255;P=((u>>>24&255)-128)/255*C;x=((u>>>16&255)-128)/255*C;C=P*e.x+x*f.x;B=P*e.y+x*f.y;P=Math.floor(C*b.width);x=Math.floor(B*b.height);if(g){S=b.byteOffset+b.stride*(A+x+1)+4*(w+P);var J=p,M=t;null==M&&(M=!1);null==J&&(J=0);switch(J){case 0:F=(m[S]&255)<<24|(m[S+1]&255)<<16|(m[S+2]&255)<<8|m[S+3]&255;break;
case 1:F=(m[S+1]&255)<<24|(m[S+2]&255)<<16|(m[S+3]&255)<<8|m[S]&255;break;case 2:F=(m[S+2]&255)<<24|(m[S+1]&255)<<16|(m[S]&255)<<8|m[S+3]&255}M&&0!=(F&255)&&255!=(F&255)&&(H.unmult=255/(F&255),F=(H.__clamp[Math.round((F>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((F>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((F>>>8&255)*H.unmult)]&255)<<8|F&255);S=b.byteOffset+b.stride*(A+x)+4*(w+P+1);J=p;M=t;null==M&&(M=!1);null==J&&(J=0);switch(J){case 0:z=(m[S]&255)<<24|(m[S+1]&255)<<16|(m[S+2]&
255)<<8|m[S+3]&255;break;case 1:z=(m[S+1]&255)<<24|(m[S+2]&255)<<16|(m[S+3]&255)<<8|m[S]&255;break;case 2:z=(m[S+2]&255)<<24|(m[S+1]&255)<<16|(m[S]&255)<<8|m[S+3]&255}M&&0!=(z&255)&&255!=(z&255)&&(H.unmult=255/(z&255),z=(H.__clamp[Math.round((z>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((z>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((z>>>8&255)*H.unmult)]&255)<<8|z&255);S=b.byteOffset+b.stride*(A+x+1)+4*(w+P+1);J=p;M=t;null==M&&(M=!1);null==J&&(J=0);switch(J){case 0:y=(m[S]&255)<<
24|(m[S+1]&255)<<16|(m[S+2]&255)<<8|m[S+3]&255;break;case 1:y=(m[S+1]&255)<<24|(m[S+2]&255)<<16|(m[S+3]&255)<<8|m[S]&255;break;case 2:y=(m[S+2]&255)<<24|(m[S+1]&255)<<16|(m[S]&255)<<8|m[S+3]&255}M&&0!=(y&255)&&255!=(y&255)&&(H.unmult=255/(y&255),y=(H.__clamp[Math.round((y>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((y>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((y>>>8&255)*H.unmult)]&255)<<8|y&255);w=b.byteOffset+b.stride*(A+x)+4*(w+P);S=p;J=t;null==J&&(J=!1);null==S&&(S=0);switch(S){case 0:ka=
(m[w]&255)<<24|(m[w+1]&255)<<16|(m[w+2]&255)<<8|m[w+3]&255;break;case 1:ka=(m[w+1]&255)<<24|(m[w+2]&255)<<16|(m[w+3]&255)<<8|m[w]&255;break;case 2:ka=(m[w+2]&255)<<24|(m[w+1]&255)<<16|(m[w]&255)<<8|m[w+3]&255}J&&0!=(ka&255)&&255!=(ka&255)&&(H.unmult=255/(ka&255),ka=(H.__clamp[Math.round((ka>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((ka>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((ka>>>8&255)*H.unmult)]&255)<<8|ka&255);S=Za.bilinear(F,z,y,ka,C*b.width-P,B*b.height-x)}else{w=b.byteOffset+
b.stride*(A+x)+4*(w+P);C=p;P=t;null==P&&(P=!1);null==C&&(C=0);switch(C){case 0:S=(m[w]&255)<<24|(m[w+1]&255)<<16|(m[w+2]&255)<<8|m[w+3]&255;break;case 1:S=(m[w+1]&255)<<24|(m[w+2]&255)<<16|(m[w+3]&255)<<8|m[w]&255;break;case 2:S=(m[w+2]&255)<<24|(m[w+1]&255)<<16|(m[w]&255)<<8|m[w+3]&255}P&&0!=(S&255)&&255!=(S&255)&&(H.unmult=255/(S&255),S=(H.__clamp[Math.round((S>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((S>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((S>>>8&255)*H.unmult)]&255)<<
8|S&255)}w=n;C=q;null==C&&(C=!1);null==w&&(w=0);C&&(0==(S&255)?0!=S&&(S=0):255!=(S&255)&&(H.a16=H.__alpha16[S&255],S=((S>>>24&255)*H.a16>>16&255)<<24|((S>>>16&255)*H.a16>>16&255)<<16|((S>>>8&255)*H.a16>>16&255)<<8|S&255));switch(w){case 0:h[Ka]=S>>>24&255;h[Ka+1]=S>>>16&255;h[Ka+2]=S>>>8&255;h[Ka+3]=S&255;break;case 1:h[Ka]=S&255;h[Ka+1]=S>>>24&255;h[Ka+2]=S>>>16&255;h[Ka+3]=S>>>8&255;break;case 2:h[Ka]=S>>>8&255,h[Ka+1]=S>>>16&255,h[Ka+2]=S>>>24&255,h[Ka+3]=S&255}}}a.dirty=!0;a.version++};Za.bilinear=
function(a,b,c,d,e,f){return Za.lerpRGBA(Za.lerpRGBA(d,b,e),Za.lerpRGBA(a,c,e),f)};Za.lerpRGBA=function(a,b,c){var d=0,e=Math.floor(Za.lerp(a>>>24&255,b>>>24&255,c));d=(e&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255;e=Math.floor(Za.lerp(a>>>16&255,b>>>16&255,c));d=(d>>>24&255)<<24|(e&255)<<16|(d>>>8&255)<<8|d&255;e=Math.floor(Za.lerp(a>>>8&255,b>>>8&255,c));d=(d>>>24&255)<<24|(d>>>16&255)<<16|(e&255)<<8|d&255;e=Math.floor(Za.lerp(a&255,b&255,c));return(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<
8|e&255};Za.lerp4f=function(a,b,c){return new Bc(Za.lerp(a.x,b.x,c),Za.lerp(a.y,b.y,c),Za.lerp(a.z,b.z,c),Za.lerp(a.w,b.w,c))};Za.lerp=function(a,b,c){return(1-c)*a+c*b};Za.colorTransform=function(a,b,c){var d=a.buffer.data;if(null!=d){var e=a.buffer.format,f=a.buffer.premultiplied;b=new Ge(a,b);var g=Hd.getAlphaTable(c),h=Hd.getRedTable(c),m=Hd.getGreenTable(c);c=Hd.getBlueTable(c);for(var l,n,p=0,k=0,q=b.height;k<q;){l=k++;l=b.byteOffset+b.stride*l;for(var t=0,v=b.width;t<v;){n=t++;n=l+4*n;var r=
e,u=f;null==u&&(u=!1);null==r&&(r=0);switch(r){case 0:p=(d[n]&255)<<24|(d[n+1]&255)<<16|(d[n+2]&255)<<8|d[n+3]&255;break;case 1:p=(d[n+1]&255)<<24|(d[n+2]&255)<<16|(d[n+3]&255)<<8|d[n]&255;break;case 2:p=(d[n+2]&255)<<24|(d[n+1]&255)<<16|(d[n]&255)<<8|d[n+3]&255}u&&0!=(p&255)&&255!=(p&255)&&(H.unmult=255/(p&255),p=(H.__clamp[Math.round((p>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((p>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((p>>>8&255)*H.unmult)]&255)<<8|p&255);p=(h[p>>>24&255]&
255)<<24|(m[p>>>16&255]&255)<<16|(c[p>>>8&255]&255)<<8|g[p&255]&255;r=e;u=f;null==u&&(u=!1);null==r&&(r=0);u&&(0==(p&255)?0!=p&&(p=0):255!=(p&255)&&(H.a16=H.__alpha16[p&255],p=((p>>>24&255)*H.a16>>16&255)<<24|((p>>>16&255)*H.a16>>16&255)<<16|((p>>>8&255)*H.a16>>16&255)<<8|p&255));switch(r){case 0:d[n]=p>>>24&255;d[n+1]=p>>>16&255;d[n+2]=p>>>8&255;d[n+3]=p&255;break;case 1:d[n]=p&255;d[n+1]=p>>>24&255;d[n+2]=p>>>16&255;d[n+3]=p>>>8&255;break;case 2:d[n]=p>>>8&255,d[n+1]=p>>>16&255,d[n+2]=p>>>24&255,
d[n+3]=p&255}}}a.dirty=!0;a.version++}};Za.copyChannel=function(a,b,c,d,e,f){switch(f._hx_index){case 0:var g=0;break;case 1:g=1;break;case 2:g=2;break;case 3:g=3}switch(e._hx_index){case 0:var h=0;break;case 1:h=1;break;case 2:h=2;break;case 3:h=3}e=b.buffer.data;f=a.buffer.data;if(null!=e&&null!=f){c=new Ge(b,c);d=new Ge(a,new Dd(d.x,d.y,c.width,c.height));var m=b.buffer.format,l=a.buffer.format;b=b.buffer.premultiplied;for(var n=a.buffer.premultiplied,p,k,q=0,t=0,v=0,r=0,u=d.height;r<u;){k=r++;
p=c.byteOffset+c.stride*k;k=d.byteOffset+d.stride*k;for(var S=0,P=d.width;S<P;){S++;var x=m,C=b;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:q=(e[p]&255)<<24|(e[p+1]&255)<<16|(e[p+2]&255)<<8|e[p+3]&255;break;case 1:q=(e[p+1]&255)<<24|(e[p+2]&255)<<16|(e[p+3]&255)<<8|e[p]&255;break;case 2:q=(e[p+2]&255)<<24|(e[p+1]&255)<<16|(e[p]&255)<<8|e[p+3]&255}C&&0!=(q&255)&&255!=(q&255)&&(H.unmult=255/(q&255),q=(H.__clamp[Math.round((q>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((q>>>16&255)*H.unmult)]&
255)<<16|(H.__clamp[Math.round((q>>>8&255)*H.unmult)]&255)<<8|q&255);x=l;C=n;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:t=(f[k]&255)<<24|(f[k+1]&255)<<16|(f[k+2]&255)<<8|f[k+3]&255;break;case 1:t=(f[k+1]&255)<<24|(f[k+2]&255)<<16|(f[k+3]&255)<<8|f[k]&255;break;case 2:t=(f[k+2]&255)<<24|(f[k+1]&255)<<16|(f[k]&255)<<8|f[k+3]&255}C&&0!=(t&255)&&255!=(t&255)&&(H.unmult=255/(t&255),t=(H.__clamp[Math.round((t>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((t>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((t>>>
8&255)*H.unmult)]&255)<<8|t&255);switch(h){case 0:v=q>>>24&255;break;case 1:v=q>>>16&255;break;case 2:v=q>>>8&255;break;case 3:v=q&255}switch(g){case 0:t=(v&255)<<24|(t>>>16&255)<<16|(t>>>8&255)<<8|t&255;break;case 1:t=(t>>>24&255)<<24|(v&255)<<16|(t>>>8&255)<<8|t&255;break;case 2:t=(t>>>24&255)<<24|(t>>>16&255)<<16|(v&255)<<8|t&255;break;case 3:t=(t>>>24&255)<<24|(t>>>16&255)<<16|(t>>>8&255)<<8|v&255}x=l;C=n;null==C&&(C=!1);null==x&&(x=0);C&&(0==(t&255)?0!=t&&(t=0):255!=(t&255)&&(H.a16=H.__alpha16[t&
255],t=((t>>>24&255)*H.a16>>16&255)<<24|((t>>>16&255)*H.a16>>16&255)<<16|((t>>>8&255)*H.a16>>16&255)<<8|t&255));switch(x){case 0:f[k]=t>>>24&255;f[k+1]=t>>>16&255;f[k+2]=t>>>8&255;f[k+3]=t&255;break;case 1:f[k]=t&255;f[k+1]=t>>>24&255;f[k+2]=t>>>16&255;f[k+3]=t>>>8&255;break;case 2:f[k]=t>>>8&255,f[k+1]=t>>>16&255,f[k+2]=t>>>24&255,f[k+3]=t&255}p+=4;k+=4}}a.dirty=!0;a.version++}};Za.copyPixels=function(a,b,c,d,e,f,g){null==g&&(g=!1);if(a.width==b.width&&a.height==b.height&&c.width==b.width&&c.height==
b.height&&0==c.x&&0==c.y&&0==d.x&&0==d.y&&null==e&&null==f&&0==g&&a.get_format()==b.get_format())a.buffer.data.set(b.buffer.data);else{var h=b.buffer.data,m=a.buffer.data;if(null==h||null==m)return;c=new Ge(b,c);var l=new Dd(d.x,d.y,c.width,c.height);l=new Ge(a,l);var n=b.buffer.format,p=a.buffer.format,k=0,q=0,t=b.buffer.premultiplied,v=a.buffer.premultiplied,r=b.buffer.bitsPerPixel/8|0,u=a.buffer.bitsPerPixel/8|0,S=null!=e&&e.get_transparent(),P=g||S&&!a.get_transparent()||!g&&!a.get_transparent()&&
b.get_transparent();if(S)if(u=e.buffer.data,b=e.buffer.format,g=0,e=new Ge(e,new Dd(c.x+(null==f?0:f.x),c.y+(null==f?0:f.y),c.width,c.height)),l.clip(d.x|0,d.y|0,e.width,e.height),P)for(P=0,r=l.height;P<r;)for(S=P++,d=c.byteOffset+c.stride*S,f=l.byteOffset+l.stride*S,S=e.byteOffset+e.stride*S,y=0,ka=l.width;y<ka;){y++;var x=n;var C=t;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:k=(h[d]&255)<<24|(h[d+1]&255)<<16|(h[d+2]&255)<<8|h[d+3]&255;break;case 1:k=(h[d+1]&255)<<24|(h[d+2]&255)<<16|(h[d+3]&
255)<<8|h[d]&255;break;case 2:k=(h[d+2]&255)<<24|(h[d+1]&255)<<16|(h[d]&255)<<8|h[d+3]&255}C&&0!=(k&255)&&255!=(k&255)&&(H.unmult=255/(k&255),k=(H.__clamp[Math.round((k>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((k>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((k>>>8&255)*H.unmult)]&255)<<8|k&255);x=p;C=v;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:q=(m[f]&255)<<24|(m[f+1]&255)<<16|(m[f+2]&255)<<8|m[f+3]&255;break;case 1:q=(m[f+1]&255)<<24|(m[f+2]&255)<<16|(m[f+3]&255)<<8|m[f]&
255;break;case 2:q=(m[f+2]&255)<<24|(m[f+1]&255)<<16|(m[f]&255)<<8|m[f+3]&255}C&&0!=(q&255)&&255!=(q&255)&&(H.unmult=255/(q&255),q=(H.__clamp[Math.round((q>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((q>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((q>>>8&255)*H.unmult)]&255)<<8|q&255);x=b;C=!1;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:g=(u[S]&255)<<24|(u[S+1]&255)<<16|(u[S+2]&255)<<8|u[S+3]&255;break;case 1:g=(u[S+1]&255)<<24|(u[S+2]&255)<<16|(u[S+3]&255)<<8|u[S]&255;break;case 2:g=
(u[S+2]&255)<<24|(u[S+1]&255)<<16|(u[S]&255)<<8|u[S+3]&255}C&&0!=(g&255)&&255!=(g&255)&&(H.unmult=255/(g&255),g=(H.__clamp[Math.round((g>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((g>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((g>>>8&255)*H.unmult)]&255)<<8|g&255);C=(g&255)/255*((k&255)/255);if(0<C){var F=(q&255)/255;var z=1-C;x=C+F*z;B=H.__clamp[Math.round(((k>>>24&255)*C+(q>>>24&255)*F*z)/x)];q=(B&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|q&255;B=H.__clamp[Math.round(((k>>>16&255)*
C+(q>>>16&255)*F*z)/x)];q=(q>>>24&255)<<24|(B&255)<<16|(q>>>8&255)<<8|q&255;C=H.__clamp[Math.round(((k>>>8&255)*C+(q>>>8&255)*F*z)/x)];q=(q>>>24&255)<<24|(q>>>16&255)<<16|(C&255)<<8|q&255;x=H.__clamp[Math.round(255*x)];q=(q>>>24&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|x&255;x=p;C=v;null==C&&(C=!1);null==x&&(x=0);C&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(H.a16=H.__alpha16[q&255],q=((q>>>24&255)*H.a16>>16&255)<<24|((q>>>16&255)*H.a16>>16&255)<<16|((q>>>8&255)*H.a16>>16&255)<<8|q&255));switch(x){case 0:m[f]=
q>>>24&255;m[f+1]=q>>>16&255;m[f+2]=q>>>8&255;m[f+3]=q&255;break;case 1:m[f]=q&255;m[f+1]=q>>>24&255;m[f+2]=q>>>16&255;m[f+3]=q>>>8&255;break;case 2:m[f]=q>>>8&255,m[f+1]=q>>>16&255,m[f+2]=q>>>24&255,m[f+3]=q&255}}d+=4;f+=4;S+=4}else for(P=0,r=l.height;P<r;)for(S=P++,d=c.byteOffset+c.stride*S,f=l.byteOffset+l.stride*S,S=e.byteOffset+e.stride*S,y=0,ka=l.width;y<ka;){y++;x=n;C=t;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:k=(h[d]&255)<<24|(h[d+1]&255)<<16|(h[d+2]&255)<<8|h[d+3]&255;break;case 1:k=
(h[d+1]&255)<<24|(h[d+2]&255)<<16|(h[d+3]&255)<<8|h[d]&255;break;case 2:k=(h[d+2]&255)<<24|(h[d+1]&255)<<16|(h[d]&255)<<8|h[d+3]&255}C&&0!=(k&255)&&255!=(k&255)&&(H.unmult=255/(k&255),k=(H.__clamp[Math.round((k>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((k>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((k>>>8&255)*H.unmult)]&255)<<8|k&255);x=b;C=!1;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:g=(u[S]&255)<<24|(u[S+1]&255)<<16|(u[S+2]&255)<<8|u[S+3]&255;break;case 1:g=(u[S+1]&255)<<
24|(u[S+2]&255)<<16|(u[S+3]&255)<<8|u[S]&255;break;case 2:g=(u[S+2]&255)<<24|(u[S+1]&255)<<16|(u[S]&255)<<8|u[S+3]&255}C&&0!=(g&255)&&255!=(g&255)&&(H.unmult=255/(g&255),g=(H.__clamp[Math.round((g>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((g>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((g>>>8&255)*H.unmult)]&255)<<8|g&255);B=Math.round((g&255)/255*(k&255));k=(k>>>24&255)<<24|(k>>>16&255)<<16|(k>>>8&255)<<8|B&255;x=p;C=v;null==C&&(C=!1);null==x&&(x=0);C&&(0==(k&255)?0!=k&&(k=0):255!=
(k&255)&&(H.a16=H.__alpha16[k&255],k=((k>>>24&255)*H.a16>>16&255)<<24|((k>>>16&255)*H.a16>>16&255)<<16|((k>>>8&255)*H.a16>>16&255)<<8|k&255));switch(x){case 0:m[f]=k>>>24&255;m[f+1]=k>>>16&255;m[f+2]=k>>>8&255;m[f+3]=k&255;break;case 1:m[f]=k&255;m[f+1]=k>>>24&255;m[f+2]=k>>>16&255;m[f+3]=k>>>8&255;break;case 2:m[f]=k>>>8&255,m[f+1]=k>>>16&255,m[f+2]=k>>>24&255,m[f+3]=k&255}d+=4;f+=4;S+=4}else if(P)for(P=0,r=l.height;P<r;){S=P++;d=c.byteOffset+c.stride*S;f=l.byteOffset+l.stride*S;for(var y=0,ka=l.width;y<
ka;){y++;x=n;C=t;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:k=(h[d]&255)<<24|(h[d+1]&255)<<16|(h[d+2]&255)<<8|h[d+3]&255;break;case 1:k=(h[d+1]&255)<<24|(h[d+2]&255)<<16|(h[d+3]&255)<<8|h[d]&255;break;case 2:k=(h[d+2]&255)<<24|(h[d+1]&255)<<16|(h[d]&255)<<8|h[d+3]&255}C&&0!=(k&255)&&255!=(k&255)&&(H.unmult=255/(k&255),k=(H.__clamp[Math.round((k>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((k>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((k>>>8&255)*H.unmult)]&255)<<8|k&255);x=p;
C=v;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:q=(m[f]&255)<<24|(m[f+1]&255)<<16|(m[f+2]&255)<<8|m[f+3]&255;break;case 1:q=(m[f+1]&255)<<24|(m[f+2]&255)<<16|(m[f+3]&255)<<8|m[f]&255;break;case 2:q=(m[f+2]&255)<<24|(m[f+1]&255)<<16|(m[f]&255)<<8|m[f+3]&255}C&&0!=(q&255)&&255!=(q&255)&&(H.unmult=255/(q&255),q=(H.__clamp[Math.round((q>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((q>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((q>>>8&255)*H.unmult)]&255)<<8|q&255);C=(k&255)/255;F=(q&
255)/255;z=1-C;x=C+F*z;if(0==x)q=0;else{var B=H.__clamp[Math.round(((k>>>24&255)*C+(q>>>24&255)*F*z)/x)];q=(B&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|q&255;B=H.__clamp[Math.round(((k>>>16&255)*C+(q>>>16&255)*F*z)/x)];q=(q>>>24&255)<<24|(B&255)<<16|(q>>>8&255)<<8|q&255;C=H.__clamp[Math.round(((k>>>8&255)*C+(q>>>8&255)*F*z)/x)];q=(q>>>24&255)<<24|(q>>>16&255)<<16|(C&255)<<8|q&255;x=H.__clamp[Math.round(255*x)];q=(q>>>24&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|x&255}x=p;C=v;null==C&&(C=!1);null==x&&
(x=0);C&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(H.a16=H.__alpha16[q&255],q=((q>>>24&255)*H.a16>>16&255)<<24|((q>>>16&255)*H.a16>>16&255)<<16|((q>>>8&255)*H.a16>>16&255)<<8|q&255));switch(x){case 0:m[f]=q>>>24&255;m[f+1]=q>>>16&255;m[f+2]=q>>>8&255;m[f+3]=q&255;break;case 1:m[f]=q&255;m[f+1]=q>>>24&255;m[f+2]=q>>>16&255;m[f+3]=q>>>8&255;break;case 2:m[f]=q>>>8&255,m[f+1]=q>>>16&255,m[f+2]=q>>>24&255,m[f+3]=q&255}d+=4;f+=4}}else if(n==p&&t==v&&r==u)for(P=0,r=l.height;P<r;)S=P++,d=c.byteOffset+c.stride*
S,f=l.byteOffset+l.stride*S,m.set(h.subarray(d,d+l.width*u),f);else for(P=0,r=l.height;P<r;)for(S=P++,d=c.byteOffset+c.stride*S,f=l.byteOffset+l.stride*S,y=0,ka=l.width;y<ka;){y++;x=n;C=t;null==C&&(C=!1);null==x&&(x=0);switch(x){case 0:k=(h[d]&255)<<24|(h[d+1]&255)<<16|(h[d+2]&255)<<8|h[d+3]&255;break;case 1:k=(h[d+1]&255)<<24|(h[d+2]&255)<<16|(h[d+3]&255)<<8|h[d]&255;break;case 2:k=(h[d+2]&255)<<24|(h[d+1]&255)<<16|(h[d]&255)<<8|h[d+3]&255}C&&0!=(k&255)&&255!=(k&255)&&(H.unmult=255/(k&255),k=(H.__clamp[Math.round((k>>>
24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((k>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((k>>>8&255)*H.unmult)]&255)<<8|k&255);x=p;C=v;null==C&&(C=!1);null==x&&(x=0);C&&(0==(k&255)?0!=k&&(k=0):255!=(k&255)&&(H.a16=H.__alpha16[k&255],k=((k>>>24&255)*H.a16>>16&255)<<24|((k>>>16&255)*H.a16>>16&255)<<16|((k>>>8&255)*H.a16>>16&255)<<8|k&255));switch(x){case 0:m[f]=k>>>24&255;m[f+1]=k>>>16&255;m[f+2]=k>>>8&255;m[f+3]=k&255;break;case 1:m[f]=k&255;m[f+1]=k>>>24&255;m[f+2]=k>>>16&255;m[f+
3]=k>>>8&255;break;case 2:m[f]=k>>>8&255,m[f+1]=k>>>16&255,m[f+2]=k>>>24&255,m[f+3]=k&255}d+=4;f+=4}}a.dirty=!0;a.version++};Za.fillRect=function(a,b,c,d){switch(d){case 1:c=(c>>>16&255)<<24|(c>>>8&255)<<16|(c&255)<<8|c>>>24&255;break;case 2:c=(c>>>8&255)<<24|(c>>>16&255)<<16|(c>>>24&255)<<8|c&255}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255);var e=a.buffer.data;if(null!=e){d=a.buffer.format;var f=a.buffer.premultiplied;f&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(H.a16=
H.__alpha16[c&255],c=((c>>>24&255)*H.a16>>16&255)<<24|((c>>>16&255)*H.a16>>16&255)<<16|((c>>>8&255)*H.a16>>16&255)<<8|c&255));b=new Ge(a,b);for(var g,h=0,m=b.height;h<m;){f=h++;g=b.byteOffset+b.stride*f;for(var l=0,n=b.width;l<n;){f=l++;var p=g+4*f,k=d;f=!1;null==f&&(f=!1);null==k&&(k=0);f&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(H.a16=H.__alpha16[c&255],c=((c>>>24&255)*H.a16>>16&255)<<24|((c>>>16&255)*H.a16>>16&255)<<16|((c>>>8&255)*H.a16>>16&255)<<8|c&255));switch(k){case 0:e[p]=c>>>24&255;e[p+1]=
c>>>16&255;e[p+2]=c>>>8&255;e[p+3]=c&255;break;case 1:e[p]=c&255;e[p+1]=c>>>24&255;e[p+2]=c>>>16&255;e[p+3]=c>>>8&255;break;case 2:e[p]=c>>>8&255,e[p+1]=c>>>16&255,e[p+2]=c>>>24&255,e[p+3]=c&255}}}a.dirty=!0;a.version++}};Za.floodFill=function(a,b,c,d,e){var f=a.buffer.data;if(null!=f){1==e&&(d=(d&16777215)<<8|d>>24&255);e=a.buffer.format;var g=a.buffer.premultiplied,h=0,m=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX),l=e,n=g;null==n&&(n=!1);null==l&&(l=0);switch(l){case 0:h=(f[m]&255)<<24|(f[m+
1]&255)<<16|(f[m+2]&255)<<8|f[m+3]&255;break;case 1:h=(f[m+1]&255)<<24|(f[m+2]&255)<<16|(f[m+3]&255)<<8|f[m]&255;break;case 2:h=(f[m+2]&255)<<24|(f[m+1]&255)<<16|(f[m]&255)<<8|f[m+3]&255}n&&0!=(h&255)&&255!=(h&255)&&(H.unmult=255/(h&255),h=(H.__clamp[Math.round((h>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((h>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((h>>>8&255)*H.unmult)]&255)<<8|h&255);a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,h=(h>>>24&255)<<
24|(h>>>16&255)<<16|(h>>>8&255)<<8|255);if(d!=h){g&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>16&255)<<8|d&255));m=[0,-1,1,0];var p=[-1,0,0,1],k=-a.offsetX,q=-a.offsetY,t=k+a.width,v=q+a.height,r=[];r.push(b);r.push(c);for(var u,S,x,C=0;0<r.length;){c=r.pop();b=r.pop();for(var P=0;4>P;)if(l=P++,u=b+m[l],S=c+p[l],!(u<k||S<q||u>=t||S>=v)){x=4*(S*a.width+u);l=e;n=g;null==n&&(n=!1);null==l&&(l=
0);switch(l){case 0:C=(f[x]&255)<<24|(f[x+1]&255)<<16|(f[x+2]&255)<<8|f[x+3]&255;break;case 1:C=(f[x+1]&255)<<24|(f[x+2]&255)<<16|(f[x+3]&255)<<8|f[x]&255;break;case 2:C=(f[x+2]&255)<<24|(f[x+1]&255)<<16|(f[x]&255)<<8|f[x+3]&255}n&&0!=(C&255)&&255!=(C&255)&&(H.unmult=255/(C&255),C=(H.__clamp[Math.round((C>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((C>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((C>>>8&255)*H.unmult)]&255)<<8|C&255);if(C==h){l=e;n=!1;null==n&&(n=!1);null==l&&(l=0);
n&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>16&255)<<8|d&255));switch(l){case 0:f[x]=d>>>24&255;f[x+1]=d>>>16&255;f[x+2]=d>>>8&255;f[x+3]=d&255;break;case 1:f[x]=d&255;f[x+1]=d>>>24&255;f[x+2]=d>>>16&255;f[x+3]=d>>>8&255;break;case 2:f[x]=d>>>8&255,f[x+1]=d>>>16&255,f[x+2]=d>>>24&255,f[x+3]=d&255}r.push(u);r.push(S)}}}a.dirty=!0;a.version++}}};Za.gaussianBlur=function(a,b,c,d,e,f,g,h,m){null==
g&&(g=1);null==f&&(f=4);null==e&&(e=4);(h=a.get_premultiplied())&&a.set_premultiplied(!1);$e.blur(a,b,c,d,e,f,g);a.dirty=!0;a.version++;h&&a.set_premultiplied(!0);return a};Za.getColorBoundsRect=function(a,b,c,d,e){var f=a.width+1,g=0,h=a.height+1,m=0;switch(e){case 1:e=c;c=(e>>>16&255)<<24|(e>>>8&255)<<16|(e&255)<<8|e>>>24&255;e=b;b=(e>>>16&255)<<24|(e>>>8&255)<<16|(e&255)<<8|e>>>24&255;break;case 2:e=c,c=(e>>>8&255)<<24|(e>>>16&255)<<16|(e>>>24&255)<<8|e&255,e=b,b=(e>>>8&255)<<24|(e>>>16&255)<<
16|(e>>>24&255)<<8|e&255}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255,b=(b>>>24&255)<<24|(b>>>16&255)<<16|(b>>>8&255)<<8|255);e=0;for(var l=a.width;e<l;){var n=e++;var p=!1;for(var k=0,q=a.height;k<q;){var t=k++;p=a.getPixel32(n,t,0);if(p=d?(p&b)==c:(p&b)!=c){n<f&&(f=n);break}}if(p)break}e=0;for(l=a.width;e<l;){n=e++;n=a.width-1-n;p=!1;k=0;for(q=a.height;k<q;)if(t=k++,p=a.getPixel32(n,t,0),p=d?(p&b)==c:(p&b)!=c){n>g&&(g=n);break}if(p)break}e=0;for(l=a.height;e<l;){t=
e++;p=!1;k=0;for(q=a.width;k<q;)if(n=k++,p=a.getPixel32(n,t,0),p=d?(p&b)==c:(p&b)!=c){t<h&&(h=t);break}if(p)break}e=0;for(l=a.height;e<l;){t=e++;t=a.height-1-t;p=!1;k=0;for(q=a.width;k<q;)if(n=k++,p=a.getPixel32(n,t,0),p=d?(p&b)==c:(p&b)!=c){t>m&&(m=t);break}if(p)break}d=g-f;c=m-h;0<d&&++d;0<c&&++c;0>d&&(d=0);0>c&&(c=0);f==g&&(d=1);h==m&&(c=1);f>a.width&&(f=0);h>a.height&&(h=0);return new Dd(f,h,d,c)};Za.getPixel=function(a,b,c,d){var e=0,f=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);
c=a.buffer.format;a=a.buffer.premultiplied;null==a&&(a=!1);null==c&&(c=0);switch(c){case 0:e=(f[b]&255)<<24|(f[b+1]&255)<<16|(f[b+2]&255)<<8|f[b+3]&255;break;case 1:e=(f[b+1]&255)<<24|(f[b+2]&255)<<16|(f[b+3]&255)<<8|f[b]&255;break;case 2:e=(f[b+2]&255)<<24|(f[b+1]&255)<<16|(f[b]&255)<<8|f[b+3]&255}a&&0!=(e&255)&&255!=(e&255)&&(H.unmult=255/(e&255),e=(H.__clamp[Math.round((e>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((e>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((e>>>8&255)*H.unmult)]&
255)<<8|e&255);e=(e>>>24&255)<<24|(e>>>16&255)<<16|(e>>>8&255)<<8|0;switch(d){case 1:return(e&255)<<24|(e>>>24&255)<<16|(e>>>16&255)<<8|e>>>8&255;case 2:return(e>>>8&255)<<24|(e>>>16&255)<<16|(e>>>24&255)<<8|e&255;default:return e}};Za.getPixel32=function(a,b,c,d){var e=0,f=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);c=a.buffer.format;a=a.buffer.premultiplied;null==a&&(a=!1);null==c&&(c=0);switch(c){case 0:e=(f[b]&255)<<24|(f[b+1]&255)<<16|(f[b+2]&255)<<8|f[b+3]&255;break;case 1:e=
(f[b+1]&255)<<24|(f[b+2]&255)<<16|(f[b+3]&255)<<8|f[b]&255;break;case 2:e=(f[b+2]&255)<<24|(f[b+1]&255)<<16|(f[b]&255)<<8|f[b+3]&255}a&&0!=(e&255)&&255!=(e&255)&&(H.unmult=255/(e&255),e=(H.__clamp[Math.round((e>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((e>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((e>>>8&255)*H.unmult)]&255)<<8|e&255);switch(d){case 1:return(e&255)<<24|(e>>>24&255)<<16|(e>>>16&255)<<8|e>>>8&255;case 2:return(e>>>8&255)<<24|(e>>>16&255)<<16|(e>>>24&255)<<8|e&255;
default:return e}};Za.getPixels=function(a,b,c){if(null==a.buffer.data)return null;var d=new ib(new ArrayBuffer(4*(b.width*b.height|0))),e=a.buffer.data,f=a.buffer.format,g=a.buffer.premultiplied;a=new Ge(a,b);for(var h,m,l=b=m=0,n=a.height;l<n;){h=l++;h=a.byteOffset+a.stride*h;for(var p=0,k=a.width;p<k;){p++;var q=f,t=g;null==t&&(t=!1);null==q&&(q=0);switch(q){case 0:m=(e[h]&255)<<24|(e[h+1]&255)<<16|(e[h+2]&255)<<8|e[h+3]&255;break;case 1:m=(e[h+1]&255)<<24|(e[h+2]&255)<<16|(e[h+3]&255)<<8|e[h]&
255;break;case 2:m=(e[h+2]&255)<<24|(e[h+1]&255)<<16|(e[h]&255)<<8|e[h+3]&255}t&&0!=(m&255)&&255!=(m&255)&&(H.unmult=255/(m&255),m=(H.__clamp[Math.round((m>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((m>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((m>>>8&255)*H.unmult)]&255)<<8|m&255);switch(c){case 1:m=(m&255)<<24|(m>>>24&255)<<16|(m>>>16&255)<<8|m>>>8&255;break;case 2:m=(m>>>8&255)<<24|(m>>>16&255)<<16|(m>>>24&255)<<8|m&255}d.b[b++]=m>>>24&255;d.b[b++]=m>>>16&255;d.b[b++]=m>>>8&255;
d.b[b++]=m&255;h+=4}}return d};Za.merge=function(a,b,c,d,e,f,g,h){if(null!=a.buffer.data&&null!=b.buffer.data){c=new Ge(b,c);d=new Ge(a,new Dd(d.x,d.y,c.width,c.height));var m=b.buffer.data,l=a.buffer.data,n=b.buffer.format,p=a.buffer.format;b=b.buffer.premultiplied;for(var k=a.buffer.premultiplied,q,t,v=0,r=0,u=0,S=d.height;u<S;){t=u++;q=c.byteOffset+c.stride*t;t=d.byteOffset+d.stride*t;for(var x=0,C=d.width;x<C;){x++;var P=n,F=b;null==F&&(F=!1);null==P&&(P=0);switch(P){case 0:v=(m[q]&255)<<24|(m[q+
1]&255)<<16|(m[q+2]&255)<<8|m[q+3]&255;break;case 1:v=(m[q+1]&255)<<24|(m[q+2]&255)<<16|(m[q+3]&255)<<8|m[q]&255;break;case 2:v=(m[q+2]&255)<<24|(m[q+1]&255)<<16|(m[q]&255)<<8|m[q+3]&255}F&&0!=(v&255)&&255!=(v&255)&&(H.unmult=255/(v&255),v=(H.__clamp[Math.round((v>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((v>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((v>>>8&255)*H.unmult)]&255)<<8|v&255);P=p;F=k;null==F&&(F=!1);null==P&&(P=0);switch(P){case 0:r=(l[t]&255)<<24|(l[t+1]&255)<<16|(l[t+
2]&255)<<8|l[t+3]&255;break;case 1:r=(l[t+1]&255)<<24|(l[t+2]&255)<<16|(l[t+3]&255)<<8|l[t]&255;break;case 2:r=(l[t+2]&255)<<24|(l[t+1]&255)<<16|(l[t]&255)<<8|l[t+3]&255}F&&0!=(r&255)&&255!=(r&255)&&(H.unmult=255/(r&255),r=(H.__clamp[Math.round((r>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((r>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((r>>>8&255)*H.unmult)]&255)<<8|r&255);r=((((v>>>24&255)*e+(r>>>24&255)*(256-e))/256|0)&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|r&255;r=(r>>>24&255)<<
24|((((v>>>16&255)*f+(r>>>16&255)*(256-f))/256|0)&255)<<16|(r>>>8&255)<<8|r&255;r=(r>>>24&255)<<24|(r>>>16&255)<<16|((((v>>>8&255)*g+(r>>>8&255)*(256-g))/256|0)&255)<<8|r&255;r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|(((v&255)*h+(r&255)*(256-h))/256|0)&255;P=p;F=k;null==F&&(F=!1);null==P&&(P=0);F&&(0==(r&255)?0!=r&&(r=0):255!=(r&255)&&(H.a16=H.__alpha16[r&255],r=((r>>>24&255)*H.a16>>16&255)<<24|((r>>>16&255)*H.a16>>16&255)<<16|((r>>>8&255)*H.a16>>16&255)<<8|r&255));switch(P){case 0:l[t]=
r>>>24&255;l[t+1]=r>>>16&255;l[t+2]=r>>>8&255;l[t+3]=r&255;break;case 1:l[t]=r&255;l[t+1]=r>>>24&255;l[t+2]=r>>>16&255;l[t+3]=r>>>8&255;break;case 2:l[t]=r>>>8&255,l[t+1]=r>>>16&255,l[t+2]=r>>>24&255,l[t+3]=r&255}q+=4;t+=4}}a.dirty=!0;a.version++}};Za.multiplyAlpha=function(a){var b=a.buffer.data;if(null!=b&&a.buffer.transparent){for(var c=a.buffer.format,d=0,e=0,f=b.length/4|0;e<f;){var g=e++,h=4*g,m=c,l=!1;null==l&&(l=!1);null==m&&(m=0);switch(m){case 0:d=(b[h]&255)<<24|(b[h+1]&255)<<16|(b[h+2]&
255)<<8|b[h+3]&255;break;case 1:d=(b[h+1]&255)<<24|(b[h+2]&255)<<16|(b[h+3]&255)<<8|b[h]&255;break;case 2:d=(b[h+2]&255)<<24|(b[h+1]&255)<<16|(b[h]&255)<<8|b[h+3]&255}l&&0!=(d&255)&&255!=(d&255)&&(H.unmult=255/(d&255),d=(H.__clamp[Math.round((d>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((d>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((d>>>8&255)*H.unmult)]&255)<<8|d&255);g*=4;h=c;m=!0;null==m&&(m=!1);null==h&&(h=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],
d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>16&255)<<8|d&255));switch(h){case 0:b[g]=d>>>24&255;b[g+1]=d>>>16&255;b[g+2]=d>>>8&255;b[g+3]=d&255;break;case 1:b[g]=d&255;b[g+1]=d>>>24&255;b[g+2]=d>>>16&255;b[g+3]=d>>>8&255;break;case 2:b[g]=d>>>8&255,b[g+1]=d>>>16&255,b[g+2]=d>>>24&255,b[g+3]=d&255}}a.buffer.premultiplied=!0;a.dirty=!0;a.version++}};Za.resize=function(a,b,c){var d=a.buffer;if(d.width!=b||d.height!=c){var e=b*c*4;e=null!=e?new Uint8Array(e):
null;e=new Rf(e,b,c);for(var f=a.width,g=a.height,h=a.get_data(),m=e.data,l,n,p,k,q,t,v,r,u,S=0;S<c;)for(var x=S++,C=0,P=b;C<P;)q=C++,r=(q+.5)/b*f-.5,u=(x+.5)/c*g-.5,t=r|0,v=u|0,l=4*(v*f+t),n=t<f-1?l+4:l,p=v<g-1?l+4*f:l,k=n!=l?p+4:p,q=4*(x*b+q),t=r-t,v=u-v,u=1-t,r=1-v,m[q]=(ua.toFloat(h[l])*u+ua.toFloat(h[n])*t)*r+(ua.toFloat(h[p])*u+ua.toFloat(h[k])*t)*v|0,m[q+1]=(ua.toFloat(h[l+1])*u+ua.toFloat(h[n+1])*t)*r+(ua.toFloat(h[p+1])*u+ua.toFloat(h[k+1])*t)*v|0,m[q+2]=(ua.toFloat(h[l+2])*u+ua.toFloat(h[n+
2])*t)*r+(ua.toFloat(h[p+2])*u+ua.toFloat(h[k+2])*t)*v|0,m[q+3]=0==h[n+3]||0==h[p+3]||0==h[k+3]?0:h[l+3];d.data=e.data;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++}};Za.resizeBuffer=function(a,b,c){var d=a.buffer,e=a.get_data(),f=b*c*4;f=null!=f?new Uint8Array(f):null;for(var g,h,m=0,l=d.height;m<l;)for(var n=m++,p=0,k=d.width;p<k;)h=p++,g=4*(n*d.width+h),h=4*(n*b+h),f[h]=e[g],f[h+1]=e[g+1],f[h+2]=e[g+2],f[h+3]=e[g+3];d.data=
f;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++};Za.setFormat=function(a,b){var c=a.buffer.data;if(null!=c){var d=c.length/4|0;switch(a.get_format()){case 0:var e=0;var f=1;var g=2;var h=3;break;case 1:e=1;f=2;g=3;h=0;break;case 2:e=2,f=1,g=0,h=3}switch(b){case 0:var m=0;var l=1;var n=2;var p=3;break;case 1:m=1;l=2;n=3;p=0;break;case 2:m=2,l=1,n=0,p=3}for(var k=0;k<d;){var q=4*k++;var t=c[q+e];var v=c[q+f];var r=c[q+g];var u=
c[q+h];c[q+m]=t;c[q+l]=v;c[q+n]=r;c[q+p]=u}a.buffer.format=b;a.dirty=!0;a.version++}};Za.setPixel=function(a,b,c,d,e){switch(e){case 1:d=(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<8|d&255}var f=0,g=a.buffer.data,h=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);e=a.buffer.format;var m=a.buffer.premultiplied;null==m&&(m=!1);null==e&&(e=0);switch(e){case 0:f=(g[h]&255)<<24|(g[h+1]&255)<<16|(g[h+2]&255)<<8|g[h+3]&255;break;case 1:f=
(g[h+1]&255)<<24|(g[h+2]&255)<<16|(g[h+3]&255)<<8|g[h]&255;break;case 2:f=(g[h+2]&255)<<24|(g[h+1]&255)<<16|(g[h]&255)<<8|g[h+3]&255}m&&0!=(f&255)&&255!=(f&255)&&(H.unmult=255/(f&255),f=(H.__clamp[Math.round((f>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((f>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((f>>>8&255)*H.unmult)]&255)<<8|f&255);d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|f&255;g=a.buffer.data;h=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);e=a.buffer.format;m=a.buffer.premultiplied;
null==m&&(m=!1);null==e&&(e=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>16&255)<<8|d&255));switch(e){case 0:g[h]=d>>>24&255;g[h+1]=d>>>16&255;g[h+2]=d>>>8&255;g[h+3]=d&255;break;case 1:g[h]=d&255;g[h+1]=d>>>24&255;g[h+2]=d>>>16&255;g[h+3]=d>>>8&255;break;case 2:g[h]=d>>>8&255,g[h+1]=d>>>16&255,g[h+2]=d>>>24&255,g[h+3]=d&255}a.dirty=!0;a.version++};Za.setPixel32=function(a,b,c,d,e){switch(e){case 1:d=
(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<8|d&255}a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255);var f=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);e=a.buffer.format;c=a.buffer.premultiplied;null==c&&(c=!1);null==e&&(e=0);c&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>
16&255)<<8|d&255));switch(e){case 0:f[b]=d>>>24&255;f[b+1]=d>>>16&255;f[b+2]=d>>>8&255;f[b+3]=d&255;break;case 1:f[b]=d&255;f[b+1]=d>>>24&255;f[b+2]=d>>>16&255;f[b+3]=d>>>8&255;break;case 2:f[b]=d>>>8&255,f[b+1]=d>>>16&255,f[b+2]=d>>>24&255,f[b+3]=d&255}a.dirty=!0;a.version++};Za.setPixels=function(a,b,c,d,e){if(null!=a.buffer.data){var f=a.buffer.data,g=a.buffer.format,h=a.buffer.premultiplied;b=new Ge(a,b);var m=a.get_transparent(),l=c.bytes;c=c.offset;e=e!=yg.BIG_ENDIAN;for(var n=0,p=b.height;n<
p;){var k=n++;k=b.byteOffset+b.stride*k;for(var q=0,t=b.width;q<t;){var v=q++;var r=e?l.getInt32(c):l.b[c+3]|l.b[c+2]<<8|l.b[c+1]<<16|l.b[c]<<24;c+=4;switch(d){case 1:r=(r>>>16&255)<<24|(r>>>8&255)<<16|(r&255)<<8|r>>>24&255;break;case 2:r=(r>>>8&255)<<24|(r>>>16&255)<<16|(r>>>24&255)<<8|r&255}m||(r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|255);v=k+4*v;var u=g,S=h;null==S&&(S=!1);null==u&&(u=0);S&&(0==(r&255)?0!=r&&(r=0):255!=(r&255)&&(H.a16=H.__alpha16[r&255],r=((r>>>24&255)*H.a16>>16&255)<<
24|((r>>>16&255)*H.a16>>16&255)<<16|((r>>>8&255)*H.a16>>16&255)<<8|r&255));switch(u){case 0:f[v]=r>>>24&255;f[v+1]=r>>>16&255;f[v+2]=r>>>8&255;f[v+3]=r&255;break;case 1:f[v]=r&255;f[v+1]=r>>>24&255;f[v+2]=r>>>16&255;f[v+3]=r>>>8&255;break;case 2:f[v]=r>>>8&255,f[v+1]=r>>>16&255,f[v+2]=r>>>24&255,f[v+3]=r&255}}}a.dirty=!0;a.version++}};Za.threshold=function(a,b,c,d,e,f,g,h,m,l){switch(l){case 1:var n=g;g=(n>>>16&255)<<24|(n>>>8&255)<<16|(n&255)<<8|n>>>24&255;n=h;h=(n>>>16&255)<<24|(n>>>8&255)<<16|
(n&255)<<8|n>>>24&255;n=f;f=(n>>>16&255)<<24|(n>>>8&255)<<16|(n&255)<<8|n>>>24&255;break;case 2:n=g,g=(n>>>8&255)<<24|(n>>>16&255)<<16|(n>>>24&255)<<8|n&255,n=h,h=(n>>>8&255)<<24|(n>>>16&255)<<16|(n>>>24&255)<<8|n&255,n=f,f=(n>>>8&255)<<24|(n>>>16&255)<<16|(n>>>24&255)<<8|n&255}switch(e){case "!=":e=0;break;case "<":e=2;break;case "<=":e=3;break;case "==":e=1;break;case ">":e=4;break;case ">=":e=5;break;default:e=-1}if(-1==e)return 0;n=b.buffer.data;var p=a.buffer.data;if(null==n||null==p)return 0;
var k=0;c=new Ge(b,c);d=new Ge(a,new Dd(d.x,d.y,c.width,c.height));var q=b.buffer.format,t=a.buffer.format;b=b.buffer.premultiplied;for(var v=a.buffer.premultiplied,r,u,S=0,x=0,C=d.height;x<C;){u=x++;r=c.byteOffset+c.stride*u;u=d.byteOffset+d.stride*u;for(var P=0,F=d.width;P<F;){P++;l=q;var z=b;null==z&&(z=!1);null==l&&(l=0);switch(l){case 0:S=(n[r]&255)<<24|(n[r+1]&255)<<16|(n[r+2]&255)<<8|n[r+3]&255;break;case 1:S=(n[r+1]&255)<<24|(n[r+2]&255)<<16|(n[r+3]&255)<<8|n[r]&255;break;case 2:S=(n[r+2]&
255)<<24|(n[r+1]&255)<<16|(n[r]&255)<<8|n[r+3]&255}z&&0!=(S&255)&&255!=(S&255)&&(H.unmult=255/(S&255),S=(H.__clamp[Math.round((S>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((S>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((S>>>8&255)*H.unmult)]&255)<<8|S&255);l=S&h;z=l>>>24&255;var y=f>>>24&255;z!=y?l=ua.gt(z,y)?1:-1:(z=l>>>16&255,y=f>>>16&255,z!=y?l=ua.gt(z,y)?1:-1:(z=l>>>8&255,y=f>>>8&255,z!=y?l=ua.gt(z,y)?1:-1:(z=l&255,y=f&255,l=z!=y?ua.gt(z,y)?1:-1:0)));switch(e){case 0:l=0!=l;break;
case 1:l=0==l;break;case 2:l=-1==l;break;case 3:l=0==l||-1==l;break;case 4:l=1==l;break;case 5:l=0==l||1==l;break;default:l=!1}if(l){l=t;z=v;null==z&&(z=!1);null==l&&(l=0);z&&(0==(g&255)?0!=g&&(g=0):255!=(g&255)&&(H.a16=H.__alpha16[g&255],g=((g>>>24&255)*H.a16>>16&255)<<24|((g>>>16&255)*H.a16>>16&255)<<16|((g>>>8&255)*H.a16>>16&255)<<8|g&255));switch(l){case 0:p[u]=g>>>24&255;p[u+1]=g>>>16&255;p[u+2]=g>>>8&255;p[u+3]=g&255;break;case 1:p[u]=g&255;p[u+1]=g>>>24&255;p[u+2]=g>>>16&255;p[u+3]=g>>>8&255;
break;case 2:p[u]=g>>>8&255,p[u+1]=g>>>16&255,p[u+2]=g>>>24&255,p[u+3]=g&255}++k}else if(m)switch(l=t,z=v,null==z&&(z=!1),null==l&&(l=0),z&&(0==(S&255)?0!=S&&(S=0):255!=(S&255)&&(H.a16=H.__alpha16[S&255],S=((S>>>24&255)*H.a16>>16&255)<<24|((S>>>16&255)*H.a16>>16&255)<<16|((S>>>8&255)*H.a16>>16&255)<<8|S&255)),l){case 0:p[u]=S>>>24&255;p[u+1]=S>>>16&255;p[u+2]=S>>>8&255;p[u+3]=S&255;break;case 1:p[u]=S&255;p[u+1]=S>>>24&255;p[u+2]=S>>>16&255;p[u+3]=S>>>8&255;break;case 2:p[u]=S>>>8&255,p[u+1]=S>>>
16&255,p[u+2]=S>>>24&255,p[u+3]=S&255}r+=4;u+=4}}0<k&&(a.dirty=!0,a.version++);return k};Za.unmultiplyAlpha=function(a){var b=a.buffer.data;if(null!=b){for(var c=a.buffer.format,d=0,e=0,f=b.length/4|0;e<f;){var g=e++,h=4*g,m=c,l=!0;null==l&&(l=!1);null==m&&(m=0);switch(m){case 0:d=(b[h]&255)<<24|(b[h+1]&255)<<16|(b[h+2]&255)<<8|b[h+3]&255;break;case 1:d=(b[h+1]&255)<<24|(b[h+2]&255)<<16|(b[h+3]&255)<<8|b[h]&255;break;case 2:d=(b[h+2]&255)<<24|(b[h+1]&255)<<16|(b[h]&255)<<8|b[h+3]&255}l&&0!=(d&255)&&
255!=(d&255)&&(H.unmult=255/(d&255),d=(H.__clamp[Math.round((d>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((d>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((d>>>8&255)*H.unmult)]&255)<<8|d&255);g*=4;h=c;m=!1;null==m&&(m=!1);null==h&&(h=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(H.a16=H.__alpha16[d&255],d=((d>>>24&255)*H.a16>>16&255)<<24|((d>>>16&255)*H.a16>>16&255)<<16|((d>>>8&255)*H.a16>>16&255)<<8|d&255));switch(h){case 0:b[g]=d>>>24&255;b[g+1]=d>>>16&255;b[g+2]=d>>>8&255;b[g+3]=
d&255;break;case 1:b[g]=d&255;b[g+1]=d>>>24&255;b[g+2]=d>>>16&255;b[g+3]=d>>>8&255;break;case 2:b[g]=d>>>8&255,b[g+1]=d>>>16&255,b[g+2]=d>>>24&255,b[g+3]=d&255}}a.buffer.premultiplied=!1;a.dirty=!0;a.version++}};Za.__boxBlur=function(a,b,c,d,e,f){b.set(a);e|=0;f|=0;Za.__boxBlurH(b,a,c,d,e,0);Za.__boxBlurH(b,a,c,d,e,1);Za.__boxBlurH(b,a,c,d,e,2);Za.__boxBlurH(b,a,c,d,e,3);e=1/(f+f+1);for(var g=4*c,h,m,l,n,p,k,q=0,t=c;q<t;){h=q++;m=h*=4;l=h+f*g;n=a[h];p=a[h+g*(d-1)];k=(f+1)*n;for(var v=0,r=f;v<r;){var u=
v++;k+=a[h+u*g]}v=0;for(r=f+1;v<r;)v++,k+=a[l]-n,b[h]=Math.round(ua.toFloat(k)*e),l+=g,h+=g;n=f+1;for(v=d-f;n<v;)n++,k+=a[l]-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,l+=g,h+=g;l=d-f;for(n=d;l<n;)l++,k+=p-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,h+=g}e=1/(f+f+1);g=4*c;q=0;for(t=c;q<t;){h=q++;m=h=4*h+1;l=h+f*g;n=a[h];p=a[h+g*(d-1)];k=(f+1)*n;v=0;for(r=f;v<r;)u=v++,k+=a[h+u*g];v=0;for(r=f+1;v<r;)v++,k+=a[l]-n,b[h]=Math.round(ua.toFloat(k)*e),l+=g,h+=g;n=f+1;for(v=d-f;n<v;)n++,k+=a[l]-a[m],b[h]=Math.round(ua.toFloat(k)*
e),m+=g,l+=g,h+=g;l=d-f;for(n=d;l<n;)l++,k+=p-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,h+=g}e=1/(f+f+1);g=4*c;q=0;for(t=c;q<t;){h=q++;m=h=4*h+2;l=h+f*g;n=a[h];p=a[h+g*(d-1)];k=(f+1)*n;v=0;for(r=f;v<r;)u=v++,k+=a[h+u*g];v=0;for(r=f+1;v<r;)v++,k+=a[l]-n,b[h]=Math.round(ua.toFloat(k)*e),l+=g,h+=g;n=f+1;for(v=d-f;n<v;)n++,k+=a[l]-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,l+=g,h+=g;l=d-f;for(n=d;l<n;)l++,k+=p-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,h+=g}e=1/(f+f+1);g=4*c;q=0;for(t=c;q<t;){h=q++;
m=h=4*h+3;l=h+f*g;n=a[h];p=a[h+g*(d-1)];k=(f+1)*n;v=0;for(r=f;v<r;)u=v++,k+=a[h+u*g];v=0;for(r=f+1;v<r;)v++,k+=a[l]-n,b[h]=Math.round(ua.toFloat(k)*e),l+=g,h+=g;n=f+1;for(v=d-f;n<v;)n++,k+=a[l]-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,l+=g,h+=g;l=d-f;for(n=d;l<n;)l++,k+=p-a[m],b[h]=Math.round(ua.toFloat(k)*e),m+=g,h+=g}};Za.__boxBlurH=function(a,b,c,d,e,f){for(var g=1/(e+e+1),h,m,l,n,p,k,q=0;q<d;){m=h=q++*c;l=h+e;n=a[4*h+f];p=a[4*(h+c-1)+f];k=(e+1)*n;for(var t=0,v=e;t<v;){var r=t++;k+=a[4*(h+r)+
f]}t=0;for(v=e+1;t<v;)t++,k+=a[4*l+f]-n,b[4*h+f]=Math.round(ua.toFloat(k)*g),++l,++h;n=e+1;for(t=c-e;n<t;)n++,k+=a[4*l+f]-a[4*m+f],b[4*h+f]=Math.round(ua.toFloat(k)*g),++l,++m,++h;l=c-e;for(n=c;l<n;)l++,k+=p-a[4*m+f],b[4*h+f]=Math.round(ua.toFloat(k)*g),++m,++h}};Za.__boxBlurT=function(a,b,c,d,e,f){for(var g=1/(e+e+1),h=4*c,m,l,n,p,k,q,t=0;t<c;){l=m=4*t++ +f;n=m+e*h;p=a[m];k=a[m+h*(d-1)];q=(e+1)*p;for(var v=0,r=e;v<r;){var u=v++;q+=a[m+u*h]}v=0;for(r=e+1;v<r;)v++,q+=a[n]-p,b[m]=Math.round(ua.toFloat(q)*
g),n+=h,m+=h;p=e+1;for(v=d-e;p<v;)p++,q+=a[n]-a[l],b[m]=Math.round(ua.toFloat(q)*g),l+=h,n+=h,m+=h;n=d-e;for(p=d;n<p;)n++,q+=k-a[l],b[m]=Math.round(ua.toFloat(q)*g),l+=h,m+=h}};Za.__calculateSourceOffset=function(a,b,c,d){c-=b.x|0;b=d-(b.y|0);return 0>c||0>b||c>=a.width||b>=a.height?-1:4*(b*(a.width|0)+c)};Za.__getBoxesForGaussianBlur=function(a,b){var c=Math.floor(Math.sqrt(12*a*a/b+1));0==c%2&&--c;var d=c+2;a=Math.round((12*a*a-b*c*c-4*b*c-3*b)/(-4*c-4));for(var e=[],f=0;f<b;){var g=f++;e.push(g<
a?c:d)}return e};Za.__pixelCompare=function(a,b){var c=a>>>24&255,d=b>>>24&255;if(c!=d)return ua.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return ua.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return ua.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?ua.gt(c,d)?1:-1:0};Za.__translatePixel=function(a,b,c,d,e,f,g){c=4*(f*(c.width|0)+e);b=Za.__calculateSourceOffset(b,d,e,f);0>b?a[c]=a[c+1]=a[c+2]=a[c+3]=0:(a[c]=a[b],a[c+1]=a[b+1],a[c+2]=a[b+2],g=ua.toFloat(a[b+3])*g|0,a[c+3]=0>g?0:255<g?255:g)};var Ge=
function(a,b){this.image=a;null==b?this.rect=a.get_rect():(0>b.x&&(b.x=0),0>b.y&&(b.y=0),b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),0>b.width&&(b.width=0),0>b.height&&(b.height=0),this.rect=b);this.stride=a.buffer.get_stride();this.__update()};k["lime._internal.graphics._ImageDataUtil.ImageDataView"]=Ge;Ge.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";Ge.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,
stride:null,tempRect:null,clip:function(a,b,c,d){null==this.tempRect&&(this.tempRect=new Dd);this.tempRect.setTo(a,b,c,d);this.rect.intersection(this.tempRect,this.rect);this.__update()},hasRow:function(a){return 0<=a?a<this.height:!1},offset:function(a,b){0>a?(this.rect.x+=a,0>this.rect.x&&(this.rect.x=0)):(this.rect.x+=a,this.rect.width-=a);0>b?(this.rect.y+=b,0>this.rect.y&&(this.rect.y=0)):(this.rect.y+=b,this.rect.height-=b);this.__update()},row:function(a){return this.byteOffset+this.stride*
a},__update:function(){this.x=Math.ceil(this.rect.x);this.y=Math.ceil(this.rect.y);this.width=Math.floor(this.rect.width);this.height=Math.floor(this.rect.height);this.byteOffset=this.stride*(this.y+this.image.offsetY)+4*(this.x+this.image.offsetX)},__class__:Ge};var $e=function(){};k["lime._internal.graphics.StackBlur"]=$e;$e.__name__="lime._internal.graphics.StackBlur";$e.blur=function(a,b,c,d,e,f,g){a.copyPixels(b,c,d);$e.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,e,f,g)};$e.__stackBlurCanvasRGBA=
function(a,b,c,d,e,f){d=Math.round(d)>>1;e=Math.round(e)>>1;if(null!=$e.MUL_TABLE&&(d>=$e.MUL_TABLE.length&&(d=$e.MUL_TABLE.length-1),e>=$e.MUL_TABLE.length&&(e=$e.MUL_TABLE.length-1),!(0>d||0>e))){1>f&&(f=1);3<f&&(f=3);a=a.get_data();var g,h,m=d+d+1;var l=e+e+1;var n=b-1,p=c-1,k=d+1,q=e+1,t=new Di,v=t;var r=1;for(var u=m;r<u;)r++,v=v.n=new Di;v.n=t;var x=m=new Di;r=1;for(u=l;r<u;)r++,x=x.n=new Di;x.n=m;for(var C=$e.MUL_TABLE[d],P=$e.SHG_TABLE[d],F=$e.MUL_TABLE[e],z=$e.SHG_TABLE[e];0<f;){--f;var y=
h=0;var ka=C,B=P;for(g=c;;){var w=a[h];l=k*w;var I=a[h+1];var A=k*I;var G=a[h+2];var D=k*G;r=a[h+3];var J=k*r;v=t;for(x=k;v.r=w,v.g=I,v.b=G,v.a=r,v=v.n,-1<--x;);r=1;for(u=k;r<u;)x=r++,x=h+((n<x?n:x)<<2),l+=v.r=a[x],A+=v.g=a[x+1],D+=v.b=a[x+2],J+=v.a=a[x+3],v=v.n;u=t;v=0;for(r=b;v<r;)x=v++,a[h++]=l*ka>>>B,a[h++]=A*ka>>>B,a[h++]=D*ka>>>B,a[h++]=J*ka>>>B,x=x+d+1,x=y+(x<n?x:n)<<2,l-=u.r-(u.r=a[x]),A-=u.g-(u.g=a[x+1]),D-=u.b-(u.b=a[x+2]),J-=u.a-(u.a=a[x+3]),u=u.n;y+=b;if(!(0<--g))break}ka=F;B=z;g=0;for(y=
b;g<y;){v=g++;h=v<<2;w=a[h];l=q*w;I=a[h+1];A=q*I;G=a[h+2];D=q*G;r=a[h+3];J=q*r;x=m;h=0;for(u=q;h<u;)h++,x.r=w,x.g=I,x.b=G,x.a=r,x=x.n;r=b;u=1;for(w=e+1;u<w;)I=u++,h=r+v<<2,l+=x.r=a[h],A+=x.g=a[h+1],D+=x.b=a[h+2],J+=x.a=a[h+3],x=x.n,I<p&&(r+=b);h=v;u=m;if(0<f)for(w=0,I=c;w<I;)G=w++,x=h<<2,r=J*ka>>>B,a[x+3]=r,0<r?(a[x]=l*ka>>>B,a[x+1]=A*ka>>>B,a[x+2]=D*ka>>>B):a[x]=a[x+1]=a[x+2]=0,x=G+q,x=v+(x<p?x:p)*b<<2,l-=u.r-(u.r=a[x]),A-=u.g-(u.g=a[x+1]),D-=u.b-(u.b=a[x+2]),J-=u.a-(u.a=a[x+3]),u=u.n,h+=b;else for(var H=
0,K=c;H<K;){var M=H++;x=h<<2;r=J*ka>>>B;a[x+3]=r;0<r?(r=255/r,w=(l*ka>>>B)*r|0,I=(A*ka>>>B)*r|0,G=(D*ka>>>B)*r|0,a[x]=255<w?255:w,a[x+1]=255<I?255:I,a[x+2]=255<G?255:G):a[x]=a[x+1]=a[x+2]=0;x=M+q;x=v+(x<p?x:p)*b<<2;l-=u.r-(u.r=a[x]);A-=u.g-(u.g=a[x+1]);D-=u.b-(u.b=a[x+2]);J-=u.a-(u.a=a[x+3]);u=u.n;h+=b}}}}};var Di=function(){this.a=this.b=this.g=this.r=0;this.n=null};k["lime._internal.graphics.BlurStack"]=Di;Di.__name__="lime._internal.graphics.BlurStack";Di.prototype={r:null,g:null,b:null,a:null,
n:null,__class__:Di};var es=function(){};k["lime._internal.macros.AssetsMacro"]=es;es.__name__="lime._internal.macros.AssetsMacro";var so=function(a){this.i=0;this.string=a;this.index=0;this.endIndex=a.length};k["lime._internal.unifill.CodePointIter"]=so;so.__name__="lime._internal.unifill.CodePointIter";so.prototype={string:null,index:null,endIndex:null,hasNext:function(){return this.index<this.endIndex},i:null,next:function(){var a=this.i=this.index,b=this.string;b=b.charCodeAt(this.index);this.index=
a+(55296<=b&&56319>=b?2:1);b=this.string;return zg.codePointAt(b,this.i)},__class__:so};var Ei=function(){};k["lime._internal.unifill.Exception"]=Ei;Ei.__name__="lime._internal.unifill.Exception";Ei.prototype={toString:function(){throw J.thrown(null);},__class__:Ei};var to=function(a){this.code=a};k["lime._internal.unifill.InvalidCodePoint"]=to;to.__name__="lime._internal.unifill.InvalidCodePoint";to.__super__=Ei;to.prototype=u(Ei.prototype,{code:null,toString:function(){return"InvalidCodePoint(code: "+
this.code+")"},__class__:to});var th=function(a){this.index=a};k["lime._internal.unifill.InvalidCodeUnitSequence"]=th;th.__name__="lime._internal.unifill.InvalidCodeUnitSequence";th.__super__=Ei;th.prototype=u(Ei.prototype,{index:null,toString:function(){return"InvalidCodeUnitSequence(index: "+this.index+")"},__class__:th});var af=function(){};k["lime._internal.unifill.InternalEncoding"]=af;af.__name__="lime._internal.unifill.InternalEncoding";af.__properties__={get_internalEncoding:"get_internalEncoding"};
af.get_internalEncoding=function(){return"UTF-16"};af.codeUnitAt=function(a,b){return a.charCodeAt(b)};af.codePointAt=function(a,b){return zg.codePointAt(a,b)};af.charAt=function(a,b){var c=a.charCodeAt(b);return b=I.substr(a,b,55296<=c&&56319>=c?2:1)};af.codePointCount=function(a,b,c){return zg.codePointCount(a,b,c)};af.codePointWidthAt=function(a,b){a=a.charCodeAt(b);return 55296<=a&&56319>=a?2:1};af.codePointWidthBefore=function(a,b){a=a.charCodeAt(b-1);return 56320<=a&&57343>=a?2:1};af.offsetByCodePoints=
function(a,b,c){if(0<=c)for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}else for(d=0;d<-c&&0<b;)f=a.charCodeAt(b-1),b-=56320<=f&&57343>=f?2:1,++d;return b};af.backwardOffsetByCodePoints=function(a,b,c){c=-c;if(0<=c)for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}else for(d=0;d<-c&&0<b;)f=a.charCodeAt(b-1),b-=56320<=f&&57343>=f?2:1,++d;return b};af.fromCodePoint=function(a){return 65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>
10)+55232)+String.fromCodePoint(a&1023|56320)};af.fromCodePoints=function(a){var b="";for(a=E(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):(b+=String.fromCodePoint((c>>10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b};af.validate=function(a){zg.validate(a)};af.isValidString=function(a){try{return zg.validate(a),!0}catch(b){xb.lastError=b;if(J.caught(b).unwrap()instanceof th)return!1;throw b;}};af.encodeWith=function(a,b){65535>=b?a(b):(a((b>>10)+55232),a(b&1023|56320))};
var gr=function(a,b,c){this.i=0;this.string=a;this.index=b;this.endIndex=c};k["lime._internal.unifill.InternalEncodingIter"]=gr;gr.__name__="lime._internal.unifill.InternalEncodingIter";gr.prototype={string:null,index:null,endIndex:null,hasNext:function(){return this.index<this.endIndex},i:null,next:function(){var a=this.i=this.index,b=this.string.charCodeAt(this.index);this.index=a+(55296<=b&&56319>=b?2:1);return this.i},__class__:gr};var Sf=function(){};k["lime._internal.unifill.Unicode"]=Sf;Sf.__name__=
"lime._internal.unifill.Unicode";Sf.decodeSurrogate=function(a,b){return a-55232<<10|b&1023};Sf.encodeHighSurrogate=function(a){return(a>>10)+55232};Sf.encodeLowSurrogate=function(a){return a&1023|56320};Sf.isScalar=function(a){return 0<=a&&1114111>=a&&!(55296<=a&&56319>=a)?!(56320<=a&&57343>=a):!1};Sf.isHighSurrogate=function(a){return 55296<=a?56319>=a:!1};Sf.isLowSurrogate=function(a){return 56320<=a?57343>=a:!1};var sf=function(){};k["lime._internal.unifill.Unifill"]=sf;sf.__name__="lime._internal.unifill.Unifill";
sf.uLength=function(a){return zg.codePointCount(a,0,a.length)};sf.uCharAt=function(a,b){var c=a;if(0<=b)for(var d=0,e=c.length,f=0;f<b&&d<e;){var g=c.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-b&&0<d;)g=c.charCodeAt(d-1),d-=56320<=g&&57343>=g?2:1,++e;b=d;c=a;g=c.charCodeAt(b);return a=I.substr(c,b,55296<=g&&56319>=g?2:1)};sf.uCharCodeAt=function(a,b){var c=a;if(0<=b)for(var d=0,e=c.length,f=0;f<b&&d<e;){var g=c.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-b&&0<
d;)g=c.charCodeAt(d-1),d-=56320<=g&&57343>=g?2:1,++e;return zg.codePointAt(a,d)};sf.uCodePointAt=function(a,b){var c=a;if(0<=b)for(var d=0,e=c.length,f=0;f<b&&d<e;){var g=c.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-b&&0<d;)g=c.charCodeAt(d-1),d-=56320<=g&&57343>=g?2:1,++e;return zg.codePointAt(a,d)};sf.uIndexOf=function(a,b,c){null==c&&(c=0);var d=a;if(0<=c)for(var e=0,f=d.length,g=0;g<c&&e<f;){var h=d.charCodeAt(e);e+=55296<=h&&56319>=h?2:1;++g}else for(f=e=0;f<-c&&0<e;)h=d.charCodeAt(e-
1),e-=56320<=h&&57343>=h?2:1,++f;e=a.indexOf(b,e);return 0<=e?zg.codePointCount(a,0,e):-1};sf.uLastIndexOf=function(a,b,c){null==c&&(c=a.length-1);var d=a;if(0<=c)for(var e=0,f=d.length,g=0;g<c&&e<f;){var h=d.charCodeAt(e);e+=55296<=h&&56319>=h?2:1;++g}else for(f=e=0;f<-c&&0<e;)h=d.charCodeAt(e-1),e-=56320<=h&&57343>=h?2:1,++f;e=a.lastIndexOf(b,e);return 0<=e?zg.codePointCount(a,0,e):-1};sf.uSplit=function(a,b){if(0==b.length){b=[];for(var c,d=0,e=a.length;d<e;){c=d;var f=a.charCodeAt(d);d+=55296<=
f&&56319>=f?2:1;f=a;var g=f.charCodeAt(c);c=I.substr(f,c,55296<=g&&56319>=g?2:1);b.push(c)}return b}return a.split(b)};sf.uSubstr=function(a,b,c){var d=0<=b?0:a.length;var e=a;if(0<=b)for(var f=e.length,g=0;g<b&&d<f;){var h=e.charCodeAt(d);d+=55296<=h&&56319>=h?2:1;++g}else for(f=0;f<-b&&0<d;)h=e.charCodeAt(d-1),d-=56320<=h&&57343>=h?2:1,++f;b=d;if(null==c)c=a.length;else if(0>c)c=b;else{e=a;if(0<=c)for(d=b,f=e.length,g=0;g<c&&d<f;)h=e.charCodeAt(d),d+=55296<=h&&56319>=h?2:1,++g;else for(d=b,f=0;f<
-c&&0<d;)h=e.charCodeAt(d-1),d-=56320<=h&&57343>=h?2:1,++f;c=d}return a.substring(b,c)};sf.uSubstring=function(a,b,c){if(0>b)b=0;else{var d=a;if(0<=b)for(var e=0,f=d.length,g=0;g<b&&e<f;){var h=d.charCodeAt(e);e+=55296<=h&&56319>=h?2:1;++g}else for(f=e=0;f<-b&&0<e;)h=d.charCodeAt(e-1),e-=56320<=h&&57343>=h?2:1,++f;b=e}if(null==c)c=a.length;else if(0>c)c=0;else{d=a;if(0<=c)for(e=0,f=d.length,g=0;g<c&&e<f;)h=d.charCodeAt(e),e+=55296<=h&&56319>=h?2:1,++g;else for(f=e=0;f<-c&&0<e;)h=d.charCodeAt(e-1),
e-=56320<=h&&57343>=h?2:1,++f;c=e}return a.substring(b,c)};sf.uIterator=function(a){return new so(a)};sf.uCompare=function(a,b){for(var c,d=0,e=a.length,f,g=0,h=b.length;d<e&&g<h;){c=d;f=a.charCodeAt(d);d+=55296<=f&&56319>=f?2:1;c=zg.codePointAt(a,c);f=g;var m=b.charCodeAt(g);g+=55296<=m&&56319>=m?2:1;f=zg.codePointAt(b,f);if(c<f)return-1;if(c>f)return 1}return g<h?-1:d<e?1:0};sf.uToString=function(a){var b="";for(a=E(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):(b+=String.fromCodePoint((c>>
10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b};sf.uAddChar=function(a,b){65535>=b?a.b+=String.fromCodePoint(b):(a.b+=String.fromCodePoint((b>>10)+55232),a.b+=String.fromCodePoint(b&1023|56320))};var zg={__properties__:{get_length:"get_length"},fromCodePoint:function(a){return 65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>10)+55232)+String.fromCodePoint(a&1023|56320)},fromCodePoints:function(a){var b="";for(a=E(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):
(b+=String.fromCodePoint((c>>10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b},fromString:function(a){return a},fromArray:function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;b+=String.fromCodePoint(d)}return b},encodeWith:function(a,b){65535>=b?a(b):(a((b>>10)+55232),a(b&1023|56320))},codeUnitAt:function(a,b){return a.charCodeAt(b)},codePointAt:function(a,b){return Fi.decode_code_point(a.length,function(b){return a.charCodeAt(b)},b)},charAt:function(a,b){var c=a.charCodeAt(b);return I.substr(a,
b,55296<=c&&56319>=c?2:1)},codePointCount:function(a,b,c){for(var d=0;b<c;){var e=a.charCodeAt(b);b+=55296<=e&&56319>=e?2:1;++d}return d},codePointWidthAt:function(a,b){a=a.charCodeAt(b);return 55296<=a&&56319>=a?2:1},codePointWidthBefore:function(a,b){a=a.charCodeAt(b-1);return 56320<=a&&57343>=a?2:1},offsetByCodePoints:function(a,b,c){if(0<=c)for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}else for(d=0;d<-c&&0<b;)f=a.charCodeAt(b-1),b-=56320<=f&&57343>=f?2:
1,++d;return b},substr:function(a,b,c){return I.substr(a,b,c)},validate:function(a){for(var b=a.length,c=function(b){return a.charCodeAt(b)},d=0;d<b;){Fi.decode_code_point(b,c,d);var e=a.charCodeAt(d);d+=55296<=e&&56319>=e?2:1}},toString:function(a){return a},toArray:function(a){for(var b=0,c=a.length,d=[];b<c;)d.push(a.charCodeAt(b++));return d},_new:function(a){return a},get_length:function(a){return a.length},forward_offset_by_code_points:function(a,b,c){for(var d=a.length,e=0;e<c&&b<d;){var f=
a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}return b},backward_offset_by_code_points:function(a,b,c){for(var d=0;d<c&&0<b;){var e=a.charCodeAt(b-1);b-=56320<=e&&57343>=e?2:1;++d}return b}},Fi=function(){};k["lime._internal.unifill._Utf16.Utf16Impl"]=Fi;Fi.__name__="lime._internal.unifill._Utf16.Utf16Impl";Fi.code_point_width=function(a){return 55296<=a&&56319>=a?2:1};Fi.find_prev_code_point=function(a,b){a=a(b-1);return 56320<=a&&57343>=a?2:1};Fi.encode_code_point=function(a,b){65535>=b?a(b):(a((b>>
10)+55232),a(b&1023|56320))};Fi.decode_code_point=function(a,b,c){if(0>c||a<=c)throw J.thrown(new th(c));var d=b(c);if(55296<=d&&56319>=d){if(0>c+1||a<=c+1)throw J.thrown(new th(c));a=b(c+1);if(56320<=a&&57343>=a)return d-55232<<10|a&1023;throw J.thrown(new th(c));}if(56320<=d&&57343>=d)throw J.thrown(new th(c));return d};var Kj=function(){};k["lime.app.IModule"]=Kj;Kj.__name__="lime.app.IModule";Kj.__isInterface__=!0;Kj.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:Kj};
var Lj=function(){this.onExit=new Qh};k["lime.app.Module"]=Lj;Lj.__name__="lime.app.Module";Lj.__interfaces__=[Kj];Lj.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:Lj};var rd=function(){this.onCreateWindow=new uo;this.onUpdate=new Qh;this.onExit=new Qh;null==rd.current&&(rd.current=this);this.meta=new ia;this.modules=[];this.__windowByID=new Xa;this.__windows=[];this.__backend=new oo(this);this.__registerLimeModule(this);this.__preloader=
new vo;this.__preloader.onProgress.add(r(this,this.onPreloadProgress));this.__preloader.onComplete.add(r(this,this.onPreloadComplete))};k["lime.app.Application"]=rd;rd.__name__="lime.app.Application";rd.__super__=Lj;rd.prototype=u(Lj.prototype,{meta:null,modules:null,onUpdate:null,onCreateWindow:null,preloader:null,window:null,windows:null,__backend:null,__preloader:null,__window:null,__windowByID:null,__windows:null,addModule:function(a){a.__registerLimeModule(this);this.modules.push(a)},createWindow:function(a){a=
this.__createWindow(a);this.__addWindow(a);return a},exec:function(){rd.current=this;return this.__backend.exec()},onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){},onGamepadDisconnect:function(a){},onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onJoystickTrackballMove:function(a,
b,c,d){},onKeyDown:function(a,b){},onKeyUp:function(a,b){},onModuleExit:function(a){},onMouseDown:function(a,b,c){},onMouseMove:function(a,b){},onMouseMoveRelative:function(a,b){},onMouseUp:function(a,b,c){},onMouseWheel:function(a,b,c){},onPreloadComplete:function(){},onPreloadProgress:function(a,b){},onRenderContextLost:function(){},onRenderContextRestored:function(a){},onTextEdit:function(a,b,c){},onTextInput:function(a){},onTouchCancel:function(a){},onTouchEnd:function(a){},onTouchMove:function(a){},
onTouchStart:function(a){},onWindowActivate:function(){},onWindowClose:function(){},onWindowCreate:function(){},onWindowDeactivate:function(){},onWindowDropFile:function(a){},onWindowEnter:function(){},onWindowExpose:function(){},onWindowFocusIn:function(){},onWindowFocusOut:function(){},onWindowFullscreen:function(){},onWindowLeave:function(){},onWindowMove:function(a,b){},onWindowMinimize:function(){},onWindowResize:function(a,b){},onWindowRestore:function(){},removeModule:function(a){null!=a&&
(a.__unregisterLimeModule(this),I.remove(this.modules,a))},render:function(a){},update:function(a){},__addWindow:function(a){if(null!=a){this.__windows.push(a);this.__windowByID.h[a.id]=a;var b=r(this,this.__onWindowClose);a.onClose.add(function(){b(a)},!1,-1E4);null==this.__window&&(this.__window=a,a.onActivate.add(r(this,this.onWindowActivate)),a.onRenderContextLost.add(r(this,this.onRenderContextLost)),a.onRenderContextRestored.add(r(this,this.onRenderContextRestored)),a.onDeactivate.add(r(this,
this.onWindowDeactivate)),a.onDropFile.add(r(this,this.onWindowDropFile)),a.onEnter.add(r(this,this.onWindowEnter)),a.onExpose.add(r(this,this.onWindowExpose)),a.onFocusIn.add(r(this,this.onWindowFocusIn)),a.onFocusOut.add(r(this,this.onWindowFocusOut)),a.onFullscreen.add(r(this,this.onWindowFullscreen)),a.onKeyDown.add(r(this,this.onKeyDown)),a.onKeyUp.add(r(this,this.onKeyUp)),a.onLeave.add(r(this,this.onWindowLeave)),a.onMinimize.add(r(this,this.onWindowMinimize)),a.onMouseDown.add(r(this,this.onMouseDown)),
a.onMouseMove.add(r(this,this.onMouseMove)),a.onMouseMoveRelative.add(r(this,this.onMouseMoveRelative)),a.onMouseUp.add(r(this,this.onMouseUp)),a.onMouseWheel.add(r(this,this.onMouseWheel)),a.onMove.add(r(this,this.onWindowMove)),a.onRender.add(r(this,this.render)),a.onResize.add(r(this,this.onWindowResize)),a.onRestore.add(r(this,this.onWindowRestore)),a.onTextEdit.add(r(this,this.onTextEdit)),a.onTextInput.add(r(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(a)}},__createWindow:function(a){a=
new Gi(this,a);return-1==a.id?null:a},__registerLimeModule:function(a){a.onUpdate.add(r(this,this.update));a.onExit.add(r(this,this.onModuleExit),!1,0);a.onExit.add(r(this,this.__onModuleExit),!1,0);for(a=Gd.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}Gd.onConnect.add(r(this,this.__onGamepadConnect));for(a=Xc.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);Xc.onConnect.add(r(this,this.__onJoystickConnect));kd.onCancel.add(r(this,this.onTouchCancel));
kd.onStart.add(r(this,this.onTouchStart));kd.onMove.add(r(this,this.onTouchMove));kd.onEnd.add(r(this,this.onTouchEnd))},__removeWindow:function(a){null!=a&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),I.remove(this.__windows,a),this.__windowByID.remove(a.id),a.close(),0==this.__windows.length&&Qa.exit(0))},__onGamepadConnect:function(a){this.onGamepadConnect(a);var b=r(this,this.onGamepadAxisMove),c=function(c,d){b(a,c,d)};a.onAxisMove.add(c);var d=r(this,this.onGamepadButtonDown);
c=function(b){d(a,b)};a.onButtonDown.add(c);var e=r(this,this.onGamepadButtonUp);c=function(b){e(a,b)};a.onButtonUp.add(c);var f=r(this,this.onGamepadDisconnect);a.onDisconnect.add(function(){f(a)})},__onJoystickConnect:function(a){this.onJoystickConnect(a);var b=r(this,this.onJoystickAxisMove),c=function(c,d){b(a,c,d)};a.onAxisMove.add(c);var d=r(this,this.onJoystickButtonDown);c=function(b){d(a,b)};a.onButtonDown.add(c);var e=r(this,this.onJoystickButtonUp);c=function(b){e(a,b)};a.onButtonUp.add(c);
var f=r(this,this.onJoystickDisconnect);a.onDisconnect.add(function(){f(a)});var g=r(this,this.onJoystickHatMove);c=function(b,c){g(a,b,c)};a.onHatMove.add(c);var h=r(this,this.onJoystickTrackballMove);c=function(b,c,d){h(a,b,c,d)};a.onTrackballMove.add(c)},__onModuleExit:function(a){this.__backend.exit()},__onWindowClose:function(a){if(this.__window==a)this.onWindowClose();this.__removeWindow(a)},__unregisterLimeModule:function(a){a.onUpdate.remove(r(this,this.update));a.onExit.remove(r(this,this.__onModuleExit));
a.onExit.remove(r(this,this.onModuleExit));Gd.onConnect.remove(r(this,this.__onGamepadConnect));Xc.onConnect.remove(r(this,this.__onJoystickConnect));kd.onCancel.remove(r(this,this.onTouchCancel));kd.onStart.remove(r(this,this.onTouchStart));kd.onMove.remove(r(this,this.onTouchMove));kd.onEnd.remove(r(this,this.onTouchEnd));this.onModuleExit(0)},get_preloader:function(){return this.__preloader},get_window:function(){return this.__window},get_windows:function(){return this.__windows},__class__:rd,
__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader"}});var hr=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app.Event"]=hr;hr.__name__="lime.app.Event";hr.prototype={canceled:null,__listeners:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,
0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},dispatch:null,has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=
this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__class__:hr};var eb=function(a,b){null==b&&(b=!1);if(null!=a)if(b)b=new Yd,b.future=this,Pe.queue({promise:b,work:a});else try{this.value=a(),this.isComplete=!0}catch(c){xb.lastError=c,this.error=J.caught(c).unwrap(),this.isError=!0}};k["lime.app.Future"]=eb;eb.__name__="lime.app.Future";eb.ofEvents=function(a,b,c){var d=new Yd;a.add(function(a){d.complete(a)},!0);null!=b&&b.add(function(a){d.error(a)},
!0);null!=c&&c.add(function(a,b){d.progress(a,b)},!0);return d.future};eb.withError=function(a){var b=new eb;b.isError=!0;b.error=a;return b};eb.withValue=function(a){var b=new eb;b.isComplete=!0;b.value=a;return b};eb.prototype={error:null,isComplete:null,isError:null,value:null,__completeListeners:null,__errorListeners:null,__progressListeners:null,onComplete:function(a){null!=a&&(this.isComplete?a(this.value):this.isError||(null==this.__completeListeners&&(this.__completeListeners=[]),this.__completeListeners.push(a)));
return this},onError:function(a){null!=a&&(this.isError?a(this.error):this.isComplete||(null==this.__errorListeners&&(this.__errorListeners=[]),this.__errorListeners.push(a)));return this},onProgress:function(a){null!=a&&(null==this.__progressListeners&&(this.__progressListeners=[]),this.__progressListeners.push(a));return this},ready:function(a){this.isComplete||this.isError||Q.warn("Cannot block thread in JavaScript",{fileName:"lime/app/Future.hx",lineNumber:208,className:"lime.app.Future",methodName:"ready"});
return this},result:function(a){null==a&&(a=-1);this.ready(a);return this.isComplete?this.value:null},then:function(a){if(this.isComplete)return a(this.value);if(this.isError){var b=new eb;b.isError=!0;b.error=this.error;return b}var c=new Yd;this.onError(r(c,c.error));this.onProgress(r(c,c.progress));this.onComplete(function(b){b=a(b);b.onError(r(c,c.error));b.onComplete(r(c,c.complete))});return c.future},__class__:eb};var Pe=function(){};k["lime.app._Future.FutureWork"]=Pe;Pe.__name__="lime.app._Future.FutureWork";
Pe.queue=function(a){null==Pe.threadPool&&(Pe.threadPool=new wo,Pe.threadPool.doWork.add(Pe.threadPool_doWork),Pe.threadPool.onComplete.add(Pe.threadPool_onComplete),Pe.threadPool.onError.add(Pe.threadPool_onError));Pe.threadPool.queue(a)};Pe.threadPool_doWork=function(a){try{var b=a.work();Pe.threadPool.sendComplete({promise:a.promise,result:b})}catch(c){xb.lastError=c,b=J.caught(c).unwrap(),Pe.threadPool.sendError({promise:a.promise,error:b})}};Pe.threadPool_onComplete=function(a){a.promise.complete(a.result)};
Pe.threadPool_onError=function(a){a.promise.error(a.error)};var Yd=function(){this.future=new eb};k["lime.app.Promise"]=Yd;Yd.__name__="lime.app.Promise";Yd.prototype={future:null,isComplete:null,isError:null,complete:function(a){if(!this.future.isError&&(this.future.isComplete=!0,this.future.value=a,null!=this.future.__completeListeners)){for(var b=0,c=this.future.__completeListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__completeListeners=null}return this},completeWith:function(a){a.onComplete(r(this,
this.complete));a.onError(r(this,this.error));a.onProgress(r(this,this.progress));return this},error:function(a){if(!this.future.isComplete&&(this.future.isError=!0,this.future.error=a,null!=this.future.__errorListeners)){for(var b=0,c=this.future.__errorListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__errorListeners=null}return this},progress:function(a,b){if(!this.future.isError&&!this.future.isComplete&&null!=this.future.__progressListeners)for(var c=0,d=this.future.__progressListeners;c<
d.length;){var e=d[c];++c;e(a,b)}return this},get_isComplete:function(){return this.future.isComplete},get_isError:function(){return this.future.isError},__class__:Yd,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};var Rh=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Dynamic_Void"]=Rh;Rh.__name__="lime.app._Event_Dynamic_Void";Rh.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==
c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],
a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Rh};var xo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=
[]};k["lime.app._Event_Float_Float_Float_Void"]=xo;xo.__name__="lime.app._Event_Float_Float_Float_Void";xo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=
!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:xo};var yo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Float_Float_Int_Void"]=yo;yo.__name__="lime.app._Event_Float_Float_Int_Void";yo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=
this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:yo};var Mj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Float_Float_Void"]=Mj;Mj.__name__="lime.app._Event_Float_Float_Void";Mj.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),!this.canceled););},__class__:Mj};var zo=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=zo;zo.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_Void";zo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:zo};var Ao=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=Ao;Ao.__name__="lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void";Ao.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:Ao};var Bo=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Int_Float_Float_Void"]=Bo;Bo.__name__="lime.app._Event_Int_Float_Float_Void";Bo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,
b,c){this.canceled=!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:Bo};var Co=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Int_Float_Void"]=Co;Co.__name__="lime.app._Event_Int_Float_Void";Co.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>
this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),!this.canceled););},__class__:Co};var lm=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Int_Int_Void"]=lm;lm.__name__="lime.app._Event_Int_Int_Void";
lm.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,
a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),
!this.canceled););},__class__:lm};var Qh=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Int_Void"]=Qh;Qh.__name__="lime.app._Event_Int_Void";Qh.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Qh};var Do=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=Do;Do.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_Void";Do.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),!this.canceled););},__class__:Do};var Eo=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_String_Int_Int_Void"]=Eo;Eo.__name__="lime.app._Event_String_Int_Int_Void";Eo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,
b,c){this.canceled=!1;for(var d=this.__listeners,e=this.__repeat,f=0;f<d.length&&(d[f](a,b,c),e[f]?++f:this.remove(d[f]),!this.canceled););},__class__:Eo};var mm=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_String_Void"]=mm;mm.__name__="lime.app._Event_String_Void";mm.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=
this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:mm};var Bd=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_Void_Void"]=Bd;Bd.__name__="lime.app._Event_Void_Void";Bd.prototype={canceled:null,__repeat:null,
__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(){this.canceled=!1;for(var a=this.__listeners,b=this.__repeat,c=0;c<a.length&&(a[c](),b[c]?++c:this.remove(a[c]),!this.canceled););},__class__:Bd};var nm=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_graphics_RenderContext_Void"]=nm;nm.__name__="lime.app._Event_lime_graphics_RenderContext_Void";nm.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);
this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,
a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:nm};var Fo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=Fo;Fo.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";Fo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&
(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],
a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),!this.canceled););},__class__:Fo};var om=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=
[]};k["lime.app._Event_lime_ui_GamepadButton_Void"]=om;om.__name__="lime.app._Event_lime_ui_GamepadButton_Void";om.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:om};var Go=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_ui_Gamepad_Void"]=Go;Go.__name__="lime.app._Event_lime_ui_Gamepad_Void";Go.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=
this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Go};var Ho=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_ui_Joystick_Void"]=Ho;Ho.__name__="lime.app._Event_lime_ui_Joystick_Void";Ho.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Ho};var pm=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=pm;pm.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";pm.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?++e:this.remove(c[e]),!this.canceled););},__class__:pm};var Hi=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_lime_ui_Touch_Void"]=Hi;Hi.__name__="lime.app._Event_lime_ui_Touch_Void";Hi.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==
b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],
a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Hi};var uo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=
[]};k["lime.app._Event_lime_ui_Window_Void"]=uo;uo.__name__="lime.app._Event_lime_ui_Window_Void";uo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},
has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;
for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:uo};var ir=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};k["lime.app._Event_ofEvents_T_Void"]=ir;ir.__name__="lime.app._Event_ofEvents_T_Void";ir.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=
this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:ir};var Fb=function(a,b,c,d,e,f,g){null==e&&(e=-1);null==d&&(d=-1);null==c&&(c=0);null==b&&(b=0);this.offsetX=b;this.offsetY=c;this.width=d;this.height=e;this.version=0;null==g&&(g=qe.CANVAS);this.type=g;if(null==
a){if(0<d&&0<e)switch(this.type._hx_index){case 0:this.buffer=new Rf(null,d,e);ya.createCanvas(this,d,e);null!=f&&0!=f&&this.fillRect(new Dd(0,0,d,e),f);break;case 1:a=d*e*4,a=null!=a?new Uint8Array(a):null,this.buffer=new Rf(a,d,e),null!=f&&0!=f&&this.fillRect(new Dd(0,0,d,e),f)}}else this.__fromImageBuffer(a)};k["lime.graphics.Image"]=Fb;Fb.__name__="lime.graphics.Image";Fb.fromBase64=function(a,b){if(null==a)return null;var c=new Fb;c.__fromBase64(a,b);return c};Fb.fromBitmapData=function(a){return null==
a?null:a.image};Fb.fromBytes=function(a){if(null==a)return null;var b=new Fb;return b.__fromBytes(a)?b:null};Fb.fromCanvas=function(a){if(null==a)return null;var b=new Rf(null,a.width,a.height);b.set_src(a);a=new Fb(b);a.type=qe.CANVAS;return a};Fb.fromFile=function(a){if(null==a)return null;var b=new Fb;return b.__fromFile(a)?b:null};Fb.fromImageElement=function(a){if(null==a)return null;var b=new Rf(null,a.width,a.height);b.set_src(a);a=new Fb(b);a.type=qe.CANVAS;return a};Fb.loadFromBase64=function(a,
b){return null==a||null==b?eb.withValue(null):$a.loadImage("data:"+b+";base64,"+a)};Fb.loadFromBytes=function(a){if(null==a)return eb.withValue(null);if(Fb.__isPNG(a))var b="image/png";else if(Fb.__isJPG(a))b="image/jpeg";else if(Fb.__isGIF(a))b="image/gif";else if(Fb.__isWebP(a))b="image/webp";else return eb.withValue(null);return $a.loadImageFromBytes(a,b)};Fb.loadFromFile=function(a){return null==a?eb.withValue(null):$a.loadImage(a)};Fb.__isGIF=function(a){if(null==a||6>a.length)return!1;a=a.getString(0,
6);return"GIF87a"!=a?"GIF89a"==a:!0};Fb.__isJPG=function(a){return null==a||4>a.length?!1:255==a.b[0]&&216==a.b[1]&&255==a.b[a.length-2]?217==a.b[a.length-1]:!1};Fb.__isPNG=function(a){return null==a||8>a.length?!1:137==a.b[0]&&80==a.b[1]&&78==a.b[2]&&71==a.b[3]&&13==a.b[4]&&10==a.b[5]&&26==a.b[6]?10==a.b[7]:!1};Fb.__isWebP=function(a){return null==a||16>a.length?!1:"RIFF"==a.getString(0,4)?"WEBP"==a.getString(8,4):!1};Fb.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,rect:null,
type:null,version:null,width:null,x:null,y:null,clone:function(){if(null!=this.buffer){this.type==qe.CANVAS?ya.convertToCanvas(this):ya.convertToData(this);var a=new Fb(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Fb(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)},colorTransform:function(a,b){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:ya.colorTransform(this,
a,b);break;case 1:ya.convertToData(this);Za.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),Hd.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,e){b=this.__clipRect(b);if(null!=this.buffer&&null!=b&&!(e==jf.ALPHA&&!this.get_transparent()||0>=b.width||0>=b.height))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),this.type._hx_index){case 0:ya.copyChannel(this,
a,b,c,d,e);break;case 1:ya.convertToData(this);ya.convertToData(a);Za.copyChannel(this,a,b,c,d,e);break;case 2:switch(d._hx_index){case 0:var f=1;break;case 1:f=2;break;case 2:f=4;break;case 3:f=8}switch(e._hx_index){case 0:var g=1;break;case 1:g=2;break;case 2:g=4;break;case 3:g=8}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),f,g)}},copyPixels:function(a,b,c,d,e,f){null==f&&(f=
!1);if(null!=this.buffer&&null!=a&&!(0>=b.width||0>=b.height||0>=this.width||0>=this.height))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),0>b.x&&(b.width+=b.x,b.x=0),0>b.y&&(b.height+=b.y,b.y=0),c.x+b.width>this.width&&(b.width=this.width-c.x),c.y+b.height>this.height&&(b.height=this.height-c.y),0>c.x&&(b.width+=c.x,b.x-=c.x,c.x=0),0>c.y&&(b.height+=c.y,b.y-=c.y,c.y=0),a==this&&c.x<b.get_right()&&c.y<b.get_bottom()&&(a=this.clone()),d==a&&(null==
e||0==e.x&&0==e.y)&&(e=d=null),this.type._hx_index){case 0:null!=d?(ya.convertToData(this),ya.convertToData(a),null!=d&&ya.convertToData(d),Za.copyPixels(this,a,b,c,d,e,f)):(ya.convertToCanvas(this),ya.convertToCanvas(a),ya.copyPixels(this,a,b,c,d,e,f));break;case 1:ya.convertToData(this);ya.convertToData(a);null!=d&&ya.convertToData(d);Za.copyPixels(this,a,b,c,d,e,f);break;case 2:b.offset(a.offsetX,a.offsetY),c.offset(this.offsetX,this.offsetY),null!=d&&null!=e&&e.offset(d.offsetX,d.offsetY),this.buffer.__srcBitmapData.copyPixels(a.buffer.__srcBitmapData,
b.__toFlashRectangle(),c.__toFlashPoint(),null!=d?d.buffer.get_src():null,null!=e?e.__toFlashPoint():null,f)}},encode:function(a,b){null==b&&(b=90);if(null==a)return Jj.encode(this);switch(a._hx_index){case 0:return fr.encode(this);case 1:return im.encode(this,b);case 2:return Jj.encode(this)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:ya.fillRect(this,a,b,c);break;case 1:ya.convertToData(this);if(0==this.buffer.data.length)break;
Za.fillRect(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(null==c)b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255;else switch(c){case 1:break;case 2:b=(b&255)<<24|(b>>>8&255)<<16|(b>>>16&255)<<8|b>>>24&255;break;default:b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255}this.buffer.__srcBitmapData.fillRect(a.__toFlashRectangle(),b)}},floodFill:function(a,b,c,d){if(null!=this.buffer)switch(this.type._hx_index){case 0:ya.floodFill(this,a,b,c,d);break;case 1:ya.convertToData(this);
Za.floodFill(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.floodFill(a+this.offsetX,b+this.offsetY,c)}},getColorBoundsRect:function(a,b,c,d){null==c&&(c=!0);if(null==this.buffer)return null;switch(this.type._hx_index){case 0:return ya.convertToData(this),Za.getColorBoundsRect(this,
a,b,c,d);case 1:return Za.getColorBoundsRect(this,a,b,c,d);case 2:return a=this.buffer.__srcBitmapData.getColorBoundsRect(a,b,c),new Dd(a.x,a.y,a.width,a.height);default:return null}},getPixel:function(a,b,c){if(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return ya.getPixel(this,a,b,c);case 1:return ya.convertToData(this),Za.getPixel(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel(a+this.offsetX,b+this.offsetY);if(null==c)return(a>>>
16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixel32:function(a,b,c){if(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return ya.getPixel32(this,a,b,c);case 1:return ya.convertToData(this),Za.getPixel32(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel32(a+
this.offsetX,b+this.offsetY);if(null==c)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixels:function(a,b){if(null==this.buffer)return null;switch(this.type._hx_index){case 0:return ya.getPixels(this,a,b);case 1:return ya.convertToData(this),Za.getPixels(this,a,b);case 2:return null;default:return null}},
merge:function(a,b,c,d,e,f,g){if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:ya.convertToCanvas(this);ya.merge(this,a,b,c,d,e,f,g);break;case 1:ya.convertToData(this);ya.convertToData(a);Za.merge(this,a,b,c,d,e,f,g);break;case 2:b.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.merge(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d,e,f,g)}},resize:function(a,b){switch(this.type._hx_index){case 0:ya.resize(this,a,b);break;case 1:Za.resize(this,a,
b)}this.buffer.width=a;this.buffer.height=b;this.offsetY=this.offsetX=0;this.width=a;this.height=b},scroll:function(a,b){if(null!=this.buffer)switch(this.type._hx_index){case 0:ya.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new Vd(a,b));break;case 2:this.buffer.__srcBitmapData.scroll(a+this.offsetX,b+this.offsetX)}},setPixel:function(a,b,c,d){if(!(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:ya.setPixel(this,a,b,c,d);break;case 1:ya.convertToData(this);
Za.setPixel(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel(a+this.offsetX,b+this.offsetX,c)}},setPixel32:function(a,b,c,d){if(!(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:ya.setPixel32(this,a,b,c,d);break;
case 1:ya.convertToData(this);Za.setPixel32(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel32(a+this.offsetX,b+this.offsetY,c)}},setPixels:function(a,b,c,d){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(null==d&&(d=yg.BIG_ENDIAN),this.type._hx_index){case 0:ya.setPixels(this,
a,b,c,d);break;case 1:ya.convertToData(this),Za.setPixels(this,a,b,c,d)}},threshold:function(a,b,c,d,e,f,g,h,m){null==h&&(h=!1);null==g&&(g=-1);null==f&&(f=0);if(null==this.buffer||null==a||null==b)return 0;switch(this.type._hx_index){case 0:case 1:return ya.convertToData(this),ya.convertToData(a),Za.threshold(this,a,b,c,d,e,f,g,h,m);case 2:if(null==m){var l=f;f=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255}else switch(m){case 1:break;case 2:l=f;f=(l&255)<<24|(l>>>8&255)<<16|(l>>>16&255)<<
8|l>>>24&255;break;default:l=f,f=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255}if(null==m)l=g,g=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255;else switch(m){case 1:break;case 2:l=g;g=(l&255)<<24|(l>>>8&255)<<16|(l>>>16&255)<<8|l>>>24&255;break;default:l=g,g=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);return this.buffer.__srcBitmapData.threshold(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),
d,e,f,g,h)}return 0},__clipRect:function(a){return null==a||0>a.x&&(a.width-=-a.x,a.x=0,0>=a.x+a.width)||0>a.y&&(a.height-=-a.y,a.y=0,0>=a.y+a.height)||a.x+a.width>=this.width&&(a.width-=a.x+a.width-this.width,0>=a.width)||a.y+a.height>=this.height&&(a.height-=a.y+a.height-this.height,0>=a.height)?null:a},__fromBase64:function(a,b,c){var d=this,e=new Image;e.addEventListener("load",function(a){d.buffer=new Rf(null,e.width,e.height);d.buffer.__srcImage=e;d.offsetX=0;d.offsetY=0;d.width=d.buffer.width;
d.height=d.buffer.height;null!=c&&c(d)},!1);e.src="data:"+b+";base64,"+a},__fromBytes:function(a,b){if(Fb.__isPNG(a))var c="image/png";else if(Fb.__isJPG(a))c="image/jpeg";else if(Fb.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(Qf.encode(a),c,b);return!0},__fromFile:function(a,b,c){var d=this,e=new Image;$a.__isSameOrigin(a)||(e.crossOrigin="Anonymous");e.onload=function(a){d.buffer=new Rf(null,e.width,e.height);d.buffer.__srcImage=e;d.width=e.width;d.height=e.height;null!=b&&b(d)};e.onerror=
function(a){null!=c&&c()};e.src=a;return!0},__fromImageBuffer:function(a){this.buffer=a;null!=a&&(-1==this.width&&(this.width=a.width),-1==this.height&&(this.height=a.height))},get_data:function(){null==this.buffer.data&&0<this.buffer.width&&0<this.buffer.height&&ya.convertToData(this);return this.buffer.data},set_data:function(a){return this.buffer.data=a},get_format:function(){return this.buffer.format},set_format:function(a){this.buffer.format!=a&&1==this.type._hx_index&&Za.setFormat(this,a);return this.buffer.format=
a},get_powerOfTwo:function(){return 0!=this.buffer.width&&(this.buffer.width&~this.buffer.width+1)==this.buffer.width?0!=this.buffer.height?(this.buffer.height&~this.buffer.height+1)==this.buffer.height:!1:!1},set_powerOfTwo:function(a){if(a!=this.get_powerOfTwo()){for(var b=1,c=1;b<this.buffer.width;)b<<=1;for(;c<this.buffer.height;)c<<=1;if(b==this.buffer.width&&c==this.buffer.height)return a;switch(this.type._hx_index){case 0:ya.convertToData(this);Za.resizeBuffer(this,b,c);break;case 1:Za.resizeBuffer(this,
b,c)}}return a},get_premultiplied:function(){return this.buffer.premultiplied},set_premultiplied:function(a){if(a&&!this.buffer.premultiplied)switch(this.type._hx_index){case 0:case 1:ya.convertToData(this),Za.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&1==this.type._hx_index&&(ya.convertToData(this),Za.unmultiplyAlpha(this));return a},get_rect:function(){return new Dd(0,0,this.width,this.height)},get_src:function(){null!=this.buffer.__srcCanvas||null==this.buffer.data&&this.type!=qe.DATA||
ya.convertToCanvas(this);return this.buffer.get_src()},set_src:function(a){return this.buffer.set_src(a)},get_transparent:function(){return null==this.buffer?!1:this.buffer.transparent},set_transparent:function(a){return null==this.buffer?!1:this.buffer.transparent=a},__class__:Fb,__properties__:{set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",
get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",set_data:"set_data",get_data:"get_data"}};var Rf=function(a,b,c,d,e){null==d&&(d=32);null==c&&(c=0);null==b&&(b=0);this.data=a;this.width=b;this.height=c;this.bitsPerPixel=d;this.format=null==e?0:e;this.premultiplied=!1;this.transparent=!0};k["lime.graphics.ImageBuffer"]=Rf;Rf.__name__="lime.graphics.ImageBuffer";Rf.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,
__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcCustom:null,__srcImage:null,__srcImageData:null,clone:function(){var a=new Rf(this.data,this.width,this.height,this.bitsPerPixel);if(null!=this.data){var b=this.data.byteLength,c=null,d=null,e=null,f=null,g=null;b=null!=b?new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):null!=e?new Uint8Array(e):null!=f?null==g?new Uint8Array(f,0):new Uint8Array(f,0,g):null;a.data=b;d=c=b=null;e=this.data;g=f=null;b=null!=b?
new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):null!=e?new Uint8Array(e):null!=f?null==g?new Uint8Array(f,0):new Uint8Array(f,0,g):null;a.data.set(b)}else null!=this.__srcImageData?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcImageData.width,a.__srcCanvas.height=this.__srcImageData.height,a.__srcImageData=a.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height),
b=new Uint8ClampedArray(this.__srcImageData.data),a.__srcImageData.data.set(b)):null!=this.__srcCanvas?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcCanvas.width,a.__srcCanvas.height=this.__srcCanvas.height,a.__srcContext.drawImage(this.__srcCanvas,0,0)):a.__srcImage=this.__srcImage;a.bitsPerPixel=this.bitsPerPixel;a.format=this.format;a.premultiplied=this.premultiplied;a.transparent=this.transparent;return a},get_src:function(){return null!=
this.__srcImage?this.__srcImage:this.__srcCanvas},set_src:function(a){a instanceof Image?this.__srcImage=a:a instanceof HTMLCanvasElement&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return this.width*(this.bitsPerPixel/8|0)},__class__:Rf,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var jf=x["lime.graphics.ImageChannel"]={__ename__:"lime.graphics.ImageChannel",__constructs__:null,RED:{_hx_name:"RED",_hx_index:0,
__enum__:"lime.graphics.ImageChannel",toString:v},GREEN:{_hx_name:"GREEN",_hx_index:1,__enum__:"lime.graphics.ImageChannel",toString:v},BLUE:{_hx_name:"BLUE",_hx_index:2,__enum__:"lime.graphics.ImageChannel",toString:v},ALPHA:{_hx_name:"ALPHA",_hx_index:3,__enum__:"lime.graphics.ImageChannel",toString:v}};jf.__constructs__=[jf.RED,jf.GREEN,jf.BLUE,jf.ALPHA];var qm=x["lime.graphics.ImageFileFormat"]={__ename__:"lime.graphics.ImageFileFormat",__constructs__:null,BMP:{_hx_name:"BMP",_hx_index:0,__enum__:"lime.graphics.ImageFileFormat",
toString:v},JPEG:{_hx_name:"JPEG",_hx_index:1,__enum__:"lime.graphics.ImageFileFormat",toString:v},PNG:{_hx_name:"PNG",_hx_index:2,__enum__:"lime.graphics.ImageFileFormat",toString:v}};qm.__constructs__=[qm.BMP,qm.JPEG,qm.PNG];var qe=x["lime.graphics.ImageType"]={__ename__:"lime.graphics.ImageType",__constructs__:null,CANVAS:{_hx_name:"CANVAS",_hx_index:0,__enum__:"lime.graphics.ImageType",toString:v},DATA:{_hx_name:"DATA",_hx_index:1,__enum__:"lime.graphics.ImageType",toString:v},FLASH:{_hx_name:"FLASH",
_hx_index:2,__enum__:"lime.graphics.ImageType",toString:v},CUSTOM:{_hx_name:"CUSTOM",_hx_index:3,__enum__:"lime.graphics.ImageType",toString:v}};qe.__constructs__=[qe.CANVAS,qe.DATA,qe.FLASH,qe.CUSTOM];var ro=function(){};k["lime.graphics.RenderContext"]=ro;ro.__name__="lime.graphics.RenderContext";ro.prototype={attributes:null,cairo:null,canvas2D:null,dom:null,flash:null,gl:null,gles2:null,gles3:null,type:null,version:null,webgl:null,webgl2:null,window:null,__class__:ro};var fs={bufferData:function(a,
b,c,d,e,f){null!=e?a.bufferData(b,c,d,e,f):a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d,e,f){null!=e?a.bufferSubData(b,c,d,e,f):a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,e,f,g,h,m,l){null!=m?a.compressedTexImage2D(b,c,d,e,f,g,h,m,l):a.compressedTexImage2D(b,c,d,e,f,g,h)},compressedTexSubImage2D:function(a,b,c,d,e,f,g,h,m,l,n){null!=l?a.compressedTexSubImage2D(b,c,d,e,f,g,h,m,l,n):a.compressedTexSubImage2D(b,c,d,e,f,g,h,m)},getBufferSubData:function(a,b,c,d,e,f){null!=e?
a.getBufferSubData(b,c,d,e,f):a.getBufferSubData(b,c,d)},readPixels:function(a,b,c,d,e,f,g,h,m){null!=m?a.readPixels(b,c,d,e,f,g,h,m):a.readPixels(b,c,d,e,f,g,h)},texImage2D:function(a,b,c,d,e,f,g,h,m,l,n){null!=n?a.texImage2D(b,c,d,e,f,g,h,m,l,n):null!=h?a.texImage2D(b,c,d,e,f,g,h,m,l):a.texImage2D(b,c,d,e,f,g)},texSubImage2D:function(a,b,c,d,e,f,g,h,m,l,n){null!=n?a.texSubImage2D(b,c,d,e,f,g,h,m,l,n):null!=m?a.texSubImage2D(b,c,d,e,f,g,h,m,l):a.texSubImage2D(b,c,d,e,f,g,h)},uniform1fv:function(a,
b,c,d,e){null!=d?a.uniform1fv(b,c,d,e):a.uniform1fv(b,c)},uniform1iv:function(a,b,c,d,e){null!=d?a.uniform1iv(b,c,d,e):a.uniform1iv(b,c)},uniform2fv:function(a,b,c,d,e){null!=d?a.uniform2fv(b,c,d,e):a.uniform2fv(b,c)},uniform2iv:function(a,b,c,d,e){null!=d?a.uniform2iv(b,c,d,e):a.uniform2iv(b,c)},uniform3fv:function(a,b,c,d,e){null!=d?a.uniform3fv(b,c,d,e):a.uniform3fv(b,c)},uniform3iv:function(a,b,c,d,e){null!=d?a.uniform3iv(b,c,d,e):a.uniform3iv(b,c)},uniform4fv:function(a,b,c,d,e){null!=d?a.uniform4fv(b,
c,d,e):a.uniform4fv(b,c)},uniform4iv:function(a,b,c,d,e){null!=d?a.uniform4iv(b,c,d,e):a.uniform4iv(b,c)},uniformMatrix2fv:function(a,b,c,d,e,f){null!=e?a.uniformMatrix2fv(b,c,d,e,f):a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d,e,f){null!=e?a.uniformMatrix3fv(b,c,d,e,f):a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d,e,f){null!=e?a.uniformMatrix4fv(b,c,d,e,f):a.uniformMatrix4fv(b,c,d)},fromGL:function(a){return null},fromRenderContext:function(a){return a.webgl2},toWebGLRenderContext:function(a){return a}},
$b={bufferData:function(a,b,c,d){a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d){a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,e,f,g,h){a.compressedTexImage2D(b,c,d,e,f,g,h)},compressedTexSubImage2D:function(a,b,c,d,e,f,g,h,m){a.compressedTexSubImage2D(b,c,d,e,f,g,h,m)},readPixels:function(a,b,c,d,e,f,g,h){a.readPixels(b,c,d,e,f,g,h)},texImage2D:function(a,b,c,d,e,f,g,h,m,l){null!=h?a.texImage2D(b,c,d,e,f,g,h,m,l):a.texImage2D(b,c,d,e,f,g)},texSubImage2D:function(a,b,c,d,e,f,
g,h,m,l){null!=m?a.texSubImage2D(b,c,d,e,f,g,h,m,l):a.texSubImage2D(b,c,d,e,f,g,h)},uniformMatrix2fv:function(a,b,c,d){a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d){a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d){a.uniformMatrix4fv(b,c,d)},fromWebGL2RenderContext:function(a){return a},fromRenderContext:function(a){return a.webgl},fromGL:function(a){return t.context}},Nj=function(a){};k["lime.graphics.cairo.Cairo"]=Nj;Nj.__name__="lime.graphics.cairo.Cairo";Nj.__properties__=
{get_versionString:"get_versionString",get_version:"get_version"};Nj.get_version=function(){return 0};Nj.get_versionString=function(){return""};Nj.prototype={target:null,userData:null,handle:null,arc:function(a,b,c,d,e){},arcNegative:function(a,b,c,d,e){},clip:function(){},clipExtents:function(a,b,c,d){},clipPreserve:function(){},closePath:function(){},copyPage:function(){},curveTo:function(a,b,c,d,e,f){},fill:function(){},fillExtents:function(a,b,c,d){},fillPreserve:function(){},getOperator:function(){return 0},
identityMatrix:function(){},inClip:function(a,b){return!1},inFill:function(a,b){return!1},inStroke:function(a,b){return!1},lineTo:function(a,b){},mask:function(a){},maskSurface:function(a,b,c){},moveTo:function(a,b){},newPath:function(){},paint:function(){},paintWithAlpha:function(a){},popGroup:function(){return null},popGroupToSource:function(){},pushGroup:function(){},pushGroupWithContent:function(a){},recreate:function(a){},rectangle:function(a,b,c,d){},relCurveTo:function(a,b,c,d,e,f){},relLineTo:function(a,
b){},relMoveTo:function(a,b){},resetClip:function(){},restore:function(){},rotate:function(a){},save:function(){},scale:function(a,b){},setFontSize:function(a){},setOperator:function(a){return a},setSourceRGB:function(a,b,c){},setSourceRGBA:function(a,b,c,d){},setSourceSurface:function(a,b,c){},showGlyphs:function(a){},showPage:function(){},showText:function(a){},status:function(){return 0},stroke:function(){},strokeExtents:function(a,b,c,d){},strokePreserve:function(){},textPath:function(a){},transform:function(a){},
translate:function(a,b){},get_antialias:function(){return 0},set_antialias:function(a){return a},get_currentPoint:function(){return null},get_dash:function(){return[]},set_dash:function(a){return a},get_dashCount:function(){return 0},get_fillRule:function(){return 0},set_fillRule:function(a){return a},get_fontFace:function(){return 0},set_fontFace:function(a){return a},get_fontOptions:function(){return null},set_fontOptions:function(a){return a},get_groupTarget:function(){return 0},get_hasCurrentPoint:function(){return!1},
get_lineCap:function(){return 0},set_lineCap:function(a){return a},get_lineJoin:function(){return 0},set_lineJoin:function(a){return a},get_lineWidth:function(){return 0},set_lineWidth:function(a){return a},get_matrix:function(){return null},set_matrix:function(a){return a},get_miterLimit:function(){return 0},set_miterLimit:function(a){return a},get_source:function(){return 0},set_source:function(a){return a},get_target:function(){return 0},get_tolerance:function(){return 0},set_tolerance:function(a){return a},
__class__:Nj,__properties__:{set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",
set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}};var jr=function(a,b,c){null==c&&(c=0);null==b&&(b=0);this.index=a;this.x=b;this.y=c};k["lime.graphics.cairo.CairoGlyph"]=jr;jr.__name__="lime.graphics.cairo.CairoGlyph";
jr.prototype={index:null,x:null,y:null,__class__:jr};var ms={__properties__:{get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"},_new:function(a,b,c){return 0},create:function(a,b,c,d,e){return 0},fromImage:function(a){return null},get_data:function(a){return kf.fromFloat(0)},get_format:function(a){return 0},get_height:function(a){return 0},get_stride:function(a){return 0},get_width:function(a){return 0}},Io={__properties__:{set_matrix:"set_matrix",
get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"},_new:function(a){return a},addColorStopRGB:function(a,b,c,d,e){},addColorStopRGBA:function(a,b,c,d,e,f){},createForSurface:function(a){return 0},createLinear:function(a,b,c,d){return 0},createRadial:function(a,b,c,d,e,f){return 0},createRGB:function(a,b,c){return 0},createRGBA:function(a,b,c,d){return 0},get_colorStopCount:function(a){return 0},
get_extend:function(a){return 0},set_extend:function(a,b){return b},get_filter:function(a){return 0},set_filter:function(a,b){return b},get_matrix:function(a){return null},set_matrix:function(a,b){return b}},ns={flush:function(a){}},t=function(){};k["lime.graphics.opengl.GL"]=t;t.__name__="lime.graphics.opengl.GL";t.activeTexture=function(a){t.context.activeTexture(a)};t.attachShader=function(a,b){t.context.attachShader(a,b)};t.beginQuery=function(a,b){t.context.beginQuery(a,b)};t.beginTransformFeedback=
function(a){t.context.beginTransformFeedback(a)};t.bindAttribLocation=function(a,b,c){t.context.bindAttribLocation(a,b,c)};t.bindBuffer=function(a,b){t.context.bindBuffer(a,b)};t.bindBufferBase=function(a,b,c){t.context.bindBufferBase(a,b,c)};t.bindBufferRange=function(a,b,c,d,e){t.context.bindBufferRange(a,b,c,d,kf.fromFloat(e))};t.bindFramebuffer=function(a,b){t.context.bindFramebuffer(a,b)};t.bindRenderbuffer=function(a,b){t.context.bindRenderbuffer(a,b)};t.bindSampler=function(a,b){t.context.bindSampler(a,
b)};t.bindTexture=function(a,b){t.context.bindTexture(a,b)};t.bindTransformFeedback=function(a,b){t.context.bindTransformFeedback(a,b)};t.bindVertexArray=function(a){t.context.bindVertexArray(a)};t.blitFramebuffer=function(a,b,c,d,e,f,g,h,m,l){t.context.blitFramebuffer(a,b,c,d,e,f,g,h,m,l)};t.blendColor=function(a,b,c,d){t.context.blendColor(a,b,c,d)};t.blendEquation=function(a){t.context.blendEquation(a)};t.blendEquationSeparate=function(a,b){t.context.blendEquationSeparate(a,b)};t.blendFunc=function(a,
b){t.context.blendFunc(a,b)};t.blendFuncSeparate=function(a,b,c,d){t.context.blendFuncSeparate(a,b,c,d)};t.bufferDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.bufferData(a,b,c,d,e):f.bufferData(a,b,c)};t.bufferSubDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.bufferSubData(a,b,c,d,e):f.bufferSubData(a,b,c)};t.checkFramebufferStatus=function(a){return t.context.checkFramebufferStatus(a)};t.clear=function(a){t.context.clear(a)};t.clearBufferfi=function(a,b,c,d){t.context.clearBufferfi(a,
b,c,d)};t.clearBufferfvWEBGL=function(a,b,c,d){t.context.clearBufferfv(a,b,c,d)};t.clearBufferivWEBGL=function(a,b,c,d){t.context.clearBufferiv(a,b,c,d)};t.clearBufferuivWEBGL=function(a,b,c,d){t.context.clearBufferuiv(a,b,c,d)};t.clearColor=function(a,b,c,d){t.context.clearColor(a,b,c,d)};t.clearDepth=function(a){t.context.clearDepth(a)};t.clearStencil=function(a){t.context.clearStencil(a)};t.clientWaitSync=function(a,b,c){return t.context.clientWaitSync(a,b,c)};t.colorMask=function(a,b,c,d){t.context.colorMask(a,
b,c,d)};t.compileShader=function(a){t.context.compileShader(a)};t.compressedTexImage2DWEBGL=function(a,b,c,d,e,f,g,h,m){var l=t.context;null!=h?l.compressedTexImage2D(a,b,c,d,e,f,g,h,m):l.compressedTexImage2D(a,b,c,d,e,f,g)};t.compressedTexImage3DWEBGL=function(a,b,c,d,e,f,g,h,m,l){t.context.compressedTexImage3D(a,b,c,d,e,f,g,h,m,l)};t.compressedTexSubImage2DWEBGL=function(a,b,c,d,e,f,g,h,m,l){var n=t.context;null!=m?n.compressedTexSubImage2D(a,b,c,d,e,f,g,h,m,l):n.compressedTexSubImage2D(a,b,c,d,
e,f,g,h)};t.compressedTexSubImage3DWEBGL=function(a,b,c,d,e,f,g,h,m,l,n,p){t.context.compressedTexSubImage3D(a,b,c,d,e,f,g,h,m,l,n,p)};t.copyTexImage2D=function(a,b,c,d,e,f,g,h){t.context.copyTexImage2D(a,b,c,d,e,f,g,h)};t.copyTexSubImage2D=function(a,b,c,d,e,f,g,h){t.context.copyTexSubImage2D(a,b,c,d,e,f,g,h)};t.copyTexSubImage3D=function(a,b,c,d,e,f,g,h,m){t.context.copyTexSubImage3D(a,b,c,d,e,f,g,h,m)};t.createBuffer=function(){return t.context.createBuffer()};t.createFramebuffer=function(){return t.context.createFramebuffer()};
t.createProgram=function(){return t.context.createProgram()};t.createQuery=function(){return t.context.createQuery()};t.createRenderbuffer=function(){return t.context.createRenderbuffer()};t.createSampler=function(){return t.context.createSampler()};t.createShader=function(a){return t.context.createShader(a)};t.createTexture=function(){return t.context.createTexture()};t.createTransformFeedback=function(){return t.context.createTransformFeedback()};t.createVertexArray=function(){return t.context.createVertexArray()};
t.cullFace=function(a){t.context.cullFace(a)};t.deleteBuffer=function(a){t.context.deleteBuffer(a)};t.deleteFramebuffer=function(a){t.context.deleteFramebuffer(a)};t.deleteProgram=function(a){t.context.deleteProgram(a)};t.deleteQuery=function(a){t.context.deleteQuery(a)};t.deleteRenderbuffer=function(a){t.context.deleteRenderbuffer(a)};t.deleteSampler=function(a){t.context.deleteSampler(a)};t.deleteShader=function(a){t.context.deleteShader(a)};t.deleteSync=function(a){t.context.deleteSync(a)};t.deleteTexture=
function(a){t.context.deleteTexture(a)};t.deleteTransformFeedback=function(a){t.context.deleteTransformFeedback(a)};t.deleteVertexArray=function(a){t.context.deleteVertexArray(a)};t.depthFunc=function(a){t.context.depthFunc(a)};t.depthMask=function(a){t.context.depthMask(a)};t.depthRange=function(a,b){t.context.depthRange(a,b)};t.detachShader=function(a,b){t.context.detachShader(a,b)};t.disable=function(a){t.context.disable(a)};t.disableVertexAttribArray=function(a){t.context.disableVertexAttribArray(a)};
t.drawArrays=function(a,b,c){t.context.drawArrays(a,b,c)};t.drawArraysInstanced=function(a,b,c,d){t.context.drawArraysInstanced(a,b,c,d)};t.drawBuffers=function(a){t.context.drawBuffers(a)};t.drawElements=function(a,b,c,d){t.context.drawElements(a,b,c,d)};t.drawElementsInstanced=function(a,b,c,d,e){t.context.drawElementsInstanced(a,b,c,d,e)};t.drawRangeElements=function(a,b,c,d,e,f){t.context.drawRangeElements(a,b,c,d,e,f)};t.enable=function(a){t.context.enable(a)};t.enableVertexAttribArray=function(a){t.context.enableVertexAttribArray(a)};
t.endQuery=function(a){t.context.endQuery(a)};t.endTransformFeedback=function(){t.context.endTransformFeedback()};t.fenceSync=function(a,b){return t.context.fenceSync(a,b)};t.finish=function(){t.context.finish()};t.flush=function(){t.context.flush()};t.framebufferRenderbuffer=function(a,b,c,d){t.context.framebufferRenderbuffer(a,b,c,d)};t.framebufferTexture2D=function(a,b,c,d,e){t.context.framebufferTexture2D(a,b,c,d,e)};t.framebufferTextureLayer=function(a,b,c,d,e){t.context.framebufferTextureLayer(a,
b,c,d,e)};t.frontFace=function(a){t.context.frontFace(a)};t.generateMipmap=function(a){t.context.generateMipmap(a)};t.getActiveAttrib=function(a,b){return t.context.getActiveAttrib(a,b)};t.getActiveUniform=function(a,b){return t.context.getActiveUniform(a,b)};t.getActiveUniformBlockName=function(a,b){return t.context.getActiveUniformBlockName(a,b)};t.getActiveUniformBlockParameter=function(a,b,c){return t.context.getActiveUniformBlockParameter(a,b,c)};t.getActiveUniforms=function(a,b,c){return t.context.getActiveUniforms(a,
b,c)};t.getAttachedShaders=function(a){return t.context.getAttachedShaders(a)};t.getAttribLocation=function(a,b){return t.context.getAttribLocation(a,b)};t.getBufferParameter=function(a,b){return t.context.getBufferParameter(a,b)};t.getBufferSubDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.getBufferSubData(a,b,c,d,e):f.getBufferSubData(a,b,c)};t.getContextAttributes=function(){return t.context.getContextAttributes()};t.getError=function(){return t.context.getError()};t.getExtension=function(a){return t.context.getExtension(a)};
t.getFragDataLocation=function(a,b){return t.context.getFragDataLocation(a,b)};t.getFramebufferAttachmentParameter=function(a,b,c){return t.context.getFramebufferAttachmentParameter(a,b,c)};t.getIndexedParameter=function(a,b){return t.context.getIndexedParameter(a,b)};t.getInternalformatParameter=function(a,b,c){return t.context.getInternalformatParameter(a,b,c)};t.getParameter=function(a){return t.context.getParameter(a)};t.getProgramInfoLog=function(a){return t.context.getProgramInfoLog(a)};t.getProgramParameter=
function(a,b){return t.context.getProgramParameter(a,b)};t.getQuery=function(a,b){return t.context.getQuery(a,b)};t.getQueryParameter=function(a,b){return t.context.getQueryParameter(a,b)};t.getRenderbufferParameter=function(a,b){return t.context.getRenderbufferParameter(a,b)};t.getSamplerParameter=function(a,b){return t.context.getSamplerParameter(a,b)};t.getShaderInfoLog=function(a){return t.context.getShaderInfoLog(a)};t.getShaderParameter=function(a,b){return t.context.getShaderParameter(a,b)};
t.getShaderPrecisionFormat=function(a,b){return t.context.getShaderPrecisionFormat(a,b)};t.getShaderSource=function(a){return t.context.getShaderSource(a)};t.getSupportedExtensions=function(){return t.context.getSupportedExtensions()};t.getSyncParameter=function(a,b){return t.context.getSyncParameter(a,b)};t.getTexParameter=function(a,b){return t.context.getTexParameter(a,b)};t.getTransformFeedbackVarying=function(a,b){return t.context.getTransformFeedbackVarying(a,b)};t.getUniform=function(a,b){return t.context.getUniform(a,
b)};t.getUniformBlockIndex=function(a,b){return t.context.getUniformBlockIndex(a,b)};t.getUniformIndices=function(a,b){return t.context.getUniformIndices(a,b)};t.getUniformLocation=function(a,b){return t.context.getUniformLocation(a,b)};t.getVertexAttrib=function(a,b){return t.context.getVertexAttrib(a,b)};t.getVertexAttribOffset=function(a,b){return kf.fromFloat(t.context.getVertexAttribOffset(a,b))};t.hint=function(a,b){t.context.hint(a,b)};t.invalidateFramebuffer=function(a,b){t.context.invalidateFramebuffer(a,
b)};t.invalidateSubFramebuffer=function(a,b,c,d,e,f){t.context.invalidateSubFramebuffer(a,b,c,d,e,f)};t.isBuffer=function(a){return t.context.isBuffer(a)};t.isContextLost=function(){return t.context.isContextLost()};t.isEnabled=function(a){return t.context.isEnabled(a)};t.isFramebuffer=function(a){return t.context.isFramebuffer(a)};t.isProgram=function(a){return t.context.isProgram(a)};t.isQuery=function(a){return t.context.isQuery(a)};t.isRenderbuffer=function(a){return t.context.isRenderbuffer(a)};
t.isSampler=function(a){return t.context.isSampler(a)};t.isShader=function(a){return t.context.isShader(a)};t.isSync=function(a){return t.context.isSync(a)};t.isTexture=function(a){return t.context.isTexture(a)};t.isTransformFeedback=function(a){return t.context.isTransformFeedback(a)};t.isVertexArray=function(a){return t.context.isVertexArray(a)};t.lineWidth=function(a){t.context.lineWidth(a)};t.linkProgram=function(a){t.context.linkProgram(a)};t.pauseTransformFeedback=function(){t.context.pauseTransformFeedback()};
t.pixelStorei=function(a,b){t.context.pixelStorei(a,b)};t.polygonOffset=function(a,b){t.context.polygonOffset(a,b)};t.readBuffer=function(a){t.context.readBuffer(a)};t.readPixelsWEBGL=function(a,b,c,d,e,f,g,h){var m=t.context;null!=h?m.readPixels(a,b,c,d,e,f,g,h):m.readPixels(a,b,c,d,e,f,g)};t.renderbufferStorage=function(a,b,c,d){t.context.renderbufferStorage(a,b,c,d)};t.renderbufferStorageMultisample=function(a,b,c,d,e){t.context.renderbufferStorageMultisample(a,b,c,d,e)};t.resumeTransformFeedback=
function(){t.context.resumeTransformFeedback()};t.sampleCoverage=function(a,b){t.context.sampleCoverage(a,b)};t.samplerParameterf=function(a,b,c){t.context.samplerParameterf(a,b,c)};t.samplerParameteri=function(a,b,c){t.context.samplerParameteri(a,b,c)};t.scissor=function(a,b,c,d){t.context.scissor(a,b,c,d)};t.shaderSource=function(a,b){t.context.shaderSource(a,b)};t.stencilFunc=function(a,b,c){t.context.stencilFunc(a,b,c)};t.stencilFuncSeparate=function(a,b,c,d){t.context.stencilFuncSeparate(a,b,
c,d)};t.stencilMask=function(a){t.context.stencilMask(a)};t.stencilMaskSeparate=function(a,b){t.context.stencilMaskSeparate(a,b)};t.stencilOp=function(a,b,c){t.context.stencilOp(a,b,c)};t.stencilOpSeparate=function(a,b,c,d){t.context.stencilOpSeparate(a,b,c,d)};t.texImage2DWEBGL=function(a,b,c,d,e,f,g,h,m,l){var n=t.context;null!=l?n.texImage2D(a,b,c,d,e,f,g,h,m,l):null!=g?n.texImage2D(a,b,c,d,e,f,g,h,m):n.texImage2D(a,b,c,d,e,f)};t.texImage3DWEBGL=function(a,b,c,d,e,f,g,h,m,l,n){t.context.texImage3D(a,
b,c,d,e,f,g,h,m,l,n)};t.texStorage2D=function(a,b,c,d,e){t.context.texStorage2D(a,b,c,d,e)};t.texStorage3D=function(a,b,c,d,e,f){t.context.texStorage3D(a,b,c,d,e,f)};t.texParameterf=function(a,b,c){t.context.texParameterf(a,b,c)};t.texParameteri=function(a,b,c){t.context.texParameteri(a,b,c)};t.texSubImage2DWEBGL=function(a,b,c,d,e,f,g,h,m,l){var n=t.context;null!=l?n.texSubImage2D(a,b,c,d,e,f,g,h,m,l):null!=h?n.texSubImage2D(a,b,c,d,e,f,g,h,m):n.texSubImage2D(a,b,c,d,e,f,g)};t.texSubImage3DWEBGL=
function(a,b,c,d,e,f,g,h,m,l,n,p){t.context.texSubImage3D(a,b,c,d,e,f,g,h,m,l,n,p)};t.transformFeedbackVaryings=function(a,b,c){t.context.transformFeedbackVaryings(a,b,c)};t.uniform1f=function(a,b){t.context.uniform1f(a,b)};t.uniform1fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform1fv(a,b,c,d):e.uniform1fv(a,b)};t.uniform1i=function(a,b){t.context.uniform1i(a,b)};t.uniform1ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform1iv(a,b,c,d):e.uniform1iv(a,b)};t.uniform1ui=function(a,
b){t.context.uniform1ui(a,b)};t.uniform1uivWEBGL=function(a,b,c,d){t.context.uniform1uiv(a,b,c,d)};t.uniform2f=function(a,b,c){t.context.uniform2f(a,b,c)};t.uniform2fvWEBGL=function(a,b,c,d){fs.uniform2fv(t.context,a,b,c,d)};t.uniform2i=function(a,b,c){t.context.uniform2i(a,b,c)};t.uniform2ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform2iv(a,b,c,d):e.uniform2iv(a,b)};t.uniform2ui=function(a,b,c){t.context.uniform2ui(a,b,c)};t.uniform2uivWEBGL=function(a,b,c,d){t.context.uniform2uiv(a,
b,c,d)};t.uniform3f=function(a,b,c,d){t.context.uniform3f(a,b,c,d)};t.uniform3fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform3fv(a,b,c,d):e.uniform3fv(a,b)};t.uniform3i=function(a,b,c,d){t.context.uniform3i(a,b,c,d)};t.uniform3ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform3iv(a,b,c,d):e.uniform3iv(a,b)};t.uniform3ui=function(a,b,c,d){t.context.uniform3ui(a,b,c,d)};t.uniform3uivWEBGL=function(a,b,c,d){t.context.uniform3uiv(a,b,c,d)};t.uniform4f=function(a,b,c,d,e){t.context.uniform4f(a,
b,c,d,e)};t.uniform4fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform4fv(a,b,c,d):e.uniform4fv(a,b)};t.uniform4i=function(a,b,c,d,e){t.context.uniform4i(a,b,c,d,e)};t.uniform4ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform4iv(a,b,c,d):e.uniform4iv(a,b)};t.uniform4ui=function(a,b,c,d,e){t.context.uniform4ui(a,b,c,d,e)};t.uniform4uivWEBGL=function(a,b,c,d){t.context.uniform4uiv(a,b,c,d)};t.uniformBlockBinding=function(a,b,c){t.context.uniformBlockBinding(a,b,c)};t.uniformMatrix2fvWEBGL=
function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix2fv(a,b,c,d,e):f.uniformMatrix2fv(a,b,c)};t.uniformMatrix2x3fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix2x3fv(a,b,c,d,e)};t.uniformMatrix2x4fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix2x4fv(a,b,c,d,e)};t.uniformMatrix3fvWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix3fv(a,b,c,d,e):f.uniformMatrix3fv(a,b,c)};t.uniformMatrix3x2fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix3x2fv(a,b,c,d,e)};t.uniformMatrix3x4fvWEBGL=
function(a,b,c,d,e){t.context.uniformMatrix3x4fv(a,b,c,d,e)};t.uniformMatrix4fvWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix4fv(a,b,c,d,e):f.uniformMatrix4fv(a,b,c)};t.uniformMatrix4x2fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix4x2fv(a,b,c,d,e)};t.uniformMatrix4x3fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix4x3fv(a,b,c,d,e)};t.useProgram=function(a){t.context.useProgram(a)};t.validateProgram=function(a){t.context.validateProgram(a)};t.vertexAttrib1f=function(a,b){t.context.vertexAttrib1f(a,
b)};t.vertexAttrib1fv=function(a,b){t.context.vertexAttrib1fv(a,b)};t.vertexAttrib1fvWEBGL=function(a,b){t.context.vertexAttrib1fv(a,b)};t.vertexAttrib2f=function(a,b,c){t.context.vertexAttrib2f(a,b,c)};t.vertexAttrib2fv=function(a,b){t.context.vertexAttrib2fv(a,b)};t.vertexAttrib2fvWEBGL=function(a,b){t.context.vertexAttrib2fv(a,b)};t.vertexAttrib3f=function(a,b,c,d){t.context.vertexAttrib3f(a,b,c,d)};t.vertexAttrib3fv=function(a,b){t.context.vertexAttrib3fv(a,b)};t.vertexAttrib3fvWEBGL=function(a,
b){t.context.vertexAttrib3fv(a,b)};t.vertexAttrib4f=function(a,b,c,d,e){t.context.vertexAttrib4f(a,b,c,d,e)};t.vertexAttrib4fv=function(a,b){t.context.vertexAttrib4fv(a,b)};t.vertexAttrib4fvWEBGL=function(a,b){t.context.vertexAttrib4fv(a,b)};t.vertexAttribDivisor=function(a,b){t.context.vertexAttribDivisor(a,b)};t.vertexAttribI4i=function(a,b,c,d,e){t.context.vertexAttribI4i(a,b,c,d,e)};t.vertexAttribI4iv=function(a,b){t.context.vertexAttribI4iv(a,b)};t.vertexAttribI4ivWEBGL=function(a,b){t.context.vertexAttribI4iv(a,
b)};t.vertexAttribI4ui=function(a,b,c,d,e){t.context.vertexAttribI4ui(a,b,c,d,e)};t.vertexAttribI4uiv=function(a,b){t.context.vertexAttribI4uiv(a,b)};t.vertexAttribI4uivWEBGL=function(a,b){t.context.vertexAttribI4uiv(a,b)};t.vertexAttribIPointer=function(a,b,c,d,e){t.context.vertexAttribIPointer(a,b,c,d,e)};t.vertexAttribPointer=function(a,b,c,d,e,f){t.context.vertexAttribPointer(a,b,c,d,e,f)};t.viewport=function(a,b,c,d){t.context.viewport(a,b,c,d)};t.waitSync=function(a,b,c){t.context.waitSync(a,
b,c)};t.__getObjectID=function(a){return null==a?0:a.id};var kr=function(){this.STACK_UNDERFLOW=1284;this.STACK_OVERFLOW=1283;this.CONTEXT_FLAG_DEBUG_BIT=2;this.DEBUG_OUTPUT=37600;this.DEBUG_SEVERITY_LOW=37192;this.DEBUG_SEVERITY_MEDIUM=37191;this.DEBUG_SEVERITY_HIGH=37190;this.DEBUG_LOGGED_MESSAGES=37189;this.MAX_DEBUG_LOGGED_MESSAGES=37188;this.MAX_DEBUG_MESSAGE_LENGTH=37187;this.MAX_LABEL_LENGTH=33512;this.SAMPLER=33510;this.QUERY=33507;this.PROGRAM=33506;this.SHADER=33505;this.BUFFER=33504;this.DEBUG_GROUP_STACK_DEPTH=
33389;this.MAX_DEBUG_GROUP_STACK_DEPTH=33388;this.DEBUG_SEVERITY_NOTIFICATION=33387;this.DEBUG_TYPE_POP_GROUP=33386;this.DEBUG_TYPE_PUSH_GROUP=33385;this.DEBUG_TYPE_MARKER=33384;this.DEBUG_TYPE_OTHER=33361;this.DEBUG_TYPE_PERFORMANCE=33360;this.DEBUG_TYPE_PORTABILITY=33359;this.DEBUG_TYPE_UNDEFINED_BEHAVIOR=33358;this.DEBUG_TYPE_DEPRECATED_BEHAVIOR=33357;this.DEBUG_TYPE_ERROR=33356;this.DEBUG_SOURCE_OTHER=33355;this.DEBUG_SOURCE_APPLICATION=33354;this.DEBUG_SOURCE_THIRD_PARTY=33353;this.DEBUG_SOURCE_SHADER_COMPILER=
33352;this.DEBUG_SOURCE_WINDOW_SYSTEM=33351;this.DEBUG_SOURCE_API=33350;this.DEBUG_CALLBACK_USER_PARAM=33349;this.DEBUG_CALLBACK_FUNCTION=33348;this.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH=33347;this.DEBUG_OUTPUT_SYNCHRONOUS=33346};k["lime.graphics.opengl.ext.KHR_debug"]=kr;kr.__name__="lime.graphics.opengl.ext.KHR_debug";kr.prototype={DEBUG_OUTPUT_SYNCHRONOUS:null,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:null,DEBUG_CALLBACK_FUNCTION:null,DEBUG_CALLBACK_USER_PARAM:null,DEBUG_SOURCE_API:null,DEBUG_SOURCE_WINDOW_SYSTEM:null,
DEBUG_SOURCE_SHADER_COMPILER:null,DEBUG_SOURCE_THIRD_PARTY:null,DEBUG_SOURCE_APPLICATION:null,DEBUG_SOURCE_OTHER:null,DEBUG_TYPE_ERROR:null,DEBUG_TYPE_DEPRECATED_BEHAVIOR:null,DEBUG_TYPE_UNDEFINED_BEHAVIOR:null,DEBUG_TYPE_PORTABILITY:null,DEBUG_TYPE_PERFORMANCE:null,DEBUG_TYPE_OTHER:null,DEBUG_TYPE_MARKER:null,DEBUG_TYPE_PUSH_GROUP:null,DEBUG_TYPE_POP_GROUP:null,DEBUG_SEVERITY_NOTIFICATION:null,MAX_DEBUG_GROUP_STACK_DEPTH:null,DEBUG_GROUP_STACK_DEPTH:null,BUFFER:null,SHADER:null,PROGRAM:null,QUERY:null,
SAMPLER:null,MAX_LABEL_LENGTH:null,MAX_DEBUG_MESSAGE_LENGTH:null,MAX_DEBUG_LOGGED_MESSAGES:null,DEBUG_LOGGED_MESSAGES:null,DEBUG_SEVERITY_HIGH:null,DEBUG_SEVERITY_MEDIUM:null,DEBUG_SEVERITY_LOW:null,DEBUG_OUTPUT:null,CONTEXT_FLAG_DEBUG_BIT:null,STACK_OVERFLOW:null,STACK_UNDERFLOW:null,__class__:kr};var Hd={__properties__:{set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",
set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"},_new:function(a){if(null==a||20!=a.length)a=Hd.__identity,a=null!=a?new Float32Array(a):
null;return a},clone:function(a){a=Rg.toArrayBufferView(a);a=null!=a?new Float32Array(a):null;return Hd._new(a)},concat:function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]},copyFrom:function(a,b){a.set(b)},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=0;a[6]=1;a[7]=0;a[8]=0;a[9]=0;a[10]=0;a[11]=0;a[12]=1;a[13]=0;a[14]=0;a[15]=0;a[16]=0;a[17]=0;a[18]=1;a[19]=0},getAlphaTable:function(a){if(null==Hd.__alphaTable){var b=new Uint8Array(256);Hd.__alphaTable=b}Hd.__alphaTable[0]=
0;for(var c=1;256>c;){var d=c++;b=Math.floor(d*a[18]+255*a[19]);255<b&&(b=255);0>b&&(b=0);Hd.__alphaTable[d]=b}return Hd.__alphaTable},getBlueTable:function(a){if(null==Hd.__blueTable){var b=new Uint8Array(256);Hd.__blueTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[12]+255*a[14]);255<b&&(b=255);0>b&&(b=0);Hd.__blueTable[d]=b}return Hd.__blueTable},getGreenTable:function(a){if(null==Hd.__greenTable){var b=new Uint8Array(256);Hd.__greenTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[6]+
255*a[9]);255<b&&(b=255);0>b&&(b=0);Hd.__greenTable[d]=b}return Hd.__greenTable},getRedTable:function(a){if(null==Hd.__redTable){var b=new Uint8Array(256);Hd.__redTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[0]+255*a[4]);255<b&&(b=255);0>b&&(b=0);Hd.__redTable[d]=b}return Hd.__redTable},__toFlashColorTransform:function(a){return null},get_alphaMultiplier:function(a){return a[18]},set_alphaMultiplier:function(a,b){return a[18]=b},get_alphaOffset:function(a){return 255*a[19]},set_alphaOffset:function(a,
b){return a[19]=b/255},get_blueMultiplier:function(a){return a[12]},set_blueMultiplier:function(a,b){return a[12]=b},get_blueOffset:function(a){return 255*a[14]},set_blueOffset:function(a,b){return a[14]=b/255},get_color:function(a){return(255*a[4]|0)<<16|(255*a[9]|0)<<8|255*a[14]|0},set_color:function(a,b){a[4]=(b>>16&255)/255;a[9]=(b>>8&255)/255;a[14]=(b&255)/255;a[0]=0;a[6]=0;a[12]=0;return Hd.get_color(a)},get_greenMultiplier:function(a){return a[6]},set_greenMultiplier:function(a,b){return a[6]=
b},get_greenOffset:function(a){return 255*a[9]},set_greenOffset:function(a,b){return a[9]=b/255},get_redMultiplier:function(a){return a[0]},set_redMultiplier:function(a,b){return a[0]=b},get_redOffset:function(a){return 255*a[4]},set_redOffset:function(a,b){return a[4]=b/255},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},ta={__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"},_new:function(a){if(null==a||16!=a.length)a=ta.__identity,
a=null!=a?new Float32Array(a):null;return a},append:function(a,b){var c=a[0],d=a[4],e=a[8],f=a[12],g=a[1],h=a[5],m=a[9],l=a[13],n=a[2],p=a[6],k=a[10],q=a[14],t=a[3],v=a[7],r=a[11],u=a[15],x=ta.get(b,0),C=ta.get(b,4),P=ta.get(b,8),F=ta.get(b,12),z=ta.get(b,1),y=ta.get(b,5),ka=ta.get(b,9),B=ta.get(b,13),w=ta.get(b,2),I=ta.get(b,6),A=ta.get(b,10),G=ta.get(b,14),D=ta.get(b,3),J=ta.get(b,7),H=ta.get(b,11);b=ta.get(b,15);a[0]=c*x+g*C+n*P+t*F;a[1]=c*z+g*y+n*ka+t*B;a[2]=c*w+g*I+n*A+t*G;a[3]=c*D+g*J+n*H+t*
b;a[4]=d*x+h*C+p*P+v*F;a[5]=d*z+h*y+p*ka+v*B;a[6]=d*w+h*I+p*A+v*G;a[7]=d*D+h*J+p*H+v*b;a[8]=e*x+m*C+k*P+r*F;a[9]=e*z+m*y+k*ka+r*B;a[10]=e*w+m*I+k*A+r*G;a[11]=e*D+m*J+k*H+r*b;a[12]=f*x+l*C+q*P+u*F;a[13]=f*z+l*y+q*ka+u*B;a[14]=f*w+l*I+q*A+u*G;a[15]=f*D+l*J+q*H+u*b},appendRotation:function(a,b,c,d){b=ta.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&ta.appendTranslation(b,d.x,d.y,d.z);ta.append(a,b)},appendScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=null!=b?new Float32Array(b):null;ta.append(a,
ta._new(b))},appendTranslation:function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d},clone:function(a){a=Rg.toArrayBufferView(a);a=null!=a?new Float32Array(a):null;return ta._new(a)},copyColumnFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[1]=c.y;a[2]=c.z;a[3]=c.w;break;case 1:a[4]=c.x;a[5]=c.y;a[6]=c.z;a[7]=c.w;break;case 2:a[8]=c.x;a[9]=c.y;a[10]=c.z;a[11]=c.w;break;case 3:a[12]=c.x;a[13]=c.y;a[14]=c.z;a[15]=c.w;break;default:a="Column "+b+" out of bounds [0, ..., 3]";b={fileName:"lime/math/Matrix4.hx",
lineNumber:187,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnFrom"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}},copyColumnTo:function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[1];c.z=a[2];c.w=a[3];break;case 1:c.x=a[4];c.y=a[5];c.z=a[6];c.w=a[7];break;case 2:c.x=a[8];c.y=a[9];c.z=a[10];c.w=a[11];break;case 3:c.x=a[12];c.y=a[13];c.z=a[14];c.w=a[15];break;default:a="Column "+b+" out of bounds [0, ..., 3]";b={fileName:"lime/math/Matrix4.hx",
lineNumber:225,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnTo"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}},copyFrom:function(a,b){a.set(b)},copyRowFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[4]=c.y;a[8]=c.z;a[12]=c.w;break;case 1:a[1]=c.x;a[5]=c.y;a[9]=c.z;a[13]=c.w;break;case 2:a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=c.w;break;case 3:a[3]=c.x;a[7]=c.y;a[11]=c.z;a[15]=c.w;break;default:a="Row "+b+" out of bounds [0, ..., 3]";
b={fileName:"lime/math/Matrix4.hx",lineNumber:272,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowFrom"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}},copyRowTo:function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[4];c.z=a[8];c.w=a[12];break;case 1:c.x=a[1];c.y=a[5];c.z=a[9];c.w=a[13];break;case 2:c.x=a[2];c.y=a[6];c.z=a[10];c.w=a[14];break;case 3:c.x=a[3];c.y=a[7];c.z=a[11];c.w=a[15];break;default:a="Row "+b+" out of bounds [0, ..., 3]";b=
{fileName:"lime/math/Matrix4.hx",lineNumber:310,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowTo"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}},create2D:function(a,b,c,d,e,f,g){null==g&&(g=0);null==f&&(f=0);a[0]=b;a[1]=c;a[2]=0;a[3]=0;a[4]=d;a[5]=e;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=f;a[13]=g;a[14]=0;a[15]=1},createOrtho:function(a,b,c,d,e,f,g){var h=1/(c-b),m=1/(e-d),l=1/(g-f);a[0]=2*h;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=
2*m;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=-2*l;a[11]=0;a[12]=-(b+c)*h;a[13]=-(d+e)*m;a[14]=-(f+g)*l;a[15]=1},deltaTransformVector:function(a,b,c){null==c&&(c=new Bc);var d=b.x,e=b.y;b=b.z;c.x=d*a[0]+e*a[4]+b*a[8]+a[3];c.y=d*a[1]+e*a[5]+b*a[9]+a[7];c.z=d*a[2]+e*a[6]+b*a[10]+a[11];return c},fromMatrix3:function(a){var b=ta._new();ta.create2D(b,a.a,a.b,a.c,a.d,a.tx,a.ty);return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=
0;a[15]=1},interpolate:function(a,b,c,d){null==d&&(d=ta._new());for(var e=0;16>e;){var f=e++;ta.set(d,f,ta.get(a,f)+(ta.get(b,f)-ta.get(a,f))*c)}return d},interpolateTo:function(a,b,c){for(var d=0;16>d;){var e=d++;a[e]+=(ta.get(b,e)-a[e])*c}},invert:function(a){var b=ta.get_determinant(a),c=1E-11<Math.abs(b);if(c){b=1/b;var d=a[0],e=a[4],f=a[8],g=a[12],h=a[1],m=a[5],l=a[9],n=a[13],p=a[2],k=a[6],q=a[10],t=a[14],v=a[3],r=a[7],u=a[11],x=a[15];a[0]=b*(m*(q*x-t*u)-l*(k*x-t*r)+n*(k*u-q*r));a[1]=-b*(h*(q*
x-t*u)-l*(p*x-t*v)+n*(p*u-q*v));a[2]=b*(h*(k*x-t*r)-m*(p*x-t*v)+n*(p*r-k*v));a[3]=-b*(h*(k*u-q*r)-m*(p*u-q*v)+l*(p*r-k*v));a[4]=-b*(e*(q*x-t*u)-f*(k*x-t*r)+g*(k*u-q*r));a[5]=b*(d*(q*x-t*u)-f*(p*x-t*v)+g*(p*u-q*v));a[6]=-b*(d*(k*x-t*r)-e*(p*x-t*v)+g*(p*r-k*v));a[7]=b*(d*(k*u-q*r)-e*(p*u-q*v)+f*(p*r-k*v));a[8]=b*(e*(l*x-n*u)-f*(m*x-n*r)+g*(m*u-l*r));a[9]=-b*(d*(l*x-n*u)-f*(h*x-n*v)+g*(h*u-l*v));a[10]=b*(d*(m*x-n*r)-e*(h*x-n*v)+g*(h*r-m*v));a[11]=-b*(d*(m*u-l*r)-e*(h*u-l*v)+f*(h*r-m*v));a[12]=-b*(e*
(l*t-n*q)-f*(m*t-n*k)+g*(m*q-l*k));a[13]=b*(d*(l*t-n*q)-f*(h*t-n*p)+g*(h*q-l*p));a[14]=-b*(d*(m*t-n*k)-e*(h*t-n*p)+g*(h*k-m*p));a[15]=b*(d*(m*q-l*k)-e*(h*q-l*p)+f*(h*k-m*p))}return c},pointAt:function(a,b,c,d){null==c&&(c=new Bc(0,0,1));null==d&&(d=new Bc(0,1,0));var e=null;null==e&&(e=new Bc);e.x=b.x-c.x;e.y=b.y-c.y;e.z=b.z-c.z;c=e;d=new Bc(d.x,d.y,d.z,d.w);e=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);0!=e&&(c.x/=e,c.y/=e,c.z/=e);e=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z);0!=e&&(d.x/=e,d.y/=e,d.z/=e);var f=new Bc(c.x,
c.y,c.z,c.w);e=d.x*c.x+d.y*c.y+d.z*c.z;f.x*=e;f.y*=e;f.z*=e;e=null;null==e&&(e=new Bc);e.x=d.x-f.x;e.y=d.y-f.y;e.z=d.z-f.z;d=e;0<Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)?(e=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z),0!=e&&(d.x/=e,d.y/=e,d.z/=e)):d=0!=c.x?new Bc(-c.y,c.x,0):new Bc(1,0,0);e=null;null==e&&(e=new Bc);f=d.z*c.x-d.x*c.z;var g=d.x*c.y-d.y*c.x;e.x=d.y*c.z-d.z*c.y;e.y=f;e.z=g;e.w=1;f=e;e=Math.sqrt(f.x*f.x+f.y*f.y+f.z*f.z);0!=e&&(f.x/=e,f.y/=e,f.z/=e);a[0]=f.x;a[4]=f.y;a[8]=f.z;a[12]=0;a[1]=d.x;a[5]=d.y;
a[9]=d.z;a[13]=0;a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=0;a[3]=b.x;a[7]=b.y;a[11]=b.z;a[15]=1},prepend:function(a,b){var c=ta.get(b,0),d=ta.get(b,4),e=ta.get(b,8),f=ta.get(b,12),g=ta.get(b,1),h=ta.get(b,5),m=ta.get(b,9),l=ta.get(b,13),n=ta.get(b,2),p=ta.get(b,6),k=ta.get(b,10),q=ta.get(b,14),t=ta.get(b,3),v=ta.get(b,7),r=ta.get(b,11);b=ta.get(b,15);var u=a[0],x=a[4],C=a[8],P=a[12],F=a[1],z=a[5],y=a[9],ka=a[13],B=a[2],w=a[6],I=a[10],A=a[14],G=a[3],D=a[7],J=a[11],H=a[15];a[0]=c*u+g*x+n*C+t*P;a[1]=c*F+g*
z+n*y+t*ka;a[2]=c*B+g*w+n*I+t*A;a[3]=c*G+g*D+n*J+t*H;a[4]=d*u+h*x+p*C+v*P;a[5]=d*F+h*z+p*y+v*ka;a[6]=d*B+h*w+p*I+v*A;a[7]=d*G+h*D+p*J+v*H;a[8]=e*u+m*x+k*C+r*P;a[9]=e*F+m*z+k*y+r*ka;a[10]=e*B+m*w+k*I+r*A;a[11]=e*G+m*D+k*J+r*H;a[12]=f*u+l*x+q*C+b*P;a[13]=f*F+l*z+q*y+b*ka;a[14]=f*B+l*w+q*I+b*A;a[15]=f*G+l*D+q*J+b*H},prependRotation:function(a,b,c,d){b=ta.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&ta.appendTranslation(b,d.x,d.y,d.z);ta.prepend(a,b)},prependScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,
0,0,d,0,0,0,0,1];b=null!=b?new Float32Array(b):null;ta.prepend(a,ta._new(b))},prependTranslation:function(a,b,c,d){var e=ta._new();ta.set_position(e,new Bc(b,c,d));ta.prepend(a,e)},transformVector:function(a,b,c){null==c&&(c=new Bc);var d=b.x,e=b.y;b=b.z;c.x=d*a[0]+e*a[4]+b*a[8]+a[12];c.y=d*a[1]+e*a[5]+b*a[9]+a[13];c.z=d*a[2]+e*a[6]+b*a[10]+a[14];c.w=d*a[3]+e*a[7]+b*a[11]+a[15];return c},transformVectors:function(a,b,c){for(var d=0,e,f,g;d+3<=b.length;)e=b[d],f=b[d+1],g=b[d+2],c[d]=e*a[0]+f*a[4]+
g*a[8]+a[12],c[d+1]=e*a[1]+f*a[5]+g*a[9]+a[13],c[d+2]=e*a[2]+f*a[6]+g*a[10]+a[14],d+=3},transpose:function(a){var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b},__getAxisRotation:function(a,b,c,d,e){a=ta._new();b=new Bc(b,c,d);e=Math.PI/180*-e;d=Math.cos(e);e=Math.sin(e);c=1-d;ta.set(a,0,d+b.x*b.x*c);ta.set(a,5,d+b.y*b.y*c);ta.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var f=b.z*e;ta.set(a,4,d+f);ta.set(a,
1,d-f);d=b.x*b.z*c;f=b.y*e;ta.set(a,8,d-f);ta.set(a,2,d+f);d=b.y*b.z*c;f=b.x*e;ta.set(a,9,d+f);ta.set(a,6,d-f);return a},__swap:function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},get_determinant:function(a){return(a[0]*a[5]-a[4]*a[1])*(a[10]*a[15]-a[14]*a[11])-(a[0]*a[9]-a[8]*a[1])*(a[6]*a[15]-a[14]*a[7])+(a[0]*a[13]-a[12]*a[1])*(a[6]*a[11]-a[10]*a[7])+(a[4]*a[9]-a[8]*a[5])*(a[2]*a[15]-a[14]*a[3])-(a[4]*a[13]-a[12]*a[5])*(a[2]*a[11]-a[10]*a[3])+(a[8]*a[13]-a[12]*a[9])*(a[2]*a[7]-a[6]*a[3])},get_position:function(a){return new Bc(a[12],
a[13],a[14])},set_position:function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},H={__properties__:{set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a){null==a&&(a=0);return a},create:function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255},multiplyAlpha:function(a){0!=(a&255)&&255!=(a&255)&&(H.a16=H.__alpha16[a&255])},readUInt8:function(a,b,c,d,
e){null==e&&(e=!1);null==d&&(d=0);switch(d){case 0:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<8|b[c+3]&255;break;case 1:a=(b[c+1]&255)<<24|(b[c+2]&255)<<16|(b[c+3]&255)<<8|b[c]&255;break;case 2:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255}e&&0!=(a&255)&&255!=(a&255)&&(H.unmult=255/(a&255))},set:function(a,b,c,d,e){},unmultiplyAlpha:function(a){0!=(a&255)&&255!=(a&255)&&(H.unmult=255/(a&255))},writeUInt8:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);e&&(0==(a&255)?0!=a&&(a=
0):255!=(a&255)&&(H.a16=H.__alpha16[a&255],a=((a>>>24&255)*H.a16>>16&255)<<24|((a>>>16&255)*H.a16>>16&255)<<16|((a>>>8&255)*H.a16>>16&255)<<8|a&255));switch(d){case 0:b[c]=a>>>24&255;b[c+1]=a>>>16&255;b[c+2]=a>>>8&255;b[c+3]=a&255;break;case 1:b[c]=a&255;b[c+1]=a>>>24&255;b[c+2]=a>>>16&255;b[c+3]=a>>>8&255;break;case 2:b[c]=a>>>8&255,b[c+1]=a>>>16&255,b[c+2]=a>>>24&255,b[c+3]=a&255}},__fromARGB:function(a){return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255},__fromBGRA:function(a){return(a>>>
8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255},get_a:function(a){return a&255},set_a:function(a,b){return b},get_b:function(a){return a>>>8&255},set_b:function(a,b){return b},get_g:function(a){return a>>>16&255},set_g:function(a,b){return b},get_r:function(a){return a>>>24&255},set_r:function(a,b){return b}},Dd=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};k["lime.math.Rectangle"]=Dd;Dd.__name__="lime.math.Rectangle";
Dd.prototype={height:null,width:null,x:null,y:null,clone:function(){return new Dd(this.x,this.y,this.width,this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.containsVector(a)},containsRect:function(a){return 0>=a.width||0>=a.height?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():
!1},containsVector:function(a){return this.contains(a.x,a.y)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height},equals:function(a){return null!=a&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b},inflateVector:function(a){this.inflate(a.x,a.y)},intersection:function(a,b){null==b&&(b=new Dd);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();
if(d<=c)return b.setEmpty(),b;var e=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();if(a<=e)return b.setEmpty(),b;b.x=c;b.y=e;b.width=d-c;b.height=a-e;return b},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return 0>=this.width?!0:0>=this.height},offset:function(a,
b){this.x+=a;this.y+=b},offsetVector:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},union:function(a,b){null==b&&(b=new Dd);if(0==this.width||0==this.height)b.copyFrom(a);else if(0==a.width||0==a.height)b.copyFrom(this);else{var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),e=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():
this.get_bottom();b.setTo(c,e,d-c,a-e)}return b},__toFlashRectangle:function(){return null},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Vd(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},
set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new Vd(this.width,this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new Vd(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:Dd,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",
set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var Vd=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};k["lime.math.Vector2"]=Vd;Vd.__name__="lime.math.Vector2";Vd.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Vd.interpolate=function(a,b,c,d){null==d&&(d=new Vd);d.x=
b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};Vd.polar=function(a,b,c){null==c&&(c=new Vd);var d=a*Math.sin(b);c.x=a*Math.cos(b);c.y=d;return c};Vd.prototype={x:null,y:null,add:function(a,b){null==b&&(b=new Vd);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new Vd(this.x,this.y)},equals:function(a){return null!=a&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(0!=this.x||0!=this.y)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;
this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a,b){null==b&&(b=new Vd);b.x=this.x-a.x;b.y=this.y-a.y;return b},__toFlashPoint:function(){return null},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y},__class__:Vd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Bc=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.w=d;this.x=a;
this.y=b;this.z=c};k["lime.math.Vector4"]=Bc;Bc.__name__="lime.math.Vector4";Bc.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};Bc.angleBetween=function(a,b){a=new Bc(a.x,a.y,a.z,a.w);var c=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);0!=c&&(a.x/=c,a.y/=c,a.z/=c);b=new Bc(b.x,b.y,b.z,b.w);c=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z);0!=c&&(b.x/=c,b.y/=c,b.z/=c);return Math.acos(a.x*b.x+a.y*b.y+a.z*b.z)};Bc.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*
c+d*d+a*a)};Bc.distanceSquared=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return c*c+d*d+a*a};Bc.get_X_AXIS=function(){return new Bc(1,0,0)};Bc.get_Y_AXIS=function(){return new Bc(0,1,0)};Bc.get_Z_AXIS=function(){return new Bc(0,0,1)};Bc.prototype={w:null,x:null,y:null,z:null,add:function(a,b){null==b&&(b=new Bc);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;return b},clone:function(){return new Bc(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a,
b){null==b&&(b=new Bc);var c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x;b.x=this.y*a.z-this.z*a.y;b.y=c;b.z=d;b.w=1;return b},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){null==b&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){null==c&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-
a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0!=a&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a,b){null==b&&(b=new Bc);b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;return b},
toString:function(){return"Vector4("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:Bc,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Pc=function(){};k["lime.media.AudioBuffer"]=Pc;Pc.__name__="lime.media.AudioBuffer";Pc.fromBase64=function(a){if(null==a)return null;-1==a.indexOf(",")&&(a="data:"+Pc.__getCodec(Qf.decode(a))+
";base64,"+a);var b=new Pc;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};Pc.fromBytes=function(a){if(null==a)return null;var b=new Pc;b.set_src(new Howl({src:["data:"+Pc.__getCodec(a)+";base64,"+Qf.encode(a)],html5:!0,preload:!1}));return b};Pc.fromFile=function(a){if(null==a)return null;var b=new Pc;b.__srcHowl=new Howl({src:[a],preload:!1});return b};Pc.fromFiles=function(a){var b=new Pc;b.__srcHowl=new Howl({src:a,preload:!1});return b};Pc.fromVorbisFile=function(a){return null};
Pc.loadFromFile=function(a){var b=new Yd,c=Pc.fromFile(a);null!=c?null!=c&&(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(a,c){b.error(c)}),c.__srcHowl.load()):b.error(null);return b.future};Pc.loadFromFiles=function(a){var b=new Yd,c=Pc.fromFiles(a);null!=c?(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(){b.error(null)}),c.__srcHowl.load()):b.error(null);return b.future};Pc.__getCodec=function(a){switch(a.getString(0,4)){case "OggS":return"audio/ogg";
case "RIFF":if("WAVE"==a.getString(8,4))return"audio/wav";var b=a.b[1],c=a.b[2];switch(a.b[0]){case 73:if(68==b&&51==c)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}break;case "fLaC":return"audio/flac";default:switch(b=a.b[1],c=a.b[2],a.b[0]){case 73:if(68==b&&51==c)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}}a={fileName:"lime/media/AudioBuffer.hx",lineNumber:362,className:"lime.media.AudioBuffer",methodName:"__getCodec"};
if(xc.throwErrors)throw a="["+a.className+"] ERROR: "+A.string("Unsupported sound format"),J.thrown(a);Q.error("Unsupported sound format",a);return null};Pc.prototype={bitsPerSample:null,channels:null,data:null,sampleRate:null,__srcAudio:null,__srcBuffer:null,__srcCustom:null,__srcHowl:null,__srcSound:null,__srcVorbisFile:null,dispose:function(){this.__srcHowl.unload()},get_src:function(){return this.__srcHowl},set_src:function(a){return this.__srcHowl=a},__class__:Pc,__properties__:{set_src:"set_src",
get_src:"get_src"}};var Ko=function(a){if("custom"!=a){if(null==a||"web"==a)try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.web=new window.AudioContext,this.type="web"}catch(b){xb.lastError=b}null==this.web&&"web"!=a&&(this.html5=new Jo,this.type="html5")}else this.type="custom"};k["lime.media.AudioContext"]=Ko;Ko.__name__="lime.media.AudioContext";Ko.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:Ko};var pe=function(){};k["lime.media.AudioManager"]=
pe;pe.__name__="lime.media.AudioManager";pe.init=function(a){if(null==pe.context){if(null==a&&(pe.context=new Ko,a=pe.context,"openal"==a.type)){var b=a.openal,c=b.openDevice();c=b.createContext(c);b.makeContextCurrent(c);b.processContext(c)}pe.context=a}};pe.resume=function(){if(null!=pe.context&&"openal"==pe.context.type){var a=pe.context.openal,b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};pe.shutdown=function(){if(null!=pe.context&&"openal"==
pe.context.type){var a=pe.context.openal,b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);null!=c&&a.closeDevice(c)}}pe.context=null};pe.suspend=function(){if(null!=pe.context&&"openal"==pe.context.type){var a=pe.context.openal,b=a.getCurrentContext();null!=b&&(a.suspendContext(b),b=a.getContextsDevice(b),null!=b&&a.pauseDevice(b))}};var Lo=function(a,b,c,d){null==d&&(d=0);null==b&&(b=0);this.onComplete=new Bd;this.buffer=a;this.offset=
b;this.__backend=new qo(this);null!=c&&0!=c&&this.set_length(c);this.set_loops(d);null!=a&&this.init()};k["lime.media.AudioSource"]=Lo;Lo.__name__="lime.media.AudioSource";Lo.prototype={onComplete:null,buffer:null,offset:null,_pan:null,_position:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},pause:function(){this.__backend.pause()},stop:function(){this.__backend.stop()},get_currentTime:function(){return this.__backend.getCurrentTime()},
set_currentTime:function(a){return this.__backend.setCurrentTime(a)},get_gain:function(){return this.__backend.getGain()},set_gain:function(a){return this.__backend.setGain(a)},get_length:function(){return this.__backend.getLength()},set_length:function(a){return this.__backend.setLength(a)},get_loops:function(){return this.__backend.getLoops()},set_loops:function(a){return this.__backend.setLoops(a)},get_pan:function(){return this._pan},set_pan:function(a){if(null!=this._position)return this._pan;
null==a&&(this._pan=this.__backend.setPan(0));return this._pan=this.__backend.setPan(a)},get_pitch:function(){return this.__backend.getPitch()},set_pitch:function(a){return this.__backend.setPitch(a)},get_position:function(){return this._position},set_position:function(a){if(null!=this._pan)return this._position;null==a&&(this._position=this.__backend.setPosition(new Bc(0,0,0,0)));return this._position=this.__backend.setPosition(a)},__class__:Lo,__properties__:{set_position:"set_position",get_position:"get_position",
set_pan:"set_pan",get_pan:"get_pan",set_pitch:"set_pitch",get_pitch:"get_pitch",set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var lr=function(){};k["lime.media.FlashAudioContext"]=lr;lr.__name__="lime.media.FlashAudioContext";lr.prototype={createBuffer:function(a,b){return null},getBytesLoaded:function(a){return 0},getBytesTotal:function(a){return 0},
getID3:function(a){return null},getIsBuffering:function(a){return!1},getIsURLInaccessible:function(a){return!1},getLength:function(a){return 0},getURL:function(a){return null},close:function(a){},extract:function(a,b,c,d){return 0},load:function(a,b,c){},loadCompressedDataFromByteArray:function(a,b,c){},loadPCMFromByteArray:function(a,b,c,d,e,f){},play:function(a,b,c,d){return null},__class__:lr};var Jo=function(){this.NETWORK_NO_SOURCE=3;this.NETWORK_LOADING=2;this.NETWORK_IDLE=1;this.HAVE_NOTHING=
this.NETWORK_EMPTY=0;this.HAVE_METADATA=1;this.HAVE_FUTURE_DATA=3;this.HAVE_ENOUGH_DATA=4;this.HAVE_CURRENT_DATA=2};k["lime.media.HTML5AudioContext"]=Jo;Jo.__name__="lime.media.HTML5AudioContext";Jo.prototype={HAVE_CURRENT_DATA:null,HAVE_ENOUGH_DATA:null,HAVE_FUTURE_DATA:null,HAVE_METADATA:null,HAVE_NOTHING:null,NETWORK_EMPTY:null,NETWORK_IDLE:null,NETWORK_LOADING:null,NETWORK_NO_SOURCE:null,canPlayType:function(a,b){return null!=a.__srcAudio?a.__srcAudio.canPlayType(b):null},createBuffer:function(a){var b=
new Pc;b.__srcAudio=new Audio;b.__srcAudio.src=a;return b},getAutoplay:function(a){return null!=a.__srcAudio?a.__srcAudio.autoplay:!1},getBuffered:function(a){return null!=a.__srcAudio?a.__srcAudio.buffered:null},getCurrentSrc:function(a){return null!=a.__srcAudio?a.__srcAudio.currentSrc:null},getCurrentTime:function(a){return null!=a.__srcAudio?a.__srcAudio.currentTime:0},getDefaultPlaybackRate:function(a){return null!=a.__srcAudio?a.__srcAudio.defaultPlaybackRate:1},getDuration:function(a){return null!=
a.__srcAudio?a.__srcAudio.duration:0},getEnded:function(a){return null!=a.__srcAudio?a.__srcAudio.ended:!1},getError:function(a){return null!=a.__srcAudio?a.__srcAudio.error:null},getLoop:function(a){return null!=a.__srcAudio?a.__srcAudio.loop:!1},getMuted:function(a){return null!=a.__srcAudio?a.__srcAudio.muted:!1},getNetworkState:function(a){return null!=a.__srcAudio?a.__srcAudio.networkState:0},getPaused:function(a){return null!=a.__srcAudio?a.__srcAudio.paused:!1},getPlaybackRate:function(a){return null!=
a.__srcAudio?a.__srcAudio.playbackRate:1},getPlayed:function(a){return null!=a.__srcAudio?a.__srcAudio.played:null},getPreload:function(a){return null!=a.__srcAudio?a.__srcAudio.preload:null},getReadyState:function(a){return null!=a.__srcAudio?a.__srcAudio.readyState:0},getSeekable:function(a){return null!=a.__srcAudio?a.__srcAudio.seekable:null},getSeeking:function(a){return null!=a.__srcAudio?a.__srcAudio.seeking:!1},getSrc:function(a){return null!=a.__srcAudio?a.__srcAudio.src:null},getStartTime:function(a){return null!=
a.__srcAudio?a.__srcAudio.playbackRate:0},getVolume:function(a){return null!=a.__srcAudio?a.__srcAudio.volume:1},load:function(a){null!=a.__srcAudio&&a.__srcAudio.load()},pause:function(a){null!=a.__srcAudio&&a.__srcAudio.pause()},play:function(a){null!=a.__srcAudio&&a.__srcAudio.play()},setAutoplay:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.autoplay=b)},setCurrentTime:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.currentTime=b)},setDefaultPlaybackRate:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.defaultPlaybackRate=
b)},setLoop:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.loop=b)},setMuted:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.muted=b)},setPlaybackRate:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.playbackRate=b)},setPreload:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.preload=b)},setSrc:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.src=b)},setVolume:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.volume=b)},__class__:Jo};var mr=function(){this.ALL_DEVICES_SPECIFIER=4115;this.DEFAULT_ALL_DEVICES_SPECIFIER=
4114;this.ENUMERATE_ALL_EXT=1;this.DEVICE_SPECIFIER=4101;this.DEFAULT_DEVICE_SPECIFIER=4100;this.ALL_ATTRIBUTES=4099;this.ATTRIBUTES_SIZE=4098;this.INVALID_CONTEXT=40962;this.INVALID_DEVICE=40961;this.STEREO_SOURCES=4113;this.MONO_SOURCES=4112;this.SYNC=4105;this.REFRESH=4104;this.EXPONENT_DISTANCE_CLAMPED=53254;this.EXPONENT_DISTANCE=53253;this.LINEAR_DISTANCE_CLAMPED=53252;this.LINEAR_DISTANCE=53251;this.INVERSE_DISTANCE_CLAMPED=53250;this.INVERSE_DISTANCE=53249;this.DISTANCE_MODEL=53248;this.DOPPLER_VELOCITY=
49153;this.SPEED_OF_SOUND=49155;this.DOPPLER_FACTOR=49152;this.EXTENSIONS=45060;this.RENDERER=45059;this.VERSION=45058;this.VENDOR=45057;this.OUT_OF_MEMORY=40965;this.INVALID_OPERATION=40964;this.INVALID_VALUE=40963;this.INVALID_ENUM=40962;this.INVALID_NAME=40961;this.NO_ERROR=0;this.SIZE=8196;this.CHANNELS=8195;this.BITS=8194;this.FREQUENCY=8193;this.FORMAT_STEREO16=4355;this.FORMAT_STEREO8=4354;this.FORMAT_MONO16=4353;this.FORMAT_MONO8=4352;this.UNDETERMINED=4144;this.STREAMING=4137;this.STATIC=
4136;this.SOURCE_TYPE=4135;this.BYTE_OFFSET=4134;this.SAMPLE_OFFSET=4133;this.SEC_OFFSET=4132;this.MAX_DISTANCE=4131;this.CONE_OUTER_GAIN=4130;this.ROLLOFF_FACTOR=4129;this.REFERENCE_DISTANCE=4128;this.BUFFERS_PROCESSED=4118;this.BUFFERS_QUEUED=4117;this.STOPPED=4116;this.PAUSED=4115;this.PLAYING=4114;this.INITIAL=4113;this.SOURCE_STATE=4112;this.ORIENTATION=4111;this.MAX_GAIN=4110;this.MIN_GAIN=4109;this.GAIN=4106;this.BUFFER=4105;this.LOOPING=4103;this.VELOCITY=4102;this.DIRECTION=4101;this.POSITION=
4100;this.PITCH=4099;this.CONE_OUTER_ANGLE=4098;this.CONE_INNER_ANGLE=4097;this.SOURCE_RELATIVE=514;this.TRUE=1;this.NONE=this.FALSE=0};k["lime.media.OpenALAudioContext"]=mr;mr.__name__="lime.media.OpenALAudioContext";mr.prototype={NONE:null,FALSE:null,TRUE:null,SOURCE_RELATIVE:null,CONE_INNER_ANGLE:null,CONE_OUTER_ANGLE:null,PITCH:null,POSITION:null,DIRECTION:null,VELOCITY:null,LOOPING:null,BUFFER:null,GAIN:null,MIN_GAIN:null,MAX_GAIN:null,ORIENTATION:null,SOURCE_STATE:null,INITIAL:null,PLAYING:null,
PAUSED:null,STOPPED:null,BUFFERS_QUEUED:null,BUFFERS_PROCESSED:null,REFERENCE_DISTANCE:null,ROLLOFF_FACTOR:null,CONE_OUTER_GAIN:null,MAX_DISTANCE:null,SEC_OFFSET:null,SAMPLE_OFFSET:null,BYTE_OFFSET:null,SOURCE_TYPE:null,STATIC:null,STREAMING:null,UNDETERMINED:null,FORMAT_MONO8:null,FORMAT_MONO16:null,FORMAT_STEREO8:null,FORMAT_STEREO16:null,FREQUENCY:null,BITS:null,CHANNELS:null,SIZE:null,NO_ERROR:null,INVALID_NAME:null,INVALID_ENUM:null,INVALID_VALUE:null,INVALID_OPERATION:null,OUT_OF_MEMORY:null,
VENDOR:null,VERSION:null,RENDERER:null,EXTENSIONS:null,DOPPLER_FACTOR:null,SPEED_OF_SOUND:null,DOPPLER_VELOCITY:null,DISTANCE_MODEL:null,INVERSE_DISTANCE:null,INVERSE_DISTANCE_CLAMPED:null,LINEAR_DISTANCE:null,LINEAR_DISTANCE_CLAMPED:null,EXPONENT_DISTANCE:null,EXPONENT_DISTANCE_CLAMPED:null,REFRESH:null,SYNC:null,MONO_SOURCES:null,STEREO_SOURCES:null,INVALID_DEVICE:null,INVALID_CONTEXT:null,ATTRIBUTES_SIZE:null,ALL_ATTRIBUTES:null,DEFAULT_DEVICE_SPECIFIER:null,DEVICE_SPECIFIER:null,ENUMERATE_ALL_EXT:null,
DEFAULT_ALL_DEVICES_SPECIFIER:null,ALL_DEVICES_SPECIFIER:null,bufferData:function(a,b,c,d,e){B.bufferData(a,b,c,d,e)},buffer3f:function(a,b,c,d,e){B.buffer3f(a,b,c,d,e)},buffer3i:function(a,b,c,d,e){B.buffer3i(a,b,c,d,e)},bufferf:function(a,b,c){B.bufferf(a,b,c)},bufferfv:function(a,b,c){B.bufferfv(a,b,c)},bufferi:function(a,b,c){B.bufferi(a,b,c)},bufferiv:function(a,b,c){B.bufferiv(a,b,c)},closeDevice:function(a){return Gb.closeDevice(a)},createContext:function(a,b){return Gb.createContext(a,b)},
createBuffer:function(){return B.createBuffer()},createSource:function(){return B.createSource()},deleteBuffer:function(a){B.deleteBuffer(a)},deleteBuffers:function(a){B.deleteBuffers(a)},deleteSource:function(a){B.deleteSource(a)},deleteSources:function(a){B.deleteSources(a)},destroyContext:function(a){null!=a&&Gb.destroyContext(a)},disable:function(a){B.disable(a)},distanceModel:function(a){B.distanceModel(a)},dopplerFactor:function(a){B.dopplerFactor(a)},dopplerVelocity:function(a){B.dopplerVelocity(a)},
enable:function(a){B.enable(a)},genSource:function(){return this.createSource()},genSources:function(a){return B.genSources(a)},genBuffer:function(){return this.createBuffer()},genBuffers:function(a){return B.genBuffers(a)},getBoolean:function(a){return B.getBoolean(a)},getBooleanv:function(a,b){null==b&&(b=1);return B.getBooleanv(a,b)},getBuffer3f:function(a,b){return B.getBuffer3f(a,b)},getBuffer3i:function(a,b){return B.getBuffer3i(a,b)},getBufferf:function(a,b){return B.getBufferf(a,b)},getBufferfv:function(a,
b,c){null==c&&(c=1);return B.getBufferfv(a,b,c)},getBufferi:function(a,b){return B.getBufferi(a,b)},getBufferiv:function(a,b,c){null==c&&(c=1);return B.getBufferiv(a,b,c)},getContextsDevice:function(a){return null==a?null:Gb.getContextsDevice(a)},getCurrentContext:function(){return Gb.getCurrentContext()},getDouble:function(a){return B.getDouble(a)},getDoublev:function(a,b){null==b&&(b=1);return B.getDoublev(a,b)},getEnumValue:function(a){return B.getEnumValue(a)},getError:function(a){return null==
a?B.getError():Gb.getError(a)},getErrorString:function(a){return null==a?B.getErrorString():Gb.getErrorString(a)},getFloat:function(a){return B.getFloat(a)},getFloatv:function(a,b){null==b&&(b=1);return B.getFloatv(a,b)},getInteger:function(a){return B.getInteger(a)},getIntegerv:function(a,b,c){null==b&&(b=1);return null==c?B.getIntegerv(a,b):Gb.getIntegerv(c,a,b)},getListener3f:function(a){return B.getListener3f(a)},getListener3i:function(a){return B.getListener3i(a)},getListenerf:function(a){return B.getListenerf(a)},
getListenerfv:function(a,b){null==b&&(b=1);return B.getListenerfv(a,b)},getListeneri:function(a){return B.getListeneri(a)},getListeneriv:function(a,b){null==b&&(b=1);return B.getListeneriv(a,b)},getProcAddress:function(a){return B.getProcAddress(a)},getSource3f:function(a,b){return B.getSource3f(a,b)},getSourcef:function(a,b){return B.getSourcef(a,b)},getSource3i:function(a,b){return B.getSource3i(a,b)},getSourcefv:function(a,b,c){return B.getSourcefv(a,b)},getSourcei:function(a,b){return B.getSourcei(a,
b)},getSourceiv:function(a,b,c){null==c&&(c=1);return B.getSourceiv(a,b,c)},getString:function(a,b){return null==b?B.getString(a):Gb.getString(b,a)},isBuffer:function(a){return B.isBuffer(a)},isEnabled:function(a){return B.isEnabled(a)},isExtensionPresent:function(a){return B.isExtensionPresent(a)},isSource:function(a){return B.isSource(a)},listener3f:function(a,b,c,d){B.listener3f(a,b,c,d)},listener3i:function(a,b,c,d){B.listener3i(a,b,c,d)},listenerf:function(a,b){B.listenerf(a,b)},listenerfv:function(a,
b){B.listenerfv(a,b)},listeneri:function(a,b){B.listeneri(a,b)},listeneriv:function(a,b){B.listeneriv(a,b)},makeContextCurrent:function(a){return Gb.makeContextCurrent(a)},openDevice:function(a){return Gb.openDevice(a)},pauseDevice:function(a){Gb.pauseDevice(a)},processContext:function(a){Gb.processContext(a)},resumeDevice:function(a){Gb.resumeDevice(a)},source3f:function(a,b,c,d,e){B.source3f(a,b,c,d,e)},source3i:function(a,b,c,d,e){B.source3i(a,b,c,d,e)},sourcef:function(a,b,c){B.sourcef(a,b,c)},
sourcefv:function(a,b,c){B.sourcefv(a,b,c)},sourcei:function(a,b,c){B.sourcei(a,b,c)},sourceiv:function(a,b,c){B.sourceiv(a,b,c)},sourcePlay:function(a){B.sourcePlay(a)},sourcePlayv:function(a){B.sourcePlayv(a)},sourceStop:function(a){B.sourceStop(a)},sourceStopv:function(a){B.sourceStopv(a)},sourceRewind:function(a){B.sourceRewind(a)},sourceRewindv:function(a){B.sourceRewindv(a)},sourcePause:function(a){B.sourcePause(a)},sourcePausev:function(a){B.sourcePausev(a)},sourceQueueBuffer:function(a,b){B.sourceQueueBuffer(a,
b)},sourceQueueBuffers:function(a,b,c){B.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return B.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return B.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){B.speedOfSound(a)},suspendContext:function(a){Gb.suspendContext(a)},__class__:mr};var B=function(){};k["lime.media.openal.AL"]=B;B.__name__="lime.media.openal.AL";B.removeDirectFilter=function(a){};B.removeSend=function(a,b){};B.auxf=function(a,b,c){};B.auxfv=function(a,b,
c){};B.auxi=function(a,b,c){};B.auxiv=function(a,b,c){};B.bufferData=function(a,b,c,d,e){};B.buffer3f=function(a,b,c,d,e){};B.buffer3i=function(a,b,c,d,e){};B.bufferf=function(a,b,c){};B.bufferfv=function(a,b,c){};B.bufferi=function(a,b,c){};B.bufferiv=function(a,b,c){};B.createAux=function(){return null};B.createBuffer=function(){return null};B.createEffect=function(){return null};B.createFilter=function(){return null};B.createSource=function(){return null};B.deleteBuffer=function(a){};B.deleteBuffers=
function(a){};B.deleteSource=function(a){};B.deleteSources=function(a){};B.disable=function(a){};B.distanceModel=function(a){};B.dopplerFactor=function(a){};B.dopplerVelocity=function(a){};B.effectf=function(a,b,c){};B.effectfv=function(a,b,c){};B.effecti=function(a,b,c){};B.effectiv=function(a,b,c){};B.enable=function(a){};B.genSource=function(){return null};B.genSources=function(a){return null};B.genBuffer=function(){return null};B.genBuffers=function(a){return null};B.getBoolean=function(a){return!1};
B.getBooleanv=function(a,b){return null};B.getBuffer3f=function(a,b){return null};B.getBuffer3i=function(a,b){return null};B.getBufferf=function(a,b){return 0};B.getBufferfv=function(a,b,c){return null};B.getBufferi=function(a,b){return 0};B.getBufferiv=function(a,b,c){return null};B.getDouble=function(a){return 0};B.getDoublev=function(a,b){return null};B.getEnumValue=function(a){return 0};B.getError=function(){return 0};B.getErrorString=function(){switch(B.getError()){case 40961:return"INVALID_NAME: Invalid parameter name";
case 40962:return"INVALID_ENUM: Invalid enum value";case 40963:return"INVALID_VALUE: Invalid parameter value";case 40964:return"INVALID_OPERATION: Illegal operation or call";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};B.getFilteri=function(a,b){return 0};B.getFloat=function(a){return 0};B.getFloatv=function(a,b){return null};B.getInteger=function(a){return 0};B.getIntegerv=function(a,b){return null};B.getListener3f=function(a){return null};B.getListener3i=function(a){return null};
B.getListenerf=function(a){return 0};B.getListenerfv=function(a,b){return null};B.getListeneri=function(a){return 0};B.getListeneriv=function(a,b){return null};B.getParameter=function(a){return null};B.getProcAddress=function(a){return null};B.getSource3f=function(a,b){return null};B.getSourcef=function(a,b){return 0};B.getSource3i=function(a,b){return null};B.getSourcefv=function(a,b,c){return null};B.getSourcei=function(a,b){return 0};B.getSourceiv=function(a,b,c){return null};B.getString=function(a){return null};
B.isBuffer=function(a){return!1};B.isEnabled=function(a){return!1};B.isExtensionPresent=function(a){return!1};B.isAux=function(a){return!1};B.isEffect=function(a){return!1};B.isFilter=function(a){return!1};B.isSource=function(a){return!1};B.listener3f=function(a,b,c,d){};B.listener3i=function(a,b,c,d){};B.listenerf=function(a,b){};B.listenerfv=function(a,b){};B.listeneri=function(a,b){};B.listeneriv=function(a,b){};B.source3f=function(a,b,c,d,e){};B.source3i=function(a,b,c,d,e){};B.sourcef=function(a,
b,c){};B.sourcefv=function(a,b,c){};B.sourcei=function(a,b,c){};B.filteri=function(a,b,c){};B.filterf=function(a,b,c){};B.sourceiv=function(a,b,c){};B.sourcePlay=function(a){};B.sourcePlayv=function(a){};B.sourceStop=function(a){};B.sourceStopv=function(a){};B.sourceRewind=function(a){};B.sourceRewindv=function(a){};B.sourcePause=function(a){};B.sourcePausev=function(a){};B.sourceQueueBuffer=function(a,b){};B.sourceQueueBuffers=function(a,b,c){};B.sourceUnqueueBuffer=function(a){return 0};B.sourceUnqueueBuffers=
function(a,b){return null};B.speedOfSound=function(a){};var Gb=function(){};k["lime.media.openal.ALC"]=Gb;Gb.__name__="lime.media.openal.ALC";Gb.closeDevice=function(a){return!1};Gb.createContext=function(a,b){return null};Gb.destroyContext=function(a){};Gb.getContextsDevice=function(a){return null};Gb.getCurrentContext=function(){return null};Gb.getError=function(a){return 0};Gb.getErrorString=function(a){switch(Gb.getError(a)){case 40961:return"INVALID_DEVICE: Invalid device (or no device?)";case 40962:return"INVALID_CONTEXT: Invalid context (or no context?)";
case 40963:return"INVALID_ENUM: Invalid enum value";case 40964:return"INVALID_VALUE: Invalid param value";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};Gb.getIntegerv=function(a,b,c){return null};Gb.getString=function(a,b){return null};Gb.makeContextCurrent=function(a){return!1};Gb.openDevice=function(a){return null};Gb.pauseDevice=function(a){};Gb.processContext=function(a){};Gb.resumeDevice=function(a){};Gb.suspendContext=function(a){};var nr=function(){};k["lime.media.vorbis.VorbisComment"]=
nr;nr.__name__="lime.media.vorbis.VorbisComment";nr.prototype={userComments:null,vendor:null,__class__:nr};var rm=function(a){this.handle=a};k["lime.media.vorbis.VorbisFile"]=rm;rm.__name__="lime.media.vorbis.VorbisFile";rm.fromBytes=function(a){return null};rm.fromFile=function(a){return null};rm.prototype={bitstream:null,handle:null,bitrate:function(a){return 0},bitrateInstant:function(){return 0},clear:function(){},comment:function(a){return null},crosslap:function(a){return 0},info:function(a){return null},
pcmSeek:function(a){return 0},pcmSeekLap:function(a){return 0},pcmSeekPage:function(a){return 0},pcmSeekPageLap:function(a){return 0},pcmTell:function(){return new Ua(0,0)},pcmTotal:function(a){return new Ua(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},rawTell:function(){return new Ua(0,0)},rawTotal:function(a){return new Ua(0,0)},read:function(a,b,c,d,e,f){return 0},readFloat:function(a,b){return 0},seekable:function(){return!1},serialNumber:function(a){return 0},streams:function(){return 0},
timeSeek:function(a){return 0},timeSeekLap:function(a){return 0},timeSeekPage:function(a){return 0},timeSeekPageLap:function(a){return 0},timeTell:function(){return 0},timeTotal:function(a){return 0},__class__:rm};var or=function(){};k["lime.media.vorbis.VorbisInfo"]=or;or.__name__="lime.media.vorbis.VorbisInfo";or.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:or};var sm=function(){};k["lime.net._IHTTPRequest"]=sm;sm.__name__="lime.net._IHTTPRequest";
sm.__isInterface__=!0;sm.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,manageCookies:null,cancel:null,__class__:sm};var bf=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new ia;this.headers=[];this.method="GET";this.timeout=3E4;
this.withCredentials=!1;this.manageCookies=!0;this.__backend=new $a;this.__backend.init(this)};k["lime.net._HTTPRequest.AbstractHTTPRequest"]=bf;bf.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";bf.__interfaces__=[sm];bf.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseData:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,manageCookies:null,__backend:null,
cancel:function(){this.__backend.cancel()},load:function(a){return null},__class__:bf};var Mo=function(a){bf.call(this,a)};k["lime.net.HTTPRequest"]=Mo;Mo.__name__="lime.net.HTTPRequest";Mo.__super__=bf;Mo.prototype=u(bf.prototype,{__class__:Mo});var Sg=function(a){bf.call(this,a)};k["lime.net._HTTPRequest_Bytes"]=Sg;Sg.__name__="lime.net._HTTPRequest_Bytes";Sg.__super__=bf;Sg.prototype=u(bf.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;null!=a&&(this.uri=a);var c=new Yd;
a=this.__backend.loadData(this.uri);a.onProgress(r(c,c.progress));a.onError(r(c,c.error));a.onComplete(function(a){b.responseData=b.fromBytes(a);c.complete(b.responseData)});return c.future},__class__:Sg});var Oj=function(a){bf.call(this,a)};k["lime.net._HTTPRequest_String"]=Oj;Oj.__name__="lime.net._HTTPRequest_String";Oj.__super__=bf;Oj.prototype=u(bf.prototype,{load:function(a){var b=this;null!=a&&(this.uri=a);var c=new Yd;a=this.__backend.loadText(this.uri);a.onProgress(r(c,c.progress));a.onError(r(c,
c.error));a.onComplete(function(a){b.responseData=a;c.complete(b.responseData)});return c.future},__class__:Oj});var fm=function(a,b){null==b&&(b="");this.name=a;this.value=b};k["lime.net.HTTPRequestHeader"]=fm;fm.__name__="lime.net.HTTPRequestHeader";fm.prototype={name:null,value:null,__class__:fm};var tm=function(a){bf.call(this,a)};k["lime.net._HTTPRequest_lime_text_Font"]=tm;tm.__name__="lime.net._HTTPRequest_lime_text_Font";tm.__super__=Sg;tm.prototype=u(Sg.prototype,{fromBytes:function(a){return Id.fromBytes(a)},
__class__:tm});var um=function(a){bf.call(this,a)};k["lime.net._HTTPRequest_lime_utils_Bytes"]=um;um.__name__="lime.net._HTTPRequest_lime_utils_Bytes";um.__super__=Sg;um.prototype=u(Sg.prototype,{fromBytes:function(a){return ic.fromBytes(a)},__class__:um});var vm=function(a){bf.call(this,a)};k["lime.net._HTTPRequest_openfl_utils_ByteArray"]=vm;vm.__name__="lime.net._HTTPRequest_openfl_utils_ByteArray";vm.__super__=Sg;vm.prototype=u(Sg.prototype,{fromBytes:function(a){return Ab.fromBytes(a)},__class__:vm});
var Tg=function(){};k["lime.system.CFFI"]=Tg;Tg.__name__="lime.system.CFFI";Tg.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Tg.enabled?null:X.makeVarArgs(function(a){return{}})};Tg.__findHaxelib=function(a){return""};Tg.__loaderTrace=function(a){};Tg.__sysName=function(){return null};Tg.__tryLoad=function(a,b,c,d){return null};var Jd={_new:function(a){return a},get:function(a){return 0},equals:function(a,b){return Jd.get(a)==b},equalsPointer:function(a,b){return Jd.get(a)==Jd.get(b)},
greaterThan:function(a,b){return Jd.get(a)>b},greaterThanPointer:function(a,b){return Jd.get(a)>Jd.get(b)},greaterThanOrEqual:function(a,b){return Jd.get(a)>=b},greaterThanOrEqualPointer:function(a,b){return Jd.get(a)>=Jd.get(b)},lessThan:function(a,b){return Jd.get(a)<b},lessThanPointer:function(a,b){return Jd.get(a)<Jd.get(b)},lessThanOrEqual:function(a,b){return Jd.get(a)<=b},lessThanOrEqualPointer:function(a,b){return Jd.get(a)<=Jd.get(b)},notEquals:function(a,b){return Jd.get(a)!=b},notEqualsPointer:function(a,
b){return Jd.get(a)!=Jd.get(b)}},he=function(){};k["lime.system.Clipboard"]=he;he.__name__="lime.system.Clipboard";he.__properties__={set_text:"set_text",get_text:"get_text"};he.__update=function(){var a=he._text;he._text=null;he._text!=a&&he.onUpdate.dispatch()};he.get_text=function(){he.__update();return he._text};he.set_text=function(a){var b=he._text;he._text=a;var c=rd.current.__window;null!=c&&c.__backend.setClipboard(a);he._text!=b&&he.onUpdate.dispatch();return a};var No=function(){};k["lime.system.Display"]=
No;No.__name__="lime.system.Display";No.prototype={bounds:null,currentMode:null,id:null,dpi:null,name:null,supportedModes:null,__class__:No};var Oo=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=c;this.pixelFormat=d};k["lime.system.DisplayMode"]=Oo;Oo.__name__="lime.system.DisplayMode";Oo.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:Oo};var yg=x["lime.system.Endian"]={__ename__:"lime.system.Endian",__constructs__:null,LITTLE_ENDIAN:{_hx_name:"LITTLE_ENDIAN",
_hx_index:0,__enum__:"lime.system.Endian",toString:v},BIG_ENDIAN:{_hx_name:"BIG_ENDIAN",_hx_index:1,__enum__:"lime.system.Endian",toString:v}};yg.__constructs__=[yg.LITTLE_ENDIAN,yg.BIG_ENDIAN];var re=function(){};k["lime.system.JNI"]=re;re.__name__="lime.system.JNI";re.callMember=function(a,b,c){switch(c.length){case 0:return a(b);case 1:return a(b,c[0]);case 2:return a(b,c[0],c[1]);case 3:return a(b,c[0],c[1],c[2]);case 4:return a(b,c[0],c[1],c[2],c[3]);case 5:return a(b,c[0],c[1],c[2],c[3],c[4]);
case 6:return a(b,c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return a(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6]);default:return null}};re.callStatic=function(a,b){switch(b.length){case 0:return a();case 1:return a(b[0]);case 2:return a(b[0],b[1]);case 3:return a(b[0],b[1],b[2]);case 4:return a(b[0],b[1],b[2],b[3]);case 5:return a(b[0],b[1],b[2],b[3],b[4]);case 6:return a(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return a(b[0],b[1],b[2],b[3],b[4],b[5],b[6]);default:return null}};re.createMemberField=function(a,
b,c){re.init();return new Po(null)};re.createMemberMethod=function(a,b,c,d,e){re.init();return null};re.createStaticField=function(a,b,c){re.init();return new Qo(null)};re.createStaticMethod=function(a,b,c,d,e){re.init();return null};re.getEnv=function(){re.init();return null};re.init=function(){re.initialized||(re.initialized=!0)};re.onCallback=function(a,b,c){b=X.field(a,b);return null!=b?(null==c&&(c=[]),b.apply(a,c)):null};re.postUICallback=function(a){a()};var Po=function(a){this.field=a};k["lime.system.JNIMemberField"]=
Po;Po.__name__="lime.system.JNIMemberField";Po.prototype={field:null,get:function(a){return null},set:function(a,b){return b},__class__:Po};var Qo=function(a){this.field=a};k["lime.system.JNIStaticField"]=Qo;Qo.__name__="lime.system.JNIStaticField";Qo.prototype={field:null,get:function(){return null},set:function(a){return a},__class__:Qo};var pr=function(a){this.method=a};k["lime.system.JNIMethod"]=pr;pr.__name__="lime.system.JNIMethod";pr.prototype={method:null,callMember:function(a){return null},
callStatic:function(a){return null},getMemberMethod:function(a){return a?r(this,this.callMember):X.makeVarArgs(r(this,this.callMember))},getStaticMethod:function(a){return a?r(this,this.callStatic):X.makeVarArgs(r(this,this.callStatic))},__class__:pr};var Rr=function(){};k["lime.system.JNISafety"]=Rr;Rr.__name__="lime.system.JNISafety";Rr.__isInterface__=!0;var Sr=function(){};k["lime.system.JNISafetyTools"]=Sr;Sr.__name__="lime.system.JNISafetyTools";Sr.onMainThread=function(){return!0};var Qe={__properties__:{get_region:"get_region",
get_language:"get_language",get_systemLocale:"get_systemLocale",set_currentLocale:"set_currentLocale",get_currentLocale:"get_currentLocale"},_new:function(a){return a},equals:function(a,b){var c=Qe.get_language(a);a=Qe.get_region(a);var d=Qe.get_language(b);b=Qe.get_region(b);var e=c==d,f=a==b;e||null==c||null==d||(e=c.toLowerCase()==d.toLowerCase());f||null==a||null==b||(f=a.toLowerCase()==b.toLowerCase());return e?f:!1},__init:function(){if(null==Qe.__systemLocale){var a=navigator.language;Qe.__systemLocale=
null!=a?a:"en-US";Qe.set_currentLocale(Qe.__systemLocale)}},get_language:function(a){if(null!=a){var b=a.indexOf("_");if(-1<b){var c=a.indexOf("-");-1<c&&c<b&&(b=c);return a.substring(0,b)}b=a.indexOf("-");if(-1<b)return a.substring(0,b)}return a},get_region:function(a){if(null!=a){var b=a.indexOf("_"),c=a.indexOf("."),d=a.indexOf("-");if(-1<b)return-1<c?a.substring(b+1,c):a.substring(b+1);if(-1<d)return-1<c?a.substring(d+1,c):a.substring(d+1)}return null},get_currentLocale:function(){Qe.__init();
return Qe.currentLocale},set_currentLocale:function(a){Qe.__init();return Qe.currentLocale=a},get_systemLocale:function(){Qe.__init();return Qe.__systemLocale}},Pf=function(a,b){this.onUpdate=new xo;this.type=a;this.id=b};k["lime.system.Sensor"]=Pf;Pf.__name__="lime.system.Sensor";Pf.getSensors=function(a){if(null==a)return Pf.sensors.slice();for(var b=[],c=0,d=Pf.sensors;c<d.length;){var e=d[c];++c;e.type==a&&b.push(e)}return b};Pf.registerSensor=function(a,b){a=new Pf(a,b);Pf.sensors.push(a);return Pf.sensorByID.h[b]=
a};Pf.prototype={id:null,onUpdate:null,type:null,__class__:Pf};var Qr=x["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:null,ACCELEROMETER:{_hx_name:"ACCELEROMETER",_hx_index:0,__enum__:"lime.system.SensorType",toString:v}};Qr.__constructs__=[Qr.ACCELEROMETER];var Qa=function(){};k["lime.system.System"]=Qa;Qa.__name__="lime.system.System";Qa.__properties__={get_userDirectory:"get_userDirectory",get_platformVersion:"get_platformVersion",get_platformName:"get_platformName",
get_platformLabel:"get_platformLabel",get_numDisplays:"get_numDisplays",get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_deviceVendor:"get_deviceVendor",get_deviceModel:"get_deviceModel",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};
Qa.embed=w.lime.embed=function(a,b,c,d,e){if(null!=Qa.__applicationEntryPoint&&Object.prototype.hasOwnProperty.call(Qa.__applicationEntryPoint.h,a)){var f="string"==typeof b?window.document.getElementById(b):null==b?window.document.createElement("div"):b;null==f?window.console.log("[lime.embed] ERROR: Cannot find target element: "+A.string(b)):(null==c&&(c=0),null==d&&(d=0),null==e&&(e={}),Object.prototype.hasOwnProperty.call(e,"background")&&"string"==typeof e.background&&(b=R.replace(A.string(e.background),
"#",""),-1<b.indexOf("0x")?e.background=A.parseInt(b):e.background=A.parseInt("0x"+b)),e.element=f,e.width=c,e.height=d,Qa.__applicationEntryPoint.h[a](e))}};Qa.exit=function(a){};Qa.getDisplay=function(a){return 0==a?(a=new No,a.id=0,a.name="Generic Display",a.dpi=96*window.devicePixelRatio,a.currentMode=new Oo(window.screen.width,window.screen.height,60,1),a.supportedModes=[a.currentMode],a.bounds=new Dd(0,0,a.currentMode.width,a.currentMode.height),a):null};Qa.getTimer=function(){return window.performance.now()|
0};Qa.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Tg.load(a,b,c,d)};Qa.openFile=function(a){null!=a&&window.open(a,"_blank")};Qa.openURL=function(a,b){null==b&&(b="_blank");null!=a&&window.open(a,b)};Qa.__copyMissingFields=function(a,b){if(null!=b&&null!=a)for(var c=0,d=X.fields(b);c<d.length;){var e=d[c];++c;Object.prototype.hasOwnProperty.call(a,e)||(a[e]=X.field(b,e))}};Qa.__getDirectory=function(a){return null};Qa.__parseBool=function(a){return"true"==a};Qa.__registerEntryPoint=
function(a,b){null==Qa.__applicationEntryPoint&&(Qa.__applicationEntryPoint=new ia);Qa.__applicationEntryPoint.h[a]=b};Qa.__runProcess=function(a,b){return null};Qa.get_allowScreenTimeout=function(){return!0};Qa.set_allowScreenTimeout=function(a){return!0};Qa.get_applicationDirectory=function(){null==Qa.__applicationDirectory&&(Qa.__applicationDirectory=Qa.__getDirectory(0));return Qa.__applicationDirectory};Qa.get_applicationStorageDirectory=function(){null==Qa.__applicationStorageDirectory&&(Qa.__applicationStorageDirectory=
Qa.__getDirectory(1));return Qa.__applicationStorageDirectory};Qa.get_deviceModel=function(){return Qa.__deviceModel};Qa.get_deviceVendor=function(){return Qa.__deviceVendor};Qa.get_desktopDirectory=function(){null==Qa.__desktopDirectory&&(Qa.__desktopDirectory=Qa.__getDirectory(2));return Qa.__desktopDirectory};Qa.get_documentsDirectory=function(){null==Qa.__documentsDirectory&&(Qa.__documentsDirectory=Qa.__getDirectory(3));return Qa.__documentsDirectory};Qa.get_endianness=function(){if(null==Qa.__endianness){var a=
new ArrayBuffer(2),b=null,c=null,d=null,e=null,f=null,g=b=null!=b?new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):null!=e?new Uint8Array(e):null!=a?null==f?new Uint8Array(a,0):new Uint8Array(a,0,f):null;f=e=d=c=b=null;b=null!=b?new Uint16Array(b):null!=c?new Uint16Array(c):null!=d?new Uint16Array(d.__array):null!=e?new Uint16Array(e):null!=a?null==f?new Uint16Array(a,0):new Uint16Array(a,0,f):null;g[0]=170;g[1]=187;Qa.__endianness=43707==b[0]?yg.BIG_ENDIAN:yg.LITTLE_ENDIAN}return Qa.__endianness};
Qa.get_fontsDirectory=function(){null==Qa.__fontsDirectory&&(Qa.__fontsDirectory=Qa.__getDirectory(4));return Qa.__fontsDirectory};Qa.get_numDisplays=function(){return 1};Qa.get_platformLabel=function(){if(null==Qa.__platformLabel){var a=Qa.get_platformName(),b=Qa.get_platformVersion();null!=a&&null!=b?Qa.__platformLabel=a+" "+b:null!=a&&(Qa.__platformLabel=a)}return Qa.__platformLabel};Qa.get_platformName=function(){null==Qa.__platformName&&(Qa.__platformName="HTML5");return Qa.__platformName};Qa.get_platformVersion=
function(){return Qa.__platformVersion};Qa.get_userDirectory=function(){null==Qa.__userDirectory&&(Qa.__userDirectory=Qa.__getDirectory(5));return Qa.__userDirectory};var wo=function(a,b){null==b&&(b=1);null==a&&(a=0);this.onRun=new Rh;this.onProgress=new Rh;this.onError=new Rh;this.onComplete=new Rh;this.doWork=new Rh;this.minThreads=a;this.maxThreads=b;this.currentThreads=0};k["lime.system.ThreadPool"]=wo;wo.__name__="lime.system.ThreadPool";wo.prototype={currentThreads:null,doWork:null,maxThreads:null,
minThreads:null,onComplete:null,onError:null,onProgress:null,onRun:null,queue:function(a){this.runWork(a)},sendComplete:function(a){this.onComplete.dispatch(a)},sendError:function(a){this.onError.dispatch(a)},sendProgress:function(a){this.onProgress.dispatch(a)},runWork:function(a){this.onRun.dispatch(a);this.doWork.dispatch(a)},__class__:wo};var wm=x["lime.system._ThreadPool.ThreadPoolMessageType"]={__ename__:"lime.system._ThreadPool.ThreadPoolMessageType",__constructs__:null,COMPLETE:{_hx_name:"COMPLETE",
_hx_index:0,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:v},ERROR:{_hx_name:"ERROR",_hx_index:1,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:v},EXIT:{_hx_name:"EXIT",_hx_index:2,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:v},PROGRESS:{_hx_name:"PROGRESS",_hx_index:3,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:v},WORK:{_hx_name:"WORK",_hx_index:4,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:v}};
wm.__constructs__=[wm.COMPLETE,wm.ERROR,wm.EXIT,wm.PROGRESS,wm.WORK];var qr=function(a,b){this.type=a;this.state=b};k["lime.system._ThreadPool.ThreadPoolMessage"]=qr;qr.__name__="lime.system._ThreadPool.ThreadPoolMessage";qr.prototype={state:null,type:null,__class__:qr};var Id=function(a){null!=a&&(this.name=a);this.__init||(void 0==this.ascender&&(this.ascender=0),void 0==this.descender&&(this.descender=0),void 0==this.height&&(this.height=0),void 0==this.numGlyphs&&(this.numGlyphs=0),void 0==this.underlinePosition&&
(this.underlinePosition=0),void 0==this.underlineThickness&&(this.underlineThickness=0),void 0==this.unitsPerEM&&(this.unitsPerEM=0),null!=this.__fontID?sa.isLocal(this.__fontID)&&this.__fromBytes(sa.getBytes(this.__fontID)):null!=this.__fontPath&&this.__fromFile(this.__fontPath))};k["lime.text.Font"]=Id;Id.__name__="lime.text.Font";Id.fromBytes=function(a){if(null==a)return null;var b=new Id;b.__fromBytes(a);return b};Id.fromFile=function(a){if(null==a)return null;var b=new Id;b.__fromFile(a);return b};
Id.loadFromBytes=function(a){return eb.withValue(Id.fromBytes(a))};Id.loadFromFile=function(a){return(new tm).load(a).then(function(a){return null!=a?eb.withValue(a):eb.withError("")})};Id.loadFromName=function(a){return(new Id).__loadFromName(a)};Id.__measureFontNode=function(a){var b=window.document.createElement("span");b.setAttribute("aria-hidden","true");var c=window.document.createTextNode("BESbswy");b.appendChild(c);c=b.style;c.display="block";c.position="absolute";c.top="-9999px";c.left="-9999px";
c.fontSize="300px";c.width="auto";c.height="auto";c.lineHeight="normal";c.margin="0";c.padding="0";c.fontVariant="normal";c.whiteSpace="nowrap";c.fontFamily=a;window.document.body.appendChild(b);return b};Id.prototype={ascender:null,descender:null,height:null,name:null,numGlyphs:null,src:null,underlinePosition:null,underlineThickness:null,unitsPerEM:null,__fontID:null,__fontPath:null,__init:null,decompose:function(){return null},getGlyph:function(a){return-1},getGlyphs:function(a){return null},getGlyphMetrics:function(a){return null},
renderGlyph:function(a,b){return null},renderGlyphs:function(a,b){return null},__copyFrom:function(a){null!=a&&(this.ascender=a.ascender,this.descender=a.descender,this.height=a.height,this.name=a.name,this.numGlyphs=a.numGlyphs,this.src=a.src,this.underlinePosition=a.underlinePosition,this.underlineThickness=a.underlineThickness,this.unitsPerEM=a.unitsPerEM,this.__fontID=a.__fontID,this.__fontPath=a.__fontPath,this.__init=!0)},__fromBytes:function(a){this.__fontPath=null},__fromFile:function(a){this.__fontPath=
a},__initializeSource:function(){this.__init=!0},__loadFromName:function(a){var b=this,c=new Yd;this.name=a;var d=N.navigator.userAgent.toLowerCase(),e=0<=d.indexOf(" safari/")&&0>d.indexOf(" chrome/");d=(new aa("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i")).match(d);if(!e&&!d&&window.document.fonts&&(C=window.document.fonts,r(C,C.load)))window.document.fonts.load("1em '"+a+"'").then(function(a){c.complete(b)},function(d){Q.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",
lineNumber:513,className:"lime.text.Font",methodName:"__loadFromName"});c.complete(b)});else{var f=Id.__measureFontNode("'"+a+"', sans-serif"),g=Id.__measureFontNode("'"+a+"', serif"),h=f.offsetWidth,m=g.offsetWidth,l=-1,n=0,p,k;l=window.setInterval(function(){n+=1;p=f.offsetWidth!=h||g.offsetWidth!=m;k=3E3<=50*n;if(p||k)window.clearInterval(l),f.parentNode.removeChild(f),g.parentNode.removeChild(g),g=f=null,k&&Q.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:548,
className:"lime.text.Font",methodName:"__loadFromName"}),c.complete(b)},50)}return c.future},__setSize:function(a){},__class__:Id};var rr=function(){};k["lime.text.GlyphMetrics"]=rr;rr.__name__="lime.text.GlyphMetrics";rr.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:rr};var Tr=function(){};k["lime.text.harfbuzz.HB"]=Tr;Tr.__name__="lime.text.harfbuzz.HB";Tr.shape=function(a,b,c){};var os={__properties__:{set_segmentProperties:"set_segmentProperties",get_segmentProperties:"get_segmentProperties",
set_script:"set_script",get_script:"get_script",set_replacementCodepoint:"set_replacementCodepoint",get_replacementCodepoint:"get_replacementCodepoint",set_length:"set_length",get_length:"get_length",set_language:"set_language",get_language:"get_language",set_flags:"set_flags",get_flags:"get_flags",set_direction:"set_direction",get_direction:"get_direction",set_contentType:"set_contentType",get_contentType:"get_contentType",set_clusterLevel:"set_clusterLevel",get_clusterLevel:"get_clusterLevel",get_allocationSuccessful:"get_allocationSuccessful"},
_new:function(){return null},add:function(a,b,c){},addCodepoints:function(a,b,c,d,e){},addUTF8:function(a,b,c,d){},addUTF16:function(a,b,c,d,e){},addUTF32:function(a,b,c,d,e){},clearContents:function(a){},getGlyphInfo:function(a){return null},getGlyphPositions:function(a){return null},guessSegmentProperties:function(a){},normalizeGlyphs:function(a){},preallocate:function(a,b){return!1},reset:function(a){},reverse:function(a){},reverseClusters:function(a){},get_allocationSuccessful:function(a){return!1},
get_clusterLevel:function(a){return 0},set_clusterLevel:function(a,b){return b},get_contentType:function(a){return 0},set_contentType:function(a,b){return b},get_direction:function(a){return 0},set_direction:function(a,b){return b},get_empty:function(){return null},get_flags:function(a){return 0},set_flags:function(a,b){return b},get_language:function(a){return null},set_language:function(a,b){return b},get_length:function(a){return 0},set_length:function(a,b){return b},get_replacementCodepoint:function(a){return 0},
set_replacementCodepoint:function(a,b){return b},get_script:function(a){return 0},set_script:function(a,b){return b},get_segmentProperties:function(a){return null},set_segmentProperties:function(a,b){return b}},sr=function(){};k["lime.text.harfbuzz.HBFeature"]=sr;sr.__name__="lime.text.harfbuzz.HBFeature";sr.prototype={__class__:sr};var tr=function(){};k["lime.text.harfbuzz.HBGlyphInfo"]=tr;tr.__name__="lime.text.harfbuzz.HBGlyphInfo";tr.prototype={codepoint:null,mask:null,cluster:null,__class__:tr};
var ur=function(){};k["lime.text.harfbuzz.HBGlyphPosition"]=ur;ur.__name__="lime.text.harfbuzz.HBGlyphPosition";ur.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:ur};var gs={_new:function(a){return null},toString:function(a){return null},fromString:function(a){return gs._new(a)}},vr=function(){};k["lime.text.harfbuzz.HBSegmentProperties"]=vr;vr.__name__="lime.text.harfbuzz.HBSegmentProperties";vr.prototype={__class__:vr};var Gd=function(a){this.onDisconnect=new Bd;this.onButtonUp=
new om;this.onButtonDown=new om;this.onAxisMove=new Fo;this.id=a;this.connected=!0};k["lime.ui.Gamepad"]=Gd;Gd.__name__="lime.ui.Gamepad";Gd.addMappings=function(a){};Gd.__connect=function(a){if(!Gd.devices.h.hasOwnProperty(a)){var b=new Gd(a);Gd.devices.h[a]=b;Gd.onConnect.dispatch(b)}};Gd.__disconnect=function(a){var b=Gd.devices.h[a];null!=b&&(b.connected=!1);Gd.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};Gd.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,
onDisconnect:null,get_guid:function(){return Xc.__getDeviceData()[this.id].id},get_name:function(){return Xc.__getDeviceData()[this.id].id},__class__:Gd,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Xc=function(a){this.onTrackballMove=new Bo;this.onHatMove=new Do;this.onDisconnect=new Bd;this.onButtonUp=new Qh;this.onButtonDown=new Qh;this.onAxisMove=new Co;this.id=a;this.connected=!0};k["lime.ui.Joystick"]=Xc;Xc.__name__="lime.ui.Joystick";Xc.__connect=function(a){if(!Xc.devices.h.hasOwnProperty(a)){var b=
new Xc(a);Xc.devices.h[a]=b;Xc.onConnect.dispatch(b)}};Xc.__disconnect=function(a){var b=Xc.devices.h[a];null!=b&&(b.connected=!1);Xc.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};Xc.__getDeviceData=function(){return navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null};Xc.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,onHatMove:null,onTrackballMove:null,get_guid:function(){return Xc.__getDeviceData()[this.id].id},
get_name:function(){return Xc.__getDeviceData()[this.id].id},get_numAxes:function(){return Xc.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return Xc.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},get_numTrackballs:function(){return 0},__class__:Xc,__properties__:{get_numTrackballs:"get_numTrackballs",get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};var zb={__properties__:{set_shiftKey:"set_shiftKey",
get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"},get_altKey:function(a){return 0>=(a&256)?0<(a&512):!0},set_altKey:function(a,b){return b},get_capsLock:function(a){return 0>=(a&8192)?0<(a&8192):!0},set_capsLock:function(a,b){return b},get_ctrlKey:function(a){return 0>=
(a&64)?0<(a&128):!0},set_ctrlKey:function(a,b){return b},get_metaKey:function(a){return 0>=(a&1024)?0<(a&2048):!0},set_metaKey:function(a,b){return b},get_numLock:function(a){return 0>=(a&4096)?0<(a&4096):!0},set_numLock:function(a,b){return b},get_shiftKey:function(a){return 0>=(a&1)?0<(a&2):!0},set_shiftKey:function(a,b){return b}},kc=x["lime.ui.MouseCursor"]={__ename__:"lime.ui.MouseCursor",__constructs__:null,ARROW:{_hx_name:"ARROW",_hx_index:0,__enum__:"lime.ui.MouseCursor",toString:v},CROSSHAIR:{_hx_name:"CROSSHAIR",
_hx_index:1,__enum__:"lime.ui.MouseCursor",toString:v},DEFAULT:{_hx_name:"DEFAULT",_hx_index:2,__enum__:"lime.ui.MouseCursor",toString:v},MOVE:{_hx_name:"MOVE",_hx_index:3,__enum__:"lime.ui.MouseCursor",toString:v},POINTER:{_hx_name:"POINTER",_hx_index:4,__enum__:"lime.ui.MouseCursor",toString:v},RESIZE_NESW:{_hx_name:"RESIZE_NESW",_hx_index:5,__enum__:"lime.ui.MouseCursor",toString:v},RESIZE_NS:{_hx_name:"RESIZE_NS",_hx_index:6,__enum__:"lime.ui.MouseCursor",toString:v},RESIZE_NWSE:{_hx_name:"RESIZE_NWSE",
_hx_index:7,__enum__:"lime.ui.MouseCursor",toString:v},RESIZE_WE:{_hx_name:"RESIZE_WE",_hx_index:8,__enum__:"lime.ui.MouseCursor",toString:v},TEXT:{_hx_name:"TEXT",_hx_index:9,__enum__:"lime.ui.MouseCursor",toString:v},WAIT:{_hx_name:"WAIT",_hx_index:10,__enum__:"lime.ui.MouseCursor",toString:v},WAIT_ARROW:{_hx_name:"WAIT_ARROW",_hx_index:11,__enum__:"lime.ui.MouseCursor",toString:v},CUSTOM:{_hx_name:"CUSTOM",_hx_index:12,__enum__:"lime.ui.MouseCursor",toString:v}};kc.__constructs__=[kc.ARROW,kc.CROSSHAIR,
kc.DEFAULT,kc.MOVE,kc.POINTER,kc.RESIZE_NESW,kc.RESIZE_NS,kc.RESIZE_NWSE,kc.RESIZE_WE,kc.TEXT,kc.WAIT,kc.WAIT_ARROW,kc.CUSTOM];var sh=x["lime.ui.MouseWheelMode"]={__ename__:"lime.ui.MouseWheelMode",__constructs__:null,PIXELS:{_hx_name:"PIXELS",_hx_index:0,__enum__:"lime.ui.MouseWheelMode",toString:v},LINES:{_hx_name:"LINES",_hx_index:1,__enum__:"lime.ui.MouseWheelMode",toString:v},PAGES:{_hx_name:"PAGES",_hx_index:2,__enum__:"lime.ui.MouseWheelMode",toString:v},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:3,
__enum__:"lime.ui.MouseWheelMode",toString:v}};sh.__constructs__=[sh.PIXELS,sh.LINES,sh.PAGES,sh.UNKNOWN];var kd=function(a,b,c,d,e,f,g){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=e;this.pressure=f;this.device=g};k["lime.ui.Touch"]=kd;kd.__name__="lime.ui.Touch";kd.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:kd};var Gi=function(a,b){this.onTextInput=new mm;this.onTextEdit=new Eo;this.onRestore=new Bd;this.onResize=new lm;this.onRenderContextRestored=new nm;
this.onRenderContextLost=new Bd;this.onRender=new nm;this.onMove=new Mj;this.onMouseWheel=new Ao;this.onMouseUp=new yo;this.onMouseMoveRelative=new Mj;this.onMouseMove=new Mj;this.onMouseDown=new zo;this.onMinimize=new Bd;this.onMaximize=new Bd;this.onLeave=new Bd;this.onKeyUp=new pm;this.onKeyDown=new pm;this.onFullscreen=new Bd;this.onFocusOut=new Bd;this.onFocusIn=new Bd;this.onExpose=new Bd;this.onEnter=new Bd;this.onDropFile=new mm;this.onDeactivate=new Bd;this.onClose=new Bd;this.onActivate=
new Bd;this.application=a;this.__attributes=null!=b?b:{};Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")&&(this.parameters=this.__attributes.parameters);this.__height=this.__width=0;this.__fullscreen=!1;this.__scale=1;this.__y=this.__x=0;this.__title="";this.id=-1;this.__backend=new ob(this)};k["lime.ui.Window"]=Gi;Gi.__name__="lime.ui.Window";Gi.prototype={application:null,context:null,display:null,element:null,hidden:null,id:null,onActivate:null,onClose:null,onDeactivate:null,
onDropFile:null,onEnter:null,onExpose:null,onFocusIn:null,onFocusOut:null,onFullscreen:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMaximize:null,onMinimize:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onMove:null,onRender:null,onRenderContextLost:null,onRenderContextRestored:null,onResize:null,onRestore:null,onTextEdit:null,onTextInput:null,parameters:null,scale:null,stage:null,__attributes:null,__backend:null,__borderless:null,__fullscreen:null,
__height:null,__hidden:null,__maximized:null,__minimized:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,alert:function(a,b){this.__backend.alert(a,b)},close:function(){this.__backend.close()},focus:function(){this.__backend.focus()},move:function(a,b){this.__backend.move(a,b);this.__x=a;this.__y=b},readPixels:function(a){return this.__backend.readPixels(a)},resize:function(a,b){this.__backend.resize(a,b);this.__width=a;this.__height=b},setIcon:function(a){null!=a&&
this.__backend.setIcon(a)},toString:function(){return"[object Window]"},warpMouse:function(a,b){this.__backend.warpMouse(a,b)},get_cursor:function(){return this.__backend.getCursor()},set_cursor:function(a){return this.__backend.setCursor(a)},get_display:function(){return this.__backend.getDisplay()},get_displayMode:function(){return this.__backend.getDisplayMode()},set_displayMode:function(a){return this.__backend.setDisplayMode(a)},get_borderless:function(){return this.__borderless},set_borderless:function(a){return this.__borderless=
this.__backend.setBorderless(a)},get_frameRate:function(){return this.__backend.getFrameRate()},set_frameRate:function(a){return this.__backend.setFrameRate(a)},get_fullscreen:function(){return this.__fullscreen},set_fullscreen:function(a){return this.__fullscreen=this.__backend.setFullscreen(a)},get_height:function(){return this.__height},set_height:function(a){this.resize(this.__width,a);return this.__height},get_hidden:function(){return this.__hidden},get_maximized:function(){return this.__maximized},
set_maximized:function(a){this.__minimized=!1;return this.__maximized=this.__backend.setMaximized(a)},get_minimized:function(){return this.__minimized},set_minimized:function(a){this.__maximized=!1;return this.__minimized=this.__backend.setMinimized(a)},get_mouseLock:function(){return this.__backend.getMouseLock()},set_mouseLock:function(a){this.__backend.setMouseLock(a);return a},get_resizable:function(){return this.__resizable},set_resizable:function(a){return this.__resizable=this.__backend.setResizable(a)},
get_scale:function(){return this.__scale},get_textInputEnabled:function(){return this.__backend.getTextInputEnabled()},set_textInputEnabled:function(a){return this.__backend.setTextInputEnabled(a)},setTextInputRect:function(a){return this.__backend.setTextInputRect(a)},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.__backend.setTitle(a)},get_width:function(){return this.__width},set_width:function(a){this.resize(a,this.__height);return this.__width},get_x:function(){return this.__x},
set_x:function(a){this.move(a,this.__y);return this.__x},get_y:function(){return this.__y},set_y:function(a){this.move(this.__x,a);return this.__y},__class__:Gi,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_title:"set_title",get_title:"get_title",set_textInputEnabled:"set_textInputEnabled",get_textInputEnabled:"get_textInputEnabled",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_mouseLock:"set_mouseLock",
get_mouseLock:"get_mouseLock",set_minimized:"set_minimized",get_minimized:"get_minimized",set_maximized:"set_maximized",get_maximized:"get_maximized",get_hidden:"get_hidden",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_displayMode:"set_displayMode",get_displayMode:"get_displayMode",get_display:"get_display",set_cursor:"set_cursor",get_cursor:"get_cursor",set_borderless:"set_borderless",
get_borderless:"get_borderless"}};var hs=x["lime.utils.TAError"]={__ename__:"lime.utils.TAError",__constructs__:null,RangeError:{_hx_name:"RangeError",_hx_index:0,__enum__:"lime.utils.TAError",toString:v}};hs.__constructs__=[hs.RangeError];var Tf=function(){this.data=new ia;this.paths=[]};k["lime.utils.AssetBundle"]=Tf;Tf.__name__="lime.utils.AssetBundle";Tf.fromBytes=function(a){a=new em(a);return Tf.__extractBundle(a)};Tf.fromFile=function(a){return null};Tf.loadFromBytes=function(a){return eb.withValue(Tf.fromBytes(a))};
Tf.loadFromFile=function(a){return ic.loadFromFile(a).then(Tf.loadFromBytes)};Tf.__extractBundle=function(a){var b=Ij.readZip(a);a=new Tf;for(b=b.h;null!=b;){var c=b.item;b=b.next;if(c.compressed){var d=a.data,e=c.fileName,f=ic.decompress(c.data,Zd.DEFLATE);d.h[e]=f}else a.data.h[c.fileName]=c.data;a.paths.push(c.fileName)}return a};Tf.prototype={data:null,paths:null,__class__:Tf};var Ro=function(){this.enabled=!0;this.audio=new ia;this.font=new ia;this.image=new ia;this.version=0};k["lime.utils.AssetCache"]=
Ro;Ro.__name__="lime.utils.AssetCache";Ro.prototype={audio:null,enabled:null,image:null,font:null,version:null,exists:function(a,b){return("IMAGE"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.image.h,a)||("FONT"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.font.h,a)||("SOUND"==b||"MUSIC"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.audio.h,a)?!0:!1},set:function(a,b,c){switch(b){case "FONT":this.font.h[a]=c;break;case "IMAGE":if(!(c instanceof Fb))throw J.thrown("Cannot cache non-Image asset: "+
A.string(c)+" as Image");this.image.h[a]=c;break;case "MUSIC":case "SOUND":if(!(c instanceof Pc))throw J.thrown("Cannot cache non-AudioBuffer asset: "+A.string(c)+" as AudioBuffer");this.audio.h[a]=c;break;default:throw J.thrown(b+" assets are not cachable");}},clear:function(a){if(null==a)this.audio=new ia,this.font=new ia,this.image=new ia;else{var b=this.audio.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var e=b[d++];if(R.startsWith(e,a)){var f=this.audio;Object.prototype.hasOwnProperty.call(f.h,
e)&&delete f.h[e]}}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)e=b[d++],R.startsWith(e,a)&&(f=this.font,Object.prototype.hasOwnProperty.call(f.h,e)&&delete f.h[e]);b=this.image.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)e=b[d++],R.startsWith(e,a)&&(f=this.image,Object.prototype.hasOwnProperty.call(f.h,e)&&delete f.h[e])}},__class__:Ro};var wb=function(){this.types=new ia;this.sizes=new ia;this.preload=new ia;this.paths=new ia;this.pathGroups=new ia;this.classTypes=new ia;this.cachedText=
new ia;this.cachedImages=new ia;this.cachedFonts=new ia;this.cachedBytes=new ia;this.cachedAudioBuffers=new ia;this.onChange=new Bd;this.bytesTotal=this.bytesLoaded=0};k["lime.utils.AssetLibrary"]=wb;wb.__name__="lime.utils.AssetLibrary";wb.fromBytes=function(a,b){return wb.fromManifest(Jc.fromBytes(a,b))};wb.fromFile=function(a,b){return wb.fromManifest(Jc.fromFile(a,b))};wb.fromBundle=function(a){if(Object.prototype.hasOwnProperty.call(a.data.h,"library.json")){var b=Jc.fromBytes(a.data.h["library.json"]);
if(null!=b){if(null==b.libraryType)var c=new wb;else if(c=k[b.libraryType],null!=c)c=Ia.createInstance(c,b.libraryArgs);else return Q.warn("Could not find library type: "+b.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:122,className:"lime.utils.AssetLibrary",methodName:"fromBundle"}),null;c.__fromBundle(a,b);return c}}else return c=new wb,c.__fromBundle(a),c;return null};wb.fromManifest=function(a){if(null==a)return null;if(null==a.libraryType)var b=new wb;else if(b=k[a.libraryType],
null!=b)b=Ia.createInstance(b,a.libraryArgs);else return Q.warn("Could not find library type: "+a.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:160,className:"lime.utils.AssetLibrary",methodName:"fromManifest"}),null;b.__fromManifest(a);return b};wb.loadFromBytes=function(a,b){return Jc.loadFromBytes(a,b).then(function(a){return wb.loadFromManifest(a)})};wb.loadFromFile=function(a,b){return Jc.loadFromFile(a,b).then(function(a){return wb.loadFromManifest(a)})};wb.loadFromManifest=
function(a){a=wb.fromManifest(a);return null!=a?a.load():eb.withError("Could not load asset manifest")};wb.prototype={onChange:null,assetsLoaded:null,assetsTotal:null,bytesLoaded:null,bytesLoadedCache:null,bytesTotal:null,cachedAudioBuffers:null,cachedBytes:null,cachedFonts:null,cachedImages:null,cachedText:null,classTypes:null,loaded:null,pathGroups:null,paths:null,preload:null,promise:null,sizes:null,types:null,exists:function(a,b){b=null!=b?U.__cast(b,String):null;a=this.types.h[a];return null==
a||a!=b&&("SOUND"!=b&&"MUSIC"!=b||"MUSIC"!=a&&"SOUND"!=a)&&"BINARY"!=b&&null!=b&&("BINARY"!=a||"TEXT"!=b)?!1:!0},getAsset:function(a,b){switch(b){case "BINARY":return this.getBytes(a);case "FONT":return this.getFont(a);case "IMAGE":return this.getImage(a);case "MUSIC":case "SOUND":return this.getAudioBuffer(a);case "TEMPLATE":throw J.thrown("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw J.thrown("Unknown asset type: "+b);}},getAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,
a)?this.cachedAudioBuffers.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Pc.fromBytes(U.__cast(Ia.createInstance(this.classTypes.h[a],[]),ib)):Pc.fromFile(this.paths.h[a])},getBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return this.cachedBytes.h[a];if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a)){var b=ic.ofString(this.cachedText.h[a]);return this.cachedBytes.h[a]=b}return Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?U.__cast(Ia.createInstance(this.classTypes.h[a],
[]),ib):ic.fromFile(this.paths.h[a])},getFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?this.cachedFonts.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?U.__cast(Ia.createInstance(this.classTypes.h[a],[]),Id):Id.fromFile(this.paths.h[a])},getImage:function(a){return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?this.cachedImages.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?U.__cast(Ia.createInstance(this.classTypes.h[a],
[]),Fb):Fb.fromFile(this.paths.h[a])},getPath:function(a){return Object.prototype.hasOwnProperty.call(this.paths.h,a)?this.paths.h[a]:Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?this.pathGroups.h[a][0]:null},getText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return this.cachedText.h[a];a=this.getBytes(a);return null==a?null:a.getString(0,a.length)},isLocal:function(a,b){if(Object.prototype.hasOwnProperty.call(this.classTypes.h,a))return!0;b=U.__cast(b,String);
if(null==b)return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.cachedText.h,a)||Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)||Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);switch(b){case "FONT":return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);case "IMAGE":return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a);case "MUSIC":case "SOUND":return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,
a);default:return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedText.h,a)}},list:function(a){for(var b=null!=a?U.__cast(a,String):null,c=[],d=Object.keys(this.types.h),e=d.length,f=0;f<e;){var g=d[f++];(null==b||this.exists(g,a))&&c.push(g)}return c},loadAsset:function(a,b){switch(b){case "BINARY":return this.loadBytes(a);case "FONT":return this.loadFont(a);case "IMAGE":return this.loadImage(a);case "MUSIC":case "SOUND":return this.loadAudioBuffer(a);
case "TEMPLATE":throw J.thrown("Not sure how to load template: "+a);case "TEXT":return this.loadText(a);default:throw J.thrown("Unknown asset type: "+b);}},load:function(){if(this.loaded)return eb.withValue(this);if(null==this.promise){this.promise=new Yd;this.bytesLoadedCache=new ia;this.assetsLoaded=0;this.assetsTotal=1;for(var a=Object.keys(this.preload.h),b=a.length,c=0;c<b;){var d=a[c++];if(this.preload.h[d]){Q.verbose("Preloading asset: "+d+" ["+this.types.h[d]+"]",{fileName:"lime/utils/AssetLibrary.hx",
lineNumber:408,className:"lime.utils.AssetLibrary",methodName:"load"});var e=this.types.h[d];if(null!=e)switch(e){case "BINARY":this.assetsTotal++;e=this.loadBytes(d);e.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([d],[r(this,this.load_onProgress)]));e.onError(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.load_onError)]));e.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadBytes_onComplete)]));break;case "FONT":this.assetsTotal++;
e=this.loadFont(d);e.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([d],[r(this,this.load_onProgress)]));e.onError(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.load_onError)]));e.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadFont_onComplete)]));break;case "IMAGE":this.assetsTotal++;e=this.loadImage(d);e.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([d],[r(this,this.load_onProgress)]));e.onError(function(a,b){return function(c){b[0](a[0],
c)}}([d],[r(this,this.load_onError)]));e.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadImage_onComplete)]));break;case "MUSIC":case "SOUND":this.assetsTotal++;e=this.loadAudioBuffer(d);e.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([d],[r(this,this.load_onProgress)]));e.onError(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadAudioBuffer_onError)]));e.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadAudioBuffer_onComplete)]));
break;case "TEXT":this.assetsTotal++,e=this.loadText(d),e.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([d],[r(this,this.load_onProgress)])),e.onError(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.load_onError)])),e.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([d],[r(this,this.loadText_onComplete)]))}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,
a)?eb.withValue(this.cachedAudioBuffers.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?eb.withValue(Pc.fromBytes(U.__cast(Ia.createInstance(this.classTypes.h[a],[]),ib))):Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?Pc.loadFromFiles(this.pathGroups.h[a]):Pc.loadFromFile(this.paths.h[a])},loadBytes:function(a){return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?eb.withValue(this.cachedBytes.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?
eb.withValue(Ia.createInstance(this.classTypes.h[a],[])):ic.loadFromFile(this.paths.h[a])},loadFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?eb.withValue(this.cachedFonts.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?(a=Ia.createInstance(this.classTypes.h[a],[]),a.__loadFromName(a.name)):Id.loadFromName(this.paths.h[a])},loadImage:function(a){var b=this;return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?eb.withValue(this.cachedImages.h[a]):
Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?eb.withValue(Ia.createInstance(this.classTypes.h[a],[])):Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?Fb.loadFromBytes(this.cachedBytes.h[a]).then(function(c){var d=b.cachedBytes;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];b.cachedImages.h[a]=c;return eb.withValue(c)}):Fb.loadFromFile(this.paths.h[a])},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return eb.withValue(this.cachedText.h[a]);
if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.classTypes.h,a)){var b=this.getBytes(a);if(null==b)return eb.withValue(null);b=b.getString(0,b.length);this.cachedText.h[a]=b;return eb.withValue(b)}return(new Oj).load(this.paths.h[a])},unload:function(){},__assetLoaded:function(a){this.assetsLoaded++;null!=a&&Q.verbose("Loaded asset: "+a+" ["+this.types.h[a]+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/AssetLibrary.hx",
lineNumber:622,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"});if(null!=a){var b=Object.prototype.hasOwnProperty.call(this.sizes.h,a)?this.sizes.h[a]:0;if(Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)){var c=this.bytesLoadedCache.h[a];c<b&&(this.bytesLoaded+=b-c)}else this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b}this.assetsLoaded<this.assetsTotal?this.promise.progress(this.bytesLoaded,this.bytesTotal):(this.loaded=!0,this.promise.progress(this.bytesTotal,this.bytesTotal),
this.promise.complete(this))},__cacheBreak:function(a){return sa.__cacheBreak(a)},__fromBundle:function(a,b){if(null!=b){var c=0;for(b=b.assets;c<b.length;){var d=b[c];++c;var e=Object.prototype.hasOwnProperty.call(d,"id")?d.id:d.path;var f=a.data.h[d.path];if(Object.prototype.hasOwnProperty.call(d,"type")){var g=d.type;"TEXT"==g?this.cachedText.h[e]=null!=f?A.string(f):null:this.cachedBytes.h[e]=f;this.types.h[e]=d.type}else this.cachedBytes.h[e]=f,this.types.h[e]="BINARY"}}else for(c=0,b=a.paths;c<
b.length;)e=b[c],++c,this.cachedBytes.h[e]=a.data.h[e],this.types.h[e]="BINARY"},__fromManifest:function(a){var b=2<=a.version,c=a.rootPath;null==c&&(c="");""!=c&&(c+="/");for(var d=0,e=a.assets;d<e.length;){var f=e[d];++d;var g=b&&Object.prototype.hasOwnProperty.call(f,"size")?f.size:100;var h=Object.prototype.hasOwnProperty.call(f,"id")?f.id:f.path;if(Object.prototype.hasOwnProperty.call(f,"path")){var m=this.paths;var l=this.__cacheBreak(this.__resolvePath(c+A.string(X.field(f,"path"))));m.h[h]=
l}if(Object.prototype.hasOwnProperty.call(f,"pathGroup")){m=X.field(f,"pathGroup");l=0;for(var n=m.length;l<n;){var p=l++;m[p]=this.__cacheBreak(this.__resolvePath(c+m[p]))}this.pathGroups.h[h]=m}this.sizes.h[h]=g;this.types.h[h]=f.type;Object.prototype.hasOwnProperty.call(f,"preload")&&(this.preload.h[h]=X.field(f,"preload"));Object.prototype.hasOwnProperty.call(f,"className")&&(g=X.field(f,"className"),g=k[g],this.classTypes.h[h]=g)}d=this.bytesTotal=0;for(e=a.assets;d<e.length;)f=e[d],++d,h=Object.prototype.hasOwnProperty.call(f,
"id")?f.id:f.path,Object.prototype.hasOwnProperty.call(this.preload.h,h)&&this.preload.h[h]&&Object.prototype.hasOwnProperty.call(this.sizes.h,h)&&(this.bytesTotal+=this.sizes.h[h])},__resolvePath:function(a){a=R.replace(a,"\\","/");var b=a.indexOf(":");R.startsWith(a,"http")&&0<b?(b+=3,a=I.substr(a,0,b)+R.replace(I.substr(a,b,null),"//","/")):a=R.replace(a,"//","/");if(-1<a.indexOf("./")){a=a.split("/");b=[];for(var c=0,d=a.length;c<d;){var e=c++;".."==a[e]?0==e||".."==b[e-1]?b.push(".."):b.pop():
"."==a[e]?0==e&&b.push("."):b.push(a[e])}a=b.join("/")}return a},loadAudioBuffer_onComplete:function(a,b){this.cachedAudioBuffers.h[a]=b;if(Object.prototype.hasOwnProperty.call(this.pathGroups.h,a))for(var c=this.pathGroups.h[a],d=Object.keys(this.pathGroups.h),e=d.length,f=0;f<e;){var g=d[f++];if(g!=a)for(var h=0;h<c.length;){var m=c[h];++h;if(-1<this.pathGroups.h[g].indexOf(m)){this.cachedAudioBuffers.h[g]=b;break}}}this.__assetLoaded(a)},loadAudioBuffer_onError:function(a,b){null!=b&&""!=b?Q.warn('Could not load "'+
a+'": '+A.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:868,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Q.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:872,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,new Pc)},loadBytes_onComplete:function(a,b){this.cachedBytes.h[a]=b;this.__assetLoaded(a)},loadFont_onComplete:function(a,b){this.cachedFonts.h[a]=b;this.__assetLoaded(a)},
loadImage_onComplete:function(a,b){this.cachedImages.h[a]=b;this.__assetLoaded(a)},loadText_onComplete:function(a,b){this.cachedText.h[a]=b;this.__assetLoaded(a)},load_onError:function(a,b){null!=b&&""!=b?this.promise.error('Error loading asset "'+a+'": '+A.string(b)):this.promise.error('Error loading asset "'+a+'"')},load_onProgress:function(a,b,c){if(0<b){var d=this.sizes.h[a];0<c?(b/=c,1<b&&(b=1),b=Math.floor(b*d)):b>d&&(b=d);Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)?(d=this.bytesLoadedCache.h[a],
b!=d&&(this.bytesLoaded+=b-d)):this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b;this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:wb};var Jc=function(){this.assets=[];this.libraryArgs=[];this.version=2};k["lime.utils.AssetManifest"]=Jc;Jc.__name__="lime.utils.AssetManifest";Jc.fromBytes=function(a,b){return null!=a?Jc.parse(a.getString(0,a.length),b):null};Jc.fromFile=function(a,b){a=Jc.__resolvePath(a);b=Jc.__resolveRootPath(b,a);return null==a?null:Jc.fromBytes(ic.fromFile(a),
b)};Jc.loadFromBytes=function(a,b){return eb.withValue(Jc.fromBytes(a,b))};Jc.loadFromFile=function(a,b){a=Jc.__resolvePath(a);b=Jc.__resolveRootPath(b,a);return null==a?null:ic.loadFromFile(a).then(function(a){return eb.withValue(Jc.fromBytes(a,b))})};Jc.parse=function(a,b){if(null==a||""==a)return null;a=JSON.parse(a);var c=new Jc;Object.prototype.hasOwnProperty.call(a,"name")&&(c.name=a.name);Object.prototype.hasOwnProperty.call(a,"libraryType")&&(c.libraryType=a.libraryType);Object.prototype.hasOwnProperty.call(a,
"libraryArgs")&&(c.libraryArgs=a.libraryArgs);if(Object.prototype.hasOwnProperty.call(a,"assets")){var d=a.assets;Object.prototype.hasOwnProperty.call(a,"version")&&2>=a.version?c.assets=Fe.run(d):c.assets=d}Object.prototype.hasOwnProperty.call(a,"rootPath")&&(c.rootPath=a.rootPath);null!=b&&""!=b&&(c.rootPath=null==c.rootPath||""==c.rootPath?b:b+"/"+c.rootPath);return c};Jc.__resolvePath=function(a){if(null==a)return null;var b=a.indexOf("?");var c=-1<b?I.substr(a,0,b):a;for(c=R.replace(c,"\\","/");R.endsWith(c,
"/");)c=I.substr(c,0,c.length-1);return R.endsWith(c,".bundle")?-1<b?c+"/library.json"+I.substr(a,b,null):c+"/library.json":a};Jc.__resolveRootPath=function(a,b){if(null!=a)return a;a=b.indexOf("?");a=-1<a?I.substr(b,0,a):b;for(a=R.replace(a,"\\","/");R.endsWith(a,"/");){if("/"==a)return a;a=I.substr(a,0,a.length-1)}return R.endsWith(a,".bundle")?a:Ze.directory(a)};Jc.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,serialize:function(){var a={};a.version=
this.version;a.libraryType=this.libraryType;a.libraryArgs=this.libraryArgs;a.name=this.name;a.assets=ye.run(this.assets);a.rootPath=this.rootPath;return JSON.stringify(a)},__class__:Jc};var sa=function(){};k["lime.utils.Assets"]=sa;sa.__name__="lime.utils.Assets";sa.exists=function(a,b){null==b&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=sa.getLibrary(d);return null!=d?d.exists(a,b):!1};sa.getAsset=function(a,b,c){if(c&&sa.cache.enabled)switch(b){case "BINARY":case "TEXT":c=
!1;break;case "FONT":var d=sa.cache.font.h[a];if(null!=d)return d;break;case "IMAGE":d=sa.cache.image.h[a];if(sa.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=sa.cache.audio.h[a];if(sa.isValidAudio(d))return d;break;case "TEMPLATE":throw J.thrown("Not sure how to get template: "+a);default:return null}var e=a.indexOf(":");d=a.substring(0,e);e=a.substring(e+1);var f=sa.getLibrary(d);if(null!=f)if(f.exists(e,b)){if(f.isLocal(e,b))return d=f.getAsset(e,b),c&&sa.cache.enabled&&sa.cache.set(a,
b,d),d;a=b+' asset "'+a+'" exists, but only asynchronously';b={fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);}else{if(a="There is no "+b+' asset with an ID of "'+a+'"',b={fileName:"lime/utils/Assets.hx",lineNumber:138,className:"lime.utils.Assets",methodName:"getAsset"},xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);}else if(a=sa.__libraryNotFound(d),
b={fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"},xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b);return null};sa.getAudioBuffer=function(a,b){null==b&&(b=!0);return sa.getAsset(a,"SOUND",b)};sa.getBytes=function(a){return sa.getAsset(a,"BINARY",!1)};sa.getFont=function(a,b){null==b&&(b=!0);return sa.getAsset(a,"FONT",b)};sa.getImage=function(a,b){null==b&&(b=!0);return sa.getAsset(a,"IMAGE",b)};sa.getLibrary=
function(a){if(null==a||""==a)a="default";return sa.libraries.h[a]};sa.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=sa.getLibrary(c);if(null!=d){if(d.exists(b,null))return d.getPath(b);a='There is no asset with an ID of "'+a+'"';c={fileName:"lime/utils/Assets.hx",lineNumber:224,className:"lime.utils.Assets",methodName:"getPath"};if(xc.throwErrors)throw a="["+c.className+"] ERROR: "+A.string(a),J.thrown(a);}else if(a=sa.__libraryNotFound(c),c={fileName:"lime/utils/Assets.hx",
lineNumber:229,className:"lime.utils.Assets",methodName:"getPath"},xc.throwErrors)throw a="["+c.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,c);return null};sa.getText=function(a){return sa.getAsset(a,"TEXT",!1)};sa.hasLibrary=function(a){if(null==a||""==a)a="default";return Object.prototype.hasOwnProperty.call(sa.libraries.h,a)};sa.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&sa.cache.enabled&&sa.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=
sa.getLibrary(c);return null!=c?c.isLocal(a,b):!1};sa.isValidAudio=function(a){return null!=a};sa.isValidImage=function(a){return null!=a?null!=a.buffer:!1};sa.list=function(a){for(var b=[],c=sa.libraries.h,d=Object.keys(c),e=d.length,f=0;f<e;){var g=c[d[f++]].list(a);null!=g&&(b=b.concat(g))}return b};sa.loadAsset=function(a,b,c){if(c&&sa.cache.enabled)switch(b){case "BINARY":case "TEXT":c=!1;break;case "FONT":var d=sa.cache.font.h[a];if(null!=d)return eb.withValue(d);break;case "IMAGE":d=sa.cache.image.h[a];
if(sa.isValidImage(d))return eb.withValue(d);break;case "MUSIC":case "SOUND":d=sa.cache.audio.h[a];if(sa.isValidAudio(d))return eb.withValue(d);break;case "TEMPLATE":throw J.thrown("Not sure how to get template: "+a);default:return null}var e=a.indexOf(":");d=a.substring(0,e);e=a.substring(e+1);var f=sa.getLibrary(d);if(null!=f){if(f.exists(e,b)){d=f.loadAsset(e,b);if(c&&sa.cache.enabled)d.onComplete(function(c){sa.cache.set(a,b,c)});return d}return eb.withError("There is no "+b+' asset with an ID of "'+
a+'"')}return eb.withError(sa.__libraryNotFound(d))};sa.loadAudioBuffer=function(a,b){null==b&&(b=!0);return sa.loadAsset(a,"SOUND",b)};sa.loadBytes=function(a){return sa.loadAsset(a,"BINARY",!1)};sa.loadFont=function(a,b){null==b&&(b=!0);return sa.loadAsset(a,"FONT",b)};sa.loadImage=function(a,b){null==b&&(b=!0);return sa.loadAsset(a,"IMAGE",b)};sa.loadLibrary=function(a){var b=new Yd,c=sa.getLibrary(a);if(null!=c)return c.load();c=a;var d=null;if(Object.prototype.hasOwnProperty.call(sa.bundlePaths.h,
a))Tf.loadFromFile(sa.bundlePaths.h[a]).onComplete(function(c){null==c?b.error('Cannot load bundle for library "'+a+'"'):(c=wb.fromBundle(c),null==c?b.error('Cannot open library "'+a+'"'):(sa.libraries.h[a]=c,c.onChange.add((C=sa.onChange,r(C,C.dispatch))),b.completeWith(c.load())))}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')});else Object.prototype.hasOwnProperty.call(sa.libraryPaths.h,a)?(c=sa.libraryPaths.h[a],d=Ze.directory(c)):(R.endsWith(c,".bundle")?(d=
c,c+="/library.json"):d=Ze.directory(c),c=sa.__cacheBreak(c)),Jc.loadFromFile(c,d).onComplete(function(c){null==c?b.error('Cannot parse asset manifest for library "'+a+'"'):(c=wb.fromManifest(c),null==c?b.error('Cannot open library "'+a+'"'):(sa.libraries.h[a]=c,c.onChange.add((C=sa.onChange,r(C,C.dispatch))),b.completeWith(c.load())))}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')});return b.future};sa.loadText=function(a){return sa.loadAsset(a,"TEXT",!1)};sa.registerLibrary=
function(a,b){if(Object.prototype.hasOwnProperty.call(sa.libraries.h,a)){if(sa.libraries.h[a]==b)return;sa.unloadLibrary(a)}null!=b&&b.onChange.add(sa.library_onChange);sa.libraries.h[a]=b};sa.unloadLibrary=function(a){if(null==a||""==a)a="default";var b=sa.libraries.h[a];null!=b&&(sa.cache.clear(a+":"),b.onChange.remove(sa.library_onChange),b.unload());b=sa.libraries;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};sa.__cacheBreak=function(a){0<sa.cache.version&&(a=-1<a.indexOf("?")?a+
("&"+sa.cache.version):a+("?"+sa.cache.version));return a};sa.__libraryNotFound=function(a){if(null==a||""==a)a="default";return null==rd.current||null==rd.current.__preloader||rd.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};sa.library_onChange=function(){sa.cache.clear();sa.onChange.dispatch()};var wr=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);
this.library=sa.getLibrary(this.libraryName)};k["lime.utils._Assets.LibrarySymbol"]=wr;wr.__name__="lime.utils._Assets.LibrarySymbol";wr.prototype={library:null,libraryName:null,symbolName:null,isLocal:function(a){return this.library.isLocal(this.symbolName,a)},exists:function(a){return this.library.exists(this.symbolName,a)},__class__:wr};var ps={_new:function(a,b){null==b&&(b=0);return new Uf(a,b)},set:function(a,b,c,d,e){null!=d&&(b=ib.ofData(d));null!=b||null==c?(a.bytes=b,a.offset=null!=e?e:
0):(a.bytes=ib.ofData(c.buffer),a.offset=null!=e?c.byteOffset+e:c.byteOffset)},__arrayGet:function(a,b){return null!=a.bytes?a.bytes.b[b+a.offset]:0},__arraySet:function(a,b,c){null==a.bytes&&(a.bytes.b[b+a.offset]=c&255);return c},fromArrayBufferView:function(a){return null==a?null:new Uf(ib.ofData(a.buffer),a.byteOffset)},fromArrayBuffer:function(a){return null==a?null:new Uf(ib.ofData(a),0)},fromBytes:function(a){return new Uf(a,0)},fromBytesData:function(a){return null==a?new Uf(null,0):new Uf(ib.ofData(a),
0)},fromFile:function(a){return new Uf(ic.fromFile(a),0)},fromLimeBytes:function(a){return new Uf(a,0)},toUInt8Array:function(a){var b=a.bytes.b.bufferValue;a=a.offset/8|0;null==a&&(a=0);return null!=b?new Uint8Array(b,a):null},toUInt8ClampedArray:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;null==a&&(a=0);return null!=b?new Uint8ClampedArray(b,a):null},toInt8Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/
8|0;null==a&&(a=0);return null!=b?new Int8Array(b,a):null},toUInt16Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;null==a&&(a=0);return null!=b?new Uint16Array(b,a):null},toInt16Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;null==a&&(a=0);return null!=b?new Int16Array(b,a):null},toUInt32Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==
a&&(a=0);return null!=b?new Uint32Array(b,a):null},toInt32Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==a&&(a=0);return null!=b?new Int32Array(b,a):null},toFloat32Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==a&&(a=0);return null!=b?new Float32Array(b,a):null},toFloat64Array:function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/64|0;null==a&&(a=
0);return null!=b?new Float64Array(b,a):null}},Uf=function(a,b){this.bytes=a;this.offset=b};k["lime.utils.BytePointerData"]=Uf;Uf.__name__="lime.utils.BytePointerData";Uf.prototype={bytes:null,offset:null,__class__:Uf};var ic={_new:function(a,b){return new ib(b)},alloc:function(a){return new ib(new ArrayBuffer(a))},compress:function(a,b){switch(b._hx_index){case 0:return gm.compress(a);case 1:return hm.compress(a);case 2:return jm.compress(a);case 3:return km.compress(a)}},decompress:function(a,b){switch(b._hx_index){case 0:return gm.decompress(a);
case 1:return hm.decompress(a);case 2:return jm.decompress(a);case 3:return km.decompress(a)}},fastGet:function(a,b){return a.bytes[b]},fromBytes:function(a){return null==a?null:ic._new(a.length,a.b.bufferValue)},fromFile:function(a){return null},loadFromBytes:function(a){return eb.withValue(ic.fromBytes(a))},loadFromFile:function(a){return(new um).load(a)},ofData:function(a){a=ib.ofData(a);return ic._new(a.length,a.b.bufferValue)},ofString:function(a){a=ib.ofString(a);return ic._new(a.length,a.b.bufferValue)}},
Zd=x["lime.utils.CompressionAlgorithm"]={__ename__:"lime.utils.CompressionAlgorithm",__constructs__:null,DEFLATE:{_hx_name:"DEFLATE",_hx_index:0,__enum__:"lime.utils.CompressionAlgorithm",toString:v},GZIP:{_hx_name:"GZIP",_hx_index:1,__enum__:"lime.utils.CompressionAlgorithm",toString:v},LZMA:{_hx_name:"LZMA",_hx_index:2,__enum__:"lime.utils.CompressionAlgorithm",toString:v},ZLIB:{_hx_name:"ZLIB",_hx_index:3,__enum__:"lime.utils.CompressionAlgorithm",toString:v}};Zd.__constructs__=[Zd.DEFLATE,Zd.GZIP,
Zd.LZMA,Zd.ZLIB];var kf={_new:function(a){return a},fromFloat:function(a){return a},fromBytesPointer:function(a){return kf.fromFloat(0)},fromArrayBufferView:function(a){return kf.fromFloat(0)},fromArrayBuffer:function(a){return kf.fromFloat(0)},fromBytes:function(a){return kf.fromFloat(0)},fromBytesData:function(a){return kf.fromFloat(0)},fromLimeBytes:function(a){return kf.fromBytes(a)},fromCFFIPointer:function(a){return kf.fromFloat(0)},fromFile:function(a){return kf.fromFloat(0)},__withOffset:function(a,
b){return kf.fromFloat(0)},equals:function(a,b){return a==b},equalsPointer:function(a,b){return a==b},greaterThan:function(a,b){return a>b},greaterThanPointer:function(a,b){return Jd.get(a)>Jd.get(b)},greaterThanOrEqual:function(a,b){return a>=b},greaterThanOrEqualPointer:function(a,b){return Jd.get(a)>=Jd.get(b)},lessThan:function(a,b){return a<b},lessThanPointer:function(a,b){return Jd.get(a)<Jd.get(b)},lessThanOrEqual:function(a,b){return a<=b},lessThanOrEqualPointer:function(a,b){return Jd.get(a)<=
Jd.get(b)},notEquals:function(a,b){return a!=b},notEqualsPointer:function(a,b){return a!=b},plus:function(a,b){return kf.__withOffset(a,b)},plusPointer:function(a,b){return kf.__withOffset(a,b|0)},minus:function(a,b){return kf.__withOffset(a,-b)},minusPointer:function(a,b){return kf.__withOffset(a,-(b|0))}},Rg={toArrayBufferView:function(a){return a},fromBytes:function(a,b,c){null==b&&(b=0);return null==b?new Float32Array(a.b.bufferValue):null==c?new Float32Array(a.b.bufferValue,b):new Float32Array(a.b.bufferValue,
b,c)},toBytes:function(a){return new ib(new Uint8Array(a.buffer))},toString:function(a){return null!=a?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null}},xc=function(){};k["lime.utils.Log"]=xc;xc.__name__="lime.utils.Log";xc.__properties__={set_level:"set_level",get_level:"get_level"};xc.get_level=function(){return Q.level};xc.set_level=function(a){return Q.level=a};xc.debug=function(a,b){Q.debug(a,b)};xc.error=function(a,b){if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+
A.string(a),J.thrown(a);Q.error(a,b)};xc.info=function(a,b){Q.info(a,b)};xc.print=function(a,b){Q.info(a,b)};xc.println=function(a,b){Q.info(a,b)};xc.verbose=function(a,b){Q.verbose(a,b)};xc.warn=function(a,b){Q.warn(a,b)};var kg=function(a,b){this.positions=new ia;this.lengths=new ia;wb.call(this);this.id=a;this.type=b};k["lime.utils.PackedAssetLibrary"]=kg;kg.__name__="lime.utils.PackedAssetLibrary";kg.fromBytes=function(a,b){return kg.fromManifest(Jc.fromBytes(a,b))};kg.fromFile=function(a,b){return kg.fromManifest(Jc.fromFile(a,
b))};kg.fromManifest=function(a){return wb.fromManifest(a)};kg.loadFromBytes=function(a,b){return wb.loadFromBytes(a,b).then(function(a){return eb.withValue(a)})};kg.loadFromFile=function(a,b){return wb.loadFromFile(a,b).then(function(a){return eb.withValue(a)})};kg.loadFromManifest=function(a){return wb.loadFromManifest(a).then(function(a){return eb.withValue(a)})};kg.__super__=wb;kg.prototype=u(wb.prototype,{id:null,lengths:null,packedData:null,positions:null,type:null,rootPath:null,getAudioBuffer:function(a){return wb.prototype.getAudioBuffer.call(this,
a)},getBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return this.cachedBytes.h[a];if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a)){var b=ic.ofString(this.cachedText.h[a]);this.cachedBytes.h[a]=b}else if(b=ic.alloc(this.lengths.h[a]),b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]),"gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return b},getFont:function(a){return wb.prototype.getFont.call(this,
a)},getImage:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedImages.h,a))return this.cachedImages.h[a];var b=ic.alloc(this.lengths.h[a]);b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]);if("gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return Fb.fromBytes(b)},getText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return this.cachedText.h[a];if("gzip"==this.type||"zip"==
this.type||"deflate"==this.type){var b=ic.alloc(this.lengths.h[a]);b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]);if("gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return b.getString(0,b.length)}return this.packedData.getString(this.positions.h[a],this.lengths.h[a])},isLocal:function(a,b){return!0},load:function(){var a=this;if(this.loaded)return eb.withValue(this);if(null==this.promise){this.promise=new Yd;
this.bytesLoadedCache=new ia;this.assetsLoaded=0;this.assetsTotal=2;for(var b=Object.keys(this.preload.h),c=b.length,d=0;d<c;){var e=b[d++];if(this.preload.h[e]){var f=this.types.h[e];if(null!=f)switch(f){case "BINARY":case "FONT":case "IMAGE":case "TEXT":this.assetsTotal++;break;case "MUSIC":case "SOUND":Q.verbose("Preloading asset: "+e+" ["+this.types.h[e]+"]",{fileName:"lime/utils/PackedAssetLibrary.hx",lineNumber:189,className:"lime.utils.PackedAssetLibrary",methodName:"load"});this.assetsTotal++;
var g=this.loadAudioBuffer(e);g.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([e],[r(this,this.load_onProgress)]));g.onError(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(this,this.loadAudioBuffer_onError)]));g.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(this,this.loadAudioBuffer_onComplete)]))}}}b=function(b){a.cachedBytes.h[a.id]=b;a.packedData=b;a.__assetLoaded(a.id);b=Object.keys(a.preload.h);for(var c=b.length,d=0;d<c;){var e=b[d++];if(a.preload.h[e]){var f=
a.types.h[e];if(null!=f)switch(f){case "BINARY":Q.verbose("Preloading asset: "+e+" ["+a.types.h[e]+"]",{fileName:"lime/utils/PackedAssetLibrary.hx",lineNumber:215,className:"lime.utils.PackedAssetLibrary",methodName:"load"});f=a.loadBytes(e);f.onError(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.load_onError)]));f.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.loadBytes_onComplete)]));break;case "FONT":Q.verbose("Preloading asset: "+e+" ["+a.types.h[e]+"]",{fileName:"lime/utils/PackedAssetLibrary.hx",
lineNumber:222,className:"lime.utils.PackedAssetLibrary",methodName:"load"});f=a.loadFont(e);f.onError(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.load_onError)]));f.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.loadFont_onComplete)]));break;case "IMAGE":Q.verbose("Preloading asset: "+e+" ["+a.types.h[e]+"]",{fileName:"lime/utils/PackedAssetLibrary.hx",lineNumber:229,className:"lime.utils.PackedAssetLibrary",methodName:"load"});f=a.loadImage(e);f.onError(function(a,
b){return function(c){b[0](a[0],c)}}([e],[r(a,a.load_onError)]));f.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.loadImage_onComplete)]));break;case "TEXT":Q.verbose("Preloading asset: "+e+" ["+a.types.h[e]+"]",{fileName:"lime/utils/PackedAssetLibrary.hx",lineNumber:236,className:"lime.utils.PackedAssetLibrary",methodName:"load"}),f=a.loadText(e),f.onError(function(a,b){return function(c){b[0](a[0],c)}}([e],[r(a,a.load_onError)])),f.onComplete(function(a,b){return function(c){b[0](a[0],
c)}}([e],[r(a,a.loadText_onComplete)]))}}}};this.__assetLoaded(null);Object.prototype.hasOwnProperty.call(this.cachedBytes.h,this.id)?b(this.cachedBytes.h[this.id]):(c=null==this.rootPath||""==this.rootPath?"":Ze.addTrailingSlash(this.rootPath),d=Object.prototype.hasOwnProperty.call(this.paths.h,this.id)?this.paths.h[this.id]:this.id,c=Ze.join([c,d]),c=this.__cacheBreak(c),f=r(this,this.load_onProgress),e=this.id,ic.loadFromFile(c).onProgress(function(a,b){f(e,a,b)}).onError((C=this.promise,r(C,C.error))).onComplete(b))}return this.promise.future},
loadAudioBuffer:function(a){return wb.prototype.loadAudioBuffer.call(this,a)},loadBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return eb.withValue(this.cachedBytes.h[a]);var b=ic.alloc(this.lengths.h[a]);b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]);if("gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return eb.withValue(b)},loadFont:function(a){return wb.prototype.loadFont.call(this,
a)},loadImage:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedImages.h,a))return eb.withValue(this.cachedImages.h[a]);var b=ic.alloc(this.lengths.h[a]);b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]);if("gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return Fb.loadFromBytes(b)},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return eb.withValue(this.cachedText.h[a]);
if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)){var b=this.getBytes(a);if(null==b)return eb.withValue(null);b=b.getString(0,b.length);this.cachedText.h[a]=b;return eb.withValue(b)}if("gzip"==this.type||"deflate"==this.type){b=ic.alloc(this.lengths.h[a]);b.blit(0,this.packedData,this.positions.h[a],this.lengths.h[a]);if("gzip"==this.type)b=ic.decompress(b,Zd.GZIP);else if("zip"==this.type||"deflate"==this.type)b=ic.decompress(b,Zd.DEFLATE);return eb.withValue(b.getString(0,b.length))}return eb.withValue(this.packedData.getString(this.positions.h[a],
this.lengths.h[a]))},unload:function(){},__fromManifest:function(a){this.rootPath=a.rootPath;wb.prototype.__fromManifest.call(this,a);var b=0,c=this.bytesTotal=0;for(a=a.assets;c<a.length;){var d=a[c];++c;var e=d.id;Object.prototype.hasOwnProperty.call(d,"position")&&(this.positions.h[e]=X.field(d,"position"));Object.prototype.hasOwnProperty.call(d,"length")&&(d=X.field(d,"length"),this.lengths.h[e]=d,this.sizes.h[e]=Math.floor(d/10),b+=d);Object.prototype.hasOwnProperty.call(this.preload.h,e)&&this.preload.h[e]&&
Object.prototype.hasOwnProperty.call(this.sizes.h,e)&&(this.bytesTotal+=this.sizes.h[e])}this.sizes.h[this.id]=b;this.bytesTotal+=b},__assetLoaded:function(a){this.assetsLoaded++;null!=a&&Q.verbose("Loaded asset: "+a+" ["+this.types.h[a]+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/PackedAssetLibrary.hx",lineNumber:457,className:"lime.utils.PackedAssetLibrary",methodName:"__assetLoaded"});if(null!=a){var b=Object.prototype.hasOwnProperty.call(this.sizes.h,a)?this.sizes.h[a]:
0;if(Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)){var c=this.bytesLoadedCache.h[a];c<b&&(this.bytesLoaded+=b-c)}else this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b}this.assetsLoaded<this.assetsTotal?this.promise.progress(this.bytesLoaded,this.bytesTotal):(this.loaded=!0,this.promise.progress(this.bytesTotal,this.bytesTotal),this.promise.complete(this))},__class__:kg});var vo=function(){this.bytesTotalCache=new ia;this.bytesLoadedCache2=new ia;this.bytesLoadedCache=new Vb;this.onProgress=
new lm;this.onComplete=new Bd;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(r(this,this.update))};k["lime.utils.Preloader"]=vo;vo.__name__="lime.utils.Preloader";vo.prototype={complete:null,onComplete:null,onProgress:null,bytesLoaded:null,bytesLoadedCache:null,bytesLoadedCache2:null,bytesTotal:null,bytesTotalCache:null,initLibraryNames:null,libraries:null,libraryNames:null,loadedLibraries:null,loadedStage:null,preloadComplete:null,preloadStarted:null,
simulateProgress:null,addLibrary:function(a){this.libraries.push(a)},addLibraryName:function(a){-1==this.libraryNames.indexOf(a)&&this.libraryNames.push(a)},load:function(){for(var a=this,b=0,c=this.libraries;b<c.length;){var d=c[b];++b;this.bytesTotal+=d.bytesTotal}this.loadedLibraries=-1;this.preloadStarted=!1;b=0;for(c=this.libraries;b<c.length;)d=[c[b]],++b,Q.verbose("Preloading asset library",{fileName:"lime/utils/Preloader.hx",lineNumber:134,className:"lime.utils.Preloader",methodName:"load"}),
d[0].load().onProgress(function(b){return function(c,d){a.bytesLoaded=null==a.bytesLoadedCache.h.__keys__[b[0].__id__]?a.bytesLoaded+c:a.bytesLoaded+(c-a.bytesLoadedCache.h[b[0].__id__]);a.bytesLoadedCache.set(b[0],c);a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal)}}(d)).onComplete(function(b){return function(c){a.bytesLoaded=null==a.bytesLoadedCache.h.__keys__[b[0].__id__]?a.bytesLoaded+b[0].bytesTotal:a.bytesLoaded+((b[0].bytesTotal|0)-a.bytesLoadedCache.h[b[0].__id__]);a.loadedAssetLibrary()}}(d)).onError(function(){return function(a){var b=
{fileName:"lime/utils/Preloader.hx",lineNumber:170,className:"lime.utils.Preloader",methodName:"load"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}}());b=0;for(c=this.libraryNames;b<c.length;)++b,this.bytesTotal+=200;this.loadedLibraries++;this.preloadStarted=!0;this.updateProgress()},loadedAssetLibrary:function(a){this.loadedLibraries++;var b=this.loadedLibraries;this.preloadStarted||++b;var c=this.libraries.length+this.libraryNames.length;null!=a?Q.verbose("Loaded asset library: "+
a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:197,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Q.verbose("Loaded asset library ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:201,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"});this.updateProgress()},start:function(){this.complete||this.simulateProgress||!this.preloadComplete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){},updateProgress:function(){var a=
this;this.simulateProgress||this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);if(this.loadedLibraries==this.libraries.length&&!this.initLibraryNames){this.initLibraryNames=!0;for(var b=0,c=this.libraryNames;b<c.length;){var d=[c[b]];++b;Q.verbose("Preloading asset library: "+d[0],{fileName:"lime/utils/Preloader.hx",lineNumber:239,className:"lime.utils.Preloader",methodName:"updateProgress"});sa.loadLibrary(d[0]).onProgress(function(b){return function(c,d){0<d&&(Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,
b[0])||(a.bytesTotalCache.h[b[0]]=d,a.bytesTotal+=d-200),c>d&&(c=d),Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,b[0])?a.bytesLoaded+=c-a.bytesLoadedCache2.h[b[0]]:a.bytesLoaded+=c,a.bytesLoadedCache2.h[b[0]]=c,a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal))}}(d)).onComplete(function(b){return function(c){c=200;Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,b[0])&&(c=a.bytesTotalCache.h[b[0]]);Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,
b[0])?a.bytesLoaded+=c-a.bytesLoadedCache2.h[b[0]]:a.bytesLoaded+=c;a.loadedAssetLibrary(b[0])}}(d)).onError(function(){return function(a){var b={fileName:"lime/utils/Preloader.hx",lineNumber:293,className:"lime.utils.Preloader",methodName:"updateProgress"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b)}}())}}this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Q.verbose("Preload complete",
{fileName:"lime/utils/Preloader.hx",lineNumber:306,className:"lime.utils.Preloader",methodName:"updateProgress"})),this.start())},__class__:vo};var ui=function(a,b,c){this.name=a;this.type=b;this.address=c};k["mbs.core.MbsField"]=ui;ui.__name__="mbs.core.MbsField";ui.prototype={name:null,type:null,address:null,getName:function(){return this.name},getType:function(){return this.type},getAddress:function(){return this.address},__class__:ui};var xm=function(a,b,c){ui.call(this,a,null,c);this.typeName=
b};k["mbs.core.reflect.SubstituteField"]=xm;xm.__name__="mbs.core.reflect.SubstituteField";xm.__super__=ui;xm.prototype=u(ui.prototype,{typeName:null,toString:function(){return"MbsField [name="+this.getName()+", typeName="+this.typeName+", address="+this.address+"]"},__class__:xm});var Ii=function(a,b,c,d){yb.call(this,a);this.parentName=b;this.fields=c.slice(0);this.size=d};k["mbs.core.reflect.SubstituteType"]=Ii;Ii.__name__="mbs.core.reflect.SubstituteType";Ii.__super__=yb;Ii.prototype=u(yb.prototype,
{parentName:null,mapTypes:function(a){this.parent=a.h[this.parentName];if(null!=this.fields)for(var b=0,c=this.fields.length;b<c;){var d=b++;d=this.fields[d];d.type=a.h[d.typeName]}},__class__:Ii});var be=function(){};k["mbs.io.MbsDynamicHelper"]=be;be.__name__="mbs.io.MbsDynamicHelper";be.writeDynamic=function(a,b,c){null==c&&a.writeTypecode(b,K.NULL);"boolean"==typeof c?(a.writeTypecode(b,K.BOOLEAN),a.writeBool(b+K.INTEGER.getSize(),c)):"number"==typeof c?(a.writeTypecode(b,K.FLOAT),a.writeFloat(b+
K.INTEGER.getSize(),c)):"number"==typeof c&&(c|0)===c?(a.writeTypecode(b,K.INTEGER),a.writeInt(b+K.INTEGER.getSize(),c)):"string"==typeof c?(a.writeTypecode(b,K.STRING),a.writeString(b+K.INTEGER.getSize(),c)):(a.writeTypecode(b,c.getMbsType()),a.writeInt(b+K.INTEGER.getSize(),c.getAddress()))};be.readDynamic=function(a,b){var c=a.readTypecode(b);if(c==K.NULL)return null;if(c==K.BOOLEAN)return a.readBool(b+K.INTEGER.getSize());if(c==K.FLOAT)return a.readFloat(b+K.INTEGER.getSize());if(c==K.INTEGER)return a.readInt(b+
K.INTEGER.getSize());if(c==K.STRING)return a.readString(b+K.INTEGER.getSize());if(c==K.LIST)return b=a.readInt(b+K.INTEGER.getSize()),0!=b?(c=a.readTypecode(b+K.INTEGER.getSize()),a=c==K.BOOLEAN?new Pj(a):c==K.FLOAT?new Qj(a):c==K.INTEGER?new Mf(a):c==K.STRING?new Rj(a):c==K.DYNAMIC?new nh(a):new bb(a,c,c.createInstance(a)),a.setAddress(b),a):null;c=c.createInstance(a);c.setAddress(a.readInt(b+K.INTEGER.getSize()));return c};be.createObjectPool=function(a){return new Vb};be.readDynamicUsingPool=function(a,
b,c){var d=a.readTypecode(b);if(d==K.NULL)return null;if(d==K.BOOLEAN)return a.readBool(b+K.INTEGER.getSize());if(d==K.FLOAT)return a.readFloat(b+K.INTEGER.getSize());if(d==K.INTEGER)return a.readInt(b+K.INTEGER.getSize());if(d==K.STRING)return a.readString(b+K.INTEGER.getSize());if(d==K.LIST)return b=a.readInt(b+K.INTEGER.getSize()),0!=b?(d=a.readTypecode(b+K.INTEGER.getSize()),a=d==K.BOOLEAN?new Pj(a):d==K.FLOAT?new Qj(a):d==K.INTEGER?new Mf(a):d==K.STRING?new Rj(a):d==K.DYNAMIC?new nh(a):new bb(a,
d,d.createInstance(a)),a.setAddress(b),a):null;var e=c.h[d.__id__];null==e&&(e=d.createInstance(a),c.set(d,e));e.setAddress(a.readInt(b+K.INTEGER.getSize()));return e};var ym=function(){};k["mbs.io.MbsIO"]=ym;ym.__name__="mbs.io.MbsIO";ym.__isInterface__=!0;ym.prototype={readBool:null,readFloat:null,readInt:null,readString:null,writeInt:null,writeBool:null,writeFloat:null,writeString:null,isReader:null,isWriter:null,allocate:null,writeTypecode:null,readTypecode:null,__class__:ym};var Ur=function(){};
k["mbs.io.MbsInternalVersion"]=Ur;Ur.__name__="mbs.io.MbsInternalVersion";var ie=function(a,b){this.data=a;null!=b&&(this.type=b,this.elementSize=b.getSize())};k["mbs.io.MbsListBase"]=ie;ie.__name__="mbs.io.MbsListBase";ie.__super__=fb;ie.prototype=u(fb.prototype,{type:null,elementAddress:null,elementSize:null,_length:null,setAddress:function(a){fb.prototype.setAddress.call(this,a);this.data.isReader()&&(0!=a?(this._length=this.data.readInt(a),this.type=this.data.readTypecode(a+K.INTEGER.getSize()),
this.elementSize=this.type.getSize(),this.elementAddress=a+2*K.INTEGER.getSize()):(this.type=null,this.elementAddress=this.elementSize=this._length=0))},allocateNew:function(a){if(this.data.isWriter())return this._length=a,this.address=this.data.allocate(2*K.INTEGER.getSize()+this.elementSize*a),this.data.writeInt(this.address,a),this.data.writeTypecode(this.address+K.INTEGER.getSize(),this.type),this.elementAddress=this.address+2*K.INTEGER.getSize(),this.address;throw J.thrown("Can't allocate new objects when reading");
},length:function(){return this._length},getMbsType:function(){return K.LIST},__class__:ie});var bb=function(a,b,c){ie.call(this,a,b);this.obj=c};k["mbs.io.MbsList"]=bb;bb.__name__="mbs.io.MbsList";bb.__super__=ie;bb.prototype=u(ie.prototype,{obj:null,getNextObject:function(){this.obj.setAddress(this.elementAddress);this.elementAddress+=this.elementSize;return this.obj},__class__:bb});var Pj=function(a){ie.call(this,a,K.BOOLEAN)};k["mbs.io.MbsBoolList"]=Pj;Pj.__name__="mbs.io.MbsBoolList";Pj.__super__=
ie;Pj.prototype=u(ie.prototype,{readBool:function(){var a=this.data.readBool(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeBool:function(a){this.data.writeBool(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:Pj});var Qj=function(a){ie.call(this,a,K.FLOAT)};k["mbs.io.MbsFloatList"]=Qj;Qj.__name__="mbs.io.MbsFloatList";Qj.__super__=ie;Qj.prototype=u(ie.prototype,{readFloat:function(){var a=this.data.readFloat(this.elementAddress);this.elementAddress+=
this.elementSize;return a},writeFloat:function(a){this.data.writeFloat(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:Qj});var Mf=function(a){ie.call(this,a,K.INTEGER)};k["mbs.io.MbsIntList"]=Mf;Mf.__name__="mbs.io.MbsIntList";Mf.__super__=ie;Mf.prototype=u(ie.prototype,{readInt:function(){var a=this.data.readInt(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeInt:function(a){this.data.writeInt(this.elementAddress,a);this.elementAddress+=this.elementSize},
__class__:Mf});var Rj=function(a){ie.call(this,a,K.STRING)};k["mbs.io.MbsStringList"]=Rj;Rj.__name__="mbs.io.MbsStringList";Rj.__super__=ie;Rj.prototype=u(ie.prototype,{readString:function(){var a=this.data.readString(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeString:function(a){this.data.writeString(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:Rj});var nh=function(a){ie.call(this,a,K.DYNAMIC)};k["mbs.io.MbsDynamicList"]=nh;nh.__name__="mbs.io.MbsDynamicList";
nh.__super__=ie;nh.prototype=u(ie.prototype,{readObject:function(){var a=be.readDynamic(this.data,this.elementAddress);this.elementAddress+=this.elementSize;return a},readObjectUsingPool:function(a){a=be.readDynamicUsingPool(this.data,this.elementAddress,a);this.elementAddress+=this.elementSize;return a},writeObject:function(a){be.writeDynamic(this.data,this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:nh});var Lg=function(a,b,c){this.typedefSet=a;this.readStoredTypeInformation=
b;this.initStringList=c;this.header=new uc(this);this.header.setAddress(0)};k["mbs.io.MbsReader"]=Lg;Lg.__name__="mbs.io.MbsReader";Lg.__interfaces__=[ym];Lg.prototype={data:null,stringTable:null,typeTable:null,rootAddress:null,subTypeMap:null,initStringList:null,stringTableAddress:null,readStoredTypeInformation:null,typedefSet:null,header:null,canRead:function(a){var b=null;if(null==a||a.length<this.header.getMbsType().getSize())b="Missing header";this.data=a;2!=this.header.getVersion()&&(b="Mismatched version -- "+
this.header.getVersion());this.header.getTypeTableHash()!=this.typedefSet.getHash()&&(b="Mismatched typetable");this.readStoredTypeInformation&&0==this.header.getTypeTablePointer()&&(b="Missing required type information");this.data=null;return b},readData:function(a){this.data=a;if(2!=this.header.getVersion())throw J.thrown("Can't read mbs. Wrong version.");if(this.header.getTypeTableHash()!=this.typedefSet.getHash())throw J.thrown("Can't read mbs. Wrong typedef info.");var b=K.INTEGER.getSize();
this.stringTableAddress=this.header.getStringTablePointer();var c=Array(this.readInt(this.stringTableAddress));this.stringTable=c;if(this.initStringList){var d=this.stringTableAddress+b;for(var e=0,f=this.stringTable.length;e<f;){var g=e++,h=this.readInt(d),m=this.readInt(h);this.stringTable[g]=a.getString(h+4,m);d+=b}}if(this.readStoredTypeInformation){a=new Nc(this);d=this.header.getTypeTablePointer();this.typeTable=c=Array(this.readInt(d));d+=b;this.subTypeMap=new ia;h=Object.create(null);g=K.BOOLEAN;
h[g.getName()]=g;g=K.INTEGER;h[g.getName()]=g;g=K.FLOAT;h[g.getName()]=g;g=K.STRING;h[g.getName()]=g;g=K.DYNAMIC;h[g.getName()]=g;g=K.LIST;h[g.getName()]=g;e=0;for(f=this.typeTable.length;e<f;){g=e++;a.setAddress(this.readInt(d));d+=b;m=a.getName();var l=a.getParent(),n=a.getSize();c=null;var p=a.getFieldsPointer();if(0!=p){var k=this.readInt(p);p+=b;c=Array(k);for(var q=new $c(this),t=0;t<k;){var v=t++;q.setAddress(p);p+=$c.MBS_FIELD_INFO.getSize();var r=q.getName(),u=q.getType(),x=q.getFieldAddress();
c[v]=new xm(r,u,x)}}Object.prototype.hasOwnProperty.call(h,m)?this.typeTable[g]=h[m]:this.typeTable[g]=new Ii(m,l,c,n);this.subTypeMap.h[m]=this.typeTable[g]}e=0;for(f=this.typeTable.length;e<f;)g=e++,this.typeTable[g]instanceof Ii&&U.__cast(this.typeTable[g],Ii).mapTypes(this.subTypeMap)}else for(this.typeTable=c=Array(this.typedefSet.getTypes().length),e=0,f=this.typedefSet.getTypes();e<f.length;)g=f[e],++e,this.typeTable[this.typedefSet.getTypecode(g)]=g},reconfigureComposition:function(a){var b=
this.subTypeMap,c=a.getName();if(Object.prototype.hasOwnProperty.call(b.h,c)){b=this.subTypeMap;c=a.getName();var d=b.h[c];b=Object.create(null);c=0;for(d=d.getFields();c<d.length;){var e=d[c];++c;b[e.getName()]=e}c=0;for(d=a.getFields();c<d.length;)e=d[c],++c,e.address=b[e.getName()].address}},getRoot:function(){return this.header.getRoot()},readInt:function(a){return this.data.b[a]<<24|this.data.b[a+1]<<16|this.data.b[a+2]<<8|this.data.b[a+3]},readBool:function(a){return 0!=this.data.b[a]},readFloat:function(a){return Xd.i32ToFloat(this.readInt(a))},
readString:function(a){if(this.initStringList)return this.stringTable[this.readInt(a)];a=this.readInt(a);if(null==this.stringTable[a]){var b=this.readInt(this.stringTableAddress+K.INTEGER.getSize()*(a+1)),c=this.readInt(b);this.stringTable[a]=this.data.getString(b+4,c)}return this.stringTable[a]},readTypecode:function(a){return this.typeTable[this.readInt(a)]},getTypeTable:function(){return this.typeTable},writeInt:function(a,b){throw J.thrown("Can't write on an MBS reader");},writeBool:function(a,
b){throw J.thrown("Can't write on an MBS reader");},writeFloat:function(a,b){throw J.thrown("Can't write on an MBS reader");},writeString:function(a,b){throw J.thrown("Can't write on an MBS reader");},isReader:function(){return!0},isWriter:function(){return!1},allocate:function(a){throw J.thrown("Can't allocate on an MBS reader");},writeTypecode:function(a,b){throw J.thrown("Can't write on an MBS reader");},__class__:Lg};var Da=function(){};k["openfl.Lib"]=Da;Da.__name__="openfl.Lib";Da.__properties__=
{get_current:"get_current",get_application:"get_application"};Da.as=function(a,b){return U.__instanceof(a,b)?a:null};Da.attach=function(a){return new uh};Da.clearInterval=function(a){Da.__timers.h.hasOwnProperty(a)&&(Da.__timers.h[a].stop(),Da.__timers.remove(a))};Da.clearTimeout=function(a){Da.__timers.h.hasOwnProperty(a)&&(Da.__timers.h[a].stop(),Da.__timers.remove(a))};Da.getDefinitionByName=function(a){return null==a?null:k[a]};Da.getQualifiedClassName=function(a){if(null==a)return null;var b=
U.__instanceof(a,cr)?a:U.getClass(a);return null==b?"boolean"==typeof a||a==Mr?"Bool":"number"==typeof a&&(a|0)===a||a==qi?"Int":"number"==typeof a||a==Lr?"Float":null:b.__name__};Da.getQualifiedSuperclassName=function(a){if(null==a)return null;a=U.__instanceof(a,cr)?a:U.getClass(a);if(null==a)return null;a=a.__super__;return null==a?null:a.__name__};Da.getTimer=function(){return Qa.getTimer()};Da.getURL=function(a,b){Da.navigateToURL(a,b)};Da.navigateToURL=function(a,b){null==b&&(b="_blank");var c=
a.url;if(Ia.typeof(a.data)==Ca.TObject){for(var d="",e=X.fields(a.data),f=0;f<e.length;){var g=e[f];++f;0<d.length&&(d+="&");var h=encodeURIComponent(g)+"=";g=A.string(X.field(a.data,g));d+=h+encodeURIComponent(g)}c=-1<c.indexOf("?")?c+("&"+d):c+("?"+d)}Qa.openURL(c,b)};Da.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(Da.__sentWarnings.h,b)||(Da.__sentWarnings.h[b]=!0,Q.warn(a.methodName+" is not implemented",a))};Da.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",
function(a){a.preventDefault()},!1)};Da.sendToURL=function(a){(new kh).load(a)};Da.setInterval=function(a,b,c){var d=++Da.__lastTimerID;b=new Oe(b);Da.__timers.h[d]=b;b.run=function(){a.apply(a,null==c?[]:c)};return d};Da.setTimeout=function(a,b,c){var d=++Da.__lastTimerID,e=Da.__timers;b=Oe.delay(function(){Da.__timers.remove(d);a.apply(a,null==c?[]:c)},b);e.h[d]=b;return d};Da.trace=function(a){mf.trace(a,{fileName:"openfl/Lib.hx",lineNumber:569,className:"openfl.Lib",methodName:"trace"})};Da.isXMLName=
function(a){return null!=a&&(new aa("^[a-zA-Z_]","")).match(a)&&!(new aa("^[xX][mM][lL]","")).match(a)&&(new aa("^[a-zA-Z0-9_\\-\\.]+$","")).match(a)?!0:!1};Da.getClassByAlias=function(a){if(!Object.prototype.hasOwnProperty.call(Da.__registeredClassAliases.h,a))throw new wc("Class "+a+" could not be found.");return Da.__registeredClassAliases.h[a]};Da.registerClassAlias=function(a,b){if(null==b)throw new Ah("Parameter classObject must be non-null");if(null==a)throw new Ah("Parameter aliasName must be non-null");
Da.__registeredClassAliases.h[a]=b};Da.get_application=function(){return Ec.application};Da.get_current=function(){null==Ec.current&&(Ec.current=new uh);return Ec.current};var Ug=function(){};k["openfl._Vector.IVector"]=Ug;Ug.__name__="openfl._Vector.IVector";Ug.__isInterface__=!0;Ug.prototype={get_length:null,set_length:null,fixed:null,concat:null,copy:null,filter:null,get:null,indexOf:null,insertAt:null,iterator:null,join:null,lastIndexOf:null,pop:null,push:null,removeAt:null,reverse:null,set:null,
shift:null,slice:null,sort:null,splice:null,toString:null,unshift:null,__tempIndex:null,__class__:Ug,__properties__:{set_length:"set_length",get_length:"get_length"}};var Cf=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};k["openfl._Vector.BoolVector"]=Cf;Cf.__name__="openfl._Vector.BoolVector";Cf.__interfaces__=[Ug];Cf.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Cf(0,!1,this.__array.slice()):
0<a.__array.length?new Cf(0,!1,this.__array.concat(a.__array)):new Cf(0,!1,this.__array.slice())},copy:function(){return new Cf(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new Cf(0,b,c)},get:function(a){return a>=this.__array.length?!1:this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,
b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new se(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?
this.__array.splice(a,1)[0]:!1},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new Cf(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Cf(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=
this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=!1}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Cf,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ef=function(a,b,c,d){null==d&&(d=!1);null==b&&(b=!1);null==a&&(a=
0);if(d){if(this.__array=[],null!=c){d=0;for(var e=c.length;d<e;){var f=d++;this.__array[f]=c[f]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);this.fixed=b};k["openfl._Vector.FloatVector"]=Ef;Ef.__name__="openfl._Vector.FloatVector";Ef.__interfaces__=[Ug];Ef.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Ef(0,!1,this.__array.slice()):0<a.__array.length?new Ef(0,!1,this.__array.concat(a.__array)):new Ef(0,!1,this.__array.slice())},copy:function(){return new Ef(0,
this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new Ef(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new se(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},
lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},
shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new Ef(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Ef(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(a!=
this.__array.length&&!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Ef,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ff=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};k["openfl._Vector.FunctionVector"]=Ff;Ff.__name__="openfl._Vector.FunctionVector";Ff.__interfaces__=[Ug];
Ff.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Ff(0,!1,this.__array.slice()):0<a.__array.length?new Ff(0,!1,this.__array.concat(a.__array)):new Ff(0,!1,this.__array.slice())},copy:function(){return new Ff(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new Ff(0,b,c)},get:function(a){return a>=this.__array.length?null:this.__array[a]},indexOf:function(a,
b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(X.compareMethods(this.__array[d],a))return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new se(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(X.compareMethods(this.__array[b],a))return b;--b}return-1},pop:function(){return this.fixed?
null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new Ff(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new Ff(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=null}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Ff,
__properties__:{set_length:"set_length",get_length:"get_length"}};var Df=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};k["openfl._Vector.IntVector"]=Df;Df.__name__="openfl._Vector.IntVector";Df.__interfaces__=[Ug];Df.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Df(0,!1,this.__array.slice()):0<a.__array.length?new Df(0,!1,this.__array.concat(a.__array)):new Df(0,!1,this.__array.slice())},
copy:function(){return new Df(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new Df(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new se(this.__array)},join:function(a){null==
a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<
this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new Df(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Df(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},
set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Df,__properties__:{set_length:"set_length",get_length:"get_length"}};var nf=function(a,b,c,d){null==d&&(d=!1);null==b&&(b=!1);null==a&&(a=0);if(d){if(this.__array=[],null!=c){d=0;for(var e=c.length;d<e;){var f=d++;this.__array[f]=c[f]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);
this.fixed=b};k["openfl._Vector.ObjectVector"]=nf;nf.__name__="openfl._Vector.ObjectVector";nf.__interfaces__=[Ug];nf.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new nf(0,!1,this.__array.slice()):0<a.__array.length?new nf(0,!1,this.__array.concat(a.__array)):new nf(0,!1,this.__array.slice())},copy:function(){return new nf(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new nf(0,
b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new se(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},
pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new nf(0,
!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new nf(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;)b++,this.__array.push(null);else for(;this.__array.length>
a;)this.__array.pop()}return this.__array.length},__class__:nf,__properties__:{set_length:"set_length",get_length:"get_length"}};var ej=function(){rd.call(this);null==Ec.application&&(Ec.application=this);null==Ec.current&&(Ec.current=new uh);Ec.current.__loaderInfo=Kf.create(null);Ec.current.__loaderInfo.content=Ec.current};k["openfl.display.Application"]=ej;ej.__name__="openfl.display.Application";ej.__super__=rd;ej.prototype=u(rd.prototype,{createWindow:function(a){var b=new Sj(this,a);this.__windows.push(b);
this.__windowByID.h[b.id]=b;var c=r(this,this.__onWindowClose);b.onClose.add(function(){c(b)},!1,-1E4);null==this.__window&&(this.__window=b,b.onActivate.add(r(this,this.onWindowActivate)),b.onRenderContextLost.add(r(this,this.onRenderContextLost)),b.onRenderContextRestored.add(r(this,this.onRenderContextRestored)),b.onDeactivate.add(r(this,this.onWindowDeactivate)),b.onDropFile.add(r(this,this.onWindowDropFile)),b.onEnter.add(r(this,this.onWindowEnter)),b.onExpose.add(r(this,this.onWindowExpose)),
b.onFocusIn.add(r(this,this.onWindowFocusIn)),b.onFocusOut.add(r(this,this.onWindowFocusOut)),b.onFullscreen.add(r(this,this.onWindowFullscreen)),b.onKeyDown.add(r(this,this.onKeyDown)),b.onKeyUp.add(r(this,this.onKeyUp)),b.onLeave.add(r(this,this.onWindowLeave)),b.onMinimize.add(r(this,this.onWindowMinimize)),b.onMouseDown.add(r(this,this.onMouseDown)),b.onMouseMove.add(r(this,this.onMouseMove)),b.onMouseMoveRelative.add(r(this,this.onMouseMoveRelative)),b.onMouseUp.add(r(this,this.onMouseUp)),b.onMouseWheel.add(r(this,
this.onMouseWheel)),b.onMove.add(r(this,this.onWindowMove)),b.onRender.add(r(this,this.render)),b.onResize.add(r(this,this.onWindowResize)),b.onRestore.add(r(this,this.onWindowRestore)),b.onTextEdit.add(r(this,this.onTextEdit)),b.onTextInput.add(r(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(b);return b},__class__:ej});var La=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=!0);this.__drawableType=0;this.transparent=c;null==a&&(a=0);null==b&&(b=0);0>a&&(a=0);0>b&&(b=0);
this.width=a;this.height=b;this.rect=new fa(0,0,a,b);this.__textureWidth=a;this.__textureHeight=b;0<a&&0<b&&(c?0==(d&-16777216)&&(d=0):d=-16777216|d&16777215,this.image=new Fb(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),this.readable=this.__isValid=!0);this.__renderTransform=new wa;this.__worldAlpha=1;this.__worldTransform=new wa;this.__worldColorTransform=new Kc;this.__renderable=!0};k["openfl.display.BitmapData"]=La;La.__name__="openfl.display.BitmapData";La.__interfaces__=[ae];
La.fromBase64=function(a,b){return null};La.fromBytes=function(a,b){return null};La.fromCanvas=function(a,b){null==b&&(b=!0);if(null==a)return null;var c=new La(0,0,b,0);c.__fromImage(Fb.fromCanvas(a));c.image.set_transparent(b);return c};La.fromFile=function(a){return null};La.fromImage=function(a,b){null==b&&(b=!0);if(null==a||null==a.buffer)return null;var c=new La(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return null!=c.image?c:null};La.fromTexture=function(a){if(null==a)return null;
var b=new La(a.__width,a.__height,!0,0);b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};La.loadFromBase64=function(a,b){return Fb.loadFromBase64(a,b).then(function(a){return eb.withValue(La.fromImage(a))})};La.loadFromBytes=function(a,b){return Fb.loadFromBytes(Ab.toBytes(a)).then(function(a){a=La.fromImage(a);null!=b&&a.__applyAlpha(b);return eb.withValue(a)})};La.loadFromFile=function(a){return Fb.loadFromFile(a).then(function(a){return eb.withValue(La.fromImage(a))})};
La.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__blendMode:null,__drawableType:null,__framebuffer:null,__framebufferContext:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__indexBufferGrid:null,__isMask:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__stencilBuffer:null,__surface:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__transform:null,
__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__vertexBufferGrid:null,__vertexBufferHeight:null,__vertexBufferScaleX:null,__vertexBufferScaleY:null,__vertexBufferWidth:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,applyFilter:function(a,b,c,d){if(this.readable&&null!=a&&a.readable){a=d.__needSecondBitmapData;var e=d.__preserveObject,f=null;var g=a?new La(this.width,this.height,!0,0):this;e&&(f=new La(this.width,this.height,!0,0));d.__preserveObject&&
f.copyPixels(this,this.rect,c);b=d.__applyFilter(g,this,b,c);d.__preserveObject&&b.draw(f,null,null);a&&b==g&&(g.image.version=this.image.version,this.image=g.image);this.image.dirty=!0;this.image.version++}},clone:function(){if(this.__isValid)if(this.readable||null!=this.image)var a=La.fromImage(this.image.clone(),this.transparent);else a=new La(0,0,this.transparent,0),a.width=this.width,a.height=this.height,a.__textureWidth=this.__textureWidth,a.__textureHeight=this.__textureHeight,a.rect.copyFrom(this.rect),
a.__framebuffer=this.__framebuffer,a.__framebufferContext=this.__framebufferContext,a.__texture=this.__texture,a.__textureContext=this.__textureContext,a.__isValid=!0;else a=new La(this.width,this.height,this.transparent,0);a.__worldTransform.copyFrom(this.__worldTransform);a.__renderTransform.copyFrom(this.__renderTransform);return a},colorTransform:function(a,b){this.readable&&this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix())},compare:function(a){if(a==this)return 0;if(null==
a)return-1;if(0==this.readable||0==a.readable)return-2;if(this.width!=a.width)return-3;if(this.height!=a.height)return-4;if(null!=this.image&&null!=a.image&&this.image.get_format()==a.image.get_format()){for(var b=this.image.get_data(),c=a.image.get_data(),d=!0,e=0,f=b.length;e<f;){var g=e++;if(b[g]!=c[g]){d=!1;break}}if(d)return 0}b=null;e=0;for(f=this.height;e<f;){g=e++;for(var h=0,m=this.width;h<m;){var l=h++;c=!1;var n=this.getPixel32(l,g);var p=a.getPixel32(l,g);d=0;if(n!=p){var k=(n>>>16&255)-
(p>>>16&255);var q=(n>>>8&255)-(p>>>8&255);var t=(n&255)-(p&255);0>k&&(k*=-1);0>q&&(q*=-1);0>t&&(t*=-1);0==k&&0==q&&0==t?(n=(n>>>24&255)-(p>>>24&255),0!=n&&(d=(d>>>24&255)<<24|16711680|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|65280|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,d=(n&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)):(d=(d>>>24&255)<<24|(k&255)<<16|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(q&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&
255)<<16|(d>>>8&255)<<8|t&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(null==b&&(b=new La(this.width,this.height,this.transparent||a.transparent,0)),b.setPixel32(l,g,d))}}return null==b?0:b},copyChannel:function(a,b,c,d,e){if(this.readable){switch(d){case 1:d=jf.RED;break;case 2:d=jf.GREEN;break;case 4:d=jf.BLUE;break;case 8:d=jf.ALPHA;break;default:return}switch(e){case 1:e=jf.RED;break;case 2:e=jf.GREEN;break;case 4:e=jf.BLUE;break;case 8:e=jf.ALPHA;break;default:return}this.image.copyChannel(a.image,
b.__toLimeRectangle(),c.__toLimeVector2(),d,e)}},copyPixels:function(a,b,c,d,e,f){null==f&&(f=!1);this.readable&&null!=a&&(null!=e&&(La.__tempVector.x=e.x,La.__tempVector.y=e.y),this.image.copyPixels(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),null!=d?d.image:null,null!=e?La.__tempVector:null,f))},dispose:function(){this.image=null;this.height=this.width=0;this.rect=null;this.readable=this.__isValid=!1;this.__textureContext=this.__texture=this.__framebufferContext=this.__framebuffer=this.__vertexBuffer=
this.__surface=null},disposeImage:function(){this.readable=!1},draw:function(a,b,c,d,e,f){null==f&&(f=!1);if(null!=a){a.__update(!1,!0);var g=wa.__pool.get();g.copyFrom(a.__renderTransform);g.invert();null!=b&&g.concat(b);b=null;null!=e&&(b=wa.__pool.get(),b.copyFrom(g),b.invert());var h=new Kc;h.__copyFrom(a.__worldColorTransform);h.__invert();if(this.readable||null==Da.get_current().stage.context3D){if(null!=c){var m=fa.__pool.get(),l=wa.__pool.get();a.__getBounds(m,l);var n=Math.ceil(m.width),
p=Math.ceil(m.height);l.tx=-m.x;l.ty=-m.y;n=new La(n,p,!0,0);n.draw(a,l);n.colorTransform(n.rect,c);n.__renderTransform.identity();n.__renderTransform.tx=m.x;n.__renderTransform.ty=m.y;n.__renderTransform.concat(a.__renderTransform);n.__worldAlpha=a.__worldAlpha;n.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=n;fa.__pool.release(m);wa.__pool.release(l)}ya.convertToCanvas(this.image);c=new Vg(this.image.buffer.__srcContext);c.__allowSmoothing=f;c.__overrideBlendMode=d;c.__worldTransform=
g;c.__worldAlpha=1/a.__worldAlpha;c.__worldColorTransform=h;null!=e&&c.__pushMaskRect(e,b);this.__drawCanvas(a,c)}else null==this.__textureContext&&(this.__textureContext=rd.current.__window.context),null!=c&&h.__combine(c),c=new Cb(Da.get_current().stage.context3D,this),c.__allowSmoothing=f,c.__overrideBlendMode=d,c.__worldTransform=g,c.__worldAlpha=1/a.__worldAlpha,c.__worldColorTransform=h,c.__resize(this.width,this.height),null!=e&&c.__pushMaskRect(e,b),this.__drawGL(a,c);null!=e&&(c.__popMaskRect(),
wa.__pool.release(b));wa.__pool.release(g)}},drawWithQuality:function(a,b,c,d,e,f,g){null==f&&(f=!1);this.draw(a,b,c,d,e,2!=g&&f)},encode:function(a,b,c){if(!this.readable||null==a)return null;null==c&&(c=new oc(0));var d=this.image;if(!a.equals(this.rect)){var e=wa.__pool.get();e.tx=Math.round(-a.x);e.ty=Math.round(-a.y);a=new La(Math.ceil(a.width),Math.ceil(a.height),!0,0);a.draw(this,e);d=a.image;wa.__pool.release(e)}return b instanceof So?(c.writeBytes(Ab.fromBytes(d.encode(qm.PNG)),0,0),c):b instanceof
zm?(c.writeBytes(Ab.fromBytes(d.encode(qm.JPEG,U.__cast(b,zm).quality)),0,0),c):null},fillRect:function(a,b){this.__fillRect(a,b,!0)},floodFill:function(a,b,c){this.readable&&this.image.floodFill(a,b,c,1)},generateFilterRect:function(a,b){return a.clone()},getIndexBuffer:function(a,b){if(null==this.__indexBuffer||this.__indexBufferContext!=a.__context||null!=b&&null==this.__indexBufferGrid||null!=this.__indexBufferGrid&&!this.__indexBufferGrid.equals(b)){this.__indexBufferContext=a.__context;this.__indexBuffer=
null;if(null!=b){null==this.__indexBufferGrid&&(this.__indexBufferGrid=new fa);this.__indexBufferGrid.copyFrom(b);var c=b.width;b=b.height;0!=c&&0!=b?(this.__indexBufferData=c=new Uint16Array(54),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=0,this.__indexBufferData[8]=5,this.__indexBufferData[9]=5,this.__indexBufferData[10]=
0,this.__indexBufferData[11]=2,this.__indexBufferData[12]=6,this.__indexBufferData[13]=4,this.__indexBufferData[14]=7,this.__indexBufferData[15]=7,this.__indexBufferData[16]=4,this.__indexBufferData[17]=5,this.__indexBufferData[18]=8,this.__indexBufferData[19]=9,this.__indexBufferData[20]=0,this.__indexBufferData[21]=0,this.__indexBufferData[22]=9,this.__indexBufferData[23]=1,this.__indexBufferData[24]=10,this.__indexBufferData[25]=8,this.__indexBufferData[26]=4,this.__indexBufferData[27]=4,this.__indexBufferData[28]=
8,this.__indexBufferData[29]=0,this.__indexBufferData[30]=11,this.__indexBufferData[31]=10,this.__indexBufferData[32]=6,this.__indexBufferData[33]=6,this.__indexBufferData[34]=10,this.__indexBufferData[35]=4,this.__indexBufferData[36]=12,this.__indexBufferData[37]=13,this.__indexBufferData[38]=8,this.__indexBufferData[39]=8,this.__indexBufferData[40]=13,this.__indexBufferData[41]=9,this.__indexBufferData[42]=14,this.__indexBufferData[43]=12,this.__indexBufferData[44]=10,this.__indexBufferData[45]=
10,this.__indexBufferData[46]=12,this.__indexBufferData[47]=8,this.__indexBufferData[48]=15,this.__indexBufferData[49]=14,this.__indexBufferData[50]=11,this.__indexBufferData[51]=11,this.__indexBufferData[52]=14,this.__indexBufferData[53]=10,this.__indexBuffer=a.createIndexBuffer(54)):0==c&&0!=b?(this.__indexBufferData=c=new Uint16Array(18),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=
3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=5,this.__indexBufferData[8]=0,this.__indexBufferData[9]=0,this.__indexBufferData[10]=5,this.__indexBufferData[11]=1,this.__indexBufferData[12]=6,this.__indexBufferData[13]=7,this.__indexBufferData[14]=4,this.__indexBufferData[15]=4,this.__indexBufferData[16]=7,this.__indexBufferData[17]=5,this.__indexBuffer=a.createIndexBuffer(18)):0!=c&&0==b&&(this.__indexBufferData=c=new Uint16Array(18),this.__indexBufferData[0]=0,this.__indexBufferData[1]=
1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=0,this.__indexBufferData[8]=5,this.__indexBufferData[9]=5,this.__indexBufferData[10]=0,this.__indexBufferData[11]=2,this.__indexBufferData[12]=6,this.__indexBufferData[13]=4,this.__indexBufferData[14]=7,this.__indexBufferData[15]=7,this.__indexBufferData[16]=4,this.__indexBufferData[17]=5,this.__indexBuffer=a.createIndexBuffer(18))}else this.__indexBufferGrid=
null;null==this.__indexBuffer&&(this.__indexBufferData=c=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBuffer=a.createIndexBuffer(6));this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},getVertexBuffer:function(a,b,c){if(null==this.__vertexBuffer||this.__vertexBufferContext!=a.__context||null!=b&&null==this.__vertexBufferGrid||
null!=this.__vertexBufferGrid&&!this.__vertexBufferGrid.equals(b)||null!=c&&(this.__vertexBufferWidth!=c.get_width()||this.__vertexBufferHeight!=c.get_height()||this.__vertexBufferScaleX!=c.get_scaleX()||this.__vertexBufferScaleY!=c.get_scaleY())){this.__uvRect=new fa(0,0,this.width,this.height);this.__vertexBufferContext=a.__context;this.__vertexBuffer=null;null!=c&&(this.__vertexBufferWidth=c.get_width(),this.__vertexBufferHeight=c.get_height(),this.__vertexBufferScaleX=c.get_scaleX(),this.__vertexBufferScaleY=
c.get_scaleY());if(null!=b&&null!=c){null==this.__vertexBufferGrid&&(this.__vertexBufferGrid=new fa);this.__vertexBufferGrid.copyFrom(b);this.__vertexBufferWidth=c.get_width();this.__vertexBufferHeight=c.get_height();this.__vertexBufferScaleX=c.get_scaleX();this.__vertexBufferScaleY=c.get_scaleY();var d=b.width,e=b.height;if(0!=d&&0!=e){var f=new Float32Array(224);this.__vertexBufferData=f;var g=b.x,h=b.y,m=this.width-d-g,l=this.height-e-h;b=g/this.width;f=h/this.height;d/=this.width;e/=this.height;
g/=c.get_scaleX();h/=c.get_scaleY();m/=c.get_scaleX();var n=l/c.get_scaleY();l=c.get_width()/c.get_scaleX()-g-m;m=c.get_height()/c.get_scaleY()-h-n;this.__vertexBufferData[0]=g;this.__vertexBufferData[1]=h;this.__vertexBufferData[3]=1*b;this.__vertexBufferData[4]=1*f;this.__vertexBufferData[15]=h;this.__vertexBufferData[18]=1*f;this.__vertexBufferData[28]=g;this.__vertexBufferData[31]=1*b;this.__vertexBufferData[56]=g+l;this.__vertexBufferData[57]=h;this.__vertexBufferData[59]=1*(b+d);this.__vertexBufferData[60]=
1*f;this.__vertexBufferData[70]=g+l;this.__vertexBufferData[73]=1*(b+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=h;this.__vertexBufferData[87]=1;this.__vertexBufferData[88]=1*f;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=1;this.__vertexBufferData[112]=g;this.__vertexBufferData[113]=h+m;this.__vertexBufferData[115]=1*b;this.__vertexBufferData[116]=1*(f+e);this.__vertexBufferData[127]=h+m;this.__vertexBufferData[130]=1*(f+e);this.__vertexBufferData[140]=
g+l;this.__vertexBufferData[141]=h+m;this.__vertexBufferData[143]=1*(b+d);this.__vertexBufferData[144]=1*(f+e);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=h+m;this.__vertexBufferData[157]=1;this.__vertexBufferData[158]=1*(f+e);this.__vertexBufferData[168]=g;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=1*b;this.__vertexBufferData[172]=1;this.__vertexBufferData[183]=this.height;this.__vertexBufferData[186]=1;this.__vertexBufferData[196]=g+l;this.__vertexBufferData[197]=
this.height;this.__vertexBufferData[199]=1*(b+d);this.__vertexBufferData[200]=1;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=1;this.__vertexBufferData[214]=1;this.__vertexBuffer=a.createVertexBuffer(16,14)}else 0==d&&0!=e?(this.__vertexBufferData=f=new Float32Array(112),h=b.y,l=this.height-e-h,f=h/this.height,e/=this.height,h/=c.get_scaleY(),n=l/c.get_scaleY(),m=c.get_height()/c.get_scaleY()-h-n,c=c.get_width()/c.get_scaleX(),this.__vertexBufferData[0]=
c,this.__vertexBufferData[1]=h,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1*f,this.__vertexBufferData[15]=h,this.__vertexBufferData[18]=1*f,this.__vertexBufferData[28]=c,this.__vertexBufferData[31]=1,this.__vertexBufferData[56]=c,this.__vertexBufferData[57]=h+m,this.__vertexBufferData[59]=1,this.__vertexBufferData[60]=1*(f+e),this.__vertexBufferData[71]=h+m,this.__vertexBufferData[74]=1*(f+e),this.__vertexBufferData[84]=c,this.__vertexBufferData[85]=this.height,this.__vertexBufferData[87]=
1,this.__vertexBufferData[88]=1,this.__vertexBufferData[99]=this.height,this.__vertexBufferData[102]=1,this.__vertexBuffer=a.createVertexBuffer(8,14)):0==e&&0!=d&&(this.__vertexBufferData=f=new Float32Array(112),g=b.x,m=this.width-d-g,b=g/this.width,d/=this.width,g/=c.get_scaleX(),m/=c.get_scaleX(),l=c.get_width()/c.get_scaleX()-g-m,c=c.get_height()/c.get_scaleY(),this.__vertexBufferData[0]=g,this.__vertexBufferData[1]=c,this.__vertexBufferData[3]=1*b,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=
c,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=g,this.__vertexBufferData[31]=1*b,this.__vertexBufferData[56]=g+l,this.__vertexBufferData[57]=c,this.__vertexBufferData[59]=1*(b+d),this.__vertexBufferData[60]=1,this.__vertexBufferData[70]=g+l,this.__vertexBufferData[73]=1*(b+d),this.__vertexBufferData[84]=this.width,this.__vertexBufferData[85]=c,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=1,this.__vertexBufferData[98]=this.width,this.__vertexBufferData[101]=1,this.__vertexBuffer=
a.createVertexBuffer(8,14))}else this.__vertexBufferGrid=null;null==this.__vertexBuffer&&(this.__vertexBufferData=f=new Float32Array(56),this.__vertexBufferData[0]=this.width,this.__vertexBufferData[1]=this.height,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=this.height,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=this.width,this.__vertexBufferData[31]=1,this.__vertexBuffer=a.createVertexBuffer(3,14));this.__vertexBuffer.uploadFromTypedArray(Rg.toArrayBufferView(this.__vertexBufferData))}return this.__vertexBuffer},
getColorBoundsRect:function(a,b,c){null==c&&(c=!0);if(!this.readable)return new fa(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,b,c,1);return new fa(a.x,a.y,a.width,a.height)},getPixel:function(a,b){return this.readable?this.image.getPixel(a,b,1):0},getPixel32:function(a,b){return this.readable?this.image.getPixel32(a,b,1):0},getPixels:function(a){if(!this.readable)return null;null==a&&(a=this.rect);a=Ab.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},
getSurface:function(){if(!this.readable)return null;null==this.__surface&&(this.__surface=ms.fromImage(this.image));return this.__surface},getTexture:function(a){if(!this.__isValid)return null;if(null==this.__texture||this.__textureContext!=a.__context)this.__textureContext=a.__context,this.__texture=a.createRectangleTexture(this.width,this.height,1,!1),this.__textureVersion=-1;ya.sync(this.image,!1);null!=this.image&&this.image.version>this.__textureVersion&&(null!=this.__surface&&ns.flush(this.__surface),
a=this.image,ac.__supportsBGRA||0==a.get_format()||(a=a.clone(),a.set_format(0)),this.__texture.__uploadFromImage(a),this.__textureVersion=this.image.version,this.__textureWidth=a.buffer.width,this.__textureHeight=a.buffer.height);this.readable||null==this.image||(this.image=this.__surface=null);return this.__texture},getVector:function(a){a=this.getPixels(a);for(var b=ua.toFloat(Ab.get_length(a))/ua.toFloat(4)|0,c=ub.toIntVector(null,b,!0),d=0;d<b;){var e=d++;c.set(e,a.readUnsignedInt())}return c},
histogram:function(a){a=null!=a?a:new fa(0,0,this.width,this.height);a=this.getPixels(a);for(var b=[],c=[],d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);d=b;b=0;for(c=Ab.get_length(a);b<c;){var e=b++;++d[e%4][a.readUnsignedByte()]}return d},hitTest:function(a,b,c,d,e){null==e&&(e=1);if(!this.readable)return!1;c instanceof dd&&(c=U.__cast(c,dd).__bitmapData);if(c instanceof pa){e=
c;c=e.x-a.x|0;var f=e.y-a.y|0;if(this.rect.contains(c,f)){var g=this.getPixel32(c,f);if((g>>24&255)>b)return!0}}else if(c instanceof La){g=c;null==d?f=c=0:(c=Math.round(d.x-a.x),f=Math.round(d.y-a.y));d=fa.__pool.get();d.setTo(c,f,g.width,g.height);if(this.rect.intersects(d)){0>c?(d.x=0,d.width=Math.min(g.width+c,this.width)):d.width=Math.min(g.width,this.width-c);0>f?(d.y=0,d.height=Math.min(g.height+f,this.height)):d.height=Math.min(g.height,this.height-f);a=this.getPixels(d);d.x=0>c?-c:0;d.y=0>
f?-f:0;f=g.getPixels(d);g=d.width*d.height|0;c=0;for(var h=g;c<h;){c++;g=a.readUnsignedInt();var m=f.readUnsignedInt();if(ua.gt(g>>>24&255,b)&&ua.gt(m>>>24&255,e))return fa.__pool.release(d),!0}}fa.__pool.release(d)}else if(c instanceof fa){e=fa.__pool.get();e.copyFrom(c);e.offset(-a.x,-a.y);e.__contract(0,0,this.width,this.height);if(0<e.width&&0<e.height)for(a=this.getPixels(e),g=ua.toFloat(Ab.get_length(a))/ua.toFloat(4)|0,c=0,h=g;c<h;)if(c++,g=a.readUnsignedInt(),ua.gt(g>>>24&255,b))return fa.__pool.release(e),
!0;fa.__pool.release(e)}return!1},lock:function(){},merge:function(a,b,c,d,e,f,g){this.readable&&null!=a&&a.readable&&null!=b&&null!=c&&this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e,f,g)},noise:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=7);null==c&&(c=255);null==b&&(b=0);if(this.readable){var f=function(){a=1103515245*a+12345;return(Math.abs(a/65536)|0)%32768};f();c-=b;var g=1==(d&1),h=1==(d&2)>>1,m=1==(d&4)>>2;d=1==(d&8)>>3;for(var l=0,n=this.height;l<n;)for(var p=l++,
k=0,q=this.width;k<q;){var t=k++,v=0,r=0,u=0,x=255;e?(v=u=r=b+f()%c,x=255):(g&&(v=b+f()%c),h&&(u=b+f()%c),m&&(r=b+f()%c),d&&(x=b+f()%c));x=(x<<8)+v;x=(x<<8)+u;x=(x<<8)+r;this.setPixel32(t,p,x)}}},paletteMap:function(a,b,c,d,e,f,g){var h=b.width|0,m=b.height|0;a=a.getPixels(b);b=0;for(var l=m*h;b<l;){var n=b++;var p=a.readUnsignedInt();var k=null==g?p&-16777216:g[p>>24&255];var q=null==d?p&16711680:d[p>>16&255];var t=null==e?p&65280:e[p>>8&255];p=null==f?p&255:f[p&255];q=k+q+t+p;a.position=4*n;a.writeUnsignedInt(q)}a.position=
0;d=fa.__pool.get();d.setTo(c.x,c.y,h,m);this.setPixels(d,a);fa.__pool.release(d)},perlinNoise:function(a,b,c,d,e,f,g,h,m){null==h&&(h=!1);null==g&&(g=7);this.readable&&(new Sh(d,c,g,h,.5,e,.15)).fill(this,a,b,0)},scroll:function(a,b){this.readable&&this.image.scroll(a,b)},setPixel:function(a,b,c){this.readable&&this.image.setPixel(a,b,c,1)},setPixel32:function(a,b,c){this.readable&&this.image.setPixel32(a,b,c,1)},setPixels:function(a,b){if(this.readable&&null!=a){var c=a.width*a.height*4;if(ua.toFloat(b.length-
b.position)<c)throw new wc("End of file was encountered.",2030);this.image.setPixels(a.__toLimeRectangle(),Ab.toBytePointer(b),1,Vr.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=new oc(0);Ab.set_length(c,4*b.get_length());for(b=b.iterator();b.hasNext();){var d=b.next();c.writeUnsignedInt(d)}c.position=0;this.setPixels(a,c)},threshold:function(a,b,c,d,e,f,g,h){null==h&&(h=!1);null==g&&(g=-1);null==f&&(f=0);return null==a||null==b||null==c||b.x>a.width||b.y>a.height||c.x>this.width||c.y>
this.height?0:this.image.threshold(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e,f,g,h,1)},unlock:function(a){},__applyAlpha:function(a){ya.convertToCanvas(this.image);ya.createImageData(this.image);for(var b=this.image.buffer.data,c=0,d=Ab.get_length(a);c<d;){var e=c++;b[4*e+3]=a.readUnsignedByte()}this.image.version++},__drawCairo:function(a,b){},__drawCanvas:function(a,b){var c=this.image.buffer;b.__allowSmoothing||b.applySmoothing(c.__srcContext,!1);b.__render(a);b.__allowSmoothing||b.applySmoothing(c.__srcContext,
!0);c.__srcContext.setTransform(1,0,0,1,0,0);c.__srcImageData=null;c.data=null;this.image.dirty=!0;this.image.version++},__drawGL:function(a,b){var c=b.__context3D,d=c.__state.renderToTexture,e=c.__state.renderToTextureDepthStencil,f=c.__state.renderToTextureAntiAlias,g=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.getTexture(c),!0);b.__render(a);null!=d?c.setRenderToTexture(d,e,f,g):c.setRenderToBackBuffer()},__fillRect:function(a,b,c){if(null!=a)if(this.transparent&&0==(b&-16777216)&&
(b=0),c&&null!=this.__texture&&null!=this.__texture.__glFramebuffer&&"opengl"==Da.get_current().stage.__renderer.__type){c=Da.get_current().stage.__renderer.__context3D;var d=!this.rect.equals(a),e=c.__state.renderToTexture,f=c.__state.renderToTextureDepthStencil,g=c.__state.renderToTextureAntiAlias,h=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.__texture);d&&c.setScissorRectangle(a);c.clear((b>>>16&255)/255,(b>>>8&255)/255,(b&255)/255,this.transparent?(b>>>24&255)/255:1,0,0,
1);d&&c.setScissorRectangle(null);null!=e?c.setRenderToTexture(e,f,g,h):c.setRenderToBackBuffer()}else this.readable&&this.image.fillRect(a.__toLimeRectangle(),b,1)},__fromBase64:function(a,b){a=Fb.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,b){a=Fb.fromBytes(Ab.toBytes(a));this.__fromImage(a);null!=b&&this.__applyAlpha(b)},__fromFile:function(a){a=Fb.fromFile(a);this.__fromImage(a)},__fromImage:function(a){null!=a&&null!=a.buffer&&(this.image=a,this.width=a.width,this.height=a.height,
this.rect=new fa(0,0,a.width,a.height),this.__textureWidth=this.width,this.__textureHeight=this.height,this.__isValid=this.readable=!0)},__getBounds:function(a,b){var c=fa.__pool.get();this.rect.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)},__loadFromBase64:function(a,b){var c=this;return Fb.loadFromBase64(a,b).then(function(a){c.__fromImage(a);return eb.withValue(c)})},__loadFromBytes:function(a,b){var c=this;return Fb.loadFromBytes(Ab.toBytes(a)).then(function(a){c.__fromImage(a);
null!=b&&c.__applyAlpha(b);return eb.withValue(c)})},__loadFromFile:function(a){var b=this;return Fb.loadFromFile(a).then(function(a){b.__fromImage(a);return eb.withValue(b)})},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=b;this.__textureWidth=a;this.__textureHeight=b},__setUVRect:function(a,b,c,d,e){if(null!=this.getVertexBuffer(a)&&(d!=this.__uvRect.width||e!=this.__uvRect.height||b!=this.__uvRect.x||c!=this.__uvRect.y)){null==this.__uvRect&&(this.__uvRect=
new fa);this.__uvRect.setTo(b,c,d,e);a=0<this.__textureWidth?b/this.__textureWidth:0;c=0<this.__textureHeight?c/this.__textureHeight:0;b=0<this.__textureWidth?d/this.__textureWidth:0;var f=0<this.__textureHeight?e/this.__textureHeight:0;this.__vertexBufferData[0]=d;this.__vertexBufferData[1]=e;this.__vertexBufferData[3]=a+b;this.__vertexBufferData[4]=c+f;this.__vertexBufferData[15]=e;this.__vertexBufferData[17]=a;this.__vertexBufferData[18]=c+f;this.__vertexBufferData[28]=d;this.__vertexBufferData[31]=
a+b;this.__vertexBufferData[32]=c;this.__vertexBufferData[45]=a;this.__vertexBufferData[46]=c;this.__vertexBuffer.uploadFromTypedArray(Rg.toArrayBufferView(this.__vertexBufferData))}},__sync:function(){ya.sync(this.image,!1)},__update:function(a,b){this.__updateTransforms()},__updateTransforms:function(a){null==a?this.__worldTransform.identity():this.__worldTransform.copyFrom(a);this.__renderTransform.copyFrom(this.__worldTransform)},__class__:La};var Re=function(){za.call(this);this.__allowSmoothing=
!0;this.__pixelRatio=1;this.__tempColorTransform=new Kc;this.__worldAlpha=1};k["openfl.display.DisplayObjectRenderer"]=Re;Re.__name__="openfl.display.DisplayObjectRenderer";Re.__super__=za;Re.prototype=u(za.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,__context:null,__overrideBlendMode:null,__pixelRatio:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__transparent:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},
__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return null!=this.__worldColorTransform?(this.__tempColorTransform.__copyFrom(this.__worldColorTransform),this.__tempColorTransform.__combine(a),this.__tempColorTransform):a},__popMask:function(){},__popMaskObject:function(a,b){},__popMaskRect:function(){},__pushMask:function(a){},__pushMaskObject:function(a,b){},__pushMaskRect:function(a,b){},__render:function(a){},__renderEvent:function(a){if(null!=a.__customRenderEvent&&
a.__renderable){a.__customRenderEvent.allowSmoothing=this.__allowSmoothing;a.__customRenderEvent.objectMatrix.copyFrom(a.__renderTransform);a.__customRenderEvent.objectColorTransform.__copyFrom(a.__worldColorTransform);a.__customRenderEvent.renderer=this;switch(this.__type){case "cairo":a.__customRenderEvent.type="renderCairo";break;case "canvas":a.__customRenderEvent.type="renderCanvas";break;case "dom":a.__customRenderEvent.type=null!=a.stage&&a.__worldVisible?"renderDOM":"clearDOM";break;case "opengl":this.__cleared||
this.__clear();this.setShader(a.__worldShader);this.__context3D.__flushGL();a.__customRenderEvent.type="renderOpenGL";break;default:return}this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(a.__customRenderEvent);this.__popMaskObject(a);"opengl"==this.__type&&this.setViewport()}},__resize:function(a,b){},__setBlendMode:function(a){},__shouldCacheHardware:function(a,b){if(null==a)return null;switch(a.__drawableType){case 4:case 5:if(1==b)return!0;b=this.__shouldCacheHardware_DisplayObject(a,
b);if(1==b)return!0;if(null!=a.__children){var c=0;for(a=a.__children;c<a.length;){var d=a[c];++c;b=this.__shouldCacheHardware_DisplayObject(d,b);if(1==b)return!0}}return b;case 7:return 1==b?!0:!1;case 9:return!0;default:return this.__shouldCacheHardware_DisplayObject(a,b)}},__shouldCacheHardware_DisplayObject:function(a,b){return 1==b||null!=a.__filters?!0:0==b||null!=a.__graphics&&!Qc.isCompatible(a.__graphics)?!1:null},__updateCacheBitmap:function(a,b){if(null==a)return!1;switch(a.__drawableType){case 2:var c=
a;if(null==c.__bitmapData||null==c.__filters&&"opengl"==this.__type&&null==c.__cacheBitmap)return!1;b=null!=c.__bitmapData.image&&c.__bitmapData.image.version!=c.__imageVersion;break;case 7:var d=a;if(null==d.__filters&&"opengl"==this.__type&&null==d.__cacheBitmap&&!d.__domRender)return!1;b&&(d.__renderDirty=!0);b=b||d.__dirty;break;case 9:if(null==a.__filters&&"opengl"==this.__type&&null==a.__cacheBitmap)return!1}if(a.__isCacheBitmapRender)return!1;d=Kc.__pool.get();d.__copyFrom(a.__worldColorTransform);
null!=this.__worldColorTransform&&d.__combine(this.__worldColorTransform);var e=!1;if(a.get_cacheAsBitmap()||"opengl"!=this.__type&&!d.__isDefault(!0)||"opengl"==this.__type&&null!=a.get_scale9Grid()){e=null;var f=(b=null==a.__cacheBitmap||a.__renderDirty&&(b||null!=a.__children&&0<a.__children.length)||a.opaqueBackground!=a.__cacheBitmapBackground)||null!=a.__graphics&&a.__graphics.__softwareDirty||!a.__cacheBitmapColorTransform.__equals(d,!0),g=b||null!=a.__graphics&&a.__graphics.__hardwareDirty,
h=this.__type;if(f||g)"opengl"==h&&0==this.__shouldCacheHardware(a,null)&&(h="canvas"),!f||"canvas"!=h&&"cairo"!=h||(b=!0),g&&"opengl"==h&&(b=!0);f=b||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);c=null!=a.__filters;if("dom"==this.__type&&!c)return!1;if(c&&!b)for(var m=0,l=a.__filters;m<l.length;){var n=l[m];++m;if(n.__renderDirty){b=!0;break}}null==a.__cacheBitmapMatrix&&(a.__cacheBitmapMatrix=new wa);m=null!=a.__cacheAsBitmapMatrix?a.__cacheAsBitmapMatrix:a.__renderTransform;b||
m.a==a.__cacheBitmapMatrix.a&&m.b==a.__cacheBitmapMatrix.b&&m.c==a.__cacheBitmapMatrix.c&&m.d==a.__cacheBitmapMatrix.d||(b=!0);!b&&"opengl"!=this.__type&&null!=a.__cacheBitmapData&&null!=a.__cacheBitmapData.image&&a.__cacheBitmapData.image.version<a.__cacheBitmapData.__textureVersion&&(b=!0);if(!b)for(g=a;null!=g;){if(null!=g.get_scrollRect()){f=!0;break}g=g.parent}a.__cacheBitmapMatrix.copyFrom(m);a.__cacheBitmapMatrix.tx=0;var p=g=a.__cacheBitmapMatrix.ty=0,k=0,q=0,t=n=0;l=this.__pixelRatio;if(f||
b)e=fa.__pool.get(),a.__getFilterBounds(e,a.__cacheBitmapMatrix),k=0<e.width?Math.ceil((e.width+1)*l):0,q=0<e.height?Math.ceil((e.height+1)*l):0,n=0<e.x?Math.ceil(e.x):Math.floor(e.x),t=0<e.y?Math.ceil(e.y):Math.floor(e.y),null!=a.__cacheBitmapData?k>a.__cacheBitmapData.width||q>a.__cacheBitmapData.height?(g=Math.ceil(Math.max(1.25*k,a.__cacheBitmapData.width)),p=Math.ceil(Math.max(1.25*q,a.__cacheBitmapData.height)),b=!0):(g=a.__cacheBitmapData.width,p=a.__cacheBitmapData.height):(g=k,p=q);if(b)if(f=
!0,a.__cacheBitmapBackground=a.opaqueBackground,.5<=k&&.5<=q){var v=null!=a.opaqueBackground&&(g!=k||p!=q),r=null!=a.opaqueBackground?-16777216|a.opaqueBackground:0,u=v?0:r,x="opengl"==this.__type;null==a.__cacheBitmapData||g>a.__cacheBitmapData.width||p>a.__cacheBitmapData.height?(a.__cacheBitmapData=new La(g,p,!0,u),null==a.__cacheBitmap&&(a.__cacheBitmap=new dd),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null):a.__cacheBitmapData.__fillRect(a.__cacheBitmapData.rect,
u,x);v&&(e.setTo(0,0,k,q),a.__cacheBitmapData.__fillRect(e,r,x))}else return Kc.__pool.release(d),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapRenderer=null,7==a.__drawableType&&(d=a,null!=d.__cacheBitmap&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX*l,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY*l)),!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;if(f||b)a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),
m==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.scale(1/l,1/l),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+n,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+t):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.a*=1/l,a.__cacheBitmap.__renderTransform.d*=1/l,a.__cacheBitmap.__renderTransform.tx+=
n,a.__cacheBitmap.__renderTransform.ty+=t);a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_mask(a.__mask);if(b){if(null==a.__cacheBitmapRenderer||h!=a.__cacheBitmapRenderer.__type)"opengl"==h?a.__cacheBitmapRenderer=new Cb(U.__cast(this,Cb).__context3D,a.__cacheBitmapData):(null==a.__cacheBitmapData.image&&
(a.__cacheBitmapData=new La(g,p,!0,null!=a.opaqueBackground?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),ya.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRenderer=new Vg(a.__cacheBitmapData.image.buffer.__srcContext)),a.__cacheBitmapRenderer.__worldTransform=new wa,a.__cacheBitmapRenderer.__worldColorTransform=new Kc;null==a.__cacheBitmapColorTransform&&(a.__cacheBitmapColorTransform=new Kc);a.__cacheBitmapRenderer.__stage=a.stage;a.__cacheBitmapRenderer.__allowSmoothing=
this.__allowSmoothing;a.__cacheBitmapRenderer.__setBlendMode(10);a.__cacheBitmapRenderer.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRenderer.__worldTransform.copyFrom(a.__renderTransform);a.__cacheBitmapRenderer.__worldTransform.invert();a.__cacheBitmapRenderer.__worldTransform.concat(a.__cacheBitmapMatrix);a.__cacheBitmapRenderer.__worldTransform.tx-=n;a.__cacheBitmapRenderer.__worldTransform.ty-=t;a.__cacheBitmapRenderer.__worldTransform.scale(l,l);a.__cacheBitmapRenderer.__pixelRatio=l;a.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(d);
a.__cacheBitmapRenderer.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;if("opengl"==a.__cacheBitmapRenderer.__type){v=a.__cacheBitmapRenderer;r=v.__context3D;u=r.__state.renderToTexture;x=r.__state.renderToTextureDepthStencil;var C=r.__state.renderToTextureAntiAlias,P=r.__state.renderToTextureSurfaceSelector,F=this.__blendMode;this.__suspendClipAndMask();v.__copyShader(this);a.__cacheBitmapData.__setUVRect(r,0,0,k,q);v.__setRenderTarget(a.__cacheBitmapData);null!=a.__cacheBitmapData.image&&
(a.__cacheBitmapData.__textureVersion=a.__cacheBitmapData.image.version+1);a.__cacheBitmapData.__drawGL(a,v);if(c){var z=!1;m=0;for(l=a.__filters;m<l.length;)n=l[m],++m,n.__preserveObject&&(z=!0);c=a.__cacheBitmapData;t=null;null==a.__cacheBitmapData2||g>a.__cacheBitmapData2.width||p>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new La(g,p,!0,0):(a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),null!=a.__cacheBitmapData2.image&&(a.__cacheBitmapData2.__textureVersion=a.__cacheBitmapData2.image.version+
1));a.__cacheBitmapData2.__setUVRect(r,0,0,k,q);h=a.__cacheBitmapData2;z&&(null==a.__cacheBitmapData3||g>a.__cacheBitmapData3.width||p>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new La(g,p,!0,0):(a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),null!=a.__cacheBitmapData3.image&&(a.__cacheBitmapData3.__textureVersion=a.__cacheBitmapData3.image.version+1)),a.__cacheBitmapData3.__setUVRect(r,0,0,k,q),t=a.__cacheBitmapData3);v.__setBlendMode(10);v.__worldAlpha=1;v.__worldTransform.identity();
v.__worldColorTransform.__identity();m=0;for(l=a.__filters;m<l.length;){n=l[m];++m;n.__preserveObject&&(v.__setRenderTarget(t),v.__renderFilterPass(c,v.__defaultDisplayShader,n.__smooth));p=0;for(k=n.__numShaderPasses;p<k;)g=p++,g=n.__initShader(v,g,n.__preserveObject?t:null),v.__setBlendMode(n.__shaderBlendMode),v.__setRenderTarget(h),v.__renderFilterPass(c,g,n.__smooth),g=c,c=h,h=g;n.__renderDirty=!1}a.__cacheBitmap.__bitmapData=c}this.__blendMode=10;this.__setBlendMode(F);this.__copyShader(v);
null!=u?r.setRenderToTexture(u,x,C,P):r.setRenderToBackBuffer();this.__resumeClipAndMask(v);this.setViewport();a.__cacheBitmapColorTransform.__copyFrom(d)}else{a.__cacheBitmapData.__drawCanvas(a,a.__cacheBitmapRenderer);if(c){z=k=!1;m=0;for(l=a.__filters;m<l.length;)n=l[m],++m,n.__needSecondBitmapData&&(k=!0),n.__preserveObject&&(z=!0);c=a.__cacheBitmapData;t=null;k?(null==a.__cacheBitmapData2||null==a.__cacheBitmapData2.image||g>a.__cacheBitmapData2.width||p>a.__cacheBitmapData2.height?a.__cacheBitmapData2=
new La(g,p,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),h=a.__cacheBitmapData2):h=c;z&&(null==a.__cacheBitmapData3||null==a.__cacheBitmapData3.image||g>a.__cacheBitmapData3.width||p>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new La(g,p,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),t=a.__cacheBitmapData3);null==a.__tempPoint&&(a.__tempPoint=new pa);p=a.__tempPoint;m=0;for(l=a.__filters;m<l.length;)n=l[m],++m,n.__preserveObject&&t.copyPixels(c,c.rect,p),
g=n.__applyFilter(h,c,c.rect,p),n.__preserveObject&&g.draw(t,null,null!=a.__objectTransform?a.__objectTransform.__colorTransform:null),n.__renderDirty=!1,k&&g==h&&(g=c,c=h,h=g);a.__cacheBitmapData!=c&&(g=a.__cacheBitmapData,a.__cacheBitmapData=c,a.__cacheBitmapData2=g,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(d);a.__cacheBitmapColorTransform.__isDefault(!0)||
(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,a.__cacheBitmapColorTransform))}a.__isCacheBitmapRender=!1}(f||b)&&fa.__pool.release(e);e=f}else null!=a.__cacheBitmap&&("dom"==this.__type&&this.__renderDrawableClear(a.__cacheBitmap),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRenderer=null,e=!0);Kc.__pool.release(d);e&&7==a.__drawableType&&
(d=a,null!=d.__cacheBitmap&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY));return e},__class__:Re});var Am=function(a){Re.call(this)};k["openfl.display.CairoRenderer"]=Am;Am.__name__="openfl.display.CairoRenderer";Am.__super__=Re;Am.prototype=u(Re.prototype,{cairo:null,__matrix:null,__matrix3:null,applyMatrix:function(a,b){null==b&&(b=this.cairo);this.__matrix.copyFrom(a);this.cairo==b&&null!=this.__worldTransform&&this.__matrix.concat(this.__worldTransform);
this.__matrix3.a=this.__matrix.a;this.__matrix3.b=this.__matrix.b;this.__matrix3.c=this.__matrix.c;this.__matrix3.d=this.__matrix.d;this.__roundPixels?(this.__matrix3.tx=Math.round(this.__matrix.tx),this.__matrix3.ty=Math.round(this.__matrix.ty)):(this.__matrix3.tx=this.__matrix.tx,this.__matrix3.ty=this.__matrix.ty);b.set_matrix(this.__matrix3)},__clear:function(){if(null!=this.cairo&&(this.cairo.identityMatrix(),null!=this.__stage&&this.__stage.__clearBeforeRender)){var a=this.__blendMode;this.__setBlendMode(10);
this.cairo.setSourceRGB(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2]);this.cairo.paint();this.__setBlendMode(a)}},__popMask:function(){this.cairo.restore()},__popMaskObject:function(a,b){null==b&&(b=!0);a.__isCacheBitmapRender||null==a.__mask||this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},__popMaskRect:function(){this.cairo.restore()},__pushMask:function(a){this.cairo.save();this.applyMatrix(a.__renderTransform,this.cairo);this.cairo.newPath();
this.__renderDrawableMask(a);this.cairo.clip()},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||null==a.__mask||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.cairo.save();this.applyMatrix(b,this.cairo);this.cairo.newPath();this.cairo.rectangle(a.x,a.y,a.width,a.height);this.cairo.clip()},__render:function(a){null!=this.cairo&&this.__renderDrawable(a)},__renderDrawable:function(a){if(null!=
a)switch(a.__drawableType){case 6:!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(this.__pushMaskObject(a),this.__renderDrawable(a.__currentState),this.__popMaskObject(a),this.__renderEvent(a))}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 2:this.cairo.rectangle(0,0,a.get_width(),a.get_height());break;case 6:this.__renderDrawableMask(a.__currentState)}},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=
a&&(this.__blendMode=a,this.__setBlendModeCairo(this.cairo,a))},__setBlendModeCairo:function(a,b){switch(b){case 0:a.setOperator(12);break;case 2:a.setOperator(17);break;case 3:a.setOperator(23);break;case 5:a.setOperator(21);break;case 7:a.setOperator(2);break;case 8:a.setOperator(18);break;case 9:a.setOperator(14);break;case 11:a.setOperator(16);break;case 12:a.setOperator(15);break;default:a.setOperator(2)}},__class__:Am});var Vg=function(a){Re.call(this);this.context=a;this.__tempMatrix=new wa;
this.__type="canvas"};k["openfl.display.CanvasRenderer"]=Vg;Vg.__name__="openfl.display.CanvasRenderer";Vg.__super__=Re;Vg.prototype=u(Re.prototype,{context:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(a,b){a.imageSmoothingEnabled=b},setTransform:function(a,b){null==b?b=this.context:this.context==b&&null!=this.__worldTransform&&(this.__tempMatrix.copyFrom(a),this.__tempMatrix.concat(this.__worldTransform),a=this.__tempMatrix);this.__roundPixels?b.setTransform(a.a,a.b,a.c,a.d,a.tx|0,
a.ty|0):b.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)},__clear:function(){if(null!=this.__stage){var a=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;!this.__stage.__transparent&&this.__stage.__clearBeforeRender?(this.context.fillStyle=this.__stage.__colorString,this.context.fillRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale)):this.__stage.__transparent&&
this.__stage.__clearBeforeRender&&this.context.clearRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale);this.__setBlendMode(a)}},__popMask:function(){this.context.restore()},__popMaskObject:function(a,b){null==b&&(b=!0);a.__isCacheBitmapRender||null==a.__mask||this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},__popMaskRect:function(){this.context.restore()},__pushMask:function(a){this.context.save();this.setTransform(a.__renderTransform,
this.context);this.context.beginPath();this.__renderDrawableMask(a);this.context.closePath();this.context.clip()},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||null==a.__mask||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.context.save();this.setTransform(b,this.context);this.context.beginPath();this.context.rect(a.x,a.y,a.width,a.height);this.context.clip()},__render:function(a){this.__renderDrawable(a)},
__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 0:Bm.renderDrawable(a,this);break;case 2:Ji.renderDrawable(a,this);break;case 3:vh.renderDrawable(a,this);break;case 4:case 5:Cm.renderDrawable(a,this);break;case 6:Dm.renderDrawable(a,this);break;case 7:Z.renderDrawable(a,this);break;case 8:Th.renderDrawable(a,this);break;case 9:Vf.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 0:Bm.renderDrawableMask(a,this);break;case 2:Ji.renderDrawableMask(a,
this);break;case 3:vh.renderDrawableMask(a,this);break;case 4:case 5:Cm.renderDrawableMask(a,this);break;case 6:Dm.renderDrawableMask(a,this);break;case 7:Z.renderDrawableMask(a,this);break;case 8:Th.renderDrawableMask(a,this);break;case 9:Vf.renderDrawableMask(a,this)}},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeContext(this.context,a))},__setBlendModeContext:function(a,b){switch(b){case 0:a.globalCompositeOperation=
"lighter";break;case 2:a.globalCompositeOperation="darken";break;case 3:a.globalCompositeOperation="difference";break;case 5:a.globalCompositeOperation="hard-light";break;case 8:a.globalCompositeOperation="lighten";break;case 9:a.globalCompositeOperation="multiply";break;case 11:a.globalCompositeOperation="overlay";break;case 12:a.globalCompositeOperation="screen";break;default:a.globalCompositeOperation="source-over"}},__class__:Vg});var xr={fromInt:function(a){return a},fromString:function(a){switch(a){case "none":return 0;
case "round":return 1;case "square":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}}},Em=function(a){ab.call(this);this.__drawableType=10;this.__element=a};k["openfl.display.DOMElement"]=Em;Em.__name__="openfl.display.DOMElement";Em.__super__=ab;Em.prototype=u(ab.prototype,{__active:null,__element:null,__class__:Em});var Tj=function(a){Re.call(this);this.element=a;ab.__supportDOM=
!0;a=window.getComputedStyle(document.documentElement,"");a=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];"WebKit|Moz|MS|O".match(new RegExp("("+a+")","i"));a[0].toUpperCase();a.substr(1);this.__vendorPrefix=a;this.__transformProperty="webkit"==a?"-webkit-transform":"transform";this.__transformOriginProperty="webkit"==a?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__z=this.__numClipRects=0;this.__type="dom";this.__canvasRenderer=
new Vg(null);this.__canvasRenderer.__isDOM=!0};k["openfl.display.DOMRenderer"]=Tj;Tj.__name__="openfl.display.DOMRenderer";Tj.__super__=Re;Tj.prototype=u(Re.prototype,{element:null,__canvasRenderer:null,__clipRects:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,__transformProperty:null,__vendorPrefix:null,__z:null,applyStyle:function(a,b){null!=a&&null!=b&&(null!=a.__style&&b.parentElement==this.element||this.__initializeElement(a,b),a.__style=b.style,this.__updateClip(a),
this.__applyStyle(a,!0,!0,!0))},clearStyle:function(a){null!=a&&a.parentElement==this.element&&this.element.removeChild(a)},__applyStyle:function(a,b,c,d){var e=a.__style;if(b&&a.__renderTransformChanged){b=a.__renderTransform;var f=this.__roundPixels;null==f&&(f=!1);e.setProperty(this.__transformProperty,f?"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+(b.tx|0)+", "+(b.ty|0)+", 0, 1)":"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+b.tx+", "+b.ty+
", 0, 1)",null)}a.__worldZ!=++this.__z&&(a.__worldZ=this.__z,e.setProperty("z-index",null==a.__worldZ?"null":""+a.__worldZ,null));c&&a.__worldAlphaChanged&&(1>a.__worldAlpha?e.setProperty("opacity",null==a.__worldAlpha?"null":""+a.__worldAlpha,null):e.removeProperty("opacity"));d&&a.__worldClipChanged&&(null==a.__worldClip?e.removeProperty("clip"):(a=a.__worldClip,e.setProperty("clip","rect("+a.y+"px, "+a.get_right()+"px, "+a.get_bottom()+"px, "+a.x+"px)",null)))},__initializeElement:function(a,b){var c=
a.__style=b.style;c.setProperty("position","absolute",null);c.setProperty("top","0",null);c.setProperty("left","0",null);c.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(b);a.__worldAlphaChanged=!0;a.__renderTransformChanged=!0;a.__worldVisibleChanged=!0;a.__worldClipChanged=!0;a.__worldClip=null;a.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(a,b){null==b&&(b=!0);null!=a.__mask&&this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},
__popMaskRect:function(){0<this.__numClipRects&&(this.__numClipRects--,this.__currentClipRect=0<this.__numClipRects?this.__clipRects[this.__numClipRects-1]:null)},__pushMask:function(a){this.__pushMaskRect(a.getBounds(a),a.__renderTransform)},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);null!=a.__mask&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=
new fa);var c=this.__clipRects[this.__numClipRects];a.__transform(c,b);0<this.__numClipRects&&(a=this.__clipRects[this.__numClipRects-1],c.__contract(a.x,a.y,a.width,a.height));0>c.height&&(c.height=0);0>c.width&&(c.width=0);this.__currentClipRect=c;this.__numClipRects++},__render:function(a){this.element.style.background=this.__stage.__transparent?"none":this.__stage.__colorString;this.__z=1;this.__renderDrawable(a)},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 2:yc.renderDrawable(a,
this);break;case 3:He.renderDrawable(a,this);break;case 4:case 5:Fm.renderDrawable(a,this);break;case 6:Gm.renderDrawable(a,this);break;case 7:Ie.renderDrawable(a,this);break;case 8:Wg.renderDrawable(a,this);break;case 9:Ag.renderDrawable(a,this);break;case 10:null!=a.stage&&a.__worldVisible&&a.__renderable?(a.__active||(this.__initializeElement(a,a.__element),a.__active=!0),this.__updateClip(a),this.__applyStyle(a,!0,!0,!0)):a.__active&&(this.element.removeChild(a.__element),a.__active=!1),He.renderDrawable(a,
this)}},__renderDrawableClear:function(a){if(null!=a)switch(a.__drawableType){case 2:yc.renderDrawableClear(a,this);break;case 3:He.renderDrawableClear(a,this);break;case 4:case 5:Fm.renderDrawableClear(a,this);break;case 6:Gm.renderDrawableClear(a,this);break;case 7:Ie.renderDrawableClear(a,this);break;case 8:Wg.renderDrawableClear(a,this);break;case 9:Ag.renderDrawableClear(a,this)}},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=
a)},__updateClip:function(a){if(null==this.__currentClipRect)a.__worldClipChanged=null!=a.__worldClip,a.__worldClip=null;else{null==a.__worldClip&&(a.__worldClip=new fa);var b=fa.__pool.get(),c=wa.__pool.get();c.copyFrom(a.__renderTransform);c.invert();this.__currentClipRect.__transform(b,c);b.equals(a.__worldClip)?a.__worldClipChanged=!1:(a.__worldClip.copyFrom(b),a.__worldClipChanged=!0);fa.__pool.release(b);wa.__pool.release(c)}},__class__:Tj});var Hm=function(a){null==this.__glFragmentSource&&
(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
xe.call(this,a);this.__isGenerated=!0;this.__initGL()};k["openfl.display.DisplayObjectShader"]=Hm;Hm.__name__="openfl.display.DisplayObjectShader";Hm.__super__=xe;Hm.prototype=u(xe.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Hm});var To=function(a,b){za.call(this);this.name=a;this.frame=b};k["openfl.display.FrameLabel"]=
To;To.__name__="openfl.display.FrameLabel";To.__super__=za;To.prototype=u(za.prototype,{frame:null,name:null,__class__:To});var yr=function(a,b){this.script=a;this.frame=b};k["openfl.display.FrameScript"]=yr;yr.__name__="openfl.display.FrameScript";yr.prototype={frame:null,script:null,__class__:yr};var Te=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new Ae;this.__strokePadding=0;this.__oldRenderTransform=new wa;this.__positionY=this.__positionX=0;this.__renderTransform=new wa;this.__usedShaderBuffers=
new Dc;this.__worldTransform=new wa;this.__height=this.__width=0;this.__bitmapScale=1;this.__shaderBufferPool=new qd(function(){return new Im});this.moveTo(0,0)};k["openfl.display.Graphics"]=Te;Te.__name__="openfl.display.Graphics";Te.prototype={__bounds:null,__commands:null,__dirty:null,__hardwareDirty:null,__height:null,__managed:null,__oldRenderTransform:null,__positionX:null,__positionY:null,__quadBuffer:null,__renderTransform:null,__shaderBufferPool:null,__softwareDirty:null,__strokePadding:null,
__transformDirty:null,__triangleIndexBuffer:null,__triangleIndexBufferCount:null,__triangleIndexBufferData:null,__usedShaderBuffers:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferCount:null,__vertexBufferCountUVT:null,__vertexBufferData:null,__vertexBufferDataUVT:null,__vertexBufferUVT:null,__visible:null,__owner:null,__width:null,__worldTransform:null,__canvas:null,__context:null,__bitmap:null,__bitmapScale:null,beginBitmapFill:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);
this.__commands.beginBitmapFill(a,null!=b?b.clone():null,c,d);this.__visible=!0},beginFill:function(a,b){null==b&&(b=1);null==a&&(a=0);this.__commands.beginFill(a&16777215,b);0<b&&(this.__visible=!0)},beginGradientFill:function(a,b,c,d,e,f,g,h){null==h&&(h=0);null==g&&(g=1);null==f&&(f=0);if(null!=b&&0!=b.length){if(null==c){c=[];for(var m=0,l=b.length;m<l;)m++,c.push(1)}if(null==d)for(d=[],m=0,l=b.length;m<l;){var n=m++;d.push(Math.ceil(n/b.length*255))}if(!(c.length<b.length||d.length<b.length))for(this.__commands.beginGradientFill(a,
b,c,d,e,f,g,h),m=0;m<c.length;)if(a=c[m],++m,0<a){this.__visible=!0;break}}},beginShaderFill:function(a,b){null!=a&&(b=this.__shaderBufferPool.get(),this.__usedShaderBuffers.add(b),b.update(a),this.__commands.beginShaderFill(b))},clear:function(){for(var a=this.__usedShaderBuffers.h;null!=a;){var b=a.item;a=a.next;this.__shaderBufferPool.release(b)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;null!=this.__bounds&&(this.set___dirty(!0),this.__transformDirty=!0,this.__bounds=
null);this.__visible=!1;this.__positionY=this.__positionX=0;this.moveTo(0,0)},copyFrom:function(a){this.__bounds=null!=a.__bounds?a.__bounds.clone():null;this.__commands=a.__commands.copy();this.set___dirty(!0);this.__strokePadding=a.__strokePadding;this.__positionX=a.__positionX;this.__positionY=a.__positionY;this.__transformDirty=!0;this.__visible=a.__visible},cubicCurveTo:function(a,b,c,d,e,f){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+
this.__strokePadding,this.__positionY+this.__strokePadding);var g=e,h=e;if(!(a<e&&a>this.__positionX||a>e&&a<this.__positionX)||!(c<e&&c>this.__positionX||c>e&&c<this.__positionX)){var m=2*this.__positionX-4*a+2*c,l=a-this.__positionX,n=-this.__positionX+3*a+e-3*c,p=(-m+Math.sqrt(m*m-4*l*n))/(2*n);m=(-m-Math.sqrt(m*m-4*l*n))/(2*n);0<p&&1>p&&(g=this.__calculateBezierCubicPoint(p,this.__positionX,a,c,e));0<m&&1>m&&(h=this.__calculateBezierCubicPoint(m,this.__positionX,a,c,e))}var k=f,q=f;(b<f&&b>this.__positionY||
b>f&&b<this.__positionY)&&(d<f&&d>this.__positionY||d>f&&d<this.__positionY)||(m=2*this.__positionY-4*b+2*d,l=b-this.__positionY,n=-this.__positionY+3*b+f-3*d,p=(-m+Math.sqrt(m*m-4*l*n))/(2*n),m=(-m-Math.sqrt(m*m-4*l*n))/(2*n),0<p&&1>p&&(k=this.__calculateBezierCubicPoint(p,this.__positionY,b,d,f)),0<m&&1>m&&(q=this.__calculateBezierCubicPoint(m,this.__positionY,b,d,f)));this.__inflateBounds(g-this.__strokePadding,k-this.__strokePadding);this.__inflateBounds(g+this.__strokePadding,k+this.__strokePadding);
this.__inflateBounds(h-this.__strokePadding,q-this.__strokePadding);this.__inflateBounds(h+this.__strokePadding,q+this.__strokePadding);this.__positionX=e;this.__positionY=f;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.cubicCurveTo(a,b,c,d,e,f);this.set___dirty(!0)},curveTo:function(a,b,c,d){this.__inflateBounds(this.__positionX-this.__strokePadding,
this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var e=a<c&&a>this.__positionX||a>c&&a<this.__positionX?c:this.__calculateBezierQuadPoint((this.__positionX-a)/(this.__positionX-2*a+c),this.__positionX,a,c);var f=b<d&&b>this.__positionY||b>d&&b<this.__positionY?d:this.__calculateBezierQuadPoint((this.__positionY-b)/(this.__positionY-2*b+d),this.__positionY,b,d);this.__inflateBounds(e-this.__strokePadding,f-this.__strokePadding);
this.__inflateBounds(e+this.__strokePadding,f+this.__strokePadding);this.__positionX=c;this.__positionY=d;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.curveTo(a,b,c,d);this.set___dirty(!0)},drawCircle:function(a,b,c){0>=c||(this.__inflateBounds(a-c-this.__strokePadding,b-c-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,
b+c+this.__strokePadding),this.__commands.drawCircle(a,b,c),this.set___dirty(!0))},drawEllipse:function(a,b,c,d){0>=c||0>=d||(this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding),this.__commands.drawEllipse(a,b,c,d),this.set___dirty(!0))},drawGraphicsData:function(a){for(a=a.iterator();a.hasNext();){var b=a.next();switch(b.__graphicsDataType){case 0:if(null!=b.fill){var c=b.thickness;isNaN(c)&&(c=null);switch(b.fill.__graphicsFillType){case 0:var d=
b.fill;this.lineStyle(c,d.color,d.alpha,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);break;case 1:d=b.fill;this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);this.lineGradientStyle(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 2:d=b.fill,this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit),this.lineBitmapStyle(d.bitmapData,d.matrix,d.repeat,d.smooth)}}else this.lineStyle();
break;case 1:d=b;this.beginFill(d.color,d.alpha);break;case 2:d=b;this.beginGradientFill(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 3:this.drawPath(b.commands,b.data,b.winding);break;case 4:d=b;this.beginBitmapFill(d.bitmapData,d.matrix,d.repeat,d.smooth);break;case 5:this.endFill();break;case 6:this.drawQuads(b.rects,b.indices,b.transforms);break;case 7:this.drawTriangles(b.vertices,b.indices,b.uvtData,b.culling);break;case 8:this.beginShaderFill(b.shader,
b.matrix)}}},drawPath:function(a,b,c){null==c&&(c=0);var d=0;1==c&&this.__commands.windingNonZero();a=a.iterator();a:for(;a.hasNext();)switch(a.next()){case 1:this.moveTo(b.get(d),b.get(d+1));d+=2;break;case 2:this.lineTo(b.get(d),b.get(d+1));d+=2;break;case 3:this.curveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3));d+=4;break;case 4:this.moveTo(b.get(d+2),b.get(d+3));break a;case 5:this.lineTo(b.get(d+2),b.get(d+3));break a;case 6:this.cubicCurveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3),b.get(d+
4),b.get(d+5)),d+=6}},drawQuads:function(a,b,c){if(null!=a){var d=null!=b,e=!1,f=!1,g=d?b.get_length():Math.floor(a.get_length()/4);if(0!=g){null!=c&&(c.get_length()>=6*g?f=e=!0:c.get_length()>=4*g?e=!0:c.get_length()>=2*g&&(f=!0));for(var h=fa.__pool.get(),m=wa.__pool.get(),l=Infinity,n=Infinity,p=-Infinity,k=-Infinity,q,t=0;t<g;){var v=t++;q=d?4*b.get(v):4*v;0>q||(h.setTo(0,0,a.get(q+2),a.get(q+3)),0>=h.width||0>=h.height||(e&&f?(q=6*v,m.setTo(c.get(q),c.get(q+1),c.get(q+2),c.get(q+3),c.get(q+4),
c.get(q+5))):e?(q=4*v,m.setTo(c.get(q),c.get(q+1),c.get(q+2),c.get(q+3),h.x,h.y)):f?(q=2*v,m.tx=c.get(q),m.ty=c.get(q+1)):(m.tx=h.x,m.ty=h.y),h.__transform(h,m),l>h.x&&(l=h.x),n>h.y&&(n=h.y),p<h.get_right()&&(p=h.get_right()),k<h.get_bottom()&&(k=h.get_bottom())))}this.__inflateBounds(l,n);this.__inflateBounds(p,k);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);this.__visible=!0;fa.__pool.release(h);wa.__pool.release(m)}}},drawRect:function(a,b,c,d){if(0!=c||0!=d){var e=0>c?-1:1,f=0>d?-1:1;
this.__inflateBounds(a-this.__strokePadding*e,b-this.__strokePadding*f);this.__inflateBounds(a+c+this.__strokePadding*e,b+d+this.__strokePadding*f);this.__commands.drawRect(a,b,c,d);this.set___dirty(!0)}},drawRoundRect:function(a,b,c,d,e,f){if(0!=c||0!=d){var g=0>c?-1:1,h=0>d?-1:1;this.__inflateBounds(a-this.__strokePadding*g,b-this.__strokePadding*h);this.__inflateBounds(a+c+this.__strokePadding*g,b+d+this.__strokePadding*h);this.__commands.drawRoundRect(a,b,c,d,e,f);this.set___dirty(!0)}},drawRoundRectComplex:function(a,
b,c,d,e,f,g,h){if(!(0>=c||0>=d)){this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding);this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding);var m=a+c,l=b+d;c=c<d?2*c:2*d;e<c||(e=c);f<c||(f=c);g<c||(g=c);h<c||(h=c);c=1-Math.sin(Math.PI/180*45);d=1-Math.tan(Math.PI/180*22.5);var n=h*c,p=h*d;this.moveTo(m,l-h);this.curveTo(m,l-p,m-n,l-n);this.curveTo(m-p,l,m-h,l);n=g*c;p=g*d;this.lineTo(a+g,l);this.curveTo(a+p,l,a+n,l-n);this.curveTo(a,l-p,a,l-g);n=e*c;p=e*d;this.lineTo(a,
b+e);this.curveTo(a,b+p,a+n,b+n);this.curveTo(a+p,b,a+e,b);n=f*c;p=f*d;this.lineTo(m-f,b);this.curveTo(m-p,b,m-n,b+n);this.curveTo(m,b+p,m,b+f);this.lineTo(m,l-h);this.set___dirty(!0)}},drawTriangles:function(a,b,c,d){null==d&&(d=1);if(null!=a&&0!=a.get_length()){var e=a.get_length()/2|0;if(null==b){if(0!=e%3)throw new hi("Not enough vertices to close a triangle.");b=ub.toIntVector(null);for(var f=0,g=e;f<g;){var h=f++;b.push(h)}}null==d&&(d=1);var m=Infinity,l=Infinity,n=-Infinity,p=-Infinity;f=
0;for(g=e;f<g;)h=f++,e=a.get(2*h),h=a.get(2*h+1),m>e&&(m=e),l>h&&(l=h),n<e&&(n=e),p<h&&(p=h);this.__inflateBounds(m,l);this.__inflateBounds(n,p);this.__commands.drawTriangles(a,b,c,d);this.set___dirty(!0);this.__visible=!0}},endFill:function(){this.__commands.endFill()},lineBitmapStyle:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.__commands.lineBitmapStyle(a,null!=b?b.clone():null,c,d)},lineGradientStyle:function(a,b,c,d,e,f,g,h){null==h&&(h=0);null==g&&(g=1);null==f&&(f=0);this.__commands.lineGradientStyle(a,
b,c,d,e,f,g,h)},lineStyle:function(a,b,c,d,e,f,g,h){null==h&&(h=3);null==e&&(e=2);null==d&&(d=!1);null==c&&(c=1);null==b&&(b=0);null!=a&&(1==g?a>this.__strokePadding&&(this.__strokePadding=Math.ceil(a)):a/2>this.__strokePadding&&(this.__strokePadding=Math.ceil(a/2)));this.__commands.lineStyle(a,b,c,d,e,f,g,h);null!=a&&(this.__visible=!0)},lineTo:function(a,b){isFinite(a)&&isFinite(b)&&(this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+
this.__strokePadding,this.__positionY+this.__strokePadding),this.__positionX=a,this.__positionY=b,this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+2*this.__strokePadding,this.__positionY+this.__strokePadding),this.__commands.lineTo(a,b),this.set___dirty(!0))},moveTo:function(a,b){this.__positionX=a;this.__positionY=b;this.__commands.moveTo(a,b)},overrideBlendMode:function(a){null==a&&(a=10);this.__commands.overrideBlendMode(a)},
readGraphicsData:function(a){null==a&&(a=!0);var b=ub.toObjectVector(null);this.__owner.__readGraphicsData(b,a);return b},__calculateBezierCubicPoint:function(a,b,c,d,e){var f=1-a;return b*f*f*f+3*c*a*f*f+3*d*f*a*a+e*a*a*a},__calculateBezierQuadPoint:function(a,b,c,d){var e=1-a;return e*e*b+2*e*a*c+a*a*d},__cleanup:function(){null!=this.__bounds&&null!=this.__canvas&&(this.set___dirty(!0),this.__transformDirty=!0);this.__context=this.__canvas=this.__bitmap=null},__getBounds:function(a,b){if(null!=
this.__bounds){var c=fa.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)}},__hitTest:function(a,b,c,d){if(null==this.__bounds)return!1;var e=d.a*d.d-d.b*d.c,f=0==e?-d.tx:1/e*(d.c*(d.ty-b)+d.d*(a-d.tx));e=d.a*d.d-d.b*d.c;a=0==e?-d.ty:1/e*(d.a*(b-d.ty)+d.b*(d.tx-a));return f>this.__bounds.x&&a>this.__bounds.y&&this.__bounds.contains(f,a)?c?z.hitTest(this,f,a):!0:!1},__inflateBounds:function(a,b){null==this.__bounds?(this.__bounds=new fa(a,b,0,0),
this.__transformDirty=!0):(a<this.__bounds.x&&(this.__bounds.width+=this.__bounds.x-a,this.__bounds.x=a,this.__transformDirty=!0),b<this.__bounds.y&&(this.__bounds.height+=this.__bounds.y-b,this.__bounds.y=b,this.__transformDirty=!0),a>this.__bounds.x+this.__bounds.width&&(this.__bounds.width=a-this.__bounds.x),b>this.__bounds.y+this.__bounds.height&&(this.__bounds.height=b-this.__bounds.y))},__readGraphicsData:function(a){for(var b=new Wf(this.__commands),c=null,d,e=this.__commands.types,f=0,g=this.__commands.get_length();f<
g;){d=f++;d=e[d];switch(d._hx_index){case 4:case 5:case 6:case 7:case 9:case 10:case 17:case 18:null==c&&(c=new Ki);break;default:null!=c&&(a.push(c),c=null)}switch(d._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_BITMAP_FILL;d=b;a.push(new Jm(d.buffer.o[d.oPos],d.buffer.o[d.oPos+1],d.buffer.b[d.bPos],d.buffer.b[d.bPos+1]));break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;
break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=da.BEGIN_FILL;d=b;a.push(new Uj(d.buffer.i[d.iPos],1));break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_GRADIENT_FILL;d=b;a.push(new Km(d.buffer.o[d.oPos],d.buffer.ii[d.iiPos],d.buffer.ff[d.ffPos],d.buffer.ii[d.iiPos+1],d.buffer.o[d.oPos+1],d.buffer.o[d.oPos+2],d.buffer.o[d.oPos+3],d.buffer.f[d.fPos]));break;case 3:break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;
case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=da.CUBIC_CURVE_TO;d=b;c.cubicCurveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.f[d.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.CURVE_TO;d=b;c.curveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_CIRCLE;
d=b;c.__drawCircle(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ELLIPSE;d=b;c.__drawEllipse(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_RECT;d=b;c.__drawRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+
2],d.buffer.f[d.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ROUND_RECT;d=b;c.__drawRoundRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],null!=d.buffer.o[d.oPos]?d.buffer.o[d.oPos]:d.buffer.f[d.fPos+4]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;
case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.END_FILL;a.push(new Lm);break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_BITMAP_STYLE;c=null;break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_GRADIENT_STYLE;break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_STYLE;var h=b;d=new Mm(h.buffer.o[h.oPos],h.buffer.b[h.bPos],h.buffer.o[h.oPos+1],h.buffer.o[h.oPos+2],h.buffer.o[h.oPos+3],h.buffer.f[h.fPos+1]);d.fill=new Uj(h.buffer.i[h.iPos],
h.buffer.f[h.fPos]);a.push(d);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_TO;d=b;c.lineTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=
4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.MOVE_TO;d=b;c.moveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}null!=c&&
a.push(c)},__update:function(a,b){if(!(null==this.__bounds||0>=this.__bounds.width||0>=this.__bounds.height)){var c=this.__owner.__renderTransform;if(null!=c){var d=b,e=b;null==this.__owner.__worldScale9Grid&&(d=0==c.b?Math.abs(c.a):Math.sqrt(c.a*c.a+c.b*c.b),e=0==c.c?Math.abs(c.d):Math.sqrt(c.c*c.c+c.d*c.d),null!=a&&(d=0==a.b?d*a.a:d*Math.sqrt(a.a*a.a+a.b*a.b),e=0==a.c?e*a.d:e*Math.sqrt(a.c*a.c+a.d*a.d)));a=this.__bounds.width*d;e*=this.__bounds.height;if(1>a||1>e)(1<=this.__width||1<=this.__height)&&
this.set___dirty(!0),this.__height=this.__width=0;else{null!=Te.maxTextureWidth&&a>Te.maxTextureWidth&&(a=Te.maxTextureWidth);null!=Te.maxTextureWidth&&e>Te.maxTextureHeight&&(e=Te.maxTextureHeight);null!=this.__owner.__worldScale9Grid?(this.__renderTransform.a=b,this.__renderTransform.d=b,d=1/b,b=1/b):(this.__renderTransform.a=a/this.__bounds.width,this.__renderTransform.d=e/this.__bounds.height,d=1/this.__renderTransform.a,b=1/this.__renderTransform.d);this.__worldTransform.a=d*c.a;this.__worldTransform.b=
d*c.b;this.__worldTransform.c=b*c.c;this.__worldTransform.d=b*c.d;d=this.__bounds.x;var f=this.__bounds.y;b=d*c.a+f*c.c+c.tx;c=d*c.b+f*c.d+c.ty;this.__worldTransform.tx=Math.round(b);this.__worldTransform.ty=Math.round(c);d=this.__worldTransform;f=d.a*d.d-d.b*d.c;this.__renderTransform.tx=0==f?-d.tx:1/f*(d.c*(d.ty-c)+d.d*(b-d.tx));d=this.__worldTransform;f=d.a*d.d-d.b*d.c;this.__renderTransform.ty=0==f?-d.ty:1/f*(d.a*(c-d.ty)+d.b*(d.tx-b));a=Math.ceil(a+1);e=Math.ceil(e+1);a==this.__width&&e==this.__height||
this.set___dirty(!0);this.__width=a;this.__height=e}}}},set___dirty:function(a){if(a&&null!=this.__owner){var b=this.__owner;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a&&(this.__hardwareDirty=this.__softwareDirty=!0);return this.__dirty=a},__class__:Te,__properties__:{set___dirty:"set___dirty"}};var wh=function(){};k["openfl.display.IGraphicsFill"]=wh;wh.__name__="openfl.display.IGraphicsFill";wh.__isInterface__=!0;wh.prototype={__graphicsFillType:null,__class__:wh};var Xf=
function(){};k["openfl.display.IGraphicsData"]=Xf;Xf.__name__="openfl.display.IGraphicsData";Xf.__isInterface__=!0;Xf.prototype={__graphicsDataType:null,__class__:Xf};var Jm=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.bitmapData=a;this.matrix=b;this.repeat=c;this.smooth=d;this.__graphicsDataType=4;this.__graphicsFillType=2};k["openfl.display.GraphicsBitmapFill"]=Jm;Jm.__name__="openfl.display.GraphicsBitmapFill";Jm.__interfaces__=[wh,Xf];Jm.prototype={bitmapData:null,matrix:null,repeat:null,
smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Jm};var Lm=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};k["openfl.display.GraphicsEndFill"]=Lm;Lm.__name__="openfl.display.GraphicsEndFill";Lm.__interfaces__=[wh,Xf];Lm.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:Lm};var Km=function(a,b,c,d,e,f,g,h){null==h&&(h=0);null==a&&(a=0);null==f&&(f=0);null==g&&(g=1);this.type=a;this.colors=b;this.alphas=c;this.ratios=d;this.matrix=e;this.spreadMethod=
f;this.interpolationMethod=g;this.focalPointRatio=h;this.__graphicsDataType=2;this.__graphicsFillType=1};k["openfl.display.GraphicsGradientFill"]=Km;Km.__name__="openfl.display.GraphicsGradientFill";Km.__interfaces__=[wh,Xf];Km.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Km};var Nm=function(){};k["openfl.display.IGraphicsPath"]=Nm;Nm.__name__="openfl.display.IGraphicsPath";
Nm.__isInterface__=!0;var Ki=function(a,b,c){null==c&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};k["openfl.display.GraphicsPath"]=Ki;Ki.__name__="openfl.display.GraphicsPath";Ki.__interfaces__=[Nm,Xf];Ki.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,e,f){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));this.commands.push(6);this.data.push(a);this.data.push(b);
this.data.push(c);this.data.push(d);this.data.push(e);this.data.push(f)},curveTo:function(a,b,c,d){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));this.commands.push(3);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d)},lineTo:function(a,b){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,
b){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,b){null==this.commands&&(this.commands=ub.toIntVector(null));null==this.data&&(this.data=ub.toFloatVector(null));
this.commands.push(1);this.data.push(a);this.data.push(b)},__drawCircle:function(a,b,c){this.__drawRoundRect(a-c,b-c,2*c,2*c,2*c,2*c)},__drawEllipse:function(a,b,c,d){this.__drawRoundRect(a,b,c,d,c,d)},__drawRect:function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.lineTo(a,b)},__drawRoundRect:function(a,b,c,d,e,f){e*=.5;f*=.5;e>c/2&&(e=c/2);f>d/2&&(f=d/2);c=a+c;d=b+d;var g=-e+.7071067811865476*e,h=-e+.41421356237309503*e,m=-f+.7071067811865476*f,l=-f+
.41421356237309503*f;this.moveTo(c,d-f);this.curveTo(c,d+l,c+g,d+m);this.curveTo(c+h,d,c-e,d);this.lineTo(a+e,d);this.curveTo(a-h,d,a-g,d+m);this.curveTo(a,d+l,a,d-f);this.lineTo(a,b+f);this.curveTo(a,b-l,a-g,b-m);this.curveTo(a-h,b,a+e,b);this.lineTo(c-e,b);this.curveTo(c+h,b,c+g,b-m);this.curveTo(c,b-l,c,b+f);this.lineTo(c,d-f)},__class__:Ki};var Uo=function(a,b,c){this.rects=a;this.indices=b;this.transforms=c;this.__graphicsDataType=6};k["openfl.display.GraphicsQuadPath"]=Uo;Uo.__name__="openfl.display.GraphicsQuadPath";
Uo.__interfaces__=[Nm,Xf];Uo.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:Uo};var Om=function(a){null==this.__glFragmentSource&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
xe.call(this,a);this.__isGenerated=!0;this.__initGL()};k["openfl.display.GraphicsShader"]=Om;Om.__name__="openfl.display.GraphicsShader";Om.__super__=xe;Om.prototype=u(xe.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,bitmap:null,__class__:Om});var Vo=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};k["openfl.display.GraphicsShaderFill"]=
Vo;Vo.__name__="openfl.display.GraphicsShaderFill";Vo.__interfaces__=[wh,Xf];Vo.prototype={matrix:null,shader:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Vo};var Uj=function(a,b){null==b&&(b=1);null==a&&(a=0);this.alpha=b;this.color=a;this.__graphicsDataType=1;this.__graphicsFillType=0};k["openfl.display.GraphicsSolidFill"]=Uj;Uj.__name__="openfl.display.GraphicsSolidFill";Uj.__interfaces__=[wh,Xf];Uj.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,
__class__:Uj};var zr=function(){};k["openfl.display.IGraphicsStroke"]=zr;zr.__name__="openfl.display.IGraphicsStroke";zr.__isInterface__=!0;var Mm=function(a,b,c,d,e,f,g){null==f&&(f=3);null==e&&(e=2);null==d&&(d=0);null==c&&(c=2);null==b&&(b=!1);null==a&&(a=NaN);this.caps=d;this.fill=g;this.joints=e;this.miterLimit=f;this.pixelHinting=b;this.scaleMode=c;this.thickness=a;this.__graphicsDataType=0};k["openfl.display.GraphicsStroke"]=Mm;Mm.__name__="openfl.display.GraphicsStroke";Mm.__interfaces__=
[zr,Xf];Mm.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,__graphicsDataType:null,__class__:Mm};var Wo=function(a,b,c,d){null==d&&(d=1);this.vertices=a;this.indices=b;this.uvtData=c;this.culling=d;this.__graphicsDataType=7};k["openfl.display.GraphicsTrianglePath"]=Wo;Wo.__name__="openfl.display.GraphicsTrianglePath";Wo.__interfaces__=[Nm,Xf];Wo.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:Wo};
var yi=function(){};k["openfl.display.ITileContainer"]=yi;yi.__name__="openfl.display.ITileContainer";yi.__isInterface__=!0;yi.prototype={get_numTiles:null,addTile:null,addTileAt:null,addTiles:null,contains:null,getTileAt:null,getTileIndex:null,removeTile:null,removeTileAt:null,removeTiles:null,setTileIndex:null,sortTiles:null,swapTiles:null,swapTilesAt:null,__class__:yi,__properties__:{get_numTiles:"get_numTiles"}};var zm=function(a){null==a&&(a=80);this.quality=a};k["openfl.display.JPEGEncoderOptions"]=
zm;zm.__name__="openfl.display.JPEGEncoderOptions";zm.prototype={quality:null,__class__:zm};var Ar={fromInt:function(a){return a},fromString:function(a){switch(a){case "bevel":return 0;case "miter":return 1;case "round":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}}},xj=function(){jb.call(this);this.__drawableType=4;this.contentLoaderInfo=Kf.create(this);this.uncaughtErrorEvents=
this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};k["openfl.display.Loader"]=xj;xj.__name__="openfl.display.Loader";xj.__super__=jb;xj.prototype=u(jb.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__path:null,__unloaded:null,addChild:function(a){throw new wc("Error #2069: The Loader class does not implement this method.",2069);},addChildAt:function(a,b){throw new wc("Error #2069: The Loader class does not implement this method.",2069);},close:function(){Ec.notImplemented({fileName:"openfl/display/Loader.hx",
lineNumber:228,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();b=new la("open");this.contentLoaderInfo.dispatchEvent(b);this.contentLoaderInfo.loaderURL=Da.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=a.url;this.__unloaded=!1;if(null==a.contentType||""==a.contentType){b="";this.__path=a.url;var c=this.__path.indexOf("?");-1<c&&(this.__path=this.__path.substring(0,c));for(;R.endsWith(this.__path,"/");)this.__path=this.__path.substring(0,this.__path.length-
1);R.endsWith(this.__path,".bundle")&&(this.__path+="/library.json",a.url=-1<c?this.__path+a.url.substring(c):this.__path);c=this.__path.lastIndexOf(".");-1<c&&(b=this.__path.substring(c+1));switch(b){case "gif":b="image/gif";break;case "jpeg":case "jpg":b="image/jpeg";break;case "js":b="application/javascript";break;case "json":b="application/json";break;case "png":b="image/png";break;case "swf":b="application/x-shockwave-flash";break;default:b="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=
b}else this.contentLoaderInfo.contentType=a.contentType;if(-1<this.contentLoaderInfo.contentType.indexOf("image/")&&"GET"==a.method&&(null==a.requestHeaders||0==a.requestHeaders.length)&&null==a.userAgent)La.loadFromFile(a.url).onComplete(r(this,this.BitmapData_onLoad)).onError(r(this,this.BitmapData_onError)).onProgress(r(this,this.BitmapData_onProgress));else{b=new kh;b.dataFormat=0;if(-1<this.contentLoaderInfo.contentType.indexOf("/json")||-1<this.contentLoaderInfo.contentType.indexOf("/javascript")||
-1<this.contentLoaderInfo.contentType.indexOf("/ecmascript"))b.dataFormat=1;b.addEventListener("complete",r(this,this.loader_onComplete));b.addEventListener("ioError",r(this,this.loader_onError));b.addEventListener("progress",r(this,this.loader_onProgress));b.load(a)}},loadBytes:function(a,b){La.loadFromBytes(a).onComplete(r(this,this.BitmapData_onLoad)).onError(r(this,this.BitmapData_onError))},removeChild:function(a){if(a==this.content)return jb.prototype.removeChild.call(this,this.content);throw new wc("Error #2069: The Loader class does not implement this method.",
2069);},removeChildAt:function(a){throw new wc("Error #2069: The Loader class does not implement this method.",2069);},setChildIndex:function(a,b){throw new wc("Error #2069: The Loader class does not implement this method.",2069);},unload:function(){this.__unloaded||(null!=this.content&&this.content.parent==this&&jb.prototype.removeChild.call(this,this.content),null!=this.__library&&(va.unloadLibrary(this.contentLoaderInfo.url),this.__library=null),this.content=null,this.contentLoaderInfo.url=null,
this.contentLoaderInfo.contentType=null,this.contentLoaderInfo.content=null,this.contentLoaderInfo.bytesLoaded=0,this.contentLoaderInfo.bytesTotal=0,this.contentLoaderInfo.width=0,this.contentLoaderInfo.height=0,this.__unloaded=!0,this.contentLoaderInfo.dispatchEvent(new la("unload")))},unloadAndStop:function(a){null!=this.content&&this.content.__stopAllMovieClips();a=0;for(var b=this.get_numChildren();a<b;){var c=a++;this.getChildAt(c).__stopAllMovieClips()}this.unload()},__dispatchError:function(a){var b=
new lg("ioError");b.text=a;this.contentLoaderInfo.dispatchEvent(b)},__setContent:function(a,b,c){this.content=a;this.contentLoaderInfo.content=a;this.contentLoaderInfo.width=b;this.contentLoaderInfo.height=c;null!=a&&jb.prototype.addChildAt.call(this,a,0)},BitmapData_onError:function(a){this.__dispatchError(A.string(a))},BitmapData_onLoad:function(a){null==a?this.__dispatchError("Unknown error"):(this.__setContent(new dd(a),a.width,a.height),this.contentLoaderInfo.dispatchEvent(new la("complete")))},
BitmapData_onProgress:function(a,b){var c=new Bg("progress");c.bytesLoaded=a;c.bytesTotal=b;this.contentLoaderInfo.dispatchEvent(c)},loader_onComplete:function(a){var b=this;a=a.target;if(null!=this.contentLoaderInfo.contentType&&-1<this.contentLoaderInfo.contentType.indexOf("/json")){var c=Jc.parse(a.data,Ze.directory(this.__path));if(null==c)this.__dispatchError("Cannot parse asset manifest");else{var d=wb.fromManifest(c);if(null==d)this.__dispatchError("Cannot open library");else if(d instanceof
Kd)d.load().onComplete(function(a){b.__library=d;va.registerLibrary(b.contentLoaderInfo.url,b.__library);null==c.name||va.hasLibrary(c.name)||va.registerLibrary(c.name,b.__library);a=b.__library.getMovieClip("");b.__setContent(a,a.get_width()|0,a.get_height()|0);b.contentLoaderInfo.dispatchEvent(new la("complete"))}).onError(function(a){b.__dispatchError(a)})}}else null!=this.contentLoaderInfo.contentType&&(-1<this.contentLoaderInfo.contentType.indexOf("/javascript")||-1<this.contentLoaderInfo.contentType.indexOf("/ecmascript"))?
(this.__setContent(new Ya,0,0),eval("(function () {"+A.string(a.data)+"})()"),this.contentLoaderInfo.dispatchEvent(new la("complete"))):(this.contentLoaderInfo.bytes=a.data,La.loadFromBytes(a.data).onComplete(r(this,this.BitmapData_onLoad)).onError(r(this,this.BitmapData_onError)))},loader_onError:function(a){a.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},loader_onProgress:function(a){a.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},__class__:xj});
var Kf=function(){za.call(this);this.applicationDomain=Li.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};k["openfl.display.LoaderInfo"]=Kf;Kf.__name__="openfl.display.LoaderInfo";Kf.create=function(a){var b=new Kf;b.uncaughtErrorEvents=new Pm;null!=a?b.loader=a:b.url=Kf.__rootURL;return b};Kf.__super__=za;Kf.prototype=u(za.prototype,{applicationDomain:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,
frameRate:null,height:null,loader:null,loaderURL:null,parameters:null,parentAllowsChild:null,sameDomain:null,sharedEvents:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){this.__completed||(this.bytesLoaded<this.bytesTotal&&(this.bytesLoaded=this.bytesTotal),this.__update(this.bytesLoaded,this.bytesTotal),this.__completed=!0,this.dispatchEvent(new la("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new Bg("progress",
!1,!1,a,b))},__class__:Kf});var uh=function(){Ya.call(this);this.__enabled=!0};k["openfl.display.MovieClip"]=uh;uh.__name__="openfl.display.MovieClip";uh.fromTimeline=function(a){var b=new uh;b.attachTimeline(a);return b};uh.__super__=Ya;uh.prototype=u(Ya.prototype,{__enabled:null,__hasDown:null,__hasOver:null,__hasUp:null,__mouseIsDown:null,__scene:null,__timeline:null,addFrameScript:function(a,b){null!=this.__timeline&&this.__timeline.__addFrameScript(a,b)},attachTimeline:function(a){this.__timeline=
a;null!=a&&(a.__attachMovieClip(this),this.play())},gotoAndPlay:function(a,b){null!=this.__timeline&&this.__timeline.__gotoAndPlay(a,b)},gotoAndStop:function(a,b){null!=this.__timeline&&this.__timeline.__gotoAndStop(a,b)},nextFrame:function(){null!=this.__timeline&&this.__timeline.__nextFrame()},nextScene:function(){null!=this.__timeline&&this.__timeline.__nextScene()},play:function(){null!=this.__timeline&&this.__timeline.__play()},prevFrame:function(){null!=this.__timeline&&this.__timeline.__prevFrame()},
prevScene:function(){null!=this.__timeline&&this.__timeline.__prevScene()},stop:function(){null!=this.__timeline&&this.__timeline.__stop()},__enterFrame:function(a){null!=this.__timeline&&this.__timeline.__enterFrame(a);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__enterFrame(a)}},__stopAllMovieClips:function(){Ya.prototype.__stopAllMovieClips.call(this);this.stop()},__tabTest:function(a){this.__enabled&&Ya.prototype.__tabTest.call(this,a)},__onMouseDown:function(a){this.__enabled&&
this.__hasDown&&this.gotoAndStop("_down");this.__mouseIsDown=!0;null!=this.stage&&this.stage.addEventListener("mouseUp",r(this,this.__onMouseUp),!0)},__onMouseUp:function(a){this.__mouseIsDown=!1;null!=this.stage&&this.stage.removeEventListener("mouseUp",r(this,this.__onMouseUp));this.__buttonMode&&(je.__eq(a.target,this)&&this.__enabled&&this.__hasOver?this.gotoAndStop("_over"):this.__enabled&&this.__hasUp&&this.gotoAndStop("_up"))},__onRollOut:function(a){this.__enabled&&(this.__mouseIsDown&&this.__hasOver?
this.gotoAndStop("_over"):this.__hasUp&&this.gotoAndStop("_up"))},__onRollOver:function(a){this.__enabled&&this.__hasOver&&this.gotoAndStop("_over")},set_buttonMode:function(a){if(this.__buttonMode!=a){if(a){this.__hasUp=this.__hasOver=this.__hasDown=!1;for(var b=0,c=this.get_currentLabels();b<c.length;){var d=c[b];++b;switch(d.name){case "_down":this.__hasDown=!0;break;case "_over":this.__hasOver=!0;break;case "_up":this.__hasUp=!0}}if(this.__hasDown||this.__hasOver||this.__hasUp)this.addEventListener("rollOver",
r(this,this.__onRollOver)),this.addEventListener("rollOut",r(this,this.__onRollOut)),this.addEventListener("mouseDown",r(this,this.__onMouseDown))}else this.removeEventListener("rollOver",r(this,this.__onRollOver)),this.removeEventListener("rollOut",r(this,this.__onRollOut)),this.removeEventListener("mouseDown",r(this,this.__onMouseDown));this.__buttonMode=a}return a},get_currentFrame:function(){return null!=this.__timeline?this.__timeline.__currentFrame:1},get_currentFrameLabel:function(){return null!=
this.__timeline?this.__timeline.__currentFrameLabel:null},get_currentLabel:function(){return null!=this.__timeline?this.__timeline.__currentLabel:null},get_currentLabels:function(){return null!=this.__timeline?this.__timeline.__currentLabels.slice():[]},get_currentScene:function(){if(null!=this.__timeline)return this.__timeline.__currentScene;null==this.__scene&&(this.__scene=new Xo("",[],1));return this.__scene},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=
a},get_framesLoaded:function(){return null!=this.__timeline?this.__timeline.__framesLoaded:1},get_isPlaying:function(){return null!=this.__timeline?this.__timeline.__isPlaying:!1},get_scenes:function(){return null!=this.__timeline?this.__timeline.scenes.slice():[this.get_currentScene()]},get_totalFrames:function(){return null!=this.__timeline?this.__timeline.__totalFrames:1},__class__:uh,__properties__:u(Ya.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_scenes:"get_scenes",get_isPlaying:"get_isPlaying",
get_framesLoaded:"get_framesLoaded",set_enabled:"set_enabled",get_enabled:"get_enabled",get_currentScene:"get_currentScene",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})});var Cb=function(a,b){Re.call(this);this.__context3D=a;this.__context=a.__context;this.__gl=this.gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=null==this.__defaultRenderTarget;null==Te.maxTextureWidth&&
(Te.maxTextureWidth=Te.maxTextureHeight=this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=ta._new();this.__values=[];this.__softwareRenderer=new Vg(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(!0);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=ta._new();this.__projectionFlipped=ta._new();this.__stencilReference=0;this.__tempRect=new fa;this.__defaultDisplayShader=new Hm;this.__defaultGraphicsShader=new Om;this.__defaultShader=
this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new qd(function(){return new Ke});this.__maskShader=new Uh};k["openfl.display.OpenGLRenderer"]=Cb;Cb.__name__="openfl.display.OpenGLRenderer";Cb.__super__=Re;Cb.prototype=u(Re.prototype,{gl:null,__context3D:null,__clipRects:null,__currentDisplayShader:null,__currentGraphicsShader:null,__currentRenderTarget:null,__currentShader:null,__currentShaderBuffer:null,__defaultDisplayShader:null,__defaultGraphicsShader:null,
__defaultRenderTarget:null,__defaultShader:null,__displayHeight:null,__displayWidth:null,__flipped:null,__gl:null,__height:null,__maskShader:null,__matrix:null,__maskObjects:null,__numClipRects:null,__offsetX:null,__offsetY:null,__projection:null,__projectionFlipped:null,__scrollRectMasks:null,__softwareRenderer:null,__stencilReference:null,__tempRect:null,__updatedStencil:null,__upscaled:null,__values:null,__width:null,applyAlpha:function(a){Cb.__alphaValue[0]=a*this.__worldAlpha;null!=this.__currentShaderBuffer?
this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",Cb.__alphaValue):null!=this.__currentShader&&null!=this.__currentShader.__alpha&&(this.__currentShader.__alpha.value=Cb.__alphaValue)},applyBitmapData:function(a,b,c){null==c&&(c=!1);null!=this.__currentShaderBuffer?null!=a&&(Cb.__textureSizeValue[0]=a.__textureWidth,Cb.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",Cb.__textureSizeValue)):null!=this.__currentShader&&(null!=this.__currentShader.__bitmap&&
(this.__currentShader.__bitmap.input=a,this.__currentShader.__bitmap.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__bitmap.mipFilter=2,this.__currentShader.__bitmap.wrap=c?2:0),null!=this.__currentShader.__texture&&(this.__currentShader.__texture.input=a,this.__currentShader.__texture.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__texture.mipFilter=2,this.__currentShader.__texture.wrap=c?2:0),null!=this.__currentShader.__textureSize&&(null!=a?(Cb.__textureSizeValue[0]=a.__textureWidth,
Cb.__textureSizeValue[1]=a.__textureHeight,this.__currentShader.__textureSize.value=Cb.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=null!=a&&!a.__isDefault(!0);this.applyHasColorTransform(b);b?(a.__setArrays(Cb.__colorMultipliersValue,Cb.__colorOffsetsValue),null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",Cb.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",
Cb.__colorOffsetsValue)):null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=Cb.__colorMultipliersValue),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.value=Cb.__colorOffsetsValue))):null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",Cb.__emptyColorValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",Cb.__emptyColorValue)):null!=
this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=Cb.__emptyColorValue),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.value=Cb.__emptyColorValue))},applyHasColorTransform:function(a){Cb.__hasColorTransformValue[0]=a;null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",Cb.__hasColorTransformValue):null!=this.__currentShader&&null!=this.__currentShader.__hasColorTransform&&
(this.__currentShader.__hasColorTransform.value=Cb.__hasColorTransformValue)},applyMatrix:function(a){null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addFloatOverride("openfl_Matrix",a):null!=this.__currentShader&&null!=this.__currentShader.__matrix&&(this.__currentShader.__matrix.value=a)},getMatrix:function(a){null!=this.gl?(a=this.__getMatrix(a,1),ta.set(this.__matrix,0,a[0]),ta.set(this.__matrix,1,a[1]),ta.set(this.__matrix,2,a[2]),ta.set(this.__matrix,3,a[3]),ta.set(this.__matrix,
4,a[4]),ta.set(this.__matrix,5,a[5]),ta.set(this.__matrix,6,a[6]),ta.set(this.__matrix,7,a[7]),ta.set(this.__matrix,8,a[8]),ta.set(this.__matrix,9,a[9]),ta.set(this.__matrix,10,a[10]),ta.set(this.__matrix,11,a[11]),ta.set(this.__matrix,12,a[12]),ta.set(this.__matrix,13,a[13]),ta.set(this.__matrix,14,a[14]),ta.set(this.__matrix,15,a[15])):(ta.identity(this.__matrix),ta.set(this.__matrix,0,a.a),ta.set(this.__matrix,1,a.b),ta.set(this.__matrix,4,a.c),ta.set(this.__matrix,5,a.d),ta.set(this.__matrix,
12,a.tx),ta.set(this.__matrix,13,a.ty));return this.__matrix},setShader:function(a){this.__currentShaderBuffer=null;this.__currentShader!=a&&(null==a?(this.__currentShader=null,this.__context3D.setProgram(null)):(this.__currentShader=a,this.__initShader(a),this.__context3D.setProgram(a.program),this.__context3D.__flushGLProgram(),this.__currentShader.__enable(),this.__context3D.__state.shader=a))},setViewport:function(){this.__gl.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight)},
updateShader:function(){null!=this.__currentShader&&(null!=this.__currentShader.__position&&(this.__currentShader.__position.__useArray=!0),null!=this.__currentShader.__textureCoord&&(this.__currentShader.__textureCoord.__useArray=!0),this.__context3D.setProgram(this.__currentShader.program),this.__context3D.__flushGLProgram(),this.__context3D.__flushGLTextures(),this.__currentShader.__update())},useAlphaArray:function(){null!=this.__currentShader&&null!=this.__currentShader.__alpha&&(this.__currentShader.__alpha.__useArray=
!0)},useColorTransformArray:function(){null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.__useArray=!0),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.__useArray=!0))},__cleanup:function(){0<this.__stencilReference&&(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects&&(this.__numClipRects=0,this.__scissorRect())},__clear:function(){null==
this.__stage||this.__stage.__transparent?this.__context3D.clear(0,0,0,0,0,0,1):this.__context3D.clear(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2],1,0,0,1);this.__cleared=!0},__clearShader:function(){null!=this.__currentShader&&(null==this.__currentShaderBuffer?null!=this.__currentShader.__bitmap&&(this.__currentShader.__bitmap.input=null):this.__currentShaderBuffer.clearOverride(),null!=this.__currentShader.__texture&&(this.__currentShader.__texture.input=
null),null!=this.__currentShader.__textureSize&&(this.__currentShader.__textureSize.value=null),null!=this.__currentShader.__hasColorTransform&&(this.__currentShader.__hasColorTransform.value=null),null!=this.__currentShader.__position&&(this.__currentShader.__position.value=null),null!=this.__currentShader.__matrix&&(this.__currentShader.__matrix.value=null),this.__currentShader.__clearUseArray())},__copyShader:function(a){this.__currentShader=a.__currentShader;this.__currentShaderBuffer=a.__currentShaderBuffer;
this.__currentDisplayShader=a.__currentDisplayShader;this.__currentGraphicsShader=a.__currentGraphicsShader},__getMatrix:function(a,b){var c=wa.__pool.get();c.copyFrom(a);c.concat(this.__worldTransform);if(0==b||1==b&&0==c.b&&0==c.c&&1.001>c.a&&.999<c.a&&1.001>c.d&&.999<c.d)c.tx=Math.round(c.tx),c.ty=Math.round(c.ty);ta.identity(this.__matrix);ta.set(this.__matrix,0,c.a);ta.set(this.__matrix,1,c.b);ta.set(this.__matrix,4,c.c);ta.set(this.__matrix,5,c.d);ta.set(this.__matrix,12,c.tx);ta.set(this.__matrix,
13,c.ty);ta.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);this.__values[0]=ta.get(this.__matrix,0);this.__values[1]=ta.get(this.__matrix,1);this.__values[2]=ta.get(this.__matrix,2);this.__values[3]=ta.get(this.__matrix,3);this.__values[4]=ta.get(this.__matrix,4);this.__values[5]=ta.get(this.__matrix,5);this.__values[6]=ta.get(this.__matrix,6);this.__values[7]=ta.get(this.__matrix,7);this.__values[8]=ta.get(this.__matrix,8);this.__values[9]=ta.get(this.__matrix,9);
this.__values[10]=ta.get(this.__matrix,10);this.__values[11]=ta.get(this.__matrix,11);this.__values[12]=ta.get(this.__matrix,12);this.__values[13]=ta.get(this.__matrix,13);this.__values[14]=ta.get(this.__matrix,14);this.__values[15]=ta.get(this.__matrix,15);wa.__pool.release(c);return this.__values},__initShader:function(a){return null!=a?(null==a.__context?(a.__context=this.__context3D,a.__init()):a.__context!=this.__context3D&&(a.__context=this.__context3D,a.__reinit()),a):this.__defaultShader},
__initDisplayShader:function(a){return null!=a?(null==a.__context?(a.__context=this.__context3D,a.__init()):a.__context!=this.__context3D&&(a.__context=this.__context3D,a.__reinit()),a):this.__defaultDisplayShader},__initGraphicsShader:function(a){return null!=a?(null==a.__context?(a.__context=this.__context3D,a.__init()):a.__context!=this.__context3D&&(a.__context=this.__context3D,a.__reinit()),a):this.__defaultGraphicsShader},__initShaderBuffer:function(a){return null!=a?this.__initGraphicsShader(a.shader):
this.__defaultGraphicsShader},__popMask:function(){if(0!=this.__stencilReference){var a=this.__maskObjects.pop();1<this.__stencilReference?(this.__context3D.setStencilActions(2,1,0,0,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255),this.__context3D.setColorMask(!1,!1,!1,!1),this.__renderDrawableMask(a),this.__stencilReference--,this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0),this.__context3D.setColorMask(!0,
!0,!0,!0)):(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0))}},__popMaskObject:function(a,b){null==b&&(b=!0);null!=a.__mask&&this.__popMask();b&&null!=a.__scrollRect&&(0!=a.__renderTransform.b||0!=a.__renderTransform.c?(this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-1]),this.__popMask()):this.__popMaskRect())},__popMaskRect:function(){0<this.__numClipRects&&(this.__numClipRects--,0<this.__numClipRects?this.__scissorRect(this.__clipRects[this.__numClipRects-
1]):this.__scissorRect())},__pushMask:function(a){0==this.__stencilReference&&(this.__context3D.clear(0,0,0,0,0,0,4),this.__updatedStencil=!0);this.__context3D.setStencilActions(2,1,2,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(!1,!1,!1,!1);this.__renderDrawableMask(a);this.__maskObjects.push(a);this.__stencilReference++;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,
255,0);this.__context3D.setColorMask(!0,!0,!0,!0)},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&(0!=a.__renderTransform.b||0!=a.__renderTransform.c?(b=this.__scrollRectMasks.get(),b.get_graphics().clear(),b.get_graphics().beginFill(65280),b.get_graphics().drawRect(a.__scrollRect.x,a.__scrollRect.y,a.__scrollRect.width,a.__scrollRect.height),b.__renderTransform.copyFrom(a.__renderTransform),this.__pushMask(b)):this.__pushMaskRect(a.__scrollRect,a.__renderTransform));null!=
a.__mask&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new fa);var c=wa.__pool.get();c.copyFrom(b);c.concat(this.__worldTransform);b=this.__clipRects[this.__numClipRects];a.__transform(b,c);0<this.__numClipRects&&(a=this.__clipRects[this.__numClipRects-1],b.__contract(a.x,a.y,a.width,a.height));0>b.height&&(b.height=0);0>b.width&&(b.width=0);wa.__pool.release(c);this.__scissorRect(b);this.__numClipRects++},
__render:function(a){this.__context3D.setColorMask(!0,!0,!0,!0);this.__context3D.setCulling(3);this.__context3D.setDepthTest(!1,0);this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0);this.__context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);if(null==this.__defaultRenderTarget){if(Cb.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),
this.__upscaled=1!=this.__worldTransform.a||1!=this.__worldTransform.d,this.__renderDrawable(a),0<this.__offsetX||0<this.__offsetY)0<this.__offsetX&&(Cb.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),Cb.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),
this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),0<this.__offsetY&&(Cb.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),Cb.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),
this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.__context3D.setScissorRectangle(null)}else{Cb.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(Cb.__scissorRectangle);var b=a.__mask,c=a.__scrollRect;a.__mask=null;a.__scrollRect=null;this.__renderDrawable(a);a.__mask=b;a.__scrollRect=c}this.__context3D.present()},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 0:Qm.renderDrawable(a,
this);break;case 2:tf.renderDrawable(a,this);break;case 3:Xg.renderDrawable(a,this);break;case 4:case 5:Rm.renderDrawable(a,this);break;case 6:Sm.renderDrawable(a,this);break;case 7:Yg.renderDrawable(a,this);break;case 8:uf.renderDrawable(a,this);break;case 9:ea.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 0:Qm.renderDrawableMask(a,this);break;case 2:tf.renderDrawableMask(a,this);break;case 3:Xg.renderDrawableMask(a,this);break;case 4:case 5:Rm.renderDrawableMask(a,
this);break;case 6:Sm.renderDrawableMask(a,this);break;case 7:Yg.renderDrawableMask(a,this);break;case 8:uf.renderDrawableMask(a,this);break;case 9:ea.renderDrawableMask(a,this)}},__renderFilterPass:function(a,b,c,d){null==d&&(d=!0);if(null!=a&&null!=b&&null!=this.__defaultRenderTarget){var e=this.__context3D.__state.renderToTexture,f=this.__context3D.__state.renderToTextureDepthStencil,g=this.__context3D.__state.renderToTextureAntiAlias,h=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),
!1);d&&this.__context3D.clear(0,0,0,0,0,0,1);b=this.__initShader(b);this.setShader(b);this.applyAlpha(1);this.applyBitmapData(a,c);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(a.__renderTransform,1));this.updateShader();c=a.getVertexBuffer(this.__context3D);null!=b.__position&&this.__context3D.setVertexBufferAt(b.__position.index,c,0,3);null!=b.__textureCoord&&this.__context3D.setVertexBufferAt(b.__textureCoord.index,c,3,2);a=a.getIndexBuffer(this.__context3D);this.__context3D.drawTriangles(a);
null!=e?this.__context3D.setRenderToTexture(e,f,g,h):this.__context3D.setRenderToBackBuffer();this.__clearShader()}},__resize:function(a,b){this.__width=a;this.__height=b;a=null==this.__defaultRenderTarget?this.__stage.stageWidth:this.__defaultRenderTarget.width;b=null==this.__defaultRenderTarget?this.__stage.stageHeight:this.__defaultRenderTarget.height;if(null==this.__defaultRenderTarget){var c=this.__worldTransform;c=Math.round(0*c.a+0*c.c+c.tx)}else c=0;this.__offsetX=c;null==this.__defaultRenderTarget?
(c=this.__worldTransform,c=Math.round(0*c.b+0*c.d+c.ty)):c=0;this.__offsetY=c;null==this.__defaultRenderTarget?(c=this.__worldTransform,c=Math.round(a*c.a+0*c.c+c.tx-this.__offsetX)):c=a;this.__displayWidth=c;null==this.__defaultRenderTarget?(c=this.__worldTransform,c=Math.round(0*c.b+b*c.d+c.ty-this.__offsetY)):c=b;this.__displayHeight=c;ta.createOrtho(this.__projection,0,this.__displayWidth+2*this.__offsetX,0,this.__displayHeight+2*this.__offsetY,-1E3,1E3);ta.createOrtho(this.__projectionFlipped,
0,this.__displayWidth+2*this.__offsetX,this.__displayHeight+2*this.__offsetY,0,-1E3,1E3)},__resumeClipAndMask:function(a){0<this.__stencilReference?(this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0)):(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect()},__scissorRect:function(a){if(null!=a){var b=
Math.floor(a.x),c=Math.floor(a.y),d=0<a.width?Math.ceil(a.get_right())-b:0;a=0<a.height?Math.ceil(a.get_bottom())-c:0;0>d&&(d=0);0>a&&(a=0);Cb.__scissorRectangle.setTo(b,c,d,a);this.__context3D.setScissorRectangle(Cb.__scissorRectangle)}else this.__context3D.setScissorRectangle(null)},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);if(this.__blendMode!=a)switch(this.__blendMode=a,a){case 0:this.__context3D.setBlendFactors(2,2);break;case 9:this.__context3D.setBlendFactors(1,
5);break;case 12:this.__context3D.setBlendFactors(2,6);break;case 14:this.__context3D.setBlendFactors(2,2);this.__context3D.__setGLBlendEquation(this.__gl.FUNC_REVERSE_SUBTRACT);break;default:this.__context3D.setBlendFactors(2,5)}},__setRenderTarget:function(a){this.__defaultRenderTarget=a;this.__flipped=null==a;null!=a&&this.__resize(a.width,a.height)},__setShaderBuffer:function(a){this.setShader(a.shader);this.__currentShaderBuffer=a},__suspendClipAndMask:function(){0<this.__stencilReference&&(this.__context3D.setStencilActions(),
this.__context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects&&this.__scissorRect()},__updateShaderBuffer:function(a){null!=this.__currentShader&&null!=this.__currentShaderBuffer&&this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,a)},__class__:Cb});var So=function(a){null==a&&(a=!1);this.fastCompression=a};k["openfl.display.PNGEncoderOptions"]=So;So.__name__="openfl.display.PNGEncoderOptions";So.prototype={fastCompression:null,__class__:So};var Yo=function(a){this.onComplete=
new Bd;this.display=a;null!=a&&(a.addEventListener("unload",r(this,this.display_onUnload)),Da.get_current().addChild(a))};k["openfl.display.Preloader"]=Yo;Yo.__name__="openfl.display.Preloader";Yo.prototype={onComplete:null,complete:null,display:null,ready:null,start:function(){this.ready=!0;Da.get_current().get_loaderInfo().__complete();if(null!=this.display){var a=new la("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new la("unload"))}else this.complete||
(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){Da.get_current().get_loaderInfo().__update(a,b);null!=this.display&&this.display.dispatchEvent(new Bg("progress",!0,!0,a,b))},display_onUnload:function(a){null!=this.display&&(this.display.removeEventListener("unload",r(this,this.display_onUnload)),this.display.parent==Da.get_current()&&Da.get_current().removeChild(this.display),Da.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,
this.onComplete.dispatch())},__class__:Yo};var Tm=function(){Ya.call(this);var a=this.getBackgroundColor(),b=0;70>.299*(a>>16&255)+.587*(a>>8&255)+.114*(a&255)&&(b=16777215);a=this.getHeight()/2-3.5;var c=this.getWidth()-60;this.outline=new Ke;this.outline.get_graphics().beginFill(b,.07);this.outline.get_graphics().drawRect(0,0,c,7);this.outline.set_x(30);this.outline.set_y(a);this.outline.set_alpha(0);this.addChild(this.outline);this.progress=new Ke;this.progress.get_graphics().beginFill(b,.35);
this.progress.get_graphics().drawRect(0,0,c-4,3);this.progress.set_x(32);this.progress.set_y(a+2);this.progress.set_scaleX(0);this.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=Da.getTimer()+100;this.endAnimation=this.startAnimation+1E3;this.addEventListener("addedToStage",r(this,this.this_onAddedToStage))};k["openfl.display.DefaultPreloader"]=Tm;Tm.__name__="openfl.display.DefaultPreloader";Tm.__super__=Ya;Tm.prototype=u(Ya.prototype,{endAnimation:null,outline:null,progress:null,
startAnimation:null,getBackgroundColor:function(){var a=Da.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&null!=a.background?a.background:0},getHeight:function(){var a=Da.get_current().stage.window.__height;return 0<a?a:Da.get_current().stage.stageHeight},getWidth:function(){var a=Da.get_current().stage.window.__width;return 0<a?a:Da.get_current().stage.stageWidth},onInit:function(){this.addEventListener("enterFrame",r(this,this.this_onEnterFrame))},
onLoaded:function(){this.removeEventListener("enterFrame",r(this,this.this_onEnterFrame));this.dispatchEvent(new la("unload"))},onUpdate:function(a,b){var c=0;0<b&&(c=a/b,1<c&&(c=1));this.progress.set_scaleX(c)},this_onAddedToStage:function(a){this.removeEventListener("addedToStage",r(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",r(this,this.this_onProgress));this.addEventListener("complete",
r(this,this.this_onComplete))},this_onComplete:function(a){a.preventDefault();this.removeEventListener("progress",r(this,this.this_onProgress));this.removeEventListener("complete",r(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(a){a=(Da.getTimer()-this.startAnimation)/(this.endAnimation-this.startAnimation);0>a&&(a=0);1<a&&(a=1);this.outline.set_alpha(this.progress.set_alpha(a))},this_onProgress:function(a){this.onUpdate(a.bytesLoaded|0,a.bytesTotal|0)},__class__:Tm});var Xo=
function(a,b,c){this.name=a;this.labels=b;this.numFrames=c};k["openfl.display.Scene"]=Xo;Xo.__name__="openfl.display.Scene";Xo.prototype={labels:null,name:null,numFrames:null,__class__:Xo};var Or={_new:function(a){return{}}},dl=function(){this.channels=0;this.filter=5;this.index=this.height=0;this.mipFilter=2;this.wrap=this.width=0};k["openfl.display.ShaderInput"]=dl;dl.__name__="openfl.display.ShaderInput";dl.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,
width:null,wrap:null,__isUniform:null,__disableGL:function(a,b){0>b||a.setTextureAt(b,null)},__updateGL:function(a,b,c,d,e,f){c=null!=c?c:this.input;d=null!=d?d:this.filter;e=null!=e?e:this.mipFilter;f=null!=f?f:this.wrap;null!=c?(a.setTextureAt(b,c.getTexture(a)),a.setSamplerStateAt(b,f,d,e)):a.setTextureAt(b,null)},__class__:dl};var si=function(){this.index=0};k["openfl.display.ShaderParameter"]=si;si.__name__="openfl.display.ShaderParameter";si.prototype={index:null,name:null,type:null,value:null,
__arrayLength:null,__internal:null,__isBool:null,__isFloat:null,__isInt:null,__isUniform:null,__length:null,__uniformMatrix:null,__useArray:null,__disableGL:function(a){if(!(0>this.index||(a=a.gl,this.__isUniform)))for(var b=0,c=this.__arrayLength;b<c;){var d=b++;a.disableVertexAttribArray(this.index+d)}},__updateGL:function(a,b){if(!(0>this.index)){a=a.gl;b=null!=b?b:this.value;var c=this.__isBool?b:null,d=this.__isFloat?b:null,e=this.__isInt?b:null;if(this.__isUniform)if(null!=b&&b.length>=this.__length)switch(this.type){case 0:a.uniform1i(this.index,
c[0]?1:0);break;case 1:a.uniform2i(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.uniform3i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.uniform4i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.uniform1f(this.index,d[0]);break;case 5:a.uniform2f(this.index,d[0],d[1]);break;case 6:a.uniform3f(this.index,d[0],d[1],d[2]);break;case 7:a.uniform4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.uniform1i(this.index,e[0]);break;case 9:a.uniform2i(this.index,e[0],e[1]);break;case 10:a.uniform3i(this.index,
e[0],e[1],e[2]);break;case 11:a.uniform4i(this.index,e[0],e[1],e[2],e[3]);break;case 12:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];$b.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];this.__uniformMatrix[4]=d[4];this.__uniformMatrix[5]=d[5];this.__uniformMatrix[6]=d[6];this.__uniformMatrix[7]=
d[7];this.__uniformMatrix[8]=d[8];$b.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=d[0],this.__uniformMatrix[1]=d[1],this.__uniformMatrix[2]=d[2],this.__uniformMatrix[3]=d[3],this.__uniformMatrix[4]=d[4],this.__uniformMatrix[5]=d[5],this.__uniformMatrix[6]=d[6],this.__uniformMatrix[7]=d[7],this.__uniformMatrix[8]=d[8],this.__uniformMatrix[9]=d[9],this.__uniformMatrix[10]=d[10],this.__uniformMatrix[11]=d[11],this.__uniformMatrix[12]=d[12],this.__uniformMatrix[13]=
d[13],this.__uniformMatrix[14]=d[14],this.__uniformMatrix[15]=d[15],$b.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else switch(this.type){case 1:case 9:a.uniform2i(this.index,0,0);break;case 3:case 11:a.uniform4i(this.index,0,0,0,0);break;case 4:a.uniform1f(this.index,0);break;case 5:a.uniform2f(this.index,0,0);break;case 6:a.uniform3f(this.index,0,0,0);break;case 7:a.uniform4f(this.index,0,0,0,0);break;case 0:case 8:a.uniform1i(this.index,0);break;case 2:case 10:a.uniform3i(this.index,
0,0,0);break;case 12:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;$b.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;this.__uniformMatrix[4]=0;this.__uniformMatrix[5]=0;this.__uniformMatrix[6]=0;this.__uniformMatrix[7]=0;this.__uniformMatrix[8]=0;$b.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=
0,this.__uniformMatrix[1]=0,this.__uniformMatrix[2]=0,this.__uniformMatrix[3]=0,this.__uniformMatrix[4]=0,this.__uniformMatrix[5]=0,this.__uniformMatrix[6]=0,this.__uniformMatrix[7]=0,this.__uniformMatrix[8]=0,this.__uniformMatrix[9]=0,this.__uniformMatrix[10]=0,this.__uniformMatrix[11]=0,this.__uniformMatrix[12]=0,this.__uniformMatrix[13]=0,this.__uniformMatrix[14]=0,this.__uniformMatrix[15]=0,$b.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else if(this.__useArray||null!=b&&b.length!=this.__length)for(f=
0,g=this.__arrayLength;f<g;)h=f++,a.enableVertexAttribArray(this.index+h);else{for(var f=0,g=this.__arrayLength;f<g;){var h=f++;a.disableVertexAttribArray(this.index+h)}if(null!=b)switch(this.type){case 0:a.vertexAttrib1f(this.index,c[0]?1:0);break;case 1:a.vertexAttrib2f(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.vertexAttrib3f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.vertexAttrib4f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.vertexAttrib1f(this.index,d[0]);break;
case 5:a.vertexAttrib2f(this.index,d[0],d[1]);break;case 6:a.vertexAttrib3f(this.index,d[0],d[1],d[2]);break;case 7:a.vertexAttrib4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.vertexAttrib1f(this.index,e[0]);break;case 9:a.vertexAttrib2f(this.index,e[0],e[1]);break;case 10:a.vertexAttrib3f(this.index,e[0],e[1],e[2]);break;case 11:a.vertexAttrib4f(this.index,e[0],e[1],e[2],e[3]);break;case 12:a.vertexAttrib2f(this.index+0,d[0],d[1]);a.vertexAttrib2f(this.index+1,d[2],d[3]);break;case 16:a.vertexAttrib3f(this.index+
0,d[0],d[1],d[2]);a.vertexAttrib3f(this.index+1,d[3],d[4],d[5]);a.vertexAttrib3f(this.index+2,d[6],d[7],d[8]);break;case 20:a.vertexAttrib4f(this.index+0,d[0],d[1],d[2],d[3]),a.vertexAttrib4f(this.index+1,d[4],d[5],d[6],d[7]),a.vertexAttrib4f(this.index+2,d[8],d[9],d[10],d[11]),a.vertexAttrib4f(this.index+3,d[12],d[13],d[14],d[15])}else switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:a.vertexAttrib1f(this.index,
0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}}},__updateGLFromBuffer:function(a,b,c,d,e){if(!(0>this.index))if(a=
a.gl,this.__isUniform){if(d>=this.__length)switch(this.type){case 1:case 9:a.uniform2i(this.index,b[c]|0,b[c+1]|0);break;case 3:case 11:a.uniform4i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0,b[c+3]|0);break;case 4:a.uniform1f(this.index,b[c]);break;case 5:a.uniform2f(this.index,b[c],b[c+1]);break;case 6:a.uniform3f(this.index,b[c],b[c+1],b[c+2]);break;case 7:a.uniform4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 8:a.uniform1i(this.index,b[c]|0);break;case 2:case 10:a.uniform3i(this.index,b[c]|
0,b[c+1]|0,b[c+2]|0);break;case 12:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];$b.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];this.__uniformMatrix[4]=b[c+4];this.__uniformMatrix[5]=b[c+5];this.__uniformMatrix[6]=b[c+6];this.__uniformMatrix[7]=b[c+7];this.__uniformMatrix[8]=b[c+
8];$b.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=b[c],this.__uniformMatrix[1]=b[c+1],this.__uniformMatrix[2]=b[c+2],this.__uniformMatrix[3]=b[c+3],this.__uniformMatrix[4]=b[c+4],this.__uniformMatrix[5]=b[c+5],this.__uniformMatrix[6]=b[c+6],this.__uniformMatrix[7]=b[c+7],this.__uniformMatrix[8]=b[c+8],this.__uniformMatrix[9]=b[c+9],this.__uniformMatrix[10]=b[c+10],this.__uniformMatrix[11]=b[c+11],this.__uniformMatrix[12]=b[c+12],this.__uniformMatrix[13]=
b[c+13],this.__uniformMatrix[14]=b[c+14],this.__uniformMatrix[15]=b[c+15],$b.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}}else if(this.__internal||0!=d&&d!=this.__length){b=a.FLOAT;this.__isBool?b=a.INT:this.__isInt&&(b=a.INT);f=0;for(g=this.__arrayLength;f<g;)h=f++,a.enableVertexAttribArray(this.index+h);if(0<d)for(f=0,g=this.__arrayLength;f<g;)h=f++,a.vertexAttribPointer(this.index+h,this.__length,b,!1,4*this.__length,4*(c+e*this.__length+h*this.__arrayLength))}else{for(var f=0,g=this.__arrayLength;f<
g;){var h=f++;a.disableVertexAttribArray(this.index+h)}if(0<d)switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,b[c],b[c+1]);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 4:case 8:a.vertexAttrib1f(this.index,b[c]);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,b[c],b[c+1],b[c+2]);break;case 12:a.vertexAttrib2f(this.index+0,b[c],b[c+1]);a.vertexAttrib2f(this.index+1,b[c+2],b[c+2+1]);break;case 16:a.vertexAttrib3f(this.index+
0,b[c],b[c+1],b[c+2]);a.vertexAttrib3f(this.index+1,b[c+3],b[c+3+1],b[c+3+2]);a.vertexAttrib3f(this.index+2,b[c+6],b[c+6+1],b[c+6+2]);break;case 20:a.vertexAttrib4f(this.index+0,b[c],b[c+1],b[c+2],b[c+3]),a.vertexAttrib4f(this.index+1,b[c+4],b[c+4+1],b[c+4+2],b[c+4+3]),a.vertexAttrib4f(this.index+2,b[c+8],b[c+8+1],b[c+8+2],b[c+8+3]),a.vertexAttrib4f(this.index+3,b[c+12],b[c+12+1],b[c+12+2],b[c+12+3])}else switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,
0,0,0,0);break;case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,
0,0,0)}}},set_name:function(a){this.__internal=R.startsWith(a,"openfl_");return this.name=a},__class__:si,__properties__:{set_name:"set_name"}};var Ke=function(){ab.call(this);this.__drawableType=3};k["openfl.display.Shape"]=Ke;Ke.__name__="openfl.display.Shape";Ke.__super__=ab;Ke.prototype=u(ab.prototype,{get_graphics:function(){null==this.__graphics&&(this.__graphics=new Te(this));return this.__graphics},__class__:Ke,__properties__:u(ab.prototype.__properties__,{get_graphics:"get_graphics"})});
var Mi=function(a,b,c,d){D.call(this);this.__drawableType=6;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=null!=a?a:new ab;this.__overState=b;this.__downState=c;this.set_hitTestState(null!=d?d:new ab);this.addEventListener("mouseDown",r(this,this.__this_onMouseDown));this.addEventListener("mouseOut",r(this,this.__this_onMouseOut));this.addEventListener("mouseOver",r(this,this.__this_onMouseOver));this.addEventListener("mouseUp",r(this,this.__this_onMouseUp));this.__tabEnabled=
!0;this.set___currentState(this.__upState);null!=Mi.__constructor&&(a=Mi.__constructor,Mi.__constructor=null,a(this))};k["openfl.display.SimpleButton"]=Mi;Mi.__name__="openfl.display.SimpleButton";Mi.__super__=D;Mi.prototype=u(D.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,__overState:null,__previousStates:null,__soundTransform:null,__upState:null,__getBounds:function(a,b){D.prototype.__getBounds.call(this,
a,b);var c=wa.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getBounds(a,c);wa.__pool.release(c)},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)D.prototype.__getRenderBounds.call(this,a,b);else{D.prototype.__getBounds.call(this,a,b);var c=wa.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=
d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getRenderBounds(a,c);wa.__pool.release(c)}},__getCursor:function(){return this.useHandCursor&&!this.__ignoreEvent&&this.enabled?"button":null},__hitTest:function(a,b,c,d,e,f){var g=!1;null!=this.get_hitTestState()?this.get_hitTestState().__hitTest(a,b,c,d,e,f)&&(null!=d&&(0==d.length?d[0]=f:d[d.length-1]=f),g=!e||this.mouseEnabled):null!=this.__currentState&&(!f.get_visible()||this.__isMask||
e&&!this.mouseEnabled||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b)?g=!1:this.__currentState.__hitTest(a,b,c,d,e,f)&&(g=e));if(null!=d)for(;1<d.length&&d[d.length-1]==d[d.length-2];)d.pop();return g},__hitTestMask:function(a,b){var c=!1;this.__currentState.__hitTestMask(a,b)&&(c=!0);return c},__setStageReference:function(a){D.prototype.__setStageReference.call(this,a);null!=this.__currentState&&this.__currentState.__setStageReference(a);null!=this.get_hitTestState()&&this.get_hitTestState()!=
this.__currentState&&this.get_hitTestState().__setStageReference(a)},__setTransformDirty:function(){D.prototype.__setTransformDirty.call(this);null!=this.__currentState&&this.__currentState.__setTransformDirty();null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setTransformDirty()},__update:function(a,b){D.prototype.__update.call(this,a,b);b&&(null!=this.__currentState&&this.__currentState.__update(a,!0),null!=this.get_hitTestState()&&this.get_hitTestState()!=
this.__currentState&&this.get_hitTestState().__update(a,!0))},__updateTransforms:function(a){D.prototype.__updateTransforms.call(this,a);null!=this.__currentState&&this.__currentState.__updateTransforms();null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__updateTransforms()},get_downState:function(){return this.__downState},set_downState:function(a){null!=this.__downState&&this.__currentState==this.__downState&&this.set___currentState(this.__downState);
return this.__downState=a},get_hitTestState:function(){return this.__hitTestState},set_hitTestState:function(a){null!=this.__hitTestState&&this.__hitTestState!=a&&this.__hitTestState!=this.get_downState()&&this.__hitTestState!=this.get_upState()&&this.__hitTestState!=this.get_overState()&&(this.__hitTestState.__renderParent=null);null!=a&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__hitTestState=a},get_overState:function(){return this.__overState},
set_overState:function(a){null!=this.__overState&&this.__currentState==this.__overState&&this.set___currentState(a);return this.__overState=a},get_soundTransform:function(){null==this.__soundTransform&&(this.__soundTransform=new gf);return new gf(this.__soundTransform.volume,this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new gf(a.volume,a.pan);return a},get_upState:function(){return this.__upState},set_upState:function(a){null!=this.__upState&&this.__currentState==
this.__upState&&this.set___currentState(a);return this.__upState=a},set___currentState:function(a){null!=this.__currentState&&this.__currentState!=this.get_hitTestState()&&(this.__currentState.__renderParent=null);null!=a&&null!=a.parent&&a.parent.removeChild(a);ab.__supportDOM&&null==this.__previousStates&&(this.__previousStates=ub.toObjectVector(null));if(a!=this.__currentState){if(ab.__supportDOM){null!=this.__currentState&&(this.__currentState.__setStageReference(null),this.__previousStates.push(this.__currentState));
var b=this.__previousStates.indexOf(a,0);if(-1<b){var c=this.__previousStates;c.__tempIndex=b;b=0;for(var d=[];b<d.length;){var e=d[b++];c.insertAt(c.__tempIndex,e);c.__tempIndex++}c.splice(c.__tempIndex,1)}}null!=a&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}return this.__currentState=a},__this_onMouseDown:function(a){this.enabled&&this.set___currentState(this.get_downState())},
__this_onMouseOut:function(a){this.__ignoreEvent=!1;this.get_upState()!=this.__currentState&&this.set___currentState(this.get_upState())},__this_onMouseOver:function(a){a.buttonDown&&(this.__ignoreEvent=!0);this.get_overState()!=this.__currentState&&null!=this.get_overState()&&!this.__ignoreEvent&&this.enabled&&this.set___currentState(this.get_overState())},__this_onMouseUp:function(a){this.__ignoreEvent=!1;this.enabled&&null!=this.get_overState()?this.set___currentState(this.get_overState()):this.set___currentState(this.get_upState())},
__class__:Mi,__properties__:u(D.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_overState:"set_overState",get_overState:"get_overState",set_hitTestState:"set_hitTestState",get_hitTestState:"get_hitTestState",set_downState:"set_downState",get_downState:"get_downState"})});var Ni=function(a,b){jb.call(this);this.__drawableType=5;this.set_name(null);
this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__deltaTime=this.__currentTabOrderIndex=0;this.__displayState=2;this.__logicalHeight=this.__logicalWidth=this.__lastClickTime=this.__mouseY=this.__mouseX=0;this.__displayMatrix=new wa;this.__displayRect=new fa;this.__renderDirty=!0;this.stage3Ds=ub.toObjectVector(null);this.stage3Ds.push(new Vh(this));this.stage3Ds.push(new Vh(this));this.stage3Ds.push(new Vh(this));this.stage3Ds.push(new Vh(this));
this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new fa;this.stageFocusRect=!0;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=!0;this.__forceRender=!1;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new Xa;null==Da.get_current().__loaderInfo&&
(Da.get_current().__loaderInfo=Kf.create(null),Da.get_current().__loaderInfo.content=Da.get_current());this.__uncaughtErrorEvents=Da.get_current().__loaderInfo.uncaughtErrorEvents;this.application=a.application;this.window=a;this.set_color(b);this.__contentsScaleFactor=a.__scale;this.__wasFullscreen=a.__fullscreen;this.__resize();null==Da.get_current().stage&&this.stage.addChild(Da.get_current())};k["openfl.display.Stage"]=Ni;Ni.__name__="openfl.display.Stage";Ni.__interfaces__=[Kj];Ni.__super__=
jb;Ni.prototype=u(jb.prototype,{align:null,allowsFullScreen:null,allowsFullScreenInteractive:null,application:null,context3D:null,showDefaultContextMenu:null,softKeyboardRect:null,stage3Ds:null,stageFocusRect:null,stageHeight:null,stageWidth:null,window:null,__cacheFocus:null,__clearBeforeRender:null,__color:null,__colorSplit:null,__colorString:null,__contentsScaleFactor:null,__currentTabOrderIndex:null,__deltaTime:null,__dirty:null,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,
__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullscreen:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime:null,__lastClickTarget:null,__logicalWidth:null,__logicalHeight:null,__macKeyboard:null,__mouseDownLeft:null,__mouseDownMiddle:null,__mouseDownRight:null,__mouseOutStack:null,__mouseOverTarget:null,__mouseX:null,__mouseY:null,__pendingMouseEvent:null,__pendingMouseX:null,__pendingMouseY:null,__quality:null,__renderer:null,__rendering:null,
__rollOutStack:null,__scaleMode:null,__stack:null,__touchData:null,__transparent:null,__uncaughtErrorEvents:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,invalidate:function(){this.__renderDirty=this.__invalidated=!0},localToGlobal:function(a){return a.clone()},__broadcastEvent:function(a){if(Object.prototype.hasOwnProperty.call(ab.__broadcastEvents.h,a.type))for(var b=ab.__broadcastEvents.h[a.type],c=0;c<b.length;){var d=b[c];++c;if(d.stage==this||null==d.stage)if(this.__uncaughtErrorEvents.__enabled)try{d.__dispatch(a)}catch(e){xb.lastError=
e,d=J.caught(e).unwrap(),this.__handleError(d)}else d.__dispatch(a)}},__createRenderer:function(){var a=this.window.__width*this.window.__scale|0,b=this.window.__height*this.window.__scale|0;switch(this.window.context.type){case "canvas":this.__renderer=new Vg(this.window.context.canvas2D);break;case "dom":this.__renderer=new Tj(this.window.context.dom);break;case "opengl":case "opengles":case "webgl":this.context3D=new Ub(this),this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,
0,!0,!0,!0),this.context3D.present(),this.__renderer=new Cb(this.context3D)}if(null!=this.__renderer){var c=this.get_quality();this.__renderer.__allowSmoothing=2!=c;this.__renderer.__pixelRatio=this.window.__scale;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(a,b)}},__dispatchEvent:function(a){if(this.__uncaughtErrorEvents.__enabled)try{var b=jb.prototype.__dispatchEvent.call(this,a)}catch(c){xb.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a),
b=!1}else b=jb.prototype.__dispatchEvent.call(this,a);return b},__dispatchPendingMouseEvent:function(){this.__pendingMouseEvent&&(this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0),this.__pendingMouseEvent=!1)},__dispatchStack:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{var c=b.length;if(0==c){a.eventPhase=2;var d=a.target;d.__dispatch(a)}else{a.eventPhase=1;a.target=b[b.length-1];for(var e=0,f=c-1;e<f;){var g=e++;b[g].__dispatch(a);if(a.__isCanceled)return}a.eventPhase=
2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,g=c-2;0<=g;){b[g].__dispatch(a);if(a.__isCanceled)break;--g}}}catch(h){xb.lastError=h,a=J.caught(h).unwrap(),this.__handleError(a)}else if(c=b.length,0==c)a.eventPhase=2,d=a.target,d.__dispatch(a);else{a.eventPhase=1;a.target=b[b.length-1];e=0;for(f=c-1;e<f;)if(g=e++,b[g].__dispatch(a),a.__isCanceled)return;a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,g=c-2;0<=g;){b[g].__dispatch(a);
if(a.__isCanceled)break;--g}}},__dispatchTarget:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{return a.__dispatchEvent(b)}catch(c){return xb.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a),!1}else return a.__dispatchEvent(b)},__drag:function(a){var b=this.__dragObject.parent;if(null!=b){b=b.__getWorldTransform();var c=b.a*b.d-b.b*b.c;if(0==c)a.x=-b.tx,a.y=-b.ty;else{var d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx));a.y=1/c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x));a.x=d}}b=a.x+this.__dragOffsetX;
a=a.y+this.__dragOffsetY;null!=this.__dragBounds&&(b<this.__dragBounds.x?b=this.__dragBounds.x:b>this.__dragBounds.get_right()&&(b=this.__dragBounds.get_right()),a<this.__dragBounds.y?a=this.__dragBounds.y:a>this.__dragBounds.get_bottom()&&(a=this.__dragBounds.get_bottom()));this.__dragObject.set_x(b);this.__dragObject.set_y(a)},__getInteractive:function(a){null!=a&&a.push(this);return!0},__globalToLocal:function(a,b){a!=b&&b.copyFrom(a);return b},__handleError:function(a){var b=new Oi("uncaughtError",
!0,!0,a);try{Da.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b)}catch(d){xb.lastError=d}if(!b.__preventDefault){Q.info(jc.toString(jc.exceptionStack()),{fileName:"openfl/display/Stage.hx",lineNumber:1486,className:"openfl.display.Stage",methodName:"__handleError"});Q.info(A.string(a),{fileName:"openfl/display/Stage.hx",lineNumber:1487,className:"openfl.display.Stage",methodName:"__handleError"});try{if(null!=a&&Object.prototype.hasOwnProperty.call(a,"stack")&&null!=a.stack&&""!=a.stack)console.log(a.stack),
a.stack=a.stack;else{var c=jc.toString(jc.callStack());console.log(c)}}catch(d){xb.lastError=d}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();Kb.__altKey=zb.get_altKey(c);Kb.__commandKey=zb.get_metaKey(c);Kb.__ctrlKey=zb.get_ctrlKey(c);Kb.__shiftKey=zb.get_shiftKey(c);var d=[];null==this.__focus?this.__getInteractive(d):this.__focus.__getInteractive(d);if(0<d.length){switch(b){case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:var e=
3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:e=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:e=2;break;default:e=0}switch(b){case 8:b=8;break;case 9:b=9;break;case 13:b=13;break;case 27:b=27;break;case 32:b=32;break;case 33:b=49;break;case 34:b=222;break;case 35:b=51;break;case 36:b=52;break;case 37:b=53;break;case 38:b=55;break;case 39:b=222;break;case 40:b=57;break;case 41:b=48;break;case 42:b=56;break;case 44:b=188;break;case 45:b=189;break;
case 46:b=190;break;case 47:b=191;break;case 48:b=48;break;case 49:b=49;break;case 50:b=50;break;case 51:b=51;break;case 52:b=52;break;case 53:b=53;break;case 54:b=54;break;case 55:b=55;break;case 56:b=56;break;case 57:b=57;break;case 58:b=186;break;case 59:b=186;break;case 60:b=60;break;case 61:b=187;break;case 62:b=190;break;case 63:b=191;break;case 64:b=50;break;case 91:b=219;break;case 92:b=220;break;case 93:b=221;break;case 94:b=54;break;case 95:b=189;break;case 96:b=192;break;case 97:b=65;break;
case 98:b=66;break;case 99:b=67;break;case 100:b=68;break;case 101:b=69;break;case 102:b=70;break;case 103:b=71;break;case 104:b=72;break;case 105:b=73;break;case 106:b=74;break;case 107:b=75;break;case 108:b=76;break;case 109:b=77;break;case 110:b=78;break;case 111:b=79;break;case 112:b=80;break;case 113:b=81;break;case 114:b=82;break;case 115:b=83;break;case 116:b=84;break;case 117:b=85;break;case 118:b=86;break;case 119:b=87;break;case 120:b=88;break;case 121:b=89;break;case 122:b=90;break;case 127:b=
46;break;case 1073741881:b=20;break;case 1073741882:b=112;break;case 1073741883:b=113;break;case 1073741884:b=114;break;case 1073741885:b=115;break;case 1073741886:b=116;break;case 1073741887:b=117;break;case 1073741888:b=118;break;case 1073741889:b=119;break;case 1073741890:b=120;break;case 1073741891:b=121;break;case 1073741892:b=122;break;case 1073741893:b=123;break;case 1073741894:b=301;break;case 1073741895:b=145;break;case 1073741896:b=19;break;case 1073741897:b=45;break;case 1073741898:b=36;
break;case 1073741899:b=33;break;case 1073741901:b=35;break;case 1073741902:b=34;break;case 1073741903:b=39;break;case 1073741904:b=37;break;case 1073741905:b=40;break;case 1073741906:b=38;break;case 1073741907:b=144;break;case 1073741908:b=111;break;case 1073741909:b=106;break;case 1073741910:b=109;break;case 1073741911:b=107;break;case 1073741912:b=13;break;case 1073741913:b=97;break;case 1073741914:b=98;break;case 1073741915:b=99;break;case 1073741916:b=100;break;case 1073741917:b=101;break;case 1073741918:b=
102;break;case 1073741919:b=103;break;case 1073741920:b=104;break;case 1073741921:b=105;break;case 1073741922:b=96;break;case 1073741923:b=110;break;case 1073741925:b=302;break;case 1073741928:b=124;break;case 1073741929:b=125;break;case 1073741930:b=126;break;case 1073741982:b=13;break;case 1073742044:b=110;break;case 1073742048:b=17;break;case 1073742049:b=16;break;case 1073742050:b=18;break;case 1073742051:b=15;break;case 1073742052:b=17;break;case 1073742053:b=16;break;case 1073742054:b=18;break;
case 1073742055:b=15}var f=Ea.__getCharCode(b,zb.get_shiftKey(c));if("keyUp"==a&&(32==b||13==b)&&this.__focus instanceof Ya){var g=U.__cast(this.__focus,Ya);if(g.get_buttonMode()&&1==g.focusRect){var h=pa.__pool.get(),m=pa.__pool.get();m.x=this.__mouseX;m.y=this.__mouseY;g=Kb.__create("click",0,this.__mouseX,this.__mouseY,g.__globalToLocal(m,h),g);this.__dispatchStack(g,d);pa.__pool.release(m);pa.__pool.release(h)}}e=new Wh(a,!0,!0,f,b,e,this.__macKeyboard?zb.get_ctrlKey(c)||zb.get_metaKey(c):zb.get_ctrlKey(c),
zb.get_altKey(c),zb.get_shiftKey(c),zb.get_ctrlKey(c),zb.get_metaKey(c));d.reverse();this.__dispatchStack(e,d);if(e.__preventDefault)"keyDown"==a?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel();else if("keyDown"==a&&9==b){d=[];this.__tabTest(d);b=-1;a=null;e=zb.get_shiftKey(c)?-1:1;if(1<d.length){fe.sort(d,function(a,b){return a.get_tabIndex()-b.get_tabIndex()});if(-1!=d[d.length-1].get_tabIndex())for(h=0;h<d.length;){if(-1<d[h].get_tabIndex()){0<h&&d.splice(0,h);break}++h}if(null!=this.get_focus()){h=
this.get_focus();for(f=d.indexOf(h);-1==f&&null!=h;){b=h.parent;if(null!=b&&b.get_tabChildren()){h=b.getChildIndex(h);if(-1==h){h=b;continue}for(h+=e;zb.get_shiftKey(c)?0<=h:h<b.get_numChildren();){m=b.getChildAt(h);if(m instanceof D&&(f=U.__cast(m,D),f=d.indexOf(f),-1!=f)){e=0;break}h+=e}}else zb.get_shiftKey(c)&&(f=d.indexOf(b),-1!=f&&(e=0));h=b}b=0>f?0:f+e}else b=this.__currentTabOrderIndex}else 1==d.length&&(a=d[0],this.get_focus()==a&&(a=null));f=0<=b&&b<d.length;1==d.length||0==d.length&&null!=
this.get_focus()?b=0:1<d.length&&(0>b&&(b+=d.length),b%=d.length,a=d[b],a==this.get_focus()&&(b+=e,0>b&&(b+=d.length),b%=d.length,a=d[b]));e=null;null!=this.get_focus()&&(e=new Yf("keyFocusChange",!0,!0,a,zb.get_shiftKey(c),0),d=[],this.get_focus().__getInteractive(d),d.reverse(),this.__dispatchStack(e,d),e.isDefaultPrevented()&&this.window.onKeyDown.cancel());null!=e&&e.isDefaultPrevented()||(this.__currentTabOrderIndex=b,null!=a&&this.set_focus(a),f&&this.window.onKeyDown.cancel())}}},__onLimeCreateWindow:function(a){if(this.window==
a){var b=r(this,this.__onLimeWindowActivate);a.onActivate.add(function(){b(a)});var c=r(this,this.__onLimeWindowClose);a.onClose.add(function(){c(a)},!1,-9E3);var d=r(this,this.__onLimeWindowDeactivate);a.onDeactivate.add(function(){d(a)});var e=r(this,this.__onLimeWindowDropFile);var f=function(b){e(a,b)};a.onDropFile.add(f);var g=r(this,this.__onLimeWindowEnter);a.onEnter.add(function(){g(a)});var h=r(this,this.__onLimeWindowExpose);a.onExpose.add(function(){h(a)});var m=r(this,this.__onLimeWindowFocusIn);
a.onFocusIn.add(function(){m(a)});var l=r(this,this.__onLimeWindowFocusOut);a.onFocusOut.add(function(){l(a)});var n=r(this,this.__onLimeWindowFullscreen);a.onFullscreen.add(function(){n(a)});var p=r(this,this.__onLimeKeyDown);f=function(b,c){p(a,b,c)};a.onKeyDown.add(f);var k=r(this,this.__onLimeKeyUp);f=function(b,c){k(a,b,c)};a.onKeyUp.add(f);var q=r(this,this.__onLimeWindowLeave);a.onLeave.add(function(){q(a)});var t=r(this,this.__onLimeWindowMinimize);a.onMinimize.add(function(){t(a)});var v=
r(this,this.__onLimeMouseDown);f=function(b,c,d){v(a,b,c,d)};a.onMouseDown.add(f);var u=r(this,this.__onLimeMouseMove);f=function(b,c){u(a,b,c)};a.onMouseMove.add(f);var x=r(this,this.__onLimeMouseMoveRelative);f=function(b,c){x(a,b,c)};a.onMouseMoveRelative.add(f);var C=r(this,this.__onLimeMouseUp);f=function(b,c,d){C(a,b,c,d)};a.onMouseUp.add(f);var P=r(this,this.__onLimeMouseWheel);f=function(b,c,d){P(a,b,c,d)};a.onMouseWheel.add(f);var F=r(this,this.__onLimeWindowMove);f=function(b,c){F(a,b,c)};
a.onMove.add(f);a.onRender.add(r(this,this.__onLimeRender));a.onRenderContextLost.add(r(this,this.__onLimeRenderContextLost));a.onRenderContextRestored.add(r(this,this.__onLimeRenderContextRestored));var z=r(this,this.__onLimeWindowResize);f=function(b,c){z(a,b,c)};a.onResize.add(f);var y=r(this,this.__onLimeWindowRestore);a.onRestore.add(function(){y(a)});var ka=r(this,this.__onLimeTextEdit);f=function(b,c,d){ka(a,b,c,d)};a.onTextEdit.add(f);var B=r(this,this.__onLimeTextInput);f=function(b){B(a,
b)};a.onTextInput.add(f);this.__onLimeWindowCreate(a)}},__onLimeGamepadAxisMove:function(a,b,c){if(this.__uncaughtErrorEvents.__enabled)try{Pb.__onGamepadAxisMove(a,b,c)}catch(d){xb.lastError=d,a=J.caught(d).unwrap(),this.__handleError(a)}else Pb.__onGamepadAxisMove(a,b,c)},__onLimeGamepadButtonDown:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Pb.__onGamepadButtonDown(a,b)}catch(c){xb.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a)}else Pb.__onGamepadButtonDown(a,b)},__onLimeGamepadButtonUp:function(a,
b){if(this.__uncaughtErrorEvents.__enabled)try{Pb.__onGamepadButtonUp(a,b)}catch(c){xb.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a)}else Pb.__onGamepadButtonUp(a,b)},__onLimeGamepadConnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Pb.__onGamepadConnect(a)}catch(g){xb.lastError=g;var b=J.caught(g).unwrap();this.__handleError(b)}else Pb.__onGamepadConnect(a);var c=r(this,this.__onLimeGamepadAxisMove);b=function(b,d){c(a,b,d)};a.onAxisMove.add(b);var d=r(this,this.__onLimeGamepadButtonDown);
b=function(b){d(a,b)};a.onButtonDown.add(b);var e=r(this,this.__onLimeGamepadButtonUp);b=function(b){e(a,b)};a.onButtonUp.add(b);var f=r(this,this.__onLimeGamepadDisconnect);a.onDisconnect.add(function(){f(a)})},__onLimeGamepadDisconnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Pb.__onGamepadDisconnect(a)}catch(b){xb.lastError=b,a=J.caught(b).unwrap(),this.__handleError(a)}else Pb.__onGamepadDisconnect(a)},__onLimeKeyDown:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey("keyDown",
b,c)},__onLimeKeyUp:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey("keyUp",b,c)},__onLimeModuleExit:function(a){null!=this.window&&(a=new la("deactivate"),this.__broadcastEvent(a))},__onLimeMouseDown:function(a,b,c,d){if(null!=this.window&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var e="middleMouseDown";break;case 2:e="rightMouseDown";break;default:e="mouseDown"}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||2!=d||a.onMouseDown.cancel()}},
__onLimeMouseMove:function(a,b,c){null!=this.window&&this.window==a&&(this.__pendingMouseEvent=!0,this.__pendingMouseX=b*a.__scale|0,this.__pendingMouseY=c*a.__scale|0)},__onLimeMouseMoveRelative:function(a,b,c){},__onLimeMouseUp:function(a,b,c,d){if(null!=this.window&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var e="middleMouseUp";break;case 2:e="rightMouseUp";break;default:e="mouseUp"}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||2!=d||a.onMouseUp.cancel()}},
__onLimeMouseWheel:function(a,b,c,d){null!=this.window&&this.window==a&&(this.__dispatchPendingMouseEvent(),d==sh.PIXELS?this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0,d):this.__onMouseWheel(b|0,c|0,d))},__onLimeRender:function(a){if(!this.__rendering){this.__rendering=!0;this.__broadcastEvent(new la("enterFrame"));this.__broadcastEvent(new la("frameConstructed"));this.__broadcastEvent(new la("exitFrame"));this.__renderable=!0;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;a=null!=this.__renderer&&
(this.__renderDirty||this.__forceRender);if(this.__invalidated&&a){this.__invalidated=!1;var b=new la("render");this.__broadcastEvent(b)}this.__update(!1,!0);if(null!=this.__renderer){if(null!=this.context3D){for(b=this.stage3Ds.iterator();b.hasNext();){var c=b.next();this.context3D.__renderStage3D(c)}this.context3D.__present&&(a=!0)}a?(null==this.context3D&&this.__renderer.__clear(),this.__renderer.__render(this)):null==this.context3D&&this.window.onRender.cancel();null!=this.context3D&&(this.context3D.__present?
(this.__renderer.__cleared||this.__renderer.__clear(),this.context3D.__present=!1,this.context3D.__cleared=!1):this.window.onRender.cancel());this.__renderer.__cleared=!1}this.__rendering=!1}},__onLimeRenderContextLost:function(){this.context3D=this.__renderer=null;for(var a=this.stage3Ds.iterator();a.hasNext();)a.next().__lostContext()},__onLimeRenderContextRestored:function(a){this.__createRenderer();for(a=this.stage3Ds.iterator();a.hasNext();)a.next().__restoreContext()},__onLimeTextEdit:function(a,
b,c,d){},__onLimeTextInput:function(a,b){if(null!=this.window&&this.window==a){var c=[];null==this.__focus?this.__getInteractive(c):this.__focus.__getInteractive(c);b=new cf("textInput",!0,!0,b);0<c.length?(c.reverse(),this.__dispatchStack(b,c)):this.__dispatchEvent(b);b.isDefaultPrevented()&&a.onTextInput.cancel()}},__onLimeTouchCancel:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchMove:function(a){this.__onTouch("touchMove",a,
this.__primaryTouch==a)},__onLimeTouchEnd:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchStart:function(a){null==this.__primaryTouch&&(this.__primaryTouch=a);this.__onTouch("touchBegin",a,this.__primaryTouch==a)},__onLimeUpdate:function(a){this.__deltaTime=a;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(a){},__onLimeWindowClose:function(a){this.window==a&&(this.window=null);this.__primaryTouch=null;a=new la("deactivate");
this.__broadcastEvent(a)},__onLimeWindowCreate:function(a){null!=this.window&&this.window==a&&null!=a.context&&this.__createRenderer()},__onLimeWindowDeactivate:function(a){},__onLimeWindowDropFile:function(a,b){},__onLimeWindowEnter:function(a){},__onLimeWindowExpose:function(a){null!=this.window&&this.window==a&&(this.__renderDirty=!0)},__onLimeWindowFocusIn:function(a){null!=this.window&&this.window==a&&(this.__renderDirty=!0,a=new la("activate"),this.__broadcastEvent(a),this.set_focus(this.__cacheFocus))},
__onLimeWindowFocusOut:function(a){null!=this.window&&this.window==a&&(this.__primaryTouch=null,a=new la("deactivate"),this.__broadcastEvent(a),a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a,Kb.__altKey=!1,Kb.__commandKey=!1,Kb.__ctrlKey=!1,Kb.__shiftKey=!1)},__onLimeWindowFullscreen:function(a){null!=this.window&&this.window==a&&(this.__resize(),this.__wasFullscreen||(this.__wasFullscreen=!0,2==this.__displayState&&(this.__displayState=1),this.__dispatchEvent(new Zg("fullScreen",!1,
!1,!0,!0))))},__onLimeWindowLeave:function(a){null==this.window||this.window!=a||Kb.__buttonDown||(this.__dispatchPendingMouseEvent(),a=new la("mouseLeave"),this.__dispatchEvent(a))},__onLimeWindowMinimize:function(a){},__onLimeWindowMove:function(a,b,c){},__onLimeWindowResize:function(a,b,c){null!=this.window&&this.window==a&&(this.__resize(),this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new Zg("fullScreen",!1,!1,!1,!0))))},__onLimeWindowRestore:function(a){null!=
this.window&&this.window==a&&this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new Zg("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,b,c,d){if(!(2<d)){var e=pa.__pool.get();e.setTo(b,c);b=this.__displayMatrix;c=b.a*b.d-b.b*b.c;if(0==c)e.x=-b.tx,e.y=-b.ty;else{var f=1/c*(b.c*(b.ty-e.y)+b.d*(e.x-b.tx));e.y=1/c*(b.a*(e.y-b.ty)+b.b*(b.tx-e.x));e.x=f}this.__mouseX=e.x;this.__mouseY=e.y;b=[];this.__hitTest(this.__mouseX,this.__mouseY,!0,b,!0,this)?
f=b[b.length-1]:(f=this,b=[this]);null==f&&(f=this);var g=null;switch(a){case "middleMouseDown":this.__mouseDownMiddle=f;break;case "middleMouseUp":this.__mouseDownMiddle==f&&(g="middleClick");this.__mouseDownMiddle=null;break;case "mouseDown":null!=this.get_focus()?this.get_focus()!=f&&(c=new Yf("mouseFocusChange",!0,!0,f,!1,0),this.get_focus().dispatchEvent(c),c.isDefaultPrevented()||(f.__allowMouseFocus()?this.set_focus(f):this.set_focus(null))):f.__allowMouseFocus()?this.set_focus(f):this.set_focus(null);
this.__mouseDownLeft=f;Kb.__buttonDown=!0;break;case "mouseUp":if(null!=this.__mouseDownLeft){Kb.__buttonDown=!1;if(this.__mouseDownLeft==f)g="click";else{var h=Kb.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new pa(this.__mouseX,this.__mouseY),this);this.__mouseDownLeft.dispatchEvent(h)}this.__mouseDownLeft=null}break;case "rightMouseDown":this.__mouseDownRight=f;break;case "rightMouseUp":this.__mouseDownRight==f&&(g="rightClick"),this.__mouseDownRight=null}c=pa.__pool.get();h=Kb.__create(a,
d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,c),f);this.__dispatchStack(h,b);null!=g&&(h=Kb.__create(g,d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,c),f),this.__dispatchStack(h,b),"mouseUp"==a&&f.doubleClickEnabled&&(a=Da.getTimer(),500>a-this.__lastClickTime&&f==this.__lastClickTarget?(h=Kb.__create("doubleClick",d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,c),f),this.__dispatchStack(h,b),this.__lastClickTime=0,this.__lastClickTarget=null):(this.__lastClickTarget=f,this.__lastClickTime=
a)));if("auto"==le.__cursor&&!le.__hidden){h=null;if(null!=this.__mouseDownLeft)h=this.__mouseDownLeft.__getCursor();else for(a=0;a<b.length;)if(h=b[a],++a,h=h.__getCursor(),null!=h&&null!=this.window){this.window.set_cursor(vf.toLimeCursor(h));break}null==h&&null!=this.window&&this.window.set_cursor(kc.ARROW)}f!=this.__mouseOverTarget&&null!=this.__mouseOverTarget&&(h=Kb.__create("mouseOut",d,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(e,c),this.__mouseOverTarget),this.__dispatchStack(h,
this.__mouseOutStack));for(a=0;a<this.__rollOutStack.length;)g=this.__rollOutStack[a],-1==b.indexOf(g)?(I.remove(this.__rollOutStack,g),h=Kb.__create("rollOut",d,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(e,c),g),h.bubbles=!1,this.__dispatchTarget(g,h)):++a;for(a=0;a<b.length;)g=b[a],++a,-1==this.__rollOutStack.indexOf(g)&&null!=this.__mouseOverTarget&&(g.hasEventListener("rollOver")&&(h=Kb.__create("rollOver",d,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(e,
c),g),h.bubbles=!1,this.__dispatchTarget(g,h)),(g.hasEventListener("rollOut")||g.hasEventListener("rollOver"))&&this.__rollOutStack.push(g));f!=this.__mouseOverTarget&&(null!=f&&(h=Kb.__create("mouseOver",d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,c),f),this.__dispatchStack(h,b)),this.__mouseOverTarget=f,this.__mouseOutStack=b);null!=this.__dragObject&&(this.__drag(e),d=null,this.__mouseOverTarget==this.__dragObject?(f=this.__dragObject.mouseEnabled,a=this.__dragObject.mouseChildren,this.__dragObject.mouseEnabled=
!1,this.__dragObject.mouseChildren=!1,b=[],this.__hitTest(this.__mouseX,this.__mouseY,!0,b,!0,this)&&(d=b[b.length-1]),this.__dragObject.mouseEnabled=f,this.__dragObject.mouseChildren=a):this.__mouseOverTarget!=this&&(d=this.__mouseOverTarget),this.__dragObject.dropTarget=d);pa.__pool.release(e);pa.__pool.release(c)}},__onMouseWheel:function(a,b,c){var d=this.__mouseX,e=this.__mouseY;a=[];if(this.__hitTest(this.__mouseX,this.__mouseY,!0,a,!0,this))var f=a[a.length-1];else f=this,a=[this];null==f&&
(f=this);c=pa.__pool.get();c.setTo(d,e);d=this.__displayMatrix;e=d.a*d.d-d.b*d.c;if(0==e)c.x=-d.tx,c.y=-d.ty;else{var g=1/e*(d.c*(d.ty-c.y)+d.d*(c.x-d.tx));c.y=1/e*(d.a*(c.y-d.ty)+d.b*(d.tx-c.x));c.x=g}b|=0;b=Kb.__create("mouseWheel",0,this.__mouseX,this.__mouseY,f.__globalToLocal(c,c),f,b);b.cancelable=!0;this.__dispatchStack(b,a);b.isDefaultPrevented()&&this.window.onMouseWheel.cancel();pa.__pool.release(c)},__onTouch:function(a,b,c){var d=pa.__pool.get();d.setTo(Math.round(b.x*this.window.__width*
this.window.__scale),Math.round(b.y*this.window.__height*this.window.__scale));var e=this.__displayMatrix,f=e.a*e.d-e.b*e.c;if(0==f)d.x=-e.tx,d.y=-e.ty;else{var g=1/f*(e.c*(e.ty-d.y)+e.d*(d.x-e.tx));d.y=1/f*(e.a*(d.y-e.ty)+e.b*(e.tx-d.x));d.x=g}e=d.x;f=d.y;g=[];if(this.__hitTest(e,f,!1,g,!0,this))var h=g[g.length-1];else h=this,g=[this];null==h&&(h=this);var m=b.id;if(this.__touchData.h.hasOwnProperty(m))var l=this.__touchData.h[m];else l=Xh.__pool.get(),l.reset(),l.touch=b,this.__touchData.h[m]=
l;var n=null,p=!1;switch(a){case "touchBegin":l.touchDownTarget=h;break;case "touchEnd":l.touchDownTarget==h&&(n="touchTap"),l.touchDownTarget=null,p=!0}var k=pa.__pool.get();a=Td.__create(a,null,e,f,h.__globalToLocal(d,k),h);a.touchPointID=m;a.isPrimaryTouchPoint=c;a.pressure=b.pressure;this.__dispatchStack(a,g);null!=n&&(a=Td.__create(n,null,e,f,h.__globalToLocal(d,k),h),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchStack(a,g));n=l.touchOverTarget;h!=n&&null!=n&&
(a=Td.__create("touchOut",null,e,f,n.__globalToLocal(d,k),n),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchTarget(n,a));for(var q=l.rollOutStack,t,v=0;v<q.length;)t=q[v],-1==g.indexOf(t)?(I.remove(q,t),a=Td.__create("touchRollOut",null,e,f,n.__globalToLocal(d,k),n),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(t,a)):++v;for(v=0;v<g.length;)t=g[v],++v,-1==q.indexOf(t)&&(t.hasEventListener("touchRollOver")&&(a=Td.__create("touchRollOver",
null,e,f,n.__globalToLocal(d,k),t),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(t,a)),t.hasEventListener("touchRollOut")&&q.push(t));h!=n&&(null!=h&&(a=Td.__create("touchOver",null,e,f,h.__globalToLocal(d,k),h),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.bubbles=!0,a.pressure=b.pressure,this.__dispatchTarget(h,a)),l.touchOverTarget=h);pa.__pool.release(d);pa.__pool.release(k);p&&(this.__touchData.remove(m),l.reset(),Xh.__pool.release(l))},__registerLimeModule:function(a){a.onCreateWindow.add(r(this,
this.__onLimeCreateWindow));a.onUpdate.add(r(this,this.__onLimeUpdate));a.onExit.add(r(this,this.__onLimeModuleExit),!1,0);for(a=Gd.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}Gd.onConnect.add(r(this,this.__onLimeGamepadConnect));kd.onStart.add(r(this,this.__onLimeTouchStart));kd.onMove.add(r(this,this.__onLimeTouchMove));kd.onEnd.add(r(this,this.__onLimeTouchEnd));kd.onCancel.add(r(this,this.__onLimeTouchCancel))},__resize:function(){var a=this.stageWidth,b=this.stageHeight,
c=this.window.__width*this.window.__scale|0,d=this.window.__height*this.window.__scale|0;this.__displayMatrix.identity();if(null!=this.get_fullScreenSourceRect()&&this.window.__fullscreen){this.stageWidth=this.get_fullScreenSourceRect().width|0;this.stageHeight=this.get_fullScreenSourceRect().height|0;var e=c/this.stageWidth,f=d/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(e,f);this.__displayRect.setTo(this.get_fullScreenSourceRect().get_left(),
this.get_fullScreenSourceRect().get_right(),this.get_fullScreenSourceRect().get_top(),this.get_fullScreenSourceRect().get_bottom())}else if(0==this.__logicalWidth||0==this.__logicalHeight||2==this.get_scaleMode()||0==c||0==d)this.stageWidth=Math.round(c/this.window.__scale),this.stageHeight=Math.round(d/this.window.__scale),this.__displayMatrix.scale(this.window.__scale,this.window.__scale),this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);else switch(this.stageWidth=this.__logicalWidth,
this.stageHeight=this.__logicalHeight,this.get_scaleMode()){case 0:e=c/this.stageWidth;f=d/this.stageHeight;this.__displayMatrix.scale(e,f);this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);break;case 1:e=c/this.stageWidth;f=d/this.stageHeight;e=Math.max(e,f);f=this.stageWidth*e;var g=this.stageHeight*e;f=this.stageWidth-Math.round((f-c)/e);g=this.stageHeight-Math.round((g-d)/e);var h=Math.round((this.stageWidth-f)/2),m=Math.round((this.stageHeight-g)/2);this.__displayMatrix.translate(-h,
-m);this.__displayMatrix.scale(e,e);this.__displayRect.setTo(h,m,f,g);break;default:e=c/this.stageWidth,f=d/this.stageHeight,e=Math.min(e,f),f=this.stageWidth*e,g=this.stageHeight*e,f=this.stageWidth-Math.round((f-c)/e),g=this.stageHeight-Math.round((g-d)/e),h=Math.round((this.stageWidth-f)/2),m=Math.round((this.stageHeight-g)/2),this.__displayMatrix.translate(-h,-m),this.__displayMatrix.scale(e,e),this.__displayRect.setTo(h,m,f,g)}null!=this.context3D&&this.context3D.configureBackBuffer(this.stageWidth,
this.stageHeight,0,!0,!0,!0);for(e=this.stage3Ds.iterator();e.hasNext();)e.next().__resize(c,d);null!=this.__renderer&&this.__renderer.__resize(c,d);this.__renderDirty=!0;if(this.stageWidth!=a||this.stageHeight!=b)this.__setTransformDirty(),a=new la("resize"),this.__dispatchEvent(a)},__setLogicalSize:function(a,b){this.__logicalWidth=a;this.__logicalHeight=b;this.__resize()},__startDrag:function(a,b,c){if(null==c)this.__dragBounds=null;else{this.__dragBounds=new fa;var d=c.get_right(),e=c.get_bottom();
this.__dragBounds.x=d<c.x?d:c.x;this.__dragBounds.y=e<c.y?e:c.y;this.__dragBounds.width=Math.abs(c.width);this.__dragBounds.height=Math.abs(c.height)}this.__dragObject=a;null!=this.__dragObject&&(b?this.__dragOffsetY=this.__dragOffsetX=0:(a=pa.__pool.get(),a.setTo(this.get_mouseX(),this.get_mouseY()),b=this.__dragObject.parent,null!=b&&(b=b.__getWorldTransform(),c=b.a*b.d-b.b*b.c,0==c?(a.x=-b.tx,a.y=-b.ty):(d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx)),a.y=1/c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x)),a.x=d)),this.__dragOffsetX=
this.__dragObject.get_x()-a.x,this.__dragOffsetY=this.__dragObject.get_y()-a.y,pa.__pool.release(a)))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__unregisterLimeModule:function(a){a.onCreateWindow.remove(r(this,this.__onLimeCreateWindow));a.onUpdate.remove(r(this,this.__onLimeUpdate));a.onExit.remove(r(this,this.__onLimeModuleExit));Gd.onConnect.remove(r(this,this.__onLimeGamepadConnect));kd.onStart.remove(r(this,this.__onLimeTouchStart));kd.onMove.remove(r(this,this.__onLimeTouchMove));
kd.onEnd.remove(r(this,this.__onLimeTouchEnd));kd.onCancel.remove(r(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&(jb.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||this.__renderDirty?(jb.prototype.__update.call(this,!1,b),b&&ab.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(jb.prototype.__update.call(this,!1,b),b&&(this.__wasDirty=!1))},get_color:function(){return this.__color},set_color:function(a){null==
a?(this.__transparent=!0,a=0):this.__transparent=!1;this.__color!=a&&(this.__colorSplit[0]=((a&16711680)>>>16)/255,this.__colorSplit[1]=((a&65280)>>>8)/255,this.__colorSplit[2]=(a&255)/255,this.__colorString="#"+R.hex(a&16777215,6),this.__renderDirty=!0,this.__color=-16777216|a&16777215);return a},get_contentsScaleFactor:function(){return this.__contentsScaleFactor},get_displayState:function(){return this.__displayState},set_displayState:function(a){null!=this.window&&(2==a?this.window.__fullscreen&&
this.window.set_fullscreen(!1):this.window.__fullscreen||this.window.set_fullscreen(!0));return this.__displayState=a},get_focus:function(){return this.__focus},set_focus:function(a){if(a!=this.__focus){var b=this.__focus;this.__cacheFocus=this.__focus=a;if(null!=b){var c=new Yf("focusOut",!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}null!=a&&(c=new Yf("focusIn",!0,!1,b,!1,0),d=[],a.__getInteractive(d),d.reverse(),this.__dispatchStack(c,d))}return a},get_frameRate:function(){return null!=
this.window?this.window.__backend.getFrameRate():0},set_frameRate:function(a){return null!=this.window?this.window.__backend.setFrameRate(a):a},get_fullScreenHeight:function(){return Math.ceil(this.window.get_display().currentMode.height*this.window.__scale)},get_fullScreenSourceRect:function(){return null==this.__fullScreenSourceRect?null:this.__fullScreenSourceRect.clone()},set_fullScreenSourceRect:function(a){null==a?null!=this.__fullScreenSourceRect&&(this.__fullScreenSourceRect=null,this.__resize()):
a.equals(this.__fullScreenSourceRect)||(this.__fullScreenSourceRect=a.clone(),this.__resize());return a},get_fullScreenWidth:function(){return Math.ceil(this.window.get_display().currentMode.width*this.window.__scale)},set_height:function(a){return this.get_height()},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},get_quality:function(){return this.__quality},set_quality:function(a){this.__quality=a;if(null!=this.__renderer){var b=this.get_quality();this.__renderer.__allowSmoothing=
2!=b}return a},set_rotation:function(a){return 0},get_scaleMode:function(){return this.__scaleMode},set_scaleMode:function(a){a!=this.__scaleMode&&(this.__scaleMode=a,this.__resize());return a},set_scaleX:function(a){return 0},set_scaleY:function(a){return 0},get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new hd("Error: The Stage class does not implement this property or method.");},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new hd("Error: The Stage class does not implement this property or method.");
},set_transform:function(a){return this.get_transform()},set_width:function(a){return this.get_width()},set_x:function(a){return 0},set_y:function(a){return 0},__class__:Ni,__properties__:u(jb.prototype.__properties__,{set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",set_quality:"set_quality",get_quality:"get_quality",get_fullScreenWidth:"get_fullScreenWidth",set_fullScreenSourceRect:"set_fullScreenSourceRect",get_fullScreenSourceRect:"get_fullScreenSourceRect",get_fullScreenHeight:"get_fullScreenHeight",
set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",get_contentsScaleFactor:"get_contentsScaleFactor",set_color:"set_color",get_color:"get_color"})});var Vh=function(a){za.call(this);this.__stage=a;this.__height=0;this.__projectionTransform=new $d;this.__renderTransform=new $d;this.__y=this.__x=this.__width=0;this.visible=!0;0<a.stageWidth&&0<a.stageHeight&&this.__resize(a.stageWidth,
a.stageHeight)};k["openfl.display.Stage3D"]=Vh;Vh.__name__="openfl.display.Stage3D";Vh.__super__=za;Vh.prototype=u(za.prototype,{context3D:null,visible:null,__contextLost:null,__contextRequested:null,__height:null,__indexBuffer:null,__projectionTransform:null,__renderTransform:null,__stage:null,__vertexBuffer:null,__width:null,__x:null,__y:null,__canvas:null,__renderContext:null,__style:null,__webgl:null,requestContext3D:function(a,b){this.__contextLost?this.__contextRequested=!0:null!=this.context3D?
(this.__contextRequested=!0,Oe.delay(r(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,Oe.delay(r(this,this.__createContext),1))},requestContext3DMatchingProfiles:function(a){this.requestContext3D()},__createContext:function(){var a=this.__stage,b=a.__renderer;if("cairo"==b.__type||"canvas"==b.__type)this.__dispatchError();else if("opengl"==b.__type)this.context3D=new Ub(a,a.context3D.__contextState,this),this.__dispatchCreate();else if("dom"==b.__type)if(null==
a.context3D){this.__canvas=window.document.createElement("canvas");this.__canvas.width=a.stageWidth;this.__canvas.height=a.stageHeight;var c=a.window.context.attributes,d=Object.prototype.hasOwnProperty.call(c,"background")&&null==c.background,e=Object.prototype.hasOwnProperty.call(c,"colorDepth")?c.colorDepth:32;c=Object.prototype.hasOwnProperty.call(c,"antialiasing")&&0<c.antialiasing;this.__webgl=dr.getContextWebGL(this.__canvas,{alpha:d||16<e,antialias:c,depth:!0,premultipliedAlpha:!0,stencil:!0,
preserveDrawingBuffer:!1});null!=this.__webgl&&(null==t.context&&(t.context=this.__webgl,t.type="webgl",t.version=1),a.context3D=new Ub(a),a.context3D.configureBackBuffer(a.window.__width,a.window.__height,0,!0,!0,!0),a.context3D.present(),b.element.appendChild(this.__canvas),this.__style=this.__canvas.style,this.__style.setProperty("position","absolute",null),this.__style.setProperty("top","0",null),this.__style.setProperty("left","0",null),this.__style.setProperty(b.__transformOriginProperty,"0 0 0",
null),this.__style.setProperty("z-index","-1",null));null!=a.context3D&&(this.context3D=new Ub(a,a.context3D.__contextState,this));this.__dispatchCreate()}else this.__dispatchError()},__dispatchError:function(){this.__contextRequested=!1;this.dispatchEvent(new te("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new la("context3DCreate")))},__lostContext:function(){this.__contextLost=!0;null!=this.context3D&&
(this.context3D.__dispose(),this.__contextRequested=!0)},__resize:function(a,b){if(a!=this.__width||b!=this.__height)null!=this.__canvas&&(this.__canvas.width=a,this.__canvas.height=b),this.__projectionTransform.copyRawDataFrom(ub.toFloatVector(null,null,null,[2/(0<a?a:1),0,0,0,0,-2/(0<b?b:1),0,0,0,0,-.001,0,-1,1,0,1])),this.__renderTransform.identity(),this.__renderTransform.appendTranslation(this.__x,this.__y,0),this.__renderTransform.append(this.__projectionTransform),this.__width=a,this.__height=
b},__restoreContext:function(){this.__contextLost=!1;this.__createContext()},get_x:function(){return this.__x},set_x:function(a){if(this.__x==a)return a;this.__x=a;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x,this.__y,0);this.__renderTransform.append(this.__projectionTransform);return a},get_y:function(){return this.__y},set_y:function(a){if(this.__y==a)return a;this.__y=a;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x,this.__y,
0);this.__renderTransform.append(this.__projectionTransform);return a},__class__:Vh,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var fg=function(a,b,c,d,e,f,g,h){null==h&&(h=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=1);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.__id=a;this.__matrix=new wa;0!=b&&this.set_x(b);0!=c&&this.set_y(c);1!=d&&this.set_scaleX(d);1!=e&&this.set_scaleY(e);0!=f&&this.set_rotation(f);this.__dirty=!0;this.__length=0;this.__originX=
g;this.__originY=h;this.__alpha=1;this.__blendMode=null;this.__visible=!0};k["openfl.display.Tile"]=fg;fg.__name__="openfl.display.Tile";fg.prototype={data:null,parent:null,__alpha:null,__blendMode:null,__colorTransform:null,__dirty:null,__id:null,__length:null,__matrix:null,__originX:null,__originY:null,__rect:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scaleX:null,__scaleY:null,__shader:null,__tileset:null,__visible:null,clone:function(){var a=new fg(this.__id);a.__alpha=this.__alpha;
a.__blendMode=this.__blendMode;a.__originX=this.__originX;a.__originY=this.__originY;null!=this.__rect&&(a.__rect=this.__rect.clone());a.set_matrix(this.__matrix.clone());a.__shader=this.__shader;a.set_tileset(this.__tileset);null!=this.__colorTransform&&(a.__colorTransform=this.__colorTransform.__clone());return a},getBounds:function(a){var b=new fa;this.__findTileRect(b);var c=wa.__pool.get();if(null!=a&&a!=this){c.copyFrom(this.__getWorldTransform());var d=wa.__pool.get();d.copyFrom(a.__getWorldTransform());
d.invert();c.concat(d);wa.__pool.release(d)}else c.identity();this.__getBounds(b,c);wa.__pool.release(c);return b},__getBounds:function(a,b){a.__transform(a,b)},hitTestTile:function(a){if(null!=a&&null!=a.parent&&null!=this.parent){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},invalidate:function(){this.__setRenderDirty()},__findTileRect:function(a){if(null==this.get_tileset())if(null!=this.parent){var b=this.parent.__findTileset();null==b?a.setTo(0,0,0,0):(b=b.getRect(this.get_id()),
null==b?a.setTo(0,0,0,0):a.copyFrom(b))}else a.setTo(0,0,0,0);else a.copyFrom(this.get_tileset().getRect(this.get_id()));a.x=0;a.y=0},__findTileset:function(){return null!=this.get_tileset()?this.get_tileset():this.parent instanceof mh?this.parent.get_tileset():null==this.parent?null:this.parent.__findTileset()},__getWorldTransform:function(){var a=this.get_matrix().clone();null!=this.parent&&a.concat(this.parent.__getWorldTransform());return a},__setRenderDirty:function(){this.__dirty||(this.__dirty=
!0,null!=this.parent&&this.parent.__setRenderDirty())},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__alpha=a,this.__setRenderDirty());return a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a!=this.__blendMode&&(this.__blendMode=a,this.__setRenderDirty());return a},get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(a){a!=this.__colorTransform&&(this.__colorTransform=a,this.__setRenderDirty());
return a},get_height:function(){var a=fa.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;fa.__pool.release(a);return b},set_height:function(a){var b=fa.__pool.get();this.__findTileRect(b);0!=b.height&&this.set_scaleY(a/b.height);fa.__pool.release(b);return a},get_id:function(){return this.__id},set_id:function(a){a!=this.__id&&(this.__id=a,this.__setRenderDirty());return a},get_matrix:function(){return this.__matrix},set_matrix:function(a){a!=this.__matrix&&
(this.__scaleY=this.__scaleX=this.__rotation=null,this.__matrix=a,this.__setRenderDirty());return a},get_originX:function(){return this.__originX},set_originX:function(a){a!=this.__originX&&(this.__originX=a,this.__setRenderDirty());return a},get_originY:function(){return this.__originY},set_originY:function(a){a!=this.__originY&&(this.__originY=a,this.__setRenderDirty());return a},get_rect:function(){return this.__rect},set_rect:function(a){a!=this.__rect&&(this.__rect=a,this.__setRenderDirty());
return a},get_rotation:function(){if(null==this.__rotation)if(0==this.__matrix.b&&0==this.__matrix.c)this.__rotationSine=this.__rotation=0,this.__rotationCosine=1;else{var a=Math.atan2(this.__matrix.d,this.__matrix.c)-Math.PI/2;this.__rotation=180/Math.PI*a;this.__rotationSine=Math.sin(a);this.__rotationCosine=Math.cos(a)}return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/180*a;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);b=
this.get_scaleX();var c=this.get_scaleY();this.__matrix.a=this.__rotationCosine*b;this.__matrix.b=this.__rotationSine*b;this.__matrix.c=-this.__rotationSine*c;this.__matrix.d=this.__rotationCosine*c;this.__setRenderDirty()}return a},get_scaleX:function(){null==this.__scaleX&&(0==this.get_matrix().b?this.__scaleX=this.__matrix.a:this.__scaleX=Math.sqrt(this.__matrix.a*this.__matrix.a+this.__matrix.b*this.__matrix.b));return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX){this.__scaleX=a;
if(0==this.__matrix.b)this.__matrix.a=a;else{this.get_rotation();var b=this.__rotationSine*a;this.__matrix.a=this.__rotationCosine*a;this.__matrix.b=b}this.__setRenderDirty()}return a},get_scaleY:function(){null==this.__scaleY&&(this.__scaleY=0==this.__matrix.c?this.get_matrix().d:Math.sqrt(this.__matrix.c*this.__matrix.c+this.__matrix.d*this.__matrix.d));return this.__scaleY},set_scaleY:function(a){if(a!=this.__scaleY){this.__scaleY=a;if(0==this.__matrix.c)this.__matrix.d=a;else{this.get_rotation();
var b=this.__rotationCosine*a;this.__matrix.c=-this.__rotationSine*a;this.__matrix.d=b}this.__setRenderDirty()}return a},get_shader:function(){return this.__shader},set_shader:function(a){a!=this.__shader&&(this.__shader=a,this.__setRenderDirty());return a},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__setRenderDirty());return a},get_visible:function(){return this.__visible},set_visible:function(a){a!=this.__visible&&(this.__visible=
a,this.__setRenderDirty());return a},get_width:function(){var a=fa.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;fa.__pool.release(a);return b},set_width:function(a){var b=fa.__pool.get();this.__findTileRect(b);0!=b.width&&this.set_scaleX(a/b.width);fa.__pool.release(b);return a},get_x:function(){return this.__matrix.tx},set_x:function(a){a!=this.__matrix.tx&&(this.__matrix.tx=a,this.__setRenderDirty());return a},get_y:function(){return this.__matrix.ty},
set_y:function(a){a!=this.__matrix.ty&&(this.__matrix.ty=a,this.__setRenderDirty());return a},__class__:fg,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_tileset:"set_tileset",get_tileset:"get_tileset",set_shader:"set_shader",get_shader:"get_shader",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",
set_rect:"set_rect",get_rect:"get_rect",set_originY:"set_originY",get_originY:"get_originY",set_originX:"set_originX",get_originX:"get_originX",set_matrix:"set_matrix",get_matrix:"get_matrix",set_id:"set_id",get_id:"get_id",set_height:"set_height",get_height:"get_height",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}};var Pi=function(a,b,c,d,e,f,g){null==g&&(g=
0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);fg.call(this,-1,a,b,c,d,e,f,g);this.__tiles=[];this.__length=0};k["openfl.display.TileContainer"]=Pi;Pi.__name__="openfl.display.TileContainer";Pi.__interfaces__=[yi];Pi.__super__=fg;Pi.prototype=u(fg.prototype,{__tiles:null,addTile:function(a){if(null==a)return null;a.parent==this&&(I.remove(this.__tiles,a),this.__length--);this.__tiles[this.get_numTiles()]=a;a.parent=this;this.__length++;this.__setRenderDirty();
return a},addTileAt:function(a,b){if(null==a)return null;a.parent==this&&(I.remove(this.__tiles,a),this.__length--);this.__tiles.splice(b,0,a);a.parent=this;this.__length++;this.__setRenderDirty();return a},addTiles:function(a){for(var b=0;b<a.length;){var c=a[b];++b;this.addTile(c)}return a},clone:function(){for(var a=new Pi,b=0,c=this.__tiles;b<c.length;){var d=c[b];++b;a.addTile(d.clone())}return a},contains:function(a){return-1<this.__tiles.indexOf(a)},getBounds:function(a){for(var b=new fa,c,
d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(a),b.__expand(c.x,c.y,c.width,c.height);return b},getTileAt:function(a){return 0<=a&&a<this.get_numTiles()?this.__tiles[a]:null},getTileIndex:function(a){for(var b=0,c=this.__tiles.length;b<c;){var d=b++;if(this.__tiles[d]==a)return d}return-1},removeTile:function(a){null!=a&&a.parent==this&&(a.parent=null,I.remove(this.__tiles,a),this.__length--,this.__setRenderDirty());return a},removeTileAt:function(a){return 0<=a&&a<this.get_numTiles()?this.removeTile(this.__tiles[a]):
null},removeTiles:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);0>a&&(a=0);b>this.__tiles.length-1&&(b=this.__tiles.length-1);a=this.__tiles.splice(a,b-a+1);for(b=0;b<a.length;){var c=a[b];++b;c.parent=null}this.__length=this.__tiles.length;this.__setRenderDirty()},setTileIndex:function(a,b){0<=b&&b<=this.get_numTiles()&&a.parent==this&&(I.remove(this.__tiles,a),this.__tiles.splice(b,0,a),this.__setRenderDirty())},sortTiles:function(a){this.__tiles.sort(a);this.__setRenderDirty()},swapTiles:function(a,
b){if(a.parent==this&&b.parent==this){var c=this.__tiles.indexOf(a),d=this.__tiles.indexOf(b);this.__tiles[c]=b;this.__tiles[d]=a;this.__setRenderDirty()}},swapTilesAt:function(a,b){var c=this.__tiles[a];this.__tiles[a]=this.__tiles[b];this.__tiles[b]=c;this.__setRenderDirty()},get_numTiles:function(){return this.__length},get_height:function(){for(var a=fa.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());
c=a.height;fa.__pool.release(a);return c},set_height:function(a){for(var b=fa.__pool.get(),c,d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);0!=b.height&&this.set_scaleY(a/b.height);fa.__pool.release(b);return a},get_width:function(){for(var a=fa.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());c=a.width;fa.__pool.release(a);return c},set_width:function(a){for(var b=
fa.__pool.get(),c,d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);0!=b.width&&this.set_scaleX(a/b.width);fa.__pool.release(b);return a},__class__:Pi,__properties__:u(fg.prototype.__properties__,{get_numTiles:"get_numTiles"})});var mh=function(a,b,c,d){null==d&&(d=!0);ab.call(this);this.__drawableType=9;this.__tileset=c;this.smoothing=d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=this.tileAlphaEnabled=!0;this.__group=new Pi;this.__group.set_tileset(c);
this.__width=a;this.__height=b};k["openfl.display.Tilemap"]=mh;mh.__name__="openfl.display.Tilemap";mh.__interfaces__=[yi];mh.__super__=ab;mh.prototype=u(ab.prototype,{tileAlphaEnabled:null,tileBlendModeEnabled:null,tileColorTransformEnabled:null,smoothing:null,__group:null,__tileset:null,__buffer:null,__bufferDirty:null,__height:null,__width:null,addTile:function(a){return this.__group.addTile(a)},addTileAt:function(a,b){return this.__group.addTileAt(a,b)},addTiles:function(a){return this.__group.addTiles(a)},
contains:function(a){return this.__group.contains(a)},getTileAt:function(a){return this.__group.getTileAt(a)},getTileIndex:function(a){return this.__group.getTileIndex(a)},getTiles:function(){return this.__group.clone()},removeTile:function(a){return this.__group.removeTile(a)},removeTileAt:function(a){return this.__group.removeTileAt(a)},removeTiles:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);this.__group.removeTiles(a,b)},setTileIndex:function(a,b){this.__group.setTileIndex(a,b)},setTiles:function(a){for(var b=
0,c=this.__group.__tiles;b<c.length;){var d=c[b];++b;this.removeTile(d)}b=0;for(c=a.__tiles;b<c.length;)d=c[b],++b,this.addTile(d)},sortTiles:function(a){this.__group.sortTiles(a)},swapTiles:function(a,b){this.__group.swapTiles(a,b)},swapTilesAt:function(a,b){this.__group.swapTilesAt(a,b)},__enterFrame:function(a){this.__group.__dirty&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=fa.__pool.get();c.setTo(0,0,this.__width,this.__height);
c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var g=this.__renderTransform,h=g.a*g.d-g.b*g.c;c=0==h?-g.tx:1/h*(g.c*(g.ty-b)+g.d*(a-g.tx));g=this.__renderTransform;h=g.a*g.d-g.b*g.c;a=0==h?-g.ty:1/h*(g.a*(b-g.ty)+g.b*(g.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==d||e||d.push(f),!0):!1},
__renderFlash:function(){},get_height:function(){return this.__height*Math.abs(this.get_scaleY())},set_height:function(a){this.__height=a|0;return this.__height*Math.abs(this.get_scaleY())},get_numTiles:function(){return this.__group.__length},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__group.set_tileset(a),this.__group.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_width:function(){return this.__width*
Math.abs(this.__scaleX)},set_width:function(a){this.__width=a|0;return this.__width*Math.abs(this.__scaleX)},__class__:mh,__properties__:u(ab.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var ti=function(a,b){this.__bitmapData=a;this.rectData=ub.toFloatVector(null);this.__data=[];if(null!=b)for(a=0;a<b.length;){var c=b[a];++a;this.addRect(c)}};k["openfl.display.Tileset"]=ti;ti.__name__="openfl.display.Tileset";ti.prototype={rectData:null,
__bitmapData:null,__data:null,addRect:function(a){if(null==a)return-1;this.rectData.push(a.x);this.rectData.push(a.y);this.rectData.push(a.width);this.rectData.push(a.height);a=new Um(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},clone:function(){for(var a=new ti(this.__bitmapData,null),b=fa.__pool.get(),c=0,d=this.__data;c<d.length;){var e=d[c];++c;b.setTo(e.x,e.y,e.width,e.height);a.addRect(b)}fa.__pool.release(b);return a},hasRect:function(a){for(var b=0,c=this.__data;b<
c.length;){var d=c[b];++b;if(a.x==d.x&&a.y==d.y&&a.width==d.width&&a.height==d.height)return!0}return!1},getRect:function(a){return a<this.__data.length&&0<=a?new fa(this.__data[a].x,this.__data[a].y,this.__data[a].width,this.__data[a].height):null},getRectID:function(a){for(var b,c=0,d=this.__data.length;c<d;){var e=c++;b=this.__data[e];if(a.x==b.x&&a.y==b.y&&a.width==b.width&&a.height==b.height)return e}return null},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=
a;for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;d.__update(this.__bitmapData)}return a},get_numRects:function(){return this.__data.length},__class__:ti,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};var Um=function(a){null!=a&&(this.x=a.x|0,this.y=a.y|0,this.width=a.width|0,this.height=a.height|0)};k["openfl.display._Tileset.TileData"]=Um;Um.__name__="openfl.display._Tileset.TileData";Um.prototype={height:null,width:null,x:null,
y:null,__bitmapData:null,__uvHeight:null,__uvWidth:null,__uvX:null,__uvY:null,__update:function(a){if(null!=a){var b=a.width;a=a.height;this.__uvX=this.x/b;this.__uvY=this.y/a;this.__uvWidth=(this.x+this.width)/b;this.__uvHeight=(this.y+this.height)/a}},__class__:Um};var Br=function(){this.__totalFrames=this.__framesLoaded=1;this.__currentLabels=[];this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1};k["openfl.display.Timeline"]=Br;Br.__name__="openfl.display.Timeline";Br.prototype=
{frameRate:null,scenes:null,scripts:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__currentScene:null,__frameScripts:null,__framesLoaded:null,__frameTime:null,__isPlaying:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__scope:null,__timeElapsed:null,__totalFrames:null,attachMovieClip:function(a){},enterFrame:function(a){},initializeSprite:function(a){},__addFrameScript:function(a,b){0>a||(a+=1,null!=b?(null==this.__frameScripts&&(this.__frameScripts=
new Xa),this.__frameScripts.h[a]=function(a){b()}):null!=this.__frameScripts&&this.__frameScripts.remove(a))},__attachMovieClip:function(a){this.__scope=a;this.__framesLoaded=this.__totalFrames=0;if(null!=this.scenes&&0<this.scenes.length){for(var b=0,c=this.scenes;b<c.length;){var d=c[b];++b;this.__totalFrames+=d.numFrames;this.__framesLoaded+=d.numFrames;null!=d.labels&&(this.__currentLabels=this.__currentLabels.concat(d.labels))}this.__currentScene=this.scenes[0]}if(null!=this.scripts&&0<this.scripts.length)for(this.__frameScripts=
new Xa,b=0,c=this.scripts;b<c.length;)d=c[b],++b,this.__frameScripts.h.hasOwnProperty(d.frame)?this.__frameScripts.h[d.frame]=function(a,b){return function(c){b[0](c);a[0](c)}}([d.script],[this.__frameScripts.h[d.frame]]):this.__frameScripts.h[d.frame]=d.script;this.attachMovieClip(a)},__enterFrame:function(a){if(this.__isPlaying){a=this.__getNextFrame(a);if(this.__lastFrameScriptEval==a)return;if(null!=this.__frameScripts){if(a<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames))return;
this.__currentFrame=1}if(!this.__evaluateFrameScripts(a))return}else this.__currentFrame=a}this.__updateSymbol(this.__currentFrame)},__evaluateFrameScripts:function(a){if(null==this.__frameScripts)return!0;var b=this.__currentFrame;for(a+=1;b<a;){var c=b++;if(c!=this.__lastFrameScriptEval&&(this.__currentFrame=this.__lastFrameScriptEval=c,this.__frameScripts.h.hasOwnProperty(c)&&(this.__updateSymbol(c),(0,this.__frameScripts.h[c])(this.__scope),this.__currentFrame!=c)||!this.__isPlaying))return!1}return!0},
__getNextFrame:function(a){null!=this.frameRate?(this.__timeElapsed+=a,a=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime),1>a&&(a=1),a>this.__totalFrames&&(a=Math.floor((a-1)%this.__totalFrames)+1),this.__timeElapsed%=this.__frameTime):(a=this.__currentFrame+1,a>this.__totalFrames&&(a=1));return a},__goto:function(a){1>a?a=1:a>this.__totalFrames&&(a=this.__totalFrames);this.__lastFrameScriptEval=-1;this.__currentFrame=a;this.__updateSymbol(this.__currentFrame);this.__evaluateFrameScripts(this.__currentFrame)},
__gotoAndPlay:function(a,b){this.__play();this.__goto(this.__resolveFrameReference(a))},__gotoAndStop:function(a,b){this.__stop();this.__goto(this.__resolveFrameReference(a))},__nextFrame:function(){this.__stop();this.__goto(this.__currentFrame+1)},__nextScene:function(){},__play:function(){this.__isPlaying||2>this.__totalFrames||(this.__isPlaying=!0,null!=this.frameRate&&(this.__frameTime=1E3/this.frameRate|0,this.__timeElapsed=0))},__prevFrame:function(){this.__stop();this.__goto(this.__currentFrame-
1)},__prevScene:function(){},__stop:function(){this.__isPlaying=!1},__resolveFrameReference:function(a){if("number"==typeof a&&(a|0)===a)return a;if("string"==typeof a){for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;if(d.name==a)return d.frame}throw new hi("Error #2109: Frame label "+a+" not found in scene.");}throw J.thrown("Invalid type for frame "+a.__name__);},__updateFrameLabel:function(){this.__currentFrameLabel=this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<b.length;){var c=
b[a];++a;if(c.frame<this.__currentFrame)this.__currentLabel=c.name;else if(c.frame==this.__currentFrame)this.__currentFrameLabel=this.__currentLabel=c.name;else break}},__updateSymbol:function(a){this.__currentFrame!=this.__lastFrameUpdate&&(this.__updateFrameLabel(),this.enterFrame(a),this.__lastFrameUpdate=this.__currentFrame)},__class__:Br};var Sj=function(a,b){Gi.call(this,a,b);this.stage=new Ni(this,Object.prototype.hasOwnProperty.call(b.context,"background")?b.context.background:16777215);if(Object.prototype.hasOwnProperty.call(b,
"parameters"))try{this.stage.get_loaderInfo().parameters=b.parameters}catch(c){xb.lastError=c}this.stage.__setLogicalSize(b.width,b.height);Object.prototype.hasOwnProperty.call(b,"resizable")&&!b.resizable&&this.stage.set_scaleMode(3);a.addModule(this.stage)};k["openfl.display.Window"]=Sj;Sj.__name__="openfl.display.Window";Sj.__super__=Gi;Sj.prototype=u(Gi.prototype,{__class__:Sj});var Qi=function(a,b,c,d,e,f,g){null==g&&(g=.05);null==f&&(f=!1);this.stitch=f;this.stitch_threshold=g;this.octaves=
b;this.channels=c;this.grayscale=d;this.calculateOctaves(e)};k["openfl.display._internal.AbstractNoise"]=Qi;Qi.__name__="openfl.display._internal.AbstractNoise";Qi.prototype={octaves:null,stitch:null,stitch_threshold:null,channels:null,grayscale:null,octaves_frequencies:null,octaves_persistences:null,persistence_max:null,fill:function(a,b,c,d){},stitching:function(a,b,c,d,e,f,g,h){var m=b>>16&255,l=b>>8&255;b&=255;if(g-e<c){var n=a.getPixel32(g-c,d),p=n>>8&255,k=n&255;e=(g-c)/e;m=this.mixI(n>>16&
255,m,e);l=this.mixI(p,l,e);b=this.mixI(k,b,e)}h-f<d&&(n=a.getPixel32(c,h-d),p=n>>8&255,k=n&255,e=(h-d)/f,m=this.mixI(n>>16&255,m,e),l=this.mixI(p,l,e),b=this.mixI(k,b,e));return-16777216|m<<16|l<<8|b},color:function(a,b,c){var d=0,e=0,f=0;null!=a&&(d=this.noiseToColor(a));null!=b&&(e=this.noiseToColor(b));null!=c&&(f=this.noiseToColor(c));return-16777216|d<<16|e<<8|f},noiseToColor:function(a){return 128*(a*this.persistence_max+1)|0},fade:function(a){return a*a*a*(a*(6*a-15)+10)},mixI:function(a,
b,c){return(1-c)*a+c*b|0},mix:function(a,b,c){return(1-c)*a+c*b},fastfloor:function(a){return 0<a?a|0:a-1|0},dot2d:function(a,b,c){return a[0]*b+a[1]*c},dot:function(a,b,c,d){return a[0]*b+a[1]*c+a[2]*d},calculateOctaves:function(a){this.octaves_frequencies=[];this.octaves_persistences=[];for(var b=this.persistence_max=0,c=this.octaves;b<c;){var d=b++;var e=Math.pow(2,d);d=Math.pow(a,d);this.persistence_max+=d;this.octaves_frequencies.push(e);this.octaves_persistences.push(d)}this.persistence_max=
1/this.persistence_max},__class__:Qi};var Vm=function(){};k["openfl.display._internal.CairoBitmap"]=Vm;Vm.__name__="openfl.display._internal.CairoBitmap";Vm.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var d=b.cairo;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);b.applyMatrix(a.__renderTransform,d);var e=a.__bitmapData.getSurface();null!=e&&(e=Io.createForSurface(e),Io.set_filter(e,b.__allowSmoothing&&
a.smoothing?1:3),d.set_source(e),1==c?d.paint():d.paintWithAlpha(c));b.__popMaskObject(a);b.__setBlendMode(10)}}};Vm.renderDrawable=function(a,b){};Vm.renderDrawableMask=function(a,b){b.cairo.rectangle(0,0,a.get_width(),a.get_height())};var Cr=function(){};k["openfl.display._internal.CairoBitmapData"]=Cr;Cr.__name__="openfl.display._internal.CairoBitmapData";Cr.renderDrawable=function(a,b){};Cr.renderDrawableMask=function(a,b){};var Wm=function(){};k["openfl.display._internal.CairoDisplayObject"]=
Wm;Wm.__name__="openfl.display._internal.CairoDisplayObject";Wm.render=function(a,b){};Wm.renderDrawable=function(a,b){};Wm.renderDrawableMask=function(a,b){};var Dr=function(){};k["openfl.display._internal.CairoDisplayObjectContainer"]=Dr;Dr.__name__="openfl.display._internal.CairoDisplayObjectContainer";Dr.renderDrawable=function(a,b){};Dr.renderDrawableMask=function(a,b){};var Xm=function(){};k["openfl.display._internal.CairoGraphics"]=Xm;Xm.__name__="openfl.display._internal.CairoGraphics";Xm.hitTest=
function(a,b,c){return!1};Xm.render=function(a,b){};Xm.renderMask=function(a,b){};var Ym=function(){};k["openfl.display._internal.CairoShape"]=Ym;Ym.__name__="openfl.display._internal.CairoShape";Ym.render=function(a,b){};Ym.renderDrawable=function(a,b){};Ym.renderDrawableMask=function(a,b){};var Er=function(){};k["openfl.display._internal.CairoSimpleButton"]=Er;Er.__name__="openfl.display._internal.CairoSimpleButton";Er.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||
(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};Er.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var Zm=function(){};k["openfl.display._internal.CairoTextField"]=Zm;Zm.__name__="openfl.display._internal.CairoTextField";Zm.render=function(a,b,c){};Zm.renderDrawable=function(a,b){};Zm.renderDrawableMask=function(a,b){};var Yh=function(){};k["openfl.display._internal.CairoTilemap"]=Yh;Yh.__name__="openfl.display._internal.CairoTilemap";
Yh.render=function(a,b){if(a.__renderable&&0!=a.__group.__tiles.length){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=fa.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);Yh.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,new Nh);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(d)}}};
Yh.renderTileContainer=function(a,b,c,d,e,f,g,h,m,l,n,p,k,q){var t=b.cairo,v=wa.__pool.get();a=a.__tiles;for(var r,u,L,x,C=null,P=0;P<a.length;)if(r=a[P],++P,v.setTo(1,0,0,1,-r.get_originX(),-r.get_originY()),v.concat(r.get_matrix()),v.concat(c),u=null!=r.get_tileset()?r.get_tileset():d,L=r.get_alpha()*g,(x=r.get_visible())&&!(0>=L))if(f||(L=1),h&&(C=null!=r.__blendMode?r.__blendMode:m),0<r.__length)Yh.renderTileContainer(r,b,v,u,e,f,L,h,C,l,n,p,k,q);else if(null!=u){x=r.get_id();if(-1==x){if(r=r.__rect,
null==r||0>=r.width||0>=r.height)continue}else{r=u.__data[x];if(null==r)continue;k.setTo(r.x,r.y,r.width,r.height);r=k}u=u.__bitmapData;null!=u&&(u!=l&&(n=u.getSurface(),p=Io.createForSurface(n),Io.set_filter(p,e?1:3),t.set_source(p),l=u),h&&b.__setBlendMode(C),b.applyMatrix(v,t),q.tx=r.x,q.ty=r.y,Io.set_matrix(p,q),t.set_source(p),t.save(),t.newPath(),t.rectangle(0,0,r.width,r.height),t.clip(),1==L?t.paint():t.paintWithAlpha(L),t.restore())}wa.__pool.release(v)};Yh.renderDrawable=function(a,b){};
Yh.renderDrawableMask=function(a,b){};var Ji=function(){};k["openfl.display._internal.CanvasBitmap"]=Ji;Ji.__name__="openfl.display._internal.CanvasBitmap";Ji.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a,!1);ya.convertToCanvas(a.__bitmapData.image);d.globalAlpha=c;c=a.__scrollRect;b.setTransform(a.__renderTransform,
d);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);null==c?d.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):d.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,c.width,c.height,c.x,c.y,c.width,c.height);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a,!1)}}};Ji.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);null!=a.__bitmapData&&null!=a.__bitmapData.image&&(a.__imageVersion=a.__bitmapData.image.version);
if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||(r=b.__getAlpha(a.__worldAlpha),0>=r))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);u=b.context;b.setTransform(a.__renderTransform,u);var c=a.opaqueBackground;u.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";u.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=
a.__graphics&&a.__renderable&&(r=b.__getAlpha(a.__worldAlpha),!(0>=r))){var d=a.__graphics;if(null!=d){z.render(d,b);var e=d.__width,f=d.__height;c=d.__canvas;if(null!=c&&d.__visible&&1<=e&&1<=f){var g=d.__worldTransform;u=b.context;x=a.__scrollRect;var h=a.__worldScale9Grid;if(null==x||0<x.width&&0<x.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);u.globalAlpha=r;if(null!=h&&0==g.b&&0==g.c){var m=b.__pixelRatio;r=wa.__pool.get();r.translate(g.tx,g.ty);b.setTransform(r,u);wa.__pool.release(r);
r=d.__bounds;var l=d.__renderTransform.a/d.__bitmapScale,n=d.__renderTransform.d/d.__bitmapScale,p=l*g.a,k=n*g.d;g=Math.max(1,Math.round(h.x*l));d=Math.round(h.y*n);x=Math.max(1,Math.round((r.get_right()-h.get_right())*l));var q=Math.round((r.get_bottom()-h.get_bottom())*n);l=Math.round(h.width*l);h=Math.round(h.height*n);n=Math.round(g/m);var t=Math.round(d/m),v=Math.round(x/m);m=Math.round(q/m);p=r.width*p-n-v;r=r.height*k-t-m;b.applySmoothing(u,!1);0!=l&&0!=h?(u.drawImage(c,0,0,g,d,0,0,n,t),u.drawImage(c,
g,0,l,d,n,0,p,t),u.drawImage(c,g+l,0,x,d,n+p,0,v,t),u.drawImage(c,0,d,g,h,0,t,n,r),u.drawImage(c,g,d,l,h,n,t,p,r),u.drawImage(c,g+l,d,x,h,n+p,t,v,r),u.drawImage(c,0,d+h,g,q,0,t+r,n,m),u.drawImage(c,g,d+h,l,q,n,t+r,p,m),u.drawImage(c,g+l,d+h,x,q,n+p,t+r,v,m)):0==l&&0!=h?(f=n+p+v,u.drawImage(c,0,0,e,d,0,0,f,t),u.drawImage(c,0,d,e,h,0,t,f,r),u.drawImage(c,0,d+h,e,q,0,t+r,f,m)):0==h&&0!=l&&(e=t+r+m,u.drawImage(c,0,0,g,f,0,0,n,e),u.drawImage(c,g,0,l,f,n,0,p,e),u.drawImage(c,g+l,0,x,f,n+p,0,v,e))}else b.setTransform(g,
u),u.drawImage(c,0,0,e,f);b.__popMaskObject(a)}}}}}a.__renderable&&(r=b.__getAlpha(a.__worldAlpha),0<r&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(u=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),ya.convertToCanvas(a.__bitmapData.image),u.globalAlpha=r,x=a.__scrollRect,b.setTransform(a.__renderTransform,u),b.__allowSmoothing&&a.smoothing||(u.imageSmoothingEnabled=!1),null==x?u.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,
a.__bitmapData.image.height):u.drawImage(a.__bitmapData.image.get_src(),x.x,x.y,x.width,x.height,x.x,x.y,x.width,x.height),b.__allowSmoothing&&a.smoothing||(u.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))}else if(c=a.__cacheBitmap,c.__renderable){var r=b.__getAlpha(c.__worldAlpha);if(0<r&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var u=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);u.globalAlpha=
r;var x=c.__scrollRect;b.setTransform(c.__renderTransform,u);b.__allowSmoothing&&c.smoothing||(u.imageSmoothingEnabled=!1);null==x?u.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):u.drawImage(c.__bitmapData.image.get_src(),x.x,x.y,x.width,x.height,x.x,x.y,x.width,x.height);b.__allowSmoothing&&c.smoothing||(u.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};Ji.renderDrawableMask=function(a,b){b.context.rect(0,0,a.get_width(),
a.get_height())};var Bm=function(){};k["openfl.display._internal.CanvasBitmapData"]=Bm;Bm.__name__="openfl.display._internal.CanvasBitmapData";Bm.renderDrawable=function(a,b){if(a.readable){var c=a.image;c.type==qe.DATA&&ya.convertToCanvas(c);var d=b.context;d.globalAlpha=1;b.setTransform(a.__renderTransform,d);d.drawImage(c.get_src(),0,0,c.width,c.height)}};Bm.renderDrawableMask=function(a,b){};var vh=function(){};k["openfl.display._internal.CanvasDisplayObject"]=vh;vh.__name__="openfl.display._internal.CanvasDisplayObject";
vh.render=function(a,b){if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.context;b.setTransform(a.__renderTransform,d);var e=a.opaqueBackground;d.fillStyle="rgb("+(e>>>16&255)+","+(e>>>8&255)+","+(e&255)+")";d.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=
a.__graphics&&a.__renderable&&(c=b.__getAlpha(a.__worldAlpha),!(0>=c))){var f=a.__graphics;if(null!=f){z.render(f,b);var g=f.__width,h=f.__height;e=f.__canvas;if(null!=e&&f.__visible&&1<=g&&1<=h){var m=f.__worldTransform;d=b.context;var l=a.__scrollRect,n=a.__worldScale9Grid;if(null==l||0<l.width&&0<l.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=c;if(null!=n&&0==m.b&&0==m.c){var p=b.__pixelRatio;c=wa.__pool.get();c.translate(m.tx,m.ty);b.setTransform(c,d);wa.__pool.release(c);
c=f.__bounds;var k=f.__renderTransform.a/f.__bitmapScale,q=f.__renderTransform.d/f.__bitmapScale,t=k*m.a,v=q*m.d;m=Math.max(1,Math.round(n.x*k));f=Math.round(n.y*q);l=Math.max(1,Math.round((c.get_right()-n.get_right())*k));var r=Math.round((c.get_bottom()-n.get_bottom())*q);k=Math.round(n.width*k);n=Math.round(n.height*q);q=Math.round(m/p);var u=Math.round(f/p),x=Math.round(l/p);p=Math.round(r/p);t=c.width*t-q-x;c=c.height*v-u-p;b.applySmoothing(d,!1);0!=k&&0!=n?(d.drawImage(e,0,0,m,f,0,0,q,u),d.drawImage(e,
m,0,k,f,q,0,t,u),d.drawImage(e,m+k,0,l,f,q+t,0,x,u),d.drawImage(e,0,f,m,n,0,u,q,c),d.drawImage(e,m,f,k,n,q,u,t,c),d.drawImage(e,m+k,f,l,n,q+t,u,x,c),d.drawImage(e,0,f+n,m,r,0,u+c,q,p),d.drawImage(e,m,f+n,k,r,q,u+c,t,p),d.drawImage(e,m+k,f+n,l,r,q+t,u+c,x,p)):0==k&&0!=n?(h=q+t+x,d.drawImage(e,0,0,g,f,0,0,h,u),d.drawImage(e,0,f,g,n,0,u,h,c),d.drawImage(e,0,f+n,g,r,0,u+c,h,p)):0==n&&0!=k&&(g=u+c+p,d.drawImage(e,0,0,m,h,0,0,q,g),d.drawImage(e,m,0,k,h,q,0,t,g),d.drawImage(e,m+k,0,l,h,q+t,0,x,g))}else b.setTransform(m,
d),d.drawImage(e,0,0,g,h);b.__popMaskObject(a)}}}}}}};vh.renderDrawable=function(a,b){if(null==a.get_mask()||0<a.get_mask().get_width()&&0<a.get_mask().get_height())if(b.__updateCacheBitmap(a,!1),null!=a.__cacheBitmap&&!a.__isCacheBitmapRender){var c=a.__cacheBitmap;if(c.__renderable){var d=b.__getAlpha(c.__worldAlpha);if(0<d&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var e=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);
e.globalAlpha=d;var f=c.__scrollRect;b.setTransform(c.__renderTransform,e);b.__allowSmoothing&&c.smoothing||(e.imageSmoothingEnabled=!1);null==f?e.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):e.drawImage(c.__bitmapData.image.get_src(),f.x,f.y,f.width,f.height,f.x,f.y,f.width,f.height);b.__allowSmoothing&&c.smoothing||(e.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}}else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||
(d=b.__getAlpha(a.__worldAlpha),0>=d||(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),e=b.context,b.setTransform(a.__renderTransform,e),c=a.opaqueBackground,e.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")",e.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),null==a.__graphics||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),0>=d))))){var g=a.__graphics;if(null!=g){z.render(g,
b);var h=g.__width,m=g.__height;c=g.__canvas;if(null!=c&&g.__visible&&1<=h&&1<=m){var l=g.__worldTransform;e=b.context;f=a.__scrollRect;var n=a.__worldScale9Grid;if(null==f||0<f.width&&0<f.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);e.globalAlpha=d;if(null!=n&&0==l.b&&0==l.c){var p=b.__pixelRatio;d=wa.__pool.get();d.translate(l.tx,l.ty);b.setTransform(d,e);wa.__pool.release(d);d=g.__bounds;var k=g.__renderTransform.a/g.__bitmapScale,q=g.__renderTransform.d/g.__bitmapScale,t=
k*l.a,v=q*l.d;l=Math.max(1,Math.round(n.x*k));g=Math.round(n.y*q);f=Math.max(1,Math.round((d.get_right()-n.get_right())*k));var r=Math.round((d.get_bottom()-n.get_bottom())*q);k=Math.round(n.width*k);n=Math.round(n.height*q);q=Math.round(l/p);var u=Math.round(g/p),x=Math.round(f/p);p=Math.round(r/p);t=d.width*t-q-x;d=d.height*v-u-p;b.applySmoothing(e,!1);0!=k&&0!=n?(e.drawImage(c,0,0,l,g,0,0,q,u),e.drawImage(c,l,0,k,g,q,0,t,u),e.drawImage(c,l+k,0,f,g,q+t,0,x,u),e.drawImage(c,0,g,l,n,0,u,q,d),e.drawImage(c,
l,g,k,n,q,u,t,d),e.drawImage(c,l+k,g,f,n,q+t,u,x,d),e.drawImage(c,0,g+n,l,r,0,u+d,q,p),e.drawImage(c,l,g+n,k,r,q,u+d,t,p),e.drawImage(c,l+k,g+n,f,r,q+t,u+d,x,p)):0==k&&0!=n?(m=q+t+x,e.drawImage(c,0,0,h,g,0,0,m,u),e.drawImage(c,0,g,h,n,0,u,m,d),e.drawImage(c,0,g+n,h,r,0,u+d,m,p)):0==n&&0!=k&&(h=u+d+p,e.drawImage(c,0,0,l,m,0,0,q,h),e.drawImage(c,l,0,k,m,q,0,t,h),e.drawImage(c,l+k,0,f,m,q+t,0,x,h))}else b.setTransform(l,e),e.drawImage(c,0,0,h,m);b.__popMaskObject(a)}}}}b.__renderEvent(a)};vh.renderDrawableMask=
function(a,b){null!=a.__graphics&&z.renderMask(a.__graphics,b)};var Cm=function(){};k["openfl.display._internal.CanvasDisplayObjectContainer"]=Cm;Cm.__name__="openfl.display._internal.CanvasDisplayObjectContainer";Cm.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);if(!(!a.__renderable||0>=a.__worldAlpha||null!=a.get_mask()&&(0>=a.get_mask().get_width()||0>=a.get_mask().get_height()))&&
(vh.renderDrawable(a,b),null==a.__cacheBitmap||a.__isCacheBitmapRender)){b.__pushMaskObject(a);if(null!=b.__stage){c=0;for(d=a.__children;c<d.length;){var e=d[c];++c;b.__renderDrawable(e);e.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)e=d[c],++c,b.__renderDrawable(e);b.__popMaskObject(a)}};Cm.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&
z.renderMask(a.__graphics,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var Ae=function(){this.__dirty=!0;this.t_i=this.b_i=this.f_i=this.ff_i=this.i_i=this.ii_i=this.o_i=this.__lastLength=0;null==Ae.empty?(this.types=[],this.b=[],this.i=[],this.f=[],this.o=[],this.ff=[],this.ii=[],this.objVersions=[],this.copyOnWrite=!0):this.__initFromEmpty()};k["openfl.display._internal.DrawCommandBuffer"]=Ae;Ae.__name__="openfl.display._internal.DrawCommandBuffer";Ae.prototype={__replace_openfl_display_TriangleCulling:function(a,
b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_Vector_Int:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_Vector_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display__internal_ShaderBuffer:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_JointStyle:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=
c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_CapsStyle:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_LineScaleMode:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Int:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Bool:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_InterpolationMethod:function(a,
b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_SpreadMethod:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Array_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Array_Int:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_GradientType:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);
a[b]=c},__replace_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display__internal_DrawCommandType:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},dirty:null,types:null,b:null,copyOnWrite:null,f:null,ff:null,i:null,ii:null,o:null,t_i:null,b_i:null,f_i:null,ff_i:null,i_i:null,ii_i:null,o_i:null,objVersions:null,__lastLength:null,__dirty:null,append:function(a){if(0==this.get_length())return this.types=a.types,
this.b=a.b,this.i=a.i,this.f=a.f,this.o=a.o,this.ff=a.ff,this.ii=a.ii,this.t_i=a.t_i,this.b_i=a.b_i,this.f_i=a.f_i,this.ff_i=a.ff_i,this.i_i=a.i_i,this.ii_i=a.ii_i,this.o_i=a.o_i,this.objVersions=a.objVersions,this.copyOnWrite=a.copyOnWrite=!0,a;for(var b=new Wf(a),c=0,d=a.types;c<d.length;){var e=d[c];++c;switch(e._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;
case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_BITMAP_FILL;e=b;this.beginBitmapFill(e.buffer.o[e.oPos],
e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_FILL;e=b;this.beginFill(e.buffer.i[e.iPos],e.buffer.f[e.fPos]);break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_GRADIENT_FILL;e=b;this.beginGradientFill(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],e.buffer.ii[e.iiPos+1],
e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos]);break;case 3:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.BEGIN_SHADER_FILL;e=b;this.beginShaderFill(e.buffer.o[e.oPos]);break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;
break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.CUBIC_CURVE_TO;e=b;this.cubicCurveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+
4],e.buffer.f[e.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.CURVE_TO;e=b;this.curveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=
4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_CIRCLE;e=b;this.drawCircle(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ELLIPSE;e=b;this.drawEllipse(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 8:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_QUADS;e=b;this.drawQuads(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_RECT;
e=b;this.drawRect(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ROUND_RECT;e=b;this.drawRoundRect(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.o[e.oPos]);break;case 12:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;
b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_TRIANGLES;
e=b;this.drawTriangles(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.END_FILL;this.endFill();break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_BITMAP_STYLE;e=b;this.lineBitmapStyle(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;
case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;
b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_GRADIENT_STYLE;e=b;this.lineGradientStyle(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],e.buffer.ii[e.iiPos+1],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos]);break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_STYLE;e=b;this.lineStyle(e.buffer.o[e.oPos],e.buffer.i[e.iPos],
e.buffer.f[e.fPos],e.buffer.b[e.bPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos+1]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;
case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_TO;e=b;this.lineTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.MOVE_TO;e=b;this.moveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 20:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.OVERRIDE_MATRIX;e=b;this.overrideMatrix(e.buffer.o[e.oPos]);break;case 21:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.WINDING_EVEN_ODD;this.windingEvenOdd();break;case 22:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=
3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();var e=
this.types,f=this.t_i++,g=da.BEGIN_BITMAP_FILL;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||a!=e[f]||a.image.version!=this.objVersions[f])&&(this.__dirty=!0);for(e[f]=a;this.objVersions.length<f;)this.objVersions.push(0);this.objVersions[f]=a.image.version;e=this.o;f=this.o_i++;this.__dirty||!(f>=e.length)&&b.equals(e[f])||(this.__dirty=!0);e[f]=b;e=this.b;f=this.b_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=
c;e=this.b;f=this.b_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},beginFill:function(a,b){this.prepareWrite();var c=this.types,d=this.t_i++,e=da.BEGIN_FILL;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.i;d=this.i_i++;!this.__dirty&&(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;c=this.f;d=this.f_i++;!this.__dirty&&(d>=c.length||c[d]!=b)&&(this.__dirty=!0);c[d]=b},beginGradientFill:function(a,b,c,d,e,f,g,h){this.prepareWrite();var m=this.types,l=this.t_i++,
n=da.BEGIN_GRADIENT_FILL;!this.__dirty&&(l>=m.length||m[l]!=n)&&(this.__dirty=!0);m[l]=n;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=a)&&(this.__dirty=!0);m[l]=a;m=this.ii;l=this.ii_i++;!this.__dirty&&(l>=m.length||m[l]!=b)&&(this.__dirty=!0);m[l]=b;m=this.ff;l=this.ff_i++;!this.__dirty&&(l>=m.length||m[l]!=c)&&(this.__dirty=!0);m[l]=c;m=this.ii;l=this.ii_i++;!this.__dirty&&(l>=m.length||m[l]!=d)&&(this.__dirty=!0);m[l]=d;m=this.o;l=this.o_i++;this.__dirty||!(l>=m.length)&&e.equals(m[l])||
(this.__dirty=!0);m[l]=e;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=f)&&(this.__dirty=!0);m[l]=f;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=g)&&(this.__dirty=!0);m[l]=g;m=this.f;l=this.f_i++;!this.__dirty&&(l>=m.length||m[l]!=h)&&(this.__dirty=!0);m[l]=h},beginShaderFill:function(a){this.prepareWrite();var b=this.types,c=this.t_i++,d=da.BEGIN_SHADER_FILL;!this.__dirty&&(c>=b.length||b[c]!=d)&&(this.__dirty=!0);b[c]=d;b=this.o;c=this.o_i++;!this.__dirty&&(c>=b.length||b[c]!=
a)&&(this.__dirty=!0);b[c]=a},clear:function(){this.o_i=this.ii_i=this.i_i=this.ff_i=this.f_i=this.b_i=this.t_i=0},copy:function(){var a=new Ae;a.append(this);return a},cubicCurveTo:function(a,b,c,d,e,f){this.prepareWrite();var g=this.types,h=this.t_i++,m=da.CUBIC_CURVE_TO;!this.__dirty&&(h>=g.length||g[h]!=m)&&(this.__dirty=!0);g[h]=m;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=a)&&(this.__dirty=!0);g[h]=a;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=b)&&(this.__dirty=!0);
g[h]=b;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=c)&&(this.__dirty=!0);g[h]=c;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=d)&&(this.__dirty=!0);g[h]=d;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=e)&&(this.__dirty=!0);g[h]=e;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=f)&&(this.__dirty=!0);g[h]=f},curveTo:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=da.CURVE_TO;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=
g;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=b)&&(this.__dirty=!0);e[f]=b;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=c;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},destroy:function(){this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},drawCircle:function(a,b,c){this.prepareWrite();var d=this.types,e=this.t_i++,
f=da.DRAW_CIRCLE;!this.__dirty&&(e>=d.length||d[e]!=f)&&(this.__dirty=!0);d[e]=f;d=this.f;e=this.f_i++;!this.__dirty&&(e>=d.length||d[e]!=a)&&(this.__dirty=!0);d[e]=a;d=this.f;e=this.f_i++;!this.__dirty&&(e>=d.length||d[e]!=b)&&(this.__dirty=!0);d[e]=b;d=this.f;e=this.f_i++;!this.__dirty&&(e>=d.length||d[e]!=c)&&(this.__dirty=!0);d[e]=c},drawEllipse:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=da.DRAW_ELLIPSE;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;
e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=b)&&(this.__dirty=!0);e[f]=b;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=c;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},drawQuads:function(a,b,c){this.prepareWrite();var d=this.types,e=this.t_i++,f=da.DRAW_QUADS;!this.__dirty&&(e>=d.length||d[e]!=f)&&(this.__dirty=!0);d[e]=f;
d=this.o;e=this.o_i++;!this.__dirty&&(e>=d.length||d[e]!=a)&&(this.__dirty=!0);d[e]=a;d=this.o;e=this.o_i++;!this.__dirty&&(e>=d.length||d[e]!=b)&&(this.__dirty=!0);d[e]=b;d=this.o;e=this.o_i++;!this.__dirty&&(e>=d.length||d[e]!=c)&&(this.__dirty=!0);d[e]=c},drawRect:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=da.DRAW_RECT;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;
e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=b)&&(this.__dirty=!0);e[f]=b;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=c;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},drawRoundRect:function(a,b,c,d,e,f){this.prepareWrite();var g=this.types,h=this.t_i++,m=da.DRAW_ROUND_RECT;!this.__dirty&&(h>=g.length||g[h]!=m)&&(this.__dirty=!0);g[h]=m;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=a)&&(this.__dirty=
!0);g[h]=a;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=b)&&(this.__dirty=!0);g[h]=b;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=c)&&(this.__dirty=!0);g[h]=c;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=d)&&(this.__dirty=!0);g[h]=d;g=this.f;h=this.f_i++;!this.__dirty&&(h>=g.length||g[h]!=e)&&(this.__dirty=!0);g[h]=e;!this.__dirty&&(this.o_i>=this.o.length||this.o[this.o_i]!=f)&&(this.__dirty=!0);this.o[this.o_i++]=f},drawTriangles:function(a,b,c,d){this.prepareWrite();
var e=this.types,f=this.t_i++,g=da.DRAW_TRIANGLES;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||e[f]!=b)&&(this.__dirty=!0);e[f]=b;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=c;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},endFill:function(){this.prepareWrite();var a=
this.types,b=this.t_i++,c=da.END_FILL;!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=da.LINE_BITMAP_STYLE;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||a!=e[f]||a.image.version!=this.objVersions[f])&&(this.__dirty=!0);for(e[f]=a;this.objVersions.length<f;)this.objVersions.push(0);this.objVersions[f]=a.image.version;e=this.o;f=
this.o_i++;this.__dirty||!(f>=e.length)&&b.equals(e[f])||(this.__dirty=!0);e[f]=b;e=this.b;f=this.b_i++;!this.__dirty&&(f>=e.length||e[f]!=c)&&(this.__dirty=!0);e[f]=c;e=this.b;f=this.b_i++;!this.__dirty&&(f>=e.length||e[f]!=d)&&(this.__dirty=!0);e[f]=d},lineGradientStyle:function(a,b,c,d,e,f,g,h){this.prepareWrite();var m=this.types,l=this.t_i++,n=da.LINE_GRADIENT_STYLE;!this.__dirty&&(l>=m.length||m[l]!=n)&&(this.__dirty=!0);m[l]=n;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=a)&&(this.__dirty=
!0);m[l]=a;m=this.ii;l=this.ii_i++;!this.__dirty&&(l>=m.length||m[l]!=b)&&(this.__dirty=!0);m[l]=b;m=this.ff;l=this.ff_i++;!this.__dirty&&(l>=m.length||m[l]!=c)&&(this.__dirty=!0);m[l]=c;m=this.ii;l=this.ii_i++;!this.__dirty&&(l>=m.length||m[l]!=d)&&(this.__dirty=!0);m[l]=d;m=this.o;l=this.o_i++;this.__dirty||!(l>=m.length)&&e.equals(m[l])||(this.__dirty=!0);m[l]=e;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=f)&&(this.__dirty=!0);m[l]=f;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||
m[l]!=g)&&(this.__dirty=!0);m[l]=g;m=this.f;l=this.f_i++;!this.__dirty&&(l>=m.length||m[l]!=h)&&(this.__dirty=!0);m[l]=h},lineStyle:function(a,b,c,d,e,f,g,h){this.prepareWrite();var m=this.types,l=this.t_i++,n=da.LINE_STYLE;!this.__dirty&&(l>=m.length||m[l]!=n)&&(this.__dirty=!0);m[l]=n;!this.__dirty&&(this.o_i>=this.o.length||this.o[this.o_i]!=a)&&(this.__dirty=!0);this.o[this.o_i++]=a;m=this.i;l=this.i_i++;!this.__dirty&&(l>=m.length||m[l]!=b)&&(this.__dirty=!0);m[l]=b;m=this.f;l=this.f_i++;!this.__dirty&&
(l>=m.length||m[l]!=c)&&(this.__dirty=!0);m[l]=c;m=this.b;l=this.b_i++;!this.__dirty&&(l>=m.length||m[l]!=d)&&(this.__dirty=!0);m[l]=d;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=e)&&(this.__dirty=!0);m[l]=e;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=f)&&(this.__dirty=!0);m[l]=f;m=this.o;l=this.o_i++;!this.__dirty&&(l>=m.length||m[l]!=g)&&(this.__dirty=!0);m[l]=g;m=this.f;l=this.f_i++;!this.__dirty&&(l>=m.length||m[l]!=h)&&(this.__dirty=!0);m[l]=h},lineTo:function(a,b){this.prepareWrite();
var c=this.types,d=this.t_i++,e=da.LINE_TO;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.f;d=this.f_i++;!this.__dirty&&(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;c=this.f;d=this.f_i++;!this.__dirty&&(d>=c.length||c[d]!=b)&&(this.__dirty=!0);c[d]=b},markAsClean:function(){this.__dirty=!1},moveTo:function(a,b){this.prepareWrite();var c=this.types,d=this.t_i++,e=da.MOVE_TO;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.f;d=this.f_i++;!this.__dirty&&
(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;c=this.f;d=this.f_i++;!this.__dirty&&(d>=c.length||c[d]!=b)&&(this.__dirty=!0);c[d]=b},prepareWrite:function(){this.copyOnWrite&&(this.types=this.types.slice(),this.b=this.b.slice(),this.i=this.i.slice(),this.f=this.f.slice(),this.o=this.o.slice(),this.ff=this.ff.slice(),this.ii=this.ii.slice(),this.objVersions=this.objVersions.slice(),this.copyOnWrite=!1)},overrideBlendMode:function(a){this.prepareWrite();this.types.push(da.OVERRIDE_BLEND_MODE);this.o.push(a)},
overrideMatrix:function(a){this.prepareWrite();var b=this.types,c=this.t_i++,d=da.OVERRIDE_MATRIX;!this.__dirty&&(c>=b.length||b[c]!=d)&&(this.__dirty=!0);b[c]=d;b=this.o;c=this.o_i++;this.__dirty||!(c>=b.length)&&a.equals(b[c])||(this.__dirty=!0);b[c]=a},windingEvenOdd:function(){this.prepareWrite();var a=this.types,b=this.t_i++,c=da.WINDING_EVEN_ODD;!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},windingNonZero:function(){this.prepareWrite();var a=this.types,b=this.t_i++,c=da.WINDING_NON_ZERO;
!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},get_dirty:function(){return this.__dirty},get_length:function(){return this.t_i},__initFromEmpty:function(){this.types=Ae.empty.types;this.b=Ae.empty.b;this.i=Ae.empty.i;this.f=Ae.empty.f;this.o=Ae.empty.o;this.ff=Ae.empty.ff;this.ii=Ae.empty.ii;this.objVersions=Ae.empty.objVersions;this.copyOnWrite=!0},__endBuffer:function(){this.__lastLength!=this.t_i&&(this.__dirty=!0);this.__lastLength=this.t_i},__replaceMtx:function(a,b,c){this.__dirty||
!(b>=a.length)&&c.equals(a[b])||(this.__dirty=!0);a[b]=c},__replaceBmp:function(a,b,c){!this.__dirty&&(b>=a.length||c!=a[b]||c.image.version!=this.objVersions[b])&&(this.__dirty=!0);for(a[b]=c;this.objVersions.length<b;)this.objVersions.push(0);this.objVersions[b]=c.image.version},__class__:Ae,__properties__:{get_length:"get_length",get_dirty:"get_dirty"}};var z=function(){};k["openfl.display._internal.CanvasGraphics"]=z;z.__name__="openfl.display._internal.CanvasGraphics";z.closePath=function(a){null==
a&&(a=!1);null!=z.context.strokeStyle&&(a||z.context.closePath(),z.context.stroke(),a&&z.context.closePath(),z.context.beginPath())};z.createBitmapFill=function(a,b,c){ya.convertToCanvas(a.image);z.setSmoothing(c);return z.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};z.createGradientPattern=function(a,b,c,d,e,f,g,h){f=null;g=!1;null==e&&(e=wa.__pool.get(),e.identity(),g=!0);switch(a){case 0:f=z.context.createLinearGradient(-819.2,0,819.2,0);z.pendingMatrix=e.clone();z.inversePendingMatrix=
e.clone();z.inversePendingMatrix.invert();break;case 1:1<h?h=1:-1>h&&(h=-1),f=z.context.createRadialGradient(819.2*h,0,0,0,0,819.2),z.pendingMatrix=e.clone(),z.inversePendingMatrix=e.clone(),z.inversePendingMatrix.invert()}for(var m,l,n,p=0,k=b.length;p<k;)n=p++,m=b[n],a=c[n],h=(m&16711680)>>>16,l=(m&65280)>>>8,m&=255,n=d[n]/255,0>n&&(n=0),1<n&&(n=1),f.addColorStop(n,"rgba("+h+", "+l+", "+m+", "+a+")");g&&wa.__pool.release(e);return f};z.createTempPatternCanvas=function(a,b,c,d){var e=window.document.createElement("canvas"),
f=e.getContext("2d");e.width=c;e.height=d;a=a.image.get_src();f.fillStyle=f.createPattern(a,b?"repeat":"no-repeat");f.beginPath();f.moveTo(0,0);f.lineTo(0,d);f.lineTo(c,d);f.lineTo(c,0);f.lineTo(0,0);f.closePath();z.hitTesting||f.fill(z.windingRule);return e};z.drawRoundRect=function(a,b,c,d,e,f){null==f&&(f=e);e*=.5;f*=.5;e>c/2&&(e=c/2);f>d/2&&(f=d/2);c=a+c;d=b+d;var g=-e+.7071067811865476*e,h=-e+.41421356237309503*e,m=-f+.7071067811865476*f,l=-f+.41421356237309503*f;z.context.moveTo(c,d-f);z.context.quadraticCurveTo(c,
d+l,c+g,d+m);z.context.quadraticCurveTo(c+h,d,c-e,d);z.context.lineTo(a+e,d);z.context.quadraticCurveTo(a-h,d,a-g,d+m);z.context.quadraticCurveTo(a,d+l,a,d-f);z.context.lineTo(a,b+f);z.context.quadraticCurveTo(a,b-l,a-g,b-m);z.context.quadraticCurveTo(a-h,b,a+e,b);z.context.lineTo(c-e,b);z.context.quadraticCurveTo(c+h,b,c+g,b-m);z.context.quadraticCurveTo(c,b-l,c,b+f);z.context.lineTo(c,d-f)};z.endFill=function(){z.context.beginPath();z.playCommands(z.fillCommands,!1);z.fillCommands.clear()};z.endStroke=
function(){z.context.beginPath();z.playCommands(z.strokeCommands,!0);z.context.closePath();z.strokeCommands.clear()};z.hitTest=function(a,b,c){z.bounds=a.__bounds;z.graphics=a;if(0==a.__commands.get_length()||null==z.bounds||0>=z.bounds.width||0>=z.bounds.height)return!1;z.hitTesting=!0;var d=a.__renderTransform,e=b*d.b+c*d.d+d.ty;b=b*d.a+c*d.c+d.tx-(z.bounds.x*d.a+z.bounds.y*d.c+d.tx);c=e-(z.bounds.x*d.b+z.bounds.y*d.d+d.ty);e=a.__canvas;var f=a.__context;a.__canvas=z.hitTestCanvas;a.__context=z.hitTestContext;
z.context=a.__context;z.context.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);z.fillCommands.clear();z.strokeCommands.clear();z.hasFill=!1;z.hasStroke=!1;z.bitmapFill=null;z.bitmapRepeat=!1;z.windingRule="evenodd";d=new Wf(a.__commands);for(var g=a.__commands.types,h=0,m=a.__commands.get_length();h<m;){var l=h++;l=g[l];switch(l._hx_index){case 0:case 1:case 2:case 3:z.endFill();if(z.hasFill&&z.context.isPointInPath(b,c,z.windingRule))return d.destroy(),a.__canvas=e,a.__context=f,!0;z.endStroke();if(z.hasStroke&&
z.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=e,a.__context=f,!0;if(l==da.BEGIN_BITMAP_FILL){switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;
break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.BEGIN_BITMAP_FILL;l=d;z.fillCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);z.strokeCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1])}else if(l==da.BEGIN_GRADIENT_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.BEGIN_GRADIENT_FILL;l=d;z.fillCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);z.strokeCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos])}else if(l==da.BEGIN_SHADER_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.BEGIN_SHADER_FILL;l=d;z.fillCommands.beginShaderFill(l.buffer.o[l.oPos]);z.strokeCommands.beginShaderFill(l.buffer.o[l.oPos])}else{switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.BEGIN_FILL;l=d;z.fillCommands.beginFill(l.buffer.i[l.iPos],1);z.strokeCommands.beginFill(l.buffer.i[l.iPos],1)}break;case 4:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=da.CUBIC_CURVE_TO;l=d;z.fillCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);z.strokeCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);break;case 5:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=
1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.CURVE_TO;l=d;z.fillCommands.curveTo(l.buffer.f[l.fPos],
l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);z.strokeCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 6:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.DRAW_CIRCLE;l=d;z.fillCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);z.strokeCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);break;case 7:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.DRAW_ELLIPSE;l=d;z.fillCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);z.strokeCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 9:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;
case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.DRAW_RECT;l=d;z.fillCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+
2],l.buffer.f[l.fPos+3]);z.strokeCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 10:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=
4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.DRAW_ROUND_RECT;l=d;z.fillCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);z.strokeCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+
2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);break;case 13:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.END_FILL;z.endFill();if(z.hasFill&&z.context.isPointInPath(b,c,z.windingRule))return d.destroy(),a.__canvas=e,a.__context=f,!0;z.endStroke();if(z.hasStroke&&z.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=e,a.__context=f,!0;z.hasFill=!1;z.bitmapFill=null;break;case 14:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.LINE_BITMAP_STYLE;l=d;z.strokeCommands.lineBitmapStyle(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);break;case 15:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.LINE_GRADIENT_STYLE;l=d;z.strokeCommands.lineGradientStyle(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+
3],l.buffer.f[l.fPos]);break;case 16:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=
4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.LINE_STYLE;l=d;z.strokeCommands.lineStyle(l.buffer.o[l.oPos],l.buffer.i[l.iPos],1,l.buffer.b[l.bPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos+1]);break;case 17:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;
break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.LINE_TO;l=d;z.fillCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+
1]);z.strokeCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);break;case 18:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=da.MOVE_TO;l=d;z.fillCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);z.strokeCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);break;case 21:z.windingRule="evenodd";break;case 22:z.windingRule="nonzero";break;default:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=l}}g=!1;0<z.fillCommands.get_length()&&z.endFill();z.hasFill&&z.context.isPointInPath(b,c,z.windingRule)&&(g=!0);0<z.strokeCommands.get_length()&&z.endStroke();z.hasStroke&&z.context.isPointInStroke(b,c)&&(g=!0);d.destroy();a.__canvas=e;a.__context=f;return g};z.isCCW=function(a,b,c,d,e,f){return 0>(c-a)*(f-b)-(d-b)*(e-a)};z.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d,e=a.get_length(),f=1,g=e+1;f<g;)d=f++,b&&0==d%3||(d=a.get(d-1),c<d&&(c=d));if(!b)return{max:c,uvt:a};
var h=ub.toFloatVector(null);f=1;for(g=e+1;f<g;)d=f++,b&&0==d%3||h.push(a.get(d-1));return{max:c,uvt:h}};z.playCommands=function(a,b){null==b&&(b=!1);z.bounds=z.graphics.__bounds;var c=z.bounds.x,d=z.bounds.y,e=0,f=0,g=!1,h=0,m=0,l=!1;z.windingRule="evenodd";z.setSmoothing(!0);var n=!1,p=new Wf(a),k,q,t,v=null,r=null,u=a.types,x=0,C=a.get_length();a:for(;x<C;){var P=x++,F=u[P];switch(F._hx_index){case 0:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=
4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.BEGIN_BITMAP_FILL;
var y=p;z.bitmapFill=y.buffer.o[y.oPos];z.context.fillStyle=z.createBitmapFill(y.buffer.o[y.oPos],y.buffer.b[y.bPos],y.buffer.b[y.bPos+1]);z.hasFill=!0;null!=y.buffer.o[y.oPos+1]?(z.pendingMatrix=y.buffer.o[y.oPos+1],z.inversePendingMatrix=y.buffer.o[y.oPos+1].clone(),z.inversePendingMatrix.invert()):(z.pendingMatrix=null,z.inversePendingMatrix=null);break;case 1:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=
1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.BEGIN_FILL;var ka=p;if(.005>ka.buffer.f[ka.fPos])z.hasFill=
!1;else{if(1==ka.buffer.f[ka.fPos]){var B=R.hex(ka.buffer.i[ka.iPos]&16777215,6);z.context.fillStyle="#"+B}else{var w=(ka.buffer.i[ka.iPos]&16711680)>>>16;var I=(ka.buffer.i[ka.iPos]&65280)>>>8;var A=ka.buffer.i[ka.iPos]&255;z.context.fillStyle="rgba("+w+", "+I+", "+A+", "+ka.buffer.f[ka.fPos]+")"}z.bitmapFill=null;z.setSmoothing(!0);z.hasFill=!0}break;case 2:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;
break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.BEGIN_GRADIENT_FILL;var G=p;z.context.fillStyle=
z.createGradientPattern(G.buffer.o[G.oPos],G.buffer.ii[G.iiPos],G.buffer.ff[G.ffPos],G.buffer.ii[G.iiPos+1],G.buffer.o[G.oPos+1],G.buffer.o[G.oPos+2],G.buffer.o[G.oPos+3],G.buffer.f[G.fPos]);z.bitmapFill=null;z.setSmoothing(!0);z.hasFill=!0;break;case 3:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=
4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.BEGIN_SHADER_FILL;var D=p,J=D.buffer.o[D.oPos];0<J.inputCount&&(z.bitmapFill=J.inputs[0],z.context.fillStyle=z.createBitmapFill(z.bitmapFill,0!=J.inputWrap[0],
5!=J.inputFilter[0]),z.hasFill=!0,z.pendingMatrix=null,z.inversePendingMatrix=null);break;case 4:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=
4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.CUBIC_CURVE_TO;var H=p;n=!0;z.context.bezierCurveTo(H.buffer.f[H.fPos]-c,H.buffer.f[H.fPos+1]-d,H.buffer.f[H.fPos+2]-c,H.buffer.f[H.fPos+3]-d,H.buffer.f[H.fPos+4]-c,H.buffer.f[H.fPos+5]-d);break;case 5:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=
4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.CURVE_TO;
var K=p;n=!0;z.context.quadraticCurveTo(K.buffer.f[K.fPos]-c,K.buffer.f[K.fPos+1]-d,K.buffer.f[K.fPos+2]-c,K.buffer.f[K.fPos+3]-d);break;case 6:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=
4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_CIRCLE;var M=p;n=!0;z.context.moveTo(M.buffer.f[M.fPos]-c+M.buffer.f[M.fPos+2],M.buffer.f[M.fPos+1]-d);z.context.arc(M.buffer.f[M.fPos]-c,M.buffer.f[M.fPos+1]-d,M.buffer.f[M.fPos+2],0,2*Math.PI,!0);break;case 7:switch(p.prev._hx_index){case 0:p.oPos+=
2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=
2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_ELLIPSE;var O=p;n=!0;var aa=O.buffer.f[O.fPos];var Ba=O.buffer.f[O.fPos+1];var Q=O.buffer.f[O.fPos+2];var X=O.buffer.f[O.fPos+3];aa-=c;Ba-=d;var Ca=Q/2*.5522848;var U=X/2*.5522848;var Y=aa+Q;var T=Ba+X;var Z=aa+Q/2;var N=Ba+X/2;z.context.moveTo(aa,N);z.context.bezierCurveTo(aa,N-U,Z-Ca,Ba,Z,Ba);z.context.bezierCurveTo(Z+Ca,Ba,Y,N-U,Y,N);z.context.bezierCurveTo(Y,N+U,Z+Ca,T,Z,T);z.context.bezierCurveTo(Z-Ca,T,aa,N+U,aa,N);break;case 8:switch(p.prev._hx_index){case 0:p.oPos+=
2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=
2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_QUADS;var E=p,W=E.buffer.o[E.oPos],V=E.buffer.o[E.oPos+1],ua=E.buffer.o[E.oPos+2],ba=null!=V,ca=!1,Nd=!1,qg=ba?V.get_length():Math.floor(W.get_length()/4);if(0==qg)return;null!=ua&&(ua.get_length()>=6*qg?Nd=ca=!0:ua.get_length()>=4*qg?ca=!0:ua.get_length()>=2*qg&&(Nd=!0));var ea=fa.__pool.get(),za=wa.__pool.get(),ha=z.graphics.__renderTransform;z.context.save();for(var Ia=0,ra=qg;Ia<ra;){var ja=Ia++;var la=ba?4*V.get(ja):4*ja;if(!(0>
la||(ea.setTo(W.get(la),W.get(la+1),W.get(la+2),W.get(la+3)),0>=ea.width||0>=ea.height))){if(ca&&Nd){var ia=6*ja;za.setTo(ua.get(ia),ua.get(ia+1),ua.get(ia+2),ua.get(ia+3),ua.get(ia+4),ua.get(ia+5))}else ca?(ia=4*ja,za.setTo(ua.get(ia),ua.get(ia+1),ua.get(ia+2),ua.get(ia+3),ea.x,ea.y)):Nd?(ia=2*ja,za.tx=ua.get(ia),za.ty=ua.get(ia+1)):(za.tx=ea.x,za.ty=ea.y);za.tx+=e-c;za.ty+=f-d;za.concat(ha);z.context.setTransform(za.a,za.b,za.c,za.d,za.tx,za.ty);null!=z.bitmapFill?z.context.drawImage(z.bitmapFill.image.get_src(),
ea.x,ea.y,ea.width,ea.height,0,0,ea.width,ea.height):z.context.fillRect(0,0,ea.width,ea.height)}}fa.__pool.release(ea);wa.__pool.release(za);z.context.restore();break;case 9:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=
1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_RECT;var Rb=p;var na=!1;if(null!=z.bitmapFill&&!z.hitTesting){var pf=t=q=k=0;var Uc=!0;if(null!=z.pendingMatrix)if(0!=z.pendingMatrix.b||0!=z.pendingMatrix.c)Uc=!1;else{null==v&&(v=pa.__pool.get());null==r&&(r=pa.__pool.get());
v.setTo(Rb.buffer.f[Rb.fPos],Rb.buffer.f[Rb.fPos+1]);var oa=z.inversePendingMatrix,sa=v.x,ma=v.y;v.x=sa*oa.a+ma*oa.c+oa.tx;v.y=sa*oa.b+ma*oa.d+oa.ty;r.setTo(Rb.buffer.f[Rb.fPos]+Rb.buffer.f[Rb.fPos+2],Rb.buffer.f[Rb.fPos+1]+Rb.buffer.f[Rb.fPos+3]);var Ue=z.inversePendingMatrix,Fa=r.x,xa=r.y;r.x=Fa*Ue.a+xa*Ue.c+Ue.tx;r.y=Fa*Ue.b+xa*Ue.d+Ue.ty;k=v.y;pf=v.x;t=r.y;q=r.x}else k=Rb.buffer.f[Rb.fPos+1],pf=Rb.buffer.f[Rb.fPos],t=Rb.buffer.f[Rb.fPos+1]+Rb.buffer.f[Rb.fPos+3],q=Rb.buffer.f[Rb.fPos]+Rb.buffer.f[Rb.fPos+
2];Uc&&0<=k&&0<=pf&&q<=z.bitmapFill.width&&t<=z.bitmapFill.height&&(na=!0,z.hitTesting||z.context.drawImage(z.bitmapFill.image.get_src(),pf,k,q-pf,t-k,Rb.buffer.f[Rb.fPos]-c,Rb.buffer.f[Rb.fPos+1]-d,Rb.buffer.f[Rb.fPos+2],Rb.buffer.f[Rb.fPos+3]))}na||(n=!0,z.context.rect(Rb.buffer.f[Rb.fPos]-c,Rb.buffer.f[Rb.fPos+1]-d,Rb.buffer.f[Rb.fPos+2],Rb.buffer.f[Rb.fPos+3]));break;case 10:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;
p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_ROUND_RECT;
var qa=p;n=!0;z.drawRoundRect(qa.buffer.f[qa.fPos]-c,qa.buffer.f[qa.fPos+1]-d,qa.buffer.f[qa.fPos+2],qa.buffer.f[qa.fPos+3],qa.buffer.f[qa.fPos+4],qa.buffer.o[qa.oPos]);break;case 12:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=
5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.DRAW_TRIANGLES;var va=p,ta=va.buffer.o[va.oPos],ya=va.buffer.o[va.oPos+1],ue=va.buffer.o[va.oPos+2],Aa=null,Da=null==z.bitmapFill;if(Da&&null!=ue)break a;if(!Da){if(null==ue){ue=ub.toFloatVector(null);for(var Ea=0,lb=
ta.get_length()/2|0;Ea<lb;){var Ga=Ea++;ue.push(ta.get(2*Ga)-c/z.bitmapFill.width);ue.push(ta.get(2*Ga+1)-d/z.bitmapFill.height)}}var Ja=ue.get_length()!=ta.get_length(),La=z.normalizeUVT(ue,Ja),Ma=La.max;ue=La.uvt;Aa=1<Ma?z.createTempPatternCanvas(z.bitmapFill,z.bitmapRepeat,z.bounds.width|0,z.bounds.height|0):z.createTempPatternCanvas(z.bitmapFill,z.bitmapRepeat,z.bitmapFill.width,z.bitmapFill.height)}for(var Ha=0,Pa=ya.get_length(),Na,Oa,Qa,Ya,Za,$a,ab,bb,cb,Sa,Va,Ta,Ua,Xa,Le,hb,ib,db,eb,fb,gb,
Wa,mb,ob,pb,Je,Sc,qb;Ha<Pa;){Na=Ha;Oa=Ha+1;Qa=Ha+2;Ya=2*ya.get(Na);Za=2*ya.get(Na)+1;$a=2*ya.get(Oa);ab=2*ya.get(Oa)+1;bb=2*ya.get(Qa);cb=2*ya.get(Qa)+1;Sa=ta.get(Ya)-c;Va=ta.get(Za)-d;Ta=ta.get($a)-c;Ua=ta.get(ab)-d;Xa=ta.get(bb)-c;Le=ta.get(cb)-d;switch(va.buffer.o[va.oPos+3]){case 0:if(0>(Ta-Sa)*(Le-Va)-(Ua-Va)*(Xa-Sa)){Ha+=3;continue}break;case 2:if(!(0>(Ta-Sa)*(Le-Va)-(Ua-Va)*(Xa-Sa))){Ha+=3;continue}}Da?(z.context.beginPath(),z.context.moveTo(Sa,Va),z.context.lineTo(Ta,Ua),z.context.lineTo(Xa,
Le),z.context.closePath(),z.hitTesting||z.context.fill(z.windingRule),Ha+=3):(hb=ue.get(Ya)*Aa.width,db=ue.get($a)*Aa.width,fb=ue.get(bb)*Aa.width,ib=ue.get(Za)*Aa.height,eb=ue.get(ab)*Aa.height,gb=ue.get(cb)*Aa.height,Wa=hb*(gb-eb)-db*gb+fb*eb+(db-fb)*ib,0==Wa?(Ha+=3,z.context.restore()):(z.context.save(),z.context.beginPath(),z.context.moveTo(Sa,Va),z.context.lineTo(Ta,Ua),z.context.lineTo(Xa,Le),z.context.closePath(),z.context.clip(),mb=-(ib*(Xa-Ta)-eb*Xa+gb*Ta+(eb-gb)*Sa)/Wa,ob=(eb*Le+ib*(Ua-
Le)-gb*Ua+(gb-eb)*Va)/Wa,pb=(hb*(Xa-Ta)-db*Xa+fb*Ta+(db-fb)*Sa)/Wa,Je=-(db*Le+hb*(Ua-Le)-fb*Ua+(fb-db)*Va)/Wa,Sc=(hb*(gb*Ta-eb*Xa)+ib*(db*Xa-fb*Ta)+(fb*eb-db*gb)*Sa)/Wa,qb=(hb*(gb*Ua-eb*Le)+ib*(db*Le-fb*Ua)+(fb*eb-db*gb)*Va)/Wa,z.context.transform(mb,ob,pb,Je,Sc,qb),z.context.drawImage(Aa,0,0,Aa.width,Aa.height),z.context.restore(),Ha+=3))}break;case 14:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;
case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.LINE_BITMAP_STYLE;var nb=p;b&&z.hasStroke&&
z.closePath(!0);z.context.moveTo(e-c,f-d);z.context.strokeStyle=z.createBitmapFill(nb.buffer.o[nb.oPos],nb.buffer.b[nb.bPos],nb.buffer.b[nb.bPos+1]);z.hasStroke=!0;break;case 15:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=
5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.LINE_GRADIENT_STYLE;var jb=p;b&&z.hasStroke&&z.closePath(!0);z.context.moveTo(e-c,f-d);z.context.strokeStyle=z.createGradientPattern(jb.buffer.o[jb.oPos],jb.buffer.ii[jb.iiPos],jb.buffer.ff[jb.ffPos],jb.buffer.ii[jb.iiPos+
1],jb.buffer.o[jb.oPos+1],jb.buffer.o[jb.oPos+2],jb.buffer.o[jb.oPos+3],jb.buffer.f[jb.fPos]);z.setSmoothing(!0);z.hasStroke=!0;break;case 16:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;
break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.LINE_STYLE;var Ra=p;b&&z.hasStroke&&z.closePath(!0);z.context.moveTo(e-c,f-d);if(null==Ra.buffer.o[Ra.oPos])z.hasStroke=!1;else{z.context.lineWidth=0<Ra.buffer.o[Ra.oPos]?Ra.buffer.o[Ra.oPos]:1;var rb=null==Ra.buffer.o[Ra.oPos+3]?"round":Ar.toString(Ra.buffer.o[Ra.oPos+
3]).toLowerCase();z.context.lineJoin=rb;var sb=null==Ra.buffer.o[Ra.oPos+2]?"round":0==Ra.buffer.o[Ra.oPos+2]?"butt":xr.toString(Ra.buffer.o[Ra.oPos+2]).toLowerCase();z.context.lineCap=sb;z.context.miterLimit=Ra.buffer.f[Ra.fPos+1];if(1==Ra.buffer.f[Ra.fPos]){var tb=R.hex(Ra.buffer.i[Ra.iPos]&16777215,6);z.context.strokeStyle="#"+tb}else w=(Ra.buffer.i[Ra.iPos]&16711680)>>>16,I=(Ra.buffer.i[Ra.iPos]&65280)>>>8,A=Ra.buffer.i[Ra.iPos]&255,z.context.strokeStyle="rgba("+w+", "+I+", "+A+", "+Ra.buffer.f[Ra.fPos]+
")";z.setSmoothing(!0);z.hasStroke=!0}break;case 17:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;
break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.LINE_TO;var Vb=p;n=!0;z.context.lineTo(Vb.buffer.f[Vb.fPos]-c,Vb.buffer.f[Vb.fPos+1]-d);e=Vb.buffer.f[Vb.fPos];f=Vb.buffer.f[Vb.fPos+1];e==h&&f==m&&(g=!0);break;case 18:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=
6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=da.MOVE_TO;var kb=p;z.context.moveTo(kb.buffer.f[kb.fPos]-c,kb.buffer.f[kb.fPos+
1]-d);e=kb.buffer.f[kb.fPos];f=kb.buffer.f[kb.fPos+1];l&&kb.buffer.f[kb.fPos]!=h&&kb.buffer.f[kb.fPos+1]!=m&&(g=!0);h=kb.buffer.f[kb.fPos];m=kb.buffer.f[kb.fPos+1];l=!0;break;case 21:z.windingRule="evenodd";break;case 22:z.windingRule="nonzero";break;default:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=
4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=F}}null!=v&&pa.__pool.release(v);null!=r&&pa.__pool.release(r);p.destroy();if(n){if(b&&z.hasStroke){if(z.hasFill){if(e!=h||f!=m)z.context.lineTo(h-c,
m-d),g=!0;g&&z.closePath(!0)}else g&&e==h&&f==m&&z.closePath(!0);z.hitTesting||z.context.stroke()}b||!z.hasFill&&null==z.bitmapFill||(z.context.translate(-z.bounds.x,-z.bounds.y),null!=z.pendingMatrix?(z.context.transform(z.pendingMatrix.a,z.pendingMatrix.b,z.pendingMatrix.c,z.pendingMatrix.d,z.pendingMatrix.tx,z.pendingMatrix.ty),z.hitTesting||z.context.fill(z.windingRule),z.context.transform(z.inversePendingMatrix.a,z.inversePendingMatrix.b,z.inversePendingMatrix.c,z.inversePendingMatrix.d,z.inversePendingMatrix.tx,
z.inversePendingMatrix.ty)):z.hitTesting||z.context.fill(z.windingRule),z.context.translate(z.bounds.x,z.bounds.y),z.context.closePath())}};z.render=function(a,b){a.__update(b.__worldTransform,b.__pixelRatio);a.__commands.__endBuffer();if(a.__softwareDirty&&a.__commands.get_dirty()||!a.__renderTransform.equals(a.__oldRenderTransform)){a.__oldRenderTransform.copyFrom(a.__renderTransform);z.hitTesting=!1;z.graphics=a;z.allowSmoothing=b.__allowSmoothing;z.worldAlpha=b.__getAlpha(a.__owner.__worldAlpha);
z.bounds=a.__bounds;var c=a.__width,d=a.__height;if(!a.__visible||0==a.__commands.get_length()||null==z.bounds||1>c||1>d)a.__canvas=null,a.__context=null,a.__bitmap=null;else{null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));z.context=a.__context;var e=a.__renderTransform,f=a.__canvas,g=b.__pixelRatio,h=c*g|0,m=d*g|0;b.__setBlendModeContext(z.context,10);b.__isDOM?(f.width==h&&f.height==m?z.context.clearRect(0,0,h,m):(f.width=h,f.height=
m,f.style.width=c+"px",f.style.height=d+"px"),c=a.__renderTransform,z.context.setTransform(c.a*g,c.b*g,c.c*g,c.d*g,c.tx*g,c.ty*g)):(f.width==h&&f.height==m?(z.context.closePath(),z.context.setTransform(1,0,0,1,0,0),z.context.clearRect(0,0,h,m)):(f.width=c,f.height=d),z.context.setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty));z.fillCommands.clear();z.strokeCommands.clear();z.hasFill=!1;z.hasStroke=!1;z.bitmapFill=null;g=z.bitmapRepeat=!1;d=c=0;z.windingRule="evenodd";e=new Wf(a.__commands);f=a.__commands.types;
h=0;for(m=a.__commands.get_length();h<m;){var l=h++;l=f[l];switch(l._hx_index){case 0:case 1:case 2:case 3:z.endFill();z.endStroke();if(l==da.BEGIN_BITMAP_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;
case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.BEGIN_BITMAP_FILL;l=e;z.fillCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);z.strokeCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+
1])}else if(l==da.BEGIN_GRADIENT_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=
4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.BEGIN_GRADIENT_FILL;l=e;z.fillCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);z.strokeCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],
l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos])}else if(l==da.BEGIN_SHADER_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=
4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.BEGIN_SHADER_FILL;l=e;z.fillCommands.beginShaderFill(l.buffer.o[l.oPos]);z.strokeCommands.beginShaderFill(l.buffer.o[l.oPos])}else{switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=
6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.BEGIN_FILL;l=e;z.fillCommands.beginFill(l.buffer.i[l.iPos],l.buffer.f[l.fPos]);
z.strokeCommands.beginFill(l.buffer.i[l.iPos],l.buffer.f[l.fPos])}break;case 4:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=
2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.CUBIC_CURVE_TO;l=e;z.fillCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);g?z.strokeCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+
5]):(c=l.buffer.f[l.fPos+4],d=l.buffer.f[l.fPos+5]);break;case 5:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=
1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.CURVE_TO;l=e;z.fillCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);g?z.strokeCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]):(c=l.buffer.f[l.fPos+2],d=l.buffer.f[l.fPos+3]);break;case 6:switch(e.prev._hx_index){case 0:e.oPos+=
2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=
2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_CIRCLE;l=e;z.fillCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);g&&z.strokeCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);break;case 7:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;
break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_ELLIPSE;l=e;z.fillCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);
g&&z.strokeCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 8:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=
2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_QUADS;l=e;z.fillCommands.drawQuads(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2]);break;case 9:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=
1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_RECT;l=e;z.fillCommands.drawRect(l.buffer.f[l.fPos],
l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);g&&z.strokeCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 10:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=
5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_ROUND_RECT;l=e;z.fillCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);g&&z.strokeCommands.drawRoundRect(l.buffer.f[l.fPos],
l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);break;case 12:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;
e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.DRAW_TRIANGLES;l=e;z.fillCommands.drawTriangles(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3]);break;case 13:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;
e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.END_FILL;z.endFill();z.endStroke();
g=z.hasFill=!1;z.bitmapFill=null;d=c=0;break;case 14:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;
break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.LINE_BITMAP_STYLE;l=e;g||0==c&&0==d||(z.strokeCommands.moveTo(c,d),d=c=0);g=!0;z.strokeCommands.lineBitmapStyle(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);break;case 15:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=
1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.LINE_GRADIENT_STYLE;l=e;g||0==
c&&0==d||(z.strokeCommands.moveTo(c,d),d=c=0);g=!0;z.strokeCommands.lineGradientStyle(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);break;case 16:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;
case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.LINE_STYLE;l=e;g||null==l.buffer.o[l.oPos]||0==c&&0==d||(z.strokeCommands.moveTo(c,d),d=c=0);g=null!=l.buffer.o[l.oPos];z.strokeCommands.lineStyle(l.buffer.o[l.oPos],
l.buffer.i[l.iPos],l.buffer.f[l.fPos],l.buffer.b[l.bPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos+1]);break;case 17:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=
4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.LINE_TO;l=e;z.fillCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);g?z.strokeCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]):(c=l.buffer.f[l.fPos],d=l.buffer.f[l.fPos+1]);break;case 18:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=
2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;
break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.MOVE_TO;l=e;z.fillCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);g?z.strokeCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]):(c=l.buffer.f[l.fPos],d=l.buffer.f[l.fPos+1]);break;case 19:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=
4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.OVERRIDE_BLEND_MODE;l=e;b.__setBlendModeContext(z.context,l.buffer.o[l.oPos]);break;case 21:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;
case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=
1;break;case 20:e.oPos+=1}e.prev=da.WINDING_EVEN_ODD;z.fillCommands.windingEvenOdd();z.windingRule="evenodd";break;case 22:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=
2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=da.WINDING_NON_ZERO;z.fillCommands.windingNonZero();z.windingRule="nonzero";break;default:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;
break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=l}}0<z.fillCommands.get_length()&&z.endFill();0<z.strokeCommands.get_length()&&z.endStroke();
e.destroy();a.__bitmap=La.fromCanvas(a.__canvas)}a.__softwareDirty=!1;a.set___dirty(!1);a.__commands.markAsClean()}};z.renderMask=function(a,b){if(0!=a.__commands.get_length()){z.context=b.context;b=new Wf(a.__commands);var c=a.__commands.types,d=0;for(a=a.__commands.get_length();d<a;){var e=d++;e=c[e];switch(e._hx_index){case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.CUBIC_CURVE_TO;e=b;z.context.bezierCurveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+
1]-0,e.buffer.f[e.fPos+2]-0,e.buffer.f[e.fPos+3]-0,e.buffer.f[e.fPos+4]-0,e.buffer.f[e.fPos+5]-0);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.CURVE_TO;e=b;z.context.quadraticCurveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2]-0,e.buffer.f[e.fPos+3]-0);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;
break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_CIRCLE;e=b;z.context.arc(e.buffer.f[e.fPos]-
0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],0,2*Math.PI,!0);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ELLIPSE;var f=b;e=f.buffer.f[f.fPos];var g=f.buffer.f[f.fPos+1];var h=f.buffer.f[f.fPos+2];var m=f.buffer.f[f.fPos+3];e-=0;g-=0;f=h/2*.5522848;var l=m/2*.5522848;var n=e+h;var p=g+m;h=e+h/2;m=g+m/2;z.context.moveTo(e,m);z.context.bezierCurveTo(e,m-l,h-f,g,h,g);z.context.bezierCurveTo(h+f,g,n,m-l,n,m);z.context.bezierCurveTo(n,
m+l,h+f,p,h,p);z.context.bezierCurveTo(h-f,p,e,m+l,e,m);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_RECT;e=b;z.context.beginPath();z.context.rect(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);z.context.closePath();break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.DRAW_ROUND_RECT;e=b;z.drawRoundRect(e.buffer.f[e.fPos]-
0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.o[e.oPos]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.LINE_TO;e=b;z.context.lineTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;
break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=da.MOVE_TO;e=b;z.context.moveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0);break;
default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;
b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=e}}b.destroy()}};z.setSmoothing=function(a){z.allowSmoothing||(a=!1);z.context.imageSmoothingEnabled!=a&&(z.context.imageSmoothingEnabled=a)};var Fr=function(){};k["openfl.display._internal.CanvasShape"]=Fr;Fr.__name__="openfl.display._internal.CanvasShape";Fr.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=a.__graphics;if(null!=d){z.render(d,
b);var e=d.__width,f=d.__height,g=d.__canvas;if(null!=g&&d.__visible&&1<=e&&1<=f){var h=d.__worldTransform,m=b.context,l=a.__scrollRect,n=a.__worldScale9Grid;if(null==l||0<l.width&&0<l.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);m.globalAlpha=c;if(null!=n&&0==h.b&&0==h.c){var p=b.__pixelRatio;c=wa.__pool.get();c.translate(h.tx,h.ty);b.setTransform(c,m);wa.__pool.release(c);c=d.__bounds;var k=d.__renderTransform.a/d.__bitmapScale,q=d.__renderTransform.d/d.__bitmapScale,t=k*h.a,
v=q*h.d;h=Math.max(1,Math.round(n.x*k));d=Math.round(n.y*q);l=Math.max(1,Math.round((c.get_right()-n.get_right())*k));var r=Math.round((c.get_bottom()-n.get_bottom())*q);k=Math.round(n.width*k);n=Math.round(n.height*q);q=Math.round(h/p);var u=Math.round(d/p),x=Math.round(l/p);p=Math.round(r/p);t=c.width*t-q-x;c=c.height*v-u-p;b.applySmoothing(m,!1);0!=k&&0!=n?(m.drawImage(g,0,0,h,d,0,0,q,u),m.drawImage(g,h,0,k,d,q,0,t,u),m.drawImage(g,h+k,0,l,d,q+t,0,x,u),m.drawImage(g,0,d,h,n,0,u,q,c),m.drawImage(g,
h,d,k,n,q,u,t,c),m.drawImage(g,h+k,d,l,n,q+t,u,x,c),m.drawImage(g,0,d+n,h,r,0,u+c,q,p),m.drawImage(g,h,d+n,k,r,q,u+c,t,p),m.drawImage(g,h+k,d+n,l,r,q+t,u+c,x,p)):0==k&&0!=n?(f=q+t+x,m.drawImage(g,0,0,e,d,0,0,f,u),m.drawImage(g,0,d,e,n,0,u,f,c),m.drawImage(g,0,d+n,e,r,0,u+c,f,p)):0==n&&0!=k&&(e=u+c+p,m.drawImage(g,0,0,h,f,0,0,q,e),m.drawImage(g,h,0,k,f,q,0,t,e),m.drawImage(g,h+k,0,l,f,q+t,0,x,e))}else b.setTransform(h,m),m.drawImage(g,0,0,e,f);b.__popMaskObject(a)}}}}}};var Dm=function(){};k["openfl.display._internal.CanvasSimpleButton"]=
Dm;Dm.__name__="openfl.display._internal.CanvasSimpleButton";Dm.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};Dm.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var Z=function(){};k["openfl.display._internal.CanvasTextField"]=Z;Z.__name__="openfl.display._internal.CanvasTextField";Z.render=function(a,b,c){c=a.__textEngine;var d=
!(c.background||c.border),e=d?c.textBounds:c.bounds,f=a.__graphics,g=0;if(a.__dirty){a.__updateLayout();null==f.__bounds&&(f.__bounds=new fa);if(0==a.get_text().length){g=c.bounds.width-4;var h=a.get_defaultTextFormat().align;g=3==h?0:4==h?g:g/2;switch(h){case 0:g+=a.get_defaultTextFormat().leftMargin/2;g-=a.get_defaultTextFormat().rightMargin/2;g+=a.get_defaultTextFormat().indent/2;g+=a.get_defaultTextFormat().blockIndent/2;break;case 2:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;
g+=a.get_defaultTextFormat().blockIndent;break;case 3:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;break;case 4:g-=a.get_defaultTextFormat().rightMargin}d&&(e.y=c.bounds.y,e.x=g)}f.__bounds.copyFrom(e)}h=b.__pixelRatio;f.__update(b.__worldTransform,h);if(a.__dirty||f.__softwareDirty){var m=Math.round(f.__width*h),l=Math.round(f.__height*h);if(!(null!=c.text&&""!=c.text||c.background||c.border||c.__hasFocus||1==c.type&&c.selectable)||
(0>=c.width||0>=c.height)&&2!=c.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));Z.context=f.__context;f.__canvas.width=m;f.__canvas.height=l;b.__isDOM&&(f.__canvas.style.width=Math.round(m/h)+"px",f.__canvas.style.height=Math.round(l/
h)+"px");m=wa.__pool.get();m.scale(h,h);m.concat(f.__renderTransform);Z.context.setTransform(m.a,m.b,m.c,m.d,m.tx,m.ty);wa.__pool.release(m);null==Z.clearRect&&(Z.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);Z.clearRect&&Z.context.clearRect(0,0,f.__canvas.width,f.__canvas.height);if(null!=c.text&&""!=c.text||c.__hasFocus){d=c.text;f.__context.imageSmoothingEnabled=!b.__allowSmoothing||0==c.antiAliasType&&400==c.sharpness?!1:!0;if(c.border||c.background){Z.context.rect(.5,
.5,e.width-1,e.height-1);if(c.background){var n=R.hex(c.backgroundColor&16777215,6);Z.context.fillStyle="#"+n;Z.context.fill()}c.border&&(Z.context.lineWidth=1,n=R.hex(c.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke())}Z.context.textBaseline="alphabetic";Z.context.textAlign="start";b=-a.get_scrollH();var p=g=0;for(n=a.get_scrollV()-1;p<n;){var k=p++;g-=c.lineHeights.get(k)}var q;for(m=c.layoutGroups.iterator();m.hasNext();)if(l=m.next(),!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>
c.get_bottomScrollV()-1)break;var t="#"+R.hex(l.format.color&16777215,6);Z.context.font=Qb.getFont(l.format);Z.context.fillStyle=t;Z.context.fillText(d.substring(l.startIndex,l.endIndex),l.offsetX+b-e.x,l.offsetY+l.ascent+g-e.y);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex){p=q=0;for(n=a.__caretIndex-l.startIndex;p<n;){k=p++;if(l.positions.length<=k)break;q+=l.positions[k]}p=0;n=a.get_scrollV();
for(k=l.lineIndex+1;n<k;){var v=n++;p+=c.lineHeights.get(v-1)}Z.context.beginPath();n=R.hex(l.format.color&16777215,6);Z.context.strokeStyle="#"+n;Z.context.moveTo(l.offsetX+q-a.get_scrollH()-e.x,p+2-e.y);Z.context.lineWidth=1;Z.context.lineTo(l.offsetX+q-a.get_scrollH()-e.x,p+Qb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);Z.context.stroke();Z.context.closePath()}}else if(l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex||l.startIndex<=a.__selectionIndex&&l.endIndex>=a.__selectionIndex||
l.startIndex>a.__caretIndex&&l.endIndex<a.__selectionIndex||l.startIndex>a.__selectionIndex&&l.endIndex<a.__caretIndex)q=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,a.__caretIndex)|0,l.startIndex>q&&(q=l.startIndex),l.endIndex<p&&(p=l.endIndex),k=a.getCharBoundaries(q),p>=l.endIndex?(n=a.getCharBoundaries(l.endIndex-1),null!=n&&(n.x+=n.width+2)):n=a.getCharBoundaries(p),null!=k&&null!=n&&(Z.context.fillStyle="#000000",Z.context.fillRect(k.x+b-e.x,k.y+g,n.x-k.x,l.height),
Z.context.fillStyle="#FFFFFF",Z.context.fillText(d.substring(q,p),b+k.x-e.x,l.offsetY+l.ascent+g));l.format.underline&&(Z.context.beginPath(),Z.context.strokeStyle=t,Z.context.lineWidth=1,t=l.offsetX+b-e.x,q=Math.ceil(l.offsetY+g+l.ascent-e.y)+Math.floor(.185*l.ascent)+.5,Z.context.moveTo(t,q),Z.context.lineTo(t+l.width,q),Z.context.stroke(),Z.context.closePath())}}else{if(c.border||c.background)c.border?Z.context.rect(.5,.5,e.width-1,e.height-1):Z.context.rect(0,0,e.width,e.height),c.background&&
(n=R.hex(c.backgroundColor&16777215,6),Z.context.fillStyle="#"+n,Z.context.fill()),c.border&&(Z.context.lineWidth=1,Z.context.lineCap="square",n=R.hex(c.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke());if(-1<a.__caretIndex&&c.selectable&&a.__showCursor){b=-a.get_scrollH()+(d?0:g);p=g=0;for(n=a.get_scrollV()-1;p<n;)k=p++,g+=c.lineHeights.get(k);Z.context.beginPath();n=R.hex(a.get_defaultTextFormat().color&16777215,6);Z.context.strokeStyle="#"+n;Z.context.moveTo(b+2.5,g+2.5);
Z.context.lineWidth=1;Z.context.lineTo(b+2.5,g+Qb.getFormatHeight(a.get_defaultTextFormat())-1);Z.context.stroke();Z.context.closePath()}}f.__bitmap=La.fromCanvas(a.__graphics.__canvas);f.__bitmapScale=h;f.__visible=!0;a.__dirty=!1;f.__softwareDirty=!1;f.set___dirty(!1)}}};Z.renderDrawable=function(a,b){b.__isDOM&&!a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!0,1==a.get_type()&&a.replaceText(0,a.__text.length,a.__text),a.__isHTML&&a.__updateText(mb.parse(a.__text,a.get_multiline(),
a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges)),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));if(null==a.get_mask()||0<a.get_mask().get_width()&&0<a.get_mask().get_height())if(b.__updateCacheBitmap(a,a.__dirty),null==a.__cacheBitmap||a.__isCacheBitmapRender){var c=a.__textEngine,d=!(c.background||c.border),e=d?c.textBounds:c.bounds,f=a.__graphics,g=0;if(a.__dirty){a.__updateLayout();null==f.__bounds&&(f.__bounds=new fa);if(0==a.get_text().length){var h=
c.bounds.width-4,m=a.get_defaultTextFormat().align;g=3==m?0:4==m?h:h/2;switch(m){case 0:g+=a.get_defaultTextFormat().leftMargin/2;g-=a.get_defaultTextFormat().rightMargin/2;g+=a.get_defaultTextFormat().indent/2;g+=a.get_defaultTextFormat().blockIndent/2;break;case 2:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;break;case 3:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;
break;case 4:g-=a.get_defaultTextFormat().rightMargin}d&&(e.y=c.bounds.y,e.x=g)}f.__bounds.copyFrom(e)}m=b.__pixelRatio;f.__update(b.__worldTransform,m);if(a.__dirty||f.__softwareDirty){h=Math.round(f.__width*m);var l=Math.round(f.__height*m);if(!(null!=c.text&&""!=c.text||c.background||c.border||c.__hasFocus||1==c.type&&c.selectable)||(0>=c.width||0>=c.height)&&2!=c.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),
a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));Z.context=f.__context;f.__canvas.width=h;f.__canvas.height=l;b.__isDOM&&(f.__canvas.style.width=Math.round(h/m)+"px",f.__canvas.style.height=Math.round(l/m)+"px");var n=wa.__pool.get();n.scale(m,m);n.concat(f.__renderTransform);Z.context.setTransform(n.a,n.b,n.c,n.d,n.tx,n.ty);wa.__pool.release(n);null==Z.clearRect&&(Z.clearRect=
"undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);Z.clearRect&&Z.context.clearRect(0,0,f.__canvas.width,f.__canvas.height);if(null!=c.text&&""!=c.text||c.__hasFocus){h=c.text;f.__context.imageSmoothingEnabled=!b.__allowSmoothing||0==c.antiAliasType&&400==c.sharpness?!1:!0;if(c.border||c.background){Z.context.rect(.5,.5,e.width-1,e.height-1);if(c.background){var p=R.hex(c.backgroundColor&16777215,6);Z.context.fillStyle="#"+p;Z.context.fill()}c.border&&(Z.context.lineWidth=
1,p=R.hex(c.borderColor&16777215,6),Z.context.strokeStyle="#"+p,Z.context.stroke())}Z.context.textBaseline="alphabetic";Z.context.textAlign="start";l=-a.get_scrollH();var k=d=0;for(p=a.get_scrollV()-1;k<p;){var q=k++;d-=c.lineHeights.get(q)}var t;for(g=c.layoutGroups.iterator();g.hasNext();){var v=g.next();if(!(v.lineIndex<a.get_scrollV()-1)){if(v.lineIndex>c.get_bottomScrollV()-1)break;n="#"+R.hex(v.format.color&16777215,6);Z.context.font=Qb.getFont(v.format);Z.context.fillStyle=n;Z.context.fillText(h.substring(v.startIndex,
v.endIndex),v.offsetX+l-e.x,v.offsetY+v.ascent+d-e.y);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&v.startIndex<=a.__caretIndex&&v.endIndex>=a.__caretIndex){k=t=0;for(p=a.__caretIndex-v.startIndex;k<p;){q=k++;if(v.positions.length<=q)break;t+=v.positions[q]}k=0;p=a.get_scrollV();for(q=v.lineIndex+1;p<q;){var r=p++;k+=c.lineHeights.get(r-1)}Z.context.beginPath();p=R.hex(v.format.color&16777215,6);Z.context.strokeStyle="#"+p;Z.context.moveTo(v.offsetX+
t-a.get_scrollH()-e.x,k+2-e.y);Z.context.lineWidth=1;Z.context.lineTo(v.offsetX+t-a.get_scrollH()-e.x,k+Qb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);Z.context.stroke();Z.context.closePath()}}else if(v.startIndex<=a.__caretIndex&&v.endIndex>=a.__caretIndex||v.startIndex<=a.__selectionIndex&&v.endIndex>=a.__selectionIndex||v.startIndex>a.__caretIndex&&v.endIndex<a.__selectionIndex||v.startIndex>a.__selectionIndex&&v.endIndex<a.__caretIndex)t=Math.min(a.__selectionIndex,a.__caretIndex)|0,k=Math.max(a.__selectionIndex,
a.__caretIndex)|0,v.startIndex>t&&(t=v.startIndex),v.endIndex<k&&(k=v.endIndex),q=a.getCharBoundaries(t),k>=v.endIndex?(p=a.getCharBoundaries(v.endIndex-1),null!=p&&(p.x+=p.width+2)):p=a.getCharBoundaries(k),null!=q&&null!=p&&(Z.context.fillStyle="#000000",Z.context.fillRect(q.x+l-e.x,q.y+d,p.x-q.x,v.height),Z.context.fillStyle="#FFFFFF",Z.context.fillText(h.substring(t,k),l+q.x-e.x,v.offsetY+v.ascent+d));v.format.underline&&(Z.context.beginPath(),Z.context.strokeStyle=n,Z.context.lineWidth=1,n=v.offsetX+
l-e.x,t=Math.ceil(v.offsetY+d+v.ascent-e.y)+Math.floor(.185*v.ascent)+.5,Z.context.moveTo(n,t),Z.context.lineTo(n+v.width,t),Z.context.stroke(),Z.context.closePath())}}}else{if(c.border||c.background)c.border?Z.context.rect(.5,.5,e.width-1,e.height-1):Z.context.rect(0,0,e.width,e.height),c.background&&(p=R.hex(c.backgroundColor&16777215,6),Z.context.fillStyle="#"+p,Z.context.fill()),c.border&&(Z.context.lineWidth=1,Z.context.lineCap="square",p=R.hex(c.borderColor&16777215,6),Z.context.strokeStyle=
"#"+p,Z.context.stroke());if(-1<a.__caretIndex&&c.selectable&&a.__showCursor){l=-a.get_scrollH()+(d?0:g);k=d=0;for(p=a.get_scrollV()-1;k<p;)q=k++,d+=c.lineHeights.get(q);Z.context.beginPath();p=R.hex(a.get_defaultTextFormat().color&16777215,6);Z.context.strokeStyle="#"+p;Z.context.moveTo(l+2.5,d+2.5);Z.context.lineWidth=1;Z.context.lineTo(l+2.5,d+Qb.getFormatHeight(a.get_defaultTextFormat())-1);Z.context.stroke();Z.context.closePath()}}f.__bitmap=La.fromCanvas(a.__graphics.__canvas);f.__bitmapScale=
m;f.__visible=!0;a.__dirty=!1;f.__softwareDirty=!1;f.set___dirty(!1)}}d=!1;0==a.__textEngine.antiAliasType&&1==a.__textEngine.gridFitType&&(d=b.context.imageSmoothingEnabled)&&(b.context.imageSmoothingEnabled=!1);if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable&&(e=b.__getAlpha(a.__worldAlpha),!(0>=e)&&(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=b.context,b.setTransform(a.__renderTransform,
c),n=a.opaqueBackground,c.fillStyle="rgb("+(n>>>16&255)+","+(n>>>8&255)+","+(n&255)+")",c.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),null!=a.__graphics&&a.__renderable&&(e=b.__getAlpha(a.__worldAlpha),!(0>=e)&&(f=a.__graphics,null!=f&&(z.render(f,b),h=f.__width,l=f.__height,g=f.__canvas,null!=g&&f.__visible&&1<=h&&1<=l&&(v=f.__worldTransform,c=b.context,m=a.__scrollRect,r=a.__worldScale9Grid,null==m||0<m.width&&0<m.height))))))){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);
c.globalAlpha=e;if(null!=r&&0==v.b&&0==v.c){m=b.__pixelRatio;n=wa.__pool.get();n.translate(v.tx,v.ty);b.setTransform(n,c);wa.__pool.release(n);e=f.__bounds;k=f.__renderTransform.a/f.__bitmapScale;var u=f.__renderTransform.d/f.__bitmapScale;p=k*v.a;q=u*v.d;f=Math.max(1,Math.round(r.x*k));v=Math.round(r.y*u);n=Math.max(1,Math.round((e.get_right()-r.get_right())*k));t=Math.round((e.get_bottom()-r.get_bottom())*u);k=Math.round(r.width*k);r=Math.round(r.height*u);u=Math.round(f/m);var x=Math.round(v/m),
C=Math.round(n/m);m=Math.round(t/m);p=e.width*p-u-C;e=e.height*q-x-m;b.applySmoothing(c,!1);0!=k&&0!=r?(c.drawImage(g,0,0,f,v,0,0,u,x),c.drawImage(g,f,0,k,v,u,0,p,x),c.drawImage(g,f+k,0,n,v,u+p,0,C,x),c.drawImage(g,0,v,f,r,0,x,u,e),c.drawImage(g,f,v,k,r,u,x,p,e),c.drawImage(g,f+k,v,n,r,u+p,x,C,e),c.drawImage(g,0,v+r,f,t,0,x+e,u,m),c.drawImage(g,f,v+r,k,t,u,x+e,p,m),c.drawImage(g,f+k,v+r,n,t,u+p,x+e,C,m)):0==k&&0!=r?(f=u+p+C,c.drawImage(g,0,0,h,v,0,0,f,x),c.drawImage(g,0,v,h,r,0,x,f,e),c.drawImage(g,
0,v+r,h,t,0,x+e,f,m)):0==r&&0!=k&&(e=x+e+m,c.drawImage(g,0,0,f,l,0,0,u,e),c.drawImage(g,f,0,k,l,u,0,p,e),c.drawImage(g,f+k,0,n,l,u+p,0,C,e))}else b.setTransform(v,c),c.drawImage(g,0,0,h,l);b.__popMaskObject(a)}d&&(b.context.imageSmoothingEnabled=!0)}else a=a.__cacheBitmap,a.__renderable&&(e=b.__getAlpha(a.__worldAlpha),0<e&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(c=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),ya.convertToCanvas(a.__bitmapData.image),
c.globalAlpha=e,m=a.__scrollRect,b.setTransform(a.__renderTransform,c),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),null==m?c.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):c.drawImage(a.__bitmapData.image.get_src(),m.x,m.y,m.width,m.height,m.x,m.y,m.width,m.height),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))};Z.renderDrawableMask=function(a,b){vh.renderDrawableMask(a,b)};var Vf=function(){};
k["openfl.display._internal.CanvasTilemap"]=Vf;Vf.__name__="openfl.display._internal.CanvasTilemap";Vf.render=function(a,b){if(a.__renderable&&0!=a.__group.__tiles.length){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var e=fa.__pool.get();e.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(e,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);Vf.renderTileContainer(a.__group,b,a.__renderTransform,
a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,e);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(e)}}};Vf.renderTileContainer=function(a,b,c,d,e,f,g,h,m,l,n,p){var k=b.context,q=b.__roundPixels,t=wa.__pool.get(),v=a.__tiles,r,u=null,x=0;for(a=a.__length;x<a;){var C=x++;var L=v[C];t.setTo(1,0,0,1,-L.get_originX(),-L.get_originY());t.concat(L.get_matrix());t.concat(c);
q&&(t.tx=Math.round(t.tx),t.ty=Math.round(t.ty));var P=null!=L.get_tileset()?L.get_tileset():d;C=L.get_alpha()*g;if((r=L.get_visible())&&!(0>=C))if(f||(C=1),h&&(u=null!=L.__blendMode?L.__blendMode:m),0<L.__length)Vf.renderTileContainer(L,b,t,P,e,f,C,h,u,l,n,p);else if(null!=P){r=L.get_id();if(-1==r){if(L=L.__rect,null==L||0>=L.width||0>=L.height)continue}else{L=P.__data[r];if(null==L)continue;p.setTo(L.x,L.y,L.width,L.height);L=p}P=P.__bitmapData;null!=P&&(P!=l&&(null==P.image.buffer.__srcImage&&
ya.convertToCanvas(P.image),n=P.image.get_src(),l=P),k.globalAlpha=C,h&&b.__setBlendMode(u),b.setTransform(t,k),k.drawImage(n,L.x,L.y,L.width,L.height,0,0,L.width,L.height))}}wa.__pool.release(t)};Vf.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||(r=b.__getAlpha(a.__worldAlpha),0>=r))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);
b.__pushMaskObject(a);u=b.context;b.setTransform(a.__renderTransform,u);var c=a.opaqueBackground;u.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";u.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(r=b.__getAlpha(a.__worldAlpha),!(0>=r))){var d=a.__graphics;if(null!=d){z.render(d,b);var e=d.__width,f=d.__height;c=d.__canvas;if(null!=c&&d.__visible&&1<=e&&1<=f){var g=d.__worldTransform;u=b.context;x=a.__scrollRect;var h=a.__worldScale9Grid;
if(null==x||0<x.width&&0<x.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);u.globalAlpha=r;if(null!=h&&0==g.b&&0==g.c){var m=b.__pixelRatio;r=wa.__pool.get();r.translate(g.tx,g.ty);b.setTransform(r,u);wa.__pool.release(r);r=d.__bounds;var l=d.__renderTransform.a/d.__bitmapScale,n=d.__renderTransform.d/d.__bitmapScale,p=l*g.a,k=n*g.d;g=Math.max(1,Math.round(h.x*l));d=Math.round(h.y*n);x=Math.max(1,Math.round((r.get_right()-h.get_right())*l));var q=Math.round((r.get_bottom()-h.get_bottom())*
n);l=Math.round(h.width*l);h=Math.round(h.height*n);n=Math.round(g/m);var t=Math.round(d/m),v=Math.round(x/m);m=Math.round(q/m);p=r.width*p-n-v;r=r.height*k-t-m;b.applySmoothing(u,!1);0!=l&&0!=h?(u.drawImage(c,0,0,g,d,0,0,n,t),u.drawImage(c,g,0,l,d,n,0,p,t),u.drawImage(c,g+l,0,x,d,n+p,0,v,t),u.drawImage(c,0,d,g,h,0,t,n,r),u.drawImage(c,g,d,l,h,n,t,p,r),u.drawImage(c,g+l,d,x,h,n+p,t,v,r),u.drawImage(c,0,d+h,g,q,0,t+r,n,m),u.drawImage(c,g,d+h,l,q,n,t+r,p,m),u.drawImage(c,g+l,d+h,x,q,n+p,t+r,v,m)):0==
l&&0!=h?(f=n+p+v,u.drawImage(c,0,0,e,d,0,0,f,t),u.drawImage(c,0,d,e,h,0,t,f,r),u.drawImage(c,0,d+h,e,q,0,t+r,f,m)):0==h&&0!=l&&(e=t+r+m,u.drawImage(c,0,0,g,f,0,0,n,e),u.drawImage(c,g,0,l,f,n,0,p,e),u.drawImage(c,g+l,0,x,f,n+p,0,v,e))}else b.setTransform(g,u),u.drawImage(c,0,0,e,f);b.__popMaskObject(a)}}}}}a.__renderable&&0!=a.__group.__tiles.length&&(r=b.__getAlpha(a.__worldAlpha),0>=r||(u=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=fa.__pool.get(),c.setTo(0,0,a.__width,
a.__height),b.__pushMaskRect(c,a.__renderTransform),b.__allowSmoothing&&a.smoothing||(u.imageSmoothingEnabled=!1),Vf.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,r,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,c),b.__allowSmoothing&&a.smoothing||(u.imageSmoothingEnabled=!0),b.__popMaskRect(),b.__popMaskObject(a),fa.__pool.release(c)))}else if(c=a.__cacheBitmap,c.__renderable){var r=b.__getAlpha(c.__worldAlpha);if(0<r&&null!=
c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var u=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);u.globalAlpha=r;var x=c.__scrollRect;b.setTransform(c.__renderTransform,u);b.__allowSmoothing&&c.smoothing||(u.imageSmoothingEnabled=!1);null==x?u.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):u.drawImage(c.__bitmapData.image.get_src(),x.x,x.y,x.width,x.height,
x.x,x.y,x.width,x.height);b.__allowSmoothing&&c.smoothing||(u.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};Vf.renderDrawableMask=function(a,b){};var Th=function(){};k["openfl.display._internal.CanvasVideo"]=Th;Th.__name__="openfl.display._internal.CanvasVideo";Th.render=function(a,b){if(a.__renderable&&null!=a.__stream){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=b.context;if(null!=a.__stream.__video){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=
c;c=a.__scrollRect;var e=a.smoothing;b.setTransform(a.__worldTransform,d);e||(d.imageSmoothingEnabled=!1);null==c?d.drawImage(a.__stream.__video,0,0,a.get_width(),a.get_height()):d.drawImage(a.__stream.__video,c.x,c.y,c.width,c.height,c.x,c.y,c.width,c.height);e||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a)}}}};Th.renderDrawable=function(a,b){Th.render(a,b);b.__renderEvent(a)};Th.renderDrawableMask=function(a,b){};var tf=function(){};k["openfl.display._internal.Context3DBitmap"]=tf;tf.__name__=
"openfl.display._internal.Context3DBitmap";tf.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.__context3D;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.__initDisplayShader(a.__worldShader);b.setShader(d);b.applyBitmapData(a.__bitmapData,b.__allowSmoothing&&(a.smoothing||b.__upscaled));b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);
b.updateShader();var e=a.__bitmapData.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);d=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(d);b.__clearShader();b.__popMaskObject(a)}};tf.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);null!=a.__bitmapData&&null!=a.__bitmapData.image&&(a.__imageVersion=a.__bitmapData.image.version);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==
a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=fa.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(d)}null!=a.__graphics&&
Zf.render(a,b)}tf.render(a,b)}else tf.render(a.__cacheBitmap,b);b.__renderEvent(a)};tf.renderDrawableMask=function(a,b){tf.renderMask(a,b)};tf.renderMask=function(a,b){if(null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Uh.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.updateShader();var e=a.__bitmapData.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);
null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var Qm=function(){};k["openfl.display._internal.Context3DBitmapData"]=Qm;Qm.__name__="openfl.display._internal.Context3DBitmapData";Qm.renderDrawable=function(a,b){var c=b.__context3D;b.__setBlendMode(10);var d=b.__defaultDisplayShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.applyAlpha(a.__worldAlpha);
b.applyColorTransform(a.__worldColorTransform);b.updateShader();var e=a.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};Qm.renderDrawableMask=function(a,b){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.updateShader();var e=a.getVertexBuffer(c);
null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};var xh=function(a,b,c,d){this.context3D=a;this.elementType=b;this.dataPerVertex=d;this.vertexCount=this.indexCount=0;this.resize(c)};k["openfl.display._internal.Context3DBuffer"]=xh;xh.__name__="openfl.display._internal.Context3DBuffer";xh.prototype={dataPerVertex:null,elementCount:null,elementType:null,
indexBufferData:null,indexBuffers:null,indexCount:null,vertexBuffer:null,vertexBufferData:null,vertexCount:null,context3D:null,drawElements:function(a,b){null==b&&(b=-1);if(0!=this.indexCount&&0!=this.vertexCount&&0==this.elementType._hx_index)if(-1==b&&(b=2*this.elementCount),10922>a&&10922>b-a)this.context3D.drawTriangles(this.indexBuffers[0],a,2*b);else for(var c=a+b;a<c;){var d=Math.floor(a/10922);b=Math.min(c-a,10922)|0;if(0>=b)break;this.context3D.drawTriangles(this.indexBuffers[d],3*(a-10922*
d),2*b);a+=b}},flushVertexBufferData:function(){this.vertexBufferData.length>this.vertexCount&&(this.vertexCount=this.vertexBufferData.length,this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0));this.vertexBuffer.uploadFromTypedArray(Rg.toArrayBufferView(this.vertexBufferData))},resize:function(a,b){null==b&&(b=-1);this.elementCount=a;-1==b&&(b=this.dataPerVertex);b!=this.dataPerVertex&&(this.vertexBuffer=null,this.vertexCount=0,this.dataPerVertex=b);var c=0;
switch(this.elementType._hx_index){case 0:c=4*a;break;case 1:c=3*a;break;case 2:c=3*a}b*=c;if(null==this.vertexBufferData){var d=c=null,e=null,f=null,g=null;this.vertexBufferData=b=null!=b?new Float32Array(b):null!=c?new Float32Array(c):null!=d?new Float32Array(d.__array):null!=e?new Float32Array(e):null!=f?null==g?new Float32Array(f,0):new Float32Array(f,0,g):null}else b>this.vertexBufferData.length&&(a=this.vertexBufferData,g=f=e=d=c=null,this.vertexBufferData=b=null!=b?new Float32Array(b):null!=
c?new Float32Array(c):null!=d?new Float32Array(d.__array):null!=e?new Float32Array(e):null!=f?null==g?new Float32Array(f,0):new Float32Array(f,0,g):null,this.vertexBufferData.set(a))},__class__:xh};var $m=x["openfl.display._internal.Context3DElementType"]={__ename__:"openfl.display._internal.Context3DElementType",__constructs__:null,QUADS:{_hx_name:"QUADS",_hx_index:0,__enum__:"openfl.display._internal.Context3DElementType",toString:v},TRIANGLES:{_hx_name:"TRIANGLES",_hx_index:1,__enum__:"openfl.display._internal.Context3DElementType",
toString:v},TRIANGLE_INDICES:{_hx_name:"TRIANGLE_INDICES",_hx_index:2,__enum__:"openfl.display._internal.Context3DElementType",toString:v}};$m.__constructs__=[$m.QUADS,$m.TRIANGLES,$m.TRIANGLE_INDICES];var Xg=function(){};k["openfl.display._internal.Context3DDisplayObject"]=Xg;Xg.__name__="openfl.display._internal.Context3DDisplayObject";Xg.render=function(a,b){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&
0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=fa.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(d)}null!=a.__graphics&&Zf.render(a,b)}};Xg.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null!=a.__cacheBitmap&&!a.__isCacheBitmapRender)tf.render(a.__cacheBitmap,
b);else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=fa.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(d)}null!=
a.__graphics&&Zf.render(a,b)}b.__renderEvent(a)};Xg.renderDrawableMask=function(a,b){null!=a.__graphics&&Zf.renderMask(a,b)};Xg.renderMask=function(a,b){if(null!=a.opaqueBackground||null!=a.__graphics)null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height(),null!=a.__graphics&&Zf.renderMask(a,b)};var Rm=function(){};k["openfl.display._internal.Context3DDisplayObjectContainer"]=Rm;Rm.__name__="openfl.display._internal.Context3DDisplayObjectContainer";Rm.renderDrawable=function(a,
b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(0>=a.__worldAlpha)&&(Xg.renderDrawable(a,b),null==a.__cacheBitmap||a.__isCacheBitmapRender)){if(0<a.__children.length)if(b.__pushMaskObject(a),null!=b.__stage){c=0;for(d=a.__children;c<d.length;){var e=d[c];++c;b.__renderDrawable(e);e.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)e=d[c],++c,b.__renderDrawable(e);
0<a.__children.length&&b.__popMaskObject(a)}};Rm.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&Zf.renderMask(a,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var Qc=function(){};k["openfl.display._internal.Context3DGraphics"]=Qc;Qc.__name__="openfl.display._internal.Context3DGraphics";Qc.buildBuffer=function(a,b){var c,d=c=0,e=0,f=
new Wf(a.__commands);b=b.__context3D;for(var g=fa.__pool.get(),h=wa.__pool.get(),m=null,l=0,n=a.__commands.types;l<n.length;){var p=n[l];++l;switch(p._hx_index){case 0:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=
1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=da.BEGIN_BITMAP_FILL;m=f;m=m.buffer.o[m.oPos];break;case 1:m=null;switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;
break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=p;break;case 3:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=
2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;
break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=da.BEGIN_SHADER_FILL;m=f;p=m.buffer.o[m.oPos];m=null;if(null!=p)for(var k=0,q=p.inputCount;k<q;){var t=k++;if("bitmap"==p.inputRefs[t].name){m=p.inputs[t];break}}break;case 8:if(null!=m){switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;
case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=da.DRAW_QUADS;q=f;p=q.buffer.o[q.oPos];k=q.buffer.o[q.oPos+1];q=q.buffer.o[q.oPos+2];t=null!=k;var v=!1,r=!1,u=t?k.get_length():Math.floor(p.get_length()/4);
if(0==u)return;null!=q&&(q.get_length()>=6*u?r=v=!0:q.get_length()>=4*u?v=!0:q.get_length()>=2*u&&(r=!0));null==a.__quadBuffer||a.__quadBuffer.context3D!=b?a.__quadBuffer=new xh(b,$m.QUADS,u,4):a.__quadBuffer.resize(c+u,4);for(var x,C,P,F,z,y,ka,B,w,G,I,A,D,J,H=a.__quadBuffer.vertexBufferData,K=m.width,M=m.height,O=0,aa=u;O<aa;)F=O++,x=16*(c+F),C=t?4*k.get(F):4*F,0>C||(g.setTo(p.get(C),p.get(C+1),p.get(C+2),p.get(C+3)),C=g.width,P=g.height,0>=C||0>=P||(v&&r?(F*=6,h.setTo(q.get(F),q.get(F+1),q.get(F+
2),q.get(F+3),q.get(F+4),q.get(F+5))):v?(F*=4,h.setTo(q.get(F),q.get(F+1),q.get(F+2),q.get(F+3),g.x,g.y)):r?(F*=2,h.tx=q.get(F),h.ty=q.get(F+1)):(h.tx=g.x,h.ty=g.y),F=g.x/K,z=g.y/M,y=g.get_right()/K,ka=g.get_bottom()/M,B=0*h.a+0*h.c+h.tx,w=0*h.b+0*h.d+h.ty,G=C*h.a+0*h.c+h.tx,I=C*h.b+0*h.d+h.ty,A=0*h.a+P*h.c+h.tx,D=0*h.b+P*h.d+h.ty,J=C*h.a+P*h.c+h.tx,C=C*h.b+P*h.d+h.ty,H[x]=B,H[x+1]=w,H[x+2]=F,H[x+3]=z,H[x+4]=G,H[x+4+1]=I,H[x+4+2]=y,H[x+4+3]=z,H[x+8]=A,H[x+8+1]=D,H[x+8+2]=F,H[x+8+3]=ka,H[x+12]=J,H[x+
12+1]=C,H[x+12+2]=y,H[x+12+3]=ka));c+=u}break;case 12:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=
1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=da.DRAW_TRIANGLES;q=f;p=q.buffer.o[q.oPos];k=q.buffer.o[q.oPos+1];q=q.buffer.o[q.oPos+2];t=null!=k;u=Math.floor(p.get_length()/2);v=t?k.get_length():u;x=(u=(r=null!=q)&&q.get_length()>=3*u)?4:2;H=u?3:2;K=x+2;M=u?e:d;Qc.resizeVertexBuffer(a,u,M+v*K);O=u?a.__vertexBufferDataUVT:a.__vertexBufferData;P=0;for(F=v;P<F;)z=P++,aa=M+z*K,C=t?2*k.get(z):
2*z,z=t?k.get(z)*H:z*H,u?(y=q.get(z+2),O[aa]=p.get(C)/y,O[aa+1]=p.get(C+1)/y,O[aa+2]=0,O[aa+3]=1/y):(O[aa]=p.get(C),O[aa+1]=p.get(C+1)),O[aa+x]=r?q.get(z):0,O[aa+x+1]=r?q.get(z+1):0;u?e+=v*K:d+=v*K;break;case 13:m=null;break;default:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=
3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=p}}0<c&&a.__quadBuffer.flushVertexBufferData();a.__vertexBufferContext!=b.__context&&(a.__vertexBufferContext=b.__context,a.__triangleIndexBuffer=null,a.__triangleIndexBufferCount=
0,a.__vertexBuffer=null,a.__vertexBufferCount=0,a.__vertexBufferUVT=null,a.__vertexBufferCountUVT=0);if(0<d){c=a.__vertexBuffer;if(null==c||d>a.__vertexBufferCount)c=b.createVertexBuffer(d,4,0),a.__vertexBuffer=c,a.__vertexBufferCount=d;c.uploadFromTypedArray(Rg.toArrayBufferView(a.__vertexBufferData))}if(0<e){c=a.__vertexBufferUVT;if(null==c||e>a.__vertexBufferCountUVT)c=b.createVertexBuffer(e,6,0),a.__vertexBufferUVT=c,a.__vertexBufferCountUVT=e;c.uploadFromTypedArray(Rg.toArrayBufferView(a.__vertexBufferDataUVT))}fa.__pool.release(g);
wa.__pool.release(h)};Qc.isCompatible=function(a){if(null!=a.__owner.__worldScale9Grid)return!1;var b=new Wf(a.__commands),c=!1,d=!1,e=!1,f=0;for(a=a.__commands.types;f<a.length;){var g=a[f];++f;switch(g._hx_index){case 0:d=!0;e=c=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 1:d=!1;c=!0;e=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;
case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 3:c=d=!1;e=!0;switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 8:if(d||e){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),!1;break;case 9:if(c){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),!1;break;case 12:if(d||e){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;
b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),
!1;break;case 13:e=c=d=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=
1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;
case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 19:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=
4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;default:return b.destroy(),!1}}b.destroy();return!0};Qc.render=function(a,b){if(a.__visible&&0!=a.__commands.get_length())if(null!=a.__bitmap&&
!a.__dirty||!Qc.isCompatible(a)){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer.__worldTransform;b.__softwareRenderer.__worldTransform=7==a.__owner.__drawableType?wa.__identity:b.__worldTransform;z.render(a,b.__softwareRenderer);b.__softwareRenderer.__worldTransform=c}else{a.__bitmap=null;a.__update(b.__worldTransform,b.__pixelRatio);var d=a.__width,e=a.__height;if(null!=a.__bounds&&1<=d&&1<=e){(a.__hardwareDirty||null==a.__quadBuffer&&null==a.__vertexBuffer&&null==a.__vertexBufferUVT)&&
Qc.buildBuffer(a,b);c=new Wf(a.__commands);for(var f=b.__context3D,g=wa.__pool.get(),h=null,m=null,l=!1,n=!1,p=null,k=0,q=0,t=0,v=0,r=0,u=a.__commands.types;r<u.length;)switch(d=u[r],++r,d._hx_index){case 0:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=
4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.BEGIN_BITMAP_FILL;n=c;m=n.buffer.o[n.oPos];l=n.buffer.b[n.bPos];n=n.buffer.b[n.bPos+1];p=h=null;break;case 1:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=
1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=
1}c.prev=da.BEGIN_FILL;m=c;p=(m.buffer.i[m.iPos]|0)&16777215|(255*m.buffer.f[m.fPos]|0)<<24;m=h=null;break;case 3:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=
2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.BEGIN_SHADER_FILL;q=c;h=q.buffer.o[q.oPos];q=0;m=null==h||null==h.shader||null==h.shader.__bitmap?null:h.shader.__bitmap.input;p=null;break;case 8:if(null!=m){switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=
1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.DRAW_QUADS;var x=c;d=
x.buffer.o[x.oPos];x=x.buffer.o[x.oPos+1];d=null!=x?x.get_length():Math.floor(d.get_length()/4);var C=b.__getMatrix(a.__owner.__renderTransform,1);null==h||Qc.maskRender?(x=Qc.maskRender?b.__maskShader:b.__initGraphicsShader(null),b.setShader(x),b.applyMatrix(C),b.applyBitmapData(m,n,l),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform),b.updateShader()):(x=b.__initShaderBuffer(h),b.__setShaderBuffer(h),b.applyMatrix(C),b.applyBitmapData(m,!1,l),b.applyAlpha(a.__owner.__worldAlpha),
b.applyColorTransform(a.__owner.__worldColorTransform));for(C=k+d;k<C;){d=Math.min(C-k,f.__quadIndexBufferElements)|0;if(0>=d)break;null==h||Qc.maskRender||b.__updateShaderBuffer(q);null!=x.__position&&f.setVertexBufferAt(x.__position.index,a.__quadBuffer.vertexBuffer,16*k,2);null!=x.__textureCoord&&f.setVertexBufferAt(x.__textureCoord.index,a.__quadBuffer.vertexBuffer,16*k+2,2);f.drawTriangles(f.__quadIndexBuffer,0,2*d);q+=4*d;k+=d}b.__clearShader()}break;case 9:if(null!=p){switch(c.prev._hx_index){case 0:c.oPos+=
2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=
2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.DRAW_RECT;var P=c;x=P.buffer.f[P.fPos];C=P.buffer.f[P.fPos+1];d=P.buffer.f[P.fPos+2];e=P.buffer.f[P.fPos+3];P=p;Qc.tempColorTransform.redOffset=P>>>16&255;Qc.tempColorTransform.greenOffset=P>>>8&255;Qc.tempColorTransform.blueOffset=P&255;Qc.tempColorTransform.__combine(a.__owner.__worldColorTransform);g.identity();g.scale(d,e);g.tx=x;g.ty=C;g.concat(a.__owner.__renderTransform);d=Qc.maskRender?b.__maskShader:b.__initGraphicsShader(null);
b.setShader(d);b.applyMatrix(b.__getMatrix(g,1));b.applyBitmapData(Qc.blankBitmapData,!0,l);b.applyAlpha((P>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Qc.tempColorTransform);b.updateShader();x=Qc.blankBitmapData.getVertexBuffer(f);null!=d.__position&&f.setVertexBufferAt(d.__position.index,x,0,3);null!=d.__textureCoord&&f.setVertexBufferAt(d.__textureCoord.index,x,3,2);d=Qc.blankBitmapData.getIndexBuffer(f);f.drawTriangles(d);q+=4;b.__clearShader()}break;case 12:switch(c.prev._hx_index){case 0:c.oPos+=
2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=
2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.DRAW_TRIANGLES;e=c;x=e.buffer.o[e.oPos+1];C=e.buffer.o[e.oPos+2];d=e.buffer.o[e.oPos+3];P=null!=x;e=Math.floor(e.buffer.o[e.oPos].get_length()/2);x=P?x.get_length():e;P=(C=null!=C&&C.get_length()>=3*e)?4:2;e=P+2;var F=C?a.__vertexBufferUVT:a.__vertexBuffer,y=C?v:t,ka=b.__getMatrix(a.__owner.__renderTransform,1);if(null==h||Qc.maskRender){var B=Qc.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(B);b.applyMatrix(ka);b.applyBitmapData(m,
n,l);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform);b.updateShader()}else B=b.__initShaderBuffer(h),b.__setShaderBuffer(h),b.applyMatrix(ka),b.applyBitmapData(m,!1,l),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(q);null!=B.__position&&f.setVertexBufferAt(B.__position.index,F,y,C?4:2);null!=B.__textureCoord&&f.setVertexBufferAt(B.__textureCoord.index,F,y+P,2);switch(d){case 0:f.setCulling(0);break;case 1:f.setCulling(3);break;case 2:f.setCulling(1)}f.__drawTriangles(0,
x);q+=x;C?v+=e*x:t+=e*x;switch(d){case 1:case 2:f.setCulling(0)}b.__clearShader();break;case 13:h=p=m=null;switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;
case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=d;f.setCulling(3);break;case 18:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=
3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.MOVE_TO;break;case 19:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;
case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=da.OVERRIDE_BLEND_MODE;d=c;b.__setBlendMode(d.buffer.o[d.oPos]);
break;default:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=
2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=d}wa.__pool.release(g)}a.__hardwareDirty=!1;a.set___dirty(!1)}};Qc.renderMask=function(a,b){Qc.maskRender=!0;Qc.render(a,b);Qc.maskRender=!1};Qc.resizeIndexBuffer=function(a,b,c){if(!b){var d=b?null:a.__triangleIndexBufferData,e=null;if(null==d){var f=e=null,g=null,h=null,m=null;e=c=null!=c?new Uint16Array(c):null!=e?new Uint16Array(e):null!=f?new Uint16Array(f.__array):null!=g?new Uint16Array(g):
null!=h?null==m?new Uint16Array(h,0):new Uint16Array(h,0,m):null}else c>d.length&&(m=h=g=f=e=null,e=c=null!=c?new Uint16Array(c):null!=e?new Uint16Array(e):null!=f?new Uint16Array(f.__array):null!=g?new Uint16Array(g):null!=h?null==m?new Uint16Array(h,0):new Uint16Array(h,0,m):null,e.set(d));null==e||b||(a.__triangleIndexBufferData=e)}};Qc.resizeVertexBuffer=function(a,b,c){var d=b?a.__vertexBufferDataUVT:a.__vertexBufferData,e=null;if(null==d){var f=e=null,g=null,h=null,m=null;e=c=null!=c?new Float32Array(c):
null!=e?new Float32Array(e):null!=f?new Float32Array(f.__array):null!=g?new Float32Array(g):null!=h?null==m?new Float32Array(h,0):new Float32Array(h,0,m):null}else c>d.length&&(m=h=g=f=e=null,e=c=null!=c?new Float32Array(c):null!=e?new Float32Array(e):null!=f?new Float32Array(f.__array):null!=g?new Float32Array(g):null!=h?null==m?new Float32Array(h,0):new Float32Array(h,0,m):null,e.set(d));null!=e&&(b?a.__vertexBufferDataUVT=e:a.__vertexBufferData=e)};var Uh=function(){null==this.__glFragmentSource&&
(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t\tif (color.a == 0.0) {\n\n\t\t\t\tdiscard;\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = color;\n\n\t\t\t}\n\n\t\t}");null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
xe.call(this);this.__isGenerated=!0;this.__initGL()};k["openfl.display._internal.Context3DMaskShader"]=Uh;Uh.__name__="openfl.display._internal.Context3DMaskShader";Uh.__super__=xe;Uh.prototype=u(xe.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:Uh});var Zf=function(){};k["openfl.display._internal.Context3DShape"]=Zf;Zf.__name__="openfl.display._internal.Context3DShape";Zf.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=
a.__graphics;if(null!=c){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);Qc.render(c,b);if(null!=c.__bitmap&&c.__visible){var d=b.__context3D,e=b.__initDisplayShader(a.__worldShader);b.setShader(e);b.applyBitmapData(c.__bitmap,!0);var f=wa.__pool.get();f.scale(1/c.__bitmapScale,1/c.__bitmapScale);f.concat(c.__worldTransform);b.applyMatrix(b.__getMatrix(f,1));wa.__pool.release(f);b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();f=c.__bitmap.getVertexBuffer(d);
null!=e.__position&&d.setVertexBufferAt(e.__position.index,f,0,3);null!=e.__textureCoord&&d.setVertexBufferAt(e.__textureCoord.index,f,3,2);c=c.__bitmap.getIndexBuffer(d);d.drawTriangles(c);b.__clearShader()}b.__popMaskObject(a)}}};Zf.renderMask=function(a,b){var c=a.__graphics;if(null!=c&&(Qc.renderMask(c,b),null!=c.__bitmap)){a=b.__context3D;var d=b.__maskShader;b.setShader(d);b.applyBitmapData(c.__bitmap,!0);b.applyMatrix(b.__getMatrix(c.__worldTransform,1));b.updateShader();var e=c.__bitmap.getVertexBuffer(a);
null!=d.__position&&a.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&a.setVertexBufferAt(d.__textureCoord.index,e,3,2);c=c.__bitmap.getIndexBuffer(a);a.drawTriangles(c);b.__clearShader()}};var Sm=function(){};k["openfl.display._internal.Context3DSimpleButton"]=Sm;Sm.__name__="openfl.display._internal.Context3DSimpleButton";Sm.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),
b.__renderEvent(a))};Sm.renderDrawableMask=function(a,b){null!=a.__currentState&&b.__renderDrawableMask(a.__currentState)};var Yg=function(){};k["openfl.display._internal.Context3DTextField"]=Yg;Yg.__name__="openfl.display._internal.Context3DTextField";Yg.render=function(a,b){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer;b=a.__textEngine;var d=!(b.background||b.border),e=d?b.textBounds:b.bounds,f=a.__graphics,g=0;if(a.__dirty){a.__updateLayout();null==f.__bounds&&(f.__bounds=
new fa);if(0==a.get_text().length){g=b.bounds.width-4;var h=a.get_defaultTextFormat().align;g=3==h?0:4==h?g:g/2;switch(h){case 0:g+=a.get_defaultTextFormat().leftMargin/2;g-=a.get_defaultTextFormat().rightMargin/2;g+=a.get_defaultTextFormat().indent/2;g+=a.get_defaultTextFormat().blockIndent/2;break;case 2:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;break;case 3:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;
g+=a.get_defaultTextFormat().blockIndent;break;case 4:g-=a.get_defaultTextFormat().rightMargin}d&&(e.y=b.bounds.y,e.x=g)}f.__bounds.copyFrom(e)}h=c.__pixelRatio;f.__update(c.__worldTransform,h);if(a.__dirty||f.__softwareDirty){var m=Math.round(f.__width*h),l=Math.round(f.__height*h);if(!(null!=b.text&&""!=b.text||b.background||b.border||b.__hasFocus||1==b.type&&b.selectable)||(0>=b.width||0>=b.height)&&2!=b.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,
a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));Z.context=f.__context;f.__canvas.width=m;f.__canvas.height=l;c.__isDOM&&(f.__canvas.style.width=Math.round(m/h)+"px",f.__canvas.style.height=Math.round(l/h)+"px");m=wa.__pool.get();m.scale(h,h);m.concat(f.__renderTransform);Z.context.setTransform(m.a,m.b,m.c,m.d,m.tx,
m.ty);wa.__pool.release(m);null==Z.clearRect&&(Z.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);Z.clearRect&&Z.context.clearRect(0,0,f.__canvas.width,f.__canvas.height);if(null!=b.text&&""!=b.text||b.__hasFocus){d=b.text;f.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==b.antiAliasType&&400==b.sharpness?!1:!0;if(b.border||b.background){Z.context.rect(.5,.5,e.width-1,e.height-1);if(b.background){var n=R.hex(b.backgroundColor&16777215,6);Z.context.fillStyle=
"#"+n;Z.context.fill()}b.border&&(Z.context.lineWidth=1,n=R.hex(b.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke())}Z.context.textBaseline="alphabetic";Z.context.textAlign="start";c=-a.get_scrollH();var p=g=0;for(n=a.get_scrollV()-1;p<n;){var k=p++;g-=b.lineHeights.get(k)}var q;for(m=b.layoutGroups.iterator();m.hasNext();)if(l=m.next(),!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>b.get_bottomScrollV()-1)break;var t="#"+R.hex(l.format.color&16777215,6);Z.context.font=Qb.getFont(l.format);
Z.context.fillStyle=t;Z.context.fillText(d.substring(l.startIndex,l.endIndex),l.offsetX+c-e.x,l.offsetY+l.ascent+g-e.y);if(-1<a.__caretIndex&&b.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex){p=q=0;for(n=a.__caretIndex-l.startIndex;p<n;){k=p++;if(l.positions.length<=k)break;q+=l.positions[k]}p=0;n=a.get_scrollV();for(k=l.lineIndex+1;n<k;){var v=n++;p+=b.lineHeights.get(v-1)}Z.context.beginPath();n=R.hex(l.format.color&
16777215,6);Z.context.strokeStyle="#"+n;Z.context.moveTo(l.offsetX+q-a.get_scrollH()-e.x,p+2-e.y);Z.context.lineWidth=1;Z.context.lineTo(l.offsetX+q-a.get_scrollH()-e.x,p+Qb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);Z.context.stroke();Z.context.closePath()}}else if(l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex||l.startIndex<=a.__selectionIndex&&l.endIndex>=a.__selectionIndex||l.startIndex>a.__caretIndex&&l.endIndex<a.__selectionIndex||l.startIndex>a.__selectionIndex&&l.endIndex<
a.__caretIndex)q=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,a.__caretIndex)|0,l.startIndex>q&&(q=l.startIndex),l.endIndex<p&&(p=l.endIndex),k=a.getCharBoundaries(q),p>=l.endIndex?(n=a.getCharBoundaries(l.endIndex-1),null!=n&&(n.x+=n.width+2)):n=a.getCharBoundaries(p),null!=k&&null!=n&&(Z.context.fillStyle="#000000",Z.context.fillRect(k.x+c-e.x,k.y+g,n.x-k.x,l.height),Z.context.fillStyle="#FFFFFF",Z.context.fillText(d.substring(q,p),c+k.x-e.x,l.offsetY+l.ascent+g));
l.format.underline&&(Z.context.beginPath(),Z.context.strokeStyle=t,Z.context.lineWidth=1,t=l.offsetX+c-e.x,q=Math.ceil(l.offsetY+g+l.ascent-e.y)+Math.floor(.185*l.ascent)+.5,Z.context.moveTo(t,q),Z.context.lineTo(t+l.width,q),Z.context.stroke(),Z.context.closePath())}}else{if(b.border||b.background)b.border?Z.context.rect(.5,.5,e.width-1,e.height-1):Z.context.rect(0,0,e.width,e.height),b.background&&(n=R.hex(b.backgroundColor&16777215,6),Z.context.fillStyle="#"+n,Z.context.fill()),b.border&&(Z.context.lineWidth=
1,Z.context.lineCap="square",n=R.hex(b.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke());if(-1<a.__caretIndex&&b.selectable&&a.__showCursor){c=-a.get_scrollH()+(d?0:g);p=g=0;for(n=a.get_scrollV()-1;p<n;)k=p++,g+=b.lineHeights.get(k);Z.context.beginPath();n=R.hex(a.get_defaultTextFormat().color&16777215,6);Z.context.strokeStyle="#"+n;Z.context.moveTo(c+2.5,g+2.5);Z.context.lineWidth=1;Z.context.lineTo(c+2.5,g+Qb.getFormatHeight(a.get_defaultTextFormat())-1);Z.context.stroke();
Z.context.closePath()}}f.__bitmap=La.fromCanvas(a.__graphics.__canvas);f.__bitmapScale=h;f.__visible=!0;a.__dirty=!1;f.__softwareDirty=!1;f.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};Yg.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(Yg.render(a,b),!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);
b.__pushMaskObject(a);var c=b.__context3D,d=fa.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(d)}null!=a.__graphics&&Zf.render(a,b)}}else tf.render(a.__cacheBitmap,b);b.__renderEvent(a)};Yg.renderDrawableMask=function(a,b){Yg.renderMask(a,b);Xg.renderDrawableMask(a,b)};Yg.renderMask=function(a,b){var c=b.__softwareRenderer;
b=a.__textEngine;var d=!(b.background||b.border),e=d?b.textBounds:b.bounds,f=a.__graphics,g=0;if(a.__dirty){a.__updateLayout();null==f.__bounds&&(f.__bounds=new fa);if(0==a.get_text().length){g=b.bounds.width-4;var h=a.get_defaultTextFormat().align;g=3==h?0:4==h?g:g/2;switch(h){case 0:g+=a.get_defaultTextFormat().leftMargin/2;g-=a.get_defaultTextFormat().rightMargin/2;g+=a.get_defaultTextFormat().indent/2;g+=a.get_defaultTextFormat().blockIndent/2;break;case 2:g+=a.get_defaultTextFormat().leftMargin;
g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;break;case 3:g+=a.get_defaultTextFormat().leftMargin;g+=a.get_defaultTextFormat().indent;g+=a.get_defaultTextFormat().blockIndent;break;case 4:g-=a.get_defaultTextFormat().rightMargin}d&&(e.y=b.bounds.y,e.x=g)}f.__bounds.copyFrom(e)}h=c.__pixelRatio;f.__update(c.__worldTransform,h);if(a.__dirty||f.__softwareDirty){var m=Math.round(f.__width*h),l=Math.round(f.__height*h);if(!(null!=b.text&&""!=b.text||b.background||b.border||
b.__hasFocus||1==b.type&&b.selectable)||(0>=b.width||0>=b.height)&&2!=b.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));Z.context=f.__context;f.__canvas.width=m;f.__canvas.height=l;c.__isDOM&&(f.__canvas.style.width=Math.round(m/
h)+"px",f.__canvas.style.height=Math.round(l/h)+"px");m=wa.__pool.get();m.scale(h,h);m.concat(f.__renderTransform);Z.context.setTransform(m.a,m.b,m.c,m.d,m.tx,m.ty);wa.__pool.release(m);null==Z.clearRect&&(Z.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);Z.clearRect&&Z.context.clearRect(0,0,f.__canvas.width,f.__canvas.height);if(null!=b.text&&""!=b.text||b.__hasFocus){d=b.text;f.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==b.antiAliasType&&400==b.sharpness?
!1:!0;if(b.border||b.background){Z.context.rect(.5,.5,e.width-1,e.height-1);if(b.background){var n=R.hex(b.backgroundColor&16777215,6);Z.context.fillStyle="#"+n;Z.context.fill()}b.border&&(Z.context.lineWidth=1,n=R.hex(b.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke())}Z.context.textBaseline="alphabetic";Z.context.textAlign="start";c=-a.get_scrollH();var p=g=0;for(n=a.get_scrollV()-1;p<n;){var k=p++;g-=b.lineHeights.get(k)}var q;for(m=b.layoutGroups.iterator();m.hasNext();)if(l=
m.next(),!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>b.get_bottomScrollV()-1)break;var t="#"+R.hex(l.format.color&16777215,6);Z.context.font=Qb.getFont(l.format);Z.context.fillStyle=t;Z.context.fillText(d.substring(l.startIndex,l.endIndex),l.offsetX+c-e.x,l.offsetY+l.ascent+g-e.y);if(-1<a.__caretIndex&&b.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex){p=q=0;for(n=a.__caretIndex-l.startIndex;p<n;){k=p++;if(l.positions.length<=
k)break;q+=l.positions[k]}p=0;n=a.get_scrollV();for(k=l.lineIndex+1;n<k;){var v=n++;p+=b.lineHeights.get(v-1)}Z.context.beginPath();n=R.hex(l.format.color&16777215,6);Z.context.strokeStyle="#"+n;Z.context.moveTo(l.offsetX+q-a.get_scrollH()-e.x,p+2-e.y);Z.context.lineWidth=1;Z.context.lineTo(l.offsetX+q-a.get_scrollH()-e.x,p+Qb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);Z.context.stroke();Z.context.closePath()}}else if(l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex||l.startIndex<=
a.__selectionIndex&&l.endIndex>=a.__selectionIndex||l.startIndex>a.__caretIndex&&l.endIndex<a.__selectionIndex||l.startIndex>a.__selectionIndex&&l.endIndex<a.__caretIndex)q=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,a.__caretIndex)|0,l.startIndex>q&&(q=l.startIndex),l.endIndex<p&&(p=l.endIndex),k=a.getCharBoundaries(q),p>=l.endIndex?(n=a.getCharBoundaries(l.endIndex-1),null!=n&&(n.x+=n.width+2)):n=a.getCharBoundaries(p),null!=k&&null!=n&&(Z.context.fillStyle="#000000",
Z.context.fillRect(k.x+c-e.x,k.y+g,n.x-k.x,l.height),Z.context.fillStyle="#FFFFFF",Z.context.fillText(d.substring(q,p),c+k.x-e.x,l.offsetY+l.ascent+g));l.format.underline&&(Z.context.beginPath(),Z.context.strokeStyle=t,Z.context.lineWidth=1,t=l.offsetX+c-e.x,q=Math.ceil(l.offsetY+g+l.ascent-e.y)+Math.floor(.185*l.ascent)+.5,Z.context.moveTo(t,q),Z.context.lineTo(t+l.width,q),Z.context.stroke(),Z.context.closePath())}}else{if(b.border||b.background)b.border?Z.context.rect(.5,.5,e.width-1,e.height-
1):Z.context.rect(0,0,e.width,e.height),b.background&&(n=R.hex(b.backgroundColor&16777215,6),Z.context.fillStyle="#"+n,Z.context.fill()),b.border&&(Z.context.lineWidth=1,Z.context.lineCap="square",n=R.hex(b.borderColor&16777215,6),Z.context.strokeStyle="#"+n,Z.context.stroke());if(-1<a.__caretIndex&&b.selectable&&a.__showCursor){c=-a.get_scrollH()+(d?0:g);p=g=0;for(n=a.get_scrollV()-1;p<n;)k=p++,g+=b.lineHeights.get(k);Z.context.beginPath();n=R.hex(a.get_defaultTextFormat().color&16777215,6);Z.context.strokeStyle=
"#"+n;Z.context.moveTo(c+2.5,g+2.5);Z.context.lineWidth=1;Z.context.lineTo(c+2.5,g+Qb.getFormatHeight(a.get_defaultTextFormat())-1);Z.context.stroke();Z.context.closePath()}}f.__bitmap=La.fromCanvas(a.__graphics.__canvas);f.__bitmapScale=h;f.__visible=!0;a.__dirty=!1;f.__softwareDirty=!1;f.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};var ea=function(){};k["openfl.display._internal.Context3DTilemap"]=ea;ea.__name__="openfl.display._internal.Context3DTilemap";ea.buildBuffer=function(a,b){if(!a.__renderable||
0==a.__group.__tiles.length||0>=a.__worldAlpha)a.__group.__dirty=!1;else{ea.numTiles=0;ea.vertexBufferData=null!=a.__buffer?a.__buffer.vertexBufferData:null;ea.vertexDataPosition=0;var c=fa.__pool.get(),d=wa.__pool.get(),e=wa.__pool.get();ea.dataPerVertex=4;a.tileAlphaEnabled&&ea.dataPerVertex++;a.tileColorTransformEnabled&&(ea.dataPerVertex+=8);ea.buildBufferTileContainer(a,a.__group,b,e,a.__tileset,a.tileAlphaEnabled,a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();
fa.__pool.release(c);wa.__pool.release(d);wa.__pool.release(e)}};ea.buildBufferTileContainer=function(a,b,c,d,e,f,g,h,m,l,n,p,k){null==k&&(k=!0);var q=wa.__pool.get(),t=c.__roundPixels,v=b.__tiles,r=null;r=function(a){a=a.__tiles;for(var b=0,c=0;c<a.length;){var d=a[c];++c;0<d.__length?b+=r(d):++b}return b};k&&ea.resizeBuffer(a,ea.numTiles+r(b));k=null;for(var u,x,C,P,F,L,z,y,ka,B,w=f?5:4,G=0;G<v.length;){var I=v[G];++G;q.setTo(1,0,0,1,-I.get_originX(),-I.get_originY());q.concat(I.get_matrix());q.concat(d);
t&&(q.tx=Math.round(q.tx),q.ty=Math.round(q.ty));var H=null!=I.get_tileset()?I.get_tileset():e;var A=I.get_alpha()*g;var D=I.get_visible();I.__dirty=!1;if(D&&!(0>=A))if(h&&(null!=I.get_colorTransform()?null==m?k=I.get_colorTransform():(null==ea.cacheColorTransform&&(ea.cacheColorTransform=new Kc),k=ea.cacheColorTransform,k.redMultiplier=m.redMultiplier*I.get_colorTransform().redMultiplier,k.greenMultiplier=m.greenMultiplier*I.get_colorTransform().greenMultiplier,k.blueMultiplier=m.blueMultiplier*
I.get_colorTransform().blueMultiplier,k.alphaMultiplier=m.alphaMultiplier*I.get_colorTransform().alphaMultiplier,k.redOffset=m.redOffset+I.get_colorTransform().redOffset,k.greenOffset=m.greenOffset+I.get_colorTransform().greenOffset,k.blueOffset=m.blueOffset+I.get_colorTransform().blueOffset,k.alphaOffset=m.alphaOffset+I.get_colorTransform().alphaOffset):k=m),f||(A=1),0<I.__length)ea.buildBufferTileContainer(a,I,c,q,H,f,A,h,k,l,n,p,!1);else if(null!=H&&(D=I.get_id(),u=H.__bitmapData,null!=u)){if(-1==
D){x=I.__rect;if(null==x||0>=x.width||0>=x.height)continue;I=x.x/u.width;H=x.y/u.height;D=x.get_right()/u.width;P=x.get_bottom()/u.height}else{u=H.__data[D];if(null==u)continue;n.setTo(u.x,u.y,u.width,u.height);x=n;I=u.__uvX;H=u.__uvY;D=u.__uvWidth;P=u.__uvHeight}u=x.width;C=x.height;x=0*q.a+0*q.c+q.tx;F=0*q.b+0*q.d+q.ty;L=u*q.a+0*q.c+q.tx;z=u*q.b+0*q.d+q.ty;y=0*q.a+C*q.c+q.tx;ka=0*q.b+C*q.d+q.ty;B=u*q.a+C*q.c+q.tx;C=u*q.b+C*q.d+q.ty;u=ea.vertexDataPosition;ea.vertexBufferData[u]=x;ea.vertexBufferData[u+
1]=F;ea.vertexBufferData[u+2]=I;ea.vertexBufferData[u+3]=H;ea.vertexBufferData[u+ea.dataPerVertex]=L;ea.vertexBufferData[u+ea.dataPerVertex+1]=z;ea.vertexBufferData[u+ea.dataPerVertex+2]=D;ea.vertexBufferData[u+ea.dataPerVertex+3]=H;ea.vertexBufferData[u+2*ea.dataPerVertex]=y;ea.vertexBufferData[u+2*ea.dataPerVertex+1]=ka;ea.vertexBufferData[u+2*ea.dataPerVertex+2]=I;ea.vertexBufferData[u+2*ea.dataPerVertex+3]=P;ea.vertexBufferData[u+3*ea.dataPerVertex]=B;ea.vertexBufferData[u+3*ea.dataPerVertex+
1]=C;ea.vertexBufferData[u+3*ea.dataPerVertex+2]=D;ea.vertexBufferData[u+3*ea.dataPerVertex+3]=P;f&&(ea.vertexBufferData[u+0*ea.dataPerVertex+4]=A,ea.vertexBufferData[u+ea.dataPerVertex+4]=A,ea.vertexBufferData[u+2*ea.dataPerVertex+4]=A,ea.vertexBufferData[u+3*ea.dataPerVertex+4]=A);if(h)if(null!=k)for(A=0;4>A;)I=A++,ea.vertexBufferData[u+ea.dataPerVertex*I+w]=k.redMultiplier,ea.vertexBufferData[u+ea.dataPerVertex*I+w+1]=k.greenMultiplier,ea.vertexBufferData[u+ea.dataPerVertex*I+w+2]=k.blueMultiplier,
ea.vertexBufferData[u+ea.dataPerVertex*I+w+3]=k.alphaMultiplier,ea.vertexBufferData[u+ea.dataPerVertex*I+w+4]=k.redOffset,ea.vertexBufferData[u+ea.dataPerVertex*I+w+5]=k.greenOffset,ea.vertexBufferData[u+ea.dataPerVertex*I+w+6]=k.blueOffset,ea.vertexBufferData[u+ea.dataPerVertex*I+w+7]=k.alphaOffset;else for(A=0;4>A;)I=A++,ea.vertexBufferData[u+ea.dataPerVertex*I+w]=1,ea.vertexBufferData[u+ea.dataPerVertex*I+w+1]=1,ea.vertexBufferData[u+ea.dataPerVertex*I+w+2]=1,ea.vertexBufferData[u+ea.dataPerVertex*
I+w+3]=1,ea.vertexBufferData[u+ea.dataPerVertex*I+w+4]=0,ea.vertexBufferData[u+ea.dataPerVertex*I+w+5]=0,ea.vertexBufferData[u+ea.dataPerVertex*I+w+6]=0,ea.vertexBufferData[u+ea.dataPerVertex*I+w+7]=0;ea.vertexDataPosition+=4*ea.dataPerVertex}}b.__dirty=!1;wa.__pool.release(q)};ea.flush=function(a,b,c){null==ea.currentShader&&(ea.currentShader=b.__defaultDisplayShader);if(ea.bufferPosition>ea.lastFlushedPosition&&null!=ea.currentBitmapData&&null!=ea.currentShader){var d=b.__initDisplayShader(ea.currentShader);
b.setShader(d);b.applyBitmapData(ea.currentBitmapData,a.smoothing);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));a.tileAlphaEnabled?b.useAlphaArray():b.applyAlpha(a.__worldAlpha);a.tileBlendModeEnabled&&b.__setBlendMode(c);a.tileColorTransformEnabled?(b.applyHasColorTransform(!0),b.useColorTransformArray()):b.applyColorTransform(a.__worldColorTransform);b.updateShader();c=a.__buffer.vertexBuffer;for(var e=ea.lastFlushedPosition*ea.dataPerVertex*4,f;ea.lastFlushedPosition<ea.bufferPosition;){f=
Math.min(ea.bufferPosition-ea.lastFlushedPosition,ea.context.__quadIndexBufferElements)|0;if(0>=f)break;null!=d.__position&&ea.context.setVertexBufferAt(d.__position.index,c,e,2);null!=d.__textureCoord&&ea.context.setVertexBufferAt(d.__textureCoord.index,c,e+2,2);a.tileAlphaEnabled&&null!=d.__alpha&&ea.context.setVertexBufferAt(d.__alpha.index,c,e+4,1);if(a.tileColorTransformEnabled){var g=a.tileAlphaEnabled?5:4;null!=d.__colorMultiplier&&ea.context.setVertexBufferAt(d.__colorMultiplier.index,c,e+
g,4);null!=d.__colorOffset&&ea.context.setVertexBufferAt(d.__colorOffset.index,c,e+g+4,4)}ea.context.drawTriangles(ea.context.__quadIndexBuffer,0,2*f);ea.lastFlushedPosition+=f}b.__clearShader()}ea.lastUsedBitmapData=ea.currentBitmapData;ea.lastUsedShader=ea.currentShader};ea.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&(ea.context=b.__context3D,ea.buildBuffer(a,b),0!=ea.numTiles)){ea.bufferPosition=0;ea.lastFlushedPosition=0;ea.lastUsedBitmapData=null;ea.lastUsedShader=null;ea.currentBitmapData=
null;ea.currentShader=null;ea.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(ea.currentBlendMode);b.__pushMaskObject(a);var c=fa.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);ea.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,ea.currentBlendMode,null);ea.flush(a,b,ea.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);fa.__pool.release(c)}};ea.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=fa.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();
b.__popMaskObject(a);fa.__pool.release(d)}null!=a.__graphics&&Zf.render(a,b)}ea.render(a,b)}else tf.render(a.__cacheBitmap,b);b.__renderEvent(a)};ea.renderDrawableMask=function(a,b){if(null!=a.opaqueBackground||null!=a.__graphics)null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height(),null!=a.__graphics&&Zf.renderMask(a,b);ea.renderMask(a,b)};ea.renderTileContainer=function(a,b,c,d,e,f,g,h,m){c=c.__tiles;for(var l,n,p,k,q=null,t,v=0;v<c.length;)if(l=c[v],++v,n=null!=l.get_tileset()?
l.get_tileset():e,p=l.get_alpha()*f,(k=l.get_visible())&&!(0>=p))if(k=null!=l.get_shader()?l.get_shader():d,g&&(q=null!=l.__blendMode?l.__blendMode:h),0<l.__length)ea.renderTileContainer(a,b,l,k,n,p,g,q,m);else if(null!=n&&(t=l.get_id(),p=n.__bitmapData,null!=p)){if(-1==t){if(l=l.__rect,null==l||0>=l.width||0>=l.height)continue}else if(l=n.__data[t],null==l)continue;(k!=ea.currentShader||p!=ea.currentBitmapData&&null!=ea.currentBitmapData||ea.currentBlendMode!=q)&&ea.flush(a,b,ea.currentBlendMode);
ea.currentBitmapData=p;ea.currentShader=k;ea.currentBlendMode=q;ea.bufferPosition++}};ea.renderMask=function(a,b){};ea.resizeBuffer=function(a,b){ea.numTiles=b;null==a.__buffer||a.__buffer.context3D!=ea.context?a.__buffer=new xh(ea.context,$m.QUADS,ea.numTiles,ea.dataPerVertex):a.__buffer.resize(ea.numTiles,ea.dataPerVertex);ea.vertexBufferData=a.__buffer.vertexBufferData};var uf=function(){};k["openfl.display._internal.Context3DVideo"]=uf;uf.__name__="openfl.display._internal.Context3DVideo";uf.render=
function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&null!=a.__stream&&null!=a.__stream.__video){var c=b.__context3D,d=c.gl;if(null!=a.__getTexture(c)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var e=b.__initDisplayShader(a.__worldShader);b.setShader(e);b.applyBitmapData(null,!0,!1);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);null!=e.__textureSize&&(uf.__textureSizeValue[0]=null!=a.__stream?a.__stream.__video.videoWidth:
0,uf.__textureSizeValue[1]=null!=a.__stream?a.__stream.__video.videoHeight:0,e.__textureSize.value=uf.__textureSizeValue);b.updateShader();c.setTextureAt(0,a.__getTexture(c));c.__flushGLTextures();d.uniform1i(e.__texture.index,0);a.smoothing?(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR)):(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST));d=a.__getVertexBuffer(c);
null!=e.__position&&c.setVertexBufferAt(e.__position.index,d,0,3);null!=e.__textureCoord&&c.setVertexBufferAt(e.__textureCoord.index,d,3,2);e=a.__getIndexBuffer(c);c.drawTriangles(e);b.__clearShader();b.__popMaskObject(a)}}};uf.renderDrawable=function(a,b){uf.render(a,b);b.__renderEvent(a)};uf.renderDrawableMask=function(a,b){uf.renderMask(a,b)};uf.renderMask=function(a,b){if(null!=a.__stream&&null!=a.__stream.__video){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Uh.opaqueBitmapData,
!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.updateShader();var e=a.__getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.__getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var yc=function(){};k["openfl.display._internal.DOMBitmap"]=yc;yc.__name__="openfl.display._internal.DOMBitmap";yc.clear=function(a,b){He.clear(a,b);null!=a.__image&&(b.element.removeChild(a.__image),
a.__image=null,a.__style=null);null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};yc.render=function(a,b){if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable){b.__pushMaskObject(a);if(null!=a.__bitmapData.image.buffer.__srcImage){var c=a.__bitmapData.image.buffer.__srcImage.src;R.startsWith(c,"data:")||R.startsWith(c,"blob:")?yc.renderCanvas(a,b):yc.renderImage(a,b)}else yc.renderCanvas(a,b);
b.__popMaskObject(a)}else yc.clear(a,b)};yc.renderCanvas=function(a,b){null!=a.__image&&(b.element.removeChild(a.__image),a.__image=null);null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),a.__imageVersion=-1,b.__allowSmoothing&&a.smoothing||(a.__context.imageSmoothingEnabled=!1),b.__initializeElement(a,a.__canvas));a.__imageVersion!=a.__bitmapData.image.version&&(ya.convertToCanvas(a.__bitmapData.image),a.__canvas.width=a.__bitmapData.width+
1,a.__canvas.width=a.__bitmapData.width,a.__canvas.height=a.__bitmapData.height,a.__context.drawImage(a.__bitmapData.image.buffer.__srcCanvas,0,0),a.__imageVersion=a.__bitmapData.image.version);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};yc.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&
null!=c){z.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):wf.clear(a,b);if(null!=a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,
!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else wf.clear(a,b);null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(b.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?(d=a.__bitmapData.image.buffer.__srcImage.src,R.startsWith(d,"data:")||R.startsWith(d,"blob:")?yc.renderCanvas(a,b):yc.renderImage(a,b)):yc.renderCanvas(a,b),b.__popMaskObject(a)):yc.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=
a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,R.startsWith(d,"data:")||R.startsWith(d,"blob:")?yc.renderCanvas(c,b):yc.renderImage(c,b)):yc.renderCanvas(c,b),b.__popMaskObject(c)):yc.clear(c,b);b.__renderEvent(a)};yc.renderDrawableClear=function(a,b){yc.clear(a,b)};yc.renderImage=function(a,
b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null);null==a.__image&&(a.__image=window.document.createElement("img"),a.__image.crossOrigin="Anonymous",a.__image.src=a.__bitmapData.image.buffer.__srcImage.src,b.__initializeElement(a,a.__image));b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};var He=function(){};k["openfl.display._internal.DOMDisplayObject"]=He;He.__name__="openfl.display._internal.DOMDisplayObject";He.clear=function(a,b){null!=a.__cacheBitmap&&yc.clear(a.__cacheBitmap,
b);wf.clear(a,b)};He.render=function(a,b){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){z.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):wf.clear(a,b);if(null!=
a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else wf.clear(a,b)};He.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var c=a.__graphics;if(null!=
a.stage&&a.__worldVisible&&a.__renderable&&null!=c){z.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):wf.clear(a,b);if(null!=a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=
!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else wf.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,R.startsWith(d,"data:")||R.startsWith(d,"blob:")?yc.renderCanvas(c,b):yc.renderImage(c,
b)):yc.renderCanvas(c,b),b.__popMaskObject(c)):yc.clear(c,b);b.__renderEvent(a)};He.renderDrawableClear=function(a,b){He.clear(a,b)};var Fm=function(){};k["openfl.display._internal.DOMDisplayObjectContainer"]=Fm;Fm.__name__="openfl.display._internal.DOMDisplayObjectContainer";Fm.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&b.__renderDrawable(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=c.next(),null==d.stage&&d.__cleanup();
a.__removedChildren.set_length(0);He.renderDrawable(a,b);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){b.__pushMaskObject(a);if(null!=b.__stage){c=0;for(d=a.__children;c<d.length;)e=d[c],++c,b.__renderDrawable(e),e.__renderDirty=!1;a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)e=d[c],++c,b.__renderDrawable(e);b.__popMaskObject(a)}else{c=0;for(d=a.__children;c<d.length;){var e=d[c];++c;b.__renderDrawableClear(e)}wf.clear(a,b);a.__cacheBitmap.stage=a.stage}};Fm.renderDrawableClear=
function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&b.__renderDrawableClear(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=c.next(),null==d.stage&&d.__cleanup();a.__removedChildren.set_length(0);c=0;for(d=a.__children;c<d.length;){var e=d[c];++c;b.__renderDrawableClear(e)}He.clear(a,b)};var wf=function(){};k["openfl.display._internal.DOMShape"]=wf;wf.__name__="openfl.display._internal.DOMShape";wf.clear=function(a,b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),
a.__canvas=null,a.__style=null)};wf.render=function(a,b){var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){z.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):wf.clear(a,b);if(null!=a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=
c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else wf.clear(a,b)};var Gm=function(){};k["openfl.display._internal.DOMSimpleButton"]=Gm;Gm.__name__="openfl.display._internal.DOMSimpleButton";Gm.renderDrawable=function(a,b){b.__pushMaskObject(a);for(var c=a.__previousStates.iterator();c.hasNext();){var d=c.next();b.__renderDrawable(d)}a.__previousStates.set_length(0);
null!=a.__currentState&&(a.__currentState.stage!=a.stage&&a.__currentState.__setStageReference(a.stage),b.__renderDrawable(a.__currentState));b.__popMaskObject(a);b.__renderEvent(a)};Gm.renderDrawableClear=function(a,b){He.renderDrawableClear(a,b)};var Ie=function(){};k["openfl.display._internal.DOMTextField"]=Ie;Ie.__name__="openfl.display._internal.DOMTextField";Ie.clear=function(a,b){He.clear(a,b);null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};Ie.measureText=function(a){var b=
a.__textEngine,c=a.__div;null==c&&(c=window.document.createElement("div"),c.innerHTML=b.text.replace(/\n/g,"<br>"),c.style.setProperty("font",Qb.getFont(a.__textFormat),null),c.style.setProperty("pointer-events","none",null),c.style.position="absolute",c.style.top="110%",window.document.body.appendChild(c));b.__measuredWidth=c.clientWidth;null==a.__div&&(c.style.width=A.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;null==a.__div&&window.document.body.removeChild(c)};Ie.render=function(a,
b){var c=a.__textEngine;if(null!=a.stage&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||null==a.__div)if(""!=c.text||c.background||c.border||1==c.type){a.__updateLayout();null==a.__div&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",function(b){b.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new cf("textInput",
!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select","text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor",
"inherit",null);a.__div.contentEditable=1==c.type;var d=a.__style;c.background?d.setProperty("background-color","#"+R.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var e=c.width,f=c.height,g="";a.__isHTML&&a.__updateText(mb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));for(var h=-a.get_scrollH(),m=c.layoutGroups.iterator();m.hasNext();){var l=m.next();if(!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>c.get_bottomScrollV()-
1)break;g+='<div style="';null!=l.format.font&&(g+="font: "+Qb.getFont(l.format)+"; ");null!=l.format.color&&(g+="color: #"+R.hex(l.format.color&16777215,6)+"; ");1==l.format.underline&&(g+="text-decoration: underline; ");if(null!=l.format.align)switch(l.format.align){case 0:g+="text-align: center; ";break;case 2:g+="text-align: justify; ";break;case 4:g+="text-align: right; ";break;default:g+="text-align: left; "}null!=l.format.leftMargin&&(g+="padding-left: "+1*l.format.leftMargin+"px; ");null!=
l.format.rightMargin&&(g+="padding-right: "+1*l.format.rightMargin+"px; ");null!=l.format.indent&&(g+="text-indent: "+1*l.format.indent+"px; ");g+="left: "+(l.offsetX+h)+"px; top: "+(l.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(null!=l.format.url&&""!=l.format.url){var n="text-decoration: underline; ";null!=l.format.color&&(n+="color: #"+R.hex(l.format.color&16777215,6)+"; ");g+="<a style='"+n+"' href='"+l.format.url+"' target='"+l.format.target+"'>"}g=a.__isHTML?g+R.replace(c.text.substring(l.startIndex,
l.endIndex)," ","&nbsp;"):g+R.replace(R.htmlEscape(c.text.substring(l.startIndex,l.endIndex))," ","&nbsp;");null!=l.format.url&&""!=l.format.url&&(g+="</a>");g+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+R.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=!0,a.__transformDirty=!0):""!=d.border&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",e+"px",null);d.setProperty("height",f+"px",null);a.__div.innerHTML=
g;a.__dirty=!1}else null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null);null!=a.__div&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else Ie.clear(a,b)};Ie.renderDrawable=function(a,b){a.__domRender=!0;b.__updateCacheBitmap(a,a.__forceCachedBitmapUpdate);a.__forceCachedBitmapUpdate=!1;a.__domRender=!1;if(null==a.__cacheBitmap||a.__isCacheBitmapRender){a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!1,a.__isHTML&&null!=
a.__htmlText&&(a.__updateText(a.__htmlText),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())));var c=a.__textEngine;if(null!=a.stage&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||null==a.__div)if(""!=c.text||c.background||c.border||1==c.type){a.__updateLayout();null==a.__div&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",
function(b){b.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new cf("textInput",!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select",
"text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=1==c.type;var d=a.__style;c.background?d.setProperty("background-color","#"+R.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var e=c.width,f=c.height,g="";a.__isHTML&&a.__updateText(mb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));
for(var h=-a.get_scrollH(),m=c.layoutGroups.iterator();m.hasNext();){var l=m.next();if(!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>c.get_bottomScrollV()-1)break;g+='<div style="';null!=l.format.font&&(g+="font: "+Qb.getFont(l.format)+"; ");null!=l.format.color&&(g+="color: #"+R.hex(l.format.color&16777215,6)+"; ");1==l.format.underline&&(g+="text-decoration: underline; ");if(null!=l.format.align)switch(l.format.align){case 0:g+="text-align: center; ";break;case 2:g+="text-align: justify; ";break;
case 4:g+="text-align: right; ";break;default:g+="text-align: left; "}null!=l.format.leftMargin&&(g+="padding-left: "+1*l.format.leftMargin+"px; ");null!=l.format.rightMargin&&(g+="padding-right: "+1*l.format.rightMargin+"px; ");null!=l.format.indent&&(g+="text-indent: "+1*l.format.indent+"px; ");g+="left: "+(l.offsetX+h)+"px; top: "+(l.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(null!=l.format.url&&""!=l.format.url){var n="text-decoration: underline; ";null!=l.format.color&&
(n+="color: #"+R.hex(l.format.color&16777215,6)+"; ");g+="<a style='"+n+"' href='"+l.format.url+"' target='"+l.format.target+"'>"}g=a.__isHTML?g+R.replace(c.text.substring(l.startIndex,l.endIndex)," ","&nbsp;"):g+R.replace(R.htmlEscape(c.text.substring(l.startIndex,l.endIndex))," ","&nbsp;");null!=l.format.url&&""!=l.format.url&&(g+="</a>");g+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+R.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=
!0,a.__transformDirty=!0):""!=d.border&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",e+"px",null);d.setProperty("height",f+"px",null);a.__div.innerHTML=g;a.__dirty=!1}else null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null);null!=a.__div&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else Ie.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&
c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,R.startsWith(d,"data:")||R.startsWith(d,"blob:")?yc.renderCanvas(c,b):yc.renderImage(c,b)):yc.renderCanvas(c,b),b.__popMaskObject(c)):yc.clear(c,b);b.__renderEvent(a)};Ie.renderDrawableClear=function(a,b){Ie.clear(a,b)};Ie.__getAttributeMatch=function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};
var Ag=function(){};k["openfl.display._internal.DOMTilemap"]=Ag;Ag.__name__="openfl.display._internal.DOMTilemap";Ag.clear=function(a,b){He.clear(a,b);null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Ag.render=function(a,b){if(null!=a.stage&&a.__worldVisible&&a.__renderable&&0<a.__group.__tiles.length){null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=
a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=wa.__identity;var d=b.__canvasRenderer;if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable){var e=d.__getAlpha(a.__worldAlpha);if(!(0>=e)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var f=d.context;d.setTransform(a.__renderTransform,f);var g=a.opaqueBackground;
f.fillStyle="rgb("+(g>>>16&255)+","+(g>>>8&255)+","+(g&255)+")";f.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(e=d.__getAlpha(a.__worldAlpha),!(0>=e))){var h=a.__graphics;if(null!=h){z.render(h,d);var m=h.__width,l=h.__height;g=h.__canvas;if(null!=g&&h.__visible&&1<=m&&1<=l){var n=h.__worldTransform;f=d.context;var p=a.__scrollRect,k=a.__worldScale9Grid;if(null==p||0<p.width&&0<p.height){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);
f.globalAlpha=e;if(null!=k&&0==n.b&&0==n.c){var q=d.__pixelRatio;e=wa.__pool.get();e.translate(n.tx,n.ty);d.setTransform(e,f);wa.__pool.release(e);e=h.__bounds;var t=h.__renderTransform.a/h.__bitmapScale,v=h.__renderTransform.d/h.__bitmapScale,r=t*n.a,u=v*n.d;n=Math.max(1,Math.round(k.x*t));h=Math.round(k.y*v);p=Math.max(1,Math.round((e.get_right()-k.get_right())*t));var x=Math.round((e.get_bottom()-k.get_bottom())*v);t=Math.round(k.width*t);k=Math.round(k.height*v);v=Math.round(n/q);var C=Math.round(h/
q),P=Math.round(p/q);q=Math.round(x/q);r=e.width*r-v-P;e=e.height*u-C-q;d.applySmoothing(f,!1);0!=t&&0!=k?(f.drawImage(g,0,0,n,h,0,0,v,C),f.drawImage(g,n,0,t,h,v,0,r,C),f.drawImage(g,n+t,0,p,h,v+r,0,P,C),f.drawImage(g,0,h,n,k,0,C,v,e),f.drawImage(g,n,h,t,k,v,C,r,e),f.drawImage(g,n+t,h,p,k,v+r,C,P,e),f.drawImage(g,0,h+k,n,x,0,C+e,v,q),f.drawImage(g,n,h+k,t,x,v,C+e,r,q),f.drawImage(g,n+t,h+k,p,x,v+r,C+e,P,q)):0==t&&0!=k?(l=v+r+P,f.drawImage(g,0,0,m,h,0,0,l,C),f.drawImage(g,0,h,m,k,0,C,l,e),f.drawImage(g,
0,h+k,m,x,0,C+e,l,q)):0==k&&0!=t&&(m=C+e+q,f.drawImage(g,0,0,n,l,0,0,v,m),f.drawImage(g,n,0,t,l,v,0,r,m),f.drawImage(g,n+t,0,p,l,v+r,0,P,m))}else d.setTransform(n,f),f.drawImage(g,0,0,m,l);d.__popMaskObject(a)}}}}}}d=b.__canvasRenderer;a.__renderable&&0!=a.__group.__tiles.length&&(e=d.__getAlpha(a.__worldAlpha),0>=e||(f=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g=fa.__pool.get(),g.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(g,a.__renderTransform),d.__allowSmoothing&&
a.smoothing||(f.imageSmoothingEnabled=!1),Vf.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,e,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,g),d.__allowSmoothing&&a.smoothing||(f.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),fa.__pool.release(g)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else Ag.clear(a,b)};Ag.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender)if(null!=a.stage&&a.__worldVisible&&a.__renderable&&0<a.__group.__tiles.length){null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=wa.__identity;var d=b.__canvasRenderer;if((null!=a.opaqueBackground||null!=a.__graphics)&&
a.__renderable){var e=d.__getAlpha(a.__worldAlpha);if(!(0>=e)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var f=d.context;d.setTransform(a.__renderTransform,f);var g=a.opaqueBackground;f.fillStyle="rgb("+(g>>>16&255)+","+(g>>>8&255)+","+(g&255)+")";f.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(e=d.__getAlpha(a.__worldAlpha),!(0>=e))){var h=
a.__graphics;if(null!=h){z.render(h,d);var m=h.__width,l=h.__height;g=h.__canvas;if(null!=g&&h.__visible&&1<=m&&1<=l){var n=h.__worldTransform;f=d.context;var p=a.__scrollRect,k=a.__worldScale9Grid;if(null==p||0<p.width&&0<p.height){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);f.globalAlpha=e;if(null!=k&&0==n.b&&0==n.c){var q=d.__pixelRatio;e=wa.__pool.get();e.translate(n.tx,n.ty);d.setTransform(e,f);wa.__pool.release(e);e=h.__bounds;var t=h.__renderTransform.a/h.__bitmapScale,v=h.__renderTransform.d/
h.__bitmapScale,r=t*n.a,u=v*n.d;n=Math.max(1,Math.round(k.x*t));h=Math.round(k.y*v);p=Math.max(1,Math.round((e.get_right()-k.get_right())*t));var x=Math.round((e.get_bottom()-k.get_bottom())*v);t=Math.round(k.width*t);k=Math.round(k.height*v);v=Math.round(n/q);var C=Math.round(h/q),P=Math.round(p/q);q=Math.round(x/q);r=e.width*r-v-P;e=e.height*u-C-q;d.applySmoothing(f,!1);0!=t&&0!=k?(f.drawImage(g,0,0,n,h,0,0,v,C),f.drawImage(g,n,0,t,h,v,0,r,C),f.drawImage(g,n+t,0,p,h,v+r,0,P,C),f.drawImage(g,0,h,
n,k,0,C,v,e),f.drawImage(g,n,h,t,k,v,C,r,e),f.drawImage(g,n+t,h,p,k,v+r,C,P,e),f.drawImage(g,0,h+k,n,x,0,C+e,v,q),f.drawImage(g,n,h+k,t,x,v,C+e,r,q),f.drawImage(g,n+t,h+k,p,x,v+r,C+e,P,q)):0==t&&0!=k?(l=v+r+P,f.drawImage(g,0,0,m,h,0,0,l,C),f.drawImage(g,0,h,m,k,0,C,l,e),f.drawImage(g,0,h+k,m,x,0,C+e,l,q)):0==k&&0!=t&&(m=C+e+q,f.drawImage(g,0,0,n,l,0,0,v,m),f.drawImage(g,n,0,t,l,v,0,r,m),f.drawImage(g,n+t,0,p,l,v+r,0,P,m))}else d.setTransform(n,f),f.drawImage(g,0,0,m,l);d.__popMaskObject(a)}}}}}}d=
b.__canvasRenderer;a.__renderable&&0!=a.__group.__tiles.length&&(e=d.__getAlpha(a.__worldAlpha),0>=e||(f=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g=fa.__pool.get(),g.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(g,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(f.imageSmoothingEnabled=!1),Vf.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,e,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,g),
d.__allowSmoothing&&a.smoothing||(f.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),fa.__pool.release(g)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else Ag.clear(a,b);else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?
(d=c.__bitmapData.image.buffer.__srcImage.src,R.startsWith(d,"data:")||R.startsWith(d,"blob:")?yc.renderCanvas(c,b):yc.renderImage(c,b)):yc.renderCanvas(c,b),b.__popMaskObject(c)):yc.clear(c,b);b.__renderEvent(a)};Ag.renderDrawableClear=function(a,b){Ag.clear(a,b)};var Wg=function(){};k["openfl.display._internal.DOMVideo"]=Wg;Wg.__name__="openfl.display._internal.DOMVideo";Wg.clear=function(a,b){He.clear(a,b);a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};Wg.render=function(a,
b){null!=a.stage&&null!=a.__stream&&a.__worldVisible&&a.__renderable?(a.__active||(b.__initializeElement(a,a.__stream.__video),a.__active=!0,a.__dirty=!0),a.__dirty&&(a.__stream.__video.width=a.__width|0,a.__stream.__video.height=a.__height|0,a.__dirty=!1),b.__updateClip(a),b.__applyStyle(a,!0,!0,!0)):Wg.clear(a,b)};Wg.renderDrawable=function(a,b){Wg.render(a,b);b.__renderEvent(a)};Wg.renderDrawableClear=function(a,b){He.renderDrawableClear(a,b)};var Wf=function(a){this.buffer=a;this.bPos=this.iPos=
this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=da.UNKNOWN};k["openfl.display._internal.DrawCommandReader"]=Wf;Wf.__name__="openfl.display._internal.DrawCommandReader";Wf.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,advance:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=
1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=
1}},bool:function(a){return this.buffer.b[this.bPos+a]},destroy:function(){this.buffer=null;this.reset()},fArr:function(a){return this.buffer.ff[this.ffPos+a]},float:function(a){return this.buffer.f[this.fPos+a]},iArr:function(a){return this.buffer.ii[this.iiPos+a]},int:function(a){return this.buffer.i[this.iPos+a]},obj:function(a){return this.buffer.o[this.oPos+a]},readBeginBitmapFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;
case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=
2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.BEGIN_BITMAP_FILL;return this},readBeginFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;
break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.BEGIN_FILL;return this},readBeginGradientFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=
1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=
1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.BEGIN_GRADIENT_FILL;return this},readBeginShaderFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=
3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.BEGIN_SHADER_FILL;return this},readCubicCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=
2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=
1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.CUBIC_CURVE_TO;return this},readCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;
case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.CURVE_TO;return this},readDrawCircle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_CIRCLE;return this},readDrawEllipse:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_ELLIPSE;return this},readDrawQuads:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_QUADS;return this},readDrawRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_RECT;return this},readDrawRoundRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_ROUND_RECT;return this},readDrawTriangles:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.DRAW_TRIANGLES;return this},readEndFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.END_FILL;return this},readLineBitmapStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.LINE_BITMAP_STYLE;return this},readLineGradientStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.LINE_GRADIENT_STYLE;return this},readLineStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.LINE_STYLE;return this},readLineTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.LINE_TO;return this},readMoveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;
break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.MOVE_TO;return this},readOverrideBlendMode:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.OVERRIDE_BLEND_MODE;return this},readOverrideMatrix:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;
case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.OVERRIDE_MATRIX;return this},readWindingEvenOdd:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.WINDING_EVEN_ODD;return this},readWindingNonZero:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=da.WINDING_NON_ZERO;return this},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=
this.ffPos=this.iiPos=this.tsPos=0},skip:function(a){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=
2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=a},__class__:Wf};var da=x["openfl.display._internal.DrawCommandType"]={__ename__:"openfl.display._internal.DrawCommandType",__constructs__:null,BEGIN_BITMAP_FILL:{_hx_name:"BEGIN_BITMAP_FILL",_hx_index:0,__enum__:"openfl.display._internal.DrawCommandType",
toString:v},BEGIN_FILL:{_hx_name:"BEGIN_FILL",_hx_index:1,__enum__:"openfl.display._internal.DrawCommandType",toString:v},BEGIN_GRADIENT_FILL:{_hx_name:"BEGIN_GRADIENT_FILL",_hx_index:2,__enum__:"openfl.display._internal.DrawCommandType",toString:v},BEGIN_SHADER_FILL:{_hx_name:"BEGIN_SHADER_FILL",_hx_index:3,__enum__:"openfl.display._internal.DrawCommandType",toString:v},CUBIC_CURVE_TO:{_hx_name:"CUBIC_CURVE_TO",_hx_index:4,__enum__:"openfl.display._internal.DrawCommandType",toString:v},CURVE_TO:{_hx_name:"CURVE_TO",
_hx_index:5,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_CIRCLE:{_hx_name:"DRAW_CIRCLE",_hx_index:6,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_ELLIPSE:{_hx_name:"DRAW_ELLIPSE",_hx_index:7,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_QUADS:{_hx_name:"DRAW_QUADS",_hx_index:8,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_RECT:{_hx_name:"DRAW_RECT",_hx_index:9,__enum__:"openfl.display._internal.DrawCommandType",
toString:v},DRAW_ROUND_RECT:{_hx_name:"DRAW_ROUND_RECT",_hx_index:10,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_TILES:{_hx_name:"DRAW_TILES",_hx_index:11,__enum__:"openfl.display._internal.DrawCommandType",toString:v},DRAW_TRIANGLES:{_hx_name:"DRAW_TRIANGLES",_hx_index:12,__enum__:"openfl.display._internal.DrawCommandType",toString:v},END_FILL:{_hx_name:"END_FILL",_hx_index:13,__enum__:"openfl.display._internal.DrawCommandType",toString:v},LINE_BITMAP_STYLE:{_hx_name:"LINE_BITMAP_STYLE",
_hx_index:14,__enum__:"openfl.display._internal.DrawCommandType",toString:v},LINE_GRADIENT_STYLE:{_hx_name:"LINE_GRADIENT_STYLE",_hx_index:15,__enum__:"openfl.display._internal.DrawCommandType",toString:v},LINE_STYLE:{_hx_name:"LINE_STYLE",_hx_index:16,__enum__:"openfl.display._internal.DrawCommandType",toString:v},LINE_TO:{_hx_name:"LINE_TO",_hx_index:17,__enum__:"openfl.display._internal.DrawCommandType",toString:v},MOVE_TO:{_hx_name:"MOVE_TO",_hx_index:18,__enum__:"openfl.display._internal.DrawCommandType",
toString:v},OVERRIDE_BLEND_MODE:{_hx_name:"OVERRIDE_BLEND_MODE",_hx_index:19,__enum__:"openfl.display._internal.DrawCommandType",toString:v},OVERRIDE_MATRIX:{_hx_name:"OVERRIDE_MATRIX",_hx_index:20,__enum__:"openfl.display._internal.DrawCommandType",toString:v},WINDING_EVEN_ODD:{_hx_name:"WINDING_EVEN_ODD",_hx_index:21,__enum__:"openfl.display._internal.DrawCommandType",toString:v},WINDING_NON_ZERO:{_hx_name:"WINDING_NON_ZERO",_hx_index:22,__enum__:"openfl.display._internal.DrawCommandType",toString:v},
UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:23,__enum__:"openfl.display._internal.DrawCommandType",toString:v}};da.__constructs__=[da.BEGIN_BITMAP_FILL,da.BEGIN_FILL,da.BEGIN_GRADIENT_FILL,da.BEGIN_SHADER_FILL,da.CUBIC_CURVE_TO,da.CURVE_TO,da.DRAW_CIRCLE,da.DRAW_ELLIPSE,da.DRAW_QUADS,da.DRAW_RECT,da.DRAW_ROUND_RECT,da.DRAW_TILES,da.DRAW_TRIANGLES,da.END_FILL,da.LINE_BITMAP_STYLE,da.LINE_GRADIENT_STYLE,da.LINE_STYLE,da.LINE_TO,da.MOVE_TO,da.OVERRIDE_BLEND_MODE,da.OVERRIDE_MATRIX,da.WINDING_EVEN_ODD,da.WINDING_NON_ZERO,
da.UNKNOWN];var yh=function(){};k["openfl.display._internal.FlashRenderer"]=yh;yh.__name__="openfl.display._internal.FlashRenderer";yh.register=function(a){null==yh.instances&&(yh.instances=qs.toObjectMap(null,!0),Da.get_current().stage.addEventListener("enterFrame",yh.render,!1,-2147483648));yh.instances.set(a,!0)};yh.render=function(a){for(a=yh.instances.keys();a.hasNext();)a.next().__renderFlash()};var Zo=function(){};k["openfl.display._internal.IDisplayObject"]=Zo;Zo.__name__="openfl.display._internal.IDisplayObject";
Zo.__isInterface__=!0;Zo.prototype={__renderFlash:null,__class__:Zo};var Zh=function(){};k["openfl.display._internal.FlashTilemap"]=Zh;Zh.__name__="openfl.display._internal.FlashTilemap";Zh.render=function(a){};Zh.renderTileContainer=function(a,b,c,d,e,f,g,h,m,l,n,p){};var Sh=function(a,b,c,d,e,f,g){null==g&&(g=.05);null==f&&(f=!1);Qi.call(this,a,b,c,d,e,f,g);this.p_perm=[];for(b=0;512>b;)c=b++,this.p_perm[c]=Sh.P[c&255];this.base_factor=.03125;this.setSeed(a)};k["openfl.display._internal.PerlinNoise"]=
Sh;Sh.__name__="openfl.display._internal.PerlinNoise";Sh.__super__=Qi;Sh.prototype=u(Qi.prototype,{p_perm:null,x_offset:null,y_offset:null,z_offset:null,base_factor:null,fill:function(a,b,c,d){var e=a.width,f=a.height,g=this.octaves,h=this.octaves_frequencies,m=this.octaves_persistences,l=1==(1&this.channels),n=2==(2&this.channels),p=4==(4&this.channels),k=0;l&&++k;n&&++k;p&&++k;var q=this.grayscale,t=this.stitch_threshold*e|0,v=this.stitch_threshold*f|0,r=b*this.base_factor+this.x_offset;c=c*this.base_factor+
this.y_offset;d=d*this.base_factor+this.z_offset;for(var u=0;u<f;){var x=u++;b=r;for(var C=0,P=e;C<P;){for(var F=C++,z=0,y=0,ka=0,B=0,I=g;B<I;){var w=B++,A=h[w];w=m[w];z+=this.noise(b*A,c*A,d*A)*w;q||(1<k&&(y+=this.noise((b+1)*A,(c+1)*A,d*A)*w),2<k&&(ka+=this.noise((b+2)*A,(c+2)*A,d*A)*w))}B=0;q?B=this.color(z,z,z):l&&n&&p?B=this.color(z,y,ka):l&&n?B=this.color(z,y,null):l&&p?B=this.color(z,null,y):n&&p?B=this.color(null,z,y):l?B=this.color(z,null,null):n?B=this.color(null,z,null):p&&(B=this.color(null,
null,z));this.stitch&&(B=this.stitching(a,B,F,x,t,v,e,f));a.setPixel32(F,x,B);b+=this.base_factor}c+=this.base_factor}},noise:function(a,b,c){var d=a-a%1,e=b-b%1,f=c-c%1;a-=d;b-=e;c-=f;var g=(d|0)&255,h=(e|0)&255,m=(f|0)&255;f=this.fade(a);e=this.fade(b);d=this.fade(c);var l=this.p_perm[g]+h,n=this.p_perm[l]+m;l=this.p_perm[l+1]+m;h=this.p_perm[g+1]+h;g=this.p_perm[h]+m;var p=this.p_perm[h+1]+m,k=a-1,q=b-1,t=c-1,v=this.p_perm[p+1]&15;m=(0==(v&1)?8>v?k:q:8>v?-k:-q)+(0==(v&2)?4>v?q:12==v?k:t:4>v?-q:
14==v?-k:-t);v=this.p_perm[l+1]&15;h=(0==(v&1)?8>v?a:q:8>v?-a:-q)+(0==(v&2)?4>v?q:12==v?a:t:4>v?-q:14==v?-a:-t);v=this.p_perm[g+1]&15;var r=(0==(v&1)?8>v?k:b:8>v?-k:-b)+(0==(v&2)?4>v?b:12==v?k:t:4>v?-b:14==v?-k:-t);v=this.p_perm[n+1]&15;t=(0==(v&1)?8>v?a:b:8>v?-a:-b)+(0==(v&2)?4>v?b:12==v?a:t:4>v?-b:14==v?-a:-t);v=this.p_perm[p]&15;p=(0==(v&1)?8>v?k:q:8>v?-k:-q)+(0==(v&2)?4>v?q:12==v?k:c:4>v?-q:14==v?-k:-c);v=this.p_perm[l]&15;l=(0==(v&1)?8>v?a:q:8>v?-a:-q)+(0==(v&2)?4>v?q:12==v?a:c:4>v?-q:14==v?
-a:-c);v=this.p_perm[g]&15;g=(0==(v&1)?8>v?k:b:8>v?-k:-b)+(0==(v&2)?4>v?b:12==v?k:c:4>v?-b:14==v?-k:-c);v=this.p_perm[n]&15;a=(0==(v&1)?8>v?a:b:8>v?-a:-b)+(0==(v&2)?4>v?b:12==v?a:c:4>v?-b:14==v?-a:-c);t+=f*(r-t);a+=f*(g-a);a+=e*(l+f*(p-l)-a);return a+d*(t+e*(h+f*(m-h)-t)-a)},setSeed:function(a){this.x_offset=a=16807*a%2147483647|0;this.y_offset=a=16807*a%2147483647|0;this.z_offset=16807*a%2147483647|0},__class__:Sh});var Ng=function(a,b,c,d,e,f,g){null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==
d&&(d=0);null==c&&(c=2);null==b&&(b=5);null==a&&(a=0);this.wrap=a;this.filter=b;this.mipfilter=c;this.lodBias=d;this.ignoreSampler=e;this.centroid=f;this.textureAlpha=g};k["openfl.display._internal.SamplerState"]=Ng;Ng.__name__="openfl.display._internal.SamplerState";Ng.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new Ng(this.wrap,this.filter,this.mipfilter,this.lodBias,this.ignoreSampler,
this.centroid,this.textureAlpha);a.mipmapGenerated=this.mipmapGenerated;return a},copyFrom:function(a){null==a||a.ignoreSampler||(this.wrap=a.wrap,this.filter=a.filter,this.mipfilter=a.mipfilter,this.lodBias=a.lodBias,this.centroid=a.centroid,this.textureAlpha=a.textureAlpha)},equals:function(a){return null==a?!1:this.wrap==a.wrap&&this.filter==a.filter&&this.mipfilter==a.mipfilter&&this.lodBias==a.lodBias?this.textureAlpha==a.textureAlpha:!1},__class__:Ng};var Im=function(){this.inputRefs=[];this.inputFilter=
[];this.inputMipFilter=[];this.inputs=[];this.inputWrap=[];this.overrideIntNames=[];this.overrideIntValues=[];this.overrideFloatNames=[];this.overrideFloatValues=[];this.overrideBoolNames=[];this.overrideBoolValues=[];this.paramLengths=[];this.paramPositions=[];this.paramRefs_Bool=[];this.paramRefs_Float=[];this.paramRefs_Int=[];this.paramTypes=[]};k["openfl.display._internal.ShaderBuffer"]=Im;Im.__name__="openfl.display._internal.ShaderBuffer";Im.prototype={inputCount:null,inputRefs:null,inputFilter:null,
inputMipFilter:null,inputs:null,inputWrap:null,overrideBoolCount:null,overrideBoolNames:null,overrideBoolValues:null,overrideFloatCount:null,overrideFloatNames:null,overrideFloatValues:null,overrideIntCount:null,overrideIntNames:null,overrideIntValues:null,paramBoolCount:null,paramCount:null,paramData:null,paramDataBuffer:null,paramDataLength:null,paramFloatCount:null,paramIntCount:null,paramLengths:null,paramPositions:null,paramRefs_Bool:null,paramRefs_Float:null,paramRefs_Int:null,paramTypes:null,
shader:null,addBoolOverride:function(a,b){this.overrideBoolNames[this.overrideBoolCount]=a;this.overrideBoolValues[this.overrideBoolCount]=b;this.overrideBoolCount++},addFloatOverride:function(a,b){this.overrideFloatNames[this.overrideFloatCount]=a;this.overrideFloatValues[this.overrideFloatCount]=b;this.overrideFloatCount++},addIntOverride:function(a,b){this.overrideIntNames[this.overrideIntCount]=a;this.overrideIntValues[this.overrideIntCount]=b;this.overrideIntCount++},clearOverride:function(){this.overrideBoolCount=
this.overrideFloatCount=this.overrideIntCount=0},update:function(a){this.paramIntCount=this.paramFloatCount=this.paramDataLength=this.paramCount=this.paramBoolCount=this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=this.inputCount=0;this.shader=null;if(null!=a){a.__init();this.inputCount=a.__inputBitmapData.length;for(var b,c=0,d=this.inputCount;c<d;){var e=c++;b=a.__inputBitmapData[e];this.inputs[e]=b.input;this.inputFilter[e]=b.filter;this.inputMipFilter[e]=b.mipFilter;this.inputRefs[e]=
b;this.inputWrap[e]=b.wrap}b=a.__paramBool.length;var f=a.__paramFloat.length,g=a.__paramInt.length;this.paramCount=b+f+g;this.paramBoolCount=b;this.paramFloatCount=f;this.paramIntCount=g;var h=0;c=0;for(d=b;c<d;){e=c++;var m=a.__paramBool[e];this.paramPositions[h]=this.paramDataLength;var l=null!=m.value?m.value.length:0;this.paramLengths[h]=l;this.paramDataLength+=l;this.paramTypes[h]=0;this.paramRefs_Bool[e]=m;++h}c=0;for(d=f;c<d;)e=c++,m=a.__paramFloat[e],this.paramPositions[h]=this.paramDataLength,
l=null!=m.value?m.value.length:0,this.paramLengths[h]=l,this.paramDataLength+=l,this.paramTypes[h]=1,this.paramRefs_Float[e]=m,++h;c=0;for(d=g;c<d;)e=c++,m=a.__paramInt[e],this.paramPositions[h]=this.paramDataLength,l=null!=m.value?m.value.length:0,this.paramLengths[h]=l,this.paramDataLength+=l,this.paramTypes[h]=2,this.paramRefs_Int[e]=m,++h;if(0<this.paramDataLength)if(null==this.paramData){c=this.paramDataLength;var n=m=h=g=d=null;this.paramData=c=null!=c?new Float32Array(c):null!=d?new Float32Array(d):
null!=g?new Float32Array(g.__array):null!=h?new Float32Array(h):null!=m?null==n?new Float32Array(m,0):new Float32Array(m,0,n):null}else this.paramDataLength>this.paramData.length&&(c=this.paramDataLength,n=m=h=g=d=null,c=null!=c?new Float32Array(c):null!=d?new Float32Array(d):null!=g?new Float32Array(g.__array):null!=h?new Float32Array(h):null!=m?null==n?new Float32Array(m,0):new Float32Array(m,0,n):null,c.set(this.paramData),this.paramData=c);c=n=m=h=g=0;for(d=this.paramCount;c<d;)if(e=c++,l=this.paramLengths[e],
e<b){e=this.paramRefs_Bool[g];++g;for(var p=0;p<l;){var k=p++;this.paramData[n]=e.value[k]?1:0;++n}}else if(e<b+f)for(e=this.paramRefs_Float[h],++h,p=0;p<l;)k=p++,this.paramData[n]=e.value[k],++n;else for(e=this.paramRefs_Int[m],++m,p=0;p<l;)k=p++,this.paramData[n]=e.value[k],++n;this.shader=a}},__class__:Im};var Ub=function(a,b,c){this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=0;za.call(this);this.__stage=a;this.__contextState=b;this.__stage3D=
c;this.__context=a.window.context;this.gl=this.__context.webgl;null==this.__contextState&&(this.__contextState=new Vj);this.__state=new Vj;var d;this.__vertexConstants=a=new Float32Array(512);this.__fragmentConstants=a=new Float32Array(512);var e=null;a=[1,1,1,1];var f=d=c=b=null;this.__positionScale=a=null!=e?new Float32Array(e):null!=a?new Float32Array(a):null!=b?new Float32Array(b.__array):null!=c?new Float32Array(c):null!=d?null==f?new Float32Array(d,0):new Float32Array(d,0,f):null;this.__programs=
new ia;-1==Ub.__glMaxViewportDims&&(Ub.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=this.maxBackBufferWidth=Ub.__glMaxViewportDims;-1==Ub.__glMaxTextureMaxAnisotropy&&(a=this.gl.getExtension("EXT_texture_filter_anisotropic"),null!=a&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")),null!=a&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||
(a=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")),null!=a?(Ub.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,Ub.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):(Ub.__glTextureMaxAnisotropy=0,Ub.__glMaxTextureMaxAnisotropy=0));-1==Ub.__glDepthStencil&&(Ub.__glDepthStencil=this.gl.DEPTH_STENCIL);-1==Ub.__glMemoryTotalAvailable&&(a=this.gl.getExtension("NVX_gpu_memory_info"),null!=a&&(Ub.__glMemoryTotalAvailable=a.GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,
Ub.__glMemoryCurrentAvailable=a.GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX));null==Ub.__driverInfo&&(a=this.gl.getParameter(this.gl.VENDOR),b=this.gl.getParameter(this.gl.VERSION),c=this.gl.getParameter(this.gl.RENDERER),d=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION),Ub.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d);this.driverInfo=Ub.__driverInfo;this.__quadIndexBufferElements=16383;e=this.__quadIndexBufferCount=6*this.__quadIndexBufferElements;f=d=c=b=a=null;
a=null!=e?new Uint16Array(e):null!=a?new Uint16Array(a):null!=b?new Uint16Array(b.__array):null!=c?new Uint16Array(c):null!=d?null==f?new Uint16Array(d,0):new Uint16Array(d,0,f):null;d=c=b=0;for(f=this.__quadIndexBufferElements;d<f;)d++,a[b]=c,a[b+1]=c+1,a[b+2]=c+2,a[b+3]=c+2,a[b+4]=c+1,a[b+5]=c+3,b+=6,c+=4;this.__quadIndexBuffer=this.createIndexBuffer(this.__quadIndexBufferCount);this.__quadIndexBuffer.uploadFromTypedArray(a)};k["openfl.display3D.Context3D"]=Ub;Ub.__name__="openfl.display3D.Context3D";
Ub.__super__=za;Ub.prototype=u(za.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,profile:null,gl:null,__backBufferAntiAlias:null,__backBufferTexture:null,__backBufferWantsBestResolution:null,__backBufferWantsBestResolutionOnBrowserZoom:null,__cleared:null,__context:null,__contextState:null,__renderStage3DProgram:null,__enableErrorChecking:null,__fragmentConstants:null,__frontBufferTexture:null,__positionScale:null,__present:null,
__programs:null,__quadIndexBuffer:null,__quadIndexBufferCount:null,__quadIndexBufferElements:null,__stage:null,__stage3D:null,__state:null,__vertexConstants:null,clear:function(a,b,c,d,e,f,g){null==g&&(g=7);null==f&&(f=0);null==e&&(e=1);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.__flushGLFramebuffer();this.__flushGLViewport();var h=0;if(0!=(g&1)){null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared||(this.__stage.__renderer.__cleared=
!0),this.__cleared=!0);h|=this.gl.COLOR_BUFFER_BIT;if(1!=this.__contextState.colorMaskRed||1!=this.__contextState.colorMaskGreen||1!=this.__contextState.colorMaskBlue||1!=this.__contextState.colorMaskAlpha)this.gl.colorMask(!0,!0,!0,!0),this.__contextState.colorMaskRed=!0,this.__contextState.colorMaskGreen=!0,this.__contextState.colorMaskBlue=!0,this.__contextState.colorMaskAlpha=!0;this.gl.clearColor(a,b,c,d)}0!=(g&2)&&(h|=this.gl.DEPTH_BUFFER_BIT,1!=this.__contextState.depthMask&&(this.gl.depthMask(!0),
this.__contextState.depthMask=!0),this.gl.clearDepth(e));0!=(g&4)&&(h|=this.gl.STENCIL_BUFFER_BIT,255!=this.__contextState.stencilWriteMask&&(this.gl.stencilMask(255),this.__contextState.stencilWriteMask=255),this.gl.clearStencil(f),this.__contextState.stencilWriteMask=255);0!=h&&(this.__setGLScissorTest(!1),this.gl.clear(h))},configureBackBuffer:function(a,b,c,d,e,f){null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=!0);e&&(a=a*this.__stage.window.__scale|0,b=b*this.__stage.window.__scale|0);if(null==
this.__stage3D)this.backBufferWidth=a,this.backBufferHeight=b,this.__backBufferAntiAlias=c,this.__state.backBufferEnableDepthAndStencil=d,this.__backBufferWantsBestResolution=e,this.__backBufferWantsBestResolutionOnBrowserZoom=f;else{if(null==this.__backBufferTexture||this.backBufferWidth!=a||this.backBufferHeight!=b){null!=this.__backBufferTexture&&this.__backBufferTexture.dispose();null!=this.__frontBufferTexture&&this.__frontBufferTexture.dispose();this.__backBufferTexture=this.createRectangleTexture(a,
b,1,!0);this.__frontBufferTexture=this.createRectangleTexture(a,b,1,!0);null==this.__stage3D.__vertexBuffer&&(this.__stage3D.__vertexBuffer=this.createVertexBuffer(4,5));var g=e?a:a*this.__stage.window.__scale|0,h=e?b:b*this.__stage.window.__scale|0;g=ub.toFloatVector(null,null,null,[g,h,0,1,1,0,h,0,0,1,g,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(g,0,20);null==this.__stage3D.__indexBuffer&&(this.__stage3D.__indexBuffer=this.createIndexBuffer(6),g=ub.toIntVector(null,null,
null,[0,1,2,2,1,3]),this.__stage3D.__indexBuffer.uploadFromVector(g,0,6))}this.backBufferWidth=a;this.backBufferHeight=b;this.__backBufferAntiAlias=c;this.__state.backBufferEnableDepthAndStencil=d;this.__backBufferWantsBestResolution=e;this.__backBufferWantsBestResolutionOnBrowserZoom=f;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(d,c,0);this.__frontBufferTexture.__getGLFramebuffer(d,c,0)}},createCubeTexture:function(a,b,c,d){null==d&&(d=0);return new Ri(this,a,
b,c,d)},createIndexBuffer:function(a,b){null==b&&(b=1);return new $o(this,a,b)},createProgram:function(a){null==a&&(a=0);return new ap(this,a)},createRectangleTexture:function(a,b,c,d){return new Wj(this,a,b,Xj.toString(c),d)},createTexture:function(a,b,c,d,e){null==e&&(e=0);return new $h(this,a,b,c,d,e)},createVertexBuffer:function(a,b,c){null==c&&(c=1);return new bp(this,a,b,Gr.toString(c))},createVideoTexture:function(){return new an(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,
b,c){if(null!=a)if(b=null!=b?b.__toLimeRectangle():new Dd(0,0,this.backBufferWidth,this.backBufferHeight),c=null!=c?c.__toLimeVector2():new Vd,this.__stage.context3D==this){if(null!=this.__stage.window){if(null!=this.__stage3D){var d=-this.__stage3D.get_x()|0,e=-this.__stage3D.get_y()|0;c.x=d;c.y=e}e=this.__stage.window.readPixels();a.image.copyPixels(e,b,c)}}else if(null!=this.__backBufferTexture){d=this.__state.renderToTexture;this.setRenderToBackBuffer();this.__flushGLFramebuffer();this.__flushGLViewport();
e=this.backBufferWidth*this.backBufferHeight*4;var f=e=null!=e?new Uint8Array(e):null;e=this.gl;e.readPixels(0,0,this.backBufferWidth,this.backBufferHeight,this.__backBufferTexture.__format,this.gl.UNSIGNED_BYTE,f);e=new Fb(new Rf(f,this.backBufferWidth,this.backBufferHeight,32,2));a.image.copyPixels(e,b,c);null!=d&&this.setRenderToTexture(d,this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector)}},drawTriangles:function(a,b,c){null==
c&&(c=-1);null==b&&(b=0);null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();null!=this.__state.program&&this.__state.program.__flush();c=-1==c?a.__numIndices:3*c;this.__bindGLElementArrayBuffer(a.__id);this.gl.drawElements(this.gl.TRIANGLES,c,this.gl.UNSIGNED_SHORT,2*b)},present:function(){this.setRenderToBackBuffer();if(null!=this.__stage3D&&null!=this.__backBufferTexture){this.__cleared||
this.clear(0,0,0,0,1,0,1);var a=this.__backBufferTexture;this.__backBufferTexture=this.__frontBufferTexture;this.__frontBufferTexture=a;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(this.__state.backBufferEnableDepthAndStencil,this.__backBufferAntiAlias,0);this.__cleared=!1}this.__present=!0},setBlendFactors:function(a,b){this.setBlendFactorsSeparate(a,b,a,b)},setBlendFactorsSeparate:function(a,b,c,d){this.__state.blendSourceRGBFactor=a;this.__state.blendDestinationRGBFactor=
b;this.__state.blendSourceAlphaFactor=c;this.__state.blendDestinationAlphaFactor=d;this.__setGLBlendEquation(this.gl.FUNC_ADD)},setColorMask:function(a,b,c,d){this.__state.colorMaskRed=a;this.__state.colorMaskGreen=b;this.__state.colorMaskBlue=c;this.__state.colorMaskAlpha=d},setCulling:function(a){this.__state.culling=a},setDepthTest:function(a,b){this.__state.depthMask=a;this.__state.depthCompareMode=b},setProgram:function(a){this.__state.program=a;this.__state.shader=null;if(null!=a)for(var b=
0,c=a.__samplerStates.length;b<c;){var d=b++;null==this.__state.samplerStates[d]?this.__state.samplerStates[d]=a.__samplerStates[d].clone():this.__state.samplerStates[d].copyFrom(a.__samplerStates[d])}},setProgramConstantsFromByteArray:function(a,b,c,d,e){if(0!=c&&null!=this.__state.program&&(null==this.__state.program||1!=this.__state.program.__format)){-1==c&&(c=(Ab.get_length(d)>>>2)-e);var f=(a=1==a)?this.__vertexConstants:this.__fragmentConstants;d=Ab.toBytes(d);var g=0;null==g&&(g=0);d=null==
g?new Float32Array(d.b.bufferValue):new Float32Array(d.b.bufferValue,g);g=4*b;e=ua.toFloat(e)/ua.toFloat(4)|0;for(var h=0,m=4*c;h<m;){var l=h++;f[g+l]=d[e+l]}null!=this.__state.program&&this.__state.program.__markDirty(a,b,c)}},setProgramConstantsFromMatrix:function(a,b,c,d){null==d&&(d=!1);if(null!=this.__state.program&&1==this.__state.program.__format)this.__flushGLProgram(),a=new Float32Array(16),a[0]=c.rawData.get(0),a[1]=c.rawData.get(1),a[2]=c.rawData.get(2),a[3]=c.rawData.get(3),a[4]=c.rawData.get(4),
a[5]=c.rawData.get(5),a[6]=c.rawData.get(6),a[7]=c.rawData.get(7),a[8]=c.rawData.get(8),a[9]=c.rawData.get(9),a[10]=c.rawData.get(10),a[11]=c.rawData.get(11),a[12]=c.rawData.get(12),a[13]=c.rawData.get(13),a[14]=c.rawData.get(14),a[15]=c.rawData.get(15),$b.uniformMatrix4fv(this.gl,b,d,a);else{var e=(a=1==a)?this.__vertexConstants:this.__fragmentConstants;c=c.rawData;var f=4*b;d?(e[f++]=c.get(0),e[f++]=c.get(4),e[f++]=c.get(8),e[f++]=c.get(12),e[f++]=c.get(1),e[f++]=c.get(5),e[f++]=c.get(9),e[f++]=
c.get(13),e[f++]=c.get(2),e[f++]=c.get(6),e[f++]=c.get(10),e[f++]=c.get(14),e[f++]=c.get(3),e[f++]=c.get(7),e[f++]=c.get(11)):(e[f++]=c.get(0),e[f++]=c.get(1),e[f++]=c.get(2),e[f++]=c.get(3),e[f++]=c.get(4),e[f++]=c.get(5),e[f++]=c.get(6),e[f++]=c.get(7),e[f++]=c.get(8),e[f++]=c.get(9),e[f++]=c.get(10),e[f++]=c.get(11),e[f++]=c.get(12),e[f++]=c.get(13),e[f++]=c.get(14));e[f++]=c.get(15);null!=this.__state.program&&this.__state.program.__markDirty(a,b,4)}},setProgramConstantsFromVector:function(a,
b,c,d){null==d&&(d=-1);if(0!=d&&(null==this.__state.program||1!=this.__state.program.__format)){-1==d&&(d=c.get_length()>>2);for(var e=(a=1==a)?this.__vertexConstants:this.__fragmentConstants,f=0,g=4*b,h=0,m=d;h<m;)h++,e[g++]=c.get(f++),e[g++]=c.get(f++),e[g++]=c.get(f++),e[g++]=c.get(f++);null!=this.__state.program&&this.__state.program.__markDirty(a,b,d)}},setRenderToBackBuffer:function(){this.__state.renderToTexture=null},setRenderToTexture:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==
b&&(b=!1);this.__state.renderToTexture=a;this.__state.renderToTextureDepthStencil=b;this.__state.renderToTextureAntiAlias=c;this.__state.renderToTextureSurfaceSelector=d},setSamplerStateAt:function(a,b,c,d){null==this.__state.samplerStates[a]&&(this.__state.samplerStates[a]=new Ng);a=this.__state.samplerStates[a];a.wrap=b;a.filter=c;a.mipfilter=d},setScissorRectangle:function(a){null!=a?(this.__state.scissorEnabled=!0,this.__state.scissorRectangle.copyFrom(a)):this.__state.scissorEnabled=!1},setStencilActions:function(a,
b,c,d,e){null==e&&(e=5);null==d&&(d=5);null==c&&(c=5);null==b&&(b=0);null==a&&(a=2);this.__state.stencilTriangleFace=a;this.__state.stencilCompareMode=b;this.__state.stencilPass=c;this.__state.stencilDepthFail=d;this.__state.stencilFail=e},setStencilReferenceValue:function(a,b,c){null==c&&(c=255);null==b&&(b=255);this.__state.stencilReferenceValue=a;this.__state.stencilReadMask=b;this.__state.stencilWriteMask=c},setTextureAt:function(a,b){this.__state.textures[a]=b},setVertexBufferAt:function(a,b,
c,d){null==d&&(d=4);null==c&&(c=0);if(!(0>a))if(null==b)this.gl.disableVertexAttribArray(a),this.__bindGLArrayBuffer(null);else switch(this.__bindGLArrayBuffer(b.__id),this.gl.enableVertexAttribArray(a),c*=4,d){case 0:this.gl.vertexAttribPointer(a,4,this.gl.UNSIGNED_BYTE,!0,b.__stride,c);break;case 1:this.gl.vertexAttribPointer(a,1,this.gl.FLOAT,!1,b.__stride,c);break;case 2:this.gl.vertexAttribPointer(a,2,this.gl.FLOAT,!1,b.__stride,c);break;case 3:this.gl.vertexAttribPointer(a,3,this.gl.FLOAT,!1,
b.__stride,c);break;case 4:this.gl.vertexAttribPointer(a,4,this.gl.FLOAT,!1,b.__stride,c);break;default:throw new hd;}},__bindGLArrayBuffer:function(a){this.__contextState.__currentGLArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a),this.__contextState.__currentGLArrayBuffer=a)},__bindGLElementArrayBuffer:function(a){this.__contextState.__currentGLElementArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a),this.__contextState.__currentGLElementArrayBuffer=a)},__bindGLFramebuffer:function(a){this.__contextState.__currentGLFramebuffer!=
a&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a),this.__contextState.__currentGLFramebuffer=a)},__bindGLTexture2D:function(a){this.gl.bindTexture(this.gl.TEXTURE_2D,a);this.__contextState.__currentGLTexture2D=a},__bindGLTextureCubeMap:function(a){this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP,a);this.__contextState.__currentGLTextureCubeMap=a},__dispose:function(){this.driverInfo+=" (Disposed)";null!=this.__stage3D&&(this.__stage3D.__indexBuffer=null,this.__stage3D.__vertexBuffer=null,this.__stage3D=
this.__stage3D.context3D=null);this.__positionScale=this.__frontBufferTexture=this.__fragmentConstants=this.__renderStage3DProgram=this.__context=this.__backBufferTexture=null;this.__present=!1;this.__vertexConstants=this.__stage=this.__quadIndexBuffer=null},__drawTriangles:function(a,b){null==a&&(a=0);null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();null!=
this.__state.program&&this.__state.program.__flush();this.gl.drawArrays(this.gl.TRIANGLES,a,b)},__flushGL:function(){this.__flushGLProgram();this.__flushGLFramebuffer();this.__flushGLViewport();this.__flushGLBlend();if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,
this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha;this.__flushGLCulling();this.__flushGLDepth();this.__flushGLScissor();this.__flushGLStencil();this.__flushGLTextures()},__flushGLBlend:function(){if(this.__contextState.blendDestinationRGBFactor!=
this.__state.blendDestinationRGBFactor||this.__contextState.blendSourceRGBFactor!=this.__state.blendSourceRGBFactor||this.__contextState.blendDestinationAlphaFactor!=this.__state.blendDestinationAlphaFactor||this.__contextState.blendSourceAlphaFactor!=this.__state.blendSourceAlphaFactor)this.__setGLBlend(!0),this.__state.blendDestinationRGBFactor==this.__state.blendDestinationAlphaFactor&&this.__state.blendSourceRGBFactor==this.__state.blendSourceAlphaFactor?this.gl.blendFunc(this.__getGLBlend(this.__state.blendSourceRGBFactor),
this.__getGLBlend(this.__state.blendDestinationRGBFactor)):this.gl.blendFuncSeparate(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor),this.__getGLBlend(this.__state.blendSourceAlphaFactor),this.__getGLBlend(this.__state.blendDestinationAlphaFactor)),this.__contextState.blendDestinationRGBFactor=this.__state.blendDestinationRGBFactor,this.__contextState.blendSourceRGBFactor=this.__state.blendSourceRGBFactor,this.__contextState.blendDestinationAlphaFactor=
this.__state.blendDestinationAlphaFactor,this.__contextState.blendSourceAlphaFactor=this.__state.blendSourceAlphaFactor},__flushGLColor:function(){if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,
this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha},__flushGLCulling:function(){if(this.__contextState.culling!=this.__state.culling){if(3==this.__state.culling)this.__setGLCullFace(!1);else switch(this.__setGLCullFace(!0),this.__state.culling){case 0:this.gl.cullFace(this.gl.BACK);
break;case 1:this.gl.cullFace(this.gl.FRONT);break;case 2:this.gl.cullFace(this.gl.FRONT_AND_BACK);break;case 3:break;default:throw new hd;}this.__contextState.culling=this.__state.culling}},__flushGLDepth:function(){var a=this.__state.depthMask&&(null!=this.__state.renderToTexture?this.__state.renderToTextureDepthStencil:this.__state.backBufferEnableDepthAndStencil);this.__contextState.depthMask!=a&&(this.gl.depthMask(a),this.__contextState.depthMask=a);if(this.__contextState.depthCompareMode!=this.__state.depthCompareMode){switch(this.__state.depthCompareMode){case 0:this.gl.depthFunc(this.gl.ALWAYS);
break;case 1:this.gl.depthFunc(this.gl.EQUAL);break;case 2:this.gl.depthFunc(this.gl.GREATER);break;case 3:this.gl.depthFunc(this.gl.GEQUAL);break;case 4:this.gl.depthFunc(this.gl.LESS);break;case 5:this.gl.depthFunc(this.gl.LEQUAL);break;case 6:this.gl.depthFunc(this.gl.NEVER);break;case 7:this.gl.depthFunc(this.gl.NOTEQUAL);break;default:throw new hd;}this.__contextState.depthCompareMode=this.__state.depthCompareMode}},__flushGLFramebuffer:function(){if(null!=this.__state.renderToTexture){if(this.__contextState.renderToTexture!=
this.__state.renderToTexture||this.__contextState.renderToTextureSurfaceSelector!=this.__state.renderToTextureSurfaceSelector){var a=this.__state.renderToTexture.__getGLFramebuffer(this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector);this.__bindGLFramebuffer(a);this.__contextState.renderToTexture=this.__state.renderToTexture;this.__contextState.renderToTextureAntiAlias=this.__state.renderToTextureAntiAlias;this.__contextState.renderToTextureDepthStencil=
this.__state.renderToTextureDepthStencil;this.__contextState.renderToTextureSurfaceSelector=this.__state.renderToTextureSurfaceSelector}this.__setGLDepthTest(this.__state.renderToTextureDepthStencil);this.__setGLStencilTest(this.__state.renderToTextureDepthStencil);this.__setGLFrontFace(!0)}else{if(null==this.__stage&&0==this.backBufferWidth&&0==this.backBufferHeight)throw new wc("Context3D backbuffer has not been configured");if(null!=this.__contextState.renderToTexture||this.__contextState.__currentGLFramebuffer!=
this.__state.__primaryGLFramebuffer||this.__contextState.backBufferEnableDepthAndStencil!=this.__state.backBufferEnableDepthAndStencil)this.__bindGLFramebuffer(this.__state.__primaryGLFramebuffer),this.__contextState.renderToTexture=null,this.__contextState.backBufferEnableDepthAndStencil=this.__state.backBufferEnableDepthAndStencil;this.__setGLDepthTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLStencilTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLFrontFace(this.__stage.context3D!=
this)}},__flushGLProgram:function(){var a=this.__state.shader,b=this.__state.program;this.__contextState.shader!=a&&(null!=this.__contextState.shader&&this.__contextState.shader.__disable(),null!=a&&a.__enable(),this.__contextState.shader=a);this.__contextState.program!=b&&(null!=this.__contextState.program&&this.__contextState.program.__disable(),null!=b&&b.__enable(),this.__contextState.program=b);null!=b&&0==b.__format&&(this.__positionScale[1]=this.__stage.context3D==this&&null==this.__state.renderToTexture?
1:-1,b.__setPositionScale(this.__positionScale))},__flushGLScissor:function(){if(this.__state.scissorEnabled){this.__setGLScissorTest(!0);this.__contextState.scissorEnabled=!0;var a=this.__state.scissorRectangle.x|0,b=this.__state.scissorRectangle.y|0,c=this.__state.scissorRectangle.width|0,d=this.__state.scissorRectangle.height|0;this.__backBufferWantsBestResolution&&(a=this.__state.scissorRectangle.x*this.__stage.window.__scale|0,b=this.__state.scissorRectangle.y*this.__stage.window.__scale|0,c=
this.__state.scissorRectangle.width*this.__stage.window.__scale|0,d=this.__state.scissorRectangle.height*this.__stage.window.__scale|0);null==this.__state.renderToTexture&&null==this.__stage3D&&(b=(this.__stage.window.__height*this.__stage.window.__scale|0)-(this.__state.scissorRectangle.height|0)-b);if(this.__contextState.scissorRectangle.x!=a||this.__contextState.scissorRectangle.y!=b||this.__contextState.scissorRectangle.width!=c||this.__contextState.scissorRectangle.height!=d)this.gl.scissor(a,
b,c,d),this.__contextState.scissorRectangle.setTo(a,b,c,d)}else this.__contextState.scissorEnabled!=this.__state.scissorEnabled&&(this.__setGLScissorTest(!1),this.__contextState.scissorEnabled=!1)},__flushGLStencil:function(){if(this.__contextState.stencilTriangleFace!=this.__state.stencilTriangleFace||this.__contextState.stencilPass!=this.__state.stencilPass||this.__contextState.stencilDepthFail!=this.__state.stencilDepthFail||this.__contextState.stencilFail!=this.__state.stencilFail)this.gl.stencilOpSeparate(this.__getGLTriangleFace(this.__state.stencilTriangleFace),
this.__getGLStencilAction(this.__state.stencilFail),this.__getGLStencilAction(this.__state.stencilDepthFail),this.__getGLStencilAction(this.__state.stencilPass)),this.__contextState.stencilTriangleFace=this.__state.stencilTriangleFace,this.__contextState.stencilPass=this.__state.stencilPass,this.__contextState.stencilDepthFail=this.__state.stencilDepthFail,this.__contextState.stencilFail=this.__state.stencilFail;this.__contextState.stencilWriteMask!=this.__state.stencilWriteMask&&(this.gl.stencilMask(this.__state.stencilWriteMask),
this.__contextState.stencilWriteMask=this.__state.stencilWriteMask);if(this.__contextState.stencilCompareMode!=this.__state.stencilCompareMode||this.__contextState.stencilReferenceValue!=this.__state.stencilReferenceValue||this.__contextState.stencilReadMask!=this.__state.stencilReadMask)this.gl.stencilFunc(this.__getGLCompareMode(this.__state.stencilCompareMode),this.__state.stencilReferenceValue,this.__state.stencilReadMask),this.__contextState.stencilCompareMode=this.__state.stencilCompareMode,
this.__contextState.stencilReferenceValue=this.__state.stencilReferenceValue,this.__contextState.stencilReadMask=this.__state.stencilReadMask},__flushGLTextures:function(){for(var a=0,b,c,d=0,e=this.__state.textures.length;d<e;){var f=d++;b=this.__state.textures[f];c=this.__state.samplerStates[f];null==c&&(this.__state.samplerStates[f]=new Ng,c=this.__state.samplerStates[f]);this.gl.activeTexture(this.gl.TEXTURE0+a);null!=b?(b.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__getTexture()):
this.__bindGLTextureCubeMap(b.__getTexture()),this.__contextState.textures[f]=b,b.__setSamplerState(c)):this.__bindGLTexture2D(null);null!=this.__state.program&&0==this.__state.program.__format&&c.textureAlpha&&(this.gl.activeTexture(this.gl.TEXTURE0+a+4),null!=b&&null!=b.__alphaTexture?(b.__alphaTexture.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__alphaTexture.__getTexture()):this.__bindGLTextureCubeMap(b.__alphaTexture.__getTexture()),b.__alphaTexture.__setSamplerState(c),this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,
1)):(this.__bindGLTexture2D(null),null!=this.__state.program.__agalAlphaSamplerEnabled[a]&&this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,0)));++a}},__flushGLViewport:function(){if(null==this.__state.renderToTexture)if(this.__stage.context3D==this){var a=this.backBufferWidth,b=this.backBufferHeight;null!=this.__stage3D||this.__backBufferWantsBestResolution||(a=this.backBufferWidth*this.__stage.window.__scale|0,b=this.backBufferHeight*this.__stage.window.__scale|0);var c=
null==this.__stage3D?0:this.__stage3D.get_x()|0,d=this.__stage.window.__height*this.__stage.window.__scale-b-(null==this.__stage3D?0:this.__stage3D.get_y())|0;this.gl.viewport(c,d,a,b)}else this.gl.viewport(0,0,this.backBufferWidth,this.backBufferHeight);else b=a=0,this.__state.renderToTexture instanceof $h?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Wj?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof
Ri&&(b=this.__state.renderToTexture,b=a=b.__size),this.gl.viewport(0,0,a,b)},__getGLBlend:function(a){switch(a){case 0:return this.gl.DST_ALPHA;case 1:return this.gl.DST_COLOR;case 2:return this.gl.ONE;case 3:return this.gl.ONE_MINUS_DST_ALPHA;case 4:return this.gl.ONE_MINUS_DST_COLOR;case 5:return this.gl.ONE_MINUS_SRC_ALPHA;case 6:return this.gl.ONE_MINUS_SRC_COLOR;case 7:return this.gl.SRC_ALPHA;case 8:return this.gl.SRC_COLOR;case 9:return this.gl.ZERO;default:throw new hd;}},__getGLCompareMode:function(a){switch(a){case 0:return this.gl.ALWAYS;
case 1:return this.gl.EQUAL;case 2:return this.gl.GREATER;case 3:return this.gl.GEQUAL;case 4:return this.gl.LESS;case 5:return this.gl.LEQUAL;case 6:return this.gl.NEVER;case 7:return this.gl.NOTEQUAL;default:return this.gl.EQUAL}},__getGLStencilAction:function(a){switch(a){case 0:return this.gl.DECR;case 1:return this.gl.DECR_WRAP;case 2:return this.gl.INCR;case 3:return this.gl.INCR_WRAP;case 4:return this.gl.INVERT;case 5:return this.gl.KEEP;case 6:return this.gl.REPLACE;case 7:return this.gl.ZERO;
default:return this.gl.KEEP}},__getGLTriangleFace:function(a){switch(a){case 0:return this.gl.BACK;case 1:return this.gl.FRONT;case 2:return this.gl.FRONT_AND_BACK;case 3:return this.gl.NONE;default:return this.gl.FRONT_AND_BACK}},__renderStage3D:function(a){var b=a.context3D;if(null!=b&&b!=this&&null!=b.__frontBufferTexture&&a.visible&&0<this.backBufferHeight&&0<this.backBufferWidth){if(null==this.__renderStage3DProgram){var c=new Y;c.assemble(Hr.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=
new Y;d.assemble(Hr.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\nmov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(c.agalcode,d.agalcode)}this.setProgram(this.__renderStage3DProgram);this.setBlendFactors(2,9);this.setColorMask(!0,!0,!0,!0);this.setCulling(3);this.setDepthTest(!1,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,b.__frontBufferTexture);this.setVertexBufferAt(0,a.__vertexBuffer,
0,3);this.setVertexBufferAt(1,a.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,a.__renderTransform,!0);this.drawTriangles(a.__indexBuffer);this.__present=!0}},__setGLBlend:function(a){this.__contextState.__enableGLBlend!=a&&(a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this.__contextState.__enableGLBlend=a)},__setGLBlendEquation:function(a){this.__contextState.__glBlendEquation!=a&&(this.gl.blendEquation(a),this.__contextState.__glBlendEquation=a)},__setGLCullFace:function(a){this.__contextState.__enableGLCullFace!=
a&&(a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this.__contextState.__enableGLCullFace=a)},__setGLDepthTest:function(a){this.__contextState.__enableGLDepthTest!=a&&(a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this.__contextState.__enableGLDepthTest=a)},__setGLFrontFace:function(a){this.__contextState.__frontFaceGLCCW!=a&&(this.gl.frontFace(a?this.gl.CCW:this.gl.CW),this.__contextState.__frontFaceGLCCW=a)},__setGLScissorTest:function(a){this.__contextState.__enableGLScissorTest!=
a&&(a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this.__contextState.__enableGLScissorTest=a)},__setGLStencilTest:function(a){this.__contextState.__enableGLStencilTest!=a&&(a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this.__contextState.__enableGLStencilTest=a)},get_enableErrorChecking:function(){return this.__enableErrorChecking},set_enableErrorChecking:function(a){return this.__enableErrorChecking=a},get_totalGPUMemory:function(){if(-1!=
Ub.__glMemoryCurrentAvailable){var a=this.gl.getParameter(Ub.__glMemoryCurrentAvailable),b=this.gl.getParameter(Ub.__glMemoryTotalAvailable);if(0<b)return 1024*(b-a)}return 0},__class__:Ub,__properties__:{get_totalGPUMemory:"get_totalGPUMemory",set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Gr={fromString:function(a){switch(a){case "dynamicDraw":return 0;case "staticDraw":return 1;default:return null}},toString:function(a){switch(a){case 0:return"dynamicDraw";
case 1:return"staticDraw";default:return null}}},Hr={fromString:function(a){switch(a){case "fragment":return 0;case "vertex":return 1;default:return null}},toString:function(a){switch(a){case 0:return"fragment";case 1:return"vertex";default:return null}}},Xj={fromString:function(a){switch(a){case "bgrPacked565":return 0;case "bgra":return 1;case "bgraPacked4444":return 2;case "compressed":return 3;case "compressedAlpha":return 4;case "rgbaHalfFloat":return 5;default:return null}},toString:function(a){switch(a){case 0:return"bgrPacked565";
case 1:return"bgra";case 2:return"bgraPacked4444";case 3:return"compressed";case 4:return"compressedAlpha";case 5:return"rgbaHalfFloat";default:return null}}},$o=function(a,b,c){this.__context=a;this.__numIndices=b;a=this.__context.gl;this.__id=a.createBuffer();this.__usage=0==c?a.DYNAMIC_DRAW:a.STATIC_DRAW};k["openfl.display3D.IndexBuffer3D"]=$o;$o.__name__="openfl.display3D.IndexBuffer3D";$o.prototype={__context:null,__id:null,__memoryUsage:null,__numIndices:null,__tempUInt16Array:null,__usage:null,
dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=2*c;a=Ab.toArrayBuffer(a);null==b&&(b=0);d=null!=a?null==d?new Uint16Array(a,b):new Uint16Array(a,b,d):null;this.uploadFromTypedArray(d)},uploadFromTypedArray:function(a,b){null!=a&&(b=this.__context.gl,this.__context.__bindGLElementArrayBuffer(this.__id),$b.bufferData(b,b.ELEMENT_ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(null!=a){var d=b+c,e=this.__tempUInt16Array;if(null==
this.__tempUInt16Array||this.__tempUInt16Array.length<c)this.__tempUInt16Array=null!=c?new Uint16Array(c):null,null!=e&&this.__tempUInt16Array.set(e);for(c=b;c<d;)e=c++,this.__tempUInt16Array[e-b]=a.get(e);this.uploadFromTypedArray(this.__tempUInt16Array)}},__class__:$o};var ap=function(a,b){this.__context=a;this.__format=b;0==this.__format?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new Dc,this.__agalSamplerUniforms=new Dc,this.__agalAlphaSamplerUniforms=new Dc,this.__agalAlphaSamplerEnabled=
[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};k["openfl.display3D.Program3D"]=ap;ap.__name__="openfl.display3D.Program3D";ap.prototype={__agalAlphaSamplerEnabled:null,__agalAlphaSamplerUniforms:null,__agalFragmentUniformMap:null,__agalPositionScale:null,__agalSamplerUniforms:null,__agalSamplerUsageMask:null,__agalUniforms:null,__agalVertexUniformMap:null,
__context:null,__format:null,__glFragmentShader:null,__glFragmentSource:null,__glProgram:null,__glslAttribNames:null,__glslAttribTypes:null,__glslSamplerNames:null,__glslUniformLocations:null,__glslUniformNames:null,__glslUniformTypes:null,__glVertexShader:null,__glVertexSource:null,__samplerStates:null,dispose:function(){this.__deleteShaders()},getAttributeIndex:function(a){if(0==this.__format)return R.startsWith(a,"va")?A.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslAttribNames.length;b<
c;){var d=b++;if(this.__glslAttribNames[d]==a)return d}return-1},getConstantIndex:function(a){if(0==this.__format)return R.startsWith(a,"vc")?A.parseInt(a.substring(2)):R.startsWith(a,"fc")?A.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslUniformNames.length;b<c;){var d=b++;if(this.__glslUniformNames[d]==a)return this.__glslUniformLocations[d]}return-1},upload:function(a,b){if(0==this.__format){var c=[];a=Be.convertToGLSL(a,null);b=Be.convertToGLSL(b,c);5==Q.level&&(Q.info(a,{fileName:"openfl/display3D/Program3D.hx",
lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Q.info(b,{fileName:"openfl/display3D/Program3D.hx",lineNumber:400,className:"openfl.display3D.Program3D",methodName:"upload"}));this.__deleteShaders();this.__uploadFromGLSL(a,b);this.__buildAGALUniformList();b=0;for(a=c.length;b<a;){var d=b++;this.__samplerStates[d]=c[d]}}},uploadSources:function(a,b){if(1==this.__format){var c="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+
a,d="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+b;if(c!=this.__glVertexSource||d!=this.__glFragmentSource){this.__processGLSLData(a,"attribute");this.__processGLSLData(a,"uniform");this.__processGLSLData(b,"uniform");this.__deleteShaders();this.__uploadFromGLSL(c,d);var e=this.__glslSamplerNames;d=this.__glslAttribNames;var f=this.__glslAttribTypes;a=this.__glslUniformNames;this.__glslSamplerNames=
[];this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslUniformLocations=[];b=this.__context.gl;for(c=0;c<e.length;){var g=e[c];++c;var h=b.getUniformLocation(this.__glProgram,g);this.__glslSamplerNames[h]=g}c=0;for(e=d.length;c<e;)g=c++,h=b.getAttribLocation(this.__glProgram,d[g]),this.__glslAttribNames[h]=d[g],this.__glslAttribTypes[h]=f[g];c=0;for(e=a.length;c<e;)g=c++,d=b.getUniformLocation(this.__glProgram,a[g]),this.__glslUniformLocations[g]=d}}},__buildAGALUniformList:function(){if(1!=
this.__format){var a=this.__context.gl;this.__agalUniforms.clear();this.__agalSamplerUniforms.clear();this.__agalAlphaSamplerUniforms.clear();this.__agalAlphaSamplerEnabled=[];this.__agalSamplerUsageMask=0;var b=a.getProgramParameter(this.__glProgram,a.ACTIVE_UNIFORMS);for(var c=new Dc,d=new Dc,e=0;e<b;){var f=e++,g=a.getActiveUniform(this.__glProgram,f),h=g.name,m=g.size,l=g.type;g=new bn(this.__context);g.name=h;g.size=m;g.type=l;g.location=a.getUniformLocation(this.__glProgram,g.name);h=g.name.indexOf("[");
0<=h&&(g.name=g.name.substring(0,h));switch(g.type){case 35674:g.regCount=2;break;case 35675:g.regCount=3;break;case 35676:g.regCount=4;break;default:g.regCount=1}g.regCount*=g.size;this.__agalUniforms.add(g);if("vcPositionScale"==g.name)this.__agalPositionScale=g;else if(R.startsWith(g.name,"vc"))g.regIndex=A.parseInt(g.name.substring(2)),g.regData=this.__context.__vertexConstants,c.add(g);else if(R.startsWith(g.name,"fc"))g.regIndex=A.parseInt(g.name.substring(2)),g.regData=this.__context.__fragmentConstants,
d.add(g);else if(R.startsWith(g.name,"sampler")&&-1==g.name.indexOf("alpha"))for(g.regIndex=A.parseInt(g.name.substring(7)),this.__agalSamplerUniforms.add(g),h=0,m=g.regCount;h<m;)l=h++,this.__agalSamplerUsageMask|=1<<g.regIndex+l;else R.startsWith(g.name,"sampler")&&R.endsWith(g.name,"_alpha")?(h=g.name.indexOf("_")-7,g.regIndex=A.parseInt(g.name.substring(7,7+h))+4,this.__agalAlphaSamplerUniforms.add(g)):R.startsWith(g.name,"sampler")&&R.endsWith(g.name,"_alphaEnabled")&&(g.regIndex=A.parseInt(g.name.substring(7)),
this.__agalAlphaSamplerEnabled[g.regIndex]=g);5==Q.level&&Q.verbose(""+f+" name:"+g.name+" type:"+g.type+" size:"+g.size+" location:"+A.string(g.location),{fileName:"openfl/display3D/Program3D.hx",lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new Yj(Uc.array(c));this.__agalFragmentUniformMap=new Yj(Uc.array(d))}},__deleteShaders:function(){var a=this.__context.gl;null!=this.__glProgram&&(this.__glProgram=null);null!=this.__glVertexShader&&
(a.deleteShader(this.__glVertexShader),this.__glVertexShader=null);null!=this.__glFragmentShader&&(a.deleteShader(this.__glFragmentShader),this.__glFragmentShader=null)},__disable:function(){},__enable:function(){var a=this.__context.gl;a.useProgram(this.__glProgram);if(0==this.__format){this.__agalVertexUniformMap.markAllDirty();this.__agalFragmentUniformMap.markAllDirty();for(var b=this.__agalSamplerUniforms.h;null!=b;){var c=b.item;b=b.next;if(1==c.regCount)a.uniform1i(c.location,c.regIndex);else throw new hd("!!! TODO: uniform location on webgl");
}for(b=this.__agalAlphaSamplerUniforms.h;null!=b;)if(c=b.item,b=b.next,1==c.regCount)a.uniform1i(c.location,c.regIndex);else throw new hd("!!! TODO: uniform location on webgl");}},__flush:function(){0==this.__format&&(this.__agalVertexUniformMap.flush(),this.__agalFragmentUniformMap.flush())},__getSamplerState:function(a){return this.__samplerStates[a]},__markDirty:function(a,b,c){1!=this.__format&&(a?this.__agalVertexUniformMap.markDirty(b,c):this.__agalFragmentUniformMap.markDirty(b,c))},__processGLSLData:function(a,
b){var c=0,d;for(d="uniform"==b?new aa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new aa("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var e=d.matched(1);var f=d.matched(2);if(!R.startsWith(f,"gl_")){if(R.startsWith(e,"sampler"))this.__glslSamplerNames.push(f);else{switch(e){case "bool":c=0;break;case "bvec2":c=1;break;case "bvec3":c=2;break;case "bvec4":c=3;break;case "dvec2":case "vec2":c=5;break;case "dvec3":case "vec3":c=6;break;case "double":case "float":c=4;break;case "ivec3":case "uvec3":c=
10;break;case "ivec4":case "uvec4":c=11;break;case "mat2":case "mat2x2":c=12;break;case "mat2x3":c=13;break;case "mat2x4":c=14;break;case "mat3x2":c=15;break;case "mat3":case "mat3x3":c=16;break;case "mat3x4":c=17;break;case "mat4":case "mat4x4":c=20;break;case "mat4x2":c=18;break;case "mat4x3":c=19;break;case "int":case "uint":c=8;break;case "ivec2":case "uvec2":c=9;break;case "dvec4":case "vec4":c=7;break;default:c=null}"uniform"==b?(this.__glslUniformNames.push(f),this.__glslUniformTypes.push(c)):
(this.__glslAttribNames.push(f),this.__glslAttribTypes.push(c))}f=d.matchedPos();c=f.pos+f.len}}},__setPositionScale:function(a){1!=this.__format&&null!=this.__agalPositionScale&&this.__context.gl.uniform4fv(this.__agalPositionScale.location,a)},__setSamplerState:function(a,b){this.__samplerStates[a]=b},__uploadFromGLSL:function(a,b){var c=this.__context.gl;this.__glVertexSource=a;this.__glFragmentSource=b;this.__glVertexShader=c.createShader(c.VERTEX_SHADER);c.shaderSource(this.__glVertexShader,
a);c.compileShader(this.__glVertexShader);if(0==c.getShaderParameter(this.__glVertexShader,c.COMPILE_STATUS)){var d="Error compiling vertex shader\n"+c.getShaderInfoLog(this.__glVertexShader);d+="\n"+a;var e={fileName:"openfl/display3D/Program3D.hx",lineNumber:869,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"};if(xc.throwErrors)throw d="["+e.className+"] ERROR: "+A.string(d),J.thrown(d);Q.error(d,e)}this.__glFragmentShader=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(this.__glFragmentShader,
b);c.compileShader(this.__glFragmentShader);if(0==c.getShaderParameter(this.__glFragmentShader,c.COMPILE_STATUS)){d="Error compiling fragment shader\n"+c.getShaderInfoLog(this.__glFragmentShader);d+="\n"+b;e={fileName:"openfl/display3D/Program3D.hx",lineNumber:881,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"};if(xc.throwErrors)throw d="["+e.className+"] ERROR: "+A.string(d),J.thrown(d);Q.error(d,e)}this.__glProgram=c.createProgram();if(0==this.__format)for(b=0;16>b;)e=b++,
d="va"+e,-1!=a.indexOf(" "+d)&&c.bindAttribLocation(this.__glProgram,e,d);else for(b=0,a=this.__glslAttribNames;b<a.length;)if(d=a[b],++b,-1<d.indexOf("Position")&&R.startsWith(d,"openfl_")){c.bindAttribLocation(this.__glProgram,0,d);break}c.attachShader(this.__glProgram,this.__glVertexShader);c.attachShader(this.__glProgram,this.__glFragmentShader);c.linkProgram(this.__glProgram);if(0==c.getProgramParameter(this.__glProgram,c.LINK_STATUS)){d="Unable to initialize the shader program\n"+c.getProgramInfoLog(this.__glProgram);
e={fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"};if(xc.throwErrors)throw d="["+e.className+"] ERROR: "+A.string(d),J.thrown(d);Q.error(d,e)}},__class__:ap};var bn=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new Uf(null,0)};k["openfl.display3D.Uniform"]=bn;bn.__name__="openfl.display3D.Uniform";bn.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,
context:null,regDataPointer:null,flush:function(){var a=this.context.gl,b=4*this.regIndex;switch(this.type){case 35664:fs.uniform2fv(a,this.location,this.regData.subarray(b,b+2*this.regCount));break;case 35665:var c=this.location;b=this.regData.subarray(b,b+3*this.regCount);var d=null;null!=d?a.uniform3fv(c,b,d,null):a.uniform3fv(c,b);break;case 35666:c=this.location;b=this.regData.subarray(b,b+4*this.regCount);d=null;null!=d?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b);break;case 35674:$b.uniformMatrix2fv(a,
this.location,!1,this.regData.subarray(b,b+4*this.size));break;case 35675:$b.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+9*this.size));break;case 35676:$b.uniformMatrix4fv(a,this.location,!1,this.regData.subarray(b,b+16*this.size));break;default:c=this.location,b=this.regData.subarray(b,b+4*this.regCount),d=null,null!=d?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b)}},__getUniformRegisters:function(a,b){return this.regData.subarray(a,a+b)},__class__:bn};var Yj=function(a){this.__uniforms=
a;this.__uniforms.sort(function(a,b){return X.compare(a.regIndex,b.regIndex)});var b=0;a=0;for(var c=this.__uniforms;a<c.length;){var d=c[a];++a;d.regIndex+d.regCount>b&&(b=d.regIndex+d.regCount)}this.__registerLookup=ub.toObjectVector(null,b);a=0;for(c=this.__uniforms;a<c.length;){d=c[a];++a;b=0;for(var e=d.regCount;b<e;){var f=b++;this.__registerLookup.set(d.regIndex+f,d)}}this.__anyDirty=this.__allDirty=!0};k["openfl.display3D.UniformMap"]=Yj;Yj.__name__="openfl.display3D.UniformMap";Yj.prototype=
{__allDirty:null,__anyDirty:null,__registerLookup:null,__uniforms:null,flush:function(){if(this.__anyDirty){for(var a=0,b=this.__uniforms;a<b.length;){var c=b[a];++a;if(this.__allDirty||c.isDirty)c.flush(),c.isDirty=!1}this.__anyDirty=this.__allDirty=!1}},markAllDirty:function(){this.__anyDirty=this.__allDirty=!0},markDirty:function(a,b){if(!this.__allDirty)for(b=a+b,b>this.__registerLookup.get_length()&&(b=this.__registerLookup.get_length());a<b;){var c=this.__registerLookup.get(a);null!=c?(this.__anyDirty=
c.isDirty=!0,a=c.regIndex+c.regCount):++a}},__class__:Yj};var bp=function(a,b,c,d){this.__context=a;this.__numVertices=b;this.__vertexSize=c;a=this.__context.gl;this.__id=a.createBuffer();this.__stride=4*this.__vertexSize;this.__usage=0==Gr.fromString(d)?a.DYNAMIC_DRAW:a.STATIC_DRAW};k["openfl.display3D.VertexBuffer3D"]=bp;bp.__name__="openfl.display3D.VertexBuffer3D";bp.prototype={__context:null,__data:null,__id:null,__memoryUsage:null,__numVertices:null,__stride:null,__tempFloat32Array:null,__usage:null,
__vertexSize:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*this.__stride;d*=this.__vertexSize;a=Ab.toArrayBuffer(a);null==b&&(b=0);a=null!=a?null==d?new Float32Array(a,b):new Float32Array(a,b,d):null;this.uploadFromTypedArray(Rg.toArrayBufferView(a))},uploadFromTypedArray:function(a,b){null!=a&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),$b.bufferData(b,b.ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,
b,c){if(null!=a){b*=this.__vertexSize;var d=c*this.__vertexSize;c=b+d;var e=this.__tempFloat32Array;if(null==this.__tempFloat32Array||this.__tempFloat32Array.length<d)this.__tempFloat32Array=null!=d?new Float32Array(d):null,null!=e&&this.__tempFloat32Array.set(e);for(d=b;d<c;)e=d++,this.__tempFloat32Array[e-b]=a.get(e);this.uploadFromTypedArray(Rg.toArrayBufferView(this.__tempFloat32Array))}},__class__:bp};var Be=function(){};k["openfl.display3D._internal.AGALConverter"]=Be;Be.__name__="openfl.display3D._internal.AGALConverter";
Be.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==Cg.VERTEX?"vc":"fc";case 2:return b==Cg.VERTEX?"vt":"ft";case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new hd("Invalid data!");}};Be.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new Ua(a,b)};Be.convertToGLSL=function(a,b){a.position=0;a.__endian=1;var c=a.readByte()&255;if(176==c)return a.readUTF();if(160!=c)throw new hd("Magic value must be 0xA0, may not be AGAL");var d=a.readInt();
if(1!=d)throw new hd("Version must be 1");if(161!=(a.readByte()&255))throw new hd("Shader type ID must be 0xA1");c=0==(a.readByte()&255)?Cg.VERTEX:Cg.FRAGMENT;for(var e=new cn,f="";;){d=a.position;if(!ua.gt(Ab.get_length(a),d))break;var g=a.readInt();d=a.readUnsignedInt();var h=Be.readUInt64(a),m=Be.readUInt64(a);d=Si.parse(d,c);h=ai.parse(h,c,d.mask);var l=ai.parse(m,c,d.mask);f+="\t";switch(g){case 0:f+=A.string(d.toGLSL()+" = "+h.toGLSL()+"; // mov");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);
break;case 1:f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" + "+l.toGLSL()+"; // add");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 2:f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" - "+l.toGLSL()+"; // sub");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 3:f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" * "+l.toGLSL()+"; // mul");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 4:f+=A.string(d.toGLSL()+" = "+h.toGLSL()+
" / "+l.toGLSL()+"; // div");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 5:f=-1<h.toGLSL().indexOf(".")?f+A.string(d.toGLSL()+" = 1.0 / "+h.toGLSL()+"; // rcp"):f+A.string(d.toGLSL()+" = vec4(1) / "+h.toGLSL()+"; // rcp");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 6:f+=A.string(d.toGLSL()+" = min("+h.toGLSL()+", "+l.toGLSL()+"); // min");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 7:f+=A.string(d.toGLSL()+" = max("+
h.toGLSL()+", "+l.toGLSL()+"); // max");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 8:f+=A.string(d.toGLSL()+" = fract("+h.toGLSL()+"); // frc");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 9:f+=A.string(d.toGLSL()+" = sqrt("+h.toGLSL()+"); // sqrt");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 10:f+=A.string(d.toGLSL()+" = inversesqrt("+h.toGLSL()+"); // rsq");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 11:f+=A.string(d.toGLSL()+
" = pow("+h.toGLSL()+", "+l.toGLSL()+"); // pow");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 12:f+=A.string(d.toGLSL()+" = log2("+h.toGLSL()+"); // log");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 13:f+=A.string(d.toGLSL()+" = exp2("+h.toGLSL()+"); // exp");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 14:f+=A.string(d.toGLSL()+" = normalize("+h.toGLSL()+"); // normalize");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 15:f+=
A.string(d.toGLSL()+" = sin("+h.toGLSL()+"); // sin");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 16:f+=A.string(d.toGLSL()+" = cos("+h.toGLSL()+"); // cos");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 17:h.sourceMask=l.sourceMask=7;f+=A.string(d.toGLSL()+" = cross(vec3("+h.toGLSL()+"), vec3("+l.toGLSL()+")); // crs");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 18:h.sourceMask=l.sourceMask=7;f+=A.string(d.toGLSL()+" = vec4(dot(vec3("+h.toGLSL()+
"), vec3("+l.toGLSL()+")))"+d.getWriteMask()+"; // dp3");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 19:h.sourceMask=l.sourceMask=15;f+=A.string(d.toGLSL()+" = vec4(dot(vec4("+h.toGLSL()+"), vec4("+l.toGLSL()+")))"+d.getWriteMask()+"; // dp4");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 20:f+=A.string(d.toGLSL()+" = abs("+h.toGLSL()+"); // abs");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 21:f+=A.string(d.toGLSL()+
" = -"+h.toGLSL()+"; // neg");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 22:f+=A.string(d.toGLSL()+" = clamp("+h.toGLSL()+", 0.0, 1.0); // saturate");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);break;case 23:g=e.getRegisterUsage(l);g!=qa.VECTOR_4&&g!=qa.VECTOR_4_ARRAY?(f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" * mat3("+l.toGLSL(!1)+"); // m33"),e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.MATRIX_4_4)):(h.sourceMask=l.sourceMask=7,f+=A.string(d.toGLSL()+" = vec3(dot("+
h.toGLSL(!0)+","+l.toGLSL(!0,0)+"), dot("+h.toGLSL(!0)+","+l.toGLSL(!0,1)+"),dot("+h.toGLSL(!0)+","+l.toGLSL(!0,2)+")); // m33"),e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.VECTOR_4,0),e.addSR(l,qa.VECTOR_4,1),e.addSR(l,qa.VECTOR_4,2));break;case 24:g=e.getRegisterUsage(l);g!=qa.VECTOR_4&&g!=qa.VECTOR_4_ARRAY?(f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" * "+l.toGLSL(!1)+"; // m44"),e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.MATRIX_4_4)):(h.sourceMask=l.sourceMask=15,f+=
A.string(d.toGLSL()+" = vec4(dot("+h.toGLSL(!0)+","+l.toGLSL(!0,0)+"), dot("+h.toGLSL(!0)+","+l.toGLSL(!0,1)+"), dot("+h.toGLSL(!0)+","+l.toGLSL(!0,2)+"), dot("+h.toGLSL(!0)+","+l.toGLSL(!0,3)+")); // m44"),e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.VECTOR_4,0),e.addSR(l,qa.VECTOR_4,1),e.addSR(l,qa.VECTOR_4,2),e.addSR(l,qa.VECTOR_4,3));break;case 25:d.mask&=7;g=e.getRegisterUsage(l);g!=qa.VECTOR_4&&g!=qa.VECTOR_4_ARRAY?(f+=A.string(d.toGLSL()+" = "+h.toGLSL()+" * "+l.toGLSL(!1)+"; // m34"),
e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.MATRIX_4_4)):(h.sourceMask=l.sourceMask=15,f+=A.string(d.toGLSL()+" = vec3(dot("+h.toGLSL(!0)+","+l.toGLSL(!0,0)+"), dot("+h.toGLSL(!0)+","+l.toGLSL(!0,1)+"),dot("+h.toGLSL(!0)+","+l.toGLSL(!0,2)+")); // m34"),e.addDR(d,qa.VECTOR_4),e.addSR(h,qa.VECTOR_4),e.addSR(l,qa.VECTOR_4,0),e.addSR(l,qa.VECTOR_4,1),e.addSR(l,qa.VECTOR_4,2));break;case 39:h.sourceMask=15;f+=A.string("if (any(lessThan("+h.toGLSL()+", vec4(0)))) discard;");e.addSR(h,qa.VECTOR_4);
break;case 40:l=Ti.parse(m,c);switch(l.d){case 0:2==l.t?(h.sourceMask=3,e.addSaR(l,qa.SAMPLER_2D_ALPHA),f+=A.string("if ("+l.toGLSL()+"_alphaEnabled) {\n"),f+=A.string("\t\t"+d.toGLSL()+" = vec4(texture2D("+l.toGLSL()+", "+h.toGLSL()+").xyz, texture2D("+l.toGLSL()+"_alpha, "+h.toGLSL()+").x); // tex + alpha\n"),f+="\t} else {\n",f+=A.string("\t\t"+d.toGLSL()+" = texture2D("+l.toGLSL()+", "+h.toGLSL()+"); // tex\n"),f+="\t}"):(h.sourceMask=3,e.addSaR(l,qa.SAMPLER_2D),f+=A.string(d.toGLSL()+" = texture2D("+
l.toGLSL()+", "+h.toGLSL()+"); // tex"));break;case 1:2==l.t?(h.sourceMask=7,e.addSaR(l,qa.SAMPLER_CUBE_ALPHA),f+=A.string("if ("+l.toGLSL()+"_alphaEnabled) {\n"),f+=A.string("\t\t"+d.toGLSL()+" = vec4(textureCube("+l.toGLSL()+", "+h.toGLSL()+").xyz, textureCube("+l.toGLSL()+"_alpha, "+h.toGLSL()+").x); // tex + alpha\n"),f+="\t} else {\n",f+=A.string("\t\t"+d.toGLSL()+" = textureCube("+l.toGLSL()+", "+h.toGLSL()+"); // tex"),f+="\t}"):(h.sourceMask=7,f+=A.string(d.toGLSL()+" = textureCube("+l.toGLSL()+
", "+h.toGLSL()+"); // tex"),e.addSaR(l,qa.SAMPLER_CUBE))}e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);null!=b&&(b[l.n]=l.toSamplerState());break;case 41:h.sourceMask=l.sourceMask=15;f+=A.string(d.toGLSL()+" = vec4(greaterThanEqual("+h.toGLSL()+", "+l.toGLSL()+"))"+d.getWriteMask()+"; // ste");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 42:h.sourceMask=l.sourceMask=15;f+=A.string(d.toGLSL()+" = vec4(lessThan("+h.toGLSL()+", "+l.toGLSL()+"))"+d.getWriteMask()+"; // slt");
e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 44:h.sourceMask=l.sourceMask=15;f+=A.string(d.toGLSL()+" = vec4(equal("+h.toGLSL()+", "+l.toGLSL()+"))"+d.getWriteMask()+"; // seq");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;case 45:h.sourceMask=l.sourceMask=15;f+=A.string(d.toGLSL()+" = vec4(notEqual("+h.toGLSL()+", "+l.toGLSL()+"))"+d.getWriteMask()+"; // sne");e.addDR(d,qa.VECTOR_4);e.addSR(h,qa.VECTOR_4);e.addSR(l,qa.VECTOR_4);break;
default:throw new hd("Opcode "+g);}f+="\n"}null==Be.limitedProfile&&(d=t.context.getParameter(7938),Be.limitedProfile=-1<d.indexOf("OpenGL ES")||-1<d.indexOf("WebGL"));a=""+A.string("// AGAL "+(c==Cg.VERTEX?"vertex":"fragment")+" shader\n");a=Be.limitedProfile?a+"#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n":a+"#version 120\n";a+=A.string(e.toGLSL(!1));c==Cg.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+A.string(e.toGLSL(!0));
a+=A.string(f);c==Cg.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");return a+"}\n"};var Si=function(){};k["openfl.display3D._internal._AGALConverter.DestRegister"]=Si;Si.__name__="openfl.display3D._internal._AGALConverter.DestRegister";Si.parse=function(a,b){var c=new Si;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};Si.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var a=".";0!=(this.mask&1)&&(a+="x");0!=(this.mask&2)&&(a+="y");0!=(this.mask&
4)&&(a+="z");0!=(this.mask&8)&&(a+="w");return a},toGLSL:function(a){null==a&&(a=!0);var b=3==this.type?this.programType==Cg.VERTEX?"gl_Position":"gl_FragColor":Be.prefixFromType(this.type,this.programType)+this.n;a&&15!=this.mask&&(b+=this.getWriteMask());return b},__class__:Si};var Cg=x["openfl.display3D._internal._AGALConverter.ProgramType"]={__ename__:"openfl.display3D._internal._AGALConverter.ProgramType",__constructs__:null,VERTEX:{_hx_name:"VERTEX",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",
toString:v},FRAGMENT:{_hx_name:"FRAGMENT",_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:v}};Cg.__constructs__=[Cg.VERTEX,Cg.FRAGMENT];var cn=function(){this.mEntries=[]};k["openfl.display3D._internal.RegisterMap"]=cn;cn.__name__="openfl.display3D._internal.RegisterMap";cn.prototype={mEntries:null,add:function(a,b,c,d){for(var e=0,f=this.mEntries;e<f.length;){var g=f[e];++e;if(g.type==a&&g.name==b&&g.number==c){if(g.usage!=d)throw new hd("Cannot use register in multiple ways yet (mat4/vec4)");
return}}g=new cp;g.type=a;g.name=b;g.number=c;g.usage=d;this.mEntries.push(g)},addDR:function(a,b){this.add(a.type,a.toGLSL(!1),a.n,b)},addSaR:function(a,b){this.add(a.type,a.toGLSL(),a.n,b)},addSR:function(a,b,c){null==c&&(c=0);0!=a.d?(this.add(a.itype,Be.prefixFromType(a.itype,a.programType)+a.n,a.n,qa.VECTOR_4),this.add(a.type,Be.prefixFromType(a.type,a.programType)+a.o,a.o,qa.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return 0!=a.d?qa.VECTOR_4_ARRAY:
this.getUsage(a.type,a.toGLSL(!1),a.n)},getUsage:function(a,b,c){for(var d=0,e=this.mEntries;d<e.length;){var f=e[d];++d;if(f.type==a&&f.name==b&&f.number==c)return f.usage}return qa.UNUSED},toGLSL:function(a){this.mEntries.sort(function(a,b){return a.number-b.number});this.mEntries.sort(function(a,b){return U.__cast(a.type,qi)-U.__cast(b.type,qi)});for(var b="",c=0,d=this.mEntries.length;c<d;){var e=c++;e=this.mEntries[e];if(!(a&&2!=e.type||!a&&2==e.type)&&3!=e.type){switch(e.type){case 0:b+="attribute ";
break;case 1:b+="uniform ";break;case 2:b+="\t";break;case 3:break;case 4:b+="varying ";break;case 5:b+="uniform ";break;default:throw new hd;}switch(e.usage._hx_index){case 0:Q.info("Missing switch patten: RegisterUsage.UNUSED",{fileName:"openfl/display3D/_internal/AGALConverter.hx",lineNumber:750,className:"openfl.display3D._internal.RegisterMap",methodName:"toGLSL"});break;case 1:b+="vec4 ";break;case 2:b+="mat4 ";break;case 3:b+="sampler2D ";break;case 5:b+="samplerCube ";break;case 7:b+="vec4 "}e.usage==
qa.SAMPLER_2D_ALPHA?(b+="sampler2D ",b+=A.string(e.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=A.string(e.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=A.string(e.name+"_alphaEnabled")):e.usage==qa.SAMPLER_CUBE_ALPHA?(b+="samplerCube ",b+=A.string(e.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=A.string(e.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=A.string(e.name+"_alphaEnabled")):b=e.usage==qa.VECTOR_4_ARRAY?b+A.string(e.name+"[128]"):b+A.string(e.name);b+=";\n"}}return b},
__class__:cn};var cp=function(){};k["openfl.display3D._internal._AGALConverter.RegisterMapEntry"]=cp;cp.__name__="openfl.display3D._internal._AGALConverter.RegisterMapEntry";cp.prototype={name:null,number:null,type:null,usage:null,__class__:cp};var qa=x["openfl.display3D._internal._AGALConverter.RegisterUsage"]={__ename__:"openfl.display3D._internal._AGALConverter.RegisterUsage",__constructs__:null,UNUSED:{_hx_name:"UNUSED",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",
toString:v},VECTOR_4:{_hx_name:"VECTOR_4",_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v},MATRIX_4_4:{_hx_name:"MATRIX_4_4",_hx_index:2,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v},SAMPLER_2D:{_hx_name:"SAMPLER_2D",_hx_index:3,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v},SAMPLER_2D_ALPHA:{_hx_name:"SAMPLER_2D_ALPHA",_hx_index:4,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",
toString:v},SAMPLER_CUBE:{_hx_name:"SAMPLER_CUBE",_hx_index:5,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v},SAMPLER_CUBE_ALPHA:{_hx_name:"SAMPLER_CUBE_ALPHA",_hx_index:6,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v},VECTOR_4_ARRAY:{_hx_name:"VECTOR_4_ARRAY",_hx_index:7,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:v}};qa.__constructs__=[qa.UNUSED,qa.VECTOR_4,qa.MATRIX_4_4,qa.SAMPLER_2D,qa.SAMPLER_2D_ALPHA,
qa.SAMPLER_CUBE,qa.SAMPLER_CUBE_ALPHA,qa.VECTOR_4_ARRAY];var Ti=function(){};k["openfl.display3D._internal._AGALConverter.SamplerRegister"]=Ti;Ti.__name__="openfl.display3D._internal._AGALConverter.SamplerRegister";Ti.parse=function(a,b){var c=new Ti;c.programType=b;b=60;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;c.f=b;b=56;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-
32);b=b.low&15;c.m=b;b=52;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;c.w=b;b=48;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;c.s=b;b=44;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;c.d=b;b=40;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,
a.high>>b-32);b=b.low&15;c.t=b;b=32;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;c.type=b;b=16;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&255;c.b=b;b=a.low&65535;c.n=b;return c};Ti.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return Be.prefixFromType(this.type,this.programType)+this.n},toSamplerState:function(){switch(this.f){case 0:var a=
5;break;case 1:a=4;break;default:throw new hd;}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new hd;}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new hd;}return new Ng(c,a,b,(this.b<<24>>24)/8,4==(this.s&4),1==(this.s&1),2==this.t)},__class__:Ti};var ai=function(){};k["openfl.display3D._internal._AGALConverter.SourceRegister"]=ai;ai.__name__="openfl.display3D._internal._AGALConverter.SourceRegister";ai.parse=function(a,b,c){var d=new ai;
d.programType=b;b=63;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&1;d.d=b;b=48;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&3;d.q=b;b=40;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&15;d.itype=b;b=32;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>
b-32);b=b.low&15;d.type=b;b=24;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&255;d.s=b;b=16;b=0==b?new Ua(a.high,a.low):32>b?new Ua(a.high>>b,a.high<<32-b|a.low>>>b):new Ua(a.high>>31,a.high>>b-32);b=b.low&255;d.o=b;b=a.low&65535;d.n=b;d.sourceMask=c;return d};ai.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(a,b){null==b&&(b=0);null==a&&(a=!0);if(3==this.type)return this.programType==
Cg.VERTEX?"gl_Position":"gl_FragColor";var c=228==this.s&&15==this.sourceMask,d="";if(5!=this.type&&!c){if(0!=(this.sourceMask&1))switch(this.s&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&2))switch(this.s>>2&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&4))switch(this.s>>4&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&8))switch(this.s>>
6&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}}c=Be.prefixFromType(this.type,this.programType);if(0==this.d)c+=this.n+b;else{c+=this.o;var e="";switch(this.q){case 0:e="x";break;case 1:e="y";break;case 2:e="z";break;case 3:e="w"}e=Be.prefixFromType(this.itype,this.programType)+this.n+"."+e;c+="[ int("+e+") +"+b+"]"}a&&""!=d&&(c+="."+d);return c},__class__:ai};var Zj=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if("ATF"!=c)throw new hd("ATF signature not found");
255==a.b[b+6]?(this.version=a.b[b+7],a.position=b+8,c=this.__readUInt32(a)):(this.version=0,a.position=b+3,c=this.__readUInt24(a));if(ua.gt(U.__cast(b+c,qi),Ab.get_length(a)))throw new hd("ATF length exceeds byte array length");this.data=a};k["openfl.display3D._internal.ATFReader"]=Zj;Zj.__name__="openfl.display3D._internal.ATFReader";Zj.prototype={atfFormat:null,cubeMap:null,data:null,height:null,mipCount:null,version:null,width:null,readHeader:function(a,b,c){var d=this.data.readUnsignedByte(),
e=d>>>7;if(!c&&0!=e)throw new hd("ATF Cube map not expected");if(c&&1!=e)throw new hd("ATF Cube map expected");this.cubeMap=c;this.atfFormat=d&127;3!=this.atfFormat&&5!=this.atfFormat&&Q.warn("Only ATF block compressed textures without JPEG-XR+LZMA are supported",{fileName:"openfl/display3D/_internal/ATFReader.hx",lineNumber:96,className:"openfl.display3D._internal.ATFReader",methodName:"readHeader"});this.width=1<<this.data.readUnsignedByte();this.height=1<<this.data.readUnsignedByte();if(this.width!=
a||this.height!=b)throw new hd("ATF width and height dont match");this.mipCount=this.data.readUnsignedByte();return 5==this.atfFormat},readTextures:function(a){for(var b=3>this.version?3:4,c=0,d=this.cubeMap?6:1;c<d;)for(var e=c++,f=0,g=this.mipCount;f<g;)for(var h=f++,m=0,l=b;m<l;){var n=m++,p=0==this.version?this.__readUInt24(this.data):this.__readUInt32(this.data);if(ua.gt(this.data.position+p,Ab.get_length(this.data)))throw new hd("Block length exceeds ATF file length");if(ua.gt(p,0)){var k=new ib(new ArrayBuffer(p)),
q=this.data,t=Ab.fromBytes(k),v=0,r=p;null==r&&(r=0);null==v&&(v=0);q.readBytes(t,v,r);a(e,h,n,this.width>>h,this.height>>h,p,k)}}},__readUInt24:function(a){var b=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__readUInt32:function(a){var b=a.readUnsignedByte()<<24;b|=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__class__:Zj};var Vj=function(){this.backBufferEnableDepthAndStencil=!1;this.blendDestinationAlphaFactor=9;this.blendSourceAlphaFactor=
2;this.blendDestinationRGBFactor=9;this.blendSourceRGBFactor=2;this.colorMaskAlpha=this.colorMaskBlue=this.colorMaskGreen=this.colorMaskRed=!0;this.culling=3;this.depthCompareMode=4;this.depthMask=!0;this.samplerStates=[];this.scissorRectangle=new fa;this.stencilCompareMode=0;this.stencilPass=this.stencilFail=this.stencilDepthFail=5;this.stencilReadMask=255;this.stencilReferenceValue=0;this.stencilTriangleFace=2;this.stencilWriteMask=255;this.textures=[];this.__frontFaceGLCCW=!0;this.__glBlendEquation=
32774};k["openfl.display3D._internal.Context3DState"]=Vj;Vj.__name__="openfl.display3D._internal.Context3DState";Vj.prototype={backBufferEnableDepthAndStencil:null,blendDestinationAlphaFactor:null,blendSourceAlphaFactor:null,blendDestinationRGBFactor:null,blendSourceRGBFactor:null,colorMaskRed:null,colorMaskGreen:null,colorMaskBlue:null,colorMaskAlpha:null,culling:null,depthCompareMode:null,depthMask:null,program:null,renderToTexture:null,renderToTextureAntiAlias:null,renderToTextureDepthStencil:null,
renderToTextureSurfaceSelector:null,samplerStates:null,scissorEnabled:null,scissorRectangle:null,stencilCompareMode:null,stencilDepthFail:null,stencilFail:null,stencilPass:null,stencilReadMask:null,stencilReferenceValue:null,stencilTriangleFace:null,stencilWriteMask:null,textures:null,shader:null,__currentGLArrayBuffer:null,__currentGLElementArrayBuffer:null,__currentGLFramebuffer:null,__currentGLTexture2D:null,__currentGLTextureCubeMap:null,__enableGLBlend:null,__enableGLCullFace:null,__enableGLDepthTest:null,
__enableGLScissorTest:null,__enableGLStencilTest:null,__frontFaceGLCCW:null,__glBlendEquation:null,__primaryGLFramebuffer:null,__rttDepthGLRenderbuffer:null,__rttGLFramebuffer:null,__rttGLRenderbuffer:null,__rttStencilGLRenderbuffer:null,__class__:Vj};var ac=function(a){za.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=this.__context.__context;if(null==ac.__supportsBGRA){ac.__textureInternalFormat=b.RGBA;ac.__supportsBGRA=!1;ac.__textureFormat=
b.RGBA;ac.__compressedFormats=new Xa;ac.__compressedFormatsAlpha=new Xa;a=b.getExtension("WEBGL_compressed_texture_s3tc");var c=b.getExtension("WEBGL_compressed_texture_etc1");b=b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");if(null!=a){var d=a.COMPRESSED_RGBA_S3TC_DXT1_EXT;ac.__compressedFormats.h[0]=d;d=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;ac.__compressedFormatsAlpha.h[0]=d}null!=c&&(d=c.COMPRESSED_RGB_ETC1_WEBGL,ac.__compressedFormats.h[2]=d,d=c.COMPRESSED_RGB_ETC1_WEBGL,ac.__compressedFormatsAlpha.h[2]=
d);null!=b&&(d=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,ac.__compressedFormats.h[1]=d,d=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,ac.__compressedFormatsAlpha.h[1]=d)}this.__internalFormat=ac.__textureInternalFormat;this.__format=ac.__textureFormat};k["openfl.display3D.textures.TextureBase"]=ac;ac.__name__="openfl.display3D.textures.TextureBase";ac.__super__=za;ac.prototype=u(za.prototype,{__alphaTexture:null,__context:null,__format:null,__glDepthRenderbuffer:null,__glFramebuffer:null,__glStencilRenderbuffer:null,
__height:null,__internalFormat:null,__optimizeForRenderToTexture:null,__samplerState:null,__streamingLevels:null,__textureContext:null,__textureID:null,__textureTarget:null,__width:null,dispose:function(){var a=this.__context.gl;null!=this.__alphaTexture&&(this.__alphaTexture.dispose(),this.__alphaTexture=null);null!=this.__textureID&&(a.deleteTexture(this.__textureID),this.__textureID=null);null!=this.__glFramebuffer&&(a.deleteFramebuffer(this.__glFramebuffer),this.__glFramebuffer=null);null!=this.__glDepthRenderbuffer&&
(a.deleteRenderbuffer(this.__glDepthRenderbuffer),this.__glDepthRenderbuffer=null);null!=this.__glStencilRenderbuffer&&(a.deleteRenderbuffer(this.__glStencilRenderbuffer),this.__glStencilRenderbuffer=null)},__getGLFramebuffer:function(a,b,c){b=this.__context.gl;null==this.__glFramebuffer&&(this.__glFramebuffer=b.createFramebuffer(),this.__context.__bindGLFramebuffer(this.__glFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.__textureID,0),this.__context.__enableErrorChecking&&
(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Q.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:201,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})));a&&null==this.__glDepthRenderbuffer&&(this.__context.__bindGLFramebuffer(this.__glFramebuffer),0!=Ub.__glDepthStencil?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=
b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,Ub.__glDepthStencil,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer)):(this.__glDepthRenderbuffer=b.createRenderbuffer(),this.__glStencilRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,
this.__width,this.__height),b.bindRenderbuffer(b.RENDERBUFFER,this.__glStencilRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.STENCIL_INDEX8,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glStencilRenderbuffer)),this.__context.__enableErrorChecking&&(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Q.warn("Error: Context3D.setRenderToTexture status:"+
c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:239,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})),b.bindRenderbuffer(b.RENDERBUFFER,null));return this.__glFramebuffer},__getImage:function(a){var b=a.image;if(!a.__isValid||null==b)return null;ya.sync(b,!1);a=this.__context.gl;b.type==qe.DATA||b.get_premultiplied()?!b.get_premultiplied()&&b.get_transparent()&&(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
0),b=b.clone(),b.set_premultiplied(!0)):a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);0!=b.get_format()&&(b=b.clone(),b.set_format(0),b.buffer.premultiplied=!0);return b},__getTexture:function(){return this.__textureID},__setSamplerState:function(a){if(!a.equals(this.__samplerState)){var b=this.__context.gl;this.__textureTarget==this.__context.gl.TEXTURE_CUBE_MAP?this.__context.__bindGLTextureCubeMap(this.__textureID):this.__context.__bindGLTexture2D(this.__textureID);var c;switch(a.wrap){case 0:var d=
c=b.CLAMP_TO_EDGE;break;case 1:c=b.CLAMP_TO_EDGE;d=b.REPEAT;break;case 2:d=c=b.REPEAT;break;case 3:c=b.REPEAT;d=b.CLAMP_TO_EDGE;break;default:throw new wc("wrap bad enum");}var e=5==a.filter?b.NEAREST:b.LINEAR;switch(a.mipfilter){case 0:var f=5==a.filter?b.NEAREST_MIPMAP_LINEAR:b.LINEAR_MIPMAP_LINEAR;break;case 1:f=5==a.filter?b.NEAREST_MIPMAP_NEAREST:b.LINEAR_MIPMAP_NEAREST;break;case 2:f=5==a.filter?b.NEAREST:b.LINEAR;break;default:throw new wc("mipfiter bad enum");}b.texParameteri(this.__textureTarget,
b.TEXTURE_MIN_FILTER,f);b.texParameteri(this.__textureTarget,b.TEXTURE_MAG_FILTER,e);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_S,c);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_T,d);null==this.__samplerState&&(this.__samplerState=a.clone());this.__samplerState.copyFrom(a);return!0}return!1},__uploadFromImage:function(a){var b=this.__context.gl,c;if(this.__textureTarget==b.TEXTURE_2D){if(1==a.buffer.bitsPerPixel)var d=c=b.ALPHA;else c=ac.__textureInternalFormat,d=ac.__textureFormat;
this.__context.__bindGLTexture2D(this.__textureID);a.type==qe.DATA||a.get_premultiplied()?!a.get_premultiplied()&&a.get_transparent()&&b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1):b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);a.type==qe.DATA?$b.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):$b.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:ac});var Ri=function(a,b,c,d,e){ac.call(this,
a);this.__width=this.__height=this.__size=b;this.__optimizeForRenderToTexture=d;this.__streamingLevels=e;this.__textureTarget=this.__context.gl.TEXTURE_CUBE_MAP;this.__uploadedSides=0};k["openfl.display3D.textures.CubeTexture"]=Ri;Ri.__name__="openfl.display3D.textures.CubeTexture";Ri.__super__=ac;Ri.prototype=u(ac.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?Oe.delay(function(){d.__uploadCompressedTextureFromByteArray(a,
b);var c=new la("textureReady");d.dispatchEvent(c)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c,d){null==c&&(c=0);if(null!=a&&(d=this.__size>>c,0!=d&&(a=this.__getImage(a),null!=a)))if(0==c&&null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){var e=this.__context.gl;d=this.__size>>c;0!=d&&(d=this.__sideToTarget(b),this.__context.__bindGLTextureCubeMap(this.__textureID),$b.texImage2D(e,d,c,this.__internalFormat,this.__format,e.UNSIGNED_BYTE,a.buffer.get_src()),
this.__context.__bindGLTextureCubeMap(null),this.__uploadedSides|=1<<b)}else this.uploadFromTypedArray(a.get_data(),b,c)},uploadFromByteArray:function(a,b,c,d){null==d&&(d=0);0==b?this.uploadFromTypedArray(a.b,c,d):(a=Ab.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c,d))},uploadFromTypedArray:function(a,b,c){null==c&&(c=0);if(null!=a){var d=this.__context.gl,e=this.__size>>c;if(0!=e){var f=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);
$b.texImage2D(d,f,c,this.__internalFormat,e,e,0,this.__format,d.UNSIGNED_BYTE,a);this.__context.__bindGLTextureCubeMap(null);this.__uploadedSides|=1<<b}}},__getGLFramebuffer:function(a,b,c){var d=this.__context.gl;null==this.__glFramebuffer&&(this.__glFramebuffer=d.createFramebuffer(),this.__framebufferSurface=-1);if(this.__framebufferSurface!=c&&(this.__framebufferSurface=c,this.__context.__bindGLFramebuffer(this.__glFramebuffer),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+
c,this.__textureID,0),this.__context.__enableErrorChecking)){var e=d.checkFramebufferStatus(d.FRAMEBUFFER);if(e!=d.FRAMEBUFFER_COMPLETE){d="Error: Context3D.setRenderToTexture status:"+e+" width:"+this.__width+" height:"+this.__height;e={fileName:"openfl/display3D/textures/CubeTexture.hx",lineNumber:279,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"};if(xc.throwErrors)throw a="["+e.className+"] ERROR: "+A.string(d),J.thrown(a);Q.error(d,e)}}return ac.prototype.__getGLFramebuffer.call(this,
a,b,c)},__setSamplerState:function(a){if(ac.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;2==a.mipfilter||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_CUBE_MAP),this.__samplerState.mipmapGenerated=!0);if(0!=Ub.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Ub.__glMaxTextureMaxAnisotropy&&(a=Ub.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,Ub.__glTextureMaxAnisotropy,
a)}return!0}return!1},__sideToTarget:function(a){var b=this.__context.gl;switch(a){case 0:return b.TEXTURE_CUBE_MAP_POSITIVE_X;case 1:return b.TEXTURE_CUBE_MAP_NEGATIVE_X;case 2:return b.TEXTURE_CUBE_MAP_POSITIVE_Y;case 3:return b.TEXTURE_CUBE_MAP_NEGATIVE_Y;case 4:return b.TEXTURE_CUBE_MAP_POSITIVE_Z;case 5:return b.TEXTURE_CUBE_MAP_NEGATIVE_Z;default:throw new hd;}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Zj(a,b);var d=a.readHeader(this.__size,this.__size,!0),e=this.__context.gl;
this.__context.__bindGLTextureCubeMap(this.__textureID);var f=!1;a.readTextures(function(a,b,g,h,l,m,n){var p=d?ac.__compressedFormatsAlpha.h[g]:ac.__compressedFormats.h[g];if(0!=p)if(f=!0,a=c.__sideToTarget(a),c.__format=p,c.__internalFormat=p,d&&2==g){m=m/2|0;var k=g=null,q=null,t=null,v=n.b.buffer,r=0;null==r&&(r=0);g=null!=g?new Uint8Array(g):null!=k?new Uint8Array(k):null!=q?new Uint8Array(q.__array):null!=t?new Uint8Array(t):null!=v?null==m?new Uint8Array(v,r):new Uint8Array(v,r,m):null;$b.compressedTexImage2D(e,
a,b,c.__internalFormat,h,l,0,g);var u=new Ri(c.__context,c.__size,3,c.__optimizeForRenderToTexture,c.__streamingLevels);u.__format=p;u.__internalFormat=p;c.__context.__bindGLTextureCubeMap(u.__textureID);t=q=k=g=null;v=n.b.buffer;r=m;null==r&&(r=0);g=null!=g?new Uint8Array(g):null!=k?new Uint8Array(k):null!=q?new Uint8Array(q.__array):null!=t?new Uint8Array(t):null!=v?null==m?new Uint8Array(v,r):new Uint8Array(v,r,m):null;$b.compressedTexImage2D(e,a,b,u.__internalFormat,h,l,0,g);c.__alphaTexture=
u}else t=q=k=g=null,v=n.b.buffer,r=0,null==r&&(r=0),g=null!=g?new Uint8Array(g):null!=k?new Uint8Array(k):null!=q?new Uint8Array(q.__array):null!=t?new Uint8Array(t):null!=v?null==m?new Uint8Array(v,r):new Uint8Array(v,r,m):null,$b.compressedTexImage2D(e,a,b,c.__internalFormat,h,l,0,g)});if(!f){a=this.__size*this.__size*4;var g=b=null,h=null,m=null,l=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?new Uint8Array(m,
0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(0),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;l=m=h=g=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?new Uint8Array(m,0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(1),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a);a=this.__size*
this.__size*4;l=m=h=g=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?new Uint8Array(m,0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(2),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;l=m=h=g=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?
new Uint8Array(m,0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(3),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;l=m=h=g=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?new Uint8Array(m,0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(4),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,
a);a=this.__size*this.__size*4;l=m=h=g=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=g?new Uint8Array(g.__array):null!=h?new Uint8Array(h):null!=m?null==l?new Uint8Array(m,0):new Uint8Array(m,0,l):null;$b.texImage2D(e,this.__sideToTarget(5),0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a)}this.__context.__bindGLTextureCubeMap(null)},__class__:Ri});var Wj=function(a,b,c,d,e){ac.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=
e;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);e&&this.__getGLFramebuffer(!0,0,0)};k["openfl.display3D.textures.RectangleTexture"]=Wj;Wj.__name__="openfl.display3D.textures.RectangleTexture";Wj.__super__=ac;Wj.prototype=u(ac.prototype,{uploadFromBitmapData:function(a){if(null!=a&&(a=this.__getImage(a),null!=a))if(null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);$b.texImage2D(b,
this.__textureTarget,0,this.__internalFormat,this.__format,b.UNSIGNED_BYTE,a.buffer.get_src());this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data())},uploadFromByteArray:function(a,b){0==b?this.uploadFromTypedArray(a.b):(a=Ab.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b))},uploadFromTypedArray:function(a){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);$b.texImage2D(b,this.__textureTarget,0,
this.__internalFormat,this.__width,this.__height,0,this.__format,b.UNSIGNED_BYTE,a);this.__context.__bindGLTexture2D(null)},__setSamplerState:function(a){if(ac.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if(0!=Ub.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Ub.__glMaxTextureMaxAnisotropy&&(a=Ub.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Ub.__glTextureMaxAnisotropy,a)}return!0}return!1},
__class__:Wj});var $h=function(a,b,c,d,e,f){ac.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=e;this.__streamingLevels=f;a=this.__context.gl;this.__textureTarget=a.TEXTURE_2D;this.__context.__bindGLTexture2D(this.__textureID);$b.texImage2D(a,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,a.UNSIGNED_BYTE,null);this.__context.__bindGLTexture2D(null);e&&this.__getGLFramebuffer(!0,0,0)};k["openfl.display3D.textures.Texture"]=$h;$h.__name__=
"openfl.display3D.textures.Texture";$h.__super__=ac;$h.prototype=u(ac.prototype,{uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?Oe.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var c=new la("textureReady");d.dispatchEvent(c)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c){null==b&&(b=0);if(null!=a){c=this.__width>>b;var d=this.__height>>b;if(0!=c||0!=d){0==c&&(c=1);0==d&&(d=1);if(a.width!=c||a.height!=d)c=
new La(c,d,!0,0),c.draw(a),a=c;a=this.__getImage(a);if(null!=a)if(0==b&&null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){var e=this.__context.gl;c=this.__width>>b;d=this.__height>>b;if(0!=c||0!=d)this.__context.__bindGLTexture2D(this.__textureID),$b.texImage2D(e,this.__textureTarget,b,this.__internalFormat,this.__format,e.UNSIGNED_BYTE,a.buffer.get_src()),this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data(),b)}}},uploadFromByteArray:function(a,b,c){null==
c&&(c=0);0==b?this.uploadFromTypedArray(a.b,c):(a=Ab.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c))},uploadFromTypedArray:function(a,b){null==b&&(b=0);if(null!=a){var c=this.__context.gl,d=this.__width>>b,e=this.__height>>b;if(0!=d||0!=e)0==d&&(d=1),0==e&&(e=1),this.__context.__bindGLTexture2D(this.__textureID),$b.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,e,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},
__setSamplerState:function(a){if(ac.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;2==a.mipfilter||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_2D),this.__samplerState.mipmapGenerated=!0);if(0!=Ub.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Ub.__glMaxTextureMaxAnisotropy&&(a=Ub.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Ub.__glTextureMaxAnisotropy,a)}return!0}return!1},
__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Zj(a,b);var d=a.readHeader(this.__width,this.__height,!1),e=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);var f=!1;a.readTextures(function(a,b,m,l,n,p,k){a=d?ac.__compressedFormatsAlpha.h[m]:ac.__compressedFormats.h[m];if(0!=a)if(f=!0,c.__format=a,c.__internalFormat=a,d&&2==m){p=p/2|0;var g=m=null,h=null,q=null,t=k.b.buffer,v=0;null==v&&(v=0);m=null!=m?new Uint8Array(m):null!=g?new Uint8Array(g):null!=h?new Uint8Array(h.__array):
null!=q?new Uint8Array(q):null!=t?null==p?new Uint8Array(t,v):new Uint8Array(t,v,p):null;$b.compressedTexImage2D(e,c.__textureTarget,b,c.__internalFormat,l,n,0,m);var r=new $h(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);r.__format=a;r.__internalFormat=a;c.__context.__bindGLTexture2D(r.__textureID);q=h=g=m=null;t=k.b.buffer;v=p;null==v&&(v=0);m=null!=m?new Uint8Array(m):null!=g?new Uint8Array(g):null!=h?new Uint8Array(h.__array):null!=q?new Uint8Array(q):
null!=t?null==p?new Uint8Array(t,v):new Uint8Array(t,v,p):null;$b.compressedTexImage2D(e,r.__textureTarget,b,r.__internalFormat,l,n,0,m);c.__alphaTexture=r}else q=h=g=m=null,t=k.b.buffer,v=0,null==v&&(v=0),m=null!=m?new Uint8Array(m):null!=g?new Uint8Array(g):null!=h?new Uint8Array(h.__array):null!=q?new Uint8Array(q):null!=t?null==p?new Uint8Array(t,v):new Uint8Array(t,v,p):null,$b.compressedTexImage2D(e,c.__textureTarget,b,c.__internalFormat,l,n,0,m)});f||(a=this.__width*this.__height*4,a=null!=
a?new Uint8Array(a):null,$b.texImage2D(e,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,e.UNSIGNED_BYTE,a));this.__context.__bindGLTexture2D(null)},__class__:$h});var an=function(a){ac.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};k["openfl.display3D.textures.VideoTexture"]=an;an.__name__="openfl.display3D.textures.VideoTexture";an.__super__=ac;an.prototype=u(ac.prototype,{videoHeight:null,videoWidth:null,__cacheTime:null,__netStream:null,
attachNetStream:function(a){var b=this;null!=this.__netStream&&this.__netStream.__video.removeEventListener("canplay",r(this,this.__onCanPlay),!1);this.__cacheTime=-1;this.__netStream=a;null!=this.__netStream&&(2<=this.__netStream.__video.readyState?Oe.delay(function(){b.__textureReady()},0):this.__netStream.__video.addEventListener("canplay",r(this,this.__onCanPlay),!1))},dispose:function(){null!=this.__netStream&&null!=this.__netStream.__video&&this.__netStream.__video.removeEventListener("timeupdate",
r(this,this.__onTimeUpdate));ac.prototype.dispose.call(this)},__onCanPlay:function(a){this.__netStream.__video.addEventListener("timeupdate",r(this,this.__onTimeUpdate));this.__textureReady()},__onTimeUpdate:function(a){null!=this.__netStream&&this.__netStream.__video.currentTime!=this.__cacheTime&&2<=this.__netStream.__video.readyState&&this.__textureReady()},__getTexture:function(){if(this.__netStream.__video.currentTime!=this.__cacheTime&&2<=this.__netStream.__video.readyState){var a=this.__context.gl;
this.__context.__bindGLTexture2D(this.__textureID);$b.texImage2D(a,a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.__netStream.__video);this.__cacheTime=this.__netStream.__video.currentTime}return this.__textureID},__textureReady:function(){this.videoWidth=this.__netStream.__video.videoWidth;this.videoHeight=this.__netStream.__video.videoHeight;var a=new la("textureReady");this.dispatchEvent(a)},__class__:an});var wc=function(a,b){null==b&&(b=0);null==a&&(a="");J.call(this,a);this.errorID=b;this.name=
"Error";this.__skipStack++};k["openfl.errors.Error"]=wc;wc.__name__="openfl.errors.Error";wc.__super__=J;wc.prototype=u(J.prototype,{errorID:null,name:null,getStackTrace:function(){return jc.toString(jc.exceptionStack())},toString:function(){return null!=this.get_message()?this.get_message():"Error"},__class__:wc});var hi=function(a){null==a&&(a="");wc.call(this,a);this.name="ArgumentError";this.__skipStack++};k["openfl.errors.ArgumentError"]=hi;hi.__name__="openfl.errors.ArgumentError";hi.__super__=
wc;hi.prototype=u(wc.prototype,{__class__:hi});var Ui=function(a){null==a&&(a="");wc.call(this,a);this.name="IOError";this.__skipStack++};k["openfl.errors.IOError"]=Ui;Ui.__name__="openfl.errors.IOError";Ui.__super__=wc;Ui.prototype=u(wc.prototype,{__class__:Ui});var $g=function(a,b){Ui.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030;this.__skipStack++};k["openfl.errors.EOFError"]=$g;$g.__name__="openfl.errors.EOFError";$g.__super__=Ui;$g.prototype=u(Ui.prototype,{__class__:$g});
var hd=function(a){null==a&&(a="");wc.call(this,a,0);this.name="IllegalOperationError";this.__skipStack++};k["openfl.errors.IllegalOperationError"]=hd;hd.__name__="openfl.errors.IllegalOperationError";hd.__super__=wc;hd.prototype=u(wc.prototype,{__class__:hd});var Bh=function(a){null==a&&(a="");wc.call(this,a,0);this.name="RangeError";this.__skipStack++};k["openfl.errors.RangeError"]=Bh;Bh.__name__="openfl.errors.RangeError";Bh.__super__=wc;Bh.prototype=u(wc.prototype,{__class__:Bh});var dp=function(a){null==
a&&(a="");wc.call(this,a,0);this.name="SecurityError";this.__skipStack++};k["openfl.errors.SecurityError"]=dp;dp.__name__="openfl.errors.SecurityError";dp.__super__=wc;dp.prototype=u(wc.prototype,{__class__:dp});var Ah=function(a){null==a&&(a="");wc.call(this,a,0);this.name="TypeError";this.__skipStack++};k["openfl.errors.TypeError"]=Ah;Ah.__name__="openfl.errors.TypeError";Ah.__super__=wc;Ah.prototype=u(wc.prototype,{__class__:Ah});var ah=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&
(b=!1);la.call(this,a,b,c);this.activating=d};k["openfl.events.ActivityEvent"]=ah;ah.__name__="openfl.events.ActivityEvent";ah.__super__=la;ah.prototype=u(la.prototype,{activating:null,clone:function(){var a=new ah(this.type,this.bubbles,this.cancelable,this.activating);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"])},__init:function(){la.prototype.__init.call(this);
this.activating=!1},__class__:ah});var cf=function(a,b,c,d){null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);la.call(this,a,b,c);this.text=d};k["openfl.events.TextEvent"]=cf;cf.__name__="openfl.events.TextEvent";cf.__super__=la;cf.prototype=u(la.prototype,{text:null,clone:function(){var a=new cf(this.type,this.bubbles,this.cancelable,this.text);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TextEvent",
["type","bubbles","cancelable","text"])},__init:function(){la.prototype.__init.call(this);this.text=""},__class__:cf});var te=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);cf.call(this,a,b,c,d);this.errorID=e};k["openfl.events.ErrorEvent"]=te;te.__name__="openfl.events.ErrorEvent";te.__super__=cf;te.prototype=u(cf.prototype,{errorID:null,clone:function(){var a=new te(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=
this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ErrorEvent",["type","bubbles","cancelable","text","errorID"])},__init:function(){cf.prototype.__init.call(this);this.errorID=0},__class__:te});var gj=function(a){this.active=!1;this.reset(a)};k["openfl.events._EventDispatcher.DispatchIterator"]=gj;gj.__name__="openfl.events._EventDispatcher.DispatchIterator";gj.prototype={active:null,index:null,isCopy:null,list:null,copy:function(){this.isCopy||
(this.list=this.list.slice(),this.isCopy=!0)},hasNext:function(){return this.index<this.list.length},next:function(){return this.list[this.index++]},remove:function(a,b){if(this.active)if(this.isCopy){b=this.index;for(var c=this.list.length;b<c;){var d=b++;if(this.list[d]==a){this.list.splice(d,1);break}}}else b<this.index&&this.index--},reset:function(a){this.list=a;this.isCopy=!1;this.index=0},start:function(){this.active=!0},stop:function(){this.active=!1},__class__:gj};var fj=function(a,b,c){this.callback=
a;this.useCapture=b;this.priority=c};k["openfl.events._EventDispatcher.Listener"]=fj;fj.__name__="openfl.events._EventDispatcher.Listener";fj.prototype={callback:null,priority:null,useCapture:null,match:function(a,b){return X.compareMethods(this.callback,a)?this.useCapture==b:!1},__class__:fj};var Yf=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!1);null==c&&(c=!1);null==b&&(b=!1);la.call(this,a,b,c);this.keyCode=f;this.shiftKey=e;this.relatedObject=d};k["openfl.events.FocusEvent"]=Yf;Yf.__name__=
"openfl.events.FocusEvent";Yf.__super__=la;Yf.prototype=u(la.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new Yf(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FocusEvent","type bubbles cancelable relatedObject shiftKey keyCode".split(" "))},__init:function(){la.prototype.__init.call(this);
this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:Yf});var Zg=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);ah.call(this,a,b,c);this.fullScreen=d;this.interactive=e};k["openfl.events.FullScreenEvent"]=Zg;Zg.__name__="openfl.events.FullScreenEvent";Zg.__super__=ah;Zg.prototype=u(ah.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new Zg(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);a.target=this.target;
a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"])},__init:function(){ah.prototype.__init.call(this);this.interactive=this.fullScreen=!1},__class__:Zg});var Dg=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!0);la.call(this,a,b,c);this.device=d};k["openfl.events.GameInputEvent"]=Dg;Dg.__name__="openfl.events.GameInputEvent";Dg.__super__=la;Dg.prototype=
u(la.prototype,{device:null,clone:function(){var a=new Dg(this.type,this.bubbles,this.cancelable,this.device);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("GameInputEvent",["type","bubbles","cancelable","device"])},__init:function(){la.prototype.__init.call(this);this.device=null},__class__:Dg});var bi=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);this.status=d;this.redirected=
e;la.call(this,a,b,c)};k["openfl.events.HTTPStatusEvent"]=bi;bi.__name__="openfl.events.HTTPStatusEvent";bi.__super__=la;bi.prototype=u(la.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,clone:function(){var a=new bi(this.type,this.bubbles,this.cancelable,this.status,this.redirected);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable",
"status","redirected"])},__init:function(){la.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:bi});var lg=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!0);te.call(this,a,b,c,d,e)};k["openfl.events.IOErrorEvent"]=lg;lg.__name__="openfl.events.IOErrorEvent";lg.__super__=te;lg.prototype=u(te.prototype,{clone:function(){var a=new lg(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:lg});var Wh=function(a,b,c,d,e,f,g,h,m,l,n){null==n&&(n=!1);null==l&&(l=!1);null==m&&(m=!1);null==h&&(h=!1);null==g&&(g=!1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);la.call(this,a,b,c);this.charCode=d;this.keyCode=e;this.keyLocation=null!=f?f:0;this.ctrlKey=g;this.altKey=h;this.shiftKey=m;this.controlKey=l;this.commandKey=
n};k["openfl.events.KeyboardEvent"]=Wh;Wh.__name__="openfl.events.KeyboardEvent";Wh.__super__=la;Wh.prototype=u(la.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,clone:function(){var a=new Wh(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;
return a},toString:function(){return this.__formatToString("KeyboardEvent","type bubbles cancelable charCode keyCode keyLocation ctrlKey altKey shiftKey".split(" "))},__init:function(){la.prototype.__init.call(this);this.keyLocation=this.keyCode=this.charCode=0;this.commandKey=this.controlKey=this.shiftKey=this.altKey=this.ctrlKey=!1},__class__:Wh});var Kb=function(a,b,c,d,e,f,g,h,m,l,n,p,k){null==k&&(k=0);null==p&&(p=!1);null==n&&(n=0);null==l&&(l=!1);null==m&&(m=!1);null==h&&(h=!1);null==g&&(g=
!1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);la.call(this,a,b,c);this.shiftKey=m;this.altKey=h;this.ctrlKey=g;this.bubbles=b;this.relatedObject=f;this.delta=n;this.localX=d;this.localY=e;this.buttonDown=l;this.commandKey=p;this.clickCount=k;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN};k["openfl.events.MouseEvent"]=Kb;Kb.__name__="openfl.events.MouseEvent";Kb.__create=function(a,b,c,d,e,f,g){null==g&&(g=0);a=new Kb(a,!0,!1,e.x,e.y,null,Kb.__ctrlKey,Kb.__altKey,
Kb.__shiftKey,Kb.__buttonDown,g,Kb.__commandKey);a.stageX=c;a.stageY=d;a.target=f;return a};Kb.__super__=la;Kb.prototype=u(la.prototype,{altKey:null,buttonDown:null,commandKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,clone:function(){var a=new Kb(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,
this.delta,this.commandKey,this.clickCount);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("MouseEvent","type bubbles cancelable localX localY relatedObject ctrlKey altKey shiftKey buttonDown delta".split(" "))},updateAfterEvent:function(){},__init:function(){la.prototype.__init.call(this);this.bubbles=this.ctrlKey=this.altKey=this.shiftKey=!1;this.relatedObject=null;this.localY=this.localX=this.delta=
0;this.commandKey=this.buttonDown=!1;this.clickCount=0;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN},__class__:Kb});var ci=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!1);this.info=d;la.call(this,a,b,c)};k["openfl.events.NetStatusEvent"]=ci;ci.__name__="openfl.events.NetStatusEvent";ci.__super__=la;ci.prototype=u(la.prototype,{info:null,clone:function(){var a=new ci(this.type,this.bubbles,this.cancelable,this.info);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=
this.eventPhase;return a},toString:function(){return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"])},__init:function(){la.prototype.__init.call(this);this.info=null},__class__:ci});var Bg=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);la.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=e};k["openfl.events.ProgressEvent"]=Bg;Bg.__name__="openfl.events.ProgressEvent";Bg.__super__=la;Bg.prototype=u(la.prototype,{bytesLoaded:null,bytesTotal:null,
clone:function(){var a=new Bg(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"])},__init:function(){la.prototype.__init.call(this);this.bytesTotal=this.bytesLoaded=0},__class__:Bg});var pg=function(a,b,c,d,e,f){null==f&&(f=!0);null==c&&(c=!1);null==b&&(b=!1);
la.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=e;this.allowSmoothing=f};k["openfl.events.RenderEvent"]=pg;pg.__name__="openfl.events.RenderEvent";pg.__super__=la;pg.prototype=u(la.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,clone:function(){var a=new pg(this.type,this.bubbles,this.cancelable,this.objectMatrix.clone(),this.objectColorTransform.__clone(),this.allowSmoothing);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=
this.eventPhase;return a},toString:function(){return this.__formatToString("RenderEvent",["type","bubbles","cancelable"])},__init:function(){la.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:pg});var Vi=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);te.call(this,a,b,c,d,e)};k["openfl.events.SecurityErrorEvent"]=Vi;Vi.__name__="openfl.events.SecurityErrorEvent";Vi.__super__=te;Vi.prototype=
u(te.prototype,{clone:function(){var a=new Vi(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:Vi});var Td=function(a,b,c,d,e,f,g,h,m,l,n,p,k,q,t,v,r,u,x,C){null==v&&(v=!1);null==t&&(t=!1);null==q&&(q=!1);null==k&&(k=!1);null==p&&(p=!1);null==l&&(l=0);null==m&&
(m=0);null==h&&(h=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);la.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=e;this.localX=f;this.localY=g;this.sizeX=h;this.sizeY=m;this.pressure=l;this.relatedObject=n;this.ctrlKey=p;this.altKey=k;this.shiftKey=q;this.commandKey=t;this.controlKey=v;this.stageY=this.stageX=NaN};k["openfl.events.TouchEvent"]=Td;Td.__name__="openfl.events.TouchEvent";Td.__create=function(a,b,c,d,e,f){a=new Td(a,!0,
!1,0,!0,e.x,e.y,1,1,1);a.stageX=c;a.stageY=d;a.target=f;return a};Td.__super__=la;Td.prototype=u(la.prototype,{altKey:null,commandKey:null,controlKey:null,ctrlKey:null,delta:null,isPrimaryTouchPoint:null,localX:null,localY:null,pressure:null,relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,clone:function(){var a=new Td(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,
this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TouchEvent","type bubbles cancelable touchPointID isPrimaryTouchPoint localX localY sizeX sizeY pressure relatedObject ctrlKey altKey shiftKey commandKey controlKey".split(" "))},updateAfterEvent:function(){},__init:function(){la.prototype.__init.call(this);this.touchPointID=
0;this.isPrimaryTouchPoint=!1;this.pressure=this.sizeY=this.sizeX=this.localY=this.localX=0;this.relatedObject=null;this.controlKey=this.commandKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.stageY=this.stageX=NaN},__class__:Td});var Oi=function(a,b,c,d){null==c&&(c=!0);null==b&&(b=!0);te.call(this,a,b,c);this.error=d};k["openfl.events.UncaughtErrorEvent"]=Oi;Oi.__name__="openfl.events.UncaughtErrorEvent";Oi.__super__=te;Oi.prototype=u(te.prototype,{error:null,clone:function(){var a=new Oi(this.type,
this.bubbles,this.cancelable,this.error);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("UncaughtErrorEvent",["type","bubbles","cancelable","error"])},__init:function(){te.prototype.__init.call(this);this.error=null},__class__:Oi});var Pm=function(){za.call(this)};k["openfl.events.UncaughtErrorEvents"]=Pm;Pm.__name__="openfl.events.UncaughtErrorEvents";Pm.__super__=za;Pm.prototype=u(za.prototype,{__enabled:null,
addEventListener:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);za.prototype.addEventListener.call(this,a,b,c,d,e);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")&&(this.__enabled=!0)},removeEventListener:function(a,b,c){null==c&&(c=!1);za.prototype.removeEventListener.call(this,a,b,c);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")||(this.__enabled=!1)},__class__:Pm});var Wi=function(){this.__leftExtension=this.__bottomExtension=
0;this.__needSecondBitmapData=!0;this.__numShaderPasses=0;this.__preserveObject=!1;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=!0};k["openfl.filters.BitmapFilter"]=Wi;Wi.__name__="openfl.filters.BitmapFilter";Wi.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,__shaderBlendMode:null,__smooth:null,__topExtension:null,clone:function(){return new Wi},
__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:Wi};var Xi=function(a){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t}");null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
xe.call(this,a);this.__isGenerated=!0;this.__initGL()};k["openfl.filters.BitmapFilterShader"]=Xi;Xi.__name__="openfl.filters.BitmapFilterShader";Xi.__super__=xe;Xi.prototype=u(xe.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Xi});var ak=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t\tif (color.a == 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t} else {\n\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a, color.a);\n\n\t\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\n\t\t}");Xi.call(this);this.uMultipliers.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this.uOffsets.value=[0,0,0,0];this.__isGenerated=
!0;this.__initGL()};k["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=ak;ak.__name__="openfl.filters._ColorMatrixFilter.ColorMatrixShader";ak.__super__=Xi;ak.prototype=u(Xi.prototype,{init:function(a){var b=this.uMultipliers.value,c=this.uOffsets.value;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[5];b[5]=a[6];b[6]=a[7];b[7]=a[8];b[8]=a[10];b[9]=a[11];b[10]=a[12];b[11]=a[13];b[12]=a[15];b[13]=a[16];b[14]=a[17];b[15]=a[18];c[0]=a[4]/255;c[1]=a[9]/255;c[2]=a[14]/255;c[3]=a[19]/255},uMultipliers:null,
uOffsets:null,__class__:ak});var Xe=function(a){Wi.call(this);this.set_matrix(a);this.__numShaderPasses=1;this.__needSecondBitmapData=!1};k["openfl.filters.ColorMatrixFilter"]=Xe;Xe.__name__="openfl.filters.ColorMatrixFilter";Xe.__super__=Wi;Xe.prototype=u(Wi.prototype,{__matrix:null,clone:function(){return new Xe(this.__matrix)},__applyFilter:function(a,b,c,d){var e=b.image,f=a.image;ya.convertToData(e);ya.convertToData(f);var g=e.get_data(),h=f.get_data(),m=d.x-c.x|0;d=d.y-c.y|0;b=4*b.width;var l=
4*a.width,n=e.buffer.format,p=f.buffer.format;e=e.buffer.premultiplied;f=f.buffer.premultiplied;for(var k=0,q=0,t,v,r=c.y|0,u=c.height|0;r<u;)for(var x=r++,C=c.x|0,P=c.width|0;C<P;){v=C++;t=x*b+4*v;v=(x+m)*l+4*(v+d);var F=n,z=e;null==z&&(z=!1);null==F&&(F=0);switch(F){case 0:k=(g[t]&255)<<24|(g[t+1]&255)<<16|(g[t+2]&255)<<8|g[t+3]&255;break;case 1:k=(g[t+1]&255)<<24|(g[t+2]&255)<<16|(g[t+3]&255)<<8|g[t]&255;break;case 2:k=(g[t+2]&255)<<24|(g[t+1]&255)<<16|(g[t]&255)<<8|g[t+3]&255}z&&0!=(k&255)&&255!=
(k&255)&&(H.unmult=255/(k&255),k=(H.__clamp[Math.round((k>>>24&255)*H.unmult)]&255)<<24|(H.__clamp[Math.round((k>>>16&255)*H.unmult)]&255)<<16|(H.__clamp[Math.round((k>>>8&255)*H.unmult)]&255)<<8|k&255);0==(k&255)?q=0:(q=((Math.max(0,Math.min(this.__matrix[0]*(k>>>24&255)+this.__matrix[1]*(k>>>16&255)+this.__matrix[2]*(k>>>8&255)+this.__matrix[3]*(k&255)+this.__matrix[4],255))|0)&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|q&255,q=(q>>>24&255)<<24|((Math.max(0,Math.min(this.__matrix[5]*(k>>>24&255)+
this.__matrix[6]*(k>>>16&255)+this.__matrix[7]*(k>>>8&255)+this.__matrix[8]*(k&255)+this.__matrix[9],255))|0)&255)<<16|(q>>>8&255)<<8|q&255,q=(q>>>24&255)<<24|(q>>>16&255)<<16|((Math.max(0,Math.min(this.__matrix[10]*(k>>>24&255)+this.__matrix[11]*(k>>>16&255)+this.__matrix[12]*(k>>>8&255)+this.__matrix[13]*(k&255)+this.__matrix[14],255))|0)&255)<<8|q&255,q=(q>>>24&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|(Math.max(0,Math.min(this.__matrix[15]*(k>>>24&255)+this.__matrix[16]*(k>>>16&255)+this.__matrix[17]*
(k>>>8&255)+this.__matrix[18]*(k&255)+this.__matrix[19],255))|0)&255);t=p;F=f;null==F&&(F=!1);null==t&&(t=0);F&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(H.a16=H.__alpha16[q&255],q=((q>>>24&255)*H.a16>>16&255)<<24|((q>>>16&255)*H.a16>>16&255)<<16|((q>>>8&255)*H.a16>>16&255)<<8|q&255));switch(t){case 0:h[v]=q>>>24&255;h[v+1]=q>>>16&255;h[v+2]=q>>>8&255;h[v+3]=q&255;break;case 1:h[v]=q&255;h[v+1]=q>>>24&255;h[v+2]=q>>>16&255;h[v+3]=q>>>8&255;break;case 2:h[v]=q>>>8&255,h[v+1]=q>>>16&255,h[v+2]=q>>>24&
255,h[v+3]=q&255}}a.image.dirty=!0;return a},__initShader:function(a,b,c){Xe.__colorMatrixShader.init(this.get_matrix());return Xe.__colorMatrixShader},get_matrix:function(){return this.__matrix},set_matrix:function(a){null==a&&(a=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);return this.__matrix=a},__class__:Xe,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix"}});var $d=function(a){null!=a&&16==a.get_length()?this.rawData=a.concat(null):this.rawData=ub.toFloatVector(null,null,null,[1,
0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};k["openfl.geom.Matrix3D"]=$d;$d.__name__="openfl.geom.Matrix3D";$d.create2D=function(a,b,c,d){null==d&&(d=0);null==c&&(c=1);var e=d*Math.PI/180;d=Math.cos(e);e=Math.sin(e);return new $d(ub.toFloatVector(null,null,null,[d*c,-e*c,0,0,e*c,d*c,0,0,0,0,1,0,a,b,0,1]))};$d.createABCD=function(a,b,c,d,e,f){return new $d(ub.toFloatVector(null,null,null,[a,b,0,0,c,d,0,0,0,0,1,0,e,f,0,1]))};$d.createOrtho=function(a,b,c,d,e,f){var g=1/(b-a),h=1/(d-c),m=1/(f-e);return new $d(ub.toFloatVector(null,
null,null,[2*g,0,0,0,0,2*h,0,0,0,0,-2*m,0,-(a+b)*g,-(c+d)*h,-(e+f)*m,1]))};$d.interpolate=function(a,b,c){for(var d=new $d,e=0;16>e;){var f=e++;d.rawData.set(f,a.rawData.get(f)+(b.rawData.get(f)-a.rawData.get(f))*c)}return d};$d.__getAxisRotation=function(a,b,c,d){var e=new $d;a=new ld(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;e.rawData.set(0,c+a.x*a.x*b);e.rawData.set(5,c+a.y*a.y*b);e.rawData.set(10,c+a.z*a.z*b);c=a.x*a.y*b;var f=a.z*d;e.rawData.set(4,c+f);e.rawData.set(1,c-f);c=
a.x*a.z*b;f=a.y*d;e.rawData.set(8,c-f);e.rawData.set(2,c+f);c=a.y*a.z*b;f=a.x*d;e.rawData.set(9,c+f);e.rawData.set(6,c-f);return e};$d.prototype={rawData:null,append:function(a){var b=this.rawData.get(0),c=this.rawData.get(4),d=this.rawData.get(8),e=this.rawData.get(12),f=this.rawData.get(1),g=this.rawData.get(5),h=this.rawData.get(9),m=this.rawData.get(13),l=this.rawData.get(2),n=this.rawData.get(6),p=this.rawData.get(10),k=this.rawData.get(14),q=this.rawData.get(3),t=this.rawData.get(7),v=this.rawData.get(11),
r=this.rawData.get(15),u=a.rawData.get(0),x=a.rawData.get(4),C=a.rawData.get(8),P=a.rawData.get(12),F=a.rawData.get(1),z=a.rawData.get(5),y=a.rawData.get(9),ka=a.rawData.get(13),B=a.rawData.get(2),I=a.rawData.get(6),w=a.rawData.get(10),A=a.rawData.get(14),G=a.rawData.get(3),H=a.rawData.get(7),D=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*u+f*x+l*C+q*P);this.rawData.set(1,b*F+f*z+l*y+q*ka);this.rawData.set(2,b*B+f*I+l*w+q*A);this.rawData.set(3,b*G+f*H+l*D+q*a);this.rawData.set(4,c*u+
g*x+n*C+t*P);this.rawData.set(5,c*F+g*z+n*y+t*ka);this.rawData.set(6,c*B+g*I+n*w+t*A);this.rawData.set(7,c*G+g*H+n*D+t*a);this.rawData.set(8,d*u+h*x+p*C+v*P);this.rawData.set(9,d*F+h*z+p*y+v*ka);this.rawData.set(10,d*B+h*I+p*w+v*A);this.rawData.set(11,d*G+h*H+p*D+v*a);this.rawData.set(12,e*u+m*x+k*C+r*P);this.rawData.set(13,e*F+m*z+k*y+r*ka);this.rawData.set(14,e*B+m*I+k*w+r*A);this.rawData.set(15,e*G+m*H+k*D+r*a)},appendRotation:function(a,b,c){var d=0,e=d,f=e;null!=c&&(f=c.x,e=c.y,d=c.z);c=a*Math.PI/
180;a=Math.cos(c);c=Math.sin(c);var g=b.x,h=b.y;b=b.z;var m=g*g,l=h*h,n=b*b,p=m+l+n;if(0!=p){var k=Math.sqrt(p);g/=k;h/=k;b/=k;m/=p;l/=p;n/=p}p=1-a;k=new $d;var q=k.rawData;q.set(0,m+(l+n)*a);q.set(1,g*h*p+b*c);q.set(2,g*b*p-h*c);q.set(4,g*h*p-b*c);q.set(5,l+(m+n)*a);q.set(6,h*b*p+g*c);q.set(8,g*b*p+h*c);q.set(9,h*b*p-g*c);q.set(10,n+(m+l)*a);q.set(12,(f*(l+n)-g*(e*h+d*b))*p+(e*b-d*h)*c);q.set(13,(e*(m+n)-h*(f*g+d*b))*p+(d*g-f*b)*c);q.set(14,(d*(m+l)-b*(f*g+e*h))*p+(f*h-e*g)*c);this.append(k)},appendScale:function(a,
b,c){this.append(new $d(ub.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},appendTranslation:function(a,b,c){var d=this.rawData;d.set(12,d.get(12)+a);d=this.rawData;d.set(13,d.get(13)+b);d=this.rawData;d.set(14,d.get(14)+c)},clone:function(){return new $d(this.rawData.copy())},copyColumnFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(1,b.y);this.rawData.set(2,b.z);this.rawData.set(3,b.w);break;case 1:this.rawData.set(4,b.x);this.rawData.set(5,b.y);this.rawData.set(6,
b.z);this.rawData.set(7,b.w);break;case 2:this.rawData.set(8,b.x);this.rawData.set(9,b.y);this.rawData.set(10,b.z);this.rawData.set(11,b.w);break;case 3:this.rawData.set(12,b.x),this.rawData.set(13,b.y),this.rawData.set(14,b.z),this.rawData.set(15,b.w)}},copyColumnTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(1);b.z=this.rawData.get(2);b.w=this.rawData.get(3);break;case 1:b.x=this.rawData.get(4);b.y=this.rawData.get(5);b.z=this.rawData.get(6);b.w=this.rawData.get(7);
break;case 2:b.x=this.rawData.get(8);b.y=this.rawData.get(9);b.z=this.rawData.get(10);b.w=this.rawData.get(11);break;case 3:b.x=this.rawData.get(12),b.y=this.rawData.get(13),b.z=this.rawData.get(14),b.w=this.rawData.get(15)}},copyFrom:function(a){this.rawData=a.rawData.copy()},copyRawDataFrom:function(a,b,c){null==c&&(c=!1);null==b&&(b=0);c&&this.transpose();for(var d=0,e=a.get_length()-b;d<e;){var f=d++;this.rawData.set(f,a.get(f+b))}c&&this.transpose()},copyRawDataTo:function(a,b,c){null==c&&(c=
!1);null==b&&(b=0);c&&this.transpose();for(var d=0,e=this.rawData.get_length();d<e;){var f=d++;a.set(f+b,this.rawData.get(f))}c&&this.transpose()},copyRowFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(4,b.y);this.rawData.set(8,b.z);this.rawData.set(12,b.w);break;case 1:this.rawData.set(1,b.x);this.rawData.set(5,b.y);this.rawData.set(9,b.z);this.rawData.set(13,b.w);break;case 2:this.rawData.set(2,b.x);this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,
b.w);break;case 3:this.rawData.set(3,b.x),this.rawData.set(7,b.y),this.rawData.set(11,b.z),this.rawData.set(15,b.w)}},copyRowTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(4);b.z=this.rawData.get(8);b.w=this.rawData.get(12);break;case 1:b.x=this.rawData.get(1);b.y=this.rawData.get(5);b.z=this.rawData.get(9);b.w=this.rawData.get(13);break;case 2:b.x=this.rawData.get(2);b.y=this.rawData.get(6);b.z=this.rawData.get(10);b.w=this.rawData.get(14);break;case 3:b.x=this.rawData.get(3),
b.y=this.rawData.get(7),b.z=this.rawData.get(11),b.w=this.rawData.get(15)}},copyToMatrix3D:function(a){a.rawData=this.rawData.copy()},decompose:function(a){null==a&&(a=1);var b=ub.toObjectVector(null),c=this.clone().rawData.copy(),d=new ld(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var e=new ld;e.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));e.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+c.get(6)*c.get(6));e.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+
c.get(10)*c.get(10));0>c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))&&(e.z=-e.z);var f=c;f.set(0,f.get(0)/e.x);f=c;f.set(1,f.get(1)/e.x);f=c;f.set(2,f.get(2)/e.x);f=c;f.set(4,f.get(4)/e.y);f=c;f.set(5,f.get(5)/e.y);f=c;f.set(6,f.get(6)/e.y);f=c;f.set(8,f.get(8)/e.z);f=c;f.set(9,f.get(9)/e.z);f=c;f.set(10,f.get(10)/e.z);f=new ld;switch(a){case 0:f.w=Math.acos((c.get(0)+c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-
c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));0!=a?(f.x=(c.get(6)-c.get(9))/a,f.y=(c.get(8)-c.get(2))/a,f.z=(c.get(1)-c.get(4))/a):f.x=f.y=f.z=0;break;case 1:f.y=Math.asin(-c.get(2));1!=c.get(2)&&-1!=c.get(2)?(f.x=Math.atan2(c.get(6),c.get(10)),f.z=Math.atan2(c.get(1),c.get(0))):(f.z=0,f.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),0<a?(f.w=Math.sqrt(1+a)/2,f.x=(c.get(6)-c.get(9))/(4*f.w),f.y=(c.get(8)-
c.get(2))/(4*f.w),f.z=(c.get(1)-c.get(4))/(4*f.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(f.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,f.w=(c.get(6)-c.get(9))/(4*f.x),f.y=(c.get(1)+c.get(4))/(4*f.x),f.z=(c.get(8)+c.get(2))/(4*f.x)):c.get(5)>c.get(10)?(f.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,f.x=(c.get(1)+c.get(4))/(4*f.y),f.w=(c.get(8)-c.get(2))/(4*f.y),f.z=(c.get(6)+c.get(9))/(4*f.y)):(f.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,f.x=(c.get(8)+c.get(2))/(4*f.z),f.y=(c.get(6)+c.get(9))/
(4*f.z),f.w=(c.get(1)-c.get(4))/(4*f.z))}b.push(d);b.push(f);b.push(e);return b},deltaTransformVector:function(a){var b=a.x,c=a.y;a=a.z;return new ld(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10),b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11))},identity:function(){this.rawData=ub.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,
0,1,0,0,0,0,1])},interpolateTo:function(a,b){for(var c=0;16>c;){var d=c++;this.rawData.set(d,this.rawData.get(d)+(a.rawData.get(d)-this.rawData.get(d))*b)}},invert:function(){var a=this.get_determinant(),b=1E-11<Math.abs(a);if(b){a=1/a;var c=this.rawData.get(0),d=this.rawData.get(4),e=this.rawData.get(8),f=this.rawData.get(12),g=this.rawData.get(1),h=this.rawData.get(5),m=this.rawData.get(9),l=this.rawData.get(13),n=this.rawData.get(2),p=this.rawData.get(6),k=this.rawData.get(10),q=this.rawData.get(14),
t=this.rawData.get(3),v=this.rawData.get(7),r=this.rawData.get(11),u=this.rawData.get(15);this.rawData.set(0,a*(h*(k*u-q*r)-m*(p*u-q*v)+l*(p*r-k*v)));this.rawData.set(1,-a*(g*(k*u-q*r)-m*(n*u-q*t)+l*(n*r-k*t)));this.rawData.set(2,a*(g*(p*u-q*v)-h*(n*u-q*t)+l*(n*v-p*t)));this.rawData.set(3,-a*(g*(p*r-k*v)-h*(n*r-k*t)+m*(n*v-p*t)));this.rawData.set(4,-a*(d*(k*u-q*r)-e*(p*u-q*v)+f*(p*r-k*v)));this.rawData.set(5,a*(c*(k*u-q*r)-e*(n*u-q*t)+f*(n*r-k*t)));this.rawData.set(6,-a*(c*(p*u-q*v)-d*(n*u-q*t)+f*
(n*v-p*t)));this.rawData.set(7,a*(c*(p*r-k*v)-d*(n*r-k*t)+e*(n*v-p*t)));this.rawData.set(8,a*(d*(m*u-l*r)-e*(h*u-l*v)+f*(h*r-m*v)));this.rawData.set(9,-a*(c*(m*u-l*r)-e*(g*u-l*t)+f*(g*r-m*t)));this.rawData.set(10,a*(c*(h*u-l*v)-d*(g*u-l*t)+f*(g*v-h*t)));this.rawData.set(11,-a*(c*(h*r-m*v)-d*(g*r-m*t)+e*(g*v-h*t)));this.rawData.set(12,-a*(d*(m*q-l*k)-e*(h*q-l*p)+f*(h*k-m*p)));this.rawData.set(13,a*(c*(m*q-l*k)-e*(g*q-l*n)+f*(g*k-m*n)));this.rawData.set(14,-a*(c*(h*q-l*p)-d*(g*q-l*n)+f*(g*p-h*n)));
this.rawData.set(15,a*(c*(h*k-m*p)-d*(g*k-m*n)+e*(g*p-h*n)))}return b},pointAt:function(a,b,c){null==b&&(b=new ld(0,0,-1));null==c&&(c=new ld(0,-1,0));b=b.subtract(a);c=c.clone();b.normalize();c.normalize();var d=b.clone();d.scaleBy(c.dotProduct(b));c=c.subtract(d);0<c.get_length()?c.normalize():c=0!=b.x?new ld(-b.y,b.x,0):new ld(1,0,0);d=c.crossProduct(b);d.normalize();this.rawData.set(0,d.x);this.rawData.set(4,d.y);this.rawData.set(8,d.z);this.rawData.set(12,0);this.rawData.set(1,c.x);this.rawData.set(5,
c.y);this.rawData.set(9,c.z);this.rawData.set(13,0);this.rawData.set(2,b.x);this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,0);this.rawData.set(3,a.x);this.rawData.set(7,a.y);this.rawData.set(11,a.z);this.rawData.set(15,1)},prepend:function(a){var b=a.rawData.get(0),c=a.rawData.get(4),d=a.rawData.get(8),e=a.rawData.get(12),f=a.rawData.get(1),g=a.rawData.get(5),h=a.rawData.get(9),m=a.rawData.get(13),l=a.rawData.get(2),n=a.rawData.get(6),p=a.rawData.get(10),k=a.rawData.get(14),
q=a.rawData.get(3),t=a.rawData.get(7),v=a.rawData.get(11);a=a.rawData.get(15);var r=this.rawData.get(0),u=this.rawData.get(4),x=this.rawData.get(8),C=this.rawData.get(12),P=this.rawData.get(1),F=this.rawData.get(5),z=this.rawData.get(9),y=this.rawData.get(13),ka=this.rawData.get(2),B=this.rawData.get(6),I=this.rawData.get(10),w=this.rawData.get(14),A=this.rawData.get(3),G=this.rawData.get(7),H=this.rawData.get(11),D=this.rawData.get(15);this.rawData.set(0,b*r+f*u+l*x+q*C);this.rawData.set(1,b*P+f*
F+l*z+q*y);this.rawData.set(2,b*ka+f*B+l*I+q*w);this.rawData.set(3,b*A+f*G+l*H+q*D);this.rawData.set(4,c*r+g*u+n*x+t*C);this.rawData.set(5,c*P+g*F+n*z+t*y);this.rawData.set(6,c*ka+g*B+n*I+t*w);this.rawData.set(7,c*A+g*G+n*H+t*D);this.rawData.set(8,d*r+h*u+p*x+v*C);this.rawData.set(9,d*P+h*F+p*z+v*y);this.rawData.set(10,d*ka+h*B+p*I+v*w);this.rawData.set(11,d*A+h*G+p*H+v*D);this.rawData.set(12,e*r+m*u+k*x+a*C);this.rawData.set(13,e*P+m*F+k*z+a*y);this.rawData.set(14,e*ka+m*B+k*I+a*w);this.rawData.set(15,
e*A+m*G+k*H+a*D)},prependRotation:function(a,b,c){var d=0,e=d,f=e;null!=c&&(f=c.x,e=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var g=b.x,h=b.y;b=b.z;var m=g*g,l=h*h,n=b*b,p=m+l+n;if(0!=p){var k=Math.sqrt(p);g/=k;h/=k;b/=k;m/=p;l/=p;n/=p}p=1-a;k=new $d;var q=k.rawData;q.set(0,m+(l+n)*a);q.set(1,g*h*p+b*c);q.set(2,g*b*p-h*c);q.set(4,g*h*p-b*c);q.set(5,l+(m+n)*a);q.set(6,h*b*p+g*c);q.set(8,g*b*p+h*c);q.set(9,h*b*p-g*c);q.set(10,n+(m+l)*a);q.set(12,(f*(l+n)-g*(e*h+d*b))*p+(e*b-d*h)*c);q.set(13,
(e*(m+n)-h*(f*g+d*b))*p+(d*g-f*b)*c);q.set(14,(d*(m+l)-b*(f*g+e*h))*p+(f*h-e*g)*c);this.prepend(k)},prependScale:function(a,b,c){this.prepend(new $d(ub.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},prependTranslation:function(a,b,c){var d=new $d;d.set_position(new ld(a,b,c));this.prepend(d)},recompose:function(a,b){null==b&&(b=1);if(3>a.get_length()||0==a.get(2).x||0==a.get(2).y||0==a.get(2).z)return!1;this.identity();var c=[];c[0]=c[1]=c[2]=a.get(2).x;c[4]=c[5]=c[6]=a.get(2).y;
c[8]=c[9]=c[10]=a.get(2).z;if(1==b){b=Math.cos(a.get(1).x);var d=Math.cos(a.get(1).y),e=Math.cos(a.get(1).z),f=Math.sin(a.get(1).x),g=Math.sin(a.get(1).y),h=Math.sin(a.get(1).z);this.rawData.set(0,d*e*c[0]);this.rawData.set(1,d*h*c[1]);this.rawData.set(2,-g*c[2]);this.rawData.set(3,0);this.rawData.set(4,(f*g*e-b*h)*c[4]);this.rawData.set(5,(f*g*h+b*e)*c[5]);this.rawData.set(6,f*d*c[6]);this.rawData.set(7,0);this.rawData.set(8,(b*g*e+f*h)*c[8]);this.rawData.set(9,(b*g*h-f*e)*c[9]);this.rawData.set(10,
b*d*c[10])}else d=a.get(1).x,e=a.get(1).y,f=a.get(1).z,g=a.get(1).w,0==b&&(d*=Math.sin(g/2),e*=Math.sin(g/2),f*=Math.sin(g/2),g=Math.cos(g/2)),this.rawData.set(0,(1-2*e*e-2*f*f)*c[0]),this.rawData.set(1,(2*d*e+2*g*f)*c[1]),this.rawData.set(2,(2*d*f-2*g*e)*c[2]),this.rawData.set(3,0),this.rawData.set(4,(2*d*e-2*g*f)*c[4]),this.rawData.set(5,(1-2*d*d-2*f*f)*c[5]),this.rawData.set(6,(2*e*f+2*g*d)*c[6]),this.rawData.set(7,0),this.rawData.set(8,(2*d*f+2*g*e)*c[8]),this.rawData.set(9,(2*e*f-2*g*d)*c[9]),
this.rawData.set(10,(1-2*d*d-2*e*e)*c[10]);this.rawData.set(11,0);this.rawData.set(12,a.get(0).x);this.rawData.set(13,a.get(0).y);this.rawData.set(14,a.get(0).z);this.rawData.set(15,1);0==a.get(2).x&&this.rawData.set(0,1E-15);0==a.get(2).y&&this.rawData.set(5,1E-15);0==a.get(2).z&&this.rawData.set(10,1E-15);return!(0==a.get(2).x||0==a.get(2).y||0==a.get(2).y)},transformVector:function(a){var b=a.x,c=a.y;a=a.z;return new ld(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),
b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectors:function(a,b){for(var c=0,d,e,f;c+3<=a.get_length();)d=a.get(c),e=a.get(c+1),f=a.get(c+2),b.set(c,d*this.rawData.get(0)+e*this.rawData.get(4)+f*this.rawData.get(8)+this.rawData.get(12)),b.set(c+1,d*this.rawData.get(1)+e*
this.rawData.get(5)+f*this.rawData.get(9)+this.rawData.get(13)),b.set(c+2,d*this.rawData.get(2)+e*this.rawData.get(6)+f*this.rawData.get(10)+this.rawData.get(14)),c+=3},transpose:function(){var a=this.rawData.copy();this.rawData.set(1,a.get(4));this.rawData.set(2,a.get(8));this.rawData.set(3,a.get(12));this.rawData.set(4,a.get(1));this.rawData.set(6,a.get(9));this.rawData.set(7,a.get(13));this.rawData.set(8,a.get(2));this.rawData.set(9,a.get(6));this.rawData.set(11,a.get(14));this.rawData.set(12,
a.get(3));this.rawData.set(13,a.get(7));this.rawData.set(14,a.get(11))},get_determinant:function(){return(this.rawData.get(0)*this.rawData.get(5)-this.rawData.get(4)*this.rawData.get(1))*(this.rawData.get(10)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(11))-(this.rawData.get(0)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(7))+(this.rawData.get(0)*this.rawData.get(13)-this.rawData.get(12)*
this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(7))+(this.rawData.get(4)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(3))-(this.rawData.get(4)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(3))+(this.rawData.get(8)*this.rawData.get(13)-this.rawData.get(12)*
this.rawData.get(9))*(this.rawData.get(2)*this.rawData.get(7)-this.rawData.get(6)*this.rawData.get(3))},get_position:function(){return new ld(this.rawData.get(12),this.rawData.get(13),this.rawData.get(14))},set_position:function(a){this.rawData.set(12,a.x);this.rawData.set(13,a.y);this.rawData.set(14,a.z);return a},__class__:$d,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};var rk=function(a){this.__colorTransform=new Kc;this.concatenatedColorTransform=
new Kc;this.pixelBounds=new fa;this.__displayObject=a;this.__hasMatrix=!0};k["openfl.geom.Transform"]=rk;rk.__name__="openfl.geom.Transform";rk.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform.__clone()},set_colorTransform:function(a){this.__colorTransform.__equals(a,!1)||(this.__colorTransform.__copyFrom(a),null!=a&&this.__displayObject.set_alpha(a.alphaMultiplier),
a=this.__displayObject,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__colorTransform},get_concatenatedMatrix:function(){return this.__hasMatrix?this.__displayObject.__getWorldTransform().clone():null},get_matrix:function(){return this.__hasMatrix?this.__displayObject.__transform.clone():null},set_matrix:function(a){if(null==a)return this.__hasMatrix=!1,null;this.__hasMatrix=!0;this.__hasMatrix3D=!1;null!=this.__displayObject&&this.__setTransform(a.a,a.b,a.c,a.d,a.tx,
a.ty);return a},get_matrix3D:function(){if(this.__hasMatrix3D){var a=this.__displayObject.__transform;return new $d(ub.toFloatVector(null,null,null,[a.a,a.b,0,0,a.c,a.d,0,0,0,0,1,0,a.tx,a.ty,0,1]))}return null},set_matrix3D:function(a){if(null==a)return this.__hasMatrix3D=!1,null;this.__hasMatrix=!1;this.__hasMatrix3D=!0;this.__setTransform(a.rawData.get(0),a.rawData.get(1),a.rawData.get(5),a.rawData.get(6),a.rawData.get(12),a.rawData.get(13));return a},__setTransform:function(a,b,c,d,e,f){if(null!=
this.__displayObject){var g=this.__displayObject.__transform;if(g.a!=a||g.b!=b||g.c!=c||g.d!=d||g.tx!=e||g.ty!=f){var h=0==b?a:Math.sqrt(a*a+b*b);var m=0==c?d:Math.sqrt(c*c+d*d);this.__displayObject.__scaleX=h;this.__displayObject.__scaleY=m;h=180/Math.PI*Math.atan2(d,c)-90;h!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=h,h*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(h),this.__displayObject.__rotationCosine=Math.cos(h));g.a=a;g.b=b;g.c=c;g.d=d;g.tx=e;g.ty=f;this.__displayObject.__setTransformDirty()}}},
__class__:rk,__properties__:{set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var ld=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.w=d;this.x=a;this.y=b;this.z=c};k["openfl.geom.Vector3D"]=ld;ld.__name__="openfl.geom.Vector3D";ld.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",
get_X_AXIS:"get_X_AXIS"};ld.angleBetween=function(a,b){var c=a.get_length(),d=b.get_length();a=a.dotProduct(b);0!=c&&(a/=c);0!=d&&(a/=d);return Math.acos(a)};ld.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};ld.get_X_AXIS=function(){return new ld(1,0,0)};ld.get_Y_AXIS=function(){return new ld(0,1,0)};ld.get_Z_AXIS=function(){return new ld(0,0,1)};ld.prototype={w:null,x:null,y:null,z:null,add:function(a){return new ld(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new ld(this.x,
this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a){return new ld(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){null==b&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){null==
c&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=this.get_length();0!=a&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a){return new ld(this.x-a.x,this.y-a.y,this.z-a.z)},
toString:function(){return"Vector3D("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:ld,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var ep=function(){};k["openfl.media.ID3Info"]=ep;ep.__name__="openfl.media.ID3Info";ep.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,
__class__:ep};var xf=function(a,b){za.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.isBuffering=!1;this.url=null;null!=a&&this.load(a,b)};k["openfl.media.Sound"]=xf;xf.__name__="openfl.media.Sound";xf.fromAudioBuffer=function(a){var b=new xf;b.__buffer=a;return b};xf.fromFile=function(a){return xf.fromAudioBuffer(Pc.fromFile(a))};xf.loadFromFile=function(a){return Pc.loadFromFile(a).then(function(a){return eb.withValue(xf.fromAudioBuffer(a))})};xf.loadFromFiles=function(a){return Pc.loadFromFiles(a).then(function(a){return eb.withValue(xf.fromAudioBuffer(a))})};
xf.__super__=za;xf.prototype=u(za.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__buffer:null,close:function(){null!=this.__buffer&&(this.__buffer.dispose(),this.__buffer=null)},load:function(a,b){var c=this;this.url=a.url;a=sa.getLibrary("default");if(null!=a&&Object.prototype.hasOwnProperty.call(a.cachedAudioBuffers.h,this.url))this.AudioBuffer_onURLLoad(a.cachedAudioBuffers.h[this.url]);else Pc.loadFromFile(this.url).onComplete(r(this,this.AudioBuffer_onURLLoad)).onError(function(a){c.AudioBuffer_onURLLoad(null)})},
loadCompressedDataFromByteArray:function(a,b){if(null==a||0>=b)this.dispatchEvent(new lg("ioError"));else{if(ua.gt(a.position,0)||ua.gt(Ab.get_length(a),b)){var c=b;null==c&&(c=0);var d=new oc(c),e=a.position;c=b;null==c&&(c=0);null==e&&(e=0);d.writeBytes(a,e,c);a=d}this.__buffer=Pc.fromBytes(Ab.toBytes(a));null==this.__buffer?this.dispatchEvent(new lg("ioError")):this.dispatchEvent(new la("complete"))}},loadPCMFromByteArray:function(a,b,c,d,e){null==e&&(e=44100);null==d&&(d=!0);null==c&&(c="float");
if(null==a)this.dispatchEvent(new lg("ioError"));else{c="float"==c?32:16;d=d?2:1;b=c/8*d*b|0;if(ua.gt(a.position,0)||ua.gt(Ab.get_length(a),b)){var f=b;null==f&&(f=0);var g=f=new oc(f),h=a.position;f=b;null==f&&(f=0);null==h&&(h=0);g.writeBytes(a,h,f);a=g}b=new Pc;b.bitsPerSample=c;b.channels=d;a=Ab.toArrayBuffer(a);f=null!=a?new Uint8Array(a,0):null;b.data=f;b.sampleRate=e|0;this.__buffer=b;this.dispatchEvent(new la("complete"))}},play:function(a,b,c){null==b&&(b=0);null==a&&(a=0);if(null==this.__buffer||
32<=pd.__soundChannels.length)return null;c=null==c?new gf:c.clone();var d=pd.__soundTransform.pan+c.pan;1<d&&(d=1);-1>d&&(d=-1);var e=pd.__soundTransform.volume*c.volume,f=new Lo(this.__buffer);f.offset=a|0;1<b&&f.set_loops(b-1);f.set_gain(e);0!=d&&f.set_pan(d);return new dn(f,c)},get_id3:function(){return new ep},get_length:function(){return null!=this.__buffer?1E3*this.__buffer.get_src().duration()|0:0},AudioBuffer_onURLLoad:function(a){null==a?this.dispatchEvent(new lg("ioError")):(this.__buffer=
a,this.dispatchEvent(new la("complete")))},__class__:xf,__properties__:{get_length:"get_length",get_id3:"get_id3"}});var dn=function(a,b){za.call(this,this);this.rightPeak=this.leftPeak=1;this.__soundTransform=null!=b?b:new gf;null!=a&&(this.__source=a,this.__source.onComplete.add(r(this,this.source_onComplete)),this.__isValid=!0,this.__source.play());pd.__registerSoundChannel(this)};k["openfl.media.SoundChannel"]=dn;dn.__name__="openfl.media.SoundChannel";dn.__super__=za;dn.prototype=u(za.prototype,
{leftPeak:null,rightPeak:null,__isValid:null,__soundTransform:null,__source:null,stop:function(){pd.__unregisterSoundChannel(this);this.__isValid&&(this.__source.stop(),this.__dispose())},__dispose:function(){this.__isValid&&(this.__source.onComplete.remove(r(this,this.source_onComplete)),this.__source.dispose(),this.__source=null,this.__isValid=!1)},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},get_position:function(){return this.__isValid?this.__source.get_currentTime()+
this.__source.offset:0},set_position:function(a){if(!this.__isValid)return 0;this.__source.set_currentTime((a|0)-this.__source.offset);return a},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){if(null!=a){this.__soundTransform.pan=a.pan;this.__soundTransform.volume=a.volume;var b=pd.__soundTransform.pan+this.__soundTransform.pan;-1>b&&(b=-1);1<b&&(b=1);var c=pd.__soundTransform.volume*this.__soundTransform.volume;this.__isValid&&(this.__source.set_gain(c),
0==b&&null==this.__source.get_pan()||this.__source.set_pan(b))}return a},source_onComplete:function(){pd.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new la("soundComplete"))},__class__:dn,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Ir=function(a,b){null==b&&(b=!1);null==a&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};k["openfl.media.SoundLoaderContext"]=Ir;
Ir.__name__="openfl.media.SoundLoaderContext";Ir.prototype={bufferTime:null,checkPolicyFile:null,__class__:Ir};var pd=function(){};k["openfl.media.SoundMixer"]=pd;pd.__name__="openfl.media.SoundMixer";pd.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};pd.areSoundsInaccessible=function(){return!1};pd.stopAll=function(){for(var a=0,b=pd.__soundChannels;a<b.length;){var c=b[a];++a;c.stop()}};pd.__registerSoundChannel=function(a){pd.__soundChannels.push(a)};
pd.__unregisterSoundChannel=function(a){I.remove(pd.__soundChannels,a)};pd.get_soundTransform=function(){return pd.__soundTransform};pd.set_soundTransform=function(a){pd.__soundTransform=a.clone();for(var b=0,c=pd.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var en=function(a,b){null==b&&(b=240);null==a&&(a=320);ab.call(this);this.__drawableType=8;this.__width=a;this.__height=b;this.__textureTime=-1;this.smoothing=!1;this.deblocking=0};k["openfl.media.Video"]=en;en.__name__=
"openfl.media.Video";en.__super__=ab;en.prototype=u(ab.prototype,{deblocking:null,smoothing:null,__active:null,__buffer:null,__bufferAlpha:null,__bufferColorTransform:null,__bufferContext:null,__bufferData:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__width:null,attachNetStream:function(a){this.__stream=a;null==
this.__stream||null==this.__stream.__video||this.__stream.__closed||this.__stream.__video.play()},clear:function(){},__enterFrame:function(a){this.__renderable&&null!=this.__stream&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=fa.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)},__getIndexBuffer:function(a){if(null==this.__indexBuffer||this.__indexBufferContext!=
a.__context)this.__indexBufferData=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferContext=a.__context,this.__indexBuffer=a.createIndexBuffer(6),this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData);return this.__indexBuffer},__getTexture:function(a){if(null==this.__stream||null==this.__stream.__video)return null;var b=a.__context.webgl,
c=b.RGBA,d=b.RGBA;this.__stream.__closed||this.__stream.__video.currentTime==this.__textureTime||(null==this.__texture&&(this.__texture=a.createRectangleTexture(this.__stream.__video.videoWidth,this.__stream.__video.videoHeight,1,!1)),a.__bindGLTexture2D(this.__texture.__textureID),$b.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,this.__stream.__video),this.__textureTime=this.__stream.__video.currentTime);return this.__texture},__getVertexBuffer:function(a){if(null==this.__vertexBuffer||this.__vertexBufferContext!=
a.__context)this.__vertexBufferData=new Float32Array(20),this.__vertexBufferData[0]=this.get_width(),this.__vertexBufferData[1]=this.get_height(),this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[6]=this.get_height(),this.__vertexBufferData[9]=1,this.__vertexBufferData[10]=this.get_width(),this.__vertexBufferData[13]=1,this.__vertexBufferContext=a.__context,this.__vertexBuffer=a.createVertexBuffer(3,5),this.__vertexBuffer.uploadFromTypedArray(Rg.toArrayBufferView(this.__vertexBufferData));
return this.__vertexBuffer},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var g=this.__renderTransform,h=g.a*g.d-g.b*g.c;c=0==h?-g.tx:1/h*(g.c*(g.ty-b)+g.d*(a-g.tx));g=this.__renderTransform;h=g.a*g.d-g.b*g.c;a=0==h?-g.ty:1/h*(g.a*(b-g.ty)+g.b*(g.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==d||e||d.push(f),!0):!1},__hitTestMask:function(a,b){var c=pa.__pool.get();
c.setTo(a,b);this.__globalToLocal(c,c);a=0<c.x&&0<c.y&&c.x<=this.__width&&c.y<=this.__height;pa.__pool.release(c);return a},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(a){if(1!=this.get_scaleY()||a!=this.__height)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleY(1);return this.__height=a},get_videoHeight:function(){return null!=this.__stream&&null!=this.__stream.__video?this.__stream.__video.videoHeight|0:0},get_videoWidth:function(){return null!=this.__stream&&
null!=this.__stream.__video?this.__stream.__video.videoWidth|0:0},get_width:function(){return this.__width*this.__scaleX},set_width:function(a){if(1!=this.__scaleX||this.__width!=a)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleX(1);return this.__width=a},__class__:en,__properties__:u(ab.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var fp=function(){};k["openfl.net.IDynamicPropertyOutput"]=fp;fp.__name__="openfl.net.IDynamicPropertyOutput";
fp.__isInterface__=!0;fp.prototype={writeDynamicProperty:null,__class__:fp};var gp=function(){};k["openfl.net.IDynamicPropertyWriter"]=gp;gp.__name__="openfl.net.IDynamicPropertyWriter";gp.__isInterface__=!0;gp.prototype={writeDynamicProperties:null,__class__:gp};var bk=function(){za.call(this)};k["openfl.net.NetConnection"]=bk;bk.__name__="openfl.net.NetConnection";bk.__super__=za;bk.prototype=u(za.prototype,{connect:function(a,b,c,d,e,f){if(null!=a)throw J.thrown('Error: Can only connect in "HTTP streaming" mode');
this.dispatchEvent(new ci("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:bk});var fn=function(a,b){za.call(this);this.__connection=a;this.__soundTransform=new gf;this.__video=window.document.createElement("video");this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.setAttribute("crossorigin","anonymous");this.__video.addEventListener("error",r(this,this.video_onError),!1);this.__video.addEventListener("waiting",r(this,
this.video_onWaiting),!1);this.__video.addEventListener("ended",r(this,this.video_onEnd),!1);this.__video.addEventListener("pause",r(this,this.video_onPause),!1);this.__video.addEventListener("seeking",r(this,this.video_onSeeking),!1);this.__video.addEventListener("playing",r(this,this.video_onPlaying),!1);this.__video.addEventListener("timeupdate",r(this,this.video_onTimeUpdate),!1);this.__video.addEventListener("loadstart",r(this,this.video_onLoadStart),!1);this.__video.addEventListener("stalled",
r(this,this.video_onStalled),!1);this.__video.addEventListener("durationchanged",r(this,this.video_onDurationChanged),!1);this.__video.addEventListener("canplay",r(this,this.video_onCanPlay),!1);this.__video.addEventListener("canplaythrough",r(this,this.video_onCanPlayThrough),!1);this.__video.addEventListener("loadedmetadata",r(this,this.video_onLoadMetaData),!1)};k["openfl.net.NetStream"]=fn;fn.__name__="openfl.net.NetStream";fn.__super__=za;fn.prototype=u(za.prototype,{audioCodec:null,bufferLength:null,
bufferTime:null,bytesLoaded:null,bytesTotal:null,checkPolicyFile:null,client:null,currentFPS:null,decodedFrames:null,liveDelay:null,objectEncoding:null,time:null,videoCode:null,__closed:null,__connection:null,__soundTransform:null,__timer:null,__video:null,close:function(){null!=this.__video&&(this.__closed=!0,this.__video.pause(),this.__video.src="",this.time=0)},dispose:function(){this.close();this.__video=null},pause:function(){null!=this.__video&&this.__video.pause()},play:function(a,b,c,d,e,
f){null!=this.__video&&(this.__video.volume=pd.__soundTransform.volume*this.__soundTransform.volume,"string"==typeof a?this.__video.src=a:this.__video.srcObject=a,this.__video.play())},requestVideoStatus:function(){var a=this;null!=this.__video&&(null==this.__timer&&(this.__timer=new Oe(1)),this.__timer.run=function(){a.__video.paused?a.__playStatus("NetStream.Play.pause"):a.__playStatus("NetStream.Play.playing");a.__timer.stop()})},resume:function(){null!=this.__video&&this.__video.play()},seek:function(a){null!=
this.__video&&(0>a?a=0:a>this.__video.duration&&(a=this.__video.duration),this.__dispatchStatus("NetStream.SeekStart.Notify"),this.__video.currentTime=a)},togglePause:function(){null!=this.__video&&(this.__video.paused?this.__video.play():this.__video.pause())},__dispatchStatus:function(a){a=new ci("netStatus",!1,!1,{code:a});this.__connection.dispatchEvent(a);this.dispatchEvent(a)},__playStatus:function(a){if(null!=this.__video&&null!=this.client)try{var b=this.client.onPlayStatus;b({code:a,duration:this.__video.duration,
position:this.__video.currentTime,speed:this.__video.playbackRate,start:this.__video.startTime})}catch(c){xb.lastError=c}},video_onCanPlay:function(a){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(a){this.__playStatus("NetStream.Play.canplaythrough")},video_onDurationChanged:function(a){this.__playStatus("NetStream.Play.durationchanged")},video_onEnd:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__dispatchStatus("NetStream.Play.Complete");this.__playStatus("NetStream.Play.Complete")},
video_onError:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(a){if(null!=this.__video&&null!=this.client)try{var b=this.client.onMetaData;b({width:this.__video.videoWidth,height:this.__video.videoHeight,duration:this.__video.duration})}catch(c){xb.lastError=c}},video_onLoadStart:function(a){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(a){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(a){this.__dispatchStatus("NetStream.Play.Start");
this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(a){this.__playStatus("NetStream.Play.seeking");this.__dispatchStatus("NetStream.Seek.Complete")},video_onStalled:function(a){this.__playStatus("NetStream.Play.stalled")},video_onTimeUpdate:function(a){null!=this.__video&&(this.time=this.__video.currentTime,this.__playStatus("NetStream.Play.timeupdate"))},video_onWaiting:function(a){this.__playStatus("NetStream.Play.waiting")},get_soundTransform:function(){return this.__soundTransform.clone()},
set_soundTransform:function(a){null!=a&&(this.__soundTransform.pan=a.pan,this.__soundTransform.volume=a.volume,null!=this.__video&&(this.__video.volume=pd.__soundTransform.volume*this.__soundTransform.volume));return a},get_speed:function(){return null!=this.__video?this.__video.playbackRate:1},set_speed:function(a){return null!=this.__video?this.__video.playbackRate=a:a},__class__:fn,__properties__:{set_speed:"set_speed",get_speed:"get_speed",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}});
var id=function(){za.call(this);this.client=this;this.objectEncoding=id.defaultObjectEncoding};k["openfl.net.SharedObject"]=id;id.__name__="openfl.net.SharedObject";id.getLocal=function(a,b,c){c=" ~%&\\;:\"',<>?#".split("");var d=!0;if(null==a||""==a)d=!1;else for(var e=0;e<c.length;){var f=c[e];++e;if(-1<a.indexOf(f)){d=!1;break}}if(!d)throw new wc("Error #2134: Cannot create SharedObject.");null==id.__sharedObjects&&(id.__sharedObjects=new ia,null!=rd.current&&rd.current.onExit.add(id.application_onExit));
c=b+"/"+a;if(!Object.prototype.hasOwnProperty.call(id.__sharedObjects.h,c)){d=null;try{var g=Qg.getLocalStorage();null==b&&(null!=g&&(d=g.getItem(window.location.href+":"+a),g.removeItem(window.location.href+":"+a)),b=window.location.pathname);null!=g&&null==d&&(d=g.getItem(b+":"+a))}catch(m){xb.lastError=m}g=new id;g.data={};g.__localPath=b;g.__name=a;if(null!=d&&""!=d)try{var h=new Fe(d);h.setResolver({resolveEnum:Ia.resolveEnum,resolveClass:id.__resolveClass});g.data=h.unserialize()}catch(m){xb.lastError=
m}id.__sharedObjects.h[c]=g}return id.__sharedObjects.h[c]};id.getRemote=function(a,b,c,d){Ec.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:808,className:"openfl.net.SharedObject",methodName:"getRemote"});return null};id.__getPath=function(a,b){a=Qa.get_applicationStorageDirectory()+"/"+a+"/";b=R.replace(b,"//","/");b=R.replace(b,"//","/");R.startsWith(b,"/")&&(b=I.substr(b,1,null));R.endsWith(b,"/")&&(b=b.substring(0,b.length-1));if(-1<b.indexOf("/")){var c=b.split("/");b="";for(var d=
0,e=c.length-1;d<e;){var f=d++;b+="#"+c[f]+"/"}b+=c[c.length-1]}return a+b+".sol"};id.__mkdir=function(a){};id.__resolveClass=function(a){return null!=a?(R.startsWith(a,"neash.")&&(a=R.replace(a,"neash.","openfl.")),R.startsWith(a,"native.")&&(a=R.replace(a,"native.","openfl.")),R.startsWith(a,"flash.")&&(a=R.replace(a,"flash.","openfl.")),R.startsWith(a,"openfl._v2.")&&(a=R.replace(a,"openfl._v2.","openfl.")),R.startsWith(a,"openfl._legacy.")&&(a=R.replace(a,"openfl._legacy.","openfl.")),k[a]):null};
id.application_onExit=function(a){a=id.__sharedObjects.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].flush()};id.__super__=za;id.prototype=u(za.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,__name:null,clear:function(){this.data={};try{var a=Qg.getLocalStorage();null!=a&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){xb.lastError=b}},close:function(){},connect:function(a,b){Ec.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,
className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(0==X.fields(this.data).length)return 0;a=ye.run(this.data);try{var b=Qg.getLocalStorage();null!=b&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+":"+this.__name,a))}catch(c){return xb.lastError=c,1}return 0},send:function(a){Ec.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:824,className:"openfl.net.SharedObject",methodName:"send"})},setDirty:function(a){},setProperty:function(a,
b){null!=this.data&&(this.data[a]=b)},get_size:function(){try{var a=ye.run(this.data);return ib.ofString(a).length}catch(b){return xb.lastError=b,0}},__class__:id,__properties__:{get_size:"get_size"}});var kh=function(a){za.call(this);this.bytesTotal=this.bytesLoaded=0;this.dataFormat=1;null!=a&&this.load(a)};k["openfl.net.URLLoader"]=kh;kh.__name__="openfl.net.URLLoader";kh.__super__=za;kh.prototype=u(za.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,close:function(){null!=
this.__httpRequest&&this.__httpRequest.cancel()},load:function(a){var b=this,c=new la("open");this.dispatchEvent(c);0==this.dataFormat?(c=new vm,this.__prepareRequest(c,a),c.load().onProgress(r(this,this.httpRequest_onProgress)).onError(r(this,this.httpRequest_onError)).onComplete(function(a){b.__dispatchStatus();b.data=a;a=new la("complete");b.dispatchEvent(a)})):(c=new Oj,this.__prepareRequest(c,a),c.load().onProgress(r(this,this.httpRequest_onProgress)).onError(r(this,this.httpRequest_onError)).onComplete(function(a){b.__dispatchStatus();
b.data=a;a=new la("complete");b.dispatchEvent(a)}))},__dispatchStatus:function(){var a=new bi("httpStatus",!1,!1,this.__httpRequest.responseStatus);a.responseURL=this.__httpRequest.uri;var b=[];if(this.__httpRequest.enableResponseHeaders&&null!=this.__httpRequest.responseHeaders)for(var c=0,d=this.__httpRequest.responseHeaders;c<d.length;){var e=d[c];++c;b.push(new hp(e.name,e.value))}a.responseHeaders=b;this.dispatchEvent(a)},__prepareRequest:function(a,b){this.__httpRequest=a;this.__httpRequest.uri=
b.url;this.__httpRequest.method=b.method;if(null!=b.data)if(Ia.typeof(b.data)==Ca.TObject){var c=X.fields(b.data);for(a=0;a<c.length;){var d=c[a];++a;this.__httpRequest.formData.h[d]=X.field(b.data,d)}}else this.__httpRequest.data=b.data instanceof ib?b.data:ib.ofString(A.string(b.data));this.__httpRequest.contentType=b.contentType;if(null!=b.requestHeaders)for(a=0,c=b.requestHeaders;a<c.length;)d=c[a],++a,this.__httpRequest.headers.push(new fm(d.name,d.value));this.__httpRequest.followRedirects=
b.followRedirects;this.__httpRequest.timeout=b.idleTimeout|0;this.__httpRequest.manageCookies=b.manageCookies;this.__httpRequest.userAgent=b.userAgent;this.__httpRequest.enableResponseHeaders=!0},httpRequest_onError:function(a){this.__dispatchStatus();var b=403==a?new Vi("securityError"):new lg("ioError");b.text=A.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=new Bg("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:kh});var Mg=function(a){null!=
a&&(this.url=a);this.contentType=null;this.followRedirects=zh.followRedirects;this.idleTimeout=0<zh.idleTimeout?zh.idleTimeout:3E4;this.manageCookies=zh.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=zh.userAgent};k["openfl.net.URLRequest"]=Mg;Mg.__name__="openfl.net.URLRequest";Mg.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:Mg};var zh=function(){};k["openfl.net.URLRequestDefaults"]=
zh;zh.__name__="openfl.net.URLRequestDefaults";var hp=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};k["openfl.net.URLRequestHeader"]=hp;hp.__name__="openfl.net.URLRequestHeader";hp.prototype={name:null,value:null,__class__:hp};var Nr={_new:function(a){var b={};null!=a&&Nr.decode(b,a);return b},decode:function(a,b){for(var c=X.fields(a),d=0;d<c.length;){var e=c[d];++d;X.deleteField(a,e)}c=b.split(";").join("&").split("&");for(d=0;d<c.length;)if(e=c[d],++d,b=e.indexOf("="),
0<b){var f=I.substr(e,0,b);f=decodeURIComponent(f.split("+").join(" "));e=I.substr(e,b+1,null);a[f]=decodeURIComponent(e.split("+").join(" "))}else 0!=b&&(a[decodeURIComponent(e.split("+").join(" "))]="")},toString:function(a){for(var b=[],c=X.fields(a),d=0;d<c.length;){var e=c[d];++d;var f=X.field(a,e);if(-1<e.indexOf("[]")&&f instanceof Array){var g=[];for(f=E(f);f.hasNext();){var h=f.next();g.push(encodeURIComponent(h))}g=g.join("&amp;"+e+"=");b.push(encodeURIComponent(e)+"="+g)}else b.push(encodeURIComponent(e)+
"="+encodeURIComponent(f))}return b.join("&")},__get:function(a,b){return X.field(a,b)},__set:function(a,b,c){a[b]=c}},Li=function(a){this.parentDomain=null!=a?a:Li.currentDomain};k["openfl.system.ApplicationDomain"]=Li;Li.__name__="openfl.system.ApplicationDomain";Li.prototype={parentDomain:null,getDefinition:function(a){return k[a]},hasDefinition:function(a){return null!=k[a]},__class__:Li};var vc=function(){};k["openfl.system.Capabilities"]=vc;vc.__name__="openfl.system.Capabilities";vc.__properties__=
{get_version:"get_version",get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX",get_screenDPI:"get_screenDPI",get_pixelAspectRatio:"get_pixelAspectRatio",get_os:"get_os",get_manufacturer:"get_manufacturer",get_language:"get_language",get_cpuArchitecture:"get_cpuArchitecture"};vc.hasMultiChannelAudio=function(a){return!1};vc.get_cpuArchitecture=function(){return"x86"};vc.get_language=function(){var a=Qe.get_language(Qe.get_currentLocale());if(null!=a)switch(a=
a.toLowerCase(),a){case "cs":case "da":case "de":case "en":case "es":case "fi":case "fr":case "hu":case "it":case "ja":case "ko":case "nb":case "nl":case "pl":case "pt":case "ru":case "sv":case "tr":return a;case "zh":a=Qe.get_region(Qe.get_currentLocale());if(null!=a)switch(a.toUpperCase()){case "HANT":case "TW":return"zh-TW"}return"zh-CN";default:return"xu"}return"en"};vc.get_manufacturer=function(){var a=Qa.get_platformName();return"OpenFL"+(null!=a?" "+a:"")};vc.get_os=function(){var a=Qa.get_platformLabel();
return null!=a?a:""};vc.get_pixelAspectRatio=function(){return 1};vc.get_screenDPI=function(){var a=null!=Ec.application?Ec.application.__window:null,b=72;null!=a&&(b*=a.__scale);return b};vc.get_screenResolutionX=function(){var a=Ec.current.stage,b=0;if(null==a)return 0;if(null!=a.window){var c=a.window.get_display();null!=c&&(b=Math.ceil(c.currentMode.width*a.window.__scale))}return 0<b?b:a.stageWidth};vc.get_screenResolutionY=function(){var a=Ec.current.stage,b=0;if(null==a)return 0;if(null!=a.window){var c=
a.window.get_display();null!=c&&(b=Math.ceil(c.currentMode.height*a.window.__scale))}return 0<b?b:a.stageHeight};vc.get_version=function(){return"WEB "+(R.replace("9.2.0",".",",")+",0")};var Jr=function(a,b,c){null==a&&(a=!1);this.checkPolicyFile=a;this.securityDomain=c;this.applicationDomain=b;this.allowLoadBytesCodeExecution=this.allowCodeImport=!0};k["openfl.system.LoaderContext"]=Jr;Jr.__name__="openfl.system.LoaderContext";Jr.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,
checkPolicyFile:null,securityDomain:null,__class__:Jr};var ck=function(){};k["openfl.system.SecurityDomain"]=ck;ck.__name__="openfl.system.SecurityDomain";ck.prototype={__class__:ck};var dg=function(){};k["openfl.system.System"]=dg;dg.__name__="openfl.system.System";dg.__properties__={get_vmVersion:"get_vmVersion",get_totalMemory:"get_totalMemory"};dg.disposeXML=function(a){};dg.exit=function(a){Qa.exit(a)};dg.gc=function(){};dg.pause=function(){Ec.notImplemented({fileName:"openfl/system/System.hx",
lineNumber:213,className:"openfl.system.System",methodName:"pause"})};dg.resume=function(){Ec.notImplemented({fileName:"openfl/system/System.hx",lineNumber:229,className:"openfl.system.System",methodName:"resume"})};dg.setClipboard=function(a){he.set_text(a)};dg.get_totalMemory=function(){return window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:0};dg.get_vmVersion=function(){return"1.0.0"};var Rc=function(a){Id.call(this,a)};k["openfl.text.Font"]=Rc;Rc.__name__=
"openfl.text.Font";Rc.enumerateFonts=function(a){return Rc.__registeredFonts};Rc.fromBytes=function(a){var b=new Rc;b.__fromBytes(Ab.toBytes(a));return b};Rc.fromFile=function(a){if(null==a)return null;var b=new Rc;b.__fromFile(a);return b};Rc.loadFromBytes=function(a){return Id.loadFromBytes(Ab.toBytes(a)).then(function(a){var b=new Rc;b.__fromLimeFont(a);return eb.withValue(b)})};Rc.loadFromFile=function(a){return Id.loadFromFile(a).then(function(a){var b=new Rc;b.__fromLimeFont(a);return eb.withValue(b)})};
Rc.loadFromName=function(a){return Id.loadFromName(a).then(function(a){var b=new Rc;b.__fromLimeFont(a);return eb.withValue(b)})};Rc.registerFont=function(a){a=null==U.getClass(a)?U.__cast(Ia.createInstance(a,[]),Rc):U.__cast(a,Rc);null!=a&&(Rc.__registeredFonts.push(a),Rc.__fontByName.h[a.name]=a)};Rc.__super__=Id;Rc.prototype=u(Id.prototype,{fontStyle:null,fontType:null,__initialized:null,__fromLimeFont:function(a){this.__copyFrom(a)},__initialize:function(){return this.__initialized},get_fontName:function(){return this.name},
set_fontName:function(a){return this.name=a},__class__:Rc,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var gn=function(){za.call(this);this.clear()};k["openfl.text.StyleSheet"]=gn;gn.__name__="openfl.text.StyleSheet";gn.__super__=za;gn.prototype=u(za.prototype,{__styleNames:null,__styleNamesDirty:null,__styles:null,clear:function(){this.__styleNamesDirty=!1;this.__styleNames=null;this.__styles=new ia},getStyle:function(a){a=a.toLowerCase();return Object.prototype.hasOwnProperty.call(this.__styles.h,
a)?this.__styles.h[a]:null},parseCSS:function(a){var b=new ia;b.h.silent=!0;b=(new ip(b)).parse(a);if(null!=b)for(a=b.h.rules,b=0;b<a.length;){var c=a[b];++b;var d=Object.prototype.hasOwnProperty.call(c.h,"selectors")?c.h.selectors:null;if(null!=d&&(d=d.toLowerCase(),Object.prototype.hasOwnProperty.call(this.__styles.h,d)||(this.__styles.h[d]={},this.__styleNamesDirty=!0),d=this.__styles.h[d],c=c.h.declarations,null!=c))for(var e=0;e<c.length;){var f=c[e];++e;var g=f.h.property;f=A.string(f.h.value);
if(null!=g)if(null==g)d[g]=f;else switch(g){case "font-family":f=R.replace(f,'"',"");g=d;null!=g&&X.setProperty(g,"fontFamily",f);break;case "font-size":g=d;null!=g&&X.setProperty(g,"fontSize",f);break;case "font-style":g=d;null!=g&&X.setProperty(g,"fontStyle",f);break;case "font-weight":g=d;null!=g&&X.setProperty(g,"fontWeight",f);break;case "letter-spacing":g=d;null!=g&&X.setProperty(g,"letterSpacing",f);break;case "margin-left":g=d;null!=g&&X.setProperty(g,"marginLeft",f);break;case "text-align":g=
d;null!=g&&X.setProperty(g,"textAlign",f);break;case "text-decoration":g=d;null!=g&&X.setProperty(g,"textDecoration",f);break;case "text-indent":g=d;null!=g&&X.setProperty(g,"textIndent",f);break;default:d[g]=f}}}},setStyle:function(a,b){a=a.toLowerCase();if(null==b)Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&(b=this.__styles,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]);else{for(var c={},d=0,e=X.fields(b);d<e.length;){var f=e[d];++d;c[f]=X.field(b,f)}this.__styles.h[a]=
c}},transform:function(a){var b=new tg;this.__applyStyleObject(a,b);return b},__applyStyle:function(a,b){a=a.toLowerCase();Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&this.__applyStyleObject(this.__styles.h[a],b)},__applyStyleObject:function(a,b){if(null!=a){var c=new aa("[0-9A-Fa-f]+",""),d=new aa("[0-9]+","");var e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"color")?(e=je.__get(a,"color"),e=c.match(null==e?null:A.string(e))):e=!1;e&&(b.color=A.parseInt("0x"+c.matched(0)));e=
a;null!=e&&Object.prototype.hasOwnProperty.call(e,"fontFamily")&&(e=je.__get(a,"fontFamily"),b.font=this.__parseFont(null==e?null:A.string(e)));e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"fontSize")?(e=je.__get(a,"fontSize"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.size=A.parseInt(d.matched(0)));e=a;if(null!=e&&Object.prototype.hasOwnProperty.call(e,"fontStyle"))switch(je.__get(a,"fontStyle")){case "italic":b.italic=!0;break;case "normal":b.italic=!1}e=a;if(null!=e&&Object.prototype.hasOwnProperty.call(e,
"fontWeight"))switch(je.__get(a,"fontWeight")){case "bold":b.bold=!0;break;case "normal":b.bold=!1}e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"leading")?(e=je.__get(a,"leading"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.leading=A.parseInt(d.matched(0)));e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"letterSpacing")?(e=je.__get(a,"letterSpacing"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.letterSpacing=parseFloat(d.matched(0)));e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,
"marginLeft")?(e=je.__get(a,"marginLeft"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.leftMargin=A.parseInt(d.matched(0)));e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"marginRight")?(e=je.__get(a,"marginRight"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.rightMargin=A.parseInt(d.matched(0)));e=a;if(null!=e&&Object.prototype.hasOwnProperty.call(e,"textAlign"))switch(je.__get(a,"textAlign")){case "center":b.align=0;break;case "justify":b.align=2;break;case "left":b.align=3;break;case "right":b.align=
4}e=a;if(null!=e&&Object.prototype.hasOwnProperty.call(e,"textDecoration"))switch(je.__get(a,"textDecoration")){case "none":b.underline=!1;break;case "underline":b.underline=!0}e=a;null!=e&&Object.prototype.hasOwnProperty.call(e,"textIndent")?(e=je.__get(a,"textIndent"),e=d.match(null==e?null:A.string(e))):e=!1;e&&(b.blockIndent=A.parseInt(d.matched(0)))}},__parseFont:function(a){if(null==a)return null;-1<a.indexOf(",")&&(a=I.substr(a,0,a.indexOf(",")));switch(a){case "mono":return"_typewriter";case "sans-serif":return"_sans";
case "serif":return"_serif";default:return a}},get_styleNames:function(){if(null==this.__styleNames||this.__styleNamesDirty){this.__styleNames=[];for(var a=Object.keys(this.__styles.h),b=a.length,c=0;c<b;){var d=a[c++];this.__styleNames.push(d)}this.__styleNamesDirty=!1}return this.__styleNames},__class__:gn,__properties__:{get_styleNames:"get_styleNames"}});var ef=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;this.__mouseScrollVCounter=0;this.condenseWhite=!1;D.call(this);
this.__drawableType=7;this.__selectionIndex=this.__caretIndex=-1;this.__displayAsPassword=!1;this.__graphics=new Te(this);this.__textEngine=new Qb(this);this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";this.doubleClickEnabled=!0;null==ef.__defaultTextFormat&&(ef.__defaultTextFormat=new tg("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,0,0),ef.__defaultTextFormat.blockIndent=0,ef.__defaultTextFormat.bullet=!1,ef.__defaultTextFormat.letterSpacing=0,ef.__defaultTextFormat.kerning=
!1);this.__textFormat=ef.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new Se(this.__textFormat,0,0));this.addEventListener("mouseDown",r(this,this.this_onMouseDown));this.addEventListener("focusIn",r(this,this.this_onFocusIn));this.addEventListener("focusOut",r(this,this.this_onFocusOut));this.addEventListener("keyDown",r(this,this.this_onKeyDown));this.addEventListener("mouseWheel",r(this,this.this_onMouseWheel));this.addEventListener("doubleClick",r(this,this.this_onDoubleClick))};
k["openfl.text.TextField"]=ef;ef.__name__="openfl.text.TextField";ef.__super__=D;ef.prototype=u(D.prototype,{condenseWhite:null,__bounds:null,__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseScrollVCounter:null,__mouseWheelEnabled:null,__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__styleSheet:null,__text:null,__htmlText:null,__textEngine:null,__textFormat:null,__div:null,
__renderedOnCanvasWhileOnDOM:null,__forceCachedBitmapUpdate:null,appendText:function(a){null!=a&&""!=a&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text+a),this.__selectionIndex=this.__caretIndex=this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end=this.__text.length)},getCharBoundaries:function(a){if(0>a||a>this.__text.length-1)return null;var b=new fa;return this.__getCharBoundaries(a,
b)?b:null},getCharIndexAtPoint:function(a,b){if(2>=a||a>this.get_width()+4||0>=b||b>this.get_height()+4)return-1;this.__updateLayout();a+=this.get_scrollH();for(var c=0,d=this.get_scrollV()-1;c<d;){var e=c++;b+=this.__textEngine.lineHeights.get(e)}for(c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var f=c.next();if(b>=f.offsetY&&b<=f.offsetY+f.height&&a>=f.offsetX&&a<=f.offsetX+f.width){c=b=0;for(d=f.positions.length;c<d;)if(e=c++,b+=f.positions[e],a<=f.offsetX+b)return f.startIndex+e;
return f.endIndex}}return-1},getFirstCharInParagraph:function(a){if(0>a||a>this.get_text().length)return-1;if(0==this.__textEngine.lineBreaks.get_length())return 0;for(var b=0,c=this.__textEngine.lineBreaks.get_length();b<c;){var d=b++;if(a<=this.__textEngine.lineBreaks.get(d))return 0==d?0:this.__textEngine.lineBreaks.get(d-1)+1}return this.__textEngine.lineBreaks.get(this.__textEngine.lineBreaks.get_length()-1)+1},getLineIndexAtPoint:function(a,b){this.__updateLayout();if(2>=a||a>this.get_width()+
4||0>=b||b>this.get_height()+4)return-1;a=0;for(var c=this.get_scrollV()-1;a<c;){var d=a++;b+=this.__textEngine.lineHeights.get(d)}for(a=this.__textEngine.layoutGroups.iterator();a.hasNext();)if(c=a.next(),b>=c.offsetY&&b<=c.offsetY+c.height)return c.lineIndex;return-1},getLineIndexOfChar:function(a){if(0>a||a>this.__text.length)return-1;this.__updateLayout();for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.startIndex<=a&&c.endIndex>=a)return c.lineIndex}return-1},
getLineLength:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-1)return 0;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var e=d.next();if(e.lineIndex==a)-1==b&&(b=e.startIndex);else if(e.lineIndex==a+1){c=e.startIndex;break}}-1==c&&(c=this.__text.length);return c-b},getLineMetrics:function(a){this.__updateLayout();var b=this.__textEngine.lineAscents.get(a),c=this.__textEngine.lineDescents.get(a),d=this.__textEngine.lineLeadings.get(a),e=this.__textEngine.lineHeights.get(a);
a=this.__textEngine.lineWidths.get(a);switch(this.__textFormat.align){case 0:var f=(this.__textEngine.width-a)/2;break;case 1:case 4:f=this.__textEngine.width-a-2;break;case 2:case 3:case 5:f=2}return new jp(f,a,e,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-1)return-1;for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.lineIndex==a)return c.startIndex}return 0},getLineText:function(a){this.__updateLayout();if(0>a||
a>this.__textEngine.numLines-1)return null;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var e=d.next();if(e.lineIndex==a)-1==b&&(b=e.startIndex);else if(e.lineIndex==a+1){c=e.startIndex;break}}-1==c&&(c=this.__text.length);return this.__textEngine.text.substring(b,c)},getParagraphLength:function(a){if(0>a||a>this.get_text().length)return-1;var b=this.getFirstCharInParagraph(a);if(a>=this.get_text().length)return this.get_text().length-b+1;a=this.__textEngine.getLineBreakIndex(a)+
1;0==a&&(a=this.__text.length);return a-b},getTextFormat:function(a,b){null==b&&(b=-1);null==a&&(a=-1);var c=null;if(a>=this.get_text().length||-1>a||b>this.get_text().length||-1>b)throw new Bh("The supplied index is out of bounds");-1==a&&(a=0);-1==b&&(b=this.get_text().length);if(a>=b)return new tg;for(var d=this.__textEngine.textFormatRanges.iterator();d.hasNext();){var e=d.next();if(e.start<=a&&e.end>a||e.start<b&&e.end>=b)null==c?c=e.format.clone():(e.format.font!=c.font&&(c.font=null),e.format.size!=
c.size&&(c.size=null),e.format.color!=c.color&&(c.color=null),e.format.bold!=c.bold&&(c.bold=null),e.format.italic!=c.italic&&(c.italic=null),e.format.underline!=c.underline&&(c.underline=null),e.format.url!=c.url&&(c.url=null),e.format.target!=c.target&&(c.target=null),e.format.align!=c.align&&(c.align=null),e.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),e.format.rightMargin!=c.rightMargin&&(c.rightMargin=null),e.format.indent!=c.indent&&(c.indent=null),e.format.leading!=c.leading&&(c.leading=
null),e.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),e.format.bullet!=c.bullet&&(c.bullet=null),e.format.kerning!=c.kerning&&(c.kerning=null),e.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),e.format.tabStops!=c.tabStops&&(c.tabStops=null))}null==c&&(c=new tg);return c},replaceSelectedText:function(a){this.__replaceSelectedText(a,!1)},replaceText:function(a,b,c){this.__replaceText(a,b,c,!1)},setSelection:function(a,b){this.__selectionIndex=a;this.__caretIndex=b;this.__updateScrollV();
this.__updateScrollH();null!=this.stage&&this.stage.get_focus()==this&&(this.__stopCursorTimer(),this.__startCursorTimer())},setTextFormat:function(a,b,c){null==c&&(c=-1);null==b&&(b=-1);var d=this.get_text().length;-1==b?(-1==c&&(c=d),b=0):-1==c&&(c=b+1);if(b!=c){if(0>b||0>=c||c<b||b>=d||c>d)throw new Bh;if(0==b&&c==d){this.__textEngine.textFormatRanges.set_length(1);var e=this.__textEngine.textFormatRanges.get(0);e.start=0;e.end=d;e.format.__merge(a)}else{d=0;for(var f;d<this.__textEngine.textFormatRanges.get_length();)if(e=
this.__textEngine.textFormatRanges.get(d),e.end<=b)++d;else if(e.start>=c)break;else if(e.start<=b&&e.end>=c)if(e.start==b&&e.end==c){e.format=e.format.clone();e.format.__merge(a);break}else if(e.start==b)f=new Se(e.format.clone(),b,c),f.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d,f),e.start=c,d+=2;else{e.end==c?(f=new Se(e.format.clone(),b,c),f.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,f)):(f=new Se(e.format.clone(),b,c),f.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+
1,f),f=new Se(e.format.clone(),c,e.end),this.__textEngine.textFormatRanges.insertAt(d+2,f));e.end=b;break}else if(e.start>=b&&e.end<=c)e.start==b?(e.format=e.format.clone(),e.format.__merge(a),e.end=c):this.__textEngine.textFormatRanges.removeAt(d);else if(e.start>b&&e.end>b){e.start=c;break}else e.start<b&&e.end<=c?(f=new Se(e.format.clone(),b,c),f.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,f),e.end=b,d+=2):(++d,Q.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",
{fileName:"openfl/text/TextField.hx",lineNumber:1564,className:"openfl.text.TextField",methodName:"setTextFormat"}))}this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__allowMouseFocus:function(){return this.mouseEnabled},__caretBeginningOfLine:function(){this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))},__caretBeginningOfNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=
a<this.__textEngine.numLines-1?this.getLineOffset(a+1):this.__text.length},__caretBeginningOfPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);if(0<a){var b=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex));this.__caretIndex=this.__caretIndex==b?this.getLineOffset(a-1):b}},__caretEndOfLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1)-1:this.__text.length},__caretNextCharacter:function(){this.__caretIndex<
this.__text.length&&this.__caretIndex++},__caretNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);a<this.__textEngine.numLines-1&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a+1))},__caretPreviousCharacter:function(){0<this.__caretIndex&&this.__caretIndex--},__caretPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);0<a&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a-1))},__disableInput:function(){this.__inputEnabled&&
null!=this.stage&&(this.stage.window.__backend.setTextInputEnabled(!1),this.stage.window.onTextInput.remove(r(this,this.window_onTextInput)),this.stage.window.onKeyDown.remove(r(this,this.window_onKeyDown)),this.__inputEnabled=!1,this.__stopCursorTimer())},__dispatch:function(a){if(2==a.eventPhase&&"mouseUp"==a.type){var b=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);null!=b&&(b=b.format.url,null!=b&&""!=b&&(R.startsWith(b,"event:")?this.dispatchEvent(new cf("link",!0,!1,I.substr(b,6,null))):
Da.getURL(new Mg(b))))}return D.prototype.__dispatch.call(this,a)},__enableInput:function(){if(null!=this.stage){var a=this.getBounds(this.stage);a=new Dd(a.x,a.y,a.width,a.height);this.stage.window.setTextInputRect(a);this.stage.window.__backend.setTextInputEnabled(!0);this.__inputEnabled||(this.stage.window.__backend.setTextInputEnabled(!0),this.stage.window.onTextInput.has(r(this,this.window_onTextInput))||(this.stage.window.onTextInput.add(r(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(r(this,
this.window_onKeyDown))),this.__inputEnabled=!0,this.__startCursorTimer())}},__getAdvance:function(a){return a},__getBounds:function(a,b){this.__updateLayout();var c=fa.__pool.get();c.copyFrom(this.__textEngine.bounds);c.offset(this.__offsetX,this.__offsetY);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);fa.__pool.release(c)},__getCharBoundaries:function(a,b){if(0>a||a>this.__text.length-1)return!1;this.__updateLayout();for(var c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var d=
c.next();if(a>=d.startIndex&&a<d.endIndex)try{for(var e=d.offsetX,f=0,g=a-d.startIndex;f<g;){var h=f++;e+=d.positions[h]}b.setTo(e,d.offsetY,d.positions[a-d.startIndex],d.ascent+d.descent);return!0}catch(m){xb.lastError=m}}return!1},__getCharIndexOnDifferentLine:function(a,b){if(0>a||a>this.__text.length||0>b||b>this.__textEngine.numLines-1)return-1;for(var c=null,d=null,e=this.__textEngine.layoutGroups.iterator();e.hasNext();){var f=e.next();if(a>=f.startIndex&&a<=f.endIndex){c=f.offsetX;for(var g=
0,h=a-f.startIndex;g<h;){var m=g++;c+=f.positions[m]}if(null!=d)return this.__getPosition(c,d)}if(f.lineIndex==b){d=f.offsetY+f.height/2;f=0;for(g=this.get_scrollV()-1;f<g;)h=f++,d-=this.__textEngine.lineHeights.get(h);if(null!=c)return this.__getPosition(c,d)}}return-1},__getCursor:function(){var a=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);return null!=a&&""!=a.format.url?"button":this.__textEngine.selectable?"ibeam":null},__getGroup:function(a,b,c){null==c&&(c=!1);this.__updateLayout();
a+=this.get_scrollH();for(var d=0,e=this.get_scrollV()-1;d<e;){var f=d++;b+=this.__textEngine.lineHeights.get(f)}!c&&b>this.__textEngine.textHeight&&(b=this.__textEngine.textHeight);var g=!0;d=0;for(e=this.__textEngine.layoutGroups.get_length();d<e;){f=d++;var h=this.__textEngine.layoutGroups.get(f);f=f<this.__textEngine.layoutGroups.get_length()-1?this.__textEngine.layoutGroups.get(f+1):null;g&&(b<h.offsetY&&(b=h.offsetY),a<h.offsetX&&(a=h.offsetX),g=!1);if(b>=h.offsetY&&b<=h.offsetY+h.height||!c&&
null==f)if(a>=h.offsetX&&a<=h.offsetX+h.width||!c&&(null==f||f.lineIndex!=h.lineIndex))return h}return null},__getPosition:function(a,b){b=this.__getGroup(a,b);if(null==b)return this.__text.length;for(var c=0,d=0,e=b.positions.length;d<e;){var f=d++;c+=b.positions[f];if(a<=b.offsetX+c){if(a<=b.offsetX+(c-b.positions[f])+b.positions[f]/2)return b.startIndex+f;if(b.startIndex+f<b.endIndex)return b.startIndex+f+1;break}}return b.endIndex},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||
e&&!this.mouseEnabled||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();this.__updateLayout();c=this.__renderTransform;e=c.a*c.d-c.b*c.c;var g=0==e?-c.tx:1/e*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;e=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(g,0==e?-c.ty:1/e*(c.a*(b-c.ty)+c.b*(c.tx-a)))?(null!=d&&d.push(f),!0):!1},__hitTestMask:function(a,b){this.__getRenderTransform();this.__updateLayout();var c=this.__renderTransform,d=c.a*
c.d-c.b*c.c,e=0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(e,0==d?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a)))?!0:!1},__replaceSelectedText:function(a,b){null==b&&(b=!0);null==a&&(a="");if(""!=a||this.__selectionIndex!=this.__caretIndex){var c=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex,d=this.__caretIndex>this.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(!(c==d&&0<this.__textEngine.maxChars&&
this.__text.length==this.__textEngine.maxChars)){c>this.__text.length&&(c=this.__text.length);d>this.__text.length&&(d=this.__text.length);if(d<c){var e=d;d=c;c=e}0>c&&(c=0);this.__replaceText(c,d,a,b)}}},__replaceText:function(a,b,c,d){if(!(b<a||0>a||b>this.__text.length||null==c)){d&&(c=this.__textEngine.restrictText(c),0<this.__textEngine.maxChars&&(d=this.__textEngine.maxChars-this.__text.length+(b-a),0>=d?c="":d<c.length&&(c=I.substr(c,0,d))));this.__updateText(this.__text.substring(0,a)+c+this.__text.substring(b));
d=c.length-(b-a);for(var e=0,f;e<this.__textEngine.textFormatRanges.get_length();){f=this.__textEngine.textFormatRanges.get(e);if(a==b)f.start==f.end?0!=f.start?Q.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"openfl/text/TextField.hx",lineNumber:2069,className:"openfl.text.TextField",methodName:"__replaceText"}):f.end+=d:f.end>=a&&(f.start>=a?(f.start+=d,f.end+=d):f.start<a&&f.end>=b&&(f.end+=
d));else if(f.end>a)if(f.start>b)f.start+=d,f.end+=d;else if(f.start<=a&&f.end>b)f.end+=d;else if(f.start>=a&&f.end<=b){f=this.__textEngine.textFormatRanges;f.__tempIndex=e--;for(var g=0,h=[];g<h.length;){var m=h[g++];f.insertAt(f.__tempIndex,m);f.__tempIndex++}f.splice(f.__tempIndex,1)}else f.end>b&&f.start>a&&f.start<=b?(f.start=a,f.end+=d):f.start<a&&f.end>a&&f.end<=b&&(f.end=a);++e}0==this.__textEngine.textFormatRanges.get_length()?this.__textEngine.textFormatRanges.push(new Se(this.get_defaultTextFormat().clone(),
0,c.length)):a==b&&0<this.__textEngine.textFormatRanges.get(0).start?this.__textEngine.textFormatRanges.unshift(new Se(this.get_defaultTextFormat().clone(),0,this.__textEngine.textFormatRanges.get(0).start)):a!=b&&this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end<this.__text.length&&this.__textEngine.textFormatRanges.push(new Se(this.get_defaultTextFormat().clone(),this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end,
this.__text.length));this.__selectionIndex=this.__caretIndex=a+c.length;this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__startCursorTimer:function(){1==this.get_type()?(this.__cursorTimer=Oe.delay(r(this,this.__startCursorTimer),600),this.__showCursor=!this.__showCursor,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())):this.get_selectable()&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()))},__startTextInput:function(){0>this.__caretIndex&&(this.__selectionIndex=this.__caretIndex=this.__text.length);(ab.__supportDOM?this.__renderedOnCanvasWhileOnDOM:1)&&this.__enableInput()},__stopCursorTimer:function(){null!=this.__cursorTimer&&(this.__cursorTimer.stop(),this.__cursorTimer=null);this.__showCursor&&(this.__showCursor=!1,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},__stopTextInput:function(){(ab.__supportDOM?
this.__renderedOnCanvasWhileOnDOM:1)&&this.__disableInput()},__updateLayout:function(){if(this.__layoutDirty){var a=this.__textEngine.width;this.__textEngine.update();if(2!=this.__textEngine.autoSize){if(this.__textEngine.width!=a)switch(this.__textEngine.autoSize){case 0:this.set_x(this.get_x()+(a-this.__textEngine.width)/2);break;case 3:this.set_x(this.get_x()+(a-this.__textEngine.width))}this.__textEngine.getBounds()}this.__layoutDirty=!1;this.setSelection(this.__selectionIndex,this.__caretIndex)}},
__updateScrollH:function(){this.__updateLayout();if(this.get_textWidth()<=this.get_width()-4)this.set_scrollH(0);else{var a=this.get_scrollH();if(0==this.__caretIndex||this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))==this.__caretIndex)a=0;else{var b=fa.__pool.get(),c=!1;this.__caretIndex<this.__text.length&&(c=this.__getCharBoundaries(this.__caretIndex,b));c||(this.__getCharBoundaries(this.__caretIndex-1,b),b.x+=b.width);for(;b.x<a&&0<a;)a-=24;for(;b.x>a+this.get_width()-4;)a+=24;fa.__pool.release(b)}0<
a&&1!=this.get_type()&&(b=this.getLineLength(this.getLineIndexOfChar(this.__caretIndex)),this.get_scrollH()+this.get_width()-4>b&&this.set_scrollH(Math.ceil(b-this.get_width()+4)));0>a?this.set_scrollH(0):a>this.get_maxScrollH()?this.set_scrollH(this.get_maxScrollH()):this.set_scrollH(a)}},__updateScrollV:function(){this.__updateLayout();if(this.get_textHeight()<=this.get_height()-4)this.set_scrollV(1);else{var a=this.getLineIndexOfChar(this.__caretIndex);-1==a&&0<this.__caretIndex&&(a=this.getLineIndexOfChar(this.__caretIndex-
1)+1);if(a+1<this.get_scrollV())this.set_scrollV(a+1);else if(a+1>this.get_bottomScrollV()){var b=0;for(a>=this.__textEngine.lineHeights.get_length()&&(a=this.__textEngine.lineHeights.get_length()-1);0<=a;){b+=this.__textEngine.lineHeights.get(a);if(b>this.get_height()-4){a+=0>b-this.get_height()?1:2;break}--a}this.set_scrollV(a)}else this.set_scrollV(this.get_scrollV())}},__updateMouseDrag:function(){null!=this.stage&&(this.get_mouseX()>this.get_width()-1?this.set_scrollH(this.get_scrollH()+(Math.max(Math.min(.1*
(this.get_mouseX()-this.get_width()),10),1)|0)):1>this.get_mouseX()&&this.set_scrollH(this.get_scrollH()-(Math.max(Math.min(-.1*this.get_mouseX(),10),1)|0)),this.__mouseScrollVCounter++,this.__mouseScrollVCounter>this.stage.get_frameRate()/10&&(this.get_mouseY()>this.get_height()-2?this.set_scrollV(Math.min(this.get_scrollV()+Math.max(Math.min(.03*(this.get_mouseY()-this.get_height()),5),1),this.get_maxScrollV())|0):2>this.get_mouseY()&&this.set_scrollV(this.get_scrollV()-(Math.max(Math.min(-.03*
this.get_mouseY(),5),1)|0)),this.__mouseScrollVCounter=0),this.stage_onMouseMove(null))},__updateText:function(a){ab.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=this.__text!=a);this.__textEngine.set_text(a);this.__text=this.__textEngine.text;null!=this.stage&&this.stage.get_focus()==this?(this.__text.length<this.__selectionIndex&&(this.__selectionIndex=this.__text.length),this.__text.length<this.__caretIndex&&(this.__caretIndex=this.__text.length)):this.__isHTML?
this.__selectionIndex=this.__caretIndex=this.__text.length:this.__caretIndex=this.__selectionIndex=0;if(!this.__displayAsPassword||ab.__supportDOM&&!this.__renderedOnCanvasWhileOnDOM)this.__textEngine.set_text(this.__text);else{a="";for(var b=0,c=this.get_text().length;b<c;)b++,a+="*";this.__textEngine.set_text(a)}},__updateTransforms:function(a){D.prototype.__updateTransforms.call(this,a);a=this.__renderTransform;var b=this.__offsetX,c=this.__offsetY;a.tx=b*a.a+c*a.c+a.tx;a.ty=b*a.b+c*a.d+a.ty},
get_antiAliasType:function(){return this.__textEngine.antiAliasType},set_antiAliasType:function(a){return this.__textEngine.antiAliasType=a},get_autoSize:function(){return this.__textEngine.autoSize},set_autoSize:function(a){a!=this.__textEngine.autoSize&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.autoSize=a},get_background:function(){return this.__textEngine.background},set_background:function(a){a!=this.__textEngine.background&&
(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.background=a},get_backgroundColor:function(){return this.__textEngine.backgroundColor},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.backgroundColor=a},get_border:function(){return this.__textEngine.border},set_border:function(a){a!=this.__textEngine.border&&
(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.border=a},get_borderColor:function(){return this.__textEngine.borderColor},set_borderColor:function(a){a!=this.__textEngine.borderColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.borderColor=a},get_bottomScrollV:function(){this.__updateLayout();return this.__textEngine.get_bottomScrollV()},get_caretIndex:function(){return this.__caretIndex},
get_defaultTextFormat:function(){return this.__textFormat.clone()},set_defaultTextFormat:function(a){this.__textFormat.__merge(a);this.__dirty=this.__layoutDirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_displayAsPassword:function(){return this.__displayAsPassword},set_displayAsPassword:function(a){a!=this.__displayAsPassword&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__displayAsPassword=
a,this.__updateText(this.__text));return a},get_embedFonts:function(){return this.__textEngine.embedFonts},set_embedFonts:function(a){return this.__textEngine.embedFonts=a},get_gridFitType:function(){return this.__textEngine.gridFitType},set_gridFitType:function(a){return this.__textEngine.gridFitType=a},get_height:function(){this.__updateLayout();return this.__textEngine.height*Math.abs(this.get_scaleY())},set_height:function(a){a!=this.__textEngine.height&&(this.__setTransformDirty(),this.__layoutDirty=
this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.height=a);return this.__textEngine.height*Math.abs(this.get_scaleY())},get_htmlText:function(){return this.__isHTML?this.__htmlText:this.__text},set_htmlText:function(a){this.__isHTML&&this.__text==a||(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));this.__isHTML=!0;this.condenseWhite&&(a=a.replace(/\s+/g," "));this.__htmlText=a;
a=mb.parse(a,this.get_multiline(),this.__styleSheet,this.__textFormat,this.__textEngine.textFormatRanges);this.__updateText(a);return a},get_length:function(){return null!=this.__text?this.__text.length:0},get_maxChars:function(){return this.__textEngine.maxChars},set_maxChars:function(a){a!=this.__textEngine.maxChars&&(this.__textEngine.maxChars=a,this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_maxScrollH:function(){this.__updateLayout();
return this.__textEngine.maxScrollH},get_maxScrollV:function(){this.__updateLayout();return this.__textEngine.get_maxScrollV()},get_mouseWheelEnabled:function(){return this.__mouseWheelEnabled},set_mouseWheelEnabled:function(a){return this.__mouseWheelEnabled=a},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(a){return this.__textEngine.multiline=a},get_numLines:function(){this.__updateLayout();return this.__textEngine.numLines},get_restrict:function(){return this.__textEngine.restrict},
set_restrict:function(a){this.__textEngine.restrict!=a&&(this.__textEngine.set_restrict(a),this.__updateText(this.__text));return a},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(a){this.__updateLayout();a>this.__textEngine.maxScrollH&&(a=this.__textEngine.maxScrollH);0>a&&(a=0);a!=this.__textEngine.scrollH&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.scrollH=a,this.dispatchEvent(new la("scroll")));return this.__textEngine.scrollH},
get_scrollV:function(){return this.__textEngine.get_scrollV()},set_scrollV:function(a){this.__updateLayout();if(a!=this.__textEngine.get_scrollV()||0==this.__textEngine.get_scrollV())this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.set_scrollV(a),this.dispatchEvent(new la("scroll"));return this.__textEngine.get_scrollV()},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(a){a!=this.__textEngine.selectable&&
1==this.get_type()&&(null!=this.stage&&this.stage.get_focus()==this?this.__startTextInput():a||this.__stopTextInput());return this.__textEngine.selectable=a},get_selectionBeginIndex:function(){return Math.min(this.__caretIndex,this.__selectionIndex)|0},get_selectionEndIndex:function(){return Math.max(this.__caretIndex,this.__selectionIndex)|0},get_sharpness:function(){return this.__textEngine.sharpness},set_sharpness:function(a){a!=this.__textEngine.sharpness&&(this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.sharpness=a},get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){null!=this.__styleSheet&&null==a||null==a||(this.__isHTML&&a!=this.__styleSheet&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.set_htmlText(this.__htmlText)),this.set_type(0));return this.__styleSheet=a},get_tabEnabled:function(){return null==this.__tabEnabled?
1==this.__textEngine.type:this.__tabEnabled},get_text:function(){return this.__text},set_text:function(a){if(null!=this.__styleSheet)return this.set_htmlText(a);if(this.__isHTML||this.__text!=a)this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());else return a;if(1<this.__textEngine.textFormatRanges.get_length()){var b=this.__textEngine.textFormatRanges,c=this.__textEngine.textFormatRanges.get_length()-1;b.__tempIndex=1;for(var d=0,e=[];d<e.length;){var f=
e[d++];b.insertAt(b.__tempIndex,f);b.__tempIndex++}b.splice(b.__tempIndex,c)}b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;b.start=0;b.end=a.length;this.__isHTML=!1;this.__updateText(a);return a},get_textColor:function(){return this.__textFormat.color},set_textColor:function(a){a!=this.__textFormat.color&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));for(var b=this.__textEngine.textFormatRanges.iterator();b.hasNext();)b.next().format.color=
a;return this.__textFormat.color=a},get_textWidth:function(){this.__updateLayout();return this.__textEngine.textWidth},get_textHeight:function(){this.__updateLayout();return this.__textEngine.textHeight},get_type:function(){return this.__textEngine.type},set_type:function(a){null!=this.__styleSheet&&(a=0);a!=this.__textEngine.type&&(this.__textEngine.type=a,1==a?(this.addEventListener("addedToStage",r(this,this.this_onAddedToStage)),this.this_onFocusIn(null),this.__textEngine.__useIntAdvances=!0):
(this.removeEventListener("addedToStage",r(this,this.this_onAddedToStage)),this.__stopTextInput(),this.__textEngine.__useIntAdvances=null),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.type},get_width:function(){this.__updateLayout();return this.__textEngine.width*Math.abs(this.__scaleX)},set_width:function(a){a!=this.__textEngine.width&&(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.width=a);return this.__textEngine.width*Math.abs(this.__scaleX)},get_wordWrap:function(){return this.__textEngine.wordWrap},set_wordWrap:function(a){a!=this.__textEngine.wordWrap&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.wordWrap=a},get_x:function(){return this.__transform.tx+this.__offsetX},set_x:function(a){a!=this.__transform.tx+
this.__offsetX&&this.__setTransformDirty();this.__transform.tx=a-this.__offsetX;return a},get_y:function(){return this.__transform.ty+this.__offsetY},set_y:function(a){a!=this.__transform.ty+this.__offsetY&&this.__setTransformDirty();this.__transform.ty=a-this.__offsetY;return a},stage_onMouseMove:function(a){null!=this.stage&&this.get_selectable()&&0<=this.__selectionIndex&&(this.__updateLayout(),a=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),a!=this.__caretIndex&&(this.__caretIndex=
a,a=!0,ab.__supportDOM&&(this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0),a=!1),a&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))))},stage_onMouseUp:function(a){a=a.currentTarget;a.removeEventListener("enterFrame",r(this,this.this_onEnterFrame));a.removeEventListener("mouseMove",r(this,this.stage_onMouseMove));a.removeEventListener("mouseUp",r(this,this.stage_onMouseUp));if(null!=this.stage&&a.get_focus()==this){this.__getWorldTransform();
this.__updateLayout();a=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var b=Math.max(this.__selectionIndex,a)|0;this.__selectionIndex=Math.min(this.__selectionIndex,a)|0;this.__caretIndex=b;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer(),ab.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0))}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},this_onEnterFrame:function(a){this.__updateMouseDrag()},
this_onFocusIn:function(a){1==this.get_type()&&null!=this.stage&&this.stage.get_focus()==this?this.__startTextInput():1!=this.get_type()&&this.get_selectable()&&null!=this.stage&&this.stage.get_focus()==this&&this.__startCursorTimer()},this_onFocusOut:function(a){this.__stopCursorTimer();this.__stopTextInput();this.__selectionIndex!=this.__caretIndex&&(this.__selectionIndex=this.__caretIndex,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},this_onKeyDown:function(a){this.get_selectable()&&
1!=this.get_type()&&67==a.keyCode&&(a.commandKey||a.ctrlKey)&&this.__caretIndex!=this.__selectionIndex&&he.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex))},this_onMouseDown:function(a){if(this.get_selectable()||1==this.get_type())this.__updateLayout(),this.__selectionIndex=this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),ab.__supportDOM||(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())),
null!=this.stage&&(this.stage.addEventListener("enterFrame",r(this,this.this_onEnterFrame)),this.stage.addEventListener("mouseMove",r(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",r(this,this.stage_onMouseUp)))},this_onMouseWheel:function(a){this.get_mouseWheelEnabled()&&this.set_scrollV(Math.min(this.get_scrollV()-a.delta,this.get_maxScrollV())|0)},this_onDoubleClick:function(a){if(this.get_selectable()){this.__updateLayout();a="\n.!?, ;:()-_/".split("");var b=this.__text,c=
-1,d=b.length,e=Math.max(this.__caretIndex,1)|0;if(0<b.length&&0<=this.__caretIndex&&d>=this.__caretIndex){for(var f=0;f<a.length;){var g=a[f];++f;var h=b.lastIndexOf(g,e-1);h>c&&(c=h+1);h=b.indexOf(g,e);h<d&&-1!=h&&(d=h)}c!=d&&(this.setSelection(c,d),a=!0,ab.__supportDOM&&(this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0),a=!1),a&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())))}}},window_onKeyDown:function(a,b){switch(a){case 8:this.__selectionIndex==
this.__caretIndex&&0<this.__caretIndex&&(this.__selectionIndex=this.__caretIndex-1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new la("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 97:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b))&&this.setSelection(0,this.__text.length);break;case 99:(zb.get_metaKey(b)||zb.get_ctrlKey(b))&&this.__caretIndex!=this.__selectionIndex&&
he.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:(zb.get_metaKey(b)||zb.get_ctrlKey(b))&&this.__caretIndex!=this.__selectionIndex&&(he.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new la("change",!0)));break;case 127:this.__selectionIndex==this.__caretIndex&&this.__caretIndex<this.__text.length&&(this.__selectionIndex=this.__caretIndex+1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),
this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new la("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741898:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?this.__caretIndex=0:this.__caretBeginningOfLine(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741901:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?this.__caretIndex=this.__text.length:
this.__caretEndOfLine(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741903:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?this.__caretBeginningOfNextLine():this.__caretNextCharacter(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741904:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?this.__caretBeginningOfPreviousLine():
this.__caretPreviousCharacter(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741905:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretNextLine(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741906:this.get_selectable()&&(zb.get_metaKey(b)||zb.get_ctrlKey(b)?
this.__caretIndex=0:this.__caretPreviousLine(),zb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 13:case 1073741912:this.__textEngine.multiline?(a=new cf("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new la("change",!0)))):(this.__stopCursorTimer(),this.__startCursorTimer())}},window_onTextInput:function(a){this.__replaceSelectedText(a,
!0);this.dispatchEvent(new la("change",!0))},__class__:ef,__properties__:u(D.prototype.__properties__,{set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",get_textColor:"get_textColor",set_text:"set_text",get_text:"get_text",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_sharpness:"set_sharpness",get_sharpness:"get_sharpness",get_selectionEndIndex:"get_selectionEndIndex",
get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",get_selectable:"get_selectable",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_restrict:"set_restrict",get_restrict:"get_restrict",get_numLines:"get_numLines",set_multiline:"set_multiline",get_multiline:"get_multiline",set_mouseWheelEnabled:"set_mouseWheelEnabled",get_mouseWheelEnabled:"get_mouseWheelEnabled",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",
set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_length:"get_length",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_gridFitType:"set_gridFitType",get_gridFitType:"get_gridFitType",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",get_caretIndex:"get_caretIndex",get_bottomScrollV:"get_bottomScrollV",
set_borderColor:"set_borderColor",get_borderColor:"get_borderColor",set_border:"set_border",get_border:"get_border",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_antiAliasType:"set_antiAliasType",get_antiAliasType:"get_antiAliasType"})});var tg=function(a,b,c,d,e,f,g,h,m,l,n,p,k){this.font=a;this.size=b;this.color=c;this.bold=d;this.italic=
e;this.underline=f;this.url=g;this.target=h;this.align=m;this.leftMargin=l;this.rightMargin=n;this.indent=p;this.leading=k};k["openfl.text.TextFormat"]=tg;tg.__name__="openfl.text.TextFormat";tg.prototype={align:null,blockIndent:null,bold:null,bullet:null,color:null,font:null,indent:null,italic:null,kerning:null,leading:null,leftMargin:null,letterSpacing:null,rightMargin:null,size:null,tabStops:null,target:null,underline:null,url:null,__ascent:null,__descent:null,__cacheKey:null,clone:function(){var a=
new tg(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);a.align=this.align;a.leftMargin=this.leftMargin;a.rightMargin=this.rightMargin;a.indent=this.indent;a.leading=this.leading;a.blockIndent=this.blockIndent;a.bullet=this.bullet;a.kerning=this.kerning;a.letterSpacing=this.letterSpacing;a.tabStops=this.tabStops;a.__ascent=this.__ascent;a.__descent=this.__descent;a.__cacheKey=this.__toCacheKey();return a},__merge:function(a){null!=a.font&&(this.font=a.font);
null!=a.size&&(this.size=a.size);null!=a.color&&(this.color=a.color);null!=a.bold&&(this.bold=a.bold);null!=a.italic&&(this.italic=a.italic);null!=a.underline&&(this.underline=a.underline);null!=a.url&&(this.url=a.url);null!=a.target&&(this.target=a.target);null!=a.align&&(this.align=a.align);null!=a.leftMargin&&(this.leftMargin=a.leftMargin);null!=a.rightMargin&&(this.rightMargin=a.rightMargin);null!=a.indent&&(this.indent=a.indent);null!=a.leading&&(this.leading=a.leading);null!=a.blockIndent&&
(this.blockIndent=a.blockIndent);null!=a.bullet&&(this.bullet=a.bullet);null!=a.kerning&&(this.kerning=a.kerning);null!=a.letterSpacing&&(this.letterSpacing=a.letterSpacing);null!=a.tabStops&&(this.tabStops=a.tabStops);null!=a.__ascent&&(this.__ascent=a.__ascent);null!=a.__descent&&(this.__descent=a.__descent);this.__toCacheKey()},__toCacheKey:function(){return this.__cacheKey=""+this.font+this.size+A.string(this.bold)+A.string(this.italic)},__class__:tg};var dk={fromString:function(a){switch(a){case "center":return 0;
case "end":return 1;case "justify":return 2;case "left":return 3;case "right":return 4;case "start":return 5;default:return null}},toString:function(a){switch(a){case 0:return"center";case 1:return"end";case 2:return"justify";case 3:return"left";case 4:return"right";case 5:return"start";default:return null}}},jp=function(a,b,c,d,e,f){this.x=a;this.width=b;this.height=c;this.ascent=d;this.descent=e;this.leading=f};k["openfl.text.TextLineMetrics"]=jp;jp.__name__="openfl.text.TextLineMetrics";jp.prototype=
{ascent:null,descent:null,height:null,leading:null,width:null,x:null,__class__:jp};var ip=function(a){this.importRegex=new aa("@import .*?;","ig");this.commentRegex="(\\/\\*[\\s\\S]*?\\*\\/)";this.combinedCSSRegex="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)*?})";this.keyframeRegex="((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.mediaQueryRegex="((@media [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.cssRegex=new aa("([\\s\\S]*?){([\\s\\S]*?)*}",
"ig");this.keyframeStatements=[];this.importStatements=[]};k["openfl.text._internal.CSSParser"]=ip;ip.__name__="openfl.text._internal.CSSParser";ip.prototype={source:null,options:null,importStatements:null,keyframeStatements:null,cssRegex:null,mediaQueryRegex:null,keyframeRegex:null,combinedCSSRegex:null,commentRegex:null,importRegex:null,stripComments:function(a){return a.replace(new RegExp(this.commentRegex,"ig"),"")},parseRules:function(a){for(var b=new aa("(\\*?[-#/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)+((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)",
"g"),c=this.getMatches(b,a),d=[],e=0,f=c.length;e<f;){a=e++;if(!b.match(c[a]))return null;var g=a=b.matched(0).split("\r\n").join("\n");g=R.trim(g);if(-1!=g.indexOf(":")){if(a=R.trim(g.split(":")[0]),g=R.trim(g.split(":")[1]),!(1>a.length||1>g.length)){var h=new ia;h.h.type="declaration";h.h.property=a;h.h.value=g;d.push(h)}}else"base64,"==I.substr(R.trim(g),0,7)?(a=g+R.trim(g),d[d.length-1].h.value=a):0<g.length&&(a=new ia,a.h.type="declaration",a.h.property="",a.h.value=g,a.h.defective=!0,d.push(a))}return d},
findCorrespondingRule:function(a,b,c){for(var d=null,e=0,f=a.length;e<f;){var g=e++;if(a[g].h.directive==b&&(d=a[g],c==a[g].h.value))break}return d},findBySelector:function(a,b,c){null==c&&(c=!1);for(var d=[],e=0,f=a.length;e<f;){var g=e++;0==c?a[g].h.selector==b&&d.push(a[g]):-1!=U.__cast(a[g].h.selector,String).indexOf(b)&&d.push(a[g])}if("@imports"==b||2>d.length)return d;a=d[0];e=0;for(f=d.length;e<f;)g=e++,this.intelligentCSSPush([a],d[g]);return[a]},deleteBySelector:function(a,b){for(var c=
[],d=0,e=a.length;d<e;){var f=d++;a[f].h.selector!=b&&c.push(a[f])}return c},compress:function(a){for(var b=[],c=Object.create(null),d=0,e=a.length;d<e;){var f=d++;f=a[f];1!=c[f.h.selector]&&(f=this.findBySelector(a,f.h.selector),0!=f.length&&(b=b.concat(f),c.selector=!0))}return b},diff:function(a,b){if(a.h.selector==b.h.selector||"media"==a.h.type||"media"==b.h.type)return null;var c=new ia;c.h.selector=a.h.selector;c.h.rules=[];var d=c;new ia;new ia;var e=U.__cast(a.h.rules,Array).length;var f=
U.__cast(b.h.rules,Array).length;c=0;for(var g=e;c<g;){c++;e=U.__cast(a.h.rules,Array)[1];var h=this.findCorrespondingRule(b.h.rules,a.h.directive,a.h.value);null==h?U.__cast(d.h.rules,Array).push(e):e.h.value!=h.h.value&&U.__cast(d.h.rules,Array).push(e)}c=0;for(g=f;c<g;)c++,h=U.__cast(a.h.rules,Array)[1],e=this.findCorrespondingRule(a.h.rules,b.h.directive),null==e&&(h.h.type="DELETED",U.__cast(d.h.rules,Array).push(h));return 0==U.__cast(d.h.rules,Array).length?null:d},intelligentMerge:function(a,
b,c){null==c&&(c=!1);for(var d=0,e=b.length;d<e;){var f=d++;this.intelligentCSSPush(a,b[f],c)}d=0;for(e=a.length;d<e;)f=d++,b=a[f],"media"!=b.h.type&&"keyframes"!=b.h.type&&(c=this.compactRules(b.h.rules),b.h.rules=c)},intelligentCSSPush:function(a,b,c){null==c&&(c=!1);var d=null;if(0==c){c=0;for(var e=a.length;c<e;){var f=c++;if(a[f].h.selector==b.h.selector){d=a[f];break}}}else for(c=a.length-1;-1<c;){if(a[c].h.selector==b.h.selector){d=a[c];break}--c}if(null==d)a.push(b);else if("media"!=b.h.type)for(a=
b.h.rules,c=0,e=a.length;c<e;)f=c++,b=a[f],f=this.findCorrespondingRule(d.h.rules,b.h.directive),null==f?d.h.rules.push(b):"DELETED"==b.h.type?f.h.type="DELETED":f.h.value=b.h.value;else c=U.__cast(d.h.subStyles,Array).concat(b.h.subStyles),d.h.value=c},compactRules:function(a){for(var b=[],c=0,d=a.length;c<d;){var e=c++;"DELETED"!=a[e].h.type&&b.push(a[e])}return b},getImports:function(a){for(var b=[],c=0,d=a.length;c<d;){var e=c++;"imports"==a[e].h.type&&b.push(a[e].h.styles)}return b},parse:function(a){if(null==
a)return null;var b=/^\s+|\s+$/g;a=a.replace(b,"");for(var c=[],d=this.importRegex.match(a);d;){var e=this.importRegex.matched(0);if(null!=e){this.importStatements.push(e);var f=new ia;f.h.selector="@imports";f.h.type="imports";f.h.styles=e;c.push(f)}else break}a=a.replace(this.importRegex.r,"");for(e=new aa(this.keyframeRegex,"gi");e.match(a);){d=this.getMatches(e,a);if(null==d)break;f=new ia;f.h.selectors="@keyframes";f.h.type="keyframes";var g=e.matchedRight();f.h.styles=g;c.push(f)}a=a.replace(e.r,
"");for(f=new aa(this.combinedCSSRegex,"gi");f.match(a);){d=this.getMatches(f,a);if(null==d)break;a="";f=0;for(e=d.length;f<e;){var h=f++;g=new aa("^([^{]+)","");if(g.match(d[h]))null!=g.matched(0)&&(a=R.trim(g.matched(0).split("\r\n").join("\n"))),b=new aa(this.commentRegex,"gi"),h=this.getMatches(b,a),null!=h&&(a=R.trim(a.replace(b.r,""))),b=/\n+/,a=a.replace(b,"\n"),-1!=a.indexOf("@media")?(b=new ia,b.h.selectors=a,b.h.type="media",g=this.parse(g.matchedRight()+"\n}"),b.h.subStyles=g,g=b,null!=
h&&(g.h.comments=h[0]),c.push(g)):null!=g.matchedRight()&&(g=this.parseRules(g.matchedRight()),b=new ia,b.h.selectors=a,b.h.type="rule",b.h.declarations=g,g=b,"@font-face"==a&&(g.h.type="font-face"),null!=h&&(g.h.comments=h[0]),c.push(g));else break}break}f=new ia;f.h.type="stylesheet";f.h.rules=c;f.h.parsingErrors=[];return f},getMatches:function(a,b,c){null==c&&(c=0);for(var d=[];a.match(b);)b=R.trim(a.matched(c)),d.push(b),b=R.trim(a.matchedRight());return 0==d.length?null:d},__class__:ip};var ek=
function(a,b){this.__collisions=[];this.__wordMap=new Xa;this.set(a,b)};k["openfl.text._internal.CacheMeasurement"]=ek;ek.__name__="openfl.text._internal.CacheMeasurement";ek.prototype={__collisions:null,__wordMap:null,hash:null,set:function(a,b){this.__addCollision(a,b)},get:function(a){return 1<this.__collisions.length?this.__wordMap.h[this.__collisions.indexOf(a)]:this.__wordMap.h[0]},__addCollision:function(a,b){if(!this.exists(a)){var c=this.__wordMap;a=this.__collisions.push(a)-1;c.h[a]=b}},
exists:function(a){return 0==this.__collisions.length?!1:-1<this.__collisions.indexOf(a)},__class__:ek};var kp=function(a,b,c){this.glyph=a;this.advance=b;this.offset=null!=c?c:new Vd};k["openfl.text._internal.GlyphPosition"]=kp;kp.__name__="openfl.text._internal.GlyphPosition";kp.prototype={advance:null,glyph:null,offset:null,__class__:kp};var mb=function(){};k["openfl.text._internal.HTMLParser"]=mb;mb.__name__="openfl.text._internal.HTMLParser";mb.parse=function(a,b,c,d,e){a=b?a.replace(mb.__regexBreakTag.r,
"\n"):a.replace(mb.__regexBreakTag.r,"");a=a.replace(mb.__regexEntities[5].r," ");a=mb.__regexCharEntity.map(a,function(a){var b=a.matched(1),c=a.matched(2);return null!=b&&(b=A.parseInt(b),null!=b)?String.fromCodePoint(b):null!=c&&(c=A.parseInt("0"+c),null!=c)?String.fromCodePoint(c):a.matched(0)});var f=a.split("<");if(1==f.length){a=R.htmlUnescape(a.replace(mb.__regexHTMLTag.r,""));if(1<e.get_length()){var g=e.get_length()-1,h=[];e.__tempIndex=1;for(var m=0;m<h.length;){var l=h[m++];e.insertAt(e.__tempIndex,
l);e.__tempIndex++}e.splice(e.__tempIndex,g)}b=e.get(0);b.format=d;b.start=0;b.end=a.length}else{g=e.get_length();h=[];for(m=e.__tempIndex=0;m<h.length;)l=h[m++],e.insertAt(e.__tempIndex,l),e.__tempIndex++;e.splice(e.__tempIndex,g);a="";g=[d.clone()];m=[];l=!1;for(h=0;h<f.length;){var n=f[h];++h;if(""!=n){var p="/"==I.substr(n,0,1),k=n.indexOf(">"),q=k+1,t=n.indexOf(" ");t=n.substring(p?1:0,-1<t&&t<k?t:k).toLowerCase();if(p)0!=m.length&&t==m[m.length-1]&&(m.pop(),g.pop(),p=g[g.length-1].clone(),("p"==
t||"li"==t)&&0<e.get_length()&&(b&&(a+="\n"),l=!0),q<n.length&&(l=R.htmlUnescape(I.substr(n,q,null)),e.push(new Se(p,a.length,a.length+l.length)),a+=l,l=!1));else if(p=g[g.length-1].clone(),-1<k){null!=c&&(c.__applyStyle(t,p),mb.__regexClass.match(n)&&(c.__applyStyle("."+mb.__getAttributeMatch(mb.__regexClass),p),c.__applyStyle(t+"."+mb.__getAttributeMatch(mb.__regexClass),p)));switch(t){case "a":null!=c&&c.__applyStyle("a:link",p);mb.__regexHref.match(n)&&(p.url=mb.__getAttributeMatch(mb.__regexHref));
break;case "b":p.bold=!0;break;case "em":case "i":p.italic=!0;break;case "font":mb.__regexFace.match(n)&&(p.font=mb.__getAttributeMatch(mb.__regexFace));mb.__regexColor.match(n)&&(p.color=A.parseInt("0x"+mb.__getAttributeMatch(mb.__regexColor)));if(mb.__regexSize.match(n)){k=mb.__getAttributeMatch(mb.__regexSize);var v=I.cca(k,0);p.size=43==v||45==v?(2<=g.length?g[g.length-2]:d).size+A.parseInt(k):A.parseInt(k)}break;case "li":0<e.get_length()&&!l&&(a+="\n");k=p.clone();k.underline=!1;e.push(new Se(k,
a.length,a.length+2));a+="\u2022 ";break;case "p":0<e.get_length()&&!l&&(a+="\n");mb.__regexAlign.match(n)&&(k=mb.__getAttributeMatch(mb.__regexAlign).toLowerCase(),p.align=dk.fromString(k));break;case "textformat":mb.__regexBlockIndent.match(n)&&(p.blockIndent=A.parseInt(mb.__getAttributeMatch(mb.__regexBlockIndent)));mb.__regexIndent.match(n)&&(p.indent=A.parseInt(mb.__getAttributeMatch(mb.__regexIndent)));mb.__regexLeading.match(n)&&(p.leading=A.parseInt(mb.__getAttributeMatch(mb.__regexLeading)));
mb.__regexLeftMargin.match(n)&&(p.leftMargin=A.parseInt(mb.__getAttributeMatch(mb.__regexLeftMargin)));mb.__regexRightMargin.match(n)&&(p.rightMargin=A.parseInt(mb.__getAttributeMatch(mb.__regexRightMargin)));if(mb.__regexTabStops.match(n)){k=mb.__getAttributeMatch(mb.__regexTabStops).split(" ");v=[];for(var r=0;r<k.length;){var u=k[r];++r;v.push(A.parseInt(u))}p.tabStops=v}break;case "u":p.underline=!0}g.push(p);m.push(t);q<n.length&&(l=R.htmlUnescape(n.substring(q)),e.push(new Se(p,a.length,a.length+
l.length)),a+=l,l=!1)}else l=R.htmlUnescape(n),e.push(new Se(p,a.length,a.length+l.length)),a+=l,l=!1}}0==e.get_length()&&e.push(new Se(g[0],0,0))}return a};mb.__getAttributeMatch=function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};var Yi=function(){this.__shortWordMap=new ia;this.__longWordMap=new ia};k["openfl.text._internal.ShapeCache"]=Yi;Yi.__name__="openfl.text._internal.ShapeCache";Yi.hashFunction=function(a){for(var b=0,c,d=0,e=a.length;d<e;)c=d++,c=I.cca(a,c),b=(b<<5)-b+c,b|=
0;return b};Yi.prototype={__shortWordMap:null,__longWordMap:null,cache:function(a,b,c){a=a.format.__cacheKey;return 15<c.length?this.__cacheLongWord(c,a,b):this.__cacheShortWord(c,a,b)},__cacheShortWord:function(a,b,c){if(Object.prototype.hasOwnProperty.call(this.__shortWordMap.h,b)){var d=this.__shortWordMap.h[b];if(Object.prototype.hasOwnProperty.call(d.h,a))return d.h[a];var e=c();d.h[a]=e}else d=new ia,e=c(),d.h[a]=e,this.__shortWordMap.h[b]=d;return c()},__cacheLongWord:function(a,b,c){var d=
Yi.hashFunction(a);if(Object.prototype.hasOwnProperty.call(this.__longWordMap.h,b)){var e=this.__longWordMap.h[b];if(e.h.hasOwnProperty(d)){var f=e.h[d];if(f.exists(a))return f.get(a);f.set(a,c())}else f=new ek(a,c()),e.h[d]=f}else e=new Xa,f=new ek(a,c()),f.hash=d,e.h[d]=f,this.__longWordMap.h[b]=e;return c()},__class__:Yi};var Qb=function(a){this.__shapeCache=new Yi;this.textField=a;this.height=this.width=100;this.set_text("");this.bounds=new fa(0,0,0,0);this.textBounds=new fa(0,0,0,0);this.type=
0;this.autoSize=2;this.embedFonts=!1;this.selectable=!0;this.borderColor=0;this.border=!1;this.backgroundColor=16777215;this.background=!1;this.gridFitType=1;this.maxChars=0;this.multiline=!1;this.numLines=1;this.scrollH=this.sharpness=0;this.set_scrollV(1);this.wordWrap=!1;this.lineAscents=ub.toFloatVector(null);this.lineBreaks=ub.toIntVector(null);this.lineDescents=ub.toFloatVector(null);this.lineLeadings=ub.toFloatVector(null);this.lineHeights=ub.toFloatVector(null);this.lineWidths=ub.toFloatVector(null);
this.layoutGroups=ub.toObjectVector(null);this.textFormatRanges=ub.toObjectVector(null);null==Qb.__context&&(Qb.__context=window.document.createElement("canvas").getContext("2d"))};k["openfl.text._internal.TextEngine"]=Qb;Qb.__name__="openfl.text._internal.TextEngine";Qb.findFont=function(a){return Rc.__fontByName.h[a]};Qb.findFontVariant=function(a){var b=a.font,c=a.bold;a=a.italic;null==b&&(b="_serif");var d=R.replace(R.replace(b," Normal","")," Regular","");return c&&a&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,
d+" Bold Italic")?Qb.findFont(d+" Bold Italic"):c&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,d+" Bold")?Qb.findFont(d+" Bold"):a&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,d+" Italic")?Qb.findFont(d+" Italic"):Qb.findFont(b)};Qb.getDefaultFont=function(a,b,c){null==Qb.__defaultFonts&&(Qb.__defaultFonts=new ia);a=Qb.__defaultFonts.h[a];return null==a?null:b&&c&&null!=a.boldItalic?a.boldItalic:c&&null!=a.italic?a.italic:b&&null!=a.bold?a.bold:a.normal};Qb.getFormatHeight=function(a){var b=
Qb.getFont(a);Qb.__context.font=b;b=Qb.getFontInstance(a);if(null!=a.__ascent){var c=a.size*a.__ascent;b=a.size*a.__descent}else null!=b&&0!=b.unitsPerEM?(c=b.ascender/b.unitsPerEM*a.size,b=Math.abs(b.descender/b.unitsPerEM*a.size)):(c=a.size,b=.185*a.size);return c+b+a.leading};Qb.getFont=function(a){var b=a.font,c=a.bold,d=a.italic;null==b&&(b="_serif");var e=R.replace(R.replace(b," Normal","")," Regular","");c&&d&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,e+" Bold Italic")?(b=e+" Bold Italic",
d=c=!1):c&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,e+" Bold")?(b=e+" Bold",c=!1):d&&Object.prototype.hasOwnProperty.call(Rc.__fontByName.h,e+" Italic")?(b=e+" Italic",d=!1):(c&&(-1<b.indexOf(" Bold ")||R.endsWith(b," Bold"))&&(c=!1),d&&(-1<b.indexOf(" Italic ")||R.endsWith(b," Italic"))&&(d=!1));c=(d?"italic ":"normal ")+"normal "+(c?"bold ":"normal ");c+=a.size+"px";c+="/"+(a.size+3)+"px ";switch(b){case "_sans":a="sans-serif";break;case "_serif":a="serif";break;case "_typewriter":a=
"monospace";break;default:a="'"+b.replace(/^[\s'"]+(.*)[\s'"]+$/,"$1")+"'"}return c+=""+a};Qb.getFontInstance=function(a){return Qb.findFontVariant(a)};Qb.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,caretIndex:null,embedFonts:null,gridFitType:null,height:null,layoutGroups:null,lineAscents:null,lineBreaks:null,lineDescents:null,lineLeadings:null,lineHeights:null,lineWidths:null,maxChars:null,maxScrollH:null,
maxScrollV:null,multiline:null,numLines:null,restrict:null,scrollH:null,scrollV:null,selectable:null,sharpness:null,text:null,textBounds:null,textHeight:null,textFormatRanges:null,textWidth:null,type:null,width:null,wordWrap:null,textField:null,__cursorTimer:null,__hasFocus:null,__isKeyDown:null,__measuredHeight:null,__measuredWidth:null,__restrictRegexp:null,__selectionStart:null,__shapeCache:null,__showCursor:null,__textFormat:null,__textLayout:null,__texture:null,__useIntAdvances:null,__cairoFont:null,
__font:null,createRestrictRegexp:function(a){var b="",c=!1;a=(new aa("\\^([^\\^]+)","gu")).map(a,function(a){if(c)return c=!c,a.matched(1);b+=a.matched(1);c=!c;return""});var d=[];0<a.length&&d.push("[^"+a+"]");0<b.length&&d.push("["+b+"]");return new aa("("+d.join("|")+")","g")},getBounds:function(){var a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a;a=this.width;for(var b=this.height,c=this.layoutGroups.get_length()-1,d=0,e=this.layoutGroups.get_length();d<e;){var f=
d++,g=this.layoutGroups.get(f);if(f!=c||g.startIndex!=g.endIndex||1==this.type)g.offsetX<a&&(a=g.offsetX),g.offsetY<b&&(b=g.offsetY)}a>=this.width&&(a=2);b>=this.height&&(b=2);this.textBounds.setTo(Math.max(a-2,0),Math.max(b-2,0),Math.min(this.textWidth+4,this.bounds.width+4),Math.min(1.185*this.textHeight+4,this.bounds.height+4))},getLine:function(a){return 0>a||a>this.lineBreaks.get_length()+1?null:0==this.lineBreaks.get_length()?this.text:this.text.substring(0<a?this.lineBreaks.get(a-1):0,this.lineBreaks.get(a))},
getLineBreaks:function(){this.lineBreaks.set_length(0);for(var a=-1,b;a<this.text.length;)if(b=this.text.indexOf("\n",a+1),a=this.text.indexOf("\r",a+1),a=-1==a?b:-1==b?a:a<b?a:b,-1<a)this.lineBreaks.push(a);else break},getLineBreakIndex:function(a){null==a&&(a=0);for(var b=this.lineBreaks.iterator();b.hasNext();){var c=b.next();if(c>=a)return c}return-1},getLineMeasurements:function(){this.lineAscents.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);this.lineHeights.set_length(0);
this.lineWidths.set_length(0);var a=0,b=0,c=null,d=0,e=0;this.textHeight=this.textWidth=0;this.numLines=1;this.maxScrollH=0;for(var f=this.layoutGroups.get_length()-1,g=0,h=this.layoutGroups.get_length();g<h;){var m=g++;var l=this.layoutGroups.get(m);if(m!=f||l.startIndex!=l.endIndex||1==this.type){for(;l.lineIndex>this.numLines-1;)this.lineAscents.push(a),this.lineDescents.push(b),this.lineLeadings.push(null!=c?c:0),this.lineHeights.push(d),this.lineWidths.push(e),b=a=0,c=null,e=d=0,this.numLines++;
a=Math.max(a,l.ascent);b=Math.max(b,l.descent);c=null==c?l.leading:Math.max(c,l.leading)|0;d=Math.max(d,l.height);e=l.offsetX-2+l.width;e>this.textWidth&&(this.textWidth=e);m=Math.ceil(l.offsetY-2+l.ascent+l.descent);m>this.textHeight&&(this.textHeight=m)}}0==this.textHeight&&null!=this.textField&&1==this.type&&(a=this.textField.__textFormat,b=Qb.getFontInstance(a),null!=a.__ascent?(f=a.size*a.__ascent,g=a.size*a.__descent):null!=b&&0!=b.unitsPerEM?(f=b.ascender/b.unitsPerEM*a.size,g=Math.abs(b.descender/
b.unitsPerEM*a.size)):(f=a.size,g=.185*a.size),c=a.leading,a=f,b=g,this.textHeight=m=Math.ceil(f+g));this.lineAscents.push(a);this.lineDescents.push(b);this.lineLeadings.push(null!=c?c:0);this.lineHeights.push(d);this.lineWidths.push(e);1==this.numLines&&0<c&&(this.textHeight+=c);if(2!=this.autoSize)switch(this.autoSize){case 0:case 1:case 3:this.wordWrap||(this.width=this.textWidth+4),this.height=this.textHeight+4,this.bottomScrollV=this.numLines}this.maxScrollH=this.textWidth>this.width-4?this.textWidth-
this.width+4|0:0;this.scrollH>this.maxScrollH&&(this.scrollH=this.maxScrollH)},getLayoutGroups:function(){var a=this;this.layoutGroups.set_length(0);if(null!=this.text&&""!=this.text){var b=-1,c=null,d=null,e=ef.__defaultTextFormat.clone(),f=0,g=0,h=0,m=0,l=3,n=0,p=0,k=0,q=0,t=!0,v=null,r=null,u=0,x=0,C=0,P=-2,F=-1,z=this.text.indexOf(" "),y=0,ka=y<this.lineBreaks.get_length()?this.lineBreaks.get(y):-1,B=0,w=0,A=0,G=0,H=function(b,d,f){var g=function(){var c=[];if(null==a.__useIntAdvances){var e=
new aa("Trident/7.0","");a.__useIntAdvances=e.match(N.navigator.userAgent)}if(a.__useIntAdvances){var g=0;e=d;for(var h=f;e<h;){var l=e++;l=a.measureText(b.substring(d,l+1));c.push(l-g);g=l}}else for(e=d,h=f;e<h;)l=e++,l<b.length-1?(g=a.measureText(b.charAt(l+1)),g=a.measureText(I.substr(b,l,2))-g):g=Qb.__context.measureText(b.charAt(l)).width,c.push(g);return c};return 2==e.align?g():a.__shapeCache.cache(c,g,b.substring(d,f))},D=function(a){for(var b=0,c=0;c<a.length;){var d=a[c];++c;b+=d}return b},
J=function(){return 2+k+n+(t?p:0)},K=function(){return a.width-2-q-J()},M=function(b,d){null==v||v.startIndex!=v.endIndex?(v=new hn(c.format,b,d),a.layoutGroups.push(v)):(v.format=c.format,v.startIndex=b,v.endIndex=d)},O=function(){null!=e.__ascent?(g=e.size*e.__ascent,m=e.size*e.__descent):null!=d&&0!=d.unitsPerEM?(g=d.ascender/d.unitsPerEM*e.size,m=Math.abs(d.descender/d.unitsPerEM*e.size)):(g=e.size,m=.185*e.size);f=e.leading;x=Math.ceil(g+m+f);x>C&&(C=x);g>h&&(h=g)},Ba=function(){t=!0;l=null!=
e.align?e.align:3;n=null!=e.blockIndent?e.blockIndent:0;p=null!=e.indent?e.indent:0;k=null!=e.leftMargin?e.leftMargin:0;q=null!=e.rightMargin?e.rightMargin:0},X=function(){if(b<a.textFormatRanges.get_length()-1){b+=1;c=a.textFormatRanges.get(b);e.__merge(c.format);var f=Qb.getFont(e);Qb.__context.font=f;d=Qb.getFontInstance(e);return!0}return!1},Ca=function(d,e){if(d>=e)r=[],u=0;else if(e<=c.end)r=H(a.text,d,e),u=D(r);else{var f=d;d=c.end;var g=0;r=[];for(u=0;;)if(f!=d&&(f=H(a.text,f,d),r=r.concat(f)),
d!=e){if(!X()){Q.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1096,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}f=d;d=e<c.end?e:c.end;++g}else{u=D(r);break}b-=g+1;X()}},U=function(b){if(b<=c.end){r=H(a.text,A,b);u=D(r);M(A,b);v.positions=r;var d=B,e=J();v.offsetX=d+e;v.ascent=g;v.descent=m;v.leading=f;v.lineIndex=
G;v.offsetY=w+2;v.width=u;v.height=x;B+=u;b==c.end&&(v=null,X(),O())}else for(;;){var h=b<c.end?b:c.end;A!=h&&(r=H(a.text,A,h),u=D(r),M(A,h),v.positions=r,d=B,e=J(),v.offsetX=d+e,v.ascent=g,v.descent=m,v.leading=f,v.lineIndex=G,v.offsetY=w+2,v.width=u,v.height=x,B+=u,A=h);h==c.end&&(v=null);if(h==b)break;if(!X()){Q.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",
lineNumber:1184,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}O()}A=b},R=function(){O();for(var b=a.layoutGroups.get_length();-1<--b;){var c=a.layoutGroups.get(b);if(c.lineIndex<G)break;c.lineIndex>G||(c.ascent=h,c.height=C)}w+=C;C=h=0;G+=1;B=0;t=!1},Y=function(b){if(4<=a.width&&a.wordWrap){var c=r;var d=D(c);for(var e=c.length-1;0<=e;){var f=I.cca(a.text,A+e);if(32!=f&&9!=f)break;d-=c[e];--e}for(;0<c.length&&B+d>K();){for(f=e=d=0;B+f<K();){var g=c[e];0==g?(++e,
++d):(f+=g,++e)}if(e==d)e=d+1;else for(;1<e&&B+f>K();)--e,0<e-d?(Ca(A,A+e-d),f=u):(e=1,d=0,Ca(A,A+1),f=0);c=A+e-d;U(c);R();Ca(c,b);c=r;d=u}}U(b)};X();Ba();O();for(var T,Z=this.text.length+1;A<Z;)if(-1<ka&&(-1==z||ka<z))A<=ka?(Ca(A,ka),Y(ka),v=null):null!=v&&v.startIndex!=v.endIndex&&(v.endIndex==z&&(v.width-=v.positions[v.positions.length-1]),v=null),R(),c.end==ka&&(X(),O()),A=ka+1,F=ka,++y,ka=y<this.lineBreaks.get_length()?this.lineBreaks.get(y):-1,Ba();else if(-1<z)for(null!=v&&v.startIndex!=v.endIndex&&
(v=null),T=!1;A<this.text.length;){var E=-1;-1==z?E=ka:(E=z+1,-1<ka&&ka<E&&(E=ka));-1==E&&(E=this.text.length);Ca(A,E);if(2==l){if(0<r.length&&A==P){A+=1;var W=r.shift();u-=W;B+=W}0<r.length&&E==z+1&&(--E,W=r.pop(),u-=W)}this.wordWrap&&B+u>K()&&(T=!0,0<r.length&&E==z+1&&B+u-r[r.length-1]<=K()&&(T=!1));if(T){2!=l&&(null!=v||0<this.layoutGroups.get_length())&&(T=v,null==T&&(T=this.layoutGroups.get(this.layoutGroups.get_length()-1)),T.width-=T.positions[T.positions.length-1],T.endIndex--);T=this.layoutGroups.get_length()-
1;for(W=0;0<=T;){v=this.layoutGroups.get(T);if(0<T&&v.startIndex>P)++W;else break;--T}A==P+1&&R();B=0;if(0<W){T=this.layoutGroups.get(this.layoutGroups.get_length()-W).offsetX;W=this.layoutGroups.get_length()-W;for(var ua=this.layoutGroups.get_length();W<ua;){var V=W++;v=this.layoutGroups.get(V);v.offsetX-=T;v.offsetY=w+2;v.lineIndex=G;B+=v.width}}Y(E);T=!1}else null!=v&&A==z&&P!=z-1?(2!=l&&(v.endIndex=z,v.positions=v.positions.concat(r),v.width+=u),B+=u,A=E):null==v||2==l?(Y(E),E==this.text.length&&
R()):(W=E<c.end?E:c.end,W<E&&(r=H(this.text,A,W),u=D(r)),v.endIndex=W,v.positions=v.positions.concat(r),v.width+=u,B+=u,W==c.end&&(v=null,X(),O(),A=W,W!=E&&U(E)),ka==E&&++E,A=E,E==this.text.length&&(R(),-1!=ka&&(F=ka,++y,ka=y<this.lineBreaks.get_length()?this.lineBreaks.get(y):-1)));E=this.text.indexOf(" ",A);ka==P&&(v.endIndex=ka,0>ka-v.startIndex-v.positions.length&&v.positions.push(0),A=ka+1);P=z;z=E;if(-1<ka&&ka<=A&&(z>ka||-1==z)||A>this.text.length)break}else A<this.text.length&&(Ca(A,this.text.length),
Y(this.text.length),R()),A+=1;F==A-2&&-1<F&&(M(A-1,A-1),v.positions=[],v.ascent=g,v.descent=m,v.leading=f,v.lineIndex=G,v.offsetX=J(),v.offsetY=w+2,v.width=0,v.height=x)}},measureText:function(a){return Qb.__context.measureText(a).width},restrictText:function(a){if(null==a)return a;null!=this.__restrictRegexp&&(a=this.__restrictRegexp.split(a).join(""));return a},setTextAlignment:function(){for(var a=-1,b=0,c,d,e=!1,f=0,g=this.layoutGroups.get_length();f<g;){var h=f++;c=this.layoutGroups.get(h);if(c.lineIndex!=
a)switch(a=c.lineIndex,b=this.width-4-c.format.rightMargin,c.format.align){case 0:b=this.lineWidths.get(a)<b?Math.round((b-this.lineWidths.get(a))/2):0;break;case 2:if(this.lineWidths.get(a)<b){d=1;for(var m=h+1,l=this.layoutGroups.get_length();m<l;){var n=m++;if(this.layoutGroups.get(n).lineIndex==a)0!=n&&32!=I.cca(this.text,this.layoutGroups.get(n).startIndex-1)||++d;else break}if(1<d&&(c=this.layoutGroups.get(h+d-1),m=I.cca(this.text,c.endIndex),c.endIndex<this.text.length&&10!=m&&13!=m))for(b=
(b-this.lineWidths.get(a))/(d-1),e=!0,m=1;this.layoutGroups.get(h+m).offsetX+=b*m,++m<d;);}b=0;break;case 4:b=this.lineWidths.get(a)<b?Math.round(b-this.lineWidths.get(a)):0;break;default:b=0}0<b&&(c.offsetX+=b)}e&&this.getLineMeasurements()},trimText:function(a){if(null==a)return a;0<this.maxChars&&a.length>this.maxChars&&(a=I.substr(a,0,this.maxChars));return a},update:function(){null==this.text||0==this.textFormatRanges.get_length()?(this.lineAscents.set_length(0),this.lineBreaks.set_length(0),
this.lineDescents.set_length(0),this.lineLeadings.set_length(0),this.lineHeights.set_length(0),this.lineWidths.set_length(0),this.layoutGroups.set_length(0),this.textHeight=this.textWidth=0,this.numLines=1,this.maxScrollH=0,this.bottomScrollV=this.maxScrollV=1):(this.getLineBreaks(),this.getLayoutGroups(),this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},get_bottomScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;for(var a=this.lineHeights.get_length(),b=
this.lineLeadings.get_length()==a?-this.lineLeadings.get(a-1):0,c=(0<this.get_scrollV()?this.get_scrollV():1)-1,d=this.lineHeights.get_length();c<d;){var e=c++,f=this.lineHeights.get(e);b+=f;if(b>this.height-4){a=e+(0<=b-this.height?0:1);break}}return a<this.get_scrollV()?this.get_scrollV():a},get_maxScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;for(var a=this.numLines-1,b=0;0<=a;){b+=this.lineHeights.get(a);if(b>this.height-4){a+=0>b-this.height?1:2;break}--a}return 1>a?
1:a},set_restrict:function(a){if(this.restrict==a)return this.restrict;this.restrict=a;this.__restrictRegexp=null==this.restrict||0==this.restrict.length?null:this.createRestrictRegexp(a);return this.restrict},get_scrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;var a=this.get_maxScrollV();return this.scrollV>a?a:this.scrollV},set_scrollV:function(a){1>a?a=1:a>this.get_maxScrollV()&&(a=this.get_maxScrollV());return this.scrollV=a},set_text:function(a){return this.text=a},__class__:Qb,
__properties__:{set_text:"set_text",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_restrict:"set_restrict",get_maxScrollV:"get_maxScrollV",get_bottomScrollV:"get_bottomScrollV"}};var Kr=function(a,b,c,d){this.normal=a;this.bold=b;this.italic=c;this.boldItalic=d};k["openfl.text._internal._TextEngine.DefaultFontSet"]=Kr;Kr.__name__="openfl.text._internal._TextEngine.DefaultFontSet";Kr.prototype={bold:null,boldItalic:null,italic:null,normal:null,getFont:function(a,b){return a&&b&&null!=this.boldItalic?
this.boldItalic:b&&null!=this.italic?this.italic:a&&null!=this.bold?this.bold:this.normal},__class__:Kr};var Se=function(a,b,c){this.format=a;this.start=b;this.end=c};k["openfl.text._internal.TextFormatRange"]=Se;Se.__name__="openfl.text._internal.TextFormatRange";Se.prototype={end:null,format:null,start:null,__class__:Se};var Rd=function(a,b,c,d,e,f){null==f&&(f="en");null==e&&(e="Zyyy");null==d&&(d=4);null==c&&(c=12);null==a&&(a="");this.letterSpacing=0;this.set_text(a);this.set_font(b);this.set_size(c);
this.__direction=d;this.__script=e;this.__language=f;this.positions=[];this.__dirty=!0;this.__create(this.__direction,this.__script,this.__language)};k["openfl.text._internal.TextLayout"]=Rd;Rd.__name__="openfl.text._internal.TextLayout";Rd.prototype={autoHint:null,font:null,glyphs:null,letterSpacing:null,positions:null,size:null,text:null,__buffer:null,__direction:null,__dirty:null,__handle:null,__language:null,__script:null,__font:null,__hbBuffer:null,__hbFont:null,__create:function(a,b,c){4==c.length&&
(this.__hbBuffer=os._new(),gs._new(c))},__position:function(){this.positions=[]},get_positions:function(){this.__dirty&&(this.__dirty=!1,this.__position());return this.positions},get_direction:function(){return this.__direction},set_direction:function(a){if(a==this.__direction)return a;this.__direction=a;this.__dirty=!0;return a},set_font:function(a){if(a==this.font)return a;this.font=a;this.__dirty=!0;return a},get_glyphs:function(){for(var a=[],b=0,c=this.get_positions();b<c.length;){var d=c[b];
++b;a.push(d.glyph)}return a},get_language:function(){return this.__language},set_language:function(a){if(a==this.__language)return a;this.__language=a;this.__dirty=!0;return a},get_script:function(){return this.__script},set_script:function(a){if(a==this.__script)return a;this.__script=a;this.__dirty=!0;return a},set_size:function(a){if(a==this.size)return a;this.size=a;this.__dirty=!0;return a},set_text:function(a){if(a==this.text)return a;this.text=a;this.__dirty=!0;return a},__class__:Rd,__properties__:{set_text:"set_text",
set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}};var hn=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};k["openfl.text._internal.TextLayoutGroup"]=hn;hn.__name__="openfl.text._internal.TextLayoutGroup";hn.prototype={ascent:null,descent:null,endIndex:null,format:null,height:null,
leading:null,lineIndex:null,offsetX:null,offsetY:null,positions:null,startIndex:null,width:null,getAdvance:function(a){return this.positions[a]},__class__:hn};var Pb=function(){za.call(this);Pb.__instances.push(this)};k["openfl.ui.GameInput"]=Pb;Pb.__name__="openfl.ui.GameInput";Pb.getDeviceAt=function(a){return 0<=a&&a<Pb.__deviceList.length?Pb.__deviceList[a]:null};Pb.__getDevice=function(a){if(null==a)return null;if(null==Pb.__devices.h.__keys__[a.__id__]){var b=Xc.__getDeviceData(),c=b[a.id].id;
b=Xc.__getDeviceData();b=new jn(c,b[a.id].id);Pb.__deviceList.push(b);Pb.__devices.set(a,b);Pb.numDevices=Pb.__deviceList.length}return Pb.__devices.h[a.__id__]};Pb.__onGamepadAxisMove=function(a,b,c){a=Pb.__getDevice(a);if(null!=a&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){if(null==b)var d="null";else switch(b){case 0:d="LEFT_X";break;case 1:d="LEFT_Y";break;case 2:d="RIGHT_X";break;case 3:d="RIGHT_Y";break;case 4:d="TRIGGER_LEFT";break;case 5:d="TRIGGER_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=
new yf(a,"AXIS_"+d,-1,1);a.__axis.h[b]=d;a.__controls.push(d)}d=a.__axis.h[b];d.value=c;d.dispatchEvent(new la("change"))}};Pb.__onGamepadButtonDown=function(a,b){a=Pb.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(null==b)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";
break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new yf(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=1;c.dispatchEvent(new la("change"))}};Pb.__onGamepadButtonUp=function(a,b){a=Pb.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(null==b)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;
case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new yf(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=0;c.dispatchEvent(new la("change"))}};Pb.__onGamepadConnect=
function(a){a=Pb.__getDevice(a);if(null!=a)for(var b=0,c=Pb.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new Dg("deviceAdded",!0,!1,a))}};Pb.__onGamepadDisconnect=function(a){var b=Pb.__devices.h[a.__id__];if(null!=b){null!=Pb.__devices.h.__keys__[a.__id__]&&(I.remove(Pb.__deviceList,Pb.__devices.h[a.__id__]),Pb.__devices.remove(a));Pb.numDevices=Pb.__deviceList.length;a=0;for(var c=Pb.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new Dg("deviceRemoved",!0,!1,b))}}};Pb.__super__=
za;Pb.prototype=u(za.prototype,{addEventListener:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);za.prototype.addEventListener.call(this,a,b,c,d,e);if("deviceAdded"==a)for(a=0,b=Pb.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new Dg("deviceAdded",!0,!1,c))},__class__:Pb});var yf=function(a,b,c,d,e){null==e&&(e=0);za.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=e};k["openfl.ui.GameInputControl"]=yf;yf.__name__="openfl.ui.GameInputControl";
yf.__super__=za;yf.prototype=u(za.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:yf});var jn=function(a,b){this.__controls=[];this.__button=new Xa;this.__axis=new Xa;this.id=a;this.name=b;a=new yf(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);a=new yf(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new yf(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new yf(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);
a=new yf(this,"AXIS_4",-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new yf(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;15>b;){var c=b++;a=new yf(this,"BUTTON_"+c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};k["openfl.ui.GameInputDevice"]=jn;jn.__name__="openfl.ui.GameInputDevice";jn.prototype={enabled:null,id:null,name:null,sampleInterval:null,__axis:null,__button:null,__controls:null,__gamepad:null,getCachedSamples:function(a,b){return 0},getControlAt:function(a){return 0<=
a&&a<this.__controls.length?this.__controls[a]:null},startCachingSamples:function(a,b){},stopCachingSamples:function(){},get_numControls:function(){return this.__controls.length},__class__:jn,__properties__:{get_numControls:"get_numControls"}};var Ea=function(){};k["openfl.ui.Keyboard"]=Ea;Ea.__name__="openfl.ui.Keyboard";Ea.isAccessible=function(){return!1};Ea.__convertKeyCode=function(a){switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 33:return 49;
case 34:return 222;case 35:return 51;case 36:return 52;case 37:return 53;case 38:return 55;case 39:return 222;case 40:return 57;case 41:return 48;case 42:return 56;case 44:return 188;case 45:return 189;case 46:return 190;case 47:return 191;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 58:return 186;case 59:return 186;case 60:return 60;case 61:return 187;case 62:return 190;
case 63:return 191;case 64:return 50;case 91:return 219;case 92:return 220;case 93:return 221;case 94:return 54;case 95:return 189;case 96:return 192;case 97:return 65;case 98:return 66;case 99:return 67;case 100:return 68;case 101:return 69;case 102:return 70;case 103:return 71;case 104:return 72;case 105:return 73;case 106:return 74;case 107:return 75;case 108:return 76;case 109:return 77;case 110:return 78;case 111:return 79;case 112:return 80;case 113:return 81;case 114:return 82;case 115:return 83;
case 116:return 84;case 117:return 85;case 118:return 86;case 119:return 87;case 120:return 88;case 121:return 89;case 122:return 90;case 127:return 46;case 1073741881:return 20;case 1073741882:return 112;case 1073741883:return 113;case 1073741884:return 114;case 1073741885:return 115;case 1073741886:return 116;case 1073741887:return 117;case 1073741888:return 118;case 1073741889:return 119;case 1073741890:return 120;case 1073741891:return 121;case 1073741892:return 122;case 1073741893:return 123;
case 1073741894:return 301;case 1073741895:return 145;case 1073741896:return 19;case 1073741897:return 45;case 1073741898:return 36;case 1073741899:return 33;case 1073741901:return 35;case 1073741902:return 34;case 1073741903:return 39;case 1073741904:return 37;case 1073741905:return 40;case 1073741906:return 38;case 1073741907:return 144;case 1073741908:return 111;case 1073741909:return 106;case 1073741910:return 109;case 1073741911:return 107;case 1073741912:return 13;case 1073741913:return 97;
case 1073741914:return 98;case 1073741915:return 99;case 1073741916:return 100;case 1073741917:return 101;case 1073741918:return 102;case 1073741919:return 103;case 1073741920:return 104;case 1073741921:return 105;case 1073741922:return 96;case 1073741923:return 110;case 1073741925:return 302;case 1073741928:return 124;case 1073741929:return 125;case 1073741930:return 126;case 1073741982:return 13;case 1073742044:return 110;case 1073742048:return 17;case 1073742049:return 16;case 1073742050:return 18;
case 1073742051:return 15;case 1073742052:return 17;case 1073742053:return 16;case 1073742054:return 18;case 1073742055:return 15;default:return a}};Ea.__getCharCode=function(a,b){null==b&&(b=!1);if(b){switch(a){case 48:return 41;case 49:return 33;case 50:return 64;case 51:return 35;case 52:return 36;case 53:return 37;case 54:return 94;case 55:return 38;case 56:return 42;case 57:return 40;case 186:return 58;case 187:return 43;case 188:return 60;case 189:return 95;case 190:return 62;case 191:return 63;
case 192:return 126;case 219:return 123;case 220:return 124;case 221:return 125;case 222:return 34}if(65<=a&&90>=a)return a-65+65}else{switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39}if(48<=a&&57>=a)return a-48+48;if(65<=a&&90>=a)return a-65+97}if(96<=
a&&105>=a)return a-96+48;switch(a){case 8:return 8;case 13:return 13;case 46:return 127;case 106:return 42;case 107:return 43;case 108:return 44;case 110:return 45;case 111:return 46}return 0};Ea.__getKeyLocation=function(a){switch(a){case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:return 3;
case 1073742048:case 1073742049:case 1073742050:case 1073742051:return 1;case 1073742052:case 1073742053:case 1073742054:case 1073742055:return 2;default:return 0}};var le=function(){};k["openfl.ui.Mouse"]=le;le.__name__="openfl.ui.Mouse";le.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};le.hide=function(){le.__hidden=!0;for(var a=0,b=rd.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};le.show=function(){le.__hidden=!1;var a=le.__cursor;le.__cursor=null;le.set_cursor(a)};
le.get_cursor=function(){return le.__cursor};le.set_cursor=function(a){null==a&&(a="auto");var b=null;switch(a){case "arrow":b=kc.ARROW;break;case "button":b=kc.POINTER;break;case "crosshair":b=kc.CROSSHAIR;break;case "custom":b=kc.CUSTOM;break;case "hand":b=kc.MOVE;break;case "ibeam":b=kc.TEXT;break;case "resize_nesw":b=kc.RESIZE_NESW;break;case "resize_ns":b=kc.RESIZE_NS;break;case "resize_nwse":b=kc.RESIZE_NWSE;break;case "resize_we":b=kc.RESIZE_WE;break;case "wait":b=kc.WAIT;break;case "waitarrow":b=
kc.WAIT_ARROW}if(null!=b&&!le.__hidden)for(var c=0,d=rd.current.__windows;c<d.length;){var e=d[c];++c;e.set_cursor(b)}return le.__cursor=a};var vf={fromLimeCursor:function(a){switch(a._hx_index){case 0:return"arrow";case 1:return"crosshair";case 2:return"auto";case 3:return"hand";case 4:return"button";case 5:return"resize_nesw";case 6:return"resize_ns";case 7:return"resize_nwse";case 8:return"resize_we";case 9:return"ibeam";case 10:return"wait";case 11:return"waitarrow";case 12:return"custom"}},toLimeCursor:function(a){switch(a){case "arrow":return kc.ARROW;
case "auto":return kc.DEFAULT;case "button":return kc.POINTER;case "crosshair":return kc.CROSSHAIR;case "custom":return kc.CUSTOM;case "hand":return kc.MOVE;case "ibeam":return kc.TEXT;case "resize_nesw":return kc.RESIZE_NESW;case "resize_ns":return kc.RESIZE_NS;case "resize_nwse":return kc.RESIZE_NWSE;case "resize_we":return kc.RESIZE_WE;case "wait":return kc.WAIT;case "waitarrow":return kc.WAIT_ARROW;default:return kc.DEFAULT}}},Me=function(){};k["openfl.ui.Multitouch"]=Me;Me.__name__="openfl.ui.Multitouch";
Me.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};Me.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var Y=function(a){null==a&&(a=!1);this.debugEnabled=a;Y.initialized||Y.init()};k["openfl.utils.AGALMiniAssembler"]=Y;Y.__name__="openfl.utils.AGALMiniAssembler";Y.init=function(){Y.initialized=!0;var a=Y.OPMAP,b=new Zb("mov",2,0,0);a.h.mov=b;a=Y.OPMAP;b=new Zb("add",3,1,0);a.h.add=
b;a=Y.OPMAP;b=new Zb("sub",3,2,0);a.h.sub=b;a=Y.OPMAP;b=new Zb("mul",3,3,0);a.h.mul=b;a=Y.OPMAP;b=new Zb("div",3,4,0);a.h.div=b;a=Y.OPMAP;b=new Zb("rcp",2,5,0);a.h.rcp=b;a=Y.OPMAP;b=new Zb("min",3,6,0);a.h.min=b;a=Y.OPMAP;b=new Zb("max",3,7,0);a.h.max=b;a=Y.OPMAP;b=new Zb("frc",2,8,0);a.h.frc=b;a=Y.OPMAP;b=new Zb("sqt",2,9,0);a.h.sqt=b;a=Y.OPMAP;b=new Zb("rsq",2,10,0);a.h.rsq=b;a=Y.OPMAP;b=new Zb("pow",3,11,0);a.h.pow=b;a=Y.OPMAP;b=new Zb("log",2,12,0);a.h.log=b;a=Y.OPMAP;b=new Zb("exp",2,13,0);a.h.exp=
b;a=Y.OPMAP;b=new Zb("nrm",2,14,0);a.h.nrm=b;a=Y.OPMAP;b=new Zb("sin",2,15,0);a.h.sin=b;a=Y.OPMAP;b=new Zb("cos",2,16,0);a.h.cos=b;a=Y.OPMAP;b=new Zb("crs",3,17,0);a.h.crs=b;a=Y.OPMAP;b=new Zb("dp3",3,18,0);a.h.dp3=b;a=Y.OPMAP;b=new Zb("dp4",3,19,0);a.h.dp4=b;a=Y.OPMAP;b=new Zb("abs",2,20,0);a.h.abs=b;a=Y.OPMAP;b=new Zb("neg",2,21,0);a.h.neg=b;a=Y.OPMAP;b=new Zb("sat",2,22,0);a.h.sat=b;a=Y.OPMAP;b=new Zb("m33",3,23,16);a.h.m33=b;a=Y.OPMAP;b=new Zb("m44",3,24,16);a.h.m44=b;a=Y.OPMAP;b=new Zb("m34",
3,25,16);a.h.m34=b;a=Y.OPMAP;b=new Zb("ddx",2,26,288);a.h.ddx=b;a=Y.OPMAP;b=new Zb("ddy",2,27,288);a.h.ddy=b;a=Y.OPMAP;b=new Zb("ife",2,28,897);a.h.ife=b;a=Y.OPMAP;b=new Zb("ine",2,29,897);a.h.ine=b;a=Y.OPMAP;b=new Zb("ifg",2,30,897);a.h.ifg=b;a=Y.OPMAP;b=new Zb("ifl",2,31,897);a.h.ifl=b;a=Y.OPMAP;b=new Zb("els",0,32,1921);a.h.els=b;a=Y.OPMAP;b=new Zb("eif",0,33,1409);a.h.eif=b;a=Y.OPMAP;b=new Zb("kil",1,39,160);a.h.kil=b;a=Y.OPMAP;b=new Zb("tex",3,40,40);a.h.tex=b;a=Y.OPMAP;b=new Zb("sge",3,41,0);
a.h.sge=b;a=Y.OPMAP;b=new Zb("slt",3,42,0);a.h.slt=b;a=Y.OPMAP;b=new Zb("sgn",2,43,0);a.h.sgn=b;a=Y.OPMAP;b=new Zb("seq",3,44,0);a.h.seq=b;a=Y.OPMAP;b=new Zb("sne",3,45,0);a.h.sne=b;a=Y.SAMPLEMAP;b=new Yc("rgba",8,0);a.h.rgba=b;a=Y.SAMPLEMAP;b=new Yc("compressed",8,1);a.h.compressed=b;a=Y.SAMPLEMAP;b=new Yc("compressedalpha",8,2);a.h.compressedalpha=b;a=Y.SAMPLEMAP;b=new Yc("dxt1",8,1);a.h.dxt1=b;a=Y.SAMPLEMAP;b=new Yc("dxt5",8,2);a.h.dxt5=b;a=Y.SAMPLEMAP;b=new Yc("video",8,3);a.h.video=b;a=Y.SAMPLEMAP;
b=new Yc("2d",12,0);a.h["2d"]=b;a=Y.SAMPLEMAP;b=new Yc("3d",12,2);a.h["3d"]=b;a=Y.SAMPLEMAP;b=new Yc("cube",12,1);a.h.cube=b;a=Y.SAMPLEMAP;b=new Yc("mipnearest",24,1);a.h.mipnearest=b;a=Y.SAMPLEMAP;b=new Yc("miplinear",24,2);a.h.miplinear=b;a=Y.SAMPLEMAP;b=new Yc("mipnone",24,0);a.h.mipnone=b;a=Y.SAMPLEMAP;b=new Yc("nomip",24,0);a.h.nomip=b;a=Y.SAMPLEMAP;b=new Yc("nearest",28,0);a.h.nearest=b;a=Y.SAMPLEMAP;b=new Yc("linear",28,1);a.h.linear=b;a=Y.SAMPLEMAP;b=new Yc("anisotropic2x",28,2);a.h.anisotropic2x=
b;a=Y.SAMPLEMAP;b=new Yc("anisotropic4x",28,3);a.h.anisotropic4x=b;a=Y.SAMPLEMAP;b=new Yc("anisotropic8x",28,4);a.h.anisotropic8x=b;a=Y.SAMPLEMAP;b=new Yc("anisotropic16x",28,5);a.h.anisotropic16x=b;a=Y.SAMPLEMAP;b=new Yc("centroid",16,1);a.h.centroid=b;a=Y.SAMPLEMAP;b=new Yc("single",16,2);a.h.single=b;a=Y.SAMPLEMAP;b=new Yc("ignoresampler",16,4);a.h.ignoresampler=b;a=Y.SAMPLEMAP;b=new Yc("repeat",20,1);a.h.repeat=b;a=Y.SAMPLEMAP;b=new Yc("wrap",20,1);a.h.wrap=b;a=Y.SAMPLEMAP;b=new Yc("clamp",20,
0);a.h.clamp=b;a=Y.SAMPLEMAP;b=new Yc("clamp_u_repeat_v",20,2);a.h.clamp_u_repeat_v=b;a=Y.SAMPLEMAP;b=new Yc("repeat_u_clamp_v",20,3);a.h.repeat_u_clamp_v=b};Y.prototype={agalcode:null,error:null,verbose:null,debugEnabled:null,assemble2:function(a,b,c,d){c=this.assemble("vertex",c,b);b=this.assemble("fragment",d,b);a=a.createProgram();a.upload(c,b);return a},assemble:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=1);var e=Da.getTimer();this.agalcode=new oc(0);this.error="";var f=!1;"fragment"==a?f=
!0:"vertex"!=a&&(this.error='ERROR: mode needs to be "fragment" or "vertex" but is "'+a+'".');this.agalcode.__endian=1;this.agalcode.writeByte(160);this.agalcode.writeUnsignedInt(c);this.agalcode.writeByte(161);this.agalcode.writeByte(f?1:0);this.initregmap(c,d);a=R.replace(b,"\r","\n").split("\n");b=0;d=a.length;for(var g=new aa("<.*>","g"),h=new aa("([\\w\\.\\-\\+]+)","gi"),m=new aa("^\\w{3}","ig"),l=new aa("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?",
"gi"),n=new aa("\\[.*\\]","ig"),p=new aa("^\\b[A-Za-z]{1,3}","ig"),k=new aa("\\d+",""),q=new aa("(\\.[xyzw]{1,4})",""),t=new aa("[A-Za-z]{1,3}","ig"),v=new aa("(\\.[xyzw]{1,1})",""),r=new aa("\\+\\d{1,3}","ig"),u=0;u<d&&""==this.error;){var x=R.trim(a[u]),C=x.indexOf("//");-1!=C&&(x=I.substr(x,0,C));var P=g.match(x)?g.matchedPos().pos:-1;C=null;-1!=P&&(C=this.match(I.substr(x,P,null),h),x=I.substr(x,0,P));var F=null;m.match(x)&&(P=m.matched(0),F=Y.OPMAP.h[P]);if(null==F)3<=x.length&&Q.warn("warning: bad line "+
u+": "+a[u],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Q.info(F,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),null==F)3<=x.length&&Q.warn("warning: bad line "+u+": "+a[u],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else{x=I.substr(x,
x.indexOf(F.name)+F.name.length,null);if(0!=(F.flags&256)&&2>c){this.error="error: opcode requires version 2.";break}if(0!=(F.flags&64)&&f){this.error="error: opcode is only allowed in vertex programs.";break}if(0!=(F.flags&32)&&!f){this.error="error: opcode is only allowed in fragment programs.";break}this.verbose&&Q.info("emit opcode="+A.string(F),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});this.agalcode.writeUnsignedInt(F.emitCode);
++b;if(4096<b){this.error="error: too many opcodes. maximum is 4096.";break}var z=this.match(x,l);if(z.length!=F.numRegister){this.error="error: wrong number of operands. found "+z.length+" but expected "+F.numRegister+".";break}var y=!1,ka=160;x=0;for(P=z.length;x<P;){var B=x++,w=!1,G=this.match(z[B],n);0<G.length&&(z[B]=R.replace(z[B],G[0],"0"),this.verbose&&Q.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),
w=!0);var H=this.match(z[B],p);if(0==H.length){this.error="error: could not parse operand "+B+" ("+z[B]+").";y=!0;break}var D=Y.REGMAP.h[H[0]];this.debugEnabled&&Q.info(D,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(null==D){this.error="error: could not find register name for operand "+B+" ("+z[B]+").";y=!0;break}if(f){if(0==(D.flags&32)){this.error="error: register operand "+B+" ("+z[B]+") only allowed in vertex programs.";
y=!0;break}if(w){this.error="error: register operand "+B+" ("+z[B]+") relative adressing not allowed in fragment programs.";y=!0;break}}else if(0==(D.flags&64)){this.error="error: register operand "+B+" ("+z[B]+") only allowed in fragment programs.";y=!0;break}z[B]=I.substr(z[B],z[B].indexOf(D.name)+D.name.length,null);var J=w?this.match(G[0],k):this.match(z[B],k);H=0;0<J.length&&(H=A.parseInt(J[0]));if(ua.gt(H,D.range)){x=D.range+1;this.error="error: register operand "+B+" ("+z[B]+") index exceeds limit of "+
(null==x?"null":A.string(ua.toFloat(x)))+".";y=!0;break}var K=this.match(z[B],q),M=0==B&&0==(F.flags&128),O=2==B&&0!=(F.flags&8),Ba=0,X=0,T=0;if(M&&w){this.error="error: relative can not be destination";y=!0;break}if(0<K.length){for(var Ca=J=0,E=K[0].length,U=1;U<E;)Ca=I.cca(K[0],U)-120,ua.gt(Ca,2)&&(Ca=3),J=M?J|1<<Ca:J|Ca<<(U-1<<1),++U;if(!M)for(;4>=U;)J|=Ca<<(U-1<<1),++U}else J=M?15:228;if(w){K=this.match(G[0],t);Ba=Y.REGMAP.h[K[0]];if(null==Ba){this.error="error: bad index register";y=!0;break}Ba=
Ba.emitCode;Ca=this.match(G[0],v);if(0==Ca.length){this.error="error: bad index register select";y=!0;break}X=I.cca(Ca[0],1)-120;ua.gt(X,2)&&(X=3);G=this.match(G[0],r);0<G.length&&(T=A.parseInt(G[0]));if(0>T||255<T){this.error="error: index offset "+T+" out of bounds. [0..255]";y=!0;break}this.verbose&&Q.info("RELATIVE: type="+Ba+"=="+K[0]+" sel="+(null==X?"null":A.string(ua.toFloat(X)))+"=="+Ca[0]+" idx="+(null==H?"null":A.string(ua.toFloat(H)))+" offset="+T,{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Q.info("  emit argcode="+A.string(D)+"["+(null==H?"null":A.string(ua.toFloat(H)))+"]["+J+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(M)this.agalcode.writeShort(H),this.agalcode.writeByte(J),this.agalcode.writeByte(D.emitCode),ka-=32;else{if(O){this.verbose&&Q.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});B=5;G=w=0;for(D=null==C?0:C.length;G<D;)J=G++,this.verbose&&Q.info("    opt: "+C[J],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),M=Y.SAMPLEMAP.h[C[J]],null==M?(w=parseFloat(C[J]),this.verbose&&Q.info("    bias: "+w,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):
(16!=M.flag&&(B&=~(15<<M.flag)),B|=M.mask<<M.flag);this.agalcode.writeShort(H);this.agalcode.writeByte(8*w|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(B);this.verbose&&Q.info("    bits: "+(B-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else 0==B&&(this.agalcode.writeUnsignedInt(0),ka-=32),this.agalcode.writeShort(H),this.agalcode.writeByte(T),this.agalcode.writeByte(J),this.agalcode.writeByte(D.emitCode),
this.agalcode.writeByte(Ba),this.agalcode.writeShort(w?X|32768:0);ka-=64}}for(x=0;x<ka;)this.agalcode.writeByte(0),x+=8;if(y)break}++u}""!=this.error&&(this.error+="\n  at line "+u+" "+a[u],Ab.set_length(this.agalcode,0),Q.info(this.error,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";f=Ab.get_length(this.agalcode);x=0;for(P=f;x<P;)f=x++,0==f%16&&(c+="\n"),0==f%4&&(c+=" "),
f=R.hex(this.agalcode.b[f],2),2>f.length&&(f="0"+f),c+=f;Q.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Q.info("AGALMiniAssembler.assemble time: "+(Da.getTimer()-e)/1E3+"s",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});return this.agalcode},initregmap:function(a,b){var c=Y.REGMAP,d=new lf("va","vertex attribute",0,
b?1024:1==a||2==a?7:15,66);c.h.va=d;c=Y.REGMAP;d=new lf("vc","vertex constant",1,b?1024:1==a?127:249,66);c.h.vc=d;c=Y.REGMAP;d=new lf("vt","vertex temporary",2,b?1024:1==a?7:25,67);c.h.vt=d;c=Y.REGMAP;d=new lf("vo","vertex output",3,b?1024:0,65);c.h.vo=d;c=Y.REGMAP;d=new lf("vi","varying",4,b?1024:1==a?7:9,99);c.h.vi=d;c=Y.REGMAP;d=new lf("fc","fragment constant",1,b?1024:1==a?27:2==a?63:199,34);c.h.fc=d;c=Y.REGMAP;d=new lf("ft","fragment temporary",2,b?1024:1==a?7:25,35);c.h.ft=d;c=Y.REGMAP;d=new lf("fs",
"texture sampler",5,b?1024:7,34);c.h.fs=d;c=Y.REGMAP;d=new lf("fo","fragment output",3,b?1024:1==a?0:3,33);c.h.fo=d;c=Y.REGMAP;d=new lf("fd","fragment depth output",6,b?1024:1==a?-1:0,33);c.h.fd=d;c=Y.REGMAP;d=new lf("iid","instance id",7,b?1024:0,66);c.h.iid=d;d=Y.REGMAP.h.vo;Y.REGMAP.h.op=d;d=Y.REGMAP.h.vi;Y.REGMAP.h.i=d;d=Y.REGMAP.h.vi;Y.REGMAP.h.v=d;d=Y.REGMAP.h.fo;Y.REGMAP.h.oc=d;d=Y.REGMAP.h.fd;Y.REGMAP.h.od=d;d=Y.REGMAP.h.vi;Y.REGMAP.h.fi=d},match:function(a,b){for(var c=[],d=0;b.matchSub(a,
d);)d=b.matched(0),c.push(d),d=b.matchedPos().pos+d.length;return c},__class__:Y};var Zb=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};k["openfl.utils._AGALMiniAssembler.OpCode"]=Zb;Zb.__name__="openfl.utils._AGALMiniAssembler.OpCode";Zb.prototype={emitCode:null,flags:null,name:null,numRegister:null,toString:function(){return'[OpCode name="'+this.name+'", numRegister='+this.numRegister+", emitCode="+this.emitCode+", flags="+this.flags+"]"},__class__:Zb};var lf=function(a,
b,c,d,e){this.name=a;this.longName=b;this.emitCode=c;this.range=d;this.flags=e};k["openfl.utils._AGALMiniAssembler.Register"]=lf;lf.__name__="openfl.utils._AGALMiniAssembler.Register";lf.prototype={emitCode:null,name:null,longName:null,flags:null,range:null,toString:function(){return'[Register name="'+this.name+'", longName="'+this.longName+'", emitCode='+(null==this.emitCode?"null":A.string(ua.toFloat(this.emitCode)))+", range="+(null==this.range?"null":A.string(ua.toFloat(this.range)))+", flags="+
(null==this.flags?"null":A.string(ua.toFloat(this.flags)))+"]"},__class__:lf};var Yc=function(a,b,c){this.name=a;this.flag=b;this.mask=c};k["openfl.utils._AGALMiniAssembler.Sampler"]=Yc;Yc.__name__="openfl.utils._AGALMiniAssembler.Sampler";Yc.prototype={flag:null,mask:null,name:null,toString:function(){return'[Sampler name="'+this.name+'", flag="'+(null==this.flag?"null":A.string(ua.toFloat(this.flag)))+'", mask='+(null==this.mask?"null":A.string(ua.toFloat(this.mask)))+"]"},__class__:Yc};var kn=
function(){};k["openfl.utils.IAssetCache"]=kn;kn.__name__="openfl.utils.IAssetCache";kn.__isInterface__=!0;kn.prototype={get_enabled:null,set_enabled:null,clear:null,getBitmapData:null,getFont:null,getSound:null,hasBitmapData:null,hasFont:null,hasSound:null,removeBitmapData:null,removeFont:null,removeSound:null,setBitmapData:null,setFont:null,setSound:null,__class__:kn,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var ln=function(){this.__enabled=!0;this.bitmapData=new ia;
this.font=new ia;this.sound=new ia};k["openfl.utils.AssetCache"]=ln;ln.__name__="openfl.utils.AssetCache";ln.__interfaces__=[kn];ln.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(null==a)this.bitmapData=new ia,this.font=new ia,this.sound=new ia;else{var b=this.bitmapData.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var e=b[d++];R.startsWith(e,a)&&this.removeBitmapData(e)}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)e=b[d++],R.startsWith(e,a)&&this.removeFont(e);
b=this.sound.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)e=b[d++],R.startsWith(e,a)&&this.removeSound(e)}},getBitmapData:function(a){return this.bitmapData.h[a]},getFont:function(a){return this.font.h[a]},getSound:function(a){return this.sound.h[a]},hasBitmapData:function(a){return Object.prototype.hasOwnProperty.call(this.bitmapData.h,a)},hasFont:function(a){return Object.prototype.hasOwnProperty.call(this.font.h,a)},hasSound:function(a){return Object.prototype.hasOwnProperty.call(this.sound.h,a)},
removeBitmapData:function(a){var b=sa.cache.image;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.bitmapData;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeFont:function(a){var b=sa.cache.font;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.font;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeSound:function(a){var b=sa.cache.audio;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.sound;
return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},setBitmapData:function(a,b){this.bitmapData.h[a]=b},setFont:function(a,b){this.font.h[a]=b},setSound:function(a,b){this.sound.h[a]=b},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},__class__:ln,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Kd=function(){wb.call(this)};k["openfl.utils.AssetLibrary"]=Kd;Kd.__name__="openfl.utils.AssetLibrary";Kd.fromBundle=
function(a){a=wb.fromBundle(a);if(null!=a){if(a instanceof Kd)return a;var b=new Kd;b.__proxy=a;return b}return null};Kd.fromBytes=function(a,b){return Kd.fromManifest(Jc.fromBytes(Ab.toLimeBytes(a),b))};Kd.fromFile=function(a,b){return Kd.fromManifest(Jc.fromFile(a,b))};Kd.fromManifest=function(a){a=wb.fromManifest(a);if(null!=a){if(a instanceof Kd)return a;var b=new Kd;b.__proxy=a;return b}return null};Kd.loadFromBytes=function(a,b){return Jc.loadFromBytes(Ab.toLimeBytes(a),b).then(function(a){return Kd.loadFromManifest(a)})};
Kd.loadFromFile=function(a,b){return Jc.loadFromFile(a,b).then(function(a){return Kd.loadFromManifest(a)})};Kd.loadFromManifest=function(a){a=Kd.fromManifest(a);return null!=a?a.load().then(function(a){return eb.withValue(a)}):eb.withError("Could not load asset manifest")};Kd.__super__=wb;Kd.prototype=u(wb.prototype,{__proxy:null,bind:function(a,b){return!1},exists:function(a,b){return null!=this.__proxy?this.__proxy.exists(a,b):wb.prototype.exists.call(this,a,b)},getAsset:function(a,b){return null!=
this.__proxy?this.__proxy.getAsset(a,b):wb.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return null!=this.__proxy?this.__proxy.getAudioBuffer(a):wb.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return null!=this.__proxy?this.__proxy.getBytes(a):wb.prototype.getBytes.call(this,a)},getFont:function(a){return null!=this.__proxy?this.__proxy.getFont(a):wb.prototype.getFont.call(this,a)},getImage:function(a){return null!=this.__proxy?this.__proxy.getImage(a):wb.prototype.getImage.call(this,
a)},getMovieClip:function(a){return null},getPath:function(a){return null!=this.__proxy?this.__proxy.getPath(a):wb.prototype.getPath.call(this,a)},getText:function(a){return null!=this.__proxy?this.__proxy.getText(a):wb.prototype.getText.call(this,a)},isLocal:function(a,b){return null!=this.__proxy?this.__proxy.isLocal(a,b):wb.prototype.isLocal.call(this,a,b)},list:function(a){return null!=this.__proxy?this.__proxy.list(a):wb.prototype.list.call(this,a)},loadAsset:function(a,b){return null!=this.__proxy?
this.__proxy.loadAsset(a,b):wb.prototype.loadAsset.call(this,a,b)},load:function(){return null!=this.__proxy?this.__proxy.load():wb.prototype.load.call(this)},loadAudioBuffer:function(a){return null!=this.__proxy?this.__proxy.loadAudioBuffer(a):wb.prototype.loadAudioBuffer.call(this,a)},loadBytes:function(a){return null!=this.__proxy?this.__proxy.loadBytes(a):wb.prototype.loadBytes.call(this,a)},loadFont:function(a){return null!=this.__proxy?this.__proxy.loadFont(a):wb.prototype.loadFont.call(this,
a)},loadImage:function(a){return null!=this.__proxy?this.__proxy.loadImage(a):wb.prototype.loadImage.call(this,a)},loadMovieClip:function(a){return eb.withValue(this.getMovieClip(a))},loadText:function(a){return null!=this.__proxy?this.__proxy.loadText(a):wb.prototype.loadText.call(this,a)},unload:function(){null!=this.__proxy?this.__proxy.unload():wb.prototype.unload.call(this)},__class__:Kd});var va=function(){};k["openfl.utils.Assets"]=va;va.__name__="openfl.utils.Assets";va.addEventListener=function(a,
b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);sa.onChange.has(va.LimeAssets_onChange)||sa.onChange.add(va.LimeAssets_onChange);va.dispatcher.addEventListener(a,b,c,d,e)};va.dispatchEvent=function(a){return va.dispatcher.dispatchEvent(a)};va.exists=function(a,b){return sa.exists(a,b)};va.getBitmapData=function(a,b){null==b&&(b=!0);if(b&&va.cache.get_enabled()&&va.cache.hasBitmapData(a)){var c=va.cache.getBitmapData(a);if(va.isValidBitmapData(c))return c}c=sa.getImage(a,!1);return null!=c?
(c=La.fromImage(c),b&&va.cache.get_enabled()&&va.cache.setBitmapData(a,c),c):null};va.getBytes=function(a){return Ab.fromLimeBytes(sa.getBytes(a))};va.getFont=function(a,b){null==b&&(b=!0);if(b&&va.cache.get_enabled()&&va.cache.hasFont(a))return va.cache.getFont(a);var c=sa.getFont(a,!1);if(null!=c){var d=new Rc;d.__fromLimeFont(c);b&&va.cache.get_enabled()&&va.cache.setFont(a,d);return d}return new Rc};va.getLibrary=function(a){return sa.getLibrary(a)};va.getMovieClip=function(a){var b=a.substring(0,
a.indexOf(":")),c=I.substr(a,a.indexOf(":")+1,null),d=va.getLibrary(b);if(null!=d){if(d instanceof Kd&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,"MOVIE_CLIP"))return d.getMovieClip(c);a='MovieClip asset "'+a+'" exists, but only asynchronously';b={fileName:"openfl/utils/Assets.hx",lineNumber:215,className:"openfl.utils.Assets",methodName:"getMovieClip"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b);return null}a='There is no MovieClip asset with an ID of "'+
a+'"';b={fileName:"openfl/utils/Assets.hx",lineNumber:221,className:"openfl.utils.Assets",methodName:"getMovieClip"}}else a='There is no asset library named "'+b+'"',b={fileName:"openfl/utils/Assets.hx",lineNumber:225,className:"openfl.utils.Assets",methodName:"getMovieClip"};if(xc.throwErrors)throw a="["+b.className+"] ERROR: "+A.string(a),J.thrown(a);Q.error(a,b);return null};va.getMusic=function(a,b){null==b&&(b=!0);return va.getSound(a,b)};va.getPath=function(a){return sa.getPath(a)};va.getSound=
function(a,b){null==b&&(b=!0);if(b&&va.cache.get_enabled()&&va.cache.hasSound(a)){var c=va.cache.getSound(a);if(va.isValidSound(c))return c}c=sa.getAudioBuffer(a,!1);return null!=c?(c=xf.fromAudioBuffer(c),b&&va.cache.get_enabled()&&va.cache.setSound(a,c),c):null};va.getText=function(a){return sa.getText(a)};va.hasEventListener=function(a){return va.dispatcher.hasEventListener(a)};va.hasLibrary=function(a){return sa.hasLibrary(a)};va.initBinding=function(a,b){if(Object.prototype.hasOwnProperty.call(va.libraryBindings.h,
a)){var c=va.libraryBindings.h[a];null==b?Ya.__constructor=function(b){b.__bind(c,a)}:(Ya.__constructor=null,b.__bind(c,a))}else Q.warn('No asset is registered as "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:367,className:"openfl.utils.Assets",methodName:"initBinding"})};va.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&va.cache.get_enabled()&&(("IMAGE"==b||null==b)&&va.cache.hasBitmapData(a)||("FONT"==b||null==b)&&va.cache.hasFont(a)||("SOUND"==b||"MUSIC"==b||null==b)&&va.cache.hasSound(a)))return!0;
c=a.substring(0,a.indexOf(":"));a=I.substr(a,a.indexOf(":")+1,null);c=va.getLibrary(c);return null!=c?c.isLocal(a,b):!1};va.isValidBitmapData=function(a){return null!=a&&null!=a.image};va.isValidSound=function(a){return!0};va.list=function(a){return sa.list(a)};va.loadBitmapData=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new Yd;if(b&&va.cache.get_enabled()&&va.cache.hasBitmapData(a)){var d=va.cache.getBitmapData(a);if(va.isValidBitmapData(d))return c.complete(d),c.future}sa.loadImage(a,!1).onComplete(function(d){null!=
d?(d=La.fromImage(d),b&&va.cache.get_enabled()&&va.cache.setBitmapData(a,d),c.complete(d)):c.error('[Assets] Could not load Image "'+a+'"')}).onError(r(c,c.error)).onProgress(r(c,c.progress));return c.future};va.loadBytes=function(a){var b=new Yd;a=sa.loadBytes(a);a.onComplete(function(a){b.complete(Ab.fromLimeBytes(a))});a.onProgress(function(a,d){b.progress(a,d)});a.onError(function(a){b.error(a)});return b.future};va.loadFont=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new Yd;if(b&&va.cache.get_enabled()&&
va.cache.hasFont(a))return c.complete(va.cache.getFont(a)),c.future;sa.loadFont(a).onComplete(function(d){var e=new Rc;e.__fromLimeFont(d);b&&va.cache.get_enabled()&&va.cache.setFont(a,e);c.complete(e)}).onError(r(c,c.error)).onProgress(r(c,c.progress));return c.future};va.loadLibrary=function(a){return sa.loadLibrary(a).then(function(b){var c=null;null!=b&&(b instanceof Kd?c=b:(c=new Kd,c.__proxy=b,sa.registerLibrary(a,c)));return eb.withValue(c)})};va.loadMusic=function(a,b){null==b&&(b=!0);null==
b&&(b=!0);return new eb(function(){return va.getMusic(a,b)})};va.loadMovieClip=function(a){var b=new Yd,c=a.substring(0,a.indexOf(":")),d=I.substr(a,a.indexOf(":")+1,null),e=va.getLibrary(c);if(null!=e){if(e instanceof Kd&&e.exists(d,"MOVIE_CLIP"))return b.completeWith(e.loadMovieClip(d)),b.future;b.error('[Assets] There is no MovieClip asset with an ID of "'+a+'"')}else b.error('[Assets] There is no asset library named "'+c+'"');return b.future};va.loadSound=function(a,b){null==b&&(b=!0);null==b&&
(b=!0);var c=new Yd;sa.loadAudioBuffer(a,b).onComplete(function(d){null!=d?(d=xf.fromAudioBuffer(d),b&&va.cache.get_enabled()&&va.cache.setSound(a,d),c.complete(d)):c.error('[Assets] Could not load Sound "'+a+'"')}).onError(r(c,c.error)).onProgress(r(c,c.progress));return c.future};va.loadText=function(a){return sa.loadText(a)};va.registerBinding=function(a,b){va.libraryBindings.h[a]=b};va.registerLibrary=function(a,b){sa.registerLibrary(a,b)};va.removeEventListener=function(a,b,c){null==c&&(c=!1);
va.dispatcher.removeEventListener(a,b,c)};va.resolveClass=function(a){return k[a]};va.resolveEnum=function(a){return x[a]};va.unloadLibrary=function(a){sa.unloadLibrary(a)};va.unregisterBinding=function(a,b){Object.prototype.hasOwnProperty.call(va.libraryBindings.h,a)&&va.libraryBindings.h[a]==b&&(b=va.libraryBindings,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a])};va.LimeAssets_onChange=function(){va.dispatchEvent(new la("change"))};var Ab={__properties__:{set_position:"set_position",
get_position:"get_position",set_length:"set_length",get_length:"get_length",get_bytesAvailable:"get_bytesAvailable",set_defaultObjectEncoding:"set_defaultObjectEncoding",get_defaultObjectEncoding:"get_defaultObjectEncoding",set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"},_new:function(a){null==a&&(a=0);return new oc(a)},clear:function(a){a.clear()},compress:function(a,b){a.compress(b)},deflate:function(a){a.deflate()},fromArrayBuffer:function(a){return null==a?null:oc.fromBytes(ib.ofData(a))},
fromBytes:function(a){return null==a?null:a instanceof oc?a:oc.fromBytes(a)},fromBytesData:function(a){return null==a?null:oc.fromBytes(ib.ofData(a))},fromFile:function(a){return Ab.fromLimeBytes(ic.fromFile(a))},fromLimeBytes:function(a){return Ab.fromBytes(a)},get:function(a,b){return a.b[b]},inflate:function(a){a.inflate()},loadFromBytes:function(a){return ic.loadFromBytes(a).then(function(a){a=Ab.fromLimeBytes(a);return eb.withValue(a)})},loadFromFile:function(a){return ic.loadFromFile(a).then(function(a){a=
Ab.fromLimeBytes(a);return eb.withValue(a)})},readBoolean:function(a){return a.readBoolean()},readByte:function(a){return a.readByte()},readBytes:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.readBytes(b,c,d)},readDouble:function(a){return a.readDouble()},readFloat:function(a){return a.readFloat()},readInt:function(a){return a.readInt()},readMultiByte:function(a,b,c){return a.readMultiByte(b,c)},readObject:function(a){return a.readObject()},readShort:function(a){return a.readShort()},readUTF:function(a){return a.readUTF()},
readUTFBytes:function(a,b){return a.readUTFBytes(b)},readUnsignedByte:function(a){return a.readUnsignedByte()},readUnsignedInt:function(a){return a.readUnsignedInt()},readUnsignedShort:function(a){return a.readUnsignedShort()},set:function(a,b,c){a.__resize(b+1);a.b[b]=c&255;return c},toArrayBuffer:function(a){return a.b.bufferValue},toBytePointer:function(a){ps.set(Ab.__bytePointer,a,null,null,a.position);return Ab.__bytePointer},toBytes:function(a){return a},toBytesData:function(a){return a.b.bufferValue},
toLimeBytes:function(a){return a},toString:function(a){return a.toString()},uncompress:function(a,b){a.uncompress(b)},writeBoolean:function(a,b){a.writeBoolean(b)},writeByte:function(a,b){a.writeByte(b)},writeBytes:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.writeBytes(b,c,d)},writeDouble:function(a,b){a.writeDouble(b)},writeFloat:function(a,b){a.writeFloat(b)},writeInt:function(a,b){a.writeInt(b)},writeMultiByte:function(a,b,c){a.writeMultiByte(b,c)},writeObject:function(a,b){a.writeObject(b)},
writeShort:function(a,b){a.writeShort(b)},writeUTF:function(a,b){a.writeUTF(b)},writeUTFBytes:function(a,b){a.writeUTFBytes(b)},writeUnsignedInt:function(a,b){a.writeUnsignedInt(b)},get_bytesAvailable:function(a){return a.length-a.position},get_defaultEndian:function(){null==oc.__defaultEndian&&(Qa.get_endianness()==yg.LITTLE_ENDIAN?oc.__defaultEndian=1:oc.__defaultEndian=0);return oc.__defaultEndian},set_defaultEndian:function(a){return oc.__defaultEndian=a},get_defaultObjectEncoding:function(){return oc.defaultObjectEncoding},
set_defaultObjectEncoding:function(a){return oc.defaultObjectEncoding=a},get_endian:function(a){return a.__endian},set_endian:function(a,b){return a.__endian=b},get_length:function(a){return null==a?0:a.length},set_length:function(a,b){0<=b&&(a.__resize(b),b<a.position&&(a.position=b));return a.length=b},get_objectEncoding:function(a){return a.objectEncoding},set_objectEncoding:function(a,b){return a.objectEncoding=b},get_position:function(a){return a.position},set_position:function(a,b){return a.position=
b}},mn=function(){};k["openfl.utils.IDataOutput"]=mn;mn.__name__="openfl.utils.IDataOutput";mn.__isInterface__=!0;mn.prototype={get_endian:null,set_endian:null,objectEncoding:null,writeBoolean:null,writeByte:null,writeBytes:null,writeDouble:null,writeFloat:null,writeInt:null,writeMultiByte:null,writeObject:null,writeShort:null,writeUnsignedInt:null,writeUTF:null,writeUTFBytes:null,__class__:mn,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var nn=function(){};k["openfl.utils.IDataInput"]=
nn;nn.__name__="openfl.utils.IDataInput";nn.__isInterface__=!0;nn.prototype={get_bytesAvailable:null,get_endian:null,set_endian:null,objectEncoding:null,readBoolean:null,readByte:null,readBytes:null,readDouble:null,readFloat:null,readInt:null,readMultiByte:null,readObject:null,readShort:null,readUnsignedByte:null,readUnsignedInt:null,readUnsignedShort:null,readUTF:null,readUTFBytes:null,__class__:nn,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};
var oc=function(a){null==a&&(a=0);var b=new ib(new ArrayBuffer(a));ib.call(this,b.b.buffer);this.__length=a;null==oc.__defaultEndian&&(Qa.get_endianness()==yg.LITTLE_ENDIAN?oc.__defaultEndian=1:oc.__defaultEndian=0);this.__endian=oc.__defaultEndian;this.objectEncoding=oc.defaultObjectEncoding;this.position=0};k["openfl.utils.ByteArrayData"]=oc;oc.__name__="openfl.utils.ByteArrayData";oc.__interfaces__=[mn,nn];oc.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};
oc.fromBytes=function(a){var b=new oc;b.__fromBytes(a);return b};oc.get_defaultEndian=function(){null==oc.__defaultEndian&&(Qa.get_endianness()==yg.LITTLE_ENDIAN?oc.__defaultEndian=1:oc.__defaultEndian=0);return oc.__defaultEndian};oc.set_defaultEndian=function(a){return oc.__defaultEndian=a};oc.__super__=ib;oc.prototype=u(ib.prototype,{objectEncoding:null,position:null,__endian:null,__length:null,clear:function(){this.position=this.length=0},compress:function(a){null==a&&(a=2);if(this.__length>this.length){var b=
this.length;this.length=this.__length;var c=new ib(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__length=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=ic.compress(this,Zd.DEFLATE);break;case 1:a=ic.compress(this,Zd.LZMA);break;default:a=ic.compress(this,Zd.ZLIB)}null!=a&&(this.b=a.b,this.__length=a.length,this.data=a.data,this.position=this.length=this.__length)},deflate:function(){this.compress(0)},inflate:function(){this.uncompress(0)},readBoolean:function(){if(this.position<
this.length)return 0!=this.b[this.position++];throw new $g;},readByte:function(){var a=this.readUnsignedByte();return 0!=(a&128)?a-256:a},readBytes:function(a,b,c){null==c&&(c=0);null==b&&(b=0);0==c&&(c=this.length-this.position);if(this.position+c>this.length)throw new $g;a.length<b+c&&a.__resize(b+c);a.blit(b,this,this.position,c);this.position+=c},readDouble:function(){if(1==this.__endian){if(this.position+8>this.length)throw new $g;this.position+=8;return this.getDouble(this.position-8)}var a=
this.readInt(),b=this.readInt();return Xd.i64ToDouble(b,a)},readFloat:function(){if(1==this.__endian){if(this.position+4>this.length)throw new $g;this.position+=4;return this.getFloat(this.position-4)}return Xd.i32ToFloat(this.readInt())},readInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return 1==this.__endian?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readMultiByte:function(a,b){return this.readUTFBytes(a)},readObject:function(){switch(this.objectEncoding){case 10:var a=
this.readUTF();return Fe.run(a);case 12:return a=this.readUTF(),JSON.parse(a);default:return null}},readShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();a=1==this.__endian?b<<8|a:a<<8|b;return 0!=(a&32768)?a-65536:a},readUnsignedByte:function(){if(this.position<this.length)return this.b[this.position++];throw new $g;},readUnsignedInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return 1==this.__endian?
d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();return 1==this.__endian?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readUTFBytes:function(a){if(this.position+a>this.length)throw new $g;this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){null==a&&(a=2);if(this.__length>this.length){var b=this.length;this.length=this.__length;var c=new ib(new ArrayBuffer(b));
c.blit(0,this,0,b);this.b=c.b;this.__length=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=ic.decompress(this,Zd.DEFLATE);break;case 1:a=ic.decompress(this,Zd.LZMA);break;default:a=ic.decompress(this,Zd.ZLIB)}null!=a&&(this.b=a.b,this.__length=a.length,this.data=a.data,this.length=this.__length);this.position=0},writeBoolean:function(a){this.writeByte(a?1:0)},writeByte:function(a){this.__resize(this.position+1);this.b[this.position++]=a&255},writeBytes:function(a,b,c){null==c&&(c=0);null==
b&&(b=0);0!=Ab.get_length(a)&&(0==c&&(c=Ab.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,a,b,c),this.position+=c)},writeDouble:function(a){a=Xd.doubleToI64(a);1==this.__endian?(this.writeInt(a.low),this.writeInt(a.high)):(this.writeInt(a.high),this.writeInt(a.low))},writeFloat:function(a){1==this.__endian?(this.__resize(this.position+4),this.setFloat(this.position,a),this.position+=4):(a=Xd.floatToI32(a),this.writeInt(a))},writeInt:function(a){this.__resize(this.position+
4);1==this.__endian?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>24&255):(this.b[this.position++]=a>>24&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeObject:function(a){switch(this.objectEncoding){case 10:a=ye.run(a);this.writeUTF(a);break;case 12:a=JSON.stringify(a),this.writeUTF(a)}},writeShort:function(a){this.__resize(this.position+
2);1==this.__endian?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255):(this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeUnsignedInt:function(a){this.writeInt(a)},writeUTF:function(a){a=ib.ofString(a);this.writeShort(a.length);this.writeBytes(Ab.fromBytes(a))},writeUTFBytes:function(a){a=ib.ofString(a);this.writeBytes(Ab.fromBytes(a))},__fromBytes:function(a){this.b=a.b;this.__length=a.length;this.data=a.data;this.length=a.length},__resize:function(a){if(a>this.__length){var b=
new ib(new ArrayBuffer(3*(a+1)>>1));if(0<this.__length){var c=this.length;this.length=this.__length;b.blit(0,this,0,this.__length);this.length=c}this.b=b.b;this.__length=b.length;this.data=b.data}this.length<a&&(this.length=a)},__setData:function(a){this.b=a.b;this.__length=a.length;this.data=a.data},get_bytesAvailable:function(){return this.length-this.position},get_endian:function(){return this.__endian},set_endian:function(a){return this.__endian=a},__class__:oc,__properties__:{set_endian:"set_endian",
get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var qs={exists:function(a,b){return a.exists(b)},get:function(a,b){return a.get(b)},keyValueIterator:function(a){return a.keyValueIterator()},remove:function(a,b){return a.remove(b)},set:function(a,b,c){a.set(b,c);return c},iterator:function(a){return a.keys()},each:function(a){return a.iterator()},toStringMap:function(a,b){return new ia},toIntMap:function(a,b){return new Xa},toFloatMap:function(a,b){return new Zi},toEnumValueMapMap:function(a,
b){return new Gj},toObjectMap:function(a,b){return new Vb},toUtilsObjectMap:function(a,b){return new $i},toClassMap:function(a,b){return new aj},fromStringMap:function(a){return a},fromIntMap:function(a){return a},fromFloatMap:function(a){return a},fromObjectMap:function(a){return a},fromUtilsObjectMap:function(a){return a},fromClassMap:function(a){return a}},aj=function(){this.types=new ia;this.values=new ia};k["openfl.utils._Dictionary.ClassMap"]=aj;aj.__name__="openfl.utils._Dictionary.ClassMap";
aj.__interfaces__=[Od];aj.prototype={types:null,values:null,clear:function(){this.types.h=Object.create(null);this.values.h=Object.create(null)},copy:function(){for(var a=new aj,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return Object.prototype.hasOwnProperty.call(this.types.h,a.__name__)},get:function(a){return this.values.h[a.__name__]},keyValueIterator:function(){return new ch(this)},keys:function(){return new xi(this.types.h)},iterator:function(){return new xi(this.values.h)},
remove:function(a){a=a.__name__;var b=this.types;Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],b=!0):b=!1;if(b)return!0;b=this.values;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},set:function(a,b){var c=a.__name__;this.types.h[c]=a;this.values.h[c]=b},toString:function(){return ia.stringify(this.values.h)},__class__:aj};var Zi=function(){this.floatKeys=[];this.values=[]};k["openfl.utils._Dictionary.FloatMap"]=Zi;Zi.__name__="openfl.utils._Dictionary.FloatMap";
Zi.__interfaces__=[Od];Zi.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=[];this.values=[]},copy:function(){for(var a=new Zi,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return-1<this.indexOf(a)},get:function(a){a=this.indexOf(a);return-1<a?this.values[a]:null},keyValueIterator:function(){return new ch(this)},keys:function(){return new se(this.floatKeys.slice())},iterator:function(){return new se(this.values.slice())},remove:function(a){a=
this.indexOf(a);return-1<a?(this.floatKeys.splice(a,1),this.values.splice(a,1),!0):!1},set:function(a,b){this.insertSorted(a,b)},indexOf:function(a){var b=this.floatKeys.length,c=0,d=b-1;if(0==b)return-1;for(;c<d;){b=Math.floor((c+d)/2);if(this.floatKeys[b]==a)return b;this.floatKeys[b]>a?d=b-1:c=b+1}return this.floatKeys[c]==a?c:-1},insertSorted:function(a,b){var c=this.floatKeys.length,d=0,e=c-1;if(0==c)this.floatKeys.push(a),this.values.push(b);else{for(;d<e;){c=Math.floor((d+e)/2);if(this.floatKeys[c]==
a){this.values[c]=b;return}this.floatKeys[c]>a?e=c-1:d=c+1}this.floatKeys[d]>a?(this.floatKeys.splice(d,0,a),this.values.splice(d,0,b)):this.floatKeys[d]<a?(this.floatKeys.splice(d+1,0,a),this.values.splice(d+1,0,b)):this.values[d]=b}},toString:function(){return this.values.toString()},__class__:Zi};var $i=function(){this.map=new Vb};k["openfl.utils._Dictionary.UtilsObjectMap"]=$i;$i.__name__="openfl.utils._Dictionary.UtilsObjectMap";$i.__interfaces__=[Od];$i.prototype={map:null,clear:function(){this.map.h=
{__keys__:{}}},copy:function(){for(var a=new $i,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return null!=this.map.h.__keys__[a.__id__]},get:function(a){return this.map.h[a.__id__]},keyValueIterator:function(){return new ch(this)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},remove:function(a){return this.map.remove(a)},set:function(a,b){this.map.set(a,b)},toString:function(){return this.map.toString()},__class__:$i};
var Vr={fromLimeEndian:function(a){switch(a._hx_index){case 0:return 1;case 1:return 0}},fromString:function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;default:return null}},toLimeEndian:function(a){switch(a){case 0:return yg.BIG_ENDIAN;case 1:return yg.LITTLE_ENDIAN;default:return null}},toString:function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";default:return null}}},je={_new:function(){return{}},hasOwnProperty:function(a,b){return null!=a?Object.prototype.hasOwnProperty.call(a,
b):!1},isPrototypeOf:function(a,b){if(null!=a)for(a=U.getClass(a);null!=a;){if(a==b)return!0;a=a.__super__}return!1},iterator:function(a){if(a instanceof Array)return new se(a);var b=X.fields(a);null==b&&(b=[]);if(a instanceof jb)for(var c=0,d=a.get_numChildren();c<d;){var e=c++;e=a.getChildAt(e).get_name();null!=e&&-1==b.indexOf(e)&&b.push(e)}return new se(b)},propertyIsEnumerable:function(a,b){return null!=a&&Object.prototype.hasOwnProperty.call(a,b)?U.__implements(X.field(a,b),fk):!1},toLocaleString:function(a){return null==
a?null:A.string(a)},toString:function(a){return null==a?null:A.string(a)},valueOf:function(a){return a},__fieldRead:function(a,b){return je.__get(a,b)},__fieldWrite:function(a,b,c){null!=a&&X.setProperty(a,b,c);return c},__get:function(a,b){if(null==a||null==b)return null;if(Object.prototype.hasOwnProperty.call(a,b))return X.field(a,b);if(a instanceof jb){var c=a.getChildByName(b);if(null!=c)return c}return X.getProperty(a,b)},__set:function(a,b,c){null!=a&&X.setProperty(a,b,c);return c},__getArray:function(a,
b){return null==a?null:U.__cast(a,Array)[b]},__setArray:function(a,b,c){return null==a?c:U.__cast(a,Array)[b]=c},toFunction:function(a){return a},toFloat:function(a){return"number"==typeof a?a:NaN},toInt:function(a){return a},toBool:function(a){return"boolean"==typeof a?a:"number"==typeof a?0!=a:null!=a},__negate:function(a){return-a},__preIncrement:function(a){return++a},__postIncrement:function(a){return a++},__preDecrement:function(a){return--a},__postDecrement:function(a){return a--},__add:function(a,
b){return"string"==typeof a||"string"==typeof b?(null==a?null:A.string(a))+(null==b?null:A.string(b)):a+b},__addString:function(a,b){return(null==a?null:A.string(a))+b},__addInt:function(a,b){return a+b},__addFloat:function(a,b){return a+b},__sub:function(a,b){return a-b},__subInt:function(a,b){return a-b},__intSub:function(a,b){return a-b},__subFloat:function(a,b){return a-b},__floatSub:function(a,b){return a-b},__mul:function(a,b){return a*b},__mulInt:function(a,b){return a*b},__mulFloat:function(a,
b){return a*b},__div:function(a,b){return a/b},__divInt:function(a,b){return a/b},__intDiv:function(a,b){return a/b},__divFloat:function(a,b){return a/b},__floatDiv:function(a,b){return a/b},__mod:function(a,b){return a%b},__modInt:function(a,b){return a%b},__intMod:function(a,b){return a%b},__modFloat:function(a,b){return a%b},__floatMod:function(a,b){return a%b},__eq:function(a,b){return a==b},__eqDynamic:function(a,b){return a==b},__neq:function(a,b){return a!=b},__neqDynamic:function(a,b){return a!=
b},__lt:function(a,b){return a<b},__ltInt:function(a,b){return a<b},__intLt:function(a,b){return a<b},__ltFloat:function(a,b){return a<b},__floatLt:function(a,b){return a<b},__lte:function(a,b){return a<=b},__lteInt:function(a,b){return je.__lte(a,b)},__intLte:function(a,b){return je.__lte(a,b)},__lteFloat:function(a,b){return je.__lte(a,b)},__floatLte:function(a,b){return je.__lte(a,b)},__gt:function(a,b){return a>b},__gtInt:function(a,b){return je.__gt(a,b)},__intGt:function(a,b){return a>b},__gtFloat:function(a,
b){return je.__gt(a,b)},__floatGt:function(a,b){return a>b},__gte:function(a,b){return a>=b},__gteInt:function(a,b){return je.__gte(a,b)},__intGte:function(a,b){return a>=b},__gteFloat:function(a,b){return je.__gte(a,b)},__floatGte:function(a,b){return a>=b},__complement:function(a){return~a},__and:function(a,b){return a&b},__andInt:function(a,b){return a&b},__or:function(a,b){return a|b},__orInt:function(a,b){return a|b},__xor:function(a,b){return a^b},__xorInt:function(a,b){return a^b},__shr:function(a,
b){return a>>b},__shrInt:function(a,b){return a>>b},__intShr:function(a,b){return a>>b},__ushr:function(a,b){return a>>>b},__ushrInt:function(a,b){return a>>>b},__intUshr:function(a,b){return a>>>b},__shl:function(a,b){return a<<b},__shlInt:function(a,b){return a<<b},__intShl:function(a,b){return a<<b}},on=function(){};k["haxe.lang.Iterator"]=on;on.__name__="haxe.lang.Iterator";on.__isInterface__=!0;on.prototype={hasNext:null,next:null,__class__:on};var fk=function(){};k["haxe.lang.Iterable"]=fk;
fk.__name__="haxe.lang.Iterable";fk.__isInterface__=!0;fk.prototype={iterator:null,__class__:fk};var Ec=function(){};k["openfl.utils._internal.Lib"]=Ec;Ec.__name__="openfl.utils._internal.Lib";Ec.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(Ec.__sentWarnings.h,b)||(Ec.__sentWarnings.h[b]=!0,Q.warn(a.methodName+" is not implemented",a))};var Xh=function(){this.rollOutStack=[]};k["openfl.utils._internal.TouchData"]=Xh;Xh.__name__="openfl.utils._internal.TouchData";
Xh.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touchOverTarget=this.touchDownTarget=this.touch=null;this.rollOutStack.splice(0,this.rollOutStack.length)},__class__:Xh};var mg=function(){};k["polygonal.ds.Cloneable"]=mg;mg.__name__="polygonal.ds.Cloneable";mg.__isInterface__=!0;mg.prototype={clone:null,__class__:mg};var pn=function(){};k["polygonal.ds.Hashable"]=pn;pn.__name__="polygonal.ds.Hashable";pn.__isInterface__=!0;pn.prototype={key:null,
__class__:pn};var bj=function(){};k["polygonal.ds.Collection"]=bj;bj.__name__="polygonal.ds.Collection";bj.__isInterface__=!0;bj.__interfaces__=[pn];bj.prototype={get_size:null,free:null,contains:null,remove:null,clear:null,iterator:null,isEmpty:null,toArray:null,clone:null,__class__:bj,__properties__:{get_size:"get_size"}};var ng=function(){};k["polygonal.ds.HashKey"]=ng;ng.__name__="polygonal.ds.HashKey";ng.next=function(){null==ng._counter&&(ng._counter=0);Aa._assert(ng._counter<ng._counter+1,
"_counter < _counter + 1",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashKey.hx",lineNumber:44,className:"polygonal.ds.HashKey",methodName:"next"});return ng._counter++};var di=function(){};k["polygonal.ds.Map"]=di;di.__name__="polygonal.ds.Map";di.__isInterface__=!0;di.__interfaces__=[bj];di.prototype={has:null,hasKey:null,get:null,set:null,unset:null,remap:null,toValSet:null,toKeySet:null,keys:null,
__class__:di};var qn=function(a,b){null==b&&(b=-1);this.mTmpKeyBuffer=[];this.mTmpIntBuffer=[];this.mIterator=null;this.mFree=this.mSize=0;this.reuseIterator=!1;this.key=ng.next();Aa._assert(0<a,"slotCount > 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:158,className:"polygonal.ds.HashTable",methodName:"new"});-1==b&&(b=a);2>b&&(b=2);this.mMinCapacity=this.capacity=b;this.mH=new og(a,
this.capacity);this.mKeys=Array(this.capacity);this.mVals=Array(this.capacity);a=this.mNext=Array(this.capacity);b=0;for(var c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1};k["polygonal.ds.HashTable"]=qn;qn.__name__="polygonal.ds.HashTable";qn.__interfaces__=[di];qn.prototype={key:null,capacity:null,get_loadFactor:function(){return this.mH.get_loadFactor()},get_slotCount:function(){return this.mH.slotCount},reuseIterator:null,get_growthRate:function(){return this.mH.growthRate},
set_growthRate:function(a){return this.mH.growthRate=a},mH:null,mKeys:null,mVals:null,mNext:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,mTmpIntBuffer:null,mTmpKeyBuffer:null,getCollisionCount:function(){return this.mH.getCollisionCount()},getFront:function(a){var b=this.mH;a=a.key;var c=73856093*a&b.mMask,d=b.mHash[c];if(-1==d)b=-2147483648;else{var e=b.mData;if(e[d]==a)b=e[d+1];else{var f=-2147483648,g=d,h=g;for(d=e[d+2];-1!=d;){if(e[d]==a){f=e[d+1];e[h+2]=e[d+2];e[d+2]=g;b.mHash[c]=
d;break}h=d;d=e[h+2]}b=f}}return-2147483648==b?null:this.mVals[b]},setIfAbsent:function(a,b){Aa._assert(null!=a,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:210,className:"polygonal.ds.HashTable",methodName:"setIfAbsent"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH,e=a.key;Aa._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});var f=73856093*e&d.mMask,g=d.mData,h=d.mHash[f];if(-1==h){d.mSize==d.capacity&&(d.grow(),g=d.mData);var m=3*d.mFree;d.mFree=d.mNext[d.mFree];d.mHash[f]=m;g[m]=e;g[m+1]=c;d.mSize++;d=!0}else if(g[h]==e)d=!1;else{for(f=g[h+2];-1!=f;){if(g[f]==e){h=-1;break}h=f;
f=g[h+2]}-1==h?d=!1:(d.mSize==d.capacity&&(d.grow(),g=d.mData),m=3*d.mFree,d.mFree=d.mNext[d.mFree],g[h+2]=m,g[m]=e,g[m+1]=c,d.mSize++,d=!0)}return d?(this.mVals[c]=b,this.mKeys[c]=a,this.mFree=this.mNext[c],this.mSize++,!0):!1},rehash:function(a){this.mH.rehash(a);return this},remap:function(a,b){Aa._assert(null!=a,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:244,
className:"polygonal.ds.HashTable",methodName:"remap"});var c=this.mH;a=a.key;var d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648!=a?(this.mVals[a]=b,!0):!1},toKeyArray:function(){if(0==this.mSize)return[];var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mKeys,d,e=0,f=this.capacity;e<f;)d=e++,d=c[d],null!=d&&(a[b++]=d);return a},pack:function(){this.mH.pack();if(this.mH.capacity==this.capacity)return this;this.capacity=this.mH.capacity;for(var a=this.mNext=Array(this.capacity),b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mFree=0;b=this.mKeys;a=Array(this.capacity);c=this.mVals;var e=Array(this.capacity),f=this.mFree;
for(d=this.mH.iterator();d.hasNext();){var g=d.next();a[f]=b[g];e[f]=c[g];f=this.mNext[f]}this.mFree=f;this.mKeys=a;this.mVals=e;b=0;for(c=this.mSize;b<c;)if(d=b++,f=this.mH,e=a[d].key,g=f.mHash[73856093*e&f.mMask],-1!=g)if(f=f.mData,f[g]==e)f[g+1]=d;else for(g=f[g+2];-1!=g;){if(f[g]==e){f[g+1]=d;break}g=f[g+2]}return this},iter:function(a){Aa._assert(null!=a,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",
lineNumber:322,className:"polygonal.ds.HashTable",methodName:"iter"});for(var b=this.mH.mData,c=this.mVals,d=this.mKeys,e,f=0,g=this.mH.capacity;f<g;)e=f++,e=b[3*e+1],-2147483648!=e&&a(d[e],c[e]);return this},toString:function(){var a=""+A.string(Va.format("[ HashTable size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=0,c=this.keys();c.hasNext();){var d=c.next(),e=A.string(d).length;b<=e&&(b=e)}e=[];b="  %- "+b+"s -> %s\n";
var f=[];for(c=this.keys();c.hasNext();)d=c.next(),f.push(d);f.sort(function(a,b){return a.key-b.key});var g=1,h=f.length;c=0;for(d=1;g<h;){if(f[c]==f[g])++d;else{c=f[c];e[0]=c;if(1<d)d=[],this.getAll(c,d),e[1]=d.join(",");else{Aa._assert(null!=c,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:449,className:"polygonal.ds.HashTable",methodName:"get"});var m=this.mH;d=c.key;
c=m.mHash[73856093*d&m.mMask];if(-1==c)c=-2147483648;else if(m=m.mData,m[c]==d)c=m[c+1];else{var l=-2147483648;for(c=m[c+2];-1!=c;){if(m[c]==d){l=m[c+1];break}c=m[c+2]}c=l}e[1]=A.string(-2147483648==c?null:this.mVals[c])}a+=A.string(Va.format(b,e));c=g;d=1}++g}c=f[c];e[0]=c;if(1<d)d=[],this.getAll(c,d),e[1]=d.join(",");else{Aa._assert(null!=c,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",
lineNumber:449,className:"polygonal.ds.HashTable",methodName:"get"});m=this.mH;d=c.key;g=m.mHash[73856093*d&m.mMask];if(-1==g)c=-2147483648;else if(m=m.mData,m[g]==d)c=m[g+1];else{l=-2147483648;for(g=m[g+2];-1!=g;){if(m[g]==d){l=m[g+1];break}g=m[g+2]}c=l}e[1]=A.string(-2147483648==c?null:this.mVals[c])}a+=A.string(Va.format(b,e));return a+"]"},grow:function(){var a=this.capacity;this.capacity=Eg.compute(this.get_growthRate(),this.capacity);var b=Array(this.capacity);Jb.blit(this.mNext,0,b,0,a);b=
this.mNext=b;for(var c=a-1,d=this.capacity-1;c<d;){var e=c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=a;b=Array(this.capacity);Jb.blit(this.mVals,0,b,0,a);this.mVals=b;b=Array(this.capacity);Jb.blit(this.mKeys,0,b,0,a);this.mKeys=b},has:function(a){for(var b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;if(null!=b[f]&&c[f]==a)return!0}return!1},hasKey:function(a){Aa._assert(null!=a,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",
lineNumber:439,className:"polygonal.ds.HashTable",methodName:"hasKey"});var b=this.mH;a=a.key;var c=b.mHash[73856093*a&b.mMask];if(-1==c)return!1;b=b.mData;if(b[c]==a)return!0;var d=!1;for(c=b[c+2];-1!=c;){if(b[c]==a){d=!0;break}c=b[c+2]}return d},get:function(a){Aa._assert(null!=a,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:449,className:"polygonal.ds.HashTable",
methodName:"get"});var b=this.mH;a=a.key;var c=b.mHash[73856093*a&b.mMask];if(-1==c)a=-2147483648;else if(b=b.mData,b[c]==a)a=b[c+1];else{var d=-2147483648;for(c=b[c+2];-1!=c;){if(b[c]==a){d=b[c+1];break}c=b[c+2]}a=d}return-2147483648==a?null:this.mVals[a]},getAll:function(a,b){var c=this.mH,d=a.key,e=c.mHash[73856093*d&c.mMask];if(-1==e)c=-2147483648;else{var f=c.mData;if(f[e]==d)c=f[e+1];else for(c=-2147483648,e=f[e+2];-1!=e;){if(f[e]==d){c=f[e+1];break}e=f[e+2]}}if(-2147483648==c)return 0;d=this.mTmpIntBuffer;
a=this.mH.getAll(a.key,d);c=this.mVals;for(e=0;e<a;)f=e++,b[f]=c[d[f]];return a},set:function(a,b){Aa._assert(null!=a,"key != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",lineNumber:483,className:"polygonal.ds.HashTable",methodName:"set"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH,e=a.key;Aa._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});d.mSize==d.capacity&&d.grow();var f=d.mData,g=d.mHash,h=3*d.mFree;d.mFree=d.mNext[d.mFree];f[h]=e;f[h+1]=c;var m=73856093*e&d.mMask,l=g[m];if(-1==l)g[m]=h,d.mSize++,d=!0;else{g=f[l]!=e;for(m=f[l+2];-1!=m;)f[m]==e&&(g=!1),l=m,m=f[m+2];f[l+2]=h;d.mSize++;d=g}this.mVals[c]=
b;this.mKeys[c]=a;this.mFree=this.mNext[c];this.mSize++;return d},unset:function(a){var b=this.mH,c=a.key,d=b.mHash[73856093*c&b.mMask];if(-1==d)d=-2147483648;else{var e=b.mData;if(e[d]==c)d=e[d+1];else{b=-2147483648;for(d=e[d+2];-1!=d;){if(e[d]==c){b=e[d+1];break}d=e[d+2]}d=b}}if(-2147483648==d)return!1;this.mKeys[d]=null;this.mNext[d]=this.mFree;this.mFree=d;b=this.mH;c=a.key;a=73856093*c&b.mMask;var f=b.mHash;d=f[a];if(-1!=d)if(e=b.mData,c==e[d])f[a]=-1==e[d+2]?-1:e[d+2],c=d/3|0,b.mNext[c]=b.mFree,
b.mFree=c,e[d+1]=-2147483648,e[d+2]=-1,b.mSize--;else{a=!1;f=d;for(d=e[d+2];-1!=d;){if(e[d]==c){a=!0;break}f=d;d=e[f+2]}a&&(e[f+2]=e[d+2],c=d/3|0,b.mNext[c]=b.mFree,b.mFree=c,e[d+1]=-2147483648,e[d+2]=-1,b.mSize--)}this.mSize--;return!0},toValSet:function(){for(var a=new ei,b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;null!=b[f]&&a.set(c[f])}return a},toKeySet:function(){for(var a=new ei,b=this.mKeys,c,d=0,e=this.capacity;d<e;)c=d++,c=b[c],null!=c&&a.set(c);return a},keys:function(){return new rn(this)},
get_size:function(){return this.mSize},free:function(){Jb.nullify(this.mVals);this.mVals=null;Jb.nullify(this.mKeys);this.mNext=this.mKeys=null;this.mH.free();this.mH=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpKeyBuffer=this.mTmpIntBuffer=null},contains:function(a){return this.has(a)},remove:function(a){for(var b=this.mTmpKeyBuffer,c=this.mKeys,d=this.mVals,e,f=0,g=0,h=this.capacity;g<h;){var m=g++;e=c[m];null!=e&&d[m]==a&&(b[f++]=e)}g=0;for(h=f;g<h;)m=g++,this.unset(b[m]),
b[m]=null;return 0<f},clear:function(a){null==a&&(a=!1);this.mH.clear(a);Jb.init(this.mKeys,null,0,this.capacity);Jb.init(this.mVals,null,0,this.capacity);a=this.mNext;for(var b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=new gk(this):this.mIterator.reset(),this.mIterator):new gk(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];
var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mKeys,d=this.mVals,e=0,f=this.capacity;e<f;){var g=e++;null!=c[g]&&(a[b++]=d[g])}return a},clone:function(a,b){null==a&&(a=!0);var c=new qn(this.mH.slotCount,this.mSize);c.mH=this.mH.clone();
c.mSize=this.mSize;c.mFree=this.mFree;var d=this.mVals,e=c.mVals,f=this.mKeys;Jb.blit(f,0,c.mKeys,0,this.mSize);if(a)Jb.blit(d,0,e,0,this.mSize);else if(null!=b){a=0;for(var g=this.mSize;a<g;){var h=a++;e[h]=null!=f[h]?b(d[h]):null}}else for(a=0,g=this.mSize;a<g;)h=a++,null!=f[h]?(Aa._assert(U.__implements(d[h],mg),"element is not of type Cloneable(Std.isOfType(srcVals.get(i), Cloneable))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/HashTable.hx",
lineNumber:735,className:"polygonal.ds.HashTable",methodName:"clone"}),e[h]=U.__cast(d[h],mg).clone()):e[h]=null;Jb.blit(this.mNext,0,c.mNext,0,this.mSize);return c},__class__:qn,__properties__:{get_size:"get_size",set_growthRate:"set_growthRate",get_growthRate:"get_growthRate",get_slotCount:"get_slotCount",get_loadFactor:"get_loadFactor"}};var Fg=function(){};k["polygonal.ds.Itr"]=Fg;Fg.__name__="polygonal.ds.Itr";Fg.__isInterface__=!0;Fg.prototype={hasNext:null,next:null,remove:null,reset:null,
__class__:Fg};var rn=function(a){this.mObject=a;this.reset()};k["polygonal.ds.HashTableKeyIterator"]=rn;rn.__name__="polygonal.ds.HashTableKeyIterator";rn.__interfaces__=[Fg];rn.prototype={mObject:null,mKeys:null,mI:null,mS:null,free:function(){this.mKeys=this.mObject=null},reset:function(){this.mKeys=this.mObject.mKeys;this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&null==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=
this.mKeys[this.mI];++this.mI<this.mS&&null==this.mKeys[this.mI];);return a},remove:function(){throw J.thrown("unsupported operation");},__class__:rn};var gk=function(a){this.mObject=a;this.reset()};k["polygonal.ds.HashTableValIterator"]=gk;gk.__name__="polygonal.ds.HashTableValIterator";gk.__interfaces__=[Fg];gk.prototype={mObject:null,mKeys:null,mVals:null,mI:null,mS:null,free:function(){this.mVals=this.mKeys=this.mObject=null},reset:function(){this.mVals=this.mObject.mVals;this.mKeys=this.mObject.mKeys;
this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&null==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=this.mVals[this.mI];++this.mI<this.mS&&null==this.mKeys[this.mI];);return a},remove:function(){throw J.thrown("unsupported operation");},__class__:gk};var cj=function(){};k["polygonal.ds.Set"]=cj;cj.__name__="polygonal.ds.Set";cj.__isInterface__=!0;cj.__interfaces__=[bj];cj.prototype={has:null,set:null,unset:null,__class__:cj};
var Gg=function(a,b){null==b&&(b=-1);this.mFree=this.mSize=0;this.reuseIterator=!1;this.growthRate=-3;this.key=ng.next();Aa._assert(0<a,"slotCount > 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:138,className:"polygonal.ds.IntHashSet",methodName:"new"});Aa._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",
lineNumber:139,className:"polygonal.ds.IntHashSet",methodName:"new"});-1==b&&(b=a);2>b&&(b=2);this.mMinCapacity=this.capacity=b;this.slotCount=a;this.mMask=a-1;this.mHash=Jb.init(Array(a),-1);this.mData=Array(this.capacity<<1);this.mNext=Array(this.capacity);var c=1;a=this.mData;b=0;for(var d=this.capacity;b<d;)b++,a[c-1]=-2147483648,a[c]=-1,c+=2;a=this.mNext;b=0;for(d=this.capacity-1;b<d;)c=b++,a[c]=c+1;a[this.capacity-1]=-1};k["polygonal.ds.IntHashSet"]=Gg;Gg.__name__="polygonal.ds.IntHashSet";
Gg.__interfaces__=[cj];Gg.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,get_loadFactor:function(){return this.mSize/this.slotCount},slotCount:null,mHash:null,mData:null,mNext:null,mMask:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,getCollisionCount:function(){for(var a=0,b,c=this.mData,d=this.mHash,e=0,f=this.slotCount;e<f;)if(b=e++,b=d[b],-1!=b)for(b=c[b+1];-1!=b;)b=c[b+1],++a;return a},hasFront:function(a){Aa._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:203,className:"polygonal.ds.IntHashSet",methodName:"hasFront"});var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(d[c]==a)return!0;var e=!1,f=c,g=f;for(c=d[c+1];-1!=c;){if(d[c]==a){d[g+1]=d[c+1];d[c+1]=f;d[b]=c;e=!0;break}g=c;c=d[g+1]}return e},rehash:function(a){Aa._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:270,className:"polygonal.ds.IntHashSet",methodName:"rehash"});if(this.slotCount==a)return this;for(var b=new Gg(a,this.capacity),c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;f=c[f<<1];if(-2147483648!=f){Aa._assert(-2147483648!=f,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",
lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var g=73856093*f&b.mMask,h=b.mData,m=b.mHash[g];if(-1==m)b.mSize==b.capacity&&(b.grow(),h=b.mData),m=b.mFree<<1,b.mFree=b.mNext[b.mFree],b.mHash[g]=m,h[m]=f,b.mSize++;else if(h[m]!=f){for(g=h[m+1];-1!=g;){if(h[g]==f){m=-1;break}m=g;g=h[g+1]}-1!=m&&(b.mSize==b.capacity&&(b.grow(),h=b.mData),g=b.mFree<<1,b.mFree=b.mNext[b.mFree],h[g]=f,h[m+1]=g,b.mSize++)}}}this.mHash=b.mHash;this.mData=b.mData;this.mNext=b.mNext;this.slotCount=a;
this.mMask=b.mMask;this.mFree=b.mFree;return this},pack:function(){if(this.capacity==this.mMinCapacity)return this;var a=this.mSize,b=this.mMinCapacity;this.capacity=a>b?a:b;var c=this.mData,d=0,e=this.mHash,f=Array(this.capacity<<1);a=0;for(b=this.slotCount;a<b;){var g=a++;var h=e[g];if(-1!=h)for(e[g]=d,f[d++]=c[h],f[d++]=-1,h=c[h+1];-1!=h;)f[d-1]=d,f[d++]=c[h],f[d++]=-1,h=c[h+1]}this.mData=f;c=this.mNext=Array(this.capacity);a=0;for(b=this.capacity-1;a<b;)g=a++,c[g]=g+1;this.mFree=c[this.capacity-
1]=-1;return this},iter:function(a){Aa._assert(null!=a,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:384,className:"polygonal.ds.IntHashSet",methodName:"iter"});for(var b=this.mData,c,d,e=0,f=this.capacity;e<f;)c=e++<<1,d=b[c],-2147483648!=d&&a(b[c]);return this},toString:function(){var a=""+A.string(Va.format("[ IntHashSet size="+this.mSize+" capacity="+this.capacity+
" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=this.iterator();b.hasNext();){var c=b.next();a+=A.string("  "+c+"\n")}return a+"]"},hashCode:function(a){return 73856093*a&this.mMask},grow:function(){var a=this.capacity;this.capacity=Eg.compute(this.growthRate,this.capacity);var b=Array(this.capacity);Jb.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(this.capacity<<1);Jb.blit(this.mData,0,b,0,a<<1);this.mData=b;b=this.mNext;for(var c=a-1,d=this.capacity-1;c<d;){var e=
c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=a;e=a<<1;b=this.mData;c=0;for(d=this.capacity-a;c<d;)c++,b[e]=-2147483648,b[e+1]=-1,e+=2},has:function(a){Aa._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:467,className:"polygonal.ds.IntHashSet",methodName:"has"});var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;
var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+1];-1!=b;){if(c[b]==a){d=!0;break}b=c[b+1]}return d},set:function(a){Aa._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var b=73856093*a&this.mMask,c=this.mData,d=this.mHash[b];if(-1==d)return this.mSize==
this.capacity&&(this.grow(),c=this.mData),d=this.mFree<<1,this.mFree=this.mNext[this.mFree],this.mHash[b]=d,c[d]=a,this.mSize++,!0;if(c[d]==a)return!1;for(b=c[d+1];-1!=b;){if(c[b]==a){d=-1;break}d=b;b=c[b+1]}if(-1==d)return!1;this.mSize==this.capacity&&(this.grow(),c=this.mData);b=this.mFree<<1;this.mFree=this.mNext[this.mFree];c[b]=a;c[d+1]=b;this.mSize++;return!0},unset:function(a){var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(a==d[c])return this.mHash[b]=-1==
d[c+1]?-1:d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,this.mSize--,!0;b=!1;var e=c;for(c=d[c+1];-1!=c;){if(d[c]==a){b=!0;break}e=c;c=d[e+1]}return b?(d[e+1]=d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,--this.mSize,!0):!1},get_size:function(){return this.mSize},free:function(){this.mNext=this.mData=this.mHash=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null)},contains:function(a){Aa._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:467,className:"polygonal.ds.IntHashSet",methodName:"has"});var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+1];-1!=b;){if(c[b]==a){d=!0;break}b=c[b+1]}return d},remove:function(a){var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(a==d[c])return this.mHash[b]=
-1==d[c+1]?-1:d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,this.mSize--,!0;b=!1;var e=c;for(c=d[c+1];-1!=c;){if(d[c]==a){b=!0;break}e=c;c=d[e+1]}return b?(d[e+1]=d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,--this.mSize,!0):!1},clear:function(a){var b=this.mHash;a=0;for(var c=this.slotCount;a<c;){var d=a++;b[d]=-1}d=1;b=this.mData;a=0;for(c=this.capacity;a<c;)a++,b[d-1]=-2147483648,b[d]=-1,d+=2;b=this.mNext;a=0;for(c=this.capacity-
1;a<c;)d=a++,b[d]=d+1;b[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=new hk(this):this.mIterator.reset(),this.mIterator):new hk(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c,d=this.mData,e=0,f=this.capacity;e<f;)c=e++,c=d[c<<1],-2147483648!=c&&(a[b++]=c);return a},clone:function(a,b){a=new Gg(this.slotCount,this.mSize);Jb.blit(this.mHash,0,a.mHash,0,this.slotCount);Jb.blit(this.mData,0,a.mData,0,this.mSize<<1);Jb.blit(this.mNext,0,a.mNext,0,this.mSize);a.mMask=this.mMask;a.slotCount=this.slotCount;a.capacity=this.capacity;a.mFree=this.mFree;a.mSize=this.mSize;return a},
__class__:Gg,__properties__:{get_size:"get_size",get_loadFactor:"get_loadFactor"}};var hk=function(a){this.mObject=a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};k["polygonal.ds.IntHashSetIterator"]=hk;hk.__name__="polygonal.ds.IntHashSetIterator";hk.__interfaces__=[Fg];hk.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<
this.mS},next:function(){var a=this.mData[this.mI++<<1];this.scan();return a},remove:function(){throw J.thrown("unsupported operation");},scan:function(){for(;this.mI<this.mS&&-2147483648==this.mData[this.mI<<1];)this.mI++},__class__:hk};var ve=function(a,b){null==b&&(b=-1);this.mTmpKeyBuffer=[];this.mIterator=null;this.mFree=this.mSize=0;this.reuseIterator=!1;this.key=ng.next();Aa._assert(0<a,"slotCount > 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashTable.hx",
lineNumber:158,className:"polygonal.ds.IntHashTable",methodName:"new"});-1==b&&(b=a);2>b&&(b=2);this.mMinCapacity=this.capacity=b;this.mH=new og(a,this.capacity);this.mVals=Array(this.capacity);this.mNext=Array(this.capacity);this.mKeys=Jb.init(Array(this.capacity),-2147483648,0,this.capacity);a=this.mNext;b=0;for(var c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1};k["polygonal.ds.IntHashTable"]=ve;ve.__name__="polygonal.ds.IntHashTable";ve.__interfaces__=[di];ve.prototype={key:null,
capacity:null,get_growthRate:function(){return this.mH.growthRate},set_growthRate:function(a){return this.mH.growthRate=a},reuseIterator:null,get_loadFactor:function(){return this.mH.get_loadFactor()},get_slotCount:function(){return this.mH.slotCount},mH:null,mVals:null,mNext:null,mKeys:null,mFree:null,mSize:null,mMinCapacity:null,mShrinkSize:null,mIterator:null,mTmpKeyBuffer:null,getCollisionCount:function(){return this.mH.getCollisionCount()},getFront:function(a){var b=this.mH,c=73856093*a&b.mMask,
d=b.mHash[c];if(-1==d)a=-2147483648;else{var e=b.mData;if(e[d]==a)a=e[d+1];else{var f=-2147483648,g=d,h=g;for(d=e[d+2];-1!=d;){if(e[d]==a){f=e[d+1];e[h+2]=e[d+2];e[d+2]=g;b.mHash[c]=d;break}h=d;d=e[h+2]}a=f}}return-2147483648==a?null:this.mVals[a]},setIfAbsent:function(a,b){Aa._assert(-2147483648!=a,"key 0x80000000 is reserved(key != IntIntHashTable.KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashTable.hx",
lineNumber:212,className:"polygonal.ds.IntHashTable",methodName:"setIfAbsent"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH;Aa._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});var e=73856093*a&d.mMask,f=d.mData,g=d.mHash[e];
if(-1==g){d.mSize==d.capacity&&(d.grow(),f=d.mData);var h=3*d.mFree;d.mFree=d.mNext[d.mFree];d.mHash[e]=h;f[h]=a;f[h+1]=c;d.mSize++;d=!0}else if(f[g]==a)d=!1;else{for(e=f[g+2];-1!=e;){if(f[e]==a){g=-1;break}g=e;e=f[g+2]}-1==g?d=!1:(d.mSize==d.capacity&&(d.grow(),f=d.mData),h=3*d.mFree,d.mFree=d.mNext[d.mFree],f[g+2]=h,f[h]=a,f[h+1]=c,d.mSize++,d=!0)}return d?(this.mVals[c]=b,this.mKeys[c]=a,this.mFree=this.mNext[c],this.mSize++,!0):!1},rehash:function(a){this.mH.rehash(a);return this},remap:function(a,
b){var c=this.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648!=a?(this.mVals[a]=b,!0):!1},toKeyArray:function(){return this.mH.toKeyArray()},toString:function(){var a=this;var b=""+A.string(Va.format("[ IntHashTable size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return b+" ]";b+="\n";for(var c=0,d=this.keys();d.hasNext();){var e=
d.next();c=Math.max(c,e)}for(e=1;0!=c;)++e,c=c/10|0;c=[];var f="  %- "+e+"d -> %s\n",g=[];for(d=this.keys();d.hasNext();)e=d.next(),g.push(e);g.sort(function(a,b){return a-b});e=1;var h=g.length;d=0;for(var m=1;e<h;){if(g[d]==g[e])++m;else{d=g[d];c[0]=d;if(1<m)m=[],a.getAll(d,m),c[1]=m.join(",");else{m=a.mVals;var l=a.mH,n=l.mHash[73856093*d&l.mMask];if(-1==n)d=-2147483648;else if(l=l.mData,l[n]==d)d=l[n+1];else{var p=-2147483648;for(n=l[n+2];-1!=n;){if(l[n]==d){p=l[n+1];break}n=l[n+2]}d=p}c[1]=A.string(m[d])}b+=
A.string(Va.format(f,c));d=e;m=1}++e}d=g[d];c[0]=d;if(1<m)m=[],a.getAll(d,m),c[1]=m.join(",");else{m=a.mVals;l=a.mH;e=l.mHash[73856093*d&l.mMask];if(-1==e)a=-2147483648;else if(l=l.mData,l[e]==d)a=l[e+1];else{p=-2147483648;for(e=l[e+2];-1!=e;){if(l[e]==d){p=l[e+1];break}e=l[e+2]}a=p}c[1]=A.string(m[a])}b+=A.string(Va.format(f,c));return b+"]"},has:function(a){for(var b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;if(-2147483648!=b[f]&&c[f]==a)return!0}return!1},hasKey:function(a){var b=
this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)return!1;b=b.mData;if(b[c]==a)return!0;var d=!1;for(c=b[c+2];-1!=c;){if(b[c]==a){d=!0;break}c=b[c+2]}return d},count:function(a){return this.mH.count(a)},get:function(a){var b=this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)a=-2147483648;else if(b=b.mData,b[c]==a)a=b[c+1];else{var d=-2147483648;for(c=b[c+2];-1!=c;){if(b[c]==a){d=b[c+1];break}c=b[c+2]}a=d}return-2147483648==a?null:this.mVals[a]},getAll:function(a,b){var c=this.mH,d=c.mHash[73856093*a&c.mMask];
if(-1==d)c=-2147483648;else{var e=c.mData;if(e[d]==a)c=e[d+1];else for(c=-2147483648,d=e[d+2];-1!=d;){if(e[d]==a){c=e[d+1];break}d=e[d+2]}}if(-2147483648==c)return 0;d=this.mTmpKeyBuffer;a=this.mH.getAll(a,d);c=this.mVals;for(e=0;e<a;){var f=e++;b[f]=c[d[f]]}return a},set:function(a,b){Aa._assert(-2147483648!=a,"key 0x80000000 is reserved(key != IntIntHashTable.KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashTable.hx",
lineNumber:397,className:"polygonal.ds.IntHashTable",methodName:"set"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH;Aa._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});d.mSize==d.capacity&&d.grow();var e=d.mData,f=d.mHash,
g=3*d.mFree;d.mFree=d.mNext[d.mFree];e[g]=a;e[g+1]=c;var h=73856093*a&d.mMask,m=f[h];if(-1==m)f[h]=g,d.mSize++,d=!0;else{f=e[m]!=a;for(h=e[m+2];-1!=h;)e[h]==a&&(f=!1),m=h,h=e[h+2];e[m+2]=g;d.mSize++;d=f}this.mVals[c]=b;this.mKeys[c]=a;this.mFree=this.mNext[c];this.mSize++;return d},unset:function(a){var b=this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)c=-2147483648;else{var d=b.mData;if(d[c]==a)c=d[c+1];else{b=-2147483648;for(c=d[c+2];-1!=c;){if(d[c]==a){b=d[c+1];break}c=d[c+2]}c=b}}if(-2147483648==
c)return!1;this.mVals[c]=null;this.mKeys[c]=-2147483648;this.mNext[c]=this.mFree;this.mFree=c;b=this.mH;var e=73856093*a&b.mMask,f=b.mHash;c=f[e];if(-1!=c)if(d=b.mData,a==d[c])f[e]=-1==d[c+2]?-1:d[c+2],a=c/3|0,b.mNext[a]=b.mFree,b.mFree=a,d[c+1]=-2147483648,d[c+2]=-1,b.mSize--;else{e=!1;f=c;for(c=d[c+2];-1!=c;){if(d[c]==a){e=!0;break}f=c;c=d[f+2]}e&&(d[f+2]=d[c+2],a=c/3|0,b.mNext[a]=b.mFree,b.mFree=a,d[c+1]=-2147483648,d[c+2]=-1,b.mSize--)}this.mSize--;return!0},toValSet:function(){for(var a=new ei,
b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;-2147483648!=b[f]&&a.set(c[f])}return a},toKeySet:function(){return this.mH.toKeySet()},keys:function(){return this.mH.keys()},pack:function(){this.mH.pack();if(this.mH.capacity==this.capacity)return this;this.capacity=this.mH.capacity;for(var a=this.mNext=Array(this.capacity),b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mFree=0;b=this.mKeys;a=Array(this.capacity);c=this.mVals;var e=Array(this.capacity),f=this.mFree;
for(d=this.mH.iterator();d.hasNext();){var g=d.next();a[f]=b[g];e[f]=c[g];f=this.mNext[f]}this.mFree=f;this.mKeys=a;this.mVals=e;b=0;for(c=this.mSize;b<c;)if(d=b++,f=this.mH,e=a[d],g=f.mHash[73856093*e&f.mMask],-1!=g)if(f=f.mData,f[g]==e)f[g+1]=d;else for(g=f[g+2];-1!=g;){if(f[g]==e){f[g+1]=d;break}g=f[g+2]}return this},iter:function(a){Aa._assert(null!=a,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashTable.hx",
lineNumber:518,className:"polygonal.ds.IntHashTable",methodName:"iter"});var b=this.mVals,c=this.mH;Aa._assert(!0,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1360,className:"polygonal.ds.IntIntHashTable",methodName:"iter"});for(var d=c.mData,e,f=0,g=c.capacity;f<g;)c=3*f++,e=d[c+1],-2147483648!=e&&a(d[c],b[e]);return this},grow:function(){var a=this.capacity;this.capacity=
Eg.compute(this.get_growthRate(),this.capacity);var b=Array(this.capacity);Jb.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(this.capacity);Jb.blit(this.mKeys,0,b,0,a);b=this.mKeys=b;for(var c=a,d=this.capacity;c<d;){var e=c++;b[e]=-2147483648}b=this.mNext;c=a-1;for(d=this.capacity-1;c<d;)e=c++,b[e]=e+1;b[this.capacity-1]=-1;this.mFree=a;b=Array(this.capacity);Jb.blit(this.mVals,0,b,0,a);this.mVals=b},get_size:function(){return this.mSize},free:function(){Jb.nullify(this.mVals);this.mNext=this.mKeys=
this.mVals=null;this.mH.free();this.mH=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpKeyBuffer=null},contains:function(a){return this.has(a)},remove:function(a){for(var b=this.mTmpKeyBuffer,c=0,d=this.mKeys,e=this.mVals,f,g=0,h=this.capacity;g<h;){var m=g++;f=d[m];-2147483648!=f&&e[m]==a&&(b[c++]=f)}g=0;for(h=c;g<h;)m=g++,this.unset(b[m]);return 0<c},clear:function(a){null==a&&(a=!1);this.mH.clear(a);Jb.init(this.mKeys,-2147483648,0,this.capacity);a=this.mNext;for(var b=
0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=new ik(this):this.mIterator.reset(),this.mIterator):new ik(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mKeys,d=this.mVals,e=0,f=this.capacity;e<f;){var g=e++;-2147483648!=c[g]&&(a[b++]=d[g])}return a},clone:function(a,b){null==a&&(a=!0);var c=new ve(this.mH.slotCount,this.mSize);c.mH=this.mH.clone(!1);c.mSize=this.mSize;c.mFree=this.mFree;var d=this.mVals,e=c.mVals;if(a)Jb.blit(d,0,e,0,this.mSize);else if(a=this.mKeys,null!=b)for(var f=0,g=this.mSize;f<g;){var h=f++;-2147483648!=a[h]&&(e[h]=b(d[h]))}else for(f=
0,g=this.mSize;f<g;)h=f++,-2147483648!=a[h]&&(Aa._assert(U.__implements(d[h],mg),"element is not of type Cloneable(Std.isOfType(src.get(i), Cloneable))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashTable.hx",lineNumber:727,className:"polygonal.ds.IntHashTable",methodName:"clone"}),e[h]=U.__cast(d[h],mg).clone());Jb.blit(this.mKeys,0,c.mKeys,0,this.mSize);Jb.blit(this.mNext,0,c.mNext,0,this.mSize);
return c},__class__:ve,__properties__:{get_size:"get_size",get_slotCount:"get_slotCount",get_loadFactor:"get_loadFactor",set_growthRate:"set_growthRate",get_growthRate:"get_growthRate"}};var ik=function(a){this.mObject=a;this.reset()};k["polygonal.ds.IntHashTableIterator"]=ik;ik.__name__="polygonal.ds.IntHashTableIterator";ik.__interfaces__=[Fg];ik.prototype={mObject:null,mVals:null,mKeys:null,mI:null,mS:null,free:function(){this.mKeys=this.mVals=this.mObject=null},reset:function(){this.mVals=this.mObject.mVals;
this.mKeys=this.mObject.mKeys;this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&-2147483648==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=this.mVals[this.mI];++this.mI<this.mS&&-2147483648==this.mKeys[this.mI];);return a},remove:function(){throw J.thrown("unsupported operation");},__class__:ik};var og=function(a,b){null==b&&(b=-1);this.mTmpBufferSize=16;this.mFree=this.mSize=0;this.reuseIterator=!1;this.growthRate=-3;
this.key=ng.next();Aa._assert(0<a,"slotCount > 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:156,className:"polygonal.ds.IntIntHashTable",methodName:"new"});Aa._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:157,className:"polygonal.ds.IntIntHashTable",methodName:"new"});-1==b?b=a:(Aa._assert(2<=b,"minimum capacity is 2(initialCapacity >= 2)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:163,className:"polygonal.ds.IntIntHashTable",methodName:"new"}),Aa._assert(0<a&&0==(a&a-1),"capacity is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:164,className:"polygonal.ds.IntIntHashTable",methodName:"new"}));this.mMinCapacity=this.capacity=b;this.slotCount=a;this.mMask=a-1;this.mHash=Jb.init(Array(a),-1);this.mData=Array(3*this.capacity);this.mNext=Array(this.capacity);var c=2;a=this.mData;b=0;for(var d=this.capacity;b<d;)b++,a[c-1]=-2147483648,a[c]=-1,c+=3;a=this.mNext;b=0;for(d=this.capacity-1;b<d;)c=b++,a[c]=c+1;a[this.capacity-1]=-1;this.mTmpBuffer=Array(this.mTmpBufferSize)};k["polygonal.ds.IntIntHashTable"]=og;og.__name__=
"polygonal.ds.IntIntHashTable";og.__interfaces__=[di];og.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,get_loadFactor:function(){return this.mSize/this.slotCount},slotCount:null,mHash:null,mData:null,mNext:null,mMask:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,mTmpBuffer:null,mTmpBufferSize:null,getCollisionCount:function(){for(var a=0,b,c=this.mData,d=this.mHash,e=0,f=this.slotCount;e<f;)if(b=e++,b=d[b],-1!=b)for(b=c[b+2];-1!=b;)b=c[b+2],++a;return a},getFront:function(a){var b=
73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return-2147483648;var d=this.mData;if(d[c]==a)return d[c+1];var e=-2147483648,f=c,g=f;for(c=d[c+2];-1!=c;){if(d[c]==a){e=d[c+1];d[g+2]=d[c+2];d[c+2]=f;this.mHash[b]=c;break}g=c;c=d[g+2]}return e},setIfAbsent:function(a,b){Aa._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});var c=73856093*a&this.mMask,d=this.mData,e=this.mHash[c];if(-1==e){this.mSize==this.capacity&&(this.grow(),d=this.mData);var f=3*this.mFree;this.mFree=this.mNext[this.mFree];this.mHash[c]=f;d[f]=a;d[f+1]=b;this.mSize++;return!0}if(d[e]==a)return!1;for(c=d[e+2];-1!=c;){if(d[c]==a){e=-1;break}e=c;c=d[e+2]}if(-1==e)return!1;this.mSize==this.capacity&&(this.grow(),d=this.mData);f=3*this.mFree;this.mFree=this.mNext[this.mFree];
d[e+2]=f;d[f]=a;d[f+1]=b;this.mSize++;return!0},rehash:function(a){Aa._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:403,className:"polygonal.ds.IntIntHashTable",methodName:"rehash"});if(this.slotCount==a)return this;for(var b=new og(a,this.capacity),c=this.mData,d=0,e=this.capacity;d<e;){var f=
d++,g=c[3*f+1];if(-2147483648!=g){var h=c[3*f];Aa._assert(-2147483648!=g,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});b.mSize==b.capacity&&b.grow();f=b.mData;var m=b.mHash,l=3*b.mFree;b.mFree=b.mNext[b.mFree];f[l]=h;f[l+1]=g;h=73856093*h&b.mMask;g=m[h];if(-1==g)m[h]=
l;else{for(m=f[g+2];-1!=m;)g=m,m=f[m+2];f[g+2]=l}b.mSize++}}this.mHash=b.mHash;this.mData=b.mData;this.mNext=b.mNext;this.slotCount=a;this.mMask=b.mMask;this.mFree=b.mFree;return this},remap:function(a,b){var c=this.mHash[73856093*a&this.mMask];if(-1==c)return!1;var d=this.mData;if(d[c]==a)return d[c+1]=b,!0;for(c=d[c+2];-1!=c;){if(d[c]==a){d[c+1]=b;break}c=d[c+2]}return-1!=c},extract:function(a){var b=73856093*a&this.mMask,c=this.mHash,d=c[b];if(-1==d)return-2147483648;var e=this.mData;if(a==e[d]){var f=
e[d+1];c[b]=-1==e[d+2]?-1:e[d+2];a=d/3|0;this.mNext[a]=this.mFree;this.mFree=a;e[d+1]=-2147483648;e[d+2]=-1;this.mSize--;return f}b=d;d=e[d+2];for(f=-2147483648;-1!=d;){if(e[d]==a){f=e[d+1];break}b=d;d=e[b+2]}return-2147483648!=f?(e[b+2]=e[d+2],a=d/3|0,this.mNext[a]=this.mFree,this.mFree=a,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,f):-2147483648},toKeyArray:function(){if(0==this.mSize)return[];var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;-2147483648!=c[3*f+1]&&(a[b++]=c[3*f])}return a},toString:function(){var a=""+A.string(Va.format("[ IntIntHashTable size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=0,c=this.keys();c.hasNext();){var d=c.next();b=Math.max(b,d)}for(d=1;0!=b;)++d,b=b/10|0;b=[];var e="  %- "+
d+"d -> %s\n",f=[];for(c=this.keys();c.hasNext();)d=c.next(),f.push(d);f.sort(function(a,b){return a-b});d=1;var g=f.length;c=0;for(var h=1;d<g;){if(f[c]==f[d])++h;else{c=f[c];b[0]=c;if(1<h)h=[],this.getAll(c,h),b[1]=h.join(",");else{h=this.mHash[73856093*c&this.mMask];if(-1==h)c=-2147483648;else{var m=this.mData;if(m[h]==c)c=m[h+1];else{var l=-2147483648;for(h=m[h+2];-1!=h;){if(m[h]==c){l=m[h+1];break}h=m[h+2]}c=l}}b[1]=c}a+=A.string(Va.format(e,b));c=d;h=1}++d}c=f[c];b[0]=c;if(1<h)h=[],this.getAll(c,
h),b[1]=h.join(",");else{d=this.mHash[73856093*c&this.mMask];if(-1==d)h=-2147483648;else if(m=this.mData,m[d]==c)h=m[d+1];else{l=-2147483648;for(d=m[d+2];-1!=d;){if(m[d]==c){l=m[d+1];break}d=m[d+2]}h=l}b[1]=h}a+=A.string(Va.format(e,b));return a+"]"},has:function(a){Aa._assert(-2147483648!=a,"val 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:697,className:"polygonal.ds.IntIntHashTable",methodName:"has"});for(var b=!1,c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;if(c[3*f+1]==a){b=!0;break}}return b},hasKey:function(a){var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+2];-1!=b;){if(c[b]==a){d=!0;break}b=c[b+2]}return d},count:function(a){var b=0,c=this.mHash[73856093*a&this.mMask];if(-1!=c)for(var d=this.mData;-1!=c;)d[c]==a&&++b,c=d[c+2];return b},get:function(a){var b=
this.mHash[73856093*a&this.mMask];if(-1==b)return-2147483648;var c=this.mData;if(c[b]==a)return c[b+1];var d=-2147483648;for(b=c[b+2];-1!=b;){if(c[b]==a){d=c[b+1];break}b=c[b+2]}return d},getAll:function(a,b){var c=this.mHash[73856093*a&this.mMask];if(-1==c)return 0;var d=0,e=this.mData;e[c]==a&&(b[d++]=e[c+1]);for(c=e[c+2];-1!=c;)e[c]==a&&(b[d++]=e[c+1]),c=e[c+2];return d},hasPair:function(a,b){Aa._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:891,className:"polygonal.ds.IntIntHashTable",methodName:"hasPair"});var c=this.mHash[73856093*a&this.mMask];if(-1!=c){var d=this.mData;if(d[c]==a&&d[c+1]==b)return!0;for(c=d[c+2];-1!=c;){if(d[c]==a&&d[c+1]==b)return!0;c=d[c+2]}}return!1},unsetPair:function(a,b){Aa._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:939,className:"polygonal.ds.IntIntHashTable",methodName:"unsetPair"});var c=73856093*a&this.mMask,d=this.mHash,e=d[c];if(-1==e)return!1;var f=this.mData;if(a==f[e]&&b==f[e+1])return d[c]=-1==f[e+2]?-1:f[e+2],a=e/3|0,this.mNext[a]=this.mFree,this.mFree=a,f[e+1]=-2147483648,f[e+2]=-1,this.mSize--,!0;c=!1;d=e;for(e=f[e+2];-1!=e;){if(f[e]==a&&f[e+1]==b){c=!0;break}d=e;e=f[d+2]}return c?(f[d+2]=f[e+2],a=e/3|0,this.mNext[a]=this.mFree,this.mFree=a,f[e+1]=-2147483648,f[e+2]=-1,--this.mSize,!0):
!1},set:function(a,b){Aa._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});this.mSize==this.capacity&&this.grow();var c=this.mData,d=this.mHash,e=3*this.mFree;this.mFree=this.mNext[this.mFree];c[e]=a;c[e+1]=b;var f=73856093*a&this.mMask;b=d[f];
if(-1==b)return d[f]=e,this.mSize++,!0;d=c[b]!=a;for(f=c[b+2];-1!=f;)c[f]==a&&(d=!1),b=f,f=c[f+2];c[b+2]=e;this.mSize++;return d},unset:function(a){var b=73856093*a&this.mMask,c=this.mHash,d=c[b];if(-1==d)return!1;var e=this.mData;if(a==e[d])return c[b]=-1==e[d+2]?-1:e[d+2],a=d/3|0,this.mNext[a]=this.mFree,this.mFree=a,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,!0;b=!1;c=d;for(d=e[d+2];-1!=d;){if(e[d]==a){b=!0;break}c=d;d=e[c+2]}return b?(e[c+2]=e[d+2],a=d/3|0,this.mNext[a]=this.mFree,this.mFree=a,
e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,!0):!1},toValSet:function(){for(var a=new Gg(this.capacity),b=this.mData,c=0,d=this.capacity;c<d;){var e=c++;e=b[3*e+1];if(-2147483648!=e){Aa._assert(-2147483648!=e,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var f=73856093*e&a.mMask,
g=a.mData,h=a.mHash[f];if(-1==h)a.mSize==a.capacity&&(a.grow(),g=a.mData),h=a.mFree<<1,a.mFree=a.mNext[a.mFree],a.mHash[f]=h,g[h]=e,a.mSize++;else if(g[h]!=e){for(f=g[h+1];-1!=f;){if(g[f]==e){h=-1;break}h=f;f=g[f+1]}-1!=h&&(a.mSize==a.capacity&&(a.grow(),g=a.mData),f=a.mFree<<1,a.mFree=a.mNext[a.mFree],g[f]=e,g[h+1]=f,a.mSize++)}}}return a},toKeySet:function(){for(var a=new Gg(this.capacity),b=this.mData,c=0,d=this.capacity;c<d;){var e=c++;if(-2147483648!=b[3*e+1]){e=b[3*e];Aa._assert(-2147483648!=
e,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntHashSet.hx",lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var f=73856093*e&a.mMask,g=a.mData,h=a.mHash[f];if(-1==h)a.mSize==a.capacity&&(a.grow(),g=a.mData),h=a.mFree<<1,a.mFree=a.mNext[a.mFree],a.mHash[f]=h,g[h]=e,a.mSize++;else if(g[h]!=e){for(f=g[h+1];-1!=f;){if(g[f]==e){h=-1;break}h=
f;f=g[f+1]}-1!=h&&(a.mSize==a.capacity&&(a.grow(),g=a.mData),f=a.mFree<<1,a.mFree=a.mNext[a.mFree],g[f]=e,g[h+1]=f,a.mSize++)}}}return a},keys:function(){return new sn(this)},pack:function(){if(this.capacity==this.mMinCapacity)return this;var a=this.mSize,b=this.mMinCapacity;this.capacity=a>b?a:b;var c=this.mData,d=0,e=this.mHash,f=Array(3*this.capacity),g=2;a=0;for(b=this.capacity;a<b;)a++,f[g-1]=-2147483648,f[g]=-1,g+=3;a=0;for(b=this.slotCount;a<b;){var h=a++;g=e[h];if(-1!=g)for(e[h]=d,f[d]=c[g],
f[d+1]=c[g+1],f[d+2]=-1,d+=3,g=c[g+2];-1!=g;)f[d-1]=d,f[d]=c[g],f[d+1]=c[g+1],f[d+2]=-1,d+=3,g=c[g+2]}this.mData=f;c=this.mNext=Array(this.capacity);a=0;for(b=this.capacity-1;a<b;)h=a++,c[h]=h+1;this.mFree=c[this.capacity-1]=-1;return this},iter:function(a){Aa._assert(null!=a,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1360,className:"polygonal.ds.IntIntHashTable",
methodName:"iter"});for(var b=this.mData,c,d,e=0,f=this.capacity;e<f;)c=3*e++,d=b[c+1],-2147483648!=d&&a(b[c],d);return this},hashCode:function(a){return 73856093*a&this.mMask},grow:function(){var a=this.capacity;this.capacity=Eg.compute(this.growthRate,this.capacity);var b=Array(this.capacity);Jb.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(3*this.capacity);Jb.blit(this.mData,0,b,0,3*a);this.mData=b;b=this.mNext;for(var c=a-1,d=this.capacity-1;c<d;){var e=c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=
a;e=3*a+2;b=this.mData;c=0;for(d=this.capacity-a;c<d;)c++,b[e-1]=-2147483648,b[e]=-1,e+=3},get_size:function(){return this.mSize},free:function(){this.mNext=this.mData=this.mHash=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpBuffer=null},contains:function(a){return this.has(a)},remove:function(a){Aa._assert(-2147483648!=a,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:1465,className:"polygonal.ds.IntIntHashTable",methodName:"remove"});for(var b=0,c=this.mTmpBuffer,d=this.mTmpBufferSize,e=this.mData,f,g=0,h=this.capacity;g<h;)f=g++,f*=3,e[f+1]==a&&(b==d&&(this.mTmpBufferSize=d<<=1,c=Array(d),Jb.blit(this.mTmpBuffer,0,c,0,b),this.mTmpBuffer=c),c[b++]=e[f]);g=0;for(h=b;g<h;){f=g++;d=c[f];f=73856093*d&this.mMask;var m=this.mHash;a=m[f];if(-1!=a)if(e=this.mData,d==e[a])m[f]=-1==e[a+2]?-1:e[a+2],f=a/3|0,this.mNext[f]=this.mFree,this.mFree=f,e[a+1]=-2147483648,
e[a+2]=-1,this.mSize--;else{f=!1;m=a;for(a=e[a+2];-1!=a;){if(e[a]==d){f=!0;break}m=a;a=e[m+2]}f&&(e[m+2]=e[a+2],d=a/3|0,this.mNext[d]=this.mFree,this.mFree=d,e[a+1]=-2147483648,e[a+2]=-1,this.mSize--)}}return 0<b},clear:function(a){var b=this.mHash;a=0;for(var c=this.slotCount;a<c;){var d=a++;b[d]=-1}d=2;b=this.mData;a=0;for(c=this.capacity;a<c;)a++,b[d-1]=-2147483648,b[d]=-1,d+=3;b=this.mNext;a=0;for(c=this.capacity-1;a<c;)d=a++,b[d]=d+1;b[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?
(null==this.mIterator?this.mIterator=new jk(this):this.mIterator.reset(),this.mIterator):new jk(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c,d=this.mData,
e=0,f=this.capacity;e<f;)c=e++,c=d[3*c+1],-2147483648!=c&&(a[b++]=c);return a},clone:function(a,b){a=new og(this.slotCount,this.capacity);Jb.blit(this.mHash,0,a.mHash,0,this.slotCount);Jb.blit(this.mData,0,a.mData,0,3*this.capacity);Jb.blit(this.mNext,0,a.mNext,0,this.capacity);a.mMask=this.mMask;a.slotCount=this.slotCount;a.capacity=this.capacity;a.mFree=this.mFree;a.mSize=this.mSize;return a},__class__:og,__properties__:{get_size:"get_size",get_loadFactor:"get_loadFactor"}};var jk=function(a){this.mObject=
a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};k["polygonal.ds.IntIntHashTableValIterator"]=jk;jk.__name__="polygonal.ds.IntIntHashTableValIterator";jk.__interfaces__=[Fg];jk.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<this.mS},next:function(){var a=this.mData[3*this.mI++ +1];this.scan();
return a},remove:function(){throw J.thrown("unsupported operation");},scan:function(){for(;this.mI<this.mS&&-2147483648==this.mData[3*this.mI+1];)this.mI++},__class__:jk};var sn=function(a){this.mObject=a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};k["polygonal.ds.IntIntHashTableKeyIterator"]=sn;sn.__name__="polygonal.ds.IntIntHashTableKeyIterator";sn.__interfaces__=[Fg];sn.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=
this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<this.mS},next:function(){var a=this.mData[3*this.mI++];this.scan();return a},remove:function(){throw J.thrown("unsupported operation");},scan:function(){for(;this.mI<this.mS&&-2147483648==this.mData[3*this.mI+1];)this.mI++},__class__:sn};var ei=function(a,b){null==a&&(a=16);this.mIterator=null;this.mSize=0;this.reuseIterator=!1;this.growthRate=-2;this.key=ng.next();this.capacity=this.mInitialCapacity=
1>a?1:a;null!=b&&(this.capacity=b.length);this.mData=Array(this.capacity);if(null!=b)for(a=0;a<b.length;){var c=b[a];++a;this.set(c)}};k["polygonal.ds.ListSet"]=ei;ei.__name__="polygonal.ds.ListSet";ei.__interfaces__=[cj];ei.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,mData:null,mInitialCapacity:null,mSize:null,mIterator:null,reserve:function(a){a>this.capacity&&(this.capacity=a,this.resizeContainer(a));return this},pack:function(){if(this.capacity>this.mInitialCapacity){var a=
this.mInitialCapacity,b=this.mSize;this.capacity=a>b?a:b;this.resizeContainer(this.capacity)}else{a=this.mData;b=this.mSize;for(var c=this.capacity;b<c;){var d=b++;a[d]=null}}return this},iter:function(a){Aa._assert(null!=a,"f != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/ListSet.hx",lineNumber:136,className:"polygonal.ds.ListSet",methodName:"iter"});for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=
c++;a(b[e])}return this},toString:function(){var a=""+A.string("[ ListSet size="+this.mSize);if(this.isEmpty())return a+" ]";a+="\n";for(var b=0,c=this.mSize;b<c;){var d=b++;a+="  ";a+=A.string(A.string(this.mData[d]));a+="\n"}return a+"]"},has:function(a){if(this.isEmpty())return!1;for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return!0}return!1},set:function(a){for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return!1}this.mSize==this.capacity&&(this.grow(),b=this.mData);
b[this.mSize++]=a;return!0},unset:function(a){return this.remove(a)},merge:function(a,b,c){if(b)for(a=a.iterator();a.hasNext();)b=a.next(),this.set(b);else if(null!=c)for(a=a.iterator();a.hasNext();)b=a.next(),this.set(c(b));else for(a=a.iterator();a.hasNext();)b=a.next(),Aa._assert(U.__implements(b,mg),"element is not of type Cloneable(Std.isOfType(val, Cloneable))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/ListSet.hx",
lineNumber:230,className:"polygonal.ds.ListSet",methodName:"merge"}),this.set(U.__cast(b,mg).clone())},get_size:function(){return this.mSize},free:function(){Jb.nullify(this.mData);this.mData=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null)},contains:function(a){return this.has(a)},remove:function(a){for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return b[e]=this.mData[--this.mSize],!0}return!1},clear:function(a){null==a&&(a=!1);a&&Jb.nullify(this.mData);this.mSize=
0},iterator:function(){if(this.reuseIterator){if(null==this.mIterator)this.mIterator=new kk(this);else{var a=this.mIterator;a.mData=a.mObject.mData;a.mS=a.mObject.mSize;a.mI=0}return this.mIterator}return new kk(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){return Jb.toArray(this.mData,0,this.mSize,[])},clone:function(a,b){null==a&&(a=!0);var c=new ei;c.capacity=this.mSize;c.mSize=this.mSize;c.mData=Array(this.mSize);var d=this.mData,e=c.mData;if(a)Jb.blit(d,0,e,0,this.mSize);
else if(null==b){a=0;for(var f=this.mSize;a<f;){var g=a++;Aa._assert(U.__implements(d[g],mg),"element is not of type Cloneable(Std.isOfType(src.get(i), Cloneable))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/ListSet.hx",lineNumber:359,className:"polygonal.ds.ListSet",methodName:"clone"});e[g]=U.__cast(d[g],mg).clone()}}else for(a=0,f=this.mSize;a<f;)g=a++,e[g]=b(d[g]);return c},grow:function(){this.capacity=
Eg.compute(this.growthRate,this.capacity);this.resizeContainer(this.capacity)},resizeContainer:function(a){a=Array(a);Jb.blit(this.mData,0,a,0,this.mSize);this.mData=a},__class__:ei,__properties__:{get_size:"get_size"}};var kk=function(a){this.mObject=a;this.mData=this.mObject.mData;this.mS=this.mObject.mSize;this.mI=0};k["polygonal.ds.ListSetIterator"]=kk;kk.__name__="polygonal.ds.ListSetIterator";kk.__interfaces__=[Fg];kk.prototype={mObject:null,mData:null,mI:null,mS:null,free:function(){this.mData=
this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mS=this.mObject.mSize;this.mI=0;return this},hasNext:function(){return this.mI<this.mS},next:function(){return this.mData[this.mI++]},remove:function(){Aa._assert(0<this.mI,"call next() before removing an element(mI > 0)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/ListSet.hx",lineNumber:430,className:"polygonal.ds.ListSetIterator",
methodName:"remove"});this.mData[this.mI]=this.mData[--this.mS]},__class__:kk};var Va=function(){};k["polygonal.ds.Printf"]=Va;Va.__name__="polygonal.ds.Printf";Va.init=function(){var a=Array(40);Va._padChars=a;Va._padChars[0]=R.rpad("","0",0);Va._padChars[1]=R.rpad("","0",1);Va._padChars[2]=R.rpad("","0",2);Va._padChars[3]=R.rpad("","0",3);Va._padChars[4]=R.rpad("","0",4);Va._padChars[5]=R.rpad("","0",5);Va._padChars[6]=R.rpad("","0",6);Va._padChars[7]=R.rpad("","0",7);Va._padChars[8]=R.rpad("",
"0",8);Va._padChars[9]=R.rpad("","0",9);Va._padChars[10]=R.rpad("","0",10);Va._padChars[11]=R.rpad("","0",11);Va._padChars[12]=R.rpad("","0",12);Va._padChars[13]=R.rpad("","0",13);Va._padChars[14]=R.rpad("","0",14);Va._padChars[15]=R.rpad("","0",15);Va._padChars[16]=R.rpad("","0",16);Va._padChars[17]=R.rpad("","0",17);Va._padChars[18]=R.rpad("","0",18);Va._padChars[19]=R.rpad("","0",19);for(a=0;20>a;){var b=a++;Va._padChars[b+20]=R.rpad(""," ",b)}a=Array(64);Va._tmp=a};Va.format=function(a,b){Va._initialized||
(Va._initialized=!0,Va.init());var c=new Wa,d=0,e=[],f=0;for(a=Va.tokenize(a,e);f<a;){var g=f++,h=e[g];switch(h._hx_index){case 0:g=h.string;c.b+=null==g?"null":""+g;break;case 1:g=h.type;h=h.args;if(null==h.width){if(!U.__instanceof(b[d],qi))throw J.thrown(new bh("invalid 'width' argument"));h.width=b[d++]}if(null==h.precision){if(!U.__instanceof(b[d],qi))throw J.thrown(new bh("invalid 'precision' argument"));h.precision=b[d++]}if(-1<h.pos){if(h.pos>b.length-1)throw J.thrown(new bh("argument index out of range"));
var m=b[h.pos]}else m=b[d++];null==m&&(m="null");switch(g._hx_index){case 0:switch(g.type._hx_index){case 0:Va.formatCharacter(m,h,c);break;case 1:Va.formatSignedDecimal(m,h,c);break;case 2:Va.formatUnsignedDecimal(m,h,c);break;case 3:Va.formatOctal(m,h,c);break;case 4:Va.formatHexadecimal(m,h,c);break;case 5:Va.formatBinary(m,h,c)}break;case 1:switch(g.floatType._hx_index){case 0:Va.formatFloat(m,h,c);break;case 1:Va.formatScientific(m,h,c);break;case 2:Va.formatNaturalFloat(m,h,c)}break;case 2:Va.formatString(m,
h,c);break;case 3:throw J.thrown(new bh("specifier 'p' is not supported"));case 4:throw J.thrown(new bh("specifier 'n' is not supported"));}break;case 2:g=h.name;if(!Object.prototype.hasOwnProperty.call(b[0],g))throw J.thrown(new bh('no field named "'+g+'" found'));c.b+=A.string(A.string(X.field(b[0],g)));++d;break;case 3:throw J.thrown(new bh("Invalid format specifier."));}}return c.b};Va.tokenize=function(a,b){for(var c=0,d,e=0,f=new Wa,g=a.length;c<g;)if(d=a.charCodeAt(c++),37==d)if(d=a.charCodeAt(c++),
37==d)f.b+=String.fromCodePoint(d);else{0<f.b.length&&(b[e++]=Hg.Raw(f.b),f=new Wa);if(40==d)if(d=a.indexOf(")",c),-1==d)d=Hg.Unknown("named parameter",c);else{var h=I.substr(a,c,d-c);c=d+1;d=Hg.Property(h)}else{h=0;null==h&&(h=0);h=new lp(h,-1,-1,-1);a:for(;32<=d&&48>=d;)switch(d){case 32:d=a.charCodeAt(c++);h.flags|=1<<cb.Space._hx_index;break;case 35:d=a.charCodeAt(c++);h.flags|=1<<cb.Sharp._hx_index;break;case 43:d=a.charCodeAt(c++);h.flags|=1<<cb.Plus._hx_index;break;case 45:d=a.charCodeAt(c++);
h.flags|=1<<cb.Minus._hx_index;break;case 48:d=a.charCodeAt(c++);h.flags|=1<<cb.Zero._hx_index;break;default:break a}0!=(h.flags&1<<cb.Minus._hx_index)&&0!=(h.flags&1<<cb.Zero._hx_index)&&(h.flags&=-1-(1<<cb.Zero._hx_index));0!=(h.flags&1<<cb.Space._hx_index)&&0!=(h.flags&1<<cb.Plus._hx_index)&&(h.flags&=-1-(1<<cb.Space._hx_index));if(42==d)h.width=null,d=a.charCodeAt(c++);else if(48<=d&&57>=d){for(var m=0;48<=d&&57>=d;)m=d-48+10*m,d=a.charCodeAt(c++);h.width=m;if(36==d)if(h.pos=m-1,h.width=-1,d=
a.charCodeAt(c++),42==d)h.width=null,d=a.charCodeAt(c++);else if(48<=d&&57>=d){for(m=0;48<=d&&57>=d;)m=d-48+10*m,d=a.charCodeAt(c++);h.width=m}}if(46==d)if(d=a.charCodeAt(c++),42==d)h.precision=null,d=a.charCodeAt(c++);else{m=0;if(48<=d&&57>=d)for(;48<=d&&57>=d;)m=d-48+10*m,d=a.charCodeAt(c++);h.precision=m}a:for(;76<=d&&108>=d;)switch(d){case 76:d=a.charCodeAt(c++);h.flags|=1<<cb.LengthUpperCaseL._hx_index;break;case 104:d=a.charCodeAt(c++);h.flags|=1<<cb.LengthH._hx_index;break;case 108:d=a.charCodeAt(c++);
h.flags|=1<<cb.LengthLowerCaseL._hx_index;break;default:break a}if(69<=d&&120>=d){switch(d){case 69:h.flags|=1<<cb.UpperCase._hx_index;m=me.FmtFloat(fi.FScientific);break;case 71:h.flags|=1<<cb.UpperCase._hx_index;m=me.FmtFloat(fi.FNatural);break;case 88:h.flags|=1<<cb.UpperCase._hx_index;m=me.FmtInt(zf.IHex);break;case 98:m=me.FmtInt(zf.IBin);break;case 99:m=me.FmtInt(zf.ICharacter);break;case 100:m=me.FmtInt(zf.ISignedDecimal);break;case 101:m=me.FmtFloat(fi.FScientific);break;case 102:m=me.FmtFloat(fi.FNormal);
break;case 103:m=me.FmtFloat(fi.FNatural);break;case 105:m=me.FmtInt(zf.ISignedDecimal);break;case 110:m=me.FmtNothing;break;case 111:m=me.FmtInt(zf.IOctal);break;case 112:m=me.FmtPointer;break;case 115:m=me.FmtString;break;case 117:m=me.FmtInt(zf.IUnsignedDecimal);break;case 120:m=me.FmtInt(zf.IHex);break;default:m=null}d=null==m?Hg.Unknown(String.fromCodePoint(d),c):Hg.Tag(m,h)}else d=Hg.Unknown(String.fromCodePoint(d),c)}b[e++]=d}else f.b+=String.fromCodePoint(d);0<f.b.length&&(b[e++]=Hg.Raw(f.b));
return e};Va.formatBinary=function(a,b,c){var d=b.flags,e=b.precision;b=b.width;0!=(d&1<<cb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e)return;d&=-1-(1<<cb.Sharp._hx_index)}-1==e&&(e=1);for(var f=Va._tmp,g=0;f[g++]=a&1,a>>>=1,0<a;);a=g;if(0!=(d&1<<cb.Minus._hx_index)){0!=(d&1<<cb.Sharp._hx_index)&&(c.b+="0b");if(e>g)for(var h=0,m=e-g;h<m;)h++,c.b+="0";for(;-1<--a;)c.b+=String.fromCodePoint(48+f[a]);0!=(d&1<<cb.Sharp._hx_index)&&(b-=2);e>g&&(g=e);if(b>g)for(h=0,m=b-g;h<m;)h++,c.b+=" "}else{m=g;
e>m&&(m=e);0!=(d&1<<cb.Sharp._hx_index)&&(b-=2);if(b>m)if(0!=(d&1<<cb.Zero._hx_index)&&1==e)for(h=0,m=b-m;h<m;)h++,c.b+="0";else for(h=0,m=b-m;h<m;)h++,c.b+=" ";0!=(d&1<<cb.Sharp._hx_index)&&(c.b+="0b");if(e>g)for(h=0,m=e-g;h<m;)h++,c.b+="0";for(;-1<--a;)c.b+=String.fromCodePoint(48+f[a])}};Va.formatOctal=function(a,b,c){var d=b.flags,e=b.precision;b=b.width;0!=(d&1<<cb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e){c.b+=A.string(0!=(d&1<<cb.Sharp._hx_index)?"0":"");return}d&=-1-(1<<cb.Sharp._hx_index)}for(var f=
Va._tmp,g=0;f[g++]=a&7,a>>>=3,0<a;);a=g;-1!=e?0!=(d&1<<cb.Zero._hx_index)&&(d&=-1-(1<<cb.Zero._hx_index),d|=1<<cb.Space._hx_index):e=1;if(0!=(d&1<<cb.Minus._hx_index)){0!=(d&1<<cb.Sharp._hx_index)&&(c.b+="0",++g);if(e>g)for(var h=0,m=e-g;h<m;)h++,c.b+="0";for(;-1<--a;)d=String.fromCodePoint(48+f[a]),c.b+=A.string(d);e>g&&(g=e);if(b>g)for(h=0,m=b-g;h<m;)h++,c.b+=" "}else{0!=(d&1<<cb.Sharp._hx_index)&&++g;m=g;e>m&&(m=e);if(b>m)if(0!=(d&1<<cb.Zero._hx_index))for(h=0,m=b-m;h<m;)h++,c.b+="0";else for(h=
0,m=b-m;h<m;)h++,c.b+=" ";0!=(d&1<<cb.Sharp._hx_index)&&(c.b+="0");if(e>g)for(h=0,m=e-g;h<m;)h++,c.b+="0";for(;-1<--a;)d=String.fromCodePoint(48+f[a]),c.b+=A.string(d)}};Va.formatHexadecimal=function(a,b,c){var d=b.flags,e=b.precision;b=b.width;0!=(d&1<<cb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e)return;d&=-1-(1<<cb.Sharp._hx_index)}-1==e&&(e=1);for(var f=Va._tmp,g=0;f[g++]=a&15,a>>>=4,0<a;);a=g;if(0!=(d&1<<cb.Minus._hx_index)){0!=(d&1<<cb.Sharp._hx_index)&&(c.b=0!=(d&1<<cb.UpperCase._hx_index)?
c.b+"0X":c.b+"0x");if(e>g)for(var h=0,m=e-g;h<m;)h++,c.b+="0";for(h=0!=(d&1<<cb.UpperCase._hx_index)?65:97;-1<--a;)m=f[a],10>m?(m=String.fromCodePoint(48+m),c.b+=A.string(m)):(m=String.fromCodePoint(h+(m-10)),c.b+=A.string(m));0!=(d&1<<cb.Sharp._hx_index)&&(b-=2);e>g&&(g=e);if(b>g)for(h=0,m=b-g;h<m;)h++,c.b+=" "}else{m=g;e>m&&(m=e);0!=(d&1<<cb.Sharp._hx_index)&&(b-=2);if(b>m)if(0!=(d&1<<cb.Zero._hx_index)&&1==e)for(h=0,m=b-m;h<m;)h++,c.b+="0";else for(h=0,m=b-m;h<m;)h++,c.b+=" ";0!=(d&1<<cb.Sharp._hx_index)&&
(c.b=0!=(d&1<<cb.UpperCase._hx_index)?c.b+"0X":c.b+"0x");if(e>g)for(h=0,m=e-g;h<m;)h++,c.b+="0";for(h=0!=(d&1<<cb.UpperCase._hx_index)?65:97;-1<--a;)m=f[a],10>m?(m=String.fromCodePoint(48+m),c.b+=A.string(m)):(m=String.fromCodePoint(h+(m-10)),c.b+=A.string(m))}};Va.formatSignedDecimal=function(a,b,c){var d=b.flags,e=b.precision;b=b.width;if(0!=e||0!=a){0!=(d&1<<cb.LengthH._hx_index)&&(a&=65535);var f=A.string(0>a?-a:a),g=f.length;a=0>a?"-":0!=(d&1<<cb.Plus._hx_index)?"+":0!=(d&1<<cb.Space._hx_index)?
" ":null;var h=null!=a;if(0!=(d&1<<cb.Minus._hx_index)){h&&(c.b+=null==a?"null":""+a);if(e>g)for(var m=0,l=e-g;m<l;)m++,c.b+="0";c.b+=A.string(f);e>g&&(g=e);g+=h?1:0;if(b>g)for(m=0,l=b-g;m<l;)m++,c.b+=" "}else{l=g+(h?1:0);e>l&&(l=e);if(b>l)if(0!=(d&1<<cb.Zero._hx_index))for(h&&(c.b+=null==a?"null":""+a),m=0,l=b-l;m<l;)m++,c.b+="0";else for(m=0,l=b-l;m<l;)m++,c.b+=" ";h&&0==(d&1<<cb.Zero._hx_index)&&(c.b+=null==a?"null":""+a);if(e>g)for(m=0,l=e-g;m<l;)m++,c.b+="0";c.b+=A.string(f)}}};Va.formatUnsignedDecimal=
function(a,b,c){if(0<=a)Va.formatSignedDecimal(a,b,c);else{a=new Ua(0,a);a=bs.toString(a);var d=a.length,e=b.flags,f=b.precision;b=b.width;if(0!=(e&1<<cb.Minus._hx_index)){if(f>d){e=0;for(var g=f-d;e<g;)e++,c.b+="0"}c.b+=null==a?"null":""+a;f>d&&(d=f);if(b>d)for(e=0,g=b-d;e<g;)e++,c.b+=" "}else{g=d;f>g&&(g=f);if(b>g)if(0!=(e&1<<cb.Zero._hx_index))for(e=0,g=b-g;e<g;)e++,c.b+="0";else for(e=0,g=b-g;e<g;)e++,c.b+=" ";if(f>d)for(e=0,g=f-d;e<g;)e++,c.b+="0";c.b+=null==a?"null":""+a}}};Va.formatNaturalFloat=
function(a,b,c){var d=new Wa;Va.formatFloat(a,b,d);var e=d.b;d=new Wa;Va.formatScientific(a,b,d);a=d.b;e=e.length<=a.length?e:a;c.b+=null==e?"null":""+e};Va.formatScientific=function(a,b,c){var d=b.flags,e=b.precision;-1==e&&(e=Va.DEFAULT_PRECISION);var f,g="";if(0==a){var h=f=0;g+="0";if(0<e){g+=".";for(var m=0,l=e;m<l;)m++,g+="0"}}else m=Math,f=0<a?1:0>a?-1:0,a=m.abs(a),h=m.floor(Math.log(a)/2.302585092994046),a/=m.pow(10,h),m=m.pow(.1,e),a=Math.round(a/m)*m;0!=a&&(g+=I.substr(null==a?"null":""+
a,0,e+2));g+=0!=(d&1<<cb.UpperCase._hx_index)?"E":"e";g+=0<=h?"+":"-";a=A.string(0>h?-h:h);l=Va.DEFAULT_NUM_EXP_DIGITS-a.length;if(1>l)m=a;else{if(30<l)for(e=h="0",m=0,--l;m<l;)m++,e+=h;else e=Va._padChars[l];m=e+a}g+=m;(a=-1==f||0!=(d&1<<cb.Plus._hx_index)||0!=(d&1<<cb.Space._hx_index))&&0==(d&1<<cb.Zero._hx_index)&&(g=(-1==f?"-":0!=(d&1<<cb.Plus._hx_index)?"+":" ")+g);if(0<b.width&&(m=b.width,a&&0!=(d&1<<cb.Zero._hx_index)&&--m,b=0!=(d&1<<cb.Zero._hx_index)?0:20,l=m-g.length,1<=l)){if(30<l)for(e=
h=0==b?"0":" ",m=0,--l;m<l;)m++,e+=h;else e=Va._padChars[b+l];g=e+g}a&&0!=(d&1<<cb.Zero._hx_index)&&(g=(-1==f?"-":0!=(d&1<<cb.Plus._hx_index)?"+":" ")+g);c.b+=null==g?"null":""+g};Va.formatFloat=function(a,b,c){var d=b.flags,e=b.precision;-1==e&&(e=Va.DEFAULT_PRECISION);b=b.width;var f=0>a;0==e?(a=A.string(Math.round(a)),0!=(d&1<<cb.Sharp._hx_index)&&(a+=".")):a=a.toFixed(e);var g=a.length;f&&-1<a.indexOf("-")&&(a=I.substr(a,1,null));e=null;0==(d&1<<cb.Plus._hx_index)||f?0!=(d&1<<cb.Space._hx_index)?
(e=" ",++g):f&&(e="-"):(e="+",++g);f=null!=e;if(0!=(d&1<<cb.Minus._hx_index)){if(f&&(c.b+=null==e?"null":""+e),c.b+=null==a?"null":""+a,b>g)for(d=0,b-=g;d<b;)d++,c.b+=" "}else{if(b>g)if(0!=(d&1<<cb.Zero._hx_index))for(f&&(c.b+=null==e?"null":""+e,f=!1),d=0,b-=g;d<b;)d++,c.b+="0";else for(d=0,b-=g;d<b;)d++,c.b+=" ";f&&(c.b+=null==e?"null":""+e);c.b+=null==a?"null":""+a}};Va.formatCharacter=function(a,b,c){if(0!=(b.flags&1<<cb.Minus._hx_index)){a=String.fromCodePoint(a);c.b+=A.string(a);var d=0;for(b=
b.width-1;d<b;)d++,c.b+=" "}else{d=0;for(b=b.width-1;d<b;)d++,c.b+=" ";a=String.fromCodePoint(a);c.b+=A.string(a)}};Va.formatString=function(a,b,c){var d=a.length,e=b.precision;if(0!=(b.flags&1<<cb.Minus._hx_index)){-1!=e?(c.b+=null==e?I.substr(a,0,null):I.substr(a,0,e),d=e):c.b+=null==a?"null":""+a;var f=0;for(b=b.width-d;f<b;)f++,c.b+=" "}else{-1!=e&&(d=e);f=0;for(b=b.width-d;f<b;)f++,c.b+=" ";c.b=-1!=e?c.b+(null==e?I.substr(a,0,null):I.substr(a,0,e)):c.b+(null==a?"null":""+a)}};Va.pad=function(a,
b,c,d){b-=a.length;if(1>b)return a;if(30<b){var e=0==c?"0":" ";c=e;var f=0;for(--b;f<b;)f++,c+=e}else c=Va._padChars[c+b];return 0<d?a+c:c+a};var bh=function(a){this.message=a};k["polygonal.ds.PrintfError"]=bh;bh.__name__="polygonal.ds.PrintfError";bh.prototype={message:null,toString:function(){return this.message},__class__:bh};var lp=function(a,b,c,d){this.flags=a;this.pos=b;this.width=c;this.precision=d};k["polygonal.ds._Printf.FormatArgs"]=lp;lp.__name__="polygonal.ds._Printf.FormatArgs";lp.prototype=
{flags:null,pos:null,width:null,precision:null,__class__:lp};var cb=x["polygonal.ds._Printf.FormatFlag"]={__ename__:"polygonal.ds._Printf.FormatFlag",__constructs__:null,Minus:{_hx_name:"Minus",_hx_index:0,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},Plus:{_hx_name:"Plus",_hx_index:1,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},Space:{_hx_name:"Space",_hx_index:2,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},Sharp:{_hx_name:"Sharp",_hx_index:3,__enum__:"polygonal.ds._Printf.FormatFlag",
toString:v},Zero:{_hx_name:"Zero",_hx_index:4,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},LengthH:{_hx_name:"LengthH",_hx_index:5,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},LengthUpperCaseL:{_hx_name:"LengthUpperCaseL",_hx_index:6,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},LengthLowerCaseL:{_hx_name:"LengthLowerCaseL",_hx_index:7,__enum__:"polygonal.ds._Printf.FormatFlag",toString:v},UpperCase:{_hx_name:"UpperCase",_hx_index:8,__enum__:"polygonal.ds._Printf.FormatFlag",
toString:v}};cb.__constructs__=[cb.Minus,cb.Plus,cb.Space,cb.Sharp,cb.Zero,cb.LengthH,cb.LengthUpperCaseL,cb.LengthLowerCaseL,cb.UpperCase];var Hg=x["polygonal.ds._Printf.FormatToken"]={__ename__:"polygonal.ds._Printf.FormatToken",__constructs__:null,Raw:(C=function(a){return{_hx_index:0,string:a,__enum__:"polygonal.ds._Printf.FormatToken",toString:v}},C._hx_name="Raw",C.__params__=["string"],C),Tag:(C=function(a,b){return{_hx_index:1,type:a,args:b,__enum__:"polygonal.ds._Printf.FormatToken",toString:v}},
C._hx_name="Tag",C.__params__=["type","args"],C),Property:(C=function(a){return{_hx_index:2,name:a,__enum__:"polygonal.ds._Printf.FormatToken",toString:v}},C._hx_name="Property",C.__params__=["name"],C),Unknown:(C=function(a,b){return{_hx_index:3,string:a,pos:b,__enum__:"polygonal.ds._Printf.FormatToken",toString:v}},C._hx_name="Unknown",C.__params__=["string","pos"],C)};Hg.__constructs__=[Hg.Raw,Hg.Tag,Hg.Property,Hg.Unknown];var me=x["polygonal.ds._Printf.FormatDataType"]={__ename__:"polygonal.ds._Printf.FormatDataType",
__constructs__:null,FmtInt:(C=function(a){return{_hx_index:0,type:a,__enum__:"polygonal.ds._Printf.FormatDataType",toString:v}},C._hx_name="FmtInt",C.__params__=["type"],C),FmtFloat:(C=function(a){return{_hx_index:1,floatType:a,__enum__:"polygonal.ds._Printf.FormatDataType",toString:v}},C._hx_name="FmtFloat",C.__params__=["floatType"],C),FmtString:{_hx_name:"FmtString",_hx_index:2,__enum__:"polygonal.ds._Printf.FormatDataType",toString:v},FmtPointer:{_hx_name:"FmtPointer",_hx_index:3,__enum__:"polygonal.ds._Printf.FormatDataType",
toString:v},FmtNothing:{_hx_name:"FmtNothing",_hx_index:4,__enum__:"polygonal.ds._Printf.FormatDataType",toString:v}};me.__constructs__=[me.FmtInt,me.FmtFloat,me.FmtString,me.FmtPointer,me.FmtNothing];var zf=x["polygonal.ds._Printf.IntType"]={__ename__:"polygonal.ds._Printf.IntType",__constructs__:null,ICharacter:{_hx_name:"ICharacter",_hx_index:0,__enum__:"polygonal.ds._Printf.IntType",toString:v},ISignedDecimal:{_hx_name:"ISignedDecimal",_hx_index:1,__enum__:"polygonal.ds._Printf.IntType",toString:v},
IUnsignedDecimal:{_hx_name:"IUnsignedDecimal",_hx_index:2,__enum__:"polygonal.ds._Printf.IntType",toString:v},IOctal:{_hx_name:"IOctal",_hx_index:3,__enum__:"polygonal.ds._Printf.IntType",toString:v},IHex:{_hx_name:"IHex",_hx_index:4,__enum__:"polygonal.ds._Printf.IntType",toString:v},IBin:{_hx_name:"IBin",_hx_index:5,__enum__:"polygonal.ds._Printf.IntType",toString:v}};zf.__constructs__=[zf.ICharacter,zf.ISignedDecimal,zf.IUnsignedDecimal,zf.IOctal,zf.IHex,zf.IBin];var fi=x["polygonal.ds._Printf.FloatType"]=
{__ename__:"polygonal.ds._Printf.FloatType",__constructs__:null,FNormal:{_hx_name:"FNormal",_hx_index:0,__enum__:"polygonal.ds._Printf.FloatType",toString:v},FScientific:{_hx_name:"FScientific",_hx_index:1,__enum__:"polygonal.ds._Printf.FloatType",toString:v},FNatural:{_hx_name:"FNatural",_hx_index:2,__enum__:"polygonal.ds._Printf.FloatType",toString:v}};fi.__constructs__=[fi.FNormal,fi.FScientific,fi.FNatural];var Sd=function(){};k["polygonal.ds.tools.ArrayTools"]=Sd;Sd.__name__="polygonal.ds.tools.ArrayTools";
Sd.alloc=function(a){Aa._assert(0<=a,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});return Array(a)};Sd.trim=function(a,b){a.length>b&&(a.length=b);return a};Sd.swap=function(a,b,c){Aa._assert(null!=a,"array != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:94,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Aa._assert(0<=b&&b<a.length,"0 <= a && a < array.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:95,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Aa._assert(0<=c&&c<a.length,"0 <= b && b < array.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:96,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});if(b!=c){var d=a[b];a[b]=a[c];a[c]=d}};Sd.getFront=function(a,b){Aa._assert(null!=a,"array != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:113,className:"polygonal.ds.tools.ArrayTools",methodName:"getFront"});Aa._assert(0<=b&&b<a.length,"0 <= index && index < array.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:114,className:"polygonal.ds.tools.ArrayTools",methodName:"getFront"});Aa._assert(null!=a,"array != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:94,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Aa._assert(0<=b&&b<a.length,"0 <= a && a < array.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:95,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Aa._assert(0<a.length,"0 <= b && b < array.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:96,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});if(0!=b){var c=a[b];a[b]=a[0];a[0]=c}return a[0]};Sd.init=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);d=0>=d?a.length:c+d;Aa._assert(0<=
c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:129,className:"polygonal.ds.tools.ArrayTools",methodName:"init"});for(Aa._assert(d<=a.length,"max <= a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:130,
className:"polygonal.ds.tools.ArrayTools",methodName:"init"});c<d;)a[c++]=b;return a};Sd.blit=function(a,b,c,d,e){if(0<e)if(Aa._assert(b<a.length,"srcPos out of range(srcPos < src.length)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:145,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),Aa._assert(d<c.length,"dstPos out of range(dstPos < dst.length)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:146,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),Aa._assert(b+e<=a.length&&d+e<=c.length,"n out of range(srcPos + n <= src.length && dstPos + n <= dst.length)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:147,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),a==c)if(b<d){var f=b+e;b=d+e;for(var g=0;g<e;)g++,--f,--b,a[b]=a[f]}else{if(b>
d)for(f=b,b=d,g=0;g<e;)g++,a[b]=a[f],++f,++b}else if(0==b&&0==d)for(g=0;g<e;)f=g++,c[f]=a[f];else if(0==b)for(g=0;g<e;)f=g++,c[d+f]=a[f];else if(0==d)for(g=0;g<e;)f=g++,c[f]=a[b+f];else for(g=0;g<e;)f=g++,c[d+f]=a[b+f]};Sd.iter=function(a,b,c){null==c&&(c=0);0==c&&(c=a.length);for(var d=0;d<c;){var e=d++;b(a[e])}};Sd.forEach=function(a,b){for(var c=0,d=a.length;c<d;){var e=c++;a[e]=b(a[e],e)}};Sd.binarySearchCmp=function(a,b,c,d,e){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:236,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Aa._assert(null!=e,"comparator != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:237,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Aa._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:238,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Aa._assert(d<a.length,"max < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:239,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});for(var f,g=d+1;c<g;)f=c+(g-c>>1),0>e(a[f],b)?c=f+1:g=f;return c<=d&&0==e(a[c],b)?c:~c};Sd.binarySearchf=function(a,b,c,d){Aa._assert(null!=
a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:265,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchf"});Aa._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:266,className:"polygonal.ds.tools.ArrayTools",
methodName:"binarySearchf"});Aa._assert(d<a.length,"max < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:267,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchf"});for(var e,f=d+1;c<f;)e=c+(f-c>>1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};Sd.binarySearchi=function(a,b,c,d){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:293,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});Aa._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:294,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});Aa._assert(d<a.length,"max < a.length",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:295,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});for(var e,f=d+1;c<f;)e=c+(f-c>>1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};Sd.shuffle=function(a,b){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:320,className:"polygonal.ds.tools.ArrayTools",methodName:"shuffle"});var c=a.length;if(null==b)for(;1<--c;){var d=
gi.f()*c|0,e=a[c];a[c]=a[d];a[d]=e}else{Aa._assert(b.length>=a.length,"insufficient random values(rvals.length >= a.length)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:335,className:"polygonal.ds.tools.ArrayTools",methodName:"shuffle"});for(var f=0;1<--c;)d=b[f++]*c|0,e=a[c],a[c]=a[d],a[d]=e}};Sd.random=function(a){var b=a.length;return 2>b?a[0]:a[gi.f()*b|0]};Sd.sortRange=
function(a,b,c,d,e){var f=a.length;if(1<f)if(Aa._assert(0<=d&&d<=f-1&&d+e<=f,"first out of range(first >= 0 && first <= k - 1 && first + n <= k)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:370,className:"polygonal.ds.tools.ArrayTools",methodName:"sortRange"}),Aa._assert(0<=e&&e<=f,"n out of range(n >= 0 && n <= k)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:371,className:"polygonal.ds.tools.ArrayTools",methodName:"sortRange"}),c)for(c=d+1,e=d+e;c<e;){var g=c++;for(f=a[g];g>d;){var h=a[g-1];if(0<b(h,f))a[g]=h,--g;else break}a[g]=f}else Sd._quickSort(a,d,e,b)};Sd.quickPerm=function(a){for(var b=[],c=[],d=[],e,f,g=0;g<a;)c[g]=g+1,d[g]=0,++g;b.push(c.slice());for(g=1;g<a;)d[g]<g?(e=g%2*d[g],f=c[e],c[e]=c[g],c[g]=f,b.push(c.slice()),d[g]++,g=1):(d[g]=0,++g);return b};Sd.equals=function(a,b,c){if(a.length!=b.length)return!1;for(var d=0,e=a.length;d<
e;){if(!c(a[d],b[d]))return!1;++d}return!0};Sd.split=function(a,b,c){Aa._assert(0==b%c,"n is not a multiple of k(n % k == 0)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:464,className:"polygonal.ds.tools.ArrayTools",methodName:"split"});for(var d=[],e=null,f=0;f<b;){var g=f++;0==g%c&&(e=[],d[g/c|0]=e);e.push(a[g])}return d};Sd.pairwise=function(a,b,c){var d=0;for(Aa._assert(0==
(c&1),"max & 1 == 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:489,className:"polygonal.ds.tools.ArrayTools",methodName:"pairwise"});d<c;)b(d,a[d],a[d+1]),d+=2};Sd.bruteforce=function(a,b){for(var c=0,d,e=a.length,f=e-1,g;c<f;){g=a[c];for(d=c+1;d<e;)b(g,a[d]),++d;++c}};Sd._quickSort=function(a,b,c,d){var e=b+c-1,f=b,g=e;if(1<c){var h=b+(c>>1);c=b+c-1;var m=a[b],l=a[h],
n=a[c],p=d(m,n);h=0>p&&0>d(m,l)?0>d(l,n)?h:c:0>d(l,m)&&0>d(l,n)?0>p?b:c:0>d(n,m)?h:b;c=a[h];for(a[h]=a[b];f<g;){for(;0>d(c,a[g])&&f<g;)--g;g!=f&&(a[f]=a[g],++f);for(;0<d(c,a[f])&&f<g;)++f;g!=f&&(a[g]=a[f],--g)}a[f]=c;Sd._quickSort(a,b,f-b,d);Sd._quickSort(a,f+1,e-f,d)}};var Aa=function(){};k["polygonal.ds.tools.Assert"]=Aa;Aa.__name__="polygonal.ds.tools.Assert";Aa._assert=function(a,b,c){if(!a)throw a="in file "+c.fileName+", line "+c.lineNumber,Error("Assertion failed"+(null!=b?": ":" ")+(null==
b?a:""+b+" ("+a+")"));};var Eg=function(){};k["polygonal.ds.tools.GrowthRate"]=Eg;Eg.__name__="polygonal.ds.tools.GrowthRate";Eg.compute=function(a,b){Aa._assert(-3<=a,"invalid growth rate(rate >= -3)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/GrowthRate.hx",lineNumber:52,className:"polygonal.ds.tools.GrowthRate",methodName:"compute"});if(0<a)b+=a;else switch(a){case -3:b<<=1;break;case -2:b=(3*
b>>1)+1;break;case -1:a=b+1;b=(a>>3)+(9>a?3:6)+a;break;case 0:throw J.thrown("out of space");}return b};var Jb=function(){};k["polygonal.ds.tools.NativeArrayTools"]=Jb;Jb.__name__="polygonal.ds.tools.NativeArrayTools";Jb.alloc=function(a){return Array(a)};Jb.get=function(a,b){return a[b]};Jb.set=function(a,b,c){a[b]=c};Jb.size=function(a){return a.length};Jb.toArray=function(a,b,c,d){Aa._assert(0<=b&&b<a.length,"first index out of range(first >= 0 && first < size(src))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:140,className:"polygonal.ds.tools.NativeArrayTools",methodName:"toArray"});Aa._assert(0<=c&&b+c<=a.length,"len out of range(len >= 0 && first + len <= size(src))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:141,className:"polygonal.ds.tools.NativeArrayTools",methodName:"toArray"});if(0==c)return[];Aa._assert(0<=c,"len >= 0",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});d=Array(c);if(0==b)for(var e=0;e<c;){var f=e++;d[f]=a[f]}else for(e=b,c=b+c;e<c;)f=e++,d[f-b]=a[f];return d};Jb.ofArray=function(a){return a.slice(0,a.length)};Jb.blit=function(a,b,c,d,e){if(0<e)if(Aa._assert(b<a.length,"srcPos out of range(srcPos < size(src))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:197,className:"polygonal.ds.tools.NativeArrayTools",methodName:"blit"}),Aa._assert(d<c.length,"dstPos out of range(dstPos < size(dst))",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:198,className:"polygonal.ds.tools.NativeArrayTools",methodName:"blit"}),Aa._assert(b+e<=a.length&&d+e<=c.length,"n out of range(srcPos + n <= size(src) && dstPos + n <= size(dst))",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:199,className:"polygonal.ds.tools.NativeArrayTools",methodName:"blit"}),a==c)if(b<d){var f=b+e;b=d+e;for(var g=0;g<e;)g++,--f,--b,a[b]=a[f]}else{if(b>d)for(f=b,b=d,g=0;g<e;)g++,a[b]=a[f],++f,++b}else if(0==b&&0==d)for(g=0;g<e;)f=g++,c[f]=a[f];else if(0==b)for(g=0;g<e;)f=g++,c[d+f]=a[f];else if(0==d)for(g=0;g<e;)f=g++,c[f]=
a[b+f];else for(g=0;g<e;)f=g++,c[d+f]=a[b+f]};Jb.copy=function(a){return a.slice(0)};Jb.zero=function(a,b,c){null==c&&(c=0);null==b&&(b=0);c=0>=c?a.length:b+c;Aa._assert(0<=b&&b<a.length,"min >= 0 && min < size(dst)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:293,className:"polygonal.ds.tools.NativeArrayTools",methodName:"zero"});for(Aa._assert(c<=a.length,"max <= size(dst)",
{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:294,className:"polygonal.ds.tools.NativeArrayTools",methodName:"zero"});b<c;)a[b++]=0;return a};Jb.init=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);d=0>=d?a.length:c+d;Aa._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:315,className:"polygonal.ds.tools.NativeArrayTools",methodName:"init"});for(Aa._assert(d<=a.length,"max <= size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:316,className:"polygonal.ds.tools.NativeArrayTools",methodName:"init"});c<d;)a[c++]=b;return a};Jb.nullify=function(a,b,c){null==c&&(c=0);null==b&&(b=0);c=0>=c?a.length:b+c;Aa._assert(0<=b&&b<a.length,
"min >= 0 && min < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:331,className:"polygonal.ds.tools.NativeArrayTools",methodName:"nullify"});for(Aa._assert(c<=a.length,"max <= size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:332,
className:"polygonal.ds.tools.NativeArrayTools",methodName:"nullify"});b<c;)a[b++]=null;return a};Jb.binarySearchCmp=function(a,b,c,d,e){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:351,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Aa._assert(null!=e,"cmp != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:352,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Aa._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:353,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Aa._assert(d<a.length,"max < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:354,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});for(var f,g=d+1;c<g;)f=c+(g-c>>1),0>e(a[f],b)?c=f+1:g=f;return c<=d&&0==e(a[c],b)?c:~c};Jb.binarySearchf=function(a,b,c,d){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:379,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});
Aa._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:380,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});Aa._assert(d<a.length,"max < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:381,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});for(var e,f=d+1;c<f;)e=c+(f-c>>1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};Jb.binarySearchi=function(a,b,c,d){Aa._assert(null!=a,"a != null",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:406,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});Aa._assert(0<=
c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:407,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});Aa._assert(d<a.length,"max < size(a)",{fileName:"C:/Users/Lloyd Raguindin/AppData/Local/Stencyl/libs/haxelib/Stencyl/ds/1d23c8a6f89f0f3a80158b94ca285e4e61cf982d/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:408,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});for(var e,f=d+1;c<f;)e=c+(f-c>>1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};var gi=function(){};k["polygonal.ds.tools.Shuffle"]=gi;gi.__name__="polygonal.ds.tools.Shuffle";gi.f=function(){return Math.random()};gi.setRandom=function(a){gi.f=a};gi.frand=function(){return gi.f()};var mp=function(a,b,c){T.call(this,b);this.nameMap.h.shoot="_shoot";this.nameMap.h.shoott="_shoott";this._shoott=!1;this.nameMap.h.shot=
"_shot";this._shot=!1;this.nameMap.h["X vel"]="_Xvel";this.nameMap.h.Velo="_Velo";this._Velo=0};k["scripts.ActorEvents_1"]=mp;mp.__name__="scripts.ActorEvents_1";mp.__super__=T;mp.prototype=u(T.prototype,{_shoot:null,_shoott:null,_shot:null,_Xvel:null,_Velo:null,_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(3);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor.getLastCollidedActor())},_event_TypeType:function(a){var b=
this;if(this.wrapper.enabled){if(1==q.engine.getGameAttribute("take damage")){this.actor.setX(43);this.actor.setY(100);a=q.engine;var c=q.engine.getGameAttribute("health")-1;a.gameAttributes.h.health=c;q.engine.gameAttributes.h["take damage"]=!1;this.actor.setFilter([n.createSepiaFilter()])}n.runLater(1E3,function(a){q.engine.gameAttributes.h["take damage"]=!0;b.actor.clearFilters()},this.actor)}},_event_ActorCreated:function(){if(this.wrapper.enabled){var a=q.engine,b=q.engine.getGameAttribute("health")-
1;a.gameAttributes.h.health=b}},_event_Updating:function(a){if(this.wrapper.enabled&&0==q.engine.getGameAttribute("health")){a=q.engine;var b=q.engine.getGameAttribute("lives")-1;a.gameAttributes.h.lives=b;this.actor.setX(98);this.actor.setY(225);a=Lb.get().scenes.h[2].getID();var c=b=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(1,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(1,b<<16|c<<8|d))}},init:function(){q.engine.gameAttributes.h.health=
3;q.engine.gameAttributes.h["take damage"]=!0;this._Velo=0;this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(1).ID,n.getActorType(13).ID,r(this,this._event_TypeType));this.addListener(this.actor.whenKilled,r(this,this._event_ActorCreated));this.addListener(this.actor.whenUpdated,r(this,this._event_Updating))},forwardMessage:function(a){},__class__:mp});var np=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_13"]=
np;np.__name__="scripts.ActorEvents_13";np.__super__=T;np.prototype=u(T.prototype,{_event_TypeType:function(a){this.wrapper.enabled&&n.recycleActor(a.thisActor)},init:function(){this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(13).ID,n.getActorType(19).ID,r(this,this._event_TypeType))},forwardMessage:function(a){},__class__:np});var op=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_15"]=op;op.__name__="scripts.ActorEvents_15";op.__super__=T;op.prototype=u(T.prototype,{init:function(){},
forwardMessage:function(a){},__class__:op});var pp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_17"]=pp;pp.__name__="scripts.ActorEvents_17";pp.__super__=T;pp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(n.recycleActor(this.actor),b=q.engine,c=q.engine.getGameAttribute("se score")+1,b.gameAttributes.h["se score"]=c)},init:function(){this.addListener(this.actor.whenCollided,
r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:pp});var qp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_188"]=qp;qp.__name__="scripts.ActorEvents_188";qp.__super__=T;qp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},
forwardMessage:function(a){},__class__:qp});var rp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_19"]=rp;rp.__name__="scripts.ActorEvents_19";rp.__super__=T;rp.prototype=u(T.prototype,{_event_TypeType:function(a){if(this.wrapper.enabled){n.recycleActor(this.actor);a=q.engine;var b=q.engine.getGameAttribute("enemie")-1;a.gameAttributes.h.enemie=b;a=q.engine;b=q.engine.getGameAttribute("score")+100;a.gameAttributes.h.score=b}},_event_Updating:function(a){var b=this;this.wrapper.enabled&&n.runLater(1E3,
function(a){n.recycleActor(b.actor)},this.actor)},init:function(){this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(19).ID,n.getActorType(13).ID,r(this,this._event_TypeType));this.addListener(this.actor.whenUpdated,r(this,this._event_Updating))},forwardMessage:function(a){},__class__:rp});var sp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_190"]=sp;sp.__name__="scripts.ActorEvents_190";sp.__super__=T;sp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=
n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:sp});var tp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_192"]=tp;tp.__name__="scripts.ActorEvents_192";tp.__super__=T;tp.prototype=u(T.prototype,{_event_Updating:function(a){var b=this;this.wrapper.enabled&&n.runLater(1E3,function(a){n.recycleActor(b.actor)},
this.actor)},_event_TypeType:function(a){if(this.wrapper.enabled){n.recycleActor(this.actor);a=q.engine;var b=q.engine.getGameAttribute("hit")+1;a.gameAttributes.h.hit=b}},init:function(){q.engine.gameAttributes.h.hit=0;this.addListener(this.actor.whenUpdated,r(this,this._event_Updating));this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(19).ID,n.getActorType(194).ID,r(this,this._event_TypeType))},forwardMessage:function(a){},__class__:tp});var up=function(a,b,c){T.call(this,b)};
k["scripts.ActorEvents_194"]=up;up.__name__="scripts.ActorEvents_194";up.__super__=T;up.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:up});var vp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_196"]=vp;vp.__name__="scripts.ActorEvents_196";vp.__super__=T;vp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(n.recycleActor(this.actor),
n.startShakingScreen(.1,5))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:vp});var wp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_198"]=wp;wp.__name__="scripts.ActorEvents_198";wp.__super__=T;wp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:wp});var xp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_200"]=xp;xp.__name__="scripts.ActorEvents_200";xp.__super__=T;xp.prototype=
u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:xp});var yp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_202"]=yp;yp.__name__="scripts.ActorEvents_202";yp.__super__=T;yp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:yp});var zp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_206"]=zp;zp.__name__="scripts.ActorEvents_206";zp.__super__=T;zp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=
n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(q.engine.gameAttributes.h.showshow=!0,n.runLater(5E3,function(a){q.engine.gameAttributes.h.showshow=!1},this.actor))},_event_Drawing:function(a,b,c){this.wrapper.enabled&&1==q.engine.getGameAttribute("showshow")&&(a.drawString("After you killed all the enemies",-40,-30),a.drawString("the secret door will open.",-40,-20))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));
this.addListener(this.actor.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:zp});var Ap=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_208"]=Ap;Ap.__name__="scripts.ActorEvents_208";Ap.__super__=T;Ap.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor.getLastCollidedActor())},init:function(){this.addListener(this.actor.whenCollided,
r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:Ap});var Bp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_210"]=Bp;Bp.__name__="scripts.ActorEvents_210";Bp.__super__=T;Bp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Bp});var Cp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_212"]=Cp;Cp.__name__="scripts.ActorEvents_212";Cp.__super__=T;Cp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=
n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(q.engine.gameAttributes.h.showshow=!0,n.runLater(5E3,function(a){q.engine.gameAttributes.h.showshow=!1},this.actor))},_event_Drawing:function(a,b,c){var d=this;this.wrapper.enabled&&1==q.engine.getGameAttribute("showshow")&&(a.drawString("You have no enemies.",-40,-30),n.runLater(5E3,function(a){n.recycleActor(d.actor)},this.actor))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));
this.addListener(this.actor.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Cp});var Dp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_214"]=Dp;Dp.__name__="scripts.ActorEvents_214";Dp.__super__=T;Dp.prototype=u(T.prototype,{_event_TypeType:function(a){if(this.wrapper.enabled){n.recycleActor(this.actor.getLastCollidedActor());a=q.engine;var b=q.engine.getGameAttribute("LUCI LIFE")-1;a.gameAttributes.h["LUCI LIFE"]=b}},_event_TypeType2:function(a){if(this.wrapper.enabled){n.recycleActor(this.actor.getLastCollidedActor());
a=q.engine;var b=q.engine.getGameAttribute("health")-1;a.gameAttributes.h.health=b}},init:function(){q.engine.gameAttributes.h["LUCI LIFE"]=10;this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(218).ID,n.getActorType(214).ID,r(this,this._event_TypeType));this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(1).ID,n.getActorType(214).ID,r(this,this._event_TypeType2))},forwardMessage:function(a){},__class__:Dp});var Ep=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_216"]=
Ep;Ep.__name__="scripts.ActorEvents_216";Ep.__super__=T;Ep.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ep});var Fp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_218"]=Fp;Fp.__name__="scripts.ActorEvents_218";Fp.__super__=T;Fp.prototype=u(T.prototype,{_event_TypeType:function(a){if(this.wrapper.enabled){n.recycleActor(this.actor);a=q.engine;var b=q.engine.getGameAttribute("enemie")-1;a.gameAttributes.h.enemie=b;a=q.engine;b=q.engine.getGameAttribute("score")+
100;a.gameAttributes.h.score=b}},_event_Updating:function(a){var b=this;this.wrapper.enabled&&n.runLater(1E3,function(a){n.recycleActor(b.actor)},this.actor)},init:function(){this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(19).ID,n.getActorType(13).ID,r(this,this._event_TypeType));this.addListener(this.actor.whenUpdated,r(this,this._event_Updating))},forwardMessage:function(a){},__class__:Fp});var Gp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_220"]=Gp;Gp.__name__="scripts.ActorEvents_220";
Gp.__super__=T;Gp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(b=q.engine,c=q.engine.getGameAttribute("health")+1,b.gameAttributes.h.health=c)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:Gp});var Hp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_222"]=Hp;Hp.__name__="scripts.ActorEvents_222";
Hp.__super__=T;Hp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(q.engine.gameAttributes.h.showshow=!0,n.runLater(5E3,function(a){q.engine.gameAttributes.h.showshow=!1},this.actor))},_event_Drawing:function(a,b,c){var d=this;this.wrapper.enabled&&1==q.engine.getGameAttribute("showshow")&&(a.drawString("When you got your powers",-40,-30),a.drawString("wait for 5 seconds",
-40,-10),n.runLater(5E3,function(a){n.recycleActor(d.actor)},this.actor))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));this.addListener(this.actor.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Hp});var Ip=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_224"]=Ip;Ip.__name__="scripts.ActorEvents_224";Ip.__super__=T;Ip.prototype=u(T.prototype,{_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&n.exitGame()},init:function(){this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent("enter"),
r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:Ip});var Jp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_24"]=Jp;Jp.__name__="scripts.ActorEvents_24";Jp.__super__=T;Jp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Jp});var Kp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_26"]=Kp;Kp.__name__="scripts.ActorEvents_26";Kp.__super__=T;Kp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Kp});var Lp=
function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_3"]=Lp;Lp.__name__="scripts.ActorEvents_3";Lp.__super__=T;Lp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(n.recycleActor(this.actor),b=q.engine,c=q.engine.getGameAttribute("se score")+1,b.gameAttributes.h["se score"]=c)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},
forwardMessage:function(a){},__class__:Lp});var Mp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_32"]=Mp;Mp.__name__="scripts.ActorEvents_32";Mp.__super__=T;Mp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Mp});var Np=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_34"]=Np;Np.__name__="scripts.ActorEvents_34";Np.__super__=T;Np.prototype=u(T.prototype,{_event_Drawing:function(a,b,c){this.wrapper.enabled&&a.drawString("",10,10)},init:function(){this.addListener(this.actor.whenDrawing,
r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Np});var Op=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_36"]=Op;Op.__name__="scripts.ActorEvents_36";Op.__super__=T;Op.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Op});var Pp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_38"]=Pp;Pp.__name__="scripts.ActorEvents_38";Pp.__super__=T;Pp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Pp});var Qp=
function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_40"]=Qp;Qp.__name__="scripts.ActorEvents_40";Qp.__super__=T;Qp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Qp});var Rp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_70"]=Rp;Rp.__name__="scripts.ActorEvents_70";Rp.__super__=T;Rp.prototype=u(T.prototype,{init:function(){},forwardMessage:function(a){},__class__:Rp});var Sp=function(a,b,c){T.call(this,b)};k["scripts.ActorEvents_72"]=Sp;Sp.__name__="scripts.ActorEvents_72";
Sp.__super__=T;Sp.prototype=u(T.prototype,{_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(q.engine.gameAttributes.h.showshow=!0,n.runLater(5E3,function(a){q.engine.gameAttributes.h.showshow=!1},this.actor))},_event_Drawing:function(a,b,c){this.wrapper.enabled&&1==q.engine.getGameAttribute("showshow")&&(a.drawString("Kill all enemies and",-40,-30),a.drawString("boss level immediately",-40,
-20))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));this.addListener(this.actor.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Sp});var Tp=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Stompable Group"]="_StompableGroup";this._StompableGroup=n.getActorGroup(3);this.nameMap.h["Jump Key"]="_JumpKey"};k["scripts.Design_0_0_StomponEnemies"]=Tp;Tp.__name__="scripts.Design_0_0_StomponEnemies";Tp.__super__=
T;Tp.prototype=u(T.prototype,{_StompableGroup:null,_JumpKey:null,_event_ActorAny:function(a){this.wrapper.enabled&&a.thisCollidedWithActor&&a.thisFromBottom&&this.internalGetGroup(a.otherActor,a.otherShape,a)==this._StompableGroup&&!n.asBoolean(this.actor.getLastCollidedActor().getActorValue("_BeingStomped"))&&(this.actor.getLastCollidedActor().say("Stompable","_customEvent_stomped"),n.isKeyDown(this._JumpKey)?this.actor.setYVelocity(-n.asNumber(U.__cast(this.actor.getLastCollidedActor().behaviors.getBehavior("Stompable"),
lk)._PushPlayerJumpForce)):this.actor.setYVelocity(-n.asNumber(U.__cast(this.actor.getLastCollidedActor().behaviors.getBehavior("Stompable"),lk)._PushPlayerForce)))},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:Tp});var Up=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Hide Sprite"]="_HideSprite";this._HideSprite=!0;this.nameMap.h.Font="_Font";this.nameMap.h["Line Width"]="_LineWidth";this._LineWidth=
0;this.nameMap.h["Line Height"]="_LineHeight";this._LineHeight=0;this.nameMap.h.Text="_Text";this._Text="Replace Me";this.nameMap.h["Wrapped Lines"]="_WrappedLines";this.nameMap.h["Wrap Long Lines"]="_WrapLongLines";this._WrapLongLines=!0;this.nameMap.h["Current Line"]="_CurrentLine";this._CurrentLine=0;this.nameMap.h.Update="_Update";this._Update=!1;this.nameMap.h.X="_XVar";this._XVar=0;this.nameMap.h["Mouse Over"]="_MouseOver";this._MouseOver=!1;this.nameMap.h["Anchor to Screen"]="_AnchortoScreen";
this._AnchortoScreen=!0;this.nameMap.h["Horizontal Alignment"]="_HorizontalAlignment";this._HorizontalAlignment="";this.nameMap.h["Label Width"]="_LabelWidth";this._LabelWidth=128;this.nameMap.h["Text Width"]="_TextWidth";this._TextWidth=0;this.nameMap.h["Vertical Alignment"]="_VerticalAlignment";this._VerticalAlignment="";this.nameMap.h["Label Height"]="_LabelHeight";this._LabelHeight=32;this.nameMap.h.Y="_YVar";this._YVar=0;this.nameMap.h["Text Height"]="_TextHeight";this._TextHeight=0;this.nameMap.h.Lines=
"_Lines";this.nameMap.h.Line="_Line";this._Line="";this.nameMap.h["Use Newline Characters"]="_UseNewlineCharacters";this._UseNewlineCharacters=!0;this.nameMap.h.Visible="_Visible";this._Visible=!1};k["scripts.Design_139_139_Label"]=Up;Up.__name__="scripts.Design_139_139_Label";Up.__super__=T;Up.prototype=u(T.prototype,{_HideSprite:null,_Font:null,_LineWidth:null,_LineHeight:null,_Text:null,_WrappedLines:null,_WrapLongLines:null,_CurrentLine:null,_Update:null,_XVar:null,_MouseOver:null,_AnchortoScreen:null,
_HorizontalAlignment:null,_LabelWidth:null,_TextWidth:null,_VerticalAlignment:null,_LabelHeight:null,_YVar:null,_TextHeight:null,_Lines:null,_Line:null,_UseNewlineCharacters:null,_Visible:null,_event_Drawing:function(a,b,c){if(this.wrapper.enabled&&this._Visible){a.setFont(this._Font);if(this._Update&&(this._Update=!1,this._UseNewlineCharacters?this._Lines=this._Text.split("\\n"):(this._Lines=[],this._Lines.push(this._Text)),this._WrapLongLines)){this._WrappedLines=[];b=0;for(c=this._Lines.length;b<
c;){var d=b++;this._WrappedLines.push("");this._CurrentLine=this._WrappedLines.length-1;var e=0;for(d=U.__cast((""+A.string(this._Lines[d])).split(" "),Array);e<d.length;){var f=d[e];++e;""==this._WrappedLines[this._CurrentLine|0]?this._WrappedLines[this._CurrentLine|0]=f:a.font.getTextWidth(""+A.string(this._WrappedLines[this._CurrentLine|0])+(" "+A.string(f)))/q.SCALE<=this._LabelWidth?this._WrappedLines[this._CurrentLine|0]=""+A.string(this._WrappedLines[this._CurrentLine|0])+(" "+A.string(f)):
(this._WrappedLines.push(f),this._CurrentLine+=1)}}this._Lines=this._WrappedLines}this._TextHeight=this._Lines.length*a.font.getHeight()/q.SCALE;this._TextWidth=0;this._MouseOver=!1;b=0;for(c=this._Lines.length;b<c;)d=b++,this._Line=""+A.string(this._Lines[d]),this._LineWidth=a.font.getTextWidth(this._Line)/q.SCALE,this._LineHeight=a.font.getHeight()/q.SCALE,this._LineWidth>this._TextWidth&&(this._TextWidth=this._LineWidth),"Left"==this._HorizontalAlignment?this._XVar=0:"Center"==this._HorizontalAlignment?
this._XVar=(this._LabelWidth-this._LineWidth)/2:"Right"==this._HorizontalAlignment&&(this._XVar=this._LabelWidth-this._LineWidth),"Top"==this._VerticalAlignment?this._YVar=0:"Middle"==this._VerticalAlignment?this._YVar=(this._LabelHeight-this._TextHeight)/2:"Bottom"==this._VerticalAlignment&&(this._YVar=this._LabelHeight-this._TextHeight),this._YVar+=this._LineHeight*d,a.drawString(this._Line,this._XVar,this._YVar),n.getMouseX()>=this.actor.getScreenX()+this._XVar&&n.getMouseX()<this.actor.getScreenX()+
(this._XVar+this._LineWidth)&&n.getMouseY()>=this.actor.getScreenY()+this._YVar&&n.getMouseY()<this.actor.getScreenY()+(this._YVar+this._LineHeight)&&(this._MouseOver=!0),n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&(a.strokeSize=1,a.drawRect(this._XVar,this._YVar,this._LineWidth,this._LineHeight));n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&(a.strokeColor=n.getValueForScene("Game Debugger",
"_CustomColor"),a.strokeSize=n.asNumber(n.getValueForScene("Game Debugger","_StrokeThickness"))|0,a.moveTo(0,0),a.drawRect(0,0,this._LabelWidth,this._LabelHeight))}},_customBlock_SetLabelText:function(a){this._Text=a;this._Update=!0},_customBlock_SetLabelFont:function(a){this._Font=a;this._Update=!0},_customBlock_SetLabelAlignmentLeft:function(){this._HorizontalAlignment="Left"},_customBlock_SetLabelAlignmentCenter:function(){this._HorizontalAlignment="Center"},_customBlock_SetLabelAlignmentRight:function(){this._HorizontalAlignment=
"Right"},_customBlock_SetLabelAlignmentTop:function(){this._VerticalAlignment="Top"},_customBlock_SetLabelAlignmentMiddle:function(){this._VerticalAlignment="Middle"},_customBlock_SetLabelAlignmentBottom:function(){this._VerticalAlignment="Bottom"},_customBlock_SetLabelWidth:function(a){this._LabelWidth=a;this._Update=!0},_customBlock_SetLabelHeight:function(a){this._LabelHeight=a;this._Update=!0},_customBlock_HideLabel:function(){this._Visible=!1},_customBlock_ShowLabel:function(){this._Visible=
!0},_customBlock_MouseOverText:function(){return this._MouseOver},_customBlock_MouseOverLabel:function(){return n.getMouseX()>=this.actor.getScreenX()&&n.getMouseX()<this.actor.getScreenX()+this._LabelWidth?n.getMouseY()>=this.actor.getScreenY()?n.getMouseY()<this.actor.getScreenY()+this._LabelHeight:!1:!1},init:function(){this._AnchortoScreen&&this.actor.anchorToScreen();this._HideSprite&&this.actor.disableActorDrawing();this._Update=this._Visible=!0;this.addListener(this.actor.whenDrawing,r(this,
this._event_Drawing))},forwardMessage:function(a){},__class__:Up});var Vp=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Minimum Moving Time"]="_MinimumMovingTime";this._MinimumMovingTime=1;this.nameMap.h["Maximum Moving Time"]="_MaximumMovingTime";this._MaximumMovingTime=2;this.nameMap.h["Minimum Waiting Time"]="_MinimumWaitingTime";this._MinimumWaitingTime=1;this.nameMap.h["Maximum Waiting Time"]="_MaximumWaitingTime";this._MaximumWaitingTime=2;this.nameMap.h["Start with Waiting"]=
"_StartwithWaiting";this._StartwithWaiting=!0;this.nameMap.h["Maximum Speed"]="_MaximumSpeed";this._MaximumSpeed=10;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h.Move="_Move";this._Move=!1;this.nameMap.h["Minimum Speed"]="_MinimumSpeed";this._MinimumSpeed=5;this.nameMap.h["Change Direction when Colliding"]="_ChangeDirectionwhenColliding";this._ChangeDirectionwhenColliding=!0;this.nameMap.h["Speed X"]="_SpeedX";this._SpeedX=0;this.nameMap.h["Speed Y"]="_SpeedY";this._SpeedY=0};k["scripts.Design_140_140_Wander"]=
Vp;Vp.__name__="scripts.Design_140_140_Wander";Vp.__super__=T;Vp.prototype=u(T.prototype,{_MinimumMovingTime:null,_MaximumMovingTime:null,_MinimumWaitingTime:null,_MaximumWaitingTime:null,_StartwithWaiting:null,_MaximumSpeed:null,_Wait:null,_Move:null,_MinimumSpeed:null,_ChangeDirectionwhenColliding:null,_SpeedX:null,_SpeedY:null,_event_Updated:function(a){var b=this;this.wrapper.enabled&&(this._Wait&&(this._Wait=!1,n.runLater(1E3*(this._MinimumWaitingTime+n.randomFloat()*(this._MaximumWaitingTime-
this._MinimumWaitingTime)),function(a){b._Move=!0},this.actor),this.actor.setVelocity(0,0),this._SpeedY=this._SpeedX=0),this._Move&&(this._Move=!1,n.runLater(1E3*(this._MinimumMovingTime+n.randomFloat()*(this._MaximumMovingTime-this._MinimumMovingTime)),function(a){b._Wait=!0},this.actor),this.actor.setVelocity(n.randomInt(-180,180),n.randomInt(this._MinimumSpeed|0,this._MaximumSpeed|0)),this._SpeedX=this.actor.getXVelocity(),this._SpeedY=this.actor.getYVelocity()))},_event_ActorAny:function(a){this.wrapper.enabled&&
this._ChangeDirectionwhenColliding&&((a.thisFromLeft||a.thisFromRight)&&this.actor.setXVelocity(-this._SpeedX),(a.thisFromTop||a.thisFromBottom)&&this.actor.setYVelocity(-this._SpeedY))},init:function(){this._Wait=this._StartwithWaiting;this._Move=!this._StartwithWaiting;this.addListener(this.actor.whenUpdated,r(this,this._event_Updated));this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:Vp});var Wp=function(a,b,c){T.call(this,b);this.nameMap.h.Actor=
"actor";this.nameMap.h["Minimum Moving Time"]="_MinimumMovingTime";this._MinimumMovingTime=1;this.nameMap.h["Maximum Moving Time"]="_MaximumMovingTime";this._MaximumMovingTime=2;this.nameMap.h["Minimum Waiting Time"]="_MinimumWaitingTime";this._MinimumWaitingTime=1;this.nameMap.h["Maximum Waiting Time"]="_MaximumWaitingTime";this._MaximumWaitingTime=2;this.nameMap.h["Start with Waiting"]="_StartwithWaiting";this._StartwithWaiting=!0;this.nameMap.h["Maximum Speed"]="_MaximumSpeed";this._MaximumSpeed=
10;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h.Move="_Move";this._Move=!1;this.nameMap.h["Minimum Speed"]="_MinimumSpeed";this._MinimumSpeed=5;this.nameMap.h["Change Direction when Colliding"]="_ChangeDirectionwhenColliding";this._ChangeDirectionwhenColliding=!0;this.nameMap.h["Speed X"]="_SpeedX";this._SpeedX=0;this.nameMap.h["Speed Y"]="_SpeedY";this._SpeedY=0};k["scripts.Design_141_141_Wander"]=Wp;Wp.__name__="scripts.Design_141_141_Wander";Wp.__super__=T;Wp.prototype=u(T.prototype,
{_MinimumMovingTime:null,_MaximumMovingTime:null,_MinimumWaitingTime:null,_MaximumWaitingTime:null,_StartwithWaiting:null,_MaximumSpeed:null,_Wait:null,_Move:null,_MinimumSpeed:null,_ChangeDirectionwhenColliding:null,_SpeedX:null,_SpeedY:null,_event_Updated:function(a){var b=this;this.wrapper.enabled&&(this._Wait&&(this._Wait=!1,n.runLater(1E3*(this._MinimumWaitingTime+n.randomFloat()*(this._MaximumWaitingTime-this._MinimumWaitingTime)),function(a){b._Move=!0},this.actor),this.actor.setVelocity(0,
0),this._SpeedY=this._SpeedX=0),this._Move&&(this._Move=!1,n.runLater(1E3*(this._MinimumMovingTime+n.randomFloat()*(this._MaximumMovingTime-this._MinimumMovingTime)),function(a){b._Wait=!0},this.actor),this.actor.setVelocity(n.randomInt(-180,180),n.randomInt(this._MinimumSpeed|0,this._MaximumSpeed|0)),this._SpeedX=this.actor.getXVelocity(),this._SpeedY=this.actor.getYVelocity()))},_event_ActorAny:function(a){this.wrapper.enabled&&this._ChangeDirectionwhenColliding&&((a.thisFromLeft||a.thisFromRight)&&
this.actor.setXVelocity(-this._SpeedX),(a.thisFromTop||a.thisFromBottom)&&this.actor.setYVelocity(-this._SpeedY))},init:function(){this._Wait=this._StartwithWaiting;this._Move=!this._StartwithWaiting;this.addListener(this.actor.whenUpdated,r(this,this._event_Updated));this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:Wp});var Xp=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Direction Mode"]="_DirectionMode";
this._DirectionMode="";this.nameMap.h["Bullet Speed"]="_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]=
"_LimitBulletsAlive";this._LimitBulletsAlive=!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=1;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire="_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]="_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]="_CurrentAmmunition";this._CurrentAmmunition=
5;this.nameMap.h["Use Ammunition"]="_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations="";this.nameMap.h["Left Animations"]="_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations=""};k["scripts.Design_145_145_FireBullet"]=Xp;Xp.__name__="scripts.Design_145_145_FireBullet";Xp.__super__=T;Xp.prototype=u(T.prototype,
{_DirectionMode:null,_BulletSpeed:null,_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,_BulletsAlive:null,_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_UpAnimations:null,_DownAnimations:null,_LeftAnimations:null,_RightAnimations:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&
(this._UsetheMouse&&n.runPeriodically(2E3,function(a){b._Fire=!0},this.actor),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}this._Wait||this._UseAmmunition&&
!(0<this._CurrentAmmunition)||(this._Wait=!0,n.runLater(1/this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),n.createRecycledActor(this._BulletType,0,0,0),"Based on Animations"==this._DirectionMode?""!=this._UpAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._UpAnimations)?this._FireDirection=-90:""!=this._DownAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._DownAnimations)?this._FireDirection=90:""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?
this._FireDirection=180:""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&(this._FireDirection=0):"Absolute"==this._DirectionMode?this._FireDirection=this._Direction:"Relative"==this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-n.getLastCreatedActor().getWidth()/2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),
n.getLastCreatedActor().setY(this.actor.getYCenter()-n.getLastCreatedActor().getHeight()/2+this._Offset*Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,this._BulletSpeed),n.getLastCreatedActor().setActorValue("FireBullet_Creator",this.actor))}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},
forwardMessage:function(a){},__class__:Xp});var Yp=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Move Right Key"]="_MoveRightKey";this.nameMap.h["Move Left Key"]="_MoveLeftKey";this.nameMap.h.Acceleration="_Acceleration";this._Acceleration=85;this.nameMap.h["Max Walking Speed"]="_MaxWalkingSpeed";this._MaxWalkingSpeed=20;this.nameMap.h["Limit Speed?"]="_LimitSpeed";this._LimitSpeed=!1;this.nameMap.h["Walk Right Animation"]="_WalkRightAnimation";this._WalkRightAnimation=
"";this.nameMap.h["Walk Left Animation"]="_WalkLeftAnimation";this._WalkLeftAnimation="";this.nameMap.h["Idle Right Animation"]="_IdleRightAnimation";this._IdleRightAnimation="";this.nameMap.h["Idle Left Animation"]="_IdleLeftAnimation";this._IdleLeftAnimation="";this.nameMap.h["Prevent Walking?"]="_PreventWalking";this._PreventWalking=!1;this.nameMap.h["Disable Statuses"]="_DisableStatuses";this.nameMap.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Walking";this.nameMap.h.Jump=
"_Jump";this.nameMap.h.jump="_jump";this._jump=!1;this.nameMap.h.jumping="_jumping";this._jumping=!1;this.nameMap.h["jump higher"]="_jumphigher";this.nameMap.h["Jump higher"]="_Jumphigher";this._Jumphigher=!1;this.nameMap.h["was jump"]="_wasjump";this._wasjump=!1;this.nameMap.h["on ground"]="_onground";this._onground=!1;this.nameMap.h["Variable Jump"]="_VariableJump";this._VariableJump=!1;this.nameMap.h.walk="_walk";this.nameMap.h["walk speed"]="_walkspeed";this._walkspeed=!1};k["scripts.Design_145_145_Walking"]=
Yp;Yp.__name__="scripts.Design_145_145_Walking";Yp.__super__=T;Yp.prototype=u(T.prototype,{_MoveRightKey:null,_MoveLeftKey:null,_Acceleration:null,_MaxWalkingSpeed:null,_LimitSpeed:null,_WalkRightAnimation:null,_WalkLeftAnimation:null,_IdleRightAnimation:null,_IdleLeftAnimation:null,_PreventWalking:null,_DisableStatuses:null,_AnimationCategory:null,_Jump:null,_jump:null,_jumping:null,_jumphigher:null,_Jumphigher:null,_wasjump:null,_onground:null,_VariableJump:null,_walk:null,_walkspeed:null,_event_Updating:function(a){this.wrapper.enabled&&
(n.isKeyDown(this._MoveRightKey)?(this.actor.setXVelocity(q.engine.getGameAttribute("walk")),this.actor.setActorValue("Facing Right?",!0),this.actor.setAnimation(this._WalkRightAnimation)):n.isKeyDown(this._MoveLeftKey)?(this.actor.setXVelocity(-q.engine.getGameAttribute("walk")),this.actor.setActorValue("Facing Right?",!1),this.actor.setAnimation(this._WalkLeftAnimation)):(this.actor.setXVelocity(0),1==this.actor.getActorValue("Facing Right?")?this.actor.setAnimation(this._IdleRightAnimation):this.actor.setAnimation(this._IdleLeftAnimation)))},
_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(188);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(b=q.engine,c=q.engine.getGameAttribute("walk")+10,b.gameAttributes.h.walk=c)},_event_ActorAny:function(a){this.wrapper.enabled&&(a.thisFromBottom&&!a.thisCollidedWithSensor&&(this._onground=!0),this._onground&&this._wasjump&&(this._jumping=!1))},_customEvent_Jump:function(){this._Jumphigher=this._jump=!0},_customEvent_:function(){},init:function(){q.engine.gameAttributes.h.walk=
15;this.addListener(this.actor.whenUpdated,r(this,this._event_Updating));this.addListener(this.actor.whenCollided,r(this,this._event_ActorType));this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:Yp});var Zp=function(a,b){n.call(this);this.nameMap.h.Region="_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";
this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]="_SwitchControl";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_147_147_SwitchSceneonEnterRegion"]=Zp;Zp.__name__="scripts.Design_147_147_SwitchSceneonEnterRegion";Zp.__super__=sb;Zp.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,
_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Updated:function(a){this.wrapper.enabled&&(this._InRegion=!1,n.hasValue(this._Actor)&&this._Actor.isAlive()&&n.hasValue(this._Region)&&n.hasValue(this._NextScene)&&!n.isTransitioning()&&n.isInRegion(this._Actor,this._Region)&&(this._OnlySwitchOnKeyPress?this._InRegion=!0:this._customEvent_SwitchScene()))},_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&
!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&
(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=
0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),
null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenUpdated,r(this,this._event_Updated));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},
__class__:Zp});var $p=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["left limit"]="_leftlimit";this._leftlimit=50;this.nameMap.h["right limit"]="_rightlimit";this._rightlimit=400;this.nameMap.h.velocity="_velocity";this._velocity=5;this.nameMap.h["Initial direction is right"]="_Initialdirectionisup";this._Initialdirectionisup=!0};k["scripts.Design_14_14_Elevatormovementhorizontal"]=$p;$p.__name__="scripts.Design_14_14_Elevatormovementhorizontal";$p.__super__=T;$p.prototype=
u(T.prototype,{_leftlimit:null,_rightlimit:null,_velocity:null,_Initialdirectionisup:null,_event_Updated:function(a){this.wrapper.enabled&&(this.actor.getX()<=this._leftlimit&&this.actor.setXVelocity(this._velocity),this.actor.getX()>=this._rightlimit&&this.actor.setXVelocity(-this._velocity))},init:function(){this._Initialdirectionisup?this.actor.setXVelocity(this._velocity):this.actor.setXVelocity(-this._velocity);this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},
__class__:$p});var aq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Prevent Running?"]="_PreventRunning";this._PreventRunning=!1;this.nameMap.h["Run Key"]="_RunKey";this.nameMap.h["Key Released?"]="_KeyReleased";this._KeyReleased=!0;this.nameMap.h["Old Accel"]="_OldAccel";this._OldAccel=0;this.nameMap.h["Old Max Speed"]="_OldMaxSpeed";this._OldMaxSpeed=0;this.nameMap.h["At Full Speed?"]="_AtFullSpeed";this._AtFullSpeed=!1;this.nameMap.h["Elapsed Time"]="_ElapsedTime";
this._ElapsedTime=0;this.nameMap.h.Acceleration="_Acceleration";this._Acceleration=100;this.nameMap.h["Mid Run Speed"]="_MidRunSpeed";this._MidRunSpeed=25;this.nameMap.h["Max Run Speed"]="_MaxRunSpeed";this._MaxRunSpeed=35;this.nameMap.h["Right Key"]="_RightKey";this.nameMap.h["Left Key"]="_LeftKey";this.nameMap.h["Time To Max Speed"]="_TimeToMaxSpeed";this._TimeToMaxSpeed=.4;this.nameMap.h["Can Slide?"]="_CanSlide";this._CanSlide=!0;this.nameMap.h["Run Right Animation"]="_RunRightAnimation";this._RunRightAnimation=
"";this.nameMap.h["Run Left Animation"]="_RunLeftAnimation";this._RunLeftAnimation="";this.nameMap.h["Slip Right Animation"]="_SlipRightAnimation";this._SlipRightAnimation="";this.nameMap.h["Slip Left Animation"]="_SlipLeftAnimation";this._SlipLeftAnimation="";this.nameMap.h["Full Run Right Animation"]="_FullRunRightAnimation";this._FullRunRightAnimation="";this.nameMap.h["Full Run Left Animation"]="_FullRunLeftAnimation";this._FullRunLeftAnimation="";this.nameMap.h["Animation Category"]="_AnimationCategory";
this._AnimationCategory="Running"};k["scripts.Design_151_151_Running"]=aq;aq.__name__="scripts.Design_151_151_Running";aq.__super__=T;aq.prototype=u(T.prototype,{_PreventRunning:null,_RunKey:null,_KeyReleased:null,_OldAccel:null,_OldMaxSpeed:null,_AtFullSpeed:null,_ElapsedTime:null,_Acceleration:null,_MidRunSpeed:null,_MaxRunSpeed:null,_RightKey:null,_LeftKey:null,_TimeToMaxSpeed:null,_CanSlide:null,_RunRightAnimation:null,_RunLeftAnimation:null,_SlipRightAnimation:null,_SlipLeftAnimation:null,_FullRunRightAnimation:null,
_FullRunLeftAnimation:null,_AnimationCategory:null,init:function(){this._KeyReleased=!0},forwardMessage:function(a){},__class__:aq});var bq=function(a,b){n.call(this);this.nameMap.h.Region="_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]="_SwitchControl";this.nameMap.h["Out Time"]=
"_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_153_153_SwitchSceneonEnterRegion"]=bq;bq.__name__="scripts.Design_153_153_SwitchSceneonEnterRegion";bq.__super__=sb;bq.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Updated:function(a){this.wrapper.enabled&&
(this._InRegion=!1,n.hasValue(this._Actor)&&this._Actor.isAlive()&&n.hasValue(this._Region)&&n.hasValue(this._NextScene)&&!n.isTransitioning()&&n.isInRegion(this._Actor,this._Region)&&(this._OnlySwitchOnKeyPress?this._InRegion=!0:this._customEvent_SwitchScene()))},_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),
b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):
"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,
e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?
n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenUpdated,r(this,this._event_Updated));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:bq});var cq=function(a,b){n.call(this);this.nameMap.h.Region=
"_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]="_SwitchControl";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_154_154_SwitchSceneonEnterRegion"]=
cq;cq.__name__="scripts.Design_154_154_SwitchSceneonEnterRegion";cq.__super__=sb;cq.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Updated:function(a){this.wrapper.enabled&&(this._InRegion=!1,n.hasValue(this._Actor)&&this._Actor.isAlive()&&n.hasValue(this._Region)&&n.hasValue(this._NextScene)&&!n.isTransitioning()&&n.isInRegion(this._Actor,this._Region)&&(this._OnlySwitchOnKeyPress?
this._InRegion=!0:this._customEvent_SwitchScene()))},_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,
b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==
b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<
16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):
"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenUpdated,
r(this,this._event_Updated));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:cq});var dq=function(a,b){n.call(this);this.nameMap.h.Region="_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]=
"_SwitchControl";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_156_156_SwitchSceneonEnterRegion"]=dq;dq.__name__="scripts.Design_156_156_SwitchSceneonEnterRegion";dq.__super__=sb;dq.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,
_event_Updated:function(a){this.wrapper.enabled&&(this._InRegion=!1,n.hasValue(this._Actor)&&this._Actor.isAlive()&&n.hasValue(this._Region)&&n.hasValue(this._NextScene)&&!n.isTransitioning()&&n.isInRegion(this._Actor,this._Region)&&(this._OnlySwitchOnKeyPress?this._InRegion=!0:this._customEvent_SwitchScene()))},_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==
this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,
e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==
this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenUpdated,r(this,this._event_Updated));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:dq});var eq=function(a,b,c){T.call(this,
b);this.nameMap.h.Actor="actor";this.nameMap.h["Target Actor"]="_TargetActor";this.nameMap.h["Distance X"]="_DistanceX";this._DistanceX=0;this.nameMap.h["Distance Y"]="_DistanceY";this._DistanceY=0;this.nameMap.h.Distance="_Distance";this._Distance=0;this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Speed="_Speed";this._Speed=30;this.nameMap.h.Margin="_Margin";this._Margin=0;this.nameMap.h.Easing="_Easing";this._Easing=!0;this.nameMap.h["Minimum Easing Speed"]="_MinimumEasingSpeed";
this._MinimumEasingSpeed=5;this.nameMap.h["Screen Diagonal"]="_ScreenDiagonal";this._ScreenDiagonal=0;this.nameMap.h["Stop when Colliding"]="_StopwhenColliding";this._StopwhenColliding=!0;this.nameMap.h.Collided="_Collided";this._Collided=!1};k["scripts.Design_158_158_FollowTarget"]=eq;eq.__name__="scripts.Design_158_158_FollowTarget";eq.__super__=T;eq.prototype=u(T.prototype,{_TargetActor:null,_DistanceX:null,_DistanceY:null,_Distance:null,_Direction:null,_Speed:null,_Margin:null,_Easing:null,_MinimumEasingSpeed:null,
_ScreenDiagonal:null,_StopwhenColliding:null,_Collided:null,_event_Updated:function(a){this.wrapper.enabled&&n.hasValue(this._TargetActor)&&this._TargetActor.isAlive()&&(this._DistanceX=this._TargetActor.getXCenter()-this.actor.getXCenter(),this._DistanceY=this._TargetActor.getYCenter()-this.actor.getYCenter(),this._Distance=Math.sqrt(Math.pow(this._DistanceX,2)+Math.pow(this._DistanceY,2)),this._Direction=57.29577951308402*Math.atan2(this._DistanceY,this._DistanceX),!(this._Distance>this._Margin)||
this._StopwhenColliding&&this._Collided?this.actor.setVelocity(0,0):this._Easing?this.actor.setVelocity(this._Direction,this._MinimumEasingSpeed+(this._Distance-this._Margin)/this._ScreenDiagonal*this._Speed):this.actor.setVelocity(this._Direction,this._Speed),this._Collided=!1)},_event_ActorActor:function(a){this.wrapper.enabled&&this._TargetActor==a.otherActor&&(this._Collided=!0)},init:function(){this._ScreenDiagonal=Math.sqrt(Math.pow(n.getScreenWidth(),2)+Math.pow(n.getScreenHeight(),2));this.addListener(this.actor.whenUpdated,
r(this,this._event_Updated));this.addListener(this.actor.whenCollided,r(this,this._event_ActorActor))},forwardMessage:function(a){},__class__:eq});var fq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Direction Mode"]="_DirectionMode";this._DirectionMode="";this.nameMap.h["Bullet Speed"]="_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;
this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]="_LimitBulletsAlive";this._LimitBulletsAlive=!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=1;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire=
"_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]="_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]="_CurrentAmmunition";this._CurrentAmmunition=5;this.nameMap.h["Use Ammunition"]="_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations=
"";this.nameMap.h["Left Animations"]="_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations=""};k["scripts.Design_162_162_FireBullet"]=fq;fq.__name__="scripts.Design_162_162_FireBullet";fq.__super__=T;fq.prototype=u(T.prototype,{_DirectionMode:null,_BulletSpeed:null,_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,_BulletsAlive:null,
_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_UpAnimations:null,_DownAnimations:null,_LeftAnimations:null,_RightAnimations:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&(this._UsetheMouse&&(this._Fire=this._Fire||n.isMouseDown()),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=
n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}this._Wait||this._UseAmmunition&&!(0<this._CurrentAmmunition)||(this._Wait=!0,n.runLater(1/this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),n.createRecycledActor(this._BulletType,0,0,0),"Based on Animations"==this._DirectionMode?""!=this._UpAnimations&&
0<=(""+this.actor.getAnimation()).indexOf(this._UpAnimations)?this._FireDirection=-90:""!=this._DownAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._DownAnimations)?this._FireDirection=90:""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?this._FireDirection=180:""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&(this._FireDirection=0):"Absolute"==this._DirectionMode?this._FireDirection=this._Direction:"Relative"==
this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-n.getLastCreatedActor().getWidth()/2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setY(this.actor.getYCenter()-n.getLastCreatedActor().getHeight()/2+this._Offset*Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,
this._BulletSpeed),n.getLastCreatedActor().setActorValue("FireBullet_Creator",this.actor))}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},__class__:fq});var gq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Direction Mode"]="_DirectionMode";this._DirectionMode="";this.nameMap.h["Bullet Speed"]=
"_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]="_LimitBulletsAlive";this._LimitBulletsAlive=
!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=1;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire="_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]="_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]="_CurrentAmmunition";this._CurrentAmmunition=5;this.nameMap.h["Use Ammunition"]=
"_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations="";this.nameMap.h["Left Animations"]="_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations=""};k["scripts.Design_163_163_FireBullet"]=gq;gq.__name__="scripts.Design_163_163_FireBullet";gq.__super__=T;gq.prototype=u(T.prototype,{_DirectionMode:null,_BulletSpeed:null,
_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,_BulletsAlive:null,_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_UpAnimations:null,_DownAnimations:null,_LeftAnimations:null,_RightAnimations:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&(this._UsetheMouse&&(this._Fire=
this._Fire||n.isMouseDown()),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}this._Wait||this._UseAmmunition&&!(0<this._CurrentAmmunition)||(this._Wait=!0,n.runLater(1/
this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),n.createRecycledActor(this._BulletType,0,0,0),"Based on Animations"==this._DirectionMode?""!=this._UpAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._UpAnimations)?this._FireDirection=-90:""!=this._DownAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._DownAnimations)?this._FireDirection=90:""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?this._FireDirection=180:
""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&(this._FireDirection=0):"Absolute"==this._DirectionMode?this._FireDirection=this._Direction:"Relative"==this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-n.getLastCreatedActor().getWidth()/2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setY(this.actor.getYCenter()-
n.getLastCreatedActor().getHeight()/2+this._Offset*Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,this._BulletSpeed),n.getLastCreatedActor().setActorValue("FireBullet_Creator",this.actor))}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},__class__:gq});
var hq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Direction Mode"]="_DirectionMode";this._DirectionMode="";this.nameMap.h["Bullet Speed"]="_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]=
"_UseControls";this._UseControls=!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]="_LimitBulletsAlive";this._LimitBulletsAlive=!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=1;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire="_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]=
"_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]="_CurrentAmmunition";this._CurrentAmmunition=5;this.nameMap.h["Use Ammunition"]="_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations="";this.nameMap.h["Left Animations"]="_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations=
""};k["scripts.Design_164_164_FireBullet"]=hq;hq.__name__="scripts.Design_164_164_FireBullet";hq.__super__=T;hq.prototype=u(T.prototype,{_DirectionMode:null,_BulletSpeed:null,_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,_BulletsAlive:null,_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_UpAnimations:null,_DownAnimations:null,
_LeftAnimations:null,_RightAnimations:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&(this._UsetheMouse&&(this._Fire=this._Fire||n.isMouseDown()),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&
(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}this._Wait||this._UseAmmunition&&!(0<this._CurrentAmmunition)||(this._Wait=!0,n.runLater(1/this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),n.createRecycledActor(this._BulletType,0,0,0),"Based on Animations"==this._DirectionMode?""!=this._UpAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._UpAnimations)?this._FireDirection=-90:""!=this._DownAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._DownAnimations)?
this._FireDirection=90:""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?this._FireDirection=180:""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&(this._FireDirection=0):"Absolute"==this._DirectionMode?this._FireDirection=this._Direction:"Relative"==this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-
n.getLastCreatedActor().getWidth()/2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setY(this.actor.getYCenter()-n.getLastCreatedActor().getHeight()/2+this._Offset*Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,this._BulletSpeed),n.getLastCreatedActor().setActorValue("FireBullet_Creator",this.actor))}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=
this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},__class__:hq});var iq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Add To Score"]="_AddToScore";this._AddToScore=0;this.nameMap.h["Valid Actor Groups"]="_ValidActorGroups";this.nameMap.h["Collected Action"]="_CollectedAction";this._CollectedAction="";this.nameMap.h["Collected Sound"]="_CollectedSound";this.nameMap.h["Respawn Delay"]=
"_RespawnDelay";this._RespawnDelay=0;this.nameMap.h["Collected?"]="_Collected";this._Collected=!1;this.nameMap.h["Item X"]="_ItemX";this._ItemX=0;this.nameMap.h["Item Y"]="_ItemY";this._ItemY=0;this.nameMap.h["Actor Type"]="_ActorType";this.nameMap.h["Max Times Respawned"]="_MaxTimesRespawned";this._MaxTimesRespawned=0;this.nameMap.h["Times Respawned"]="_TimesRespawned";this._TimesRespawned=0;this.nameMap.h["Disable Gravity?"]="_DisableGravity";this._DisableGravity=!1};k["scripts.Design_16_16_Coins2"]=
iq;iq.__name__="scripts.Design_16_16_Coins2";iq.__super__=T;iq.prototype=u(T.prototype,{_AddToScore:null,_ValidActorGroups:null,_CollectedAction:null,_CollectedSound:null,_RespawnDelay:null,_Collected:null,_ItemX:null,_ItemY:null,_ActorType:null,_MaxTimesRespawned:null,_TimesRespawned:null,_DisableGravity:null,_event_ActorAny:function(a){var b=this;this.wrapper.enabled&&!this._Collected&&a.thisCollidedWithActor&&(0==this._ValidActorGroups.length||W.contains(this._ValidActorGroups,this.internalGetGroup(a.otherActor,
a.otherShape,a)))&&(this._Collected=!0,n.hasValue(this._CollectedSound)&&(n.playSound(this._CollectedSound),"Kill"==this._CollectedAction?n.recycleActor(this.actor):"Recycle"==this._CollectedAction?n.recycleActor(this.actor):0<this._MaxTimesRespawned&&this._TimesRespawned>=this._MaxTimesRespawned?n.recycleActor(this.actor):(this.actor.disableActorDrawing(),n.runLater(1E3*this._RespawnDelay,function(a){b.actor.isAlive()&&(b.actor.setX(b._ItemX),b.actor.setY(b._ItemY),b.actor.enableActorDrawing(),b._Collected=
!1,b._TimesRespawned+=1)},this.actor))))},init:function(){this._DisableGravity&&this.actor.setIgnoreGravity(!0);this._ItemX=this.actor.getX();this._ItemY=this.actor.getY();this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:iq});var jq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Target Actor"]="_TargetActor";this.nameMap.h["Distance X"]="_DistanceX";this._DistanceX=0;this.nameMap.h["Distance Y"]="_DistanceY";
this._DistanceY=0;this.nameMap.h.Distance="_Distance";this._Distance=0;this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Speed="_Speed";this._Speed=30;this.nameMap.h.Margin="_Margin";this._Margin=0;this.nameMap.h.Easing="_Easing";this._Easing=!0;this.nameMap.h["Minimum Easing Speed"]="_MinimumEasingSpeed";this._MinimumEasingSpeed=5;this.nameMap.h["Screen Diagonal"]="_ScreenDiagonal";this._ScreenDiagonal=0;this.nameMap.h["Stop when Colliding"]="_StopwhenColliding";this._StopwhenColliding=
!0;this.nameMap.h.Collided="_Collided";this._Collided=!1};k["scripts.Design_170_170_FollowTarget"]=jq;jq.__name__="scripts.Design_170_170_FollowTarget";jq.__super__=T;jq.prototype=u(T.prototype,{_TargetActor:null,_DistanceX:null,_DistanceY:null,_Distance:null,_Direction:null,_Speed:null,_Margin:null,_Easing:null,_MinimumEasingSpeed:null,_ScreenDiagonal:null,_StopwhenColliding:null,_Collided:null,_event_Updated:function(a){this.wrapper.enabled&&n.hasValue(this._TargetActor)&&this._TargetActor.isAlive()&&
(this._DistanceX=this._TargetActor.getXCenter()-this.actor.getXCenter(),this._DistanceY=this._TargetActor.getYCenter()-this.actor.getYCenter(),this._Distance=Math.sqrt(Math.pow(this._DistanceX,2)+Math.pow(this._DistanceY,2)),this._Direction=57.29577951308402*Math.atan2(this._DistanceY,this._DistanceX),!(this._Distance>this._Margin)||this._StopwhenColliding&&this._Collided?this.actor.setVelocity(0,0):this._Easing?this.actor.setVelocity(this._Direction,this._MinimumEasingSpeed+(this._Distance-this._Margin)/
this._ScreenDiagonal*this._Speed):this.actor.setVelocity(this._Direction,this._Speed),this._Collided=!1)},_event_ActorActor:function(a){this.wrapper.enabled&&this._TargetActor==a.otherActor&&(this._Collided=!0)},init:function(){this._ScreenDiagonal=Math.sqrt(Math.pow(n.getScreenWidth(),2)+Math.pow(n.getScreenHeight(),2));this.addListener(this.actor.whenUpdated,r(this,this._event_Updated));this.addListener(this.actor.whenCollided,r(this,this._event_ActorActor))},forwardMessage:function(a){},__class__:jq});
var kq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Bullet Speed"]="_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";
this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]="_LimitBulletsAlive";this._LimitBulletsAlive=!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=3;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire="_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]="_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]=
"_CurrentAmmunition";this._CurrentAmmunition=5;this.nameMap.h["Use Ammunition"]="_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Number of Bullets"]="_NumberofBullets";this._NumberofBullets=3;this.nameMap.h["First Direction"]="_FirstDirection";this._FirstDirection=0;this.nameMap.h["Bullet Spread"]="_BulletSpread";this._BulletSpread=30;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations="";this.nameMap.h["Left Animations"]=
"_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations="";this.nameMap.h["Direction Mode"]="_DirectionMode";this._DirectionMode=""};k["scripts.Design_171_171_FireBulletWave"]=kq;kq.__name__="scripts.Design_171_171_FireBulletWave";kq.__super__=T;kq.prototype=u(T.prototype,{_BulletSpeed:null,_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,
_BulletsAlive:null,_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_NumberofBullets:null,_FirstDirection:null,_BulletSpread:null,_UpAnimations:null,_DownAnimations:null,_LeftAnimations:null,_RightAnimations:null,_DirectionMode:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&(this._UsetheMouse&&(this._Fire=this._Fire||n.isMouseDown()),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),
this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}if(!this._Wait&&(!this._UseAmmunition||0<this._CurrentAmmunition))for(this._Wait=!0,n.runLater(1/this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),"Based on Animations"==
this._DirectionMode?""!=this._UpAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._UpAnimations)?this._FireDirection=-90:""!=this._DownAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._DownAnimations)?this._FireDirection=90:""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?this._FireDirection=180:""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&(this._FireDirection=0):"Absolute"==this._DirectionMode?
this._FireDirection=this._Direction:"Relative"==this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._FirstDirection=this._FireDirection-(this._NumberofBullets-1)/2*this._BulletSpread,a=0,c=this._NumberofBullets|0;a<c;)d=a++,n.createRecycledActor(this._BulletType,0,0,0),this._FireDirection=this._FirstDirection+d*this._BulletSpread,this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-n.getLastCreatedActor().getWidth()/
2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setY(this.actor.getYCenter()-n.getLastCreatedActor().getHeight()/2+this._Offset*Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,this._BulletSpeed),this.actor.setActorValue("FireBullet_Creator",this.actor)}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,
r(this,this._event_Updated))},forwardMessage:function(a){},__class__:kq});var lq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["X Offset"]="_XOffset";this._XOffset=0;this.nameMap.h["Y Offset"]="_YOffset";this._YOffset=0};k["scripts.Design_175_175_CameraFollowPlayer"]=lq;lq.__name__="scripts.Design_175_175_CameraFollowPlayer";lq.__super__=T;lq.prototype=u(T.prototype,{_XOffset:null,_YOffset:null,_event_Updating:function(a){this.wrapper.enabled&&n.engine.moveCamera(this.actor.getXCenter()+
this._XOffset,this.actor.getYCenter()+this._YOffset)},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updating))},forwardMessage:function(a){},__class__:lq});var lk=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Stomped Animation"]="_StompedAnimation";this._StompedAnimation="";this.nameMap.h["Stomped Sound"]="_StompedSound";this.nameMap.h.opacity="_opacity";this._opacity=0;this.nameMap.h["Push Player Jump Force"]="_PushPlayerJumpForce";this._PushPlayerJumpForce=
35;this.nameMap.h["Push Player Force"]="_PushPlayerForce";this._PushPlayerForce=15};k["scripts.Design_1_1_Stompable"]=lk;lk.__name__="scripts.Design_1_1_Stompable";lk.__super__=T;lk.prototype=u(T.prototype,{_StompedAnimation:null,_StompedSound:null,_opacity:null,_PushPlayerJumpForce:null,_PushPlayerForce:null,_customEvent_stomped:function(){var a=this;n.asBoolean(this.actor.getActorValue("_BeingStomped"))||(this.actor.setActorValue("_BeingStomped",!0),n.playSound(this._StompedSound),this.actor.setAnimation(this._StompedAnimation),
this.actor.shout("_customEvent_Stop"),this.actor.setActorValue("_DisallowMovement",!0),n.runLater(200,function(b){n.recycleActor(a.actor)},this.actor))},init:function(){this.actor.setActorValue("_BeingStomped",!1);this.actor.setActorValue("_DisallowMovement",!1)},forwardMessage:function(a){},__class__:lk});var mq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Actor Type"]="_ActorType"};k["scripts.Design_30_30_DieOnCollisionWithActorType"]=mq;mq.__name__="scripts.Design_30_30_DieOnCollisionWithActorType";
mq.__super__=T;mq.prototype=u(T.prototype,{_ActorType:null,_event_Collision:function(a){if(this.wrapper.enabled){var b=this._ActorType;var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&(n.recycleActor(this.actor),b=q.engine,c=q.engine.getGameAttribute("se score")+1,b.gameAttributes.h["se score"]=c)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_Collision))},forwardMessage:function(a){},__class__:mq});var nq=function(a,b,c){T.call(this,b);
this.nameMap.h.Actor="actor"};k["scripts.Design_43_43_DieOnCollision"]=nq;nq.__name__="scripts.Design_43_43_DieOnCollision";nq.__super__=T;nq.prototype=u(T.prototype,{_event_Collision:function(a){this.wrapper.enabled&&n.recycleActor(this.actor)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_Collision))},forwardMessage:function(a){},__class__:nq});var oq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Actor Type"]="_ActorType"};k["scripts.Design_44_44_DieOnCollisionWithActorType"]=
oq;oq.__name__="scripts.Design_44_44_DieOnCollisionWithActorType";oq.__super__=T;oq.prototype=u(T.prototype,{_ActorType:null,_event_Collision:function(a){if(this.wrapper.enabled){var b=this._ActorType;var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_Collision))},forwardMessage:function(a){},__class__:oq});var pq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor=
"actor";this.nameMap.h.Group="_Group"};k["scripts.Design_45_45_DieOnCollisionWithGroup"]=pq;pq.__name__="scripts.Design_45_45_DieOnCollisionWithGroup";pq.__super__=T;pq.prototype=u(T.prototype,{_Group:null,_event_Collision:function(a){if(this.wrapper.enabled){var b=this._Group;var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.recycleActor(this.actor)},init:function(){this.addListener(this.actor.whenCollided,r(this,this._event_Collision))},forwardMessage:function(a){},
__class__:pq});var qq=function(a,b){n.call(this);this.nameMap.h.Region="_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]="_SwitchControl";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";
this._TransitionStyle=""};k["scripts.Design_47_47_SwitchSceneonEnterRegion"]=qq;qq.__name__="scripts.Design_47_47_SwitchSceneonEnterRegion";qq.__super__=sb;qq.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&
!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&
(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=
0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),
null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:qq});var rq=function(a,b,c){T.call(this,
b);this.nameMap.h.Actor="actor";this.nameMap.h["Direction Mode"]="_DirectionMode";this._DirectionMode="";this.nameMap.h["Bullet Speed"]="_BulletSpeed";this._BulletSpeed=50;this.nameMap.h["Bullet Type"]="_BulletType";this.nameMap.h.Direction="_Direction";this._Direction=0;this.nameMap.h.Offset="_Offset";this._Offset=0;this.nameMap.h["Fire Control"]="_FireControl";this.nameMap.h["Fire Direction"]="_FireDirection";this._FireDirection=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=
!0;this.nameMap.h["Use the Mouse"]="_UsetheMouse";this._UsetheMouse=!0;this.nameMap.h["Limit Bullets Alive"]="_LimitBulletsAlive";this._LimitBulletsAlive=!1;this.nameMap.h["Maximum Bullets Alive"]="_MaximumBulletsAlive";this._MaximumBulletsAlive=1;this.nameMap.h["Bullets Alive"]="_BulletsAlive";this._BulletsAlive=0;this.nameMap.h.Fire="_Fire";this._Fire=!1;this.nameMap.h.Wait="_Wait";this._Wait=!1;this.nameMap.h["Rate Of Fire"]="_RateOfFire";this._RateOfFire=3;this.nameMap.h["Maximum Ammunition"]=
"_MaximumAmmunition";this._MaximumAmmunition=5;this.nameMap.h["Current Ammunition"]="_CurrentAmmunition";this._CurrentAmmunition=5;this.nameMap.h["Use Ammunition"]="_UseAmmunition";this._UseAmmunition=!1;this.nameMap.h["Up Animations"]="_UpAnimations";this._UpAnimations="";this.nameMap.h["Down Animations"]="_DownAnimations";this._DownAnimations="";this.nameMap.h["Left Animations"]="_LeftAnimations";this._LeftAnimations="";this.nameMap.h["Right Animations"]="_RightAnimations";this._RightAnimations=
""};k["scripts.Design_49_49_FireBullet"]=rq;rq.__name__="scripts.Design_49_49_FireBullet";rq.__super__=T;rq.prototype=u(T.prototype,{_DirectionMode:null,_BulletSpeed:null,_BulletType:null,_Direction:null,_Offset:null,_FireControl:null,_FireDirection:null,_UseControls:null,_UsetheMouse:null,_LimitBulletsAlive:null,_MaximumBulletsAlive:null,_BulletsAlive:null,_Fire:null,_Wait:null,_RateOfFire:null,_MaximumAmmunition:null,_CurrentAmmunition:null,_UseAmmunition:null,_UpAnimations:null,_DownAnimations:null,
_LeftAnimations:null,_RightAnimations:null,_event_Updated:function(a){var b=this;if(this.wrapper.enabled&&n.hasValue(this._BulletType)&&(this._UsetheMouse&&(this._Fire=this._Fire||n.isMouseDown()),this._UseControls&&(this._Fire=this._Fire||n.isKeyDown(this._FireControl)),this._Fire)){this._Fire=!1;if(this._LimitBulletsAlive){a=this._BulletsAlive=0;for(var c=n.getActorsOfType(this._BulletType);a<c.length;){var d=c[a];++a;if(null!=d&&!d.dead&&!d.recycled&&d.getActorValue("FireBullet_Creator")==this.actor&&
(this._BulletsAlive+=1,this._BulletsAlive>=this._MaximumBulletsAlive))return}}this._Wait||this._UseAmmunition&&!(0<this._CurrentAmmunition)||(this._Wait=!0,n.runLater(1/this._RateOfFire*1E3,function(a){b.actor.isAlive()&&(b._Wait=!1)},this.actor),n.createRecycledActor(this._BulletType,0,0,0),"Based on Animations"==this._DirectionMode?""!=this._LeftAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._LeftAnimations)?this._FireDirection=180:""!=this._RightAnimations&&0<=(""+this.actor.getAnimation()).indexOf(this._RightAnimations)&&
(this._FireDirection=0):"Absolute"==this._DirectionMode?this._FireDirection=this._Direction:"Relative"==this._DirectionMode&&(this._FireDirection=57.29577951308402*this.actor.getAngle()+this._Direction),this._UseAmmunition&&--this._CurrentAmmunition,n.getLastCreatedActor().setX(this.actor.getXCenter()-n.getLastCreatedActor().getWidth()/2+this._Offset*Math.cos(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setY(this.actor.getYCenter()-n.getLastCreatedActor().getHeight()/2+this._Offset*
Math.sin(.01745329251994278*this._FireDirection)),n.getLastCreatedActor().setVelocity(this._FireDirection,this._BulletSpeed),n.getLastCreatedActor().setActorValue("FireBullet_Creator",this.actor))}},_customEvent_FireBullet:function(){this._Fire=!0},_customEvent_Reload:function(){this._CurrentAmmunition=this._MaximumAmmunition},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},__class__:rq});var sq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor=
"actor";this.nameMap.h["Left Control"]="_LeftControl";this.nameMap.h["Right Control"]="_RightControl";this.nameMap.h.Move="_Move";this._Move=0;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["Jump Control"]="_JumpControl";this.nameMap.h.Jump="_Jump";this._Jump=!1;this.nameMap.h["Maximum Running Speed"]="_MaximumRunningSpeed";this._MaximumRunningSpeed=15;this.nameMap.h["On Ground"]="_OnGround";this._OnGround=!1;this.nameMap.h["Jumping Force"]="_JumpingForce";this._JumpingForce=
25;this.nameMap.h["Run Right Animation"]="_RunRightAnimation";this._RunRightAnimation="";this.nameMap.h["Run Left Animation"]="_RunLeftAnimation";this._RunLeftAnimation="";this.nameMap.h["Idle Right Animation"]="_IdleRightAnimation";this._IdleRightAnimation="";this.nameMap.h["Idle Left Animation"]="_IdleLeftAnimation";this._IdleLeftAnimation="";this.nameMap.h.Jumping="_Jumping";this._Jumping=!1;this.nameMap.h["Jump Right Animation"]="_JumpRightAnimation";this._JumpRightAnimation="";this.nameMap.h["Jump Left Animation"]=
"_JumpLeftAnimation";this._JumpLeftAnimation="";this.nameMap.h["Facing Left"]="_FacingLeft";this._FacingLeft=!1;this.nameMap.h["Jump Animation When Falling"]="_JumpAnimationWhenFalling";this._JumpAnimationWhenFalling=!1;this.nameMap.h["Jump Higher"]="_JumpHigher";this._JumpHigher=!1;this.nameMap.h["Was Jump"]="_WasJump";this._WasJump=!1;this.nameMap.h["Variable Jump"]="_VariableJump";this._VariableJump=!1;this.nameMap.h["Variable Jump Duration"]="_VariableJumpDuration";this._VariableJumpDuration=
.2;this.nameMap.h["Running Force"]="_RunningForce";this._RunningForce=50};k["scripts.Design_4_4_JumpandRunMovement"]=sq;sq.__name__="scripts.Design_4_4_JumpandRunMovement";sq.__super__=T;sq.prototype=u(T.prototype,{_LeftControl:null,_RightControl:null,_Move:null,_UseControls:null,_JumpControl:null,_Jump:null,_MaximumRunningSpeed:null,_OnGround:null,_JumpingForce:null,_RunRightAnimation:null,_RunLeftAnimation:null,_IdleRightAnimation:null,_IdleLeftAnimation:null,_Jumping:null,_JumpRightAnimation:null,
_JumpLeftAnimation:null,_FacingLeft:null,_JumpAnimationWhenFalling:null,_JumpHigher:null,_WasJump:null,_VariableJump:null,_VariableJumpDuration:null,_RunningForce:null,_event_Updated:function(a){var b=this;this.wrapper.enabled&&(this._UseControls&&(this._Move=n.asNumber(n.isKeyDown(this._RightControl))-n.asNumber(n.isKeyDown(this._LeftControl)),this._Jump=n.isKeyPressed(this._JumpControl)),0!=this._Move&&this.actor.push(this._Move,0,this._RunningForce),Math.abs(this.actor.getXVelocity())>this._MaximumRunningSpeed&&
this.actor.setXVelocity(Math.abs(this.actor.getXVelocity())/this.actor.getXVelocity()*this._MaximumRunningSpeed),this._Jump&&this._OnGround&&(this._Jumping=!0,this._VariableJump?(this._JumpHigher=!0,n.runLater(1E3*this._VariableJumpDuration,function(a){b._JumpHigher=!1;b._Jumping||(b._JumpHigher=!1,a.repeats=!1)},this.actor)):this.actor.applyImpulse(0,-1,this._JumpingForce)),this._JumpHigher&&n.isKeyDown(this._JumpControl)&&this.actor.applyImpulse(0,-1,this._JumpingForce/n.getStepSize()),-1==this._Move?
this._FacingLeft=!0:1==this._Move&&(this._FacingLeft=!1),this._Jumping&&0>this.actor.getYVelocity()||this._JumpAnimationWhenFalling&&!this._OnGround?this._FacingLeft?this.actor.setAnimation(this._JumpLeftAnimation):this.actor.setAnimation(this._JumpRightAnimation):0!=this._Move&&this._OnGround?this._FacingLeft?this.actor.setAnimation(this._RunLeftAnimation):this.actor.setAnimation(this._RunRightAnimation):this._FacingLeft?this.actor.setAnimation(this._IdleLeftAnimation):this.actor.setAnimation(this._IdleRightAnimation),
this._Move=0,this._WasJump=this._Jump,this._OnGround=this._Jump=!1)},_event_ActorAny:function(a){this.wrapper.enabled&&(a.thisFromBottom&&!a.thisCollidedWithSensor&&(this._OnGround=!0),this._OnGround&&!this._WasJump&&(this._Jumping=!1))},_customEvent_MoveLeft:function(){this._Move=-1},_customEvent_MoveRight:function(){this._Move=1},_customEvent_Jump:function(){this._JumpHigher=this._Jump=!0},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated));this.addListener(this.actor.whenCollided,
r(this,this._event_ActorAny))},forwardMessage:function(a){},__class__:sq});var tq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Normal Animation"]="_NormalAnimation";this._NormalAnimation="";this.nameMap.h["Pressed Animation"]="_PressedAnimation";this._PressedAnimation="";this.nameMap.h.Down="_Down";this._Down=!1;this.nameMap.h["Hover Animation"]="_HoverAnimation";this._HoverAnimation="";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]=
"_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_52_52_ReloadSceneButton"]=tq;tq.__name__="scripts.Design_52_52_ReloadSceneButton";tq.__super__=T;tq.prototype=u(T.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Down:null,_HoverAnimation:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_OnActor:function(a){this.wrapper.enabled&&3==a&&(this.actor.setAnimation(this._PressedAnimation),this._Down=!0)},_event_OnActor2:function(a){this.wrapper.enabled&&
5==a&&(this._Down&&this._customEvent_Reload(),this.actor.setAnimation(this._HoverAnimation),this._Down=!1)},_event_OnActor3:function(a){this.wrapper.enabled&&1==a&&this.actor.setAnimation(this._HoverAnimation)},_event_OnActor4:function(a){this.wrapper.enabled&&-1==a&&(this.actor.setAnimation(this._NormalAnimation),this._Down=!1)},_customEvent_Reload:function(){if(!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=0,b=0,c=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(this._OutTime,
a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(this._InTime,a<<16|b<<8|c))}else"Blinds"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),d=n.createBlindsOut(this._OutTime,a<<16|b<<8|c),c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),n.reloadCurrentScene(d,n.createBlindsIn(this._InTime,a<<16|b<<8|c))):"Bubbles"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),d=n.createBubblesOut(this._OutTime,
a<<16|b<<8|c),c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),n.reloadCurrentScene(d,n.createBubblesIn(this._InTime,a<<16|b<<8|c))):"Spotlight"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),d=n.createCircleOut(this._OutTime,a<<16|b<<8|c),c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),n.reloadCurrentScene(d,n.createCircleIn(this._InTime,a<<16|b<<8|c))):"Blur"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),d=n.createPixelizeOut(this._OutTime,
a<<16|b<<8|c),c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),n.reloadCurrentScene(d,n.createPixelizeIn(this._InTime,a<<16|b<<8|c))):"Box"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),d=n.createRectangleOut(this._OutTime,a<<16|b<<8|c),c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),n.reloadCurrentScene(d,n.createRectangleIn(this._InTime,a<<16|b<<8|c))):"Crossfade"==this._TransitionStyle?n.reloadCurrentScene(null,n.createCrossfadeTransition(this._OutTime)):
"Slide Up"==this._TransitionStyle?n.reloadCurrentScene(null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.reloadCurrentScene(null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.reloadCurrentScene(null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.reloadCurrentScene(null,n.createSlideRightTransition(this._OutTime))},init:function(){this.actor.anchorToScreen();this.addListener(this.actor.whenMousedOver,
r(this,this._event_OnActor));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor2));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor3));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor4))},forwardMessage:function(a){},__class__:tq});var uq=function(a,b){n.call(this);this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]=
"_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_53_53_SwitchSceneonClickorTouch"]=uq;uq.__name__="scripts.Design_53_53_SwitchSceneonClickorTouch";uq.__super__=sb;uq.prototype=u(sb.prototype,{_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Click:function(){this.wrapper.enabled&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),
b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):
"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,
e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?
n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenMousePressed,r(this,this._event_Click))},forwardMessage:function(a){},__class__:uq});var vq=function(a,b){n.call(this);this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]=
"_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_54_54_SwitchSceneonClickorTouch"]=vq;vq.__name__="scripts.Design_54_54_SwitchSceneonClickorTouch";vq.__super__=sb;vq.prototype=u(sb.prototype,{_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Click:function(){this.wrapper.enabled&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==
this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,
e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==
this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenMousePressed,r(this,this._event_Click))},forwardMessage:function(a){},__class__:vq});var wq=function(a,b){n.call(this);this.nameMap.h.Region="_Region";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h.Actor="_Actor";
this.nameMap.h["In Region"]="_InRegion";this._InRegion=!1;this.nameMap.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;this.nameMap.h["Switch Control"]="_SwitchControl";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_55_55_SwitchSceneonEnterRegion"]=wq;wq.__name__="scripts.Design_55_55_SwitchSceneonEnterRegion";
wq.__super__=sb;wq.prototype=u(sb.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_Updated:function(a){this.wrapper.enabled&&(this._InRegion=!1,n.hasValue(this._Actor)&&this._Actor.isAlive()&&n.hasValue(this._Region)&&n.hasValue(this._NextScene)&&!n.isTransitioning()&&n.isInRegion(this._Actor,this._Region)&&(this._OnlySwitchOnKeyPress?this._InRegion=!0:this._customEvent_SwitchScene()))},
_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&this._InRegion&&this._customEvent_SwitchScene()},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?
(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,
b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&
(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?
n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.addListener(n.engine.whenUpdated,
r(this,this._event_Updated));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent(this._SwitchControl),r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:wq});var xq=function(a,b){n.call(this);this.nameMap.h.Channel="_Channel";this._Channel=0;this.nameMap.h["Stop Channel First"]="_StopChannelFirst";this._StopChannelFirst=!0;this.nameMap.h["Music to Play"]="_MusictoPlay"};k["scripts.Design_56_56_BackgroundMusic"]=xq;xq.__name__="scripts.Design_56_56_BackgroundMusic";xq.__super__=
sb;xq.prototype=u(sb.prototype,{_Channel:null,_StopChannelFirst:null,_MusictoPlay:null,init:function(){this._StopChannelFirst&&n.stopSoundOnChannel(this._Channel|0);n.loopSoundOnChannel(n.getSound(23),this._Channel|0)},forwardMessage:function(a){},__class__:xq});var yq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Normal Animation"]="_NormalAnimation";this._NormalAnimation="";this.nameMap.h["Pressed Animation"]="_PressedAnimation";this._PressedAnimation="";this.nameMap.h.Down=
"_Down";this._Down=!1;this.nameMap.h["Hover Animation"]="_HoverAnimation";this._HoverAnimation="";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_59_59_SwitchSceneButton"]=yq;yq.__name__="scripts.Design_59_59_SwitchSceneButton";yq.__super__=T;yq.prototype=u(T.prototype,{_NormalAnimation:null,_PressedAnimation:null,
_Down:null,_HoverAnimation:null,_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_OnActor:function(a){this.wrapper.enabled&&3==a&&(this.actor.setAnimation(this._PressedAnimation),this._Down=!0)},_event_OnActor2:function(a){this.wrapper.enabled&&5==a&&(this._Down&&(this._customEvent_SwitchScene(),q.engine.gameAttributes.h.score=0),this.actor.setAnimation(this._HoverAnimation),this._Down=!1)},_event_OnActor3:function(a){this.wrapper.enabled&&1==a&&this.actor.setAnimation(this._HoverAnimation)},
_event_OnActor4:function(a){this.wrapper.enabled&&-1==a&&(this.actor.setAnimation(this._NormalAnimation),this._Down=!1)},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==
this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,
b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&
(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?
n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.actor.anchorToScreen();
this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor2));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor3));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor4))},forwardMessage:function(a){},__class__:yq});var zq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Normal Animation"]="_NormalAnimation";this._NormalAnimation="";this.nameMap.h["Pressed Animation"]=
"_PressedAnimation";this._PressedAnimation="";this.nameMap.h.Down="_Down";this._Down=!1;this.nameMap.h["Hover Animation"]="_HoverAnimation";this._HoverAnimation="";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_61_61_SwitchSceneButton"]=zq;zq.__name__="scripts.Design_61_61_SwitchSceneButton";zq.__super__=
T;zq.prototype=u(T.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Down:null,_HoverAnimation:null,_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_OnActor:function(a){this.wrapper.enabled&&3==a&&(this.actor.setAnimation(this._PressedAnimation),this._Down=!0)},_event_OnActor2:function(a){this.wrapper.enabled&&5==a&&(this._Down&&this._customEvent_SwitchScene(),this.actor.setAnimation(this._HoverAnimation),this._Down=!1)},_event_OnActor3:function(a){this.wrapper.enabled&&
1==a&&this.actor.setAnimation(this._HoverAnimation)},_event_OnActor4:function(a){this.wrapper.enabled&&-1==a&&(this.actor.setAnimation(this._NormalAnimation),this._Down=!1)},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,
e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):
"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.actor.anchorToScreen();
this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor2));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor3));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor4))},forwardMessage:function(a){},__class__:zq});var Aq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Normal Animation"]="_NormalAnimation";this._NormalAnimation="";this.nameMap.h["Pressed Animation"]=
"_PressedAnimation";this._PressedAnimation="";this.nameMap.h.Down="_Down";this._Down=!1;this.nameMap.h["Hover Animation"]="_HoverAnimation";this._HoverAnimation="";this.nameMap.h["Next Scene"]="_NextScene";this.nameMap.h["Out Time"]="_OutTime";this._OutTime=.5;this.nameMap.h["In Time"]="_InTime";this._InTime=.5;this.nameMap.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};k["scripts.Design_67_67_SwitchSceneButton"]=Aq;Aq.__name__="scripts.Design_67_67_SwitchSceneButton";Aq.__super__=
T;Aq.prototype=u(T.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Down:null,_HoverAnimation:null,_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_event_OnActor:function(a){this.wrapper.enabled&&3==a&&(this.actor.setAnimation(this._PressedAnimation),this._Down=!0)},_event_OnActor2:function(a){this.wrapper.enabled&&5==a&&(this._Down&&this._customEvent_SwitchScene(),this.actor.setAnimation(this._HoverAnimation),this._Down=!1)},_event_OnActor3:function(a){this.wrapper.enabled&&
1==a&&this.actor.setAnimation(this._HoverAnimation)},_event_OnActor4:function(a){this.wrapper.enabled&&-1==a&&(this.actor.setAnimation(this._NormalAnimation),this._Down=!1)},_customEvent_SwitchScene:function(){if(n.hasValue(this._NextScene)&&!n.isTransitioning())if("Fade"==this._TransitionStyle){var a=this._NextScene.getID(),b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(this._OutTime,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,
e,n.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBlindsOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createBubblesOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==
d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createCircleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createPixelizeOut(this._OutTime,
b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),e=n.createRectangleOut(this._OutTime,b<<16|c<<8|d),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),n.switchScene(a,e,n.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createCrossfadeTransition(this._OutTime)):
"Slide Up"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?n.switchScene(this._NextScene.getID(),null,n.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&n.switchScene(this._NextScene.getID(),null,n.createSlideRightTransition(this._OutTime))},init:function(){this.actor.anchorToScreen();
this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor2));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor3));this.addListener(this.actor.whenMousedOver,r(this,this._event_OnActor4))},forwardMessage:function(a){},__class__:Aq});var Bq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Hide Sprite"]="_HideSprite";this._HideSprite=!0;this.nameMap.h.Font="_Font";this.nameMap.h["Line Width"]=
"_LineWidth";this._LineWidth=0;this.nameMap.h["Line Height"]="_LineHeight";this._LineHeight=0;this.nameMap.h.Text="_Text";this._Text="Replace Me";this.nameMap.h["Wrapped Lines"]="_WrappedLines";this.nameMap.h["Wrap Long Lines"]="_WrapLongLines";this._WrapLongLines=!0;this.nameMap.h["Current Line"]="_CurrentLine";this._CurrentLine=0;this.nameMap.h.Update="_Update";this._Update=!1;this.nameMap.h.X="_XVar";this._XVar=0;this.nameMap.h["Mouse Over"]="_MouseOver";this._MouseOver=!1;this.nameMap.h["Anchor to Screen"]=
"_AnchortoScreen";this._AnchortoScreen=!0;this.nameMap.h["Horizontal Alignment"]="_HorizontalAlignment";this._HorizontalAlignment="";this.nameMap.h["Label Width"]="_LabelWidth";this._LabelWidth=128;this.nameMap.h["Text Width"]="_TextWidth";this._TextWidth=0;this.nameMap.h["Vertical Alignment"]="_VerticalAlignment";this._VerticalAlignment="";this.nameMap.h["Label Height"]="_LabelHeight";this._LabelHeight=32;this.nameMap.h.Y="_YVar";this._YVar=0;this.nameMap.h["Text Height"]="_TextHeight";this._TextHeight=
0;this.nameMap.h.Lines="_Lines";this.nameMap.h.Line="_Line";this._Line="";this.nameMap.h["Use Newline Characters"]="_UseNewlineCharacters";this._UseNewlineCharacters=!0;this.nameMap.h.Visible="_Visible";this._Visible=!1};k["scripts.Design_71_71_Label"]=Bq;Bq.__name__="scripts.Design_71_71_Label";Bq.__super__=T;Bq.prototype=u(T.prototype,{_HideSprite:null,_Font:null,_LineWidth:null,_LineHeight:null,_Text:null,_WrappedLines:null,_WrapLongLines:null,_CurrentLine:null,_Update:null,_XVar:null,_MouseOver:null,
_AnchortoScreen:null,_HorizontalAlignment:null,_LabelWidth:null,_TextWidth:null,_VerticalAlignment:null,_LabelHeight:null,_YVar:null,_TextHeight:null,_Lines:null,_Line:null,_UseNewlineCharacters:null,_Visible:null,_event_Drawing:function(a,b,c){if(this.wrapper.enabled&&this._Visible){a.setFont(this._Font);if(this._Update&&(this._Update=!1,this._UseNewlineCharacters?this._Lines=this._Text.split("\\n"):(this._Lines=[],this._Lines.push(this._Text)),this._WrapLongLines)){this._WrappedLines=[];b=0;for(c=
this._Lines.length;b<c;){var d=b++;this._WrappedLines.push("");this._CurrentLine=this._WrappedLines.length-1;var e=0;for(d=U.__cast((""+A.string(this._Lines[d])).split(" "),Array);e<d.length;){var f=d[e];++e;""==this._WrappedLines[this._CurrentLine|0]?this._WrappedLines[this._CurrentLine|0]=f:a.font.getTextWidth(""+A.string(this._WrappedLines[this._CurrentLine|0])+(" "+A.string(f)))/q.SCALE<=this._LabelWidth?this._WrappedLines[this._CurrentLine|0]=""+A.string(this._WrappedLines[this._CurrentLine|
0])+(" "+A.string(f)):(this._WrappedLines.push(f),this._CurrentLine+=1)}}this._Lines=this._WrappedLines}this._TextHeight=this._Lines.length*a.font.getHeight()/q.SCALE;this._TextWidth=0;this._MouseOver=!1;b=0;for(c=this._Lines.length;b<c;)d=b++,this._Line=""+A.string(this._Lines[d]),this._LineWidth=a.font.getTextWidth(this._Line)/q.SCALE,this._LineHeight=a.font.getHeight()/q.SCALE,this._LineWidth>this._TextWidth&&(this._TextWidth=this._LineWidth),"Left"==this._HorizontalAlignment?this._XVar=0:"Center"==
this._HorizontalAlignment?this._XVar=(this._LabelWidth-this._LineWidth)/2:"Right"==this._HorizontalAlignment&&(this._XVar=this._LabelWidth-this._LineWidth),"Top"==this._VerticalAlignment?this._YVar=0:"Middle"==this._VerticalAlignment?this._YVar=(this._LabelHeight-this._TextHeight)/2:"Bottom"==this._VerticalAlignment&&(this._YVar=this._LabelHeight-this._TextHeight),this._YVar+=this._LineHeight*d,a.drawString(this._Line,this._XVar,this._YVar),n.getMouseX()>=this.actor.getScreenX()+this._XVar&&n.getMouseX()<
this.actor.getScreenX()+(this._XVar+this._LineWidth)&&n.getMouseY()>=this.actor.getScreenY()+this._YVar&&n.getMouseY()<this.actor.getScreenY()+(this._YVar+this._LineHeight)&&(this._MouseOver=!0),n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&(a.strokeSize=1,a.drawRect(this._XVar,this._YVar,this._LineWidth,this._LineHeight));n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&(a.strokeColor=n.getValueForScene("Game Debugger",
"_CustomColor"),a.strokeSize=n.asNumber(n.getValueForScene("Game Debugger","_StrokeThickness"))|0,a.moveTo(0,0),a.drawRect(0,0,this._LabelWidth,this._LabelHeight))}},_customBlock_SetLabelText:function(a){this._Text=a;this._Update=!0},_customBlock_SetLabelFont:function(a){this._Font=a;this._Update=!0},_customBlock_SetLabelAlignmentLeft:function(){this._HorizontalAlignment="Left"},_customBlock_SetLabelAlignmentCenter:function(){this._HorizontalAlignment="Center"},_customBlock_SetLabelAlignmentRight:function(){this._HorizontalAlignment=
"Right"},_customBlock_SetLabelAlignmentTop:function(){this._VerticalAlignment="Top"},_customBlock_SetLabelAlignmentMiddle:function(){this._VerticalAlignment="Middle"},_customBlock_SetLabelAlignmentBottom:function(){this._VerticalAlignment="Bottom"},_customBlock_SetLabelWidth:function(a){this._LabelWidth=a;this._Update=!0},_customBlock_SetLabelHeight:function(a){this._LabelHeight=a;this._Update=!0},_customBlock_HideLabel:function(){this._Visible=!1},_customBlock_ShowLabel:function(){this._Visible=
!0},_customBlock_MouseOverText:function(){return this._MouseOver},_customBlock_MouseOverLabel:function(){return n.getMouseX()>=this.actor.getScreenX()&&n.getMouseX()<this.actor.getScreenX()+this._LabelWidth?n.getMouseY()>=this.actor.getScreenY()?n.getMouseY()<this.actor.getScreenY()+this._LabelHeight:!1:!1},init:function(){this._AnchortoScreen&&this.actor.anchorToScreen();this._HideSprite&&this.actor.disableActorDrawing();this._Update=this._Visible=!0;this.addListener(this.actor.whenDrawing,r(this,
this._event_Drawing))},forwardMessage:function(a){},__class__:Bq});var Cq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Hide Sprite"]="_HideSprite";this._HideSprite=!0;this.nameMap.h.Font="_Font";this.nameMap.h["Line Width"]="_LineWidth";this._LineWidth=0;this.nameMap.h["Line Height"]="_LineHeight";this._LineHeight=0;this.nameMap.h.Text="_Text";this._Text="Replace Me";this.nameMap.h["Wrapped Lines"]="_WrappedLines";this.nameMap.h["Wrap Long Lines"]="_WrapLongLines";this._WrapLongLines=
!0;this.nameMap.h["Current Line"]="_CurrentLine";this._CurrentLine=0;this.nameMap.h.Update="_Update";this._Update=!1;this.nameMap.h.X="_XVar";this._XVar=0;this.nameMap.h["Mouse Over"]="_MouseOver";this._MouseOver=!1;this.nameMap.h["Anchor to Screen"]="_AnchortoScreen";this._AnchortoScreen=!0;this.nameMap.h["Horizontal Alignment"]="_HorizontalAlignment";this._HorizontalAlignment="";this.nameMap.h["Label Width"]="_LabelWidth";this._LabelWidth=128;this.nameMap.h["Text Width"]="_TextWidth";this._TextWidth=
0;this.nameMap.h["Vertical Alignment"]="_VerticalAlignment";this._VerticalAlignment="";this.nameMap.h["Label Height"]="_LabelHeight";this._LabelHeight=32;this.nameMap.h.Y="_YVar";this._YVar=0;this.nameMap.h["Text Height"]="_TextHeight";this._TextHeight=0;this.nameMap.h.Lines="_Lines";this.nameMap.h.Line="_Line";this._Line="";this.nameMap.h["Use Newline Characters"]="_UseNewlineCharacters";this._UseNewlineCharacters=!0;this.nameMap.h.Visible="_Visible";this._Visible=!1};k["scripts.Design_72_72_Label"]=
Cq;Cq.__name__="scripts.Design_72_72_Label";Cq.__super__=T;Cq.prototype=u(T.prototype,{_HideSprite:null,_Font:null,_LineWidth:null,_LineHeight:null,_Text:null,_WrappedLines:null,_WrapLongLines:null,_CurrentLine:null,_Update:null,_XVar:null,_MouseOver:null,_AnchortoScreen:null,_HorizontalAlignment:null,_LabelWidth:null,_TextWidth:null,_VerticalAlignment:null,_LabelHeight:null,_YVar:null,_TextHeight:null,_Lines:null,_Line:null,_UseNewlineCharacters:null,_Visible:null,_event_Drawing:function(a,b,c){if(this.wrapper.enabled&&
this._Visible){a.setFont(this._Font);if(this._Update&&(this._Update=!1,this._UseNewlineCharacters?this._Lines=this._Text.split("\\n"):(this._Lines=[],this._Lines.push(this._Text)),this._WrapLongLines)){this._WrappedLines=[];b=0;for(c=this._Lines.length;b<c;){var d=b++;this._WrappedLines.push("");this._CurrentLine=this._WrappedLines.length-1;var e=0;for(d=U.__cast((""+A.string(this._Lines[d])).split(" "),Array);e<d.length;){var f=d[e];++e;""==this._WrappedLines[this._CurrentLine|0]?this._WrappedLines[this._CurrentLine|
0]=f:a.font.getTextWidth(""+A.string(this._WrappedLines[this._CurrentLine|0])+(" "+A.string(f)))/q.SCALE<=this._LabelWidth?this._WrappedLines[this._CurrentLine|0]=""+A.string(this._WrappedLines[this._CurrentLine|0])+(" "+A.string(f)):(this._WrappedLines.push(f),this._CurrentLine+=1)}}this._Lines=this._WrappedLines}this._TextHeight=this._Lines.length*a.font.getHeight()/q.SCALE;this._TextWidth=0;this._MouseOver=!1;b=0;for(c=this._Lines.length;b<c;)d=b++,this._Line=""+A.string(this._Lines[d]),this._LineWidth=
a.font.getTextWidth(this._Line)/q.SCALE,this._LineHeight=a.font.getHeight()/q.SCALE,this._LineWidth>this._TextWidth&&(this._TextWidth=this._LineWidth),"Left"==this._HorizontalAlignment?this._XVar=0:"Center"==this._HorizontalAlignment?this._XVar=(this._LabelWidth-this._LineWidth)/2:"Right"==this._HorizontalAlignment&&(this._XVar=this._LabelWidth-this._LineWidth),"Top"==this._VerticalAlignment?this._YVar=0:"Middle"==this._VerticalAlignment?this._YVar=(this._LabelHeight-this._TextHeight)/2:"Bottom"==
this._VerticalAlignment&&(this._YVar=this._LabelHeight-this._TextHeight),this._YVar+=this._LineHeight*d,a.drawString(this._Line,this._XVar,this._YVar),n.getMouseX()>=this.actor.getScreenX()+this._XVar&&n.getMouseX()<this.actor.getScreenX()+(this._XVar+this._LineWidth)&&n.getMouseY()>=this.actor.getScreenY()+this._YVar&&n.getMouseY()<this.actor.getScreenY()+(this._YVar+this._LineHeight)&&(this._MouseOver=!0),n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&
(a.strokeSize=1,a.drawRect(this._XVar,this._YVar,this._LineWidth,this._LineHeight));n.sceneHasBehavior("Game Debugger")&&n.asBoolean(n.getValueForScene("Game Debugger","_Enabled"))&&(a.strokeColor=n.getValueForScene("Game Debugger","_CustomColor"),a.strokeSize=n.asNumber(n.getValueForScene("Game Debugger","_StrokeThickness"))|0,a.moveTo(0,0),a.drawRect(0,0,this._LabelWidth,this._LabelHeight))}},_customBlock_SetLabelText:function(a){this._Text=a;this._Update=!0},_customBlock_SetLabelFont:function(a){this._Font=
a;this._Update=!0},_customBlock_SetLabelAlignmentLeft:function(){this._HorizontalAlignment="Left"},_customBlock_SetLabelAlignmentCenter:function(){this._HorizontalAlignment="Center"},_customBlock_SetLabelAlignmentRight:function(){this._HorizontalAlignment="Right"},_customBlock_SetLabelAlignmentTop:function(){this._VerticalAlignment="Top"},_customBlock_SetLabelAlignmentMiddle:function(){this._VerticalAlignment="Middle"},_customBlock_SetLabelAlignmentBottom:function(){this._VerticalAlignment="Bottom"},
_customBlock_SetLabelWidth:function(a){this._LabelWidth=a;this._Update=!0},_customBlock_SetLabelHeight:function(a){this._LabelHeight=a;this._Update=!0},_customBlock_HideLabel:function(){this._Visible=!1},_customBlock_ShowLabel:function(){this._Visible=!0},_customBlock_MouseOverText:function(){return this._MouseOver},_customBlock_MouseOverLabel:function(){return n.getMouseX()>=this.actor.getScreenX()&&n.getMouseX()<this.actor.getScreenX()+this._LabelWidth?n.getMouseY()>=this.actor.getScreenY()?n.getMouseY()<
this.actor.getScreenY()+this._LabelHeight:!1:!1},init:function(){this._AnchortoScreen&&this.actor.anchorToScreen();this._HideSprite&&this.actor.disableActorDrawing();this._Update=this._Visible=!0;this.addListener(this.actor.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Cq});var Dq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Down Control"]="_DownControl";this.nameMap.h["Left Control"]="_LeftControl";this.nameMap.h["Right Control"]=
"_RightControl";this.nameMap.h["Move X"]="_MoveX";this._MoveX=0;this.nameMap.h["Move Y"]="_MoveY";this._MoveY=0;this.nameMap.h["Stop Turning"]="_StopTurning";this._StopTurning=!0;this.nameMap.h.Speed="_Speed";this._Speed=30;this.nameMap.h["Prefer X"]="_PreferX";this._PreferX=!1;this.nameMap.h["Diagonal Stop"]="_DiagonalStop";this._DiagonalStop=!1;this.nameMap.h["Use Controls"]="_UseControls";this._UseControls=!0;this.nameMap.h["X Idle"]="_XIdle";this._XIdle=!1;this.nameMap.h["Y Idle"]="_YIdle";this._YIdle=
!1;this.nameMap.h["Up Animation (Idle)"]="_UpAnimationIdle";this._UpAnimationIdle="";this.nameMap.h["Up Animation"]="_UpAnimation";this._UpAnimation="";this.nameMap.h["Down Animation (Idle)"]="_DownAnimationIdle";this._DownAnimationIdle="";this.nameMap.h["Down Animation"]="_DownAnimation";this._DownAnimation="";this.nameMap.h["Left Animation (Idle)"]="_LeftAnimationIdle";this._LeftAnimationIdle="";this.nameMap.h["Left Animation"]="_LeftAnimation";this._LeftAnimation="";this.nameMap.h["Right Animation (Idle)"]=
"_RightAnimationIdle";this._RightAnimationIdle="";this.nameMap.h["Right Animation"]="_RightAnimation";this._RightAnimation="";this.nameMap.h["Use Animations"]="_UseAnimations";this._UseAnimations=!0;this.nameMap.h["Up Control"]="_UpControl"};k["scripts.Design_79_79_4WayMovement"]=Dq;Dq.__name__="scripts.Design_79_79_4WayMovement";Dq.__super__=T;Dq.prototype=u(T.prototype,{_DownControl:null,_LeftControl:null,_RightControl:null,_MoveX:null,_MoveY:null,_StopTurning:null,_Speed:null,_PreferX:null,_DiagonalStop:null,
_UseControls:null,_XIdle:null,_YIdle:null,_UpAnimationIdle:null,_UpAnimation:null,_DownAnimationIdle:null,_DownAnimation:null,_LeftAnimationIdle:null,_LeftAnimation:null,_RightAnimationIdle:null,_RightAnimation:null,_UseAnimations:null,_UpControl:null,_event_Updated:function(a){this.wrapper.enabled&&(this._UseControls&&(this._MoveX=n.asNumber(n.isKeyDown(this._RightControl))-n.asNumber(n.isKeyDown(this._LeftControl)),this._MoveY=n.asNumber(n.isKeyDown(this._DownControl))-n.asNumber(n.isKeyDown(this._UpControl))),
this._DiagonalStop&&0!=this._MoveX&&0!=this._MoveY?(this.actor.setXVelocity(0),this.actor.setYVelocity(0)):(0==this._MoveX||0!=this._MoveY&&!this._PreferX?this.actor.setXVelocity(0):this.actor.setXVelocity(this._MoveX*this._Speed),0==this._MoveY||0!=this._MoveX&&this._PreferX?this.actor.setYVelocity(0):this.actor.setYVelocity(this._MoveY*this._Speed)),!this._StopTurning||0==this._MoveX&&0==this._MoveY||this.actor.setAngularVelocity(0),0!=this._MoveX&&0==this._MoveY?this._PreferX=!1:0!=this._MoveY&&
0==this._MoveX&&(this._PreferX=!0),this._MoveY=this._MoveX=0,this._UseAnimations&&(0==this.actor.getXVelocity()&&0==this.actor.getYVelocity()?this.actor.getAnimation()==this._UpAnimation?this.actor.setAnimation(this._UpAnimationIdle):this.actor.getAnimation()==this._DownAnimation?this.actor.setAnimation(this._DownAnimationIdle):this.actor.getAnimation()==this._LeftAnimation?this.actor.setAnimation(this._LeftAnimationIdle):this.actor.getAnimation()==this._RightAnimation&&this.actor.setAnimation(this._RightAnimationIdle):
0>this.actor.getYVelocity()?this.actor.setAnimation(this._UpAnimation):0<this.actor.getYVelocity()?this.actor.setAnimation(this._DownAnimation):0>this.actor.getXVelocity()?this.actor.setAnimation(this._LeftAnimation):0<this.actor.getXVelocity()&&this.actor.setAnimation(this._RightAnimation)))},_customEvent_MoveUp:function(){this._MoveY=-1},_customEvent_MoveDown:function(){this._MoveY=1},_customEvent_MoveLeft:function(){this._MoveX=-1},_customEvent_MoveRight:function(){this._MoveX=1},init:function(){this.addListener(this.actor.whenUpdated,
r(this,this._event_Updated))},forwardMessage:function(a){},__class__:Dq});var Eq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor"};k["scripts.Design_7_7_DieinPitandReload"]=Eq;Eq.__name__="scripts.Design_7_7_DieinPitandReload";Eq.__super__=T;Eq.prototype=u(T.prototype,{_event_Updated:function(a){if(this.wrapper.enabled&&this.actor.getScreenY()>n.getScreenHeight()&&!n.isTransitioning()){var b=a=0,c=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(1,a<<16|b<<8|c);c=b=
a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(1,a<<16|b<<8|c));this.actor.isAlive()&&n.recycleActor(this.actor)}},init:function(){this.addListener(this.actor.whenUpdated,r(this,this._event_Updated))},forwardMessage:function(a){},__class__:Eq});var Fq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor"};k["scripts.Design_8"]=Fq;Fq.__name__="scripts.Design_8";Fq.__super__=T;Fq.prototype=u(T.prototype,{_event_TypeType:function(a){this.wrapper.enabled&&
n.recycleActor(a.thisActor)},init:function(){this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(19).ID,n.getActorType(13).ID,r(this,this._event_TypeType))},forwardMessage:function(a){},__class__:Fq});var Gq=function(a,b,c){T.call(this,b);this.nameMap.h.Actor="actor";this.nameMap.h["Jump Key"]="_JumpKey";this.nameMap.h["Jump Force"]="_JumpForce";this._JumpForce=25;this.nameMap.h["Jump Sound"]="_JumpSound";this.nameMap.h["Jump Right Animation"]="_JumpRightAnimation";this._JumpRightAnimation=
"";this.nameMap.h["Jump Left Animation"]="_JumpLeftAnimation";this._JumpLeftAnimation=""};k["scripts.Design_80_80_Jumping"]=Gq;Gq.__name__="scripts.Design_80_80_Jumping";Gq.__super__=T;Gq.prototype=u(T.prototype,{_JumpKey:null,_JumpForce:null,_JumpSound:null,_JumpRightAnimation:null,_JumpLeftAnimation:null,_event_Updated:function(a){var b=this;this.wrapper.enabled&&(n.isKeyPressed(this._JumpKey)&&1==this.actor.getActorValue("On Ground?")&&(n.playSound(this._JumpSound),this.actor.applyImpulse(0,-1,
q.engine.getGameAttribute("jumping")),n.runLater(75,function(a){b.actor.isAlive()&&b.actor.setActorValue("On Ground?",!1)},this.actor)),0==this.actor.getActorValue("On Ground?")&&(1==this.actor.getActorValue("Facing Right?")?this.actor.setAnimation(this._JumpRightAnimation):this.actor.setAnimation(this._JumpLeftAnimation),this.actor.setCurrentFrame(0)))},_event_ActorAny:function(a){if(this.wrapper.enabled&&a.thisCollidedWithTile){var b=0;for(a=a.points;b<a.length;){var c=a[b];++b;.1<Math.abs(Math.round(q.toPixelUnits(c.normalY)))&&
this.actor.setActorValue("On Ground?",!0)}}},_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(190);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;b&&n.runLater(1E3*q.engine.getGameAttribute("second"),function(a){var b=q.engine,c=q.engine.getGameAttribute("jumping")+20;b.gameAttributes.h.jumping=c;a.repeats=!1},this.actor)},init:function(){this.actor.setActorValue("On Ground?",!1);q.engine.gameAttributes.h.jumping=30;q.engine.gameAttributes.h.second=
.2;this.addListener(this.actor.whenUpdated,r(this,this._event_Updated));this.addListener(this.actor.whenCollided,r(this,this._event_ActorAny));this.addListener(this.actor.whenCollided,r(this,this._event_ActorType))},forwardMessage:function(a){},__class__:Gq});var is=function(){};k["scripts.MyScripts"]=is;is.__name__="scripts.MyScripts";var Hq=function(a,b){n.call(this)};k["scripts.SceneEvents_0"]=Hq;Hq.__name__="scripts.SceneEvents_0";Hq.__super__=sb;Hq.prototype=u(sb.prototype,{_event_Coinsdisp:function(a,
b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("coins:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("se score")),105,5))},_event_healthdisp:function(a,b,c){if(this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health:",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),105,30),0==q.engine.getGameAttribute("health"))){c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&
(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(5,a<<16|b<<8|c))}},_event_enemies:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("enemies:",10,50),a.drawString(""+A.string(q.engine.getGameAttribute("enemie")),105,50))},_event_Score:function(a,b,c){this.wrapper.enabled&&(a.drawString("Score:",10,70),a.drawString(""+A.string(q.engine.getGameAttribute("score")),105,70))},_event_Updating:function(a){if(this.wrapper.enabled&&0==q.engine.getGameAttribute("enemie")){a=
Lb.get().scenes.h[13].getID();var b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(1,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(.5,b<<16|c<<8|d))}},init:function(){q.engine.gameAttributes.h["se score"]=0;q.engine.gameAttributes.h.enemie=2;this.addListener(n.engine.whenDrawing,r(this,this._event_Coinsdisp));this.addListener(n.engine.whenDrawing,r(this,this._event_healthdisp));this.addListener(n.engine.whenDrawing,
r(this,this._event_enemies));this.addListener(n.engine.whenDrawing,r(this,this._event_Score));this.addListener(n.engine.whenUpdated,r(this,this._event_Updating))},forwardMessage:function(a){},__class__:Hq});var Iq=function(a,b){n.call(this)};k["scripts.SceneEvents_1"]=Iq;Iq.__name__="scripts.SceneEvents_1";Iq.__super__=sb;Iq.prototype=u(sb.prototype,{_event_Drawing:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),
100,30))},_event_Drawing2:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("coins:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("se score")),100,5))},_event_TypeType:function(a){this.wrapper.enabled&&n.runLater(5E3,function(a){n.createRecycledActor(n.getActorType(190),20,353,0)},null)},_event_healthdisp:function(a,b,c){if(this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health:",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),
105,30),0==q.engine.getGameAttribute("health"))){c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(5,a<<16|b<<8|c))}},init:function(){q.engine.gameAttributes.h.wait=!1;n.runLater(5E3,function(a){q.engine.gameAttributes.h.wait=!0},null);n.runLater(1E4,function(a){q.engine.gameAttributes.h.wait=!1},null);this.addListener(n.engine.whenDrawing,r(this,this._event_Drawing));
this.addListener(n.engine.whenDrawing,r(this,this._event_Drawing2));this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(1).ID,n.getActorType(190).ID,r(this,this._event_TypeType));this.addListener(n.engine.whenDrawing,r(this,this._event_healthdisp))},forwardMessage:function(a){},__class__:Iq});var Jq=function(a,b){n.call(this)};k["scripts.SceneEvents_10"]=Jq;Jq.__name__="scripts.SceneEvents_10";Jq.__super__=sb;Jq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},
__class__:Jq});var Kq=function(a,b){n.call(this)};k["scripts.SceneEvents_11"]=Kq;Kq.__name__="scripts.SceneEvents_11";Kq.__super__=sb;Kq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Kq});var Lq=function(a,b){n.call(this)};k["scripts.SceneEvents_12"]=Lq;Lq.__name__="scripts.SceneEvents_12";Lq.__super__=sb;Lq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Lq});var Mq=function(a,b){n.call(this)};k["scripts.SceneEvents_13"]=Mq;
Mq.__name__="scripts.SceneEvents_13";Mq.__super__=sb;Mq.prototype=u(sb.prototype,{_event_TypeType:function(a){if(this.wrapper.enabled){n.recycleActor(n.getActor(2));var b=a=0,c=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(1,a<<16|b<<8|c))}},_event_Updating:function(a){this.wrapper.enabled&&2==q.engine.getGameAttribute("hit")&&n.recycleActor(n.getActor(3))},_event_Coinsdisp:function(a,
b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("boss hit",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("hit")),105,5))},init:function(){q.engine.gameAttributes.h.hit=0;this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(192).ID,n.getActorType(1).ID,r(this,this._event_TypeType));this.addListener(n.engine.whenUpdated,r(this,this._event_Updating));this.addListener(n.engine.whenDrawing,r(this,this._event_Coinsdisp))},forwardMessage:function(a){},__class__:Mq});
var Nq=function(a,b){n.call(this)};k["scripts.SceneEvents_14"]=Nq;Nq.__name__="scripts.SceneEvents_14";Nq.__super__=sb;Nq.prototype=u(sb.prototype,{_event_Coinsdisp:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("coins:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("se score")),105,5))},_event_ActorType:function(a){if(this.wrapper.enabled){var b=n.getActorType(1);var c=a.otherActor.getType();a=a.otherActor.getGroup();b=b==c||b==a}else b=!1;if(b){b=Lb.get().scenes.h[1].getID();
var d=a=c=0;null==d&&(d=0);null==a&&(a=0);null==c&&(c=0);var e=n.createFadeOut(2,c<<16|a<<8|d);d=a=c=0;null==d&&(d=0);null==a&&(a=0);null==c&&(c=0);n.switchScene(b,e,n.createFadeIn(1,c<<16|a<<8|d))}},_event_healthdisp:function(a,b,c){if(this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health:",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),105,30),0==q.engine.getGameAttribute("health"))){c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,
a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(5,a<<16|b<<8|c))}},_event_Score:function(a,b,c){this.wrapper.enabled&&(a.drawString("Score:",10,50),a.drawString(""+A.string(q.engine.getGameAttribute("score")),105,50))},init:function(){this.addListener(n.engine.whenDrawing,r(this,this._event_Coinsdisp));this.addListener(n.getActor(163).whenCollided,r(this,this._event_ActorType));this.addListener(n.engine.whenDrawing,r(this,this._event_healthdisp));
this.addListener(n.engine.whenDrawing,r(this,this._event_Score))},forwardMessage:function(a){},__class__:Nq});var Oq=function(a,b){n.call(this)};k["scripts.SceneEvents_15"]=Oq;Oq.__name__="scripts.SceneEvents_15";Oq.__super__=sb;Oq.prototype=u(sb.prototype,{_event_Coinsdisp:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("coins:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("se score")),105,5))},_event_healthdisp:function(a,b,c){if(this.wrapper.enabled&&(a.setFont(n.getFont(28)),
a.drawString("health:",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),105,30),0==q.engine.getGameAttribute("health"))){c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(5,a<<16|b<<8|c))}},_event_enemies:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("enemies:",10,50),a.drawString(""+A.string(q.engine.getGameAttribute("enemie")),
105,50))},_event_Score:function(a,b,c){this.wrapper.enabled&&(a.drawString("Score:",10,70),a.drawString(""+A.string(q.engine.getGameAttribute("score")),105,70))},init:function(){q.engine.gameAttributes.h.enemie=4;this.addListener(n.engine.whenDrawing,r(this,this._event_Coinsdisp));this.addListener(n.engine.whenDrawing,r(this,this._event_healthdisp));this.addListener(n.engine.whenDrawing,r(this,this._event_enemies));this.addListener(n.engine.whenDrawing,r(this,this._event_Score))},forwardMessage:function(a){},
__class__:Oq});var Pq=function(a,b){n.call(this)};k["scripts.SceneEvents_17"]=Pq;Pq.__name__="scripts.SceneEvents_17";Pq.__super__=sb;Pq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Pq});var Qq=function(a,b){n.call(this)};k["scripts.SceneEvents_18"]=Qq;Qq.__name__="scripts.SceneEvents_18";Qq.__super__=sb;Qq.prototype=u(sb.prototype,{_event_Updating:function(a){if(this.wrapper.enabled&&0==q.engine.getGameAttribute("LUCI LIFE")){a=Lb.get().scenes.h[19].getID();
var b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var e=n.createFadeOut(3,b<<16|c<<8|d);d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);n.switchScene(a,e,n.createFadeIn(3,b<<16|c<<8|d))}},_event_luci:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("BOSS LIFE:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("LUCI LIFE")),130,5))},_event_Drawing:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health",10,30),a.drawString(""+
A.string(q.engine.getGameAttribute("health")),100,30))},init:function(){this.addListener(n.engine.whenUpdated,r(this,this._event_Updating));this.addListener(n.engine.whenDrawing,r(this,this._event_luci));this.addListener(n.engine.whenDrawing,r(this,this._event_Drawing))},forwardMessage:function(a){},__class__:Qq});var Rq=function(a,b){n.call(this)};k["scripts.SceneEvents_19"]=Rq;Rq.__name__="scripts.SceneEvents_19";Rq.__super__=sb;Rq.prototype=u(sb.prototype,{_event_Drawing:function(a,b,c){this.wrapper.enabled&&
(a.drawString("CONGRATULATIONS FOR CLEARING THE GAME!!!!",106,97),a.drawString('PRESS "Enter" button to exit game',135,135),a.drawString("GAME CREATOR",71,195),a.drawString("LLOYD O. RAGUINDIN",71,220),a.drawString("CONSULTANT/ADVISER",400,195),a.drawString("DR. ERICK R, ABUZO",400,220))},_event_Keyboard:function(a,b){this.wrapper.enabled&&a&&n.exitGame()},init:function(){this.addListener(n.engine.whenDrawing,r(this,this._event_Drawing));this.addListener(n.engine.whenKeyPressedEvents.getOrCreateEvent("enter"),
r(this,this._event_Keyboard))},forwardMessage:function(a){},__class__:Rq});var Sq=function(a,b){n.call(this)};k["scripts.SceneEvents_2"]=Sq;Sq.__name__="scripts.SceneEvents_2";Sq.__super__=sb;Sq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Sq});var Tq=function(a,b){n.call(this)};k["scripts.SceneEvents_3"]=Tq;Tq.__name__="scripts.SceneEvents_3";Tq.__super__=sb;Tq.prototype=u(sb.prototype,{_event_Coinsdisp:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),
a.drawString("coins:",10,5),a.drawString(""+A.string(q.engine.getGameAttribute("se score")),105,5))},_event_healthdisp:function(a,b,c){if(this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("health:",10,30),a.drawString(""+A.string(q.engine.getGameAttribute("health")),105,30),0==q.engine.getGameAttribute("health"))){c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var d=n.createFadeOut(2,a<<16|b<<8|c);c=b=a=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);n.reloadCurrentScene(d,n.createFadeIn(5,
a<<16|b<<8|c))}},_event_enemies:function(a,b,c){this.wrapper.enabled&&(a.setFont(n.getFont(28)),a.drawString("enemies:",10,50),a.drawString(""+A.string(q.engine.getGameAttribute("enemie")),105,50))},_event_Score:function(a,b,c){this.wrapper.enabled&&(a.drawString("Score:",10,70),a.drawString(""+A.string(q.engine.getGameAttribute("score")),105,70))},_event_TypeType:function(a){if(this.wrapper.enabled){a=q.engine;var b=q.engine.getGameAttribute("enemie")-1;a.gameAttributes.h.enemie=b}},init:function(){q.engine.gameAttributes.h.enemie=
4;this.addListener(n.engine.whenDrawing,r(this,this._event_Coinsdisp));this.addListener(n.engine.whenDrawing,r(this,this._event_healthdisp));this.addListener(n.engine.whenDrawing,r(this,this._event_enemies));this.addListener(n.engine.whenDrawing,r(this,this._event_Score));this.addListenerWithKey2(n.engine.whenCollidedEvents,n.getActorType(19).ID,n.getActorType(13).ID,r(this,this._event_TypeType))},forwardMessage:function(a){},__class__:Tq});var Uq=function(a,b){n.call(this)};k["scripts.SceneEvents_4"]=
Uq;Uq.__name__="scripts.SceneEvents_4";Uq.__super__=sb;Uq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Uq});var Vq=function(a,b){n.call(this)};k["scripts.SceneEvents_5"]=Vq;Vq.__name__="scripts.SceneEvents_5";Vq.__super__=sb;Vq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Vq});var Wq=function(a,b){n.call(this)};k["scripts.SceneEvents_6"]=Wq;Wq.__name__="scripts.SceneEvents_6";Wq.__super__=sb;Wq.prototype=u(sb.prototype,{init:function(){},
forwardMessage:function(a){},__class__:Wq});var Xq=function(a,b){n.call(this)};k["scripts.SceneEvents_7"]=Xq;Xq.__name__="scripts.SceneEvents_7";Xq.__super__=sb;Xq.prototype=u(sb.prototype,{init:function(){},forwardMessage:function(a){},__class__:Xq});var Hb=function(){};k["tweenxcore.Easing"]=Hb;Hb.__name__="tweenxcore.Easing";Hb.linear=function(a){return a};Hb.sineIn=function(a){return 0==a?0:1==a?1:1-Math.cos(1.5707963267948966*a)};Hb.sineOut=function(a){return 0==a?0:1==a?1:Math.sin(1.5707963267948966*
a)};Hb.sineInOut=function(a){return 0==a?0:1==a?1:-.5*(Math.cos(3.141592653589793*a)-1)};Hb.sineOutIn=function(a){return 0==a?0:1==a?1:.5>a?.5*Math.sin(3.141592653589793*a):-.5*Math.cos(1.5707963267948966*(2*a-1))+1};Hb.quadIn=function(a){return a*a};Hb.quadOut=function(a){return-a*(a-2)};Hb.quadInOut=function(a){return.5>a?2*a*a:-2*--a*a+1};Hb.quadOutIn=function(a){if(.5>a)return-.5*(a*=2)*(a-2);a=2*a-1;return.5*a*a+.5};Hb.cubicIn=function(a){return a*a*a};Hb.cubicOut=function(a){return--a*a*a+1};
Hb.cubicInOut=function(a){return 1>(a*=2)?.5*a*a*a:.5*((a-=2)*a*a+2)};Hb.cubicOutIn=function(a){a=2*a-1;return.5*(a*a*a+1)};Hb.quartIn=function(a){return(a*=a)*a};Hb.quartOut=function(a){a*=--a;return 1-a*a};Hb.quartInOut=function(a){if(1>(a*=2))return.5*(a*=a)*a;a*=a-=2;return-.5*(a*a-2)};Hb.quartOutIn=function(a){if(.5>a)return a=2*a-1,-.5*(a*=a)*a+.5;a=2*a-1;return.5*(a*=a)*a+.5};Hb.quintIn=function(a){return a*(a*=a)*a};Hb.quintOut=function(a){return--a*(a*=a)*a+1};Hb.quintInOut=function(a){return 1>
(a*=2)?.5*a*(a*=a)*a:.5*(a-=2)*(a*=a)*a+1};Hb.quintOutIn=function(a){a=2*a-1;return.5*(a*(a*=a)*a+1)};Hb.expoIn=function(a){return 0==a?0:Math.exp(6.931471805599453*(a-1))};Hb.expoOut=function(a){return 1==a?1:1-Math.exp(-6.931471805599453*a)};Hb.expoInOut=function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*(a-1)))};Hb.expoOutIn=function(a){return.5>a?.5*(1-Math.exp(-13.862943611198906*a)):.5==a?.5:.5*(Math.exp(13.862943611198906*(a-1))+
1)};Hb.circIn=function(a){return-1>a||1<a?0:1-Math.sqrt(1-a*a)};Hb.circOut=function(a){return 0>a||2<a?0:Math.sqrt(a*(2-a))};Hb.circInOut=function(a){return-.5>a||1.5<a?.5:1>(a*=2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)};Hb.circOutIn=function(a){if(0>a)return 0;if(1<a)return 1;if(.5>a)return a=2*a-1,.5*Math.sqrt(1-a*a);a=2*a-1;return-.5*(Math.sqrt(1-a*a)-1-1)};Hb.bounceIn=function(a){a=1-a;return.36363636363636365>a?1-7.5625*a*a:.7272727272727273>a?1-(7.5625*(a-=.5454545454545454)*
a+.75):.9090909090909091>a?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)};Hb.bounceOut=function(a){return.36363636363636365>a?7.5625*a*a:.7272727272727273>a?7.5625*(a-=.5454545454545454)*a+.75:.9090909090909091>a?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375};Hb.bounceInOut=function(a){if(.5>a)return a=1-2*a,.36363636363636365>a?.5*(1-7.5625*a*a):.7272727272727273>a?.5*(1-(7.5625*(a-=.5454545454545454)*a+.75)):.9090909090909091>
a?.5*(1-(7.5625*(a-=.8181818181818182)*a+.9375)):.5*(1-(7.5625*(a-=.9545454545454546)*a+.984375));a=2*a-1;return.36363636363636365>a?7.5625*a*a*.5+.5:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5};Hb.bounceOutIn=function(a){if(.5>a)return.36363636363636365>(a*=2)?3.78125*a*a:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?.5*(7.5625*(a-=
.8181818181818182)*a+.9375):.5*(7.5625*(a-=.9545454545454546)*a+.984375);a=1-(2*a-1);return.36363636363636365>a?.5-3.78125*a*a+.5:.7272727272727273>a?.5-.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5-.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5-.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5};Hb.backIn=function(a){return 0==a?0:1==a?1:a*a*(2.70158*a-1.70158)};Hb.backOut=function(a){return 0==a?0:1==a?1:--a*a*(2.70158*a+1.70158)+1};Hb.backInOut=function(a){return 0==a?0:1==
a?1:1>(a*=2)?.5*a*a*(3.5949095*a-2.5949095):.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)};Hb.backOutIn=function(a){if(0==a)return 0;if(1==a)return 1;if(.5>a)return a=2*a-1,.5*(a*a*(2.70158*a+1.70158)+1);a=2*a-1;return.5*a*a*(2.70158*a-1.70158)+.5};Hb.elasticIn=function(a){return 0==a?0:1==a?1:-(Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))};Hb.elasticOut=function(a){return 0==a?0:1==a?1:Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+
1};Hb.elasticInOut=function(a){return 0==a?0:1==a?1:1>(a*=2)?-.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4):Math.exp(-6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)*.5+1};Hb.elasticOutIn=function(a){if(.5>a)return 0==(a*=2)?0:.5*Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+.5;if(.5==a)return.5;if(1==a)return 1;a=2*a-1;return-(.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/
3E-4))+.5};Hb.warpOut=function(a){return 0>=a?0:1};Hb.warpIn=function(a){return 1>a?0:1};Hb.warpInOut=function(a){return.5>a?0:1};Hb.warpOutIn=function(a){return 0>=a?0:1>a?.5:1};var Cc=function(){};k["tweenxcore.FloatTools"]=Cc;Cc.__name__="tweenxcore.FloatTools";Cc.revert=function(a){return 1-a};Cc.clamp=function(a,b,c){null==c&&(c=1);null==b&&(b=0);return a<=b?b:c<=a?c:a};Cc.lerp=function(a,b,c){return b*(1-a)+c*a};Cc.inverseLerp=function(a,b,c){return(a-b)/(c-b)};Cc.repeat=function(a,b,c){null==
c&&(c=1);null==b&&(b=0);a=(a-b)/(c-b);return a-Math.floor(a)};Cc.shake=function(a,b,c){null==b&&(b=0);null==c&&(c=Math.random);c=c();return b+(-a*(1-c)+a*c)};Cc.spread=function(a,b){return-b*(1-a)+b*a};Cc.sinByRate=function(a){return Math.sin(2*a*Math.PI)};Cc.cosByRate=function(a){return Math.cos(2*a*Math.PI)};Cc.yoyo=function(a,b){return b(2*(.5>a?a:1-a))};Cc.zigzag=function(a,b){return.5>a?b(2*a):1-b(2*(a-.5))};Cc.mixEasing=function(a,b,c,d){null==d&&(d=.5);return b(a)*(1-d)+c(a)*d};Cc.crossfadeEasing=
function(a,b,c,d,e,f){null==f&&(f=1);null==e&&(e=0);d=d(a);e=e*(1-d)+f*d;return b(a)*(1-e)+c(a)*e};Cc.connectEasing=function(a,b,c,d,e){null==e&&(e=.5);null==d&&(d=.5);if(a<d)return a=b(a/d),0*(1-a)+e*a;a=c((a-d)/(1-d));return e*(1-a)+a};Cc.oneTwoEasing=function(a,b,c,d){null==d&&(d=.5);return a<d?b(a/d):c((a-d)/(1-d))};Cc.binarySearch=function(a,b,c){null==c&&(c=0);var d=0,e=a.length;if(0==c)for(;;){c=((e-d)/2|0)+d;var f=a[c];f<=b?d=c+1:e=c;if(d==e)break}else for(;c=((e-d)/2|0)+d,f=a[c],f<b?d=c+
1:e=c,d!=e;);return d};Cc.polyline=function(a,b){if(2>b.length)throw J.thrown("points length must be more than 2");var c=b.length-1;a*=c;var d=0;--c;null==c&&(c=1);null==d&&(d=0);c=Math.floor(a<=d?d:c<=a?c:a);a-=c;return b[c]*(1-a)+b[c+1]*a};Cc.bezier2=function(a,b,c,d){return(b*(1-a)+c*a)*(1-a)+(c*(1-a)+d*a)*a};Cc.bezier3=function(a,b,c,d,e){var f=c*(1-a)+d*a;return((b*(1-a)+c*a)*(1-a)+f*a)*(1-a)+(f*(1-a)+(d*(1-a)+e*a)*a)*a};Cc.bezier=function(a,b){if(2>b.length)throw J.thrown("points length must be more than 2");
if(2==b.length)return b[0]*(1-a)+b[1]*a;if(3==b.length){var c=b[1];return(b[0]*(1-a)+c*a)*(1-a)+(c*(1-a)+b[2]*a)*a}return Cc._bezier(a,b)};Cc._bezier=function(a,b){if(4==b.length){var c=b[1],d=b[2],e=c*(1-a)+d*a;return((b[0]*(1-a)+c*a)*(1-a)+e*a)*(1-a)+(e*(1-a)+(d*(1-a)+b[3]*a)*a)*a}c=[];d=0;for(e=b.length-1;d<e;){var f=d++;c.push(b[f]*(1-a)+b[f+1]*a)}return Cc._bezier(a,c)};Cc.uniformQuadraticBSpline=function(a,b){if(2>b.length)throw J.thrown("points length must be more than 2");if(2==b.length)return b[0]*
(1-a)+b[1]*a;var c=b.length-2;a*=c;var d=0;--c;null==c&&(c=1);null==d&&(d=0);c=Math.floor(a<=d?d:c<=a?c:a);a-=c;d=b[c];var e=b[c+1];return a*a*(d/2-e+b[c+2]/2)+a*(-d+e)+d/2+e/2};Cc.frameToSecond=function(a,b){return a/b};Cc.secondToFrame=function(a,b){return a*b};Cc.degreeToRate=function(a){return a/360};Cc.rateToDegree=function(a){return 360*a};Cc.radianToRate=function(a){return a/(2*Math.PI)};Cc.rateToRadian=function(a){return 2*a*Math.PI};Cc.millisecondToBeat=function(a,b){return a*b/6E4};Cc.beatToMillisecond=
function(a,b){return 6E4*a/b};var mk=function(){};k["tweenxcore.PointTools"]=mk;mk.__name__="tweenxcore.PointTools";mk.polyline=function(a,b,c){var d=[],e=[];for(c=E(c);c.hasNext();){var f=c.next();d.push(f.x);e.push(f.y)}if(2>d.length)throw J.thrown("points length must be more than 2");var g=d.length-1;c=b*g;f=0;--g;null==g&&(g=1);null==f&&(f=0);f=Math.floor(c<=f?f:g<=c?g:c);c-=f;d=d[f]*(1-c)+d[f+1]*c;a.x=d;if(2>e.length)throw J.thrown("points length must be more than 2");g=e.length-1;c=b*g;f=0;
--g;null==g&&(g=1);null==f&&(f=0);f=Math.floor(c<=f?f:g<=c?g:c);c-=f;d=e[f]*(1-c)+e[f+1]*c;a.y=d};mk.bezier2=function(a,b,c,d,e){e=d.x;a.x=(c.x*(1-b)+e*b)*(1-b)+(e*(1-b)+c.x*b)*b;e=d.y;a.y=(c.y*(1-b)+e*b)*(1-b)+(e*(1-b)+c.y*b)*b};mk.bezier3=function(a,b,c,d,e,f){f=d.x;var g=e.x,h=f*(1-b)+g*b;a.x=((c.x*(1-b)+f*b)*(1-b)+h*b)*(1-b)+(h*(1-b)+(g*(1-b)+c.x*b)*b)*b;f=d.y;g=e.y;h=f*(1-b)+g*b;a.y=((c.y*(1-b)+f*b)*(1-b)+h*b)*(1-b)+(h*(1-b)+(g*(1-b)+c.y*b)*b)*b};mk.bezier=function(a,b,c){var d=[],e=[];for(c=
E(c);c.hasNext();){var f=c.next();d.push(f.x);e.push(f.y)}if(2>d.length)throw J.thrown("points length must be more than 2");2==d.length?d=d[0]*(1-b)+d[1]*b:3==d.length?(c=d[1],d=(d[0]*(1-b)+c*b)*(1-b)+(c*(1-b)+d[2]*b)*b):d=Cc._bezier(b,d);a.x=d;if(2>e.length)throw J.thrown("points length must be more than 2");2==e.length?d=e[0]*(1-b)+e[1]*b:3==e.length?(c=e[1],d=(e[0]*(1-b)+c*b)*(1-b)+(c*(1-b)+e[2]*b)*b):d=Cc._bezier(b,e);a.y=d};mk.uniformQuadraticBSpline=function(a,b,c){for(var d=[],e=[],f=E(c);f.hasNext();)c=
f.next(),d.push(c.x),e.push(c.y);if(2>d.length)throw J.thrown("points length must be more than 2");if(2==d.length)d=d[0]*(1-b)+d[1]*b;else{var g=d.length-2;c=b*g;f=0;--g;null==g&&(g=1);null==f&&(f=0);f=Math.floor(c<=f?f:g<=c?g:c);g=c-f;var h=d[f];c=d[f+1];d=d[f+2];d=g*g*(h/2-c+d/2)+g*(-h+c)+h/2+c/2}a.x=d;if(2>e.length)throw J.thrown("points length must be more than 2");2==e.length?d=e[0]*(1-b)+e[1]*b:(g=e.length-2,c=b*g,f=0,--g,null==g&&(g=1),null==f&&(f=0),f=Math.floor(c<=f?f:g<=c?g:c),g=c-f,h=e[f],
c=e[f+1],d=e[f+2],d=g*g*(h/2-c+d/2)+g*(-h+c)+h/2+c/2);a.y=d};var Wr=function(){};k["tweenxcore.MatrixTools"]=Wr;Wr.__name__="tweenxcore.MatrixTools";Wr.createSimilarityTransform=function(a,b,c,d,e){d-=b;var f=e-c;e=Math.atan2(f,d);d=Math.sqrt(d*d+f*f);a.a=d*Math.cos(e);a.b=d*Math.sin(e);a.c=-d*Math.sin(e);a.d=d*Math.cos(e);a.tx=b;a.ty=c};N.$haxeUID|=0;"undefined"!=typeof performance&&"function"==typeof performance.now&&(I.now=performance.now.bind(performance));k.Math=Math;null==String.fromCodePoint&&
(String.fromCodePoint=function(a){return 65536>a?String.fromCharCode(a):String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&1023)+56320)});String.prototype.__class__=k.String=String;String.__name__="String";k.Array=Array;Array.__name__="Array";Date.prototype.__class__=k.Date=Date;Date.__name__="Date";var qi={},ls={},Lr=Number,Mr=Boolean,cr={},cs={};Vb.count=0;Q.level=0;"undefined"==typeof console&&(console={});null==console.log&&(console.log=function(){});qh.content=[{name:"config_game_config_json",
data:"ewoJImFudGlhbGlhcyI6IHRydWUsCgkiYnVpbGRSZWNvcmQiOiB7fSwKCSJidWlsZFRpbWUiOiAiIiwKCSJkZWJ1Z0RyYXciOiBmYWxzZSwKCSJkaXNwb3NlSW1hZ2VzIjogZmFsc2UsCgkiZm9yY2VIaVJlc0Fzc2V0cyI6IHRydWUsCgkiaW5pdFNjZW5lSUQiOiA0LAoJImtleXMiOiB7CgkJInVwIjogWyJVUCJdLAoJCSJkb3duIjogWyJET1dOIl0sCgkJImxlZnQiOiBbIkxFRlQiXSwKCQkicmlnaHQiOiBbIlJJR0hUIl0sCgkJImFjdGlvbjEiOiBbIloiXSwKCQkiYWN0aW9uMiI6IFsiWCJdLAoJCSJlbnRlciI6IFsiRU5URVIiXSwKCQkic3BhY2ViYXIiOiBbIlNQQUNFIl0KCQkKCX0sCgkicGl4ZWxzbmFwIjogZmFsc2UsCgkicGh5c2ljc01vZGUiOiAiTk9STUFMX1BIWVNJQ1MiLAoJInByb2plY3ROYW1lIjogIiIsCgkicmVsZWFzZU1vZGUiOiB0cnVlLAoJInNob3dDb25zb2xlIjogZmFsc2UsCgkic3RhZ2VXaWR0aCI6IDY0MCwKCSJzdGFnZUhlaWdodCI6IDQ4MCwKCSJ0b29sc2V0SW50ZXJmYWNlSG9zdCI6ICIiLAoJInRvb2xzZXRJbnRlcmZhY2VQb3J0IjogLTEsCgoJImNvbmZpZy1tb2JpbGUiOiB7CgkJImF1dG9yb3RhdGUiOiBmYWxzZSwKCQkiZ2FtZVNjYWxlIjogMSwKCQkibGFuZHNjYXBlIjogZmFsc2UsCgkJInRvb2xzZXRJbnRlcmZhY2VIb3N0IjogIiIsCgoJCSJjb25maWctYW5kcm9pZCI6IHsKCQkJImRpc2FibGVCYWNrQnV0dG9uIjogZmFsc2UsCgkJCSJzY2FsZU1vZGUiOiAiTk9fU0NBTElORyIsCgkJCSJzY2FsZXMiOiBbIjF4Il0KCQl9LAoJCQoJCSJjb25maWctaW9zIjogewoJCQkic2NhbGVNb2RlIjogIk5PX1NDQUxJTkciLAoJCQkic2NhbGVzIjogWyIxeCJdCgkJfQoJfSwKCQoJImNvbmZpZy1kZXNrdG9wIjogewoJCSJnYW1lU2NhbGUiOiAxLjAsCgkJInNjYWxlTW9kZSI6ICJOT19TQ0FMSU5HIiwKCQkic2NhbGVzIjogWyIxeCJdLAoJCSJzdGFydEluRnVsbFNjcmVlbiI6IGZhbHNlCgl9LAoJCgkiY29uZmlnLXdlYiI6IHsKCQkiZ2FtZVNjYWxlIjogMS4wLAoJCSJzdGFydEluRnVsbFNjcmVlbiI6IGZhbHNlLAoJCSJzY2FsZXMiOiBbIjF4Il0sCgkJImxvY2tVUkwiOiAiIiwKCgkJInByZWxvYWRlciI6IHsKCQkJImF1dGhvclVSTCI6ICIiLAoJCQkiYmFja2dyb3VuZENvbG9yIjogLTE1NTkyOTQyLAoJCQkiYmFja2dyb3VuZEltYWdlIjogIiIsCgkJCSJiYWRnZUltYWdlIjogImNvbmZpZy9wcmVsb2FkZXItYmFkZ2UucG5nIiwKCQkJImJvcmRlclRoaWNrbmVzcyI6IDIsCgkJCSJib3JkZXJDb2xvciI6IC0xMjMwMzI5MiwKCQkJImJhckxvY2F0aW9uIjogMCwKCQkJImJhcldpZHRoIjogMTIwLAoJCQkiYmFySGVpZ2h0IjogOCwKCQkJImJhckNvbG9yIjogLTc4MjkzNjgsCgkJCSJiYXJPZmZzZXRYIjogMCwKCQkJImJhck9mZnNldFkiOiAwLAoJCQkiYmFyQmFja2dyb3VuZENvbG9yIjogLTEyMzAzMjkyCgkJfSwKCgkJImNvbmZpZy1mbGFzaCI6IHsKCQkJInNjYWxlTW9kZSI6ICJOT19TQ0FMSU5HIiwKCQkJInN3ZlByZWxvYWRlciI6IHsKCQkJCSJzd2ZMb2MiOiAiIiwKCQkJCSJzd2ZYIjogMCwKCQkJCSJzd2ZZIjogMCwKCQkJCSJzd2ZXaWR0aCI6IDAsCgkJCQkic3dmSGVpZ2h0IjogMAoJCQl9CgkJfSwKCQkKCQkiY29uZmlnLWh0bWw1IjogewoJCQkidG9vbHNldEludGVyZmFjZUhvc3QiOiAiIgoJCX0KCX0KfQ"},
{name:"config_preloader_badge_txt",data:" "},
{name:"config_preloadpaths_txt",data:""}];U.__toStr={}.toString;null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=er.sliceImpl);var Xr=new Uint32Array(256);H.__alpha16=Xr;for(var dj=0;256>dj;){var nk=dj++;H.__alpha16[nk]=Math.ceil(257.00392156862745*nk)}Xr=new Uint8Array(511);H.__clamp=Xr;for(dj=0;255>dj;)nk=dj++,H.__clamp[nk]=nk;for(dj=255;511>dj;)nk=dj++,H.__clamp[nk]=255;Tg.available=!1;Tg.enabled=!1;z.hitTestCanvas=Qg.get_supported()?window.document.createElement("canvas"):null;
z.hitTestContext=Qg.get_supported()?z.hitTestCanvas.getContext("2d"):null;Me.maxTouchPoints=2;Me.supportedGestures=null;Me.supportsGestureEvents=!1;Me.inputMode=2;Ba.reloadListeners=[];ub.__meta__={statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};ab.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};ab.__broadcastEvents=new ia;ab.__instanceCount=
0;ab.__tempStack=new qd(function(){return ub.toObjectVector(null)},function(a){a.set_length(0)});xa.logicalWidth=0;xa.logicalHeight=0;xa.windowWidth=0;xa.windowHeight=0;xa.leftInset=0;xa.topInset=0;xa.rightInset=0;xa.bottomInset=0;ba.Element=0;ba.PCData=1;ba.CData=2;ba.Comment=3;ba.DocType=4;ba.ProcessingInstruction=5;ba.Document=6;y.pool=[];y.pooli=0;lc.VERTEX=0;lc.FACE=1;Sa.b2_nullFeature=255;Sa.s_incidentEdge=Sa.makeClipPointVector();Sa.s_clipPoints1=Sa.makeClipPointVector();Sa.s_clipPoints2=Sa.makeClipPointVector();
Sa.s_edgeAO=[];Sa.s_edgeBO=[];Sa.s_localTangent=new y;Sa.s_localNormal=new y;Sa.s_planePoint=new y;Sa.s_normal=new y;Sa.s_tangent=new y;Sa.s_tangent2=new y;Sa.s_v11=new y;Sa.s_v12=new y;Sa.b2CollidePolyTempVec=new y;ka.s_simplex=new P;ka.s_saveA=[];ka.s_saveB=[];jj.currentID=0;eh.e_circles=1;eh.e_faceA=2;eh.e_faceB=4;df.e_points=1;df.e_faceA=2;df.e_faceB=4;Ib.b2_toiCalls=0;Ib.b2_toiIters=0;Ib.b2_toiMaxIters=0;Ib.b2_toiRootIters=0;Ib.b2_toiMaxRootIters=0;Ib.s_cache=function(a){a=new uk;a.useCache=
!0;return a}(this);Ib.s_distanceInput=new F;Ib.s_xfA=new Ve;Ib.s_xfB=new Ve;Ib.s_fcn=new df;Ib.s_distanceOutput=new qg;Wb.initialized=!1;Wb.distanceInput=new F;Wb.proxyA=new Rb;Wb.proxyB=new Rb;Wb.simplexCache=new uk;Wb.distanceOutput=new qg;Wb.e_unknownShape=-1;Wb.e_circleShape=0;Wb.e_polygonShape=1;Wb.e_edgeShape=2;Wb.e_shapeTypeCount=3;Wb.e_hitCollide=1;Wb.e_missCollide=0;Wb.e_startsInsideCollide=-1;Db.s_mat=new zc;ca.VERSION="2.1alpha";ca.USHRT_MAX=65535;ca.b2_pi=Math.PI;ca.b2_maxManifoldPoints=
2;ca.b2_aabbExtension=.1;ca.b2_aabbMultiplier=2;ca.b2_linearSlop=.005;ca.b2_polygonRadius=2*ca.b2_linearSlop;ca.b2_angularSlop=.011111111111111112*ca.b2_pi;ca.b2_toiSlop=8*ca.b2_linearSlop;ca.b2_maxTOIContactsPerIsland=32;ca.b2_maxTOIJointsPerIsland=32;ca.b2_velocityThreshold=1;ca.b2_maxLinearCorrection=.2;ca.b2_maxAngularCorrection=.044444444444444446*ca.b2_pi;ca.b2_maxTranslation=2;ca.b2_maxTranslationSquared=ca.b2_maxTranslation*ca.b2_maxTranslation;ca.b2_maxRotation=.5*ca.b2_pi;ca.b2_maxRotationSquared=
ca.b2_maxRotation*ca.b2_maxRotation;ca.b2_contactBaumgarte=.2;ca.b2_timeToSleep=.5;ca.b2_linearSleepTolerance=.01;ca.b2_angularSleepTolerance=.011111111111111112*ca.b2_pi;O.b2Vec2_zero=new y(0,0);O.b2Mat22_identity=zc.fromVV(new y(1,0),new y(0,1));O.b2Transform_identity=new Ve(O.b2Vec2_zero,O.b2Mat22_identity);oa.s_xf1=new Ve;oa.e_islandFlag=1;oa.e_awakeFlag=2;oa.e_allowSleepFlag=4;oa.e_bulletFlag=8;oa.e_fixedRotationFlag=16;oa.e_activeFlag=32;oa.e_ignoreGravityFlag=128;oa.e_alwaysActiveFlag=256;
oa.e_pausedFlag=512;oa.b2_staticBody=0;oa.b2_kinematicBody=1;oa.b2_dynamicBody=2;mj.b2_defaultFilter=new mj;Ig.KEY_LOCK=0;Ig.b2_defaultListener=new Ig;wk.s_evalCP=new nc;Ce.e_shapeBit=1;Ce.e_jointBit=2;Ce.e_aabbBit=4;Ce.e_pairBit=8;Ce.e_centerOfMassBit=16;Ce.e_controllerBit=32;Gf.tempAABB1=new Ha;Gf.tempAABB2=new Ha;Dh.s_impulse=new yn;cc.s_timestep2=new oj;cc.s_xf=new Ve;cc.s_backupA=new fh;cc.s_backupB=new fh;cc.s_timestep=new oj;cc.s_queue=[];cc.s_jointColor=new vk(.5,.8,.8);cc.m_warmStarting=
!0;cc.m_continuousPhysics=!1;cc.e_newFixture=1;cc.e_locked=2;Ta.e_sensorFlag=1;Ta.e_continuousFlag=2;Ta.e_islandFlag=4;Ta.e_toiFlag=8;Ta.e_touchingFlag=16;Ta.e_enabledFlag=32;Ta.e_filterFlag=64;Ta.s_input=new xn;pj.circlePointA=new y;pj.circlePointB=new y;De.staticFix=ca.b2_maxManifoldPoints;De.s_worldManifold=new kj;De.s_psm=new pj;Na.m_xf=new Ve;Na.q=new y;Na.p=new y;Na.e=new y;Na.temp1=new y;Na.temp2=new y;Na.m_centroidB=new y;Na.mat=new zc;G.m_xf=new Ve;G.temp=new y;G.m_centroidB=new y;G.m_lowerLimit=
new y;G.m_upperLimit=new y;G.m_polygonB=new Cn;G.edgeAxis=new Bk;G.polygonAxis=new Bk;G.perp=new y;G.n=new y;G.rf=new Dn;G.mat=new zc;G.temp1=new y;G.temp2=new y;G.ie=[new jh,new jh];G.clipPoints1=[new jh,new jh];G.clipPoints2=[new jh,new jh];G.edge0=new y;G.edge1=new y;G.edge2=new y;G.m_normal=new y;G.m_normal0=new y;G.m_normal1=new y;G.m_normal2=new y;Sb.e_unknownJoint=0;Sb.e_revoluteJoint=1;Sb.e_prismaticJoint=2;Sb.e_distanceJoint=3;Sb.e_pulleyJoint=4;Sb.e_mouseJoint=5;Sb.e_gearJoint=6;Sb.e_lineJoint=
7;Sb.e_weldJoint=8;Sb.e_frictionJoint=9;Sb.e_inactiveLimit=0;Sb.e_atLowerLimit=1;Sb.e_atUpperLimit=2;Sb.e_equalLimits=3;Vc.CENTER="center";sg.b2_minPulleyLength=2;cg.tImpulse=new y;Kg.FPS_ONLY=!1;Kg.GRAPH_WIDTH=70;Kg.XPOS=69;Kg.GRAPH_HEIGHT=50;Kg.TEXT_HEIGHT=50;ug.bg=51;ug.fps=16776960;ug.ms=65280;ug.mem=65535;ug.memmax=16711792;ug.bgCSS="#000033";ug.msCSS="#00ff00";ug.fpsCSS="#ffff00";ug.memCSS="#00ffff";ug.memmaxCSS="#ff0070";ha.defines=function(a){a=new ia;a.h.web="1";a.h.verbose="1";a.h.utf16=
"1";a.h.use_tilemap="1";a.h.tweenxcore="1.0.4";a.h["true"]="1";a.h.tools="8.0.1";a.h["target.utf16"]="true";a.h["target.unicode"]="true";a.h["target.name"]="js";a.h.stencyl="4.1.0";a.h["source-header"]="Generated by Haxe 4.2.1+bf9ff69";a.h.polygonal_ds="2.1.1";a.h["polygonal-ds"]="2.1.1";a.h.openfl_html5="1";a.h.openfl_enable_handle_error="1";a.h["openfl-html5"]="1";a.h["openfl-enable-handle-error"]="1";a.h.openfl="9.2.0";a.h.no_traces="1";a.h.no_compilation="1";a.h["no-compilation"]="1";a.h.mbs=
"0.2.2";a.h.lime_webgl="1";a.h.lime_html5="1";a.h.lime_howlerjs="1";a.h.lime_dom="1";a.h.lime_disable_assets_version="1";a.h.lime_canvas="1";a.h["lime-webgl"]="1";a.h["lime-html5"]="1";a.h["lime-howlerjs"]="1";a.h["lime-dom"]="1";a.h["lime-canvas"]="1";a.h.lime="8.0.1";a.h.js_es5="1";a.h.js_es="5";a.h["js-es5"]="1";a.h.js="1";a.h.html5="1";a.h.hscript="2.5.0";a.h.howlerjs="1";a.h.haxe_ver="4.201";a.h.haxe4="1";a.h.haxe3="1";a.h.haxe="4.2.1";a.h.debug_console="0.0.0";a.h["debug-console"]="0.0.0";a.h.debug=
"1";a.h.dce="std";a.h["com.stencyl.joystick"]="1.0.0";a.h["com.stencyl.gestures"]="1.0.0";a.h["com.stencyl"]="4.1.0";a.h.cloner="1.0.0";a.h.box2d="0.0.0";a.h.actuate_manual_update="1";a.h.actuate_manual_time="1";return a}(this);q.__meta__={fields:{getLayer:{deprecated:["Use getLayerById or getLayerByName"]}}};q.DOODAD="";q.INTERNAL_SHIFT="iSHIFT";q.INTERNAL_CTRL="iCTRL";q.INTERNAL_COMMAND="iCOMMAND";q.NO_PHYSICS=!1;q.DEBUG_DRAW=!1;q.IMG_BASE="";q.SCALE=1;q.checkedWideScreen=!1;q.isStandardIOS=!1;
q.isExtendedIOS=!1;q.isIPhone6=!1;q.isIPhone6Plus=!1;q.isIPhoneX=!1;q.isIPhoneXMax=!1;q.isIPhoneXR=!1;q.isTabletIOS=!1;q.landscape=!1;q.limitCameraToScene=!0;q.paused=!1;q.started=!1;q.inFocus=!0;q.ITERATIONS=3;q.physicsScale=10;q.preservePadding=!1;q.paddingLeft=0;q.paddingRight=0;q.paddingTop=0;q.paddingBottom=0;q.STEP_SIZE=10;q.MS_PER_SEC=1E3;q.elapsedTime=0;q.timeScale=1;q.totalElapsedTime=0;q.debug=!1;M.mouseX=0;M.mouseY=0;M.mouseWheelDelta=0;M.multipleGamepadsEnabled=!1;M._enabled=!1;M._key=
[];M._controlsToReset=[];M._controlMap=new ia;M._keyInput=new Mn(new Xa,function(a){return a.keys});Ja.ANY=-1;Ja.LEFT=37;Ja.UP=38;Ja.RIGHT=39;Ja.DOWN=40;Ja.ENTER=13;Ja.CONTROL=17;Ja.COMMAND=15;Ja.SPACE=32;Ja.SHIFT=16;Ja.BACKSPACE=8;Ja.CAPS_LOCK=20;Ja.DELETE=46;Ja.END=35;Ja.ESCAPE=27;Ja.HOME=36;Ja.INSERT=45;Ja.TAB=9;Ja.PAGE_DOWN=34;Ja.PAGE_UP=33;Ja.LEFT_SQUARE_BRACKET=219;Ja.RIGHT_SQUARE_BRACKET=221;Ja.A=97;Ja.B=98;Ja.C=99;Ja.D=100;Ja.E=101;Ja.F=102;Ja.G=103;Ja.H=104;Ja.I=105;Ja.J=106;Ja.K=107;Ja.L=
108;Ja.M=109;Ja.N=110;Ja.O=111;Ja.P=112;Ja.Q=113;Ja.R=114;Ja.S=115;Ja.T=116;Ja.U=117;Ja.V=118;Ja.W=119;Ja.X=120;Ja.Y=121;Ja.Z=122;Ja.F1=112;Ja.F2=113;Ja.F3=114;Ja.F4=115;Ja.F5=116;Ja.F6=117;Ja.F7=118;Ja.F8=119;Ja.F9=120;Ja.F10=121;Ja.F11=122;Ja.F12=123;Ja.F13=124;Ja.F14=125;Ja.F15=126;Ja.DIGIT_0=48;Ja.DIGIT_1=49;Ja.DIGIT_2=50;Ja.DIGIT_3=51;Ja.DIGIT_4=52;Ja.DIGIT_5=53;Ja.DIGIT_6=54;Ja.DIGIT_7=55;Ja.DIGIT_8=56;Ja.DIGIT_9=57;Ja.NUMPAD_0=96;Ja.NUMPAD_1=97;Ja.NUMPAD_2=98;Ja.NUMPAD_3=99;Ja.NUMPAD_4=100;
Ja.NUMPAD_5=101;Ja.NUMPAD_6=102;Ja.NUMPAD_7=103;Ja.NUMPAD_8=104;Ja.NUMPAD_9=105;Ja.NUMPAD_ADD=107;Ja.NUMPAD_DECIMAL=110;Ja.NUMPAD_DIVIDE=111;Ja.NUMPAD_ENTER=108;Ja.NUMPAD_MULTIPLY=106;Ja.NUMPAD_SUBTRACT=109;Ja.keyboardNameMap=function(a){a=new ia;a.h.NUMBER_0=48;a.h.NUMBER_1=49;a.h.NUMBER_2=50;a.h.NUMBER_3=51;a.h.NUMBER_4=52;a.h.NUMBER_5=53;a.h.NUMBER_6=54;a.h.NUMBER_7=55;a.h.NUMBER_8=56;a.h.NUMBER_9=57;a.h.A=65;a.h.B=66;a.h.C=67;a.h.D=68;a.h.E=69;a.h.F=70;a.h.G=71;a.h.H=72;a.h.I=73;a.h.J=74;a.h.K=
75;a.h.L=76;a.h.M=77;a.h.N=78;a.h.O=79;a.h.P=80;a.h.Q=81;a.h.R=82;a.h.S=83;a.h.T=84;a.h.U=85;a.h.V=86;a.h.W=87;a.h.X=88;a.h.Y=89;a.h.Z=90;a.h.NUMPAD_0=96;a.h.NUMPAD_1=97;a.h.NUMPAD_2=98;a.h.NUMPAD_3=99;a.h.NUMPAD_4=100;a.h.NUMPAD_5=101;a.h.NUMPAD_6=102;a.h.NUMPAD_7=103;a.h.NUMPAD_8=104;a.h.NUMPAD_9=105;a.h.NUMPAD_MULTIPLY=106;a.h.NUMPAD_ADD=107;a.h.NUMPAD_ENTER=108;a.h.NUMPAD_SUBTRACT=109;a.h.NUMPAD_DECIMAL=110;a.h.NUMPAD_DIVIDE=111;a.h.F1=112;a.h.F2=113;a.h.F3=114;a.h.F4=115;a.h.F5=116;a.h.F6=117;
a.h.F7=118;a.h.F8=119;a.h.F9=120;a.h.F10=121;a.h.F11=122;a.h.F12=123;a.h.F13=124;a.h.F14=125;a.h.F15=126;a.h.BACKSPACE=8;a.h.TAB=9;a.h.ALTERNATE=18;a.h.ENTER=13;a.h.COMMAND=15;a.h.SHIFT=16;a.h.CONTROL=17;a.h.BREAK=19;a.h.CAPS_LOCK=20;a.h.NUMPAD=21;a.h.ESCAPE=27;a.h.SPACE=32;a.h.PAGE_UP=33;a.h.PAGE_DOWN=34;a.h.END=35;a.h.HOME=36;a.h.LEFT=37;a.h.RIGHT=39;a.h.UP=38;a.h.DOWN=40;a.h.INSERT=45;a.h.DELETE=46;a.h.NUMLOCK=144;a.h.SEMICOLON=186;a.h.EQUAL=187;a.h.COMMA=188;a.h.MINUS=189;a.h.PERIOD=190;a.h.SLASH=
191;a.h.BACKQUOTE=192;a.h.LEFTBRACKET=219;a.h.BACKSLASH=220;a.h.RIGHTBRACKET=221;a.h.QUOTE=222;return a}(this);pa.__pool=new qd(function(){return new pa},function(a){a.setTo(0,0)});fa.__pool=new qd(function(){return new fa},function(a){a.setTo(0,0,0,0)});n.FRONT=0;n.MIDDLE=1;n.BACK=2;n.CHANNELS=32;n.mpx=0;n.mpy=0;n.mrx=0;n.mry=0;n.dummyVec=new y;n.imageApiAutoscale=!0;n.dummyRect=new fa(0,0,1,1);n.dummyPoint=new pa(0,0);n.BASE_64_ENCODINGS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
n.BASE_64_PADDING="=";lh.fieldMaps=new ia;rb.TOUCH_POINT=1;rb.GESTURE=2;rb.GESTURE_CAPTURE=3;rb.PAN_X=1;rb.PAN_Y=2;rb.PAN_XY=3;rb.READY=0;rb.BEGIN=1;rb.TWO_FINGER_MOVE=2;rb.MOVE=4;rb.R2D=180/Math.PI;rb.SWIPE_SCROLL_TIME=2;rb.SWIPE_SAMPLE_TIME=.2;rb.VELOCITY_RATIO=.25;rb.touchEvents="touchBegin touchEnd touchMove touchOver touchOut touchRollOver touchRollOut touchTap".split(" ");rb.mouseEvents="mouseDown mouseUp mouseMove mouseOver mouseOut rollOver rollOut click".split(" ");rb.geTouchEvents=["touchBegin",
"touchEnd","touchMove","touchOut"];rb.geMouseEvents=["mouseDown","mouseUp","mouseMove","mouseOut"];rb.initialized=!1;rb.moveToleSqr=1;rb.MAP="mouseDown rox_touch_begin mouseUp rox_touch_end mouseMove rox_touch_move mouseOver rox_touch_over mouseOut rox_touch_out rollOver rox_touch_roll_over rollOut rox_touch_roll_in click rox_touch_tap touchBegin rox_touch_begin touchEnd rox_touch_end touchMove rox_touch_move touchOver rox_touch_over touchOut rox_touch_out touchRollOver rox_touch_roll_over touchRollOut rox_touch_roll_in touchTap rox_touch_tap".split(" ");
rb.typeMap=function(a){a=new ia;for(var b=0,c=rb.MAP.length>>1;b<c;){var d=b++;a.h[rb.MAP[d<<1]]=rb.MAP[(d<<1)+1]}return a}(this);la.ACTIVATE="activate";la.ADDED="added";la.ADDED_TO_STAGE="addedToStage";la.CANCEL="cancel";la.CHANGE="change";la.CLEAR="clear";la.CLOSE="close";la.COMPLETE="complete";la.CONNECT="connect";la.CONTEXT3D_CREATE="context3DCreate";la.COPY="copy";la.CUT="cut";la.DEACTIVATE="deactivate";la.ENTER_FRAME="enterFrame";la.EXIT_FRAME="exitFrame";la.FRAME_CONSTRUCTED="frameConstructed";
la.FRAME_LABEL="frameLabel";la.FULLSCREEN="fullScreen";la.ID3="id3";la.INIT="init";la.MOUSE_LEAVE="mouseLeave";la.OPEN="open";la.PASTE="paste";la.REMOVED="removed";la.REMOVED_FROM_STAGE="removedFromStage";la.RENDER="render";la.RESIZE="resize";la.SCROLL="scroll";la.SELECT="select";la.SELECT_ALL="selectAll";la.SOUND_COMPLETE="soundComplete";la.TAB_CHILDREN_CHANGE="tabChildrenChange";la.TAB_ENABLED_CHANGE="tabEnabledChange";la.TAB_INDEX_CHANGE="tabIndexChange";la.TEXTURE_READY="textureReady";la.UNLOAD=
"unload";Wc.TOUCH_BEGIN="rox_touch_begin";Wc.TOUCH_END="rox_touch_end";Wc.TOUCH_MOVE="rox_touch_move";Wc.TOUCH_OVER="rox_touch_over";Wc.TOUCH_OUT="rox_touch_out";Wc.TOUCH_ROLL_OVER="rox_touch_roll_over";Wc.TOUCH_ROLL_OUT="rox_touch_roll_in";Wc.TOUCH_TAP="rox_touch_tap";Wc.GESTURE_TAP="rox_gesture_tap";Wc.GESTURE_LONG_PRESS="rox_gesture_long_press";Wc.GESTURE_PAN="rox_gesture_pan";Wc.GESTURE_SWIPE="rox_gesture_swipe";Wc.GESTURE_BEGIN="rox_gesture_begin";Wc.GESTURE_PINCH="rox_gesture_pinch";Wc.GESTURE_ROTATION=
"rox_gesture_rotation";Wc.GESTURE_END="rox_gesture_end";cl.stringBlendMap=function(a){a=new ia;a.h.add=0;a.h.alpha=1;a.h.darken=2;a.h.difference=3;a.h.erase=4;a.h.hardlight=5;a.h.invert=6;a.h.lighten=8;a.h.multiply=9;a.h.normal=10;a.h.overlay=11;a.h.screen=12;a.h.subtract=14;return a}(this);xe.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ld.drawnStringCache=new ia;Ld.drawnStringCacheKeys=[];Zc.MAX_TEXTURE_CAP=4096;Cd._1X=new Cd(1);Cd._1_5X=new Cd(1.5);Cd._2X=new Cd(2);Cd._3X=
new Cd(3);Cd._4X=new Cd(4);ii.NO_SCALING=0;ii.FULLSCREEN=1;ii.STRETCH_TO_FIT=2;ii.SCALE_TO_FIT_LETTERBOX=3;ii.SCALE_TO_FIT_FILL=4;ii.SCALE_TO_FIT_FULLSCREEN=5;wg._storedFonts=new ia;wg.ZERO_POINT=new pa;nd.CONTEXT_LOST="glcontextlost";nd.CONTEXT_RESTORED="glcontextrestored";nd.vertexShader="\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}";
kb.IN="in";kb.OUT="out";kb.THROUGH="through";Ne.SLIDE_UP="up";Ne.SLIDE_DOWN="down";Ne.SLIDE_LEFT="left";Ne.SLIDE_RIGHT="right";K.BOOLEAN=new rf("boolean",1);K.INTEGER=new rf("integer",4);K.FLOAT=new rf("float",4);K.STRING=new rf("string",4);K.LIST=new rf("list",4);K.DYNAMIC=new rf("dynamic",8);K.NULL=new rf("null",0);Kh.basicTypes=function(a){a=[];a.push(K.BOOLEAN);a.push(K.INTEGER);a.push(K.FLOAT);a.push(K.STRING);a.push(K.LIST);a.push(K.DYNAMIC);a.push(K.NULL);uc.initializeType();Nc.initializeType();
$c.initializeType();a.push(uc.MBS_HEADER);a.push(Nc.MBS_TYPE_INFO);a.push($c.MBS_FIELD_INFO);return a}(this);tb.GROUP_OFFSET=1E6;tb.manifold=new kj;Lb.INHERIT_ID=-1E3;Lb.REGION_ID=-2;Lb.PLAYER_ID=0;Lb.TERRAIN_ID=1;Lb.DOODAD_ID=2;Lb.ACTOR_ID=3;Hn.NORMAL_PHYSICS=0;Hn.SIMPLE_PHYSICS=1;Hn.MINIMAL_PHYSICS=2;md.UNSET_ID=-1;fl.MAX_VERTICES=200;Xb.muted=!1;Xb.masterVolume=1;Jg.UNSET_ID=-1;ne.allAnimations=[];tc.recycledCollisions=[];tc.collisionResponses=new Xa;Md.freedCollisionPoints=[];Jf.WHITE=-1;Jf.TRANSPARENT=
-2;Bf.infoArray=[];Ee.NO_AUTOTILE_DATA=0;Ee.CORNER_TL=1;Ee.CORNER_TR=2;Ee.CORNER_BR=4;Ee.CORNER_BL=8;Ee.SIDE_L=16;Ee.SIDE_T=32;Ee.SIDE_R=64;Ee.SIDE_B=128;Mc.dummyRect=new fa;ke.TILESET_CACHE_MULTIPLIER=1E6;ke.cacheSource=new Xa;ke.autotileFlagPointMap=function(a){a=new Xa;var b=Ee.CORNER_TL,c=new pa(-1,-1);a.h[b]=c;b=Ee.CORNER_TR;c=new pa(1,-1);a.h[b]=c;b=Ee.CORNER_BL;c=new pa(-1,1);a.h[b]=c;b=Ee.CORNER_BR;c=new pa(1,1);a.h[b]=c;b=Ee.SIDE_T;c=new pa(0,-1);a.h[b]=c;b=Ee.SIDE_B;c=new pa(0,1);a.h[b]=
c;b=Ee.SIDE_L;c=new pa(-1,0);a.h[b]=c;b=Ee.SIDE_R;c=new pa(1,0);a.h[b]=c;return a}(this);qf.temp=new fa;Oc.BLACK=-16777216;Oc.WHITE=-1;Oc.RED=-65536;Oc.GREEN=-16711936;Oc.BLUE=-16776961;Oc.CYAN=-16711681;Oc.MAGENTA=-65281;Oc.YELLOW=-256;Oa.LUMA_R=.212671;Oa.LUMA_G=.71516;Oa.LUMA_B=.072169;Oa.LUMA_R2=.3086;Oa.LUMA_G2=.6094;Oa.LUMA_B2=.082;Oa.INV3=.3333333333333333;Fd.BLACK=0;Fd.WHITE=16777215;Fd.RED=16711680;Fd.GREEN=65280;Fd.BLUE=255;Fd.CYAN=65535;Fd.MAGENTA=16711935;Fd.YELLOW=16776960;gf.__meta__=
{fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Nh.__identity=new Nh;wa.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};wa.__identity=new wa;wa.__pool=new qd(function(){return new wa},function(a){a.identity()});wa.__matrix3=new Nh;Kc.__pool=new qd(function(){return new Kc},function(a){a.__identity()});W.INTEGER_MAX=1E8;W.NUMBER_MAX_VALUE=
1.79769313486231E308;W.blackColor=-16777216;W.rate=1;W.camera=new pa;W.cloner=new Gn;W._bitmap=new ia;W._seed=0;W._volume=1;W._pan=0;W._soundTransform=new gf;W.DEG=57.29577951308402;W.RAD=.01745329251994278;W.point=new pa;W.point2=new pa;W.zero=new pa;W.rect=new fa;W.matrix=new wa;W.sprite=new Ya;W.collision=new tc;pb.linear=new Fl;pb.sineIn=new Sl;pb.sineOut=new Ul;pb.sineInOut=new Tl;pb.sineOutIn=new Vl;pb.quadIn=new Gl;pb.quadOut=new Il;pb.quadInOut=new Hl;pb.quadOutIn=new Jl;pb.cubicIn=new tl;
pb.cubicOut=new vl;pb.cubicInOut=new ul;pb.cubicOutIn=new wl;pb.quartIn=new Kl;pb.quartOut=new Ml;pb.quartInOut=new Ll;pb.quartOutIn=new Nl;pb.quintIn=new Ol;pb.quintOut=new Ql;pb.quintInOut=new Pl;pb.quintOutIn=new Rl;pb.expoIn=new Bl;pb.expoOut=new Dl;pb.expoInOut=new Cl;pb.expoOutIn=new El;pb.circIn=new pl;pb.circOut=new rl;pb.circInOut=new ql;pb.circOutIn=new sl;pb.bounceIn=new ll;pb.bounceOut=new nl;pb.bounceInOut=new ml;pb.bounceOutIn=new ol;pb.backIn=new hl;pb.backOut=new jl;pb.backInOut=new il;
pb.backOutIn=new kl;pb.elasticIn=new xl;pb.elasticOut=new zl;pb.elasticInOut=new yl;pb.elasticOutIn=new Al;pb.warpOut=new Yl;pb.warpIn=new Wl;pb.warpInOut=new Xl;pb.warpOutIn=new Zl;Oh.PI=3.141592653589793;Oh.PI_H=1.5707963267948966;Oh.LN_2=.6931471805599453;Oh.LN_2_10=6.931471805599453;Oh.overshoot=1.70158;Oh.amplitude=1;Oh.period=3E-4;vb.activeObjects=[];vb.finishedObjects=[];ye.USE_CACHE=!1;ye.USE_ENUM_INDEX=!1;ye.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";Fe.DEFAULT_RESOLVER=
new am;Fe.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";rh.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";rh.BYTES=ib.ofString(rh.CHARS);Xd.i64tmp=new Ua(0,0);Xd.helper=new DataView(new ArrayBuffer(8));dh.escapes=function(a){a=new ia;a.h.lt="<";a.h.gt=">";a.h.amp="&";a.h.quot='"';a.h.apos="'";return a}(this);ze.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];ze.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,
19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];ze.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];ze.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];ze.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];$a.OPTION_REVOKE_URL=1;$a.activeRequests=0;$a.requestLimit=17;$a.requestQueue=new Dc;ob.dummyCharacter="\u007f";ob.windowID=0;Qf.DICTIONARY=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Qf.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=Qf.DICTIONARY;b<c.length;){var d=c[b];++b;for(var e=0,f=Qf.DICTIONARY;e<f.length;){var g=f[e];++e;a.push(d+g)}}return a}(this);$e.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,
267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,
337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1];$e.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,
9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,
17,16,17,9];Sf.minCodePoint=0;Sf.maxCodePoint=1114111;Sf.minHighSurrogate=55296;Sf.maxHighSurrogate=56319;Sf.minLowSurrogate=56320;Sf.maxLowSurrogate=57343;t.DEPTH_BUFFER_BIT=256;t.STENCIL_BUFFER_BIT=1024;t.COLOR_BUFFER_BIT=16384;t.POINTS=0;t.LINES=1;t.LINE_LOOP=2;t.LINE_STRIP=3;t.TRIANGLES=4;t.TRIANGLE_STRIP=5;t.TRIANGLE_FAN=6;t.ZERO=0;t.ONE=1;t.SRC_COLOR=768;t.ONE_MINUS_SRC_COLOR=769;t.SRC_ALPHA=770;t.ONE_MINUS_SRC_ALPHA=771;t.DST_ALPHA=772;t.ONE_MINUS_DST_ALPHA=773;t.DST_COLOR=774;t.ONE_MINUS_DST_COLOR=
775;t.SRC_ALPHA_SATURATE=776;t.FUNC_ADD=32774;t.BLEND_EQUATION=32777;t.BLEND_EQUATION_RGB=32777;t.BLEND_EQUATION_ALPHA=34877;t.FUNC_SUBTRACT=32778;t.FUNC_REVERSE_SUBTRACT=32779;t.BLEND_DST_RGB=32968;t.BLEND_SRC_RGB=32969;t.BLEND_DST_ALPHA=32970;t.BLEND_SRC_ALPHA=32971;t.CONSTANT_COLOR=32769;t.ONE_MINUS_CONSTANT_COLOR=32770;t.CONSTANT_ALPHA=32771;t.ONE_MINUS_CONSTANT_ALPHA=32772;t.BLEND_COLOR=32773;t.ARRAY_BUFFER=34962;t.ELEMENT_ARRAY_BUFFER=34963;t.ARRAY_BUFFER_BINDING=34964;t.ELEMENT_ARRAY_BUFFER_BINDING=
34965;t.STREAM_DRAW=35040;t.STATIC_DRAW=35044;t.DYNAMIC_DRAW=35048;t.BUFFER_SIZE=34660;t.BUFFER_USAGE=34661;t.CURRENT_VERTEX_ATTRIB=34342;t.FRONT=1028;t.BACK=1029;t.FRONT_AND_BACK=1032;t.CULL_FACE=2884;t.BLEND=3042;t.DITHER=3024;t.STENCIL_TEST=2960;t.DEPTH_TEST=2929;t.SCISSOR_TEST=3089;t.POLYGON_OFFSET_FILL=32823;t.SAMPLE_ALPHA_TO_COVERAGE=32926;t.SAMPLE_COVERAGE=32928;t.NO_ERROR=0;t.INVALID_ENUM=1280;t.INVALID_VALUE=1281;t.INVALID_OPERATION=1282;t.OUT_OF_MEMORY=1285;t.CW=2304;t.CCW=2305;t.LINE_WIDTH=
2849;t.ALIASED_POINT_SIZE_RANGE=33901;t.ALIASED_LINE_WIDTH_RANGE=33902;t.CULL_FACE_MODE=2885;t.FRONT_FACE=2886;t.DEPTH_RANGE=2928;t.DEPTH_WRITEMASK=2930;t.DEPTH_CLEAR_VALUE=2931;t.DEPTH_FUNC=2932;t.STENCIL_CLEAR_VALUE=2961;t.STENCIL_FUNC=2962;t.STENCIL_FAIL=2964;t.STENCIL_PASS_DEPTH_FAIL=2965;t.STENCIL_PASS_DEPTH_PASS=2966;t.STENCIL_REF=2967;t.STENCIL_VALUE_MASK=2963;t.STENCIL_WRITEMASK=2968;t.STENCIL_BACK_FUNC=34816;t.STENCIL_BACK_FAIL=34817;t.STENCIL_BACK_PASS_DEPTH_FAIL=34818;t.STENCIL_BACK_PASS_DEPTH_PASS=
34819;t.STENCIL_BACK_REF=36003;t.STENCIL_BACK_VALUE_MASK=36004;t.STENCIL_BACK_WRITEMASK=36005;t.VIEWPORT=2978;t.SCISSOR_BOX=3088;t.COLOR_CLEAR_VALUE=3106;t.COLOR_WRITEMASK=3107;t.UNPACK_ALIGNMENT=3317;t.PACK_ALIGNMENT=3333;t.MAX_TEXTURE_SIZE=3379;t.MAX_VIEWPORT_DIMS=3386;t.SUBPIXEL_BITS=3408;t.RED_BITS=3410;t.GREEN_BITS=3411;t.BLUE_BITS=3412;t.ALPHA_BITS=3413;t.DEPTH_BITS=3414;t.STENCIL_BITS=3415;t.POLYGON_OFFSET_UNITS=10752;t.POLYGON_OFFSET_FACTOR=32824;t.TEXTURE_BINDING_2D=32873;t.SAMPLE_BUFFERS=
32936;t.SAMPLES=32937;t.SAMPLE_COVERAGE_VALUE=32938;t.SAMPLE_COVERAGE_INVERT=32939;t.NUM_COMPRESSED_TEXTURE_FORMATS=34466;t.COMPRESSED_TEXTURE_FORMATS=34467;t.DONT_CARE=4352;t.FASTEST=4353;t.NICEST=4354;t.GENERATE_MIPMAP_HINT=33170;t.BYTE=5120;t.UNSIGNED_BYTE=5121;t.SHORT=5122;t.UNSIGNED_SHORT=5123;t.INT=5124;t.UNSIGNED_INT=5125;t.FLOAT=5126;t.DEPTH_COMPONENT=6402;t.ALPHA=6406;t.RGB=6407;t.RGBA=6408;t.LUMINANCE=6409;t.LUMINANCE_ALPHA=6410;t.UNSIGNED_SHORT_4_4_4_4=32819;t.UNSIGNED_SHORT_5_5_5_1=32820;
t.UNSIGNED_SHORT_5_6_5=33635;t.FRAGMENT_SHADER=35632;t.VERTEX_SHADER=35633;t.MAX_VERTEX_ATTRIBS=34921;t.MAX_VERTEX_UNIFORM_VECTORS=36347;t.MAX_VARYING_VECTORS=36348;t.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;t.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660;t.MAX_TEXTURE_IMAGE_UNITS=34930;t.MAX_FRAGMENT_UNIFORM_VECTORS=36349;t.SHADER_TYPE=35663;t.DELETE_STATUS=35712;t.LINK_STATUS=35714;t.VALIDATE_STATUS=35715;t.ATTACHED_SHADERS=35717;t.ACTIVE_UNIFORMS=35718;t.ACTIVE_ATTRIBUTES=35721;t.SHADING_LANGUAGE_VERSION=
35724;t.CURRENT_PROGRAM=35725;t.NEVER=512;t.LESS=513;t.EQUAL=514;t.LEQUAL=515;t.GREATER=516;t.NOTEQUAL=517;t.GEQUAL=518;t.ALWAYS=519;t.KEEP=7680;t.REPLACE=7681;t.INCR=7682;t.DECR=7683;t.INVERT=5386;t.INCR_WRAP=34055;t.DECR_WRAP=34056;t.VENDOR=7936;t.RENDERER=7937;t.VERSION=7938;t.EXTENSIONS=7939;t.NEAREST=9728;t.LINEAR=9729;t.NEAREST_MIPMAP_NEAREST=9984;t.LINEAR_MIPMAP_NEAREST=9985;t.NEAREST_MIPMAP_LINEAR=9986;t.LINEAR_MIPMAP_LINEAR=9987;t.TEXTURE_MAG_FILTER=10240;t.TEXTURE_MIN_FILTER=10241;t.TEXTURE_WRAP_S=
10242;t.TEXTURE_WRAP_T=10243;t.TEXTURE_2D=3553;t.TEXTURE=5890;t.TEXTURE_CUBE_MAP=34067;t.TEXTURE_BINDING_CUBE_MAP=34068;t.TEXTURE_CUBE_MAP_POSITIVE_X=34069;t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072;t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;t.MAX_CUBE_MAP_TEXTURE_SIZE=34076;t.TEXTURE0=33984;t.TEXTURE1=33985;t.TEXTURE2=33986;t.TEXTURE3=33987;t.TEXTURE4=33988;t.TEXTURE5=33989;t.TEXTURE6=33990;t.TEXTURE7=33991;
t.TEXTURE8=33992;t.TEXTURE9=33993;t.TEXTURE10=33994;t.TEXTURE11=33995;t.TEXTURE12=33996;t.TEXTURE13=33997;t.TEXTURE14=33998;t.TEXTURE15=33999;t.TEXTURE16=34E3;t.TEXTURE17=34001;t.TEXTURE18=34002;t.TEXTURE19=34003;t.TEXTURE20=34004;t.TEXTURE21=34005;t.TEXTURE22=34006;t.TEXTURE23=34007;t.TEXTURE24=34008;t.TEXTURE25=34009;t.TEXTURE26=34010;t.TEXTURE27=34011;t.TEXTURE28=34012;t.TEXTURE29=34013;t.TEXTURE30=34014;t.TEXTURE31=34015;t.ACTIVE_TEXTURE=34016;t.REPEAT=10497;t.CLAMP_TO_EDGE=33071;t.MIRRORED_REPEAT=
33648;t.FLOAT_VEC2=35664;t.FLOAT_VEC3=35665;t.FLOAT_VEC4=35666;t.INT_VEC2=35667;t.INT_VEC3=35668;t.INT_VEC4=35669;t.BOOL=35670;t.BOOL_VEC2=35671;t.BOOL_VEC3=35672;t.BOOL_VEC4=35673;t.FLOAT_MAT2=35674;t.FLOAT_MAT3=35675;t.FLOAT_MAT4=35676;t.SAMPLER_2D=35678;t.SAMPLER_CUBE=35680;t.VERTEX_ATTRIB_ARRAY_ENABLED=34338;t.VERTEX_ATTRIB_ARRAY_SIZE=34339;t.VERTEX_ATTRIB_ARRAY_STRIDE=34340;t.VERTEX_ATTRIB_ARRAY_TYPE=34341;t.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922;t.VERTEX_ATTRIB_ARRAY_POINTER=34373;t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=
34975;t.IMPLEMENTATION_COLOR_READ_TYPE=35738;t.IMPLEMENTATION_COLOR_READ_FORMAT=35739;t.VERTEX_PROGRAM_POINT_SIZE=34370;t.POINT_SPRITE=34913;t.COMPILE_STATUS=35713;t.LOW_FLOAT=36336;t.MEDIUM_FLOAT=36337;t.HIGH_FLOAT=36338;t.LOW_INT=36339;t.MEDIUM_INT=36340;t.HIGH_INT=36341;t.FRAMEBUFFER=36160;t.RENDERBUFFER=36161;t.RGBA4=32854;t.RGB5_A1=32855;t.RGB565=36194;t.DEPTH_COMPONENT16=33189;t.STENCIL_INDEX=6401;t.STENCIL_INDEX8=36168;t.DEPTH_STENCIL=34041;t.RENDERBUFFER_WIDTH=36162;t.RENDERBUFFER_HEIGHT=
36163;t.RENDERBUFFER_INTERNAL_FORMAT=36164;t.RENDERBUFFER_RED_SIZE=36176;t.RENDERBUFFER_GREEN_SIZE=36177;t.RENDERBUFFER_BLUE_SIZE=36178;t.RENDERBUFFER_ALPHA_SIZE=36179;t.RENDERBUFFER_DEPTH_SIZE=36180;t.RENDERBUFFER_STENCIL_SIZE=36181;t.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;t.COLOR_ATTACHMENT0=36064;t.DEPTH_ATTACHMENT=36096;t.STENCIL_ATTACHMENT=36128;t.DEPTH_STENCIL_ATTACHMENT=
33306;t.NONE=0;t.FRAMEBUFFER_COMPLETE=36053;t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;t.FRAMEBUFFER_UNSUPPORTED=36061;t.FRAMEBUFFER_BINDING=36006;t.RENDERBUFFER_BINDING=36007;t.MAX_RENDERBUFFER_SIZE=34024;t.INVALID_FRAMEBUFFER_OPERATION=1286;t.UNPACK_FLIP_Y_WEBGL=37440;t.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;t.CONTEXT_LOST_WEBGL=37442;t.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;t.BROWSER_DEFAULT_WEBGL=37444;
t.READ_BUFFER=3074;t.UNPACK_ROW_LENGTH=3314;t.UNPACK_SKIP_ROWS=3315;t.UNPACK_SKIP_PIXELS=3316;t.PACK_ROW_LENGTH=3330;t.PACK_SKIP_ROWS=3331;t.PACK_SKIP_PIXELS=3332;t.TEXTURE_BINDING_3D=32874;t.UNPACK_SKIP_IMAGES=32877;t.UNPACK_IMAGE_HEIGHT=32878;t.MAX_3D_TEXTURE_SIZE=32883;t.MAX_ELEMENTS_VERTICES=33E3;t.MAX_ELEMENTS_INDICES=33001;t.MAX_TEXTURE_LOD_BIAS=34045;t.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657;t.MAX_VERTEX_UNIFORM_COMPONENTS=35658;t.MAX_ARRAY_TEXTURE_LAYERS=35071;t.MIN_PROGRAM_TEXEL_OFFSET=35076;
t.MAX_PROGRAM_TEXEL_OFFSET=35077;t.MAX_VARYING_COMPONENTS=35659;t.FRAGMENT_SHADER_DERIVATIVE_HINT=35723;t.RASTERIZER_DISCARD=35977;t.VERTEX_ARRAY_BINDING=34229;t.MAX_VERTEX_OUTPUT_COMPONENTS=37154;t.MAX_FRAGMENT_INPUT_COMPONENTS=37157;t.MAX_SERVER_WAIT_TIMEOUT=37137;t.MAX_ELEMENT_INDEX=36203;t.RED=6403;t.RGB8=32849;t.RGBA8=32856;t.RGB10_A2=32857;t.TEXTURE_3D=32879;t.TEXTURE_WRAP_R=32882;t.TEXTURE_MIN_LOD=33082;t.TEXTURE_MAX_LOD=33083;t.TEXTURE_BASE_LEVEL=33084;t.TEXTURE_MAX_LEVEL=33085;t.TEXTURE_COMPARE_MODE=
34892;t.TEXTURE_COMPARE_FUNC=34893;t.SRGB=35904;t.SRGB8=35905;t.SRGB8_ALPHA8=35907;t.COMPARE_REF_TO_TEXTURE=34894;t.RGBA32F=34836;t.RGB32F=34837;t.RGBA16F=34842;t.RGB16F=34843;t.TEXTURE_2D_ARRAY=35866;t.TEXTURE_BINDING_2D_ARRAY=35869;t.R11F_G11F_B10F=35898;t.RGB9_E5=35901;t.RGBA32UI=36208;t.RGB32UI=36209;t.RGBA16UI=36214;t.RGB16UI=36215;t.RGBA8UI=36220;t.RGB8UI=36221;t.RGBA32I=36226;t.RGB32I=36227;t.RGBA16I=36232;t.RGB16I=36233;t.RGBA8I=36238;t.RGB8I=36239;t.RED_INTEGER=36244;t.RGB_INTEGER=36248;
t.RGBA_INTEGER=36249;t.R8=33321;t.RG8=33323;t.R16F=33325;t.R32F=33326;t.RG16F=33327;t.RG32F=33328;t.R8I=33329;t.R8UI=33330;t.R16I=33331;t.R16UI=33332;t.R32I=33333;t.R32UI=33334;t.RG8I=33335;t.RG8UI=33336;t.RG16I=33337;t.RG16UI=33338;t.RG32I=33339;t.RG32UI=33340;t.R8_SNORM=36756;t.RG8_SNORM=36757;t.RGB8_SNORM=36758;t.RGBA8_SNORM=36759;t.RGB10_A2UI=36975;t.TEXTURE_IMMUTABLE_FORMAT=37167;t.TEXTURE_IMMUTABLE_LEVELS=33503;t.UNSIGNED_INT_2_10_10_10_REV=33640;t.UNSIGNED_INT_10F_11F_11F_REV=35899;t.UNSIGNED_INT_5_9_9_9_REV=
35902;t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269;t.UNSIGNED_INT_24_8=34042;t.HALF_FLOAT=5131;t.RG=33319;t.RG_INTEGER=33320;t.INT_2_10_10_10_REV=36255;t.CURRENT_QUERY=34917;t.QUERY_RESULT=34918;t.QUERY_RESULT_AVAILABLE=34919;t.ANY_SAMPLES_PASSED=35887;t.ANY_SAMPLES_PASSED_CONSERVATIVE=36202;t.MAX_DRAW_BUFFERS=34852;t.DRAW_BUFFER0=34853;t.DRAW_BUFFER1=34854;t.DRAW_BUFFER2=34855;t.DRAW_BUFFER3=34856;t.DRAW_BUFFER4=34857;t.DRAW_BUFFER5=34858;t.DRAW_BUFFER6=34859;t.DRAW_BUFFER7=34860;t.DRAW_BUFFER8=34861;
t.DRAW_BUFFER9=34862;t.DRAW_BUFFER10=34863;t.DRAW_BUFFER11=34864;t.DRAW_BUFFER12=34865;t.DRAW_BUFFER13=34866;t.DRAW_BUFFER14=34867;t.DRAW_BUFFER15=34868;t.MAX_COLOR_ATTACHMENTS=36063;t.COLOR_ATTACHMENT1=36065;t.COLOR_ATTACHMENT2=36066;t.COLOR_ATTACHMENT3=36067;t.COLOR_ATTACHMENT4=36068;t.COLOR_ATTACHMENT5=36069;t.COLOR_ATTACHMENT6=36070;t.COLOR_ATTACHMENT7=36071;t.COLOR_ATTACHMENT8=36072;t.COLOR_ATTACHMENT9=36073;t.COLOR_ATTACHMENT10=36074;t.COLOR_ATTACHMENT11=36075;t.COLOR_ATTACHMENT12=36076;t.COLOR_ATTACHMENT13=
36077;t.COLOR_ATTACHMENT14=36078;t.COLOR_ATTACHMENT15=36079;t.SAMPLER_3D=35679;t.SAMPLER_2D_SHADOW=35682;t.SAMPLER_2D_ARRAY=36289;t.SAMPLER_2D_ARRAY_SHADOW=36292;t.SAMPLER_CUBE_SHADOW=36293;t.INT_SAMPLER_2D=36298;t.INT_SAMPLER_3D=36299;t.INT_SAMPLER_CUBE=36300;t.INT_SAMPLER_2D_ARRAY=36303;t.UNSIGNED_INT_SAMPLER_2D=36306;t.UNSIGNED_INT_SAMPLER_3D=36307;t.UNSIGNED_INT_SAMPLER_CUBE=36308;t.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311;t.MAX_SAMPLES=36183;t.SAMPLER_BINDING=35097;t.PIXEL_PACK_BUFFER=35051;t.PIXEL_UNPACK_BUFFER=
35052;t.PIXEL_PACK_BUFFER_BINDING=35053;t.PIXEL_UNPACK_BUFFER_BINDING=35055;t.COPY_READ_BUFFER=36662;t.COPY_WRITE_BUFFER=36663;t.COPY_READ_BUFFER_BINDING=36662;t.COPY_WRITE_BUFFER_BINDING=36663;t.FLOAT_MAT2x3=35685;t.FLOAT_MAT2x4=35686;t.FLOAT_MAT3x2=35687;t.FLOAT_MAT3x4=35688;t.FLOAT_MAT4x2=35689;t.FLOAT_MAT4x3=35690;t.UNSIGNED_INT_VEC2=36294;t.UNSIGNED_INT_VEC3=36295;t.UNSIGNED_INT_VEC4=36296;t.UNSIGNED_NORMALIZED=35863;t.SIGNED_NORMALIZED=36764;t.VERTEX_ATTRIB_ARRAY_INTEGER=35069;t.VERTEX_ATTRIB_ARRAY_DIVISOR=
35070;t.TRANSFORM_FEEDBACK_BUFFER_MODE=35967;t.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968;t.TRANSFORM_FEEDBACK_VARYINGS=35971;t.TRANSFORM_FEEDBACK_BUFFER_START=35972;t.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973;t.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976;t.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978;t.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979;t.INTERLEAVED_ATTRIBS=35980;t.SEPARATE_ATTRIBS=35981;t.TRANSFORM_FEEDBACK_BUFFER=35982;t.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983;t.TRANSFORM_FEEDBACK=
36386;t.TRANSFORM_FEEDBACK_PAUSED=36387;t.TRANSFORM_FEEDBACK_ACTIVE=36388;t.TRANSFORM_FEEDBACK_BINDING=36389;t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296;t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297;t.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298;t.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299;t.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300;t.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301;t.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302;t.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303;t.FRAMEBUFFER_DEFAULT=33304;t.DEPTH24_STENCIL8=35056;
t.DRAW_FRAMEBUFFER_BINDING=36006;t.READ_FRAMEBUFFER=36008;t.DRAW_FRAMEBUFFER=36009;t.READ_FRAMEBUFFER_BINDING=36010;t.RENDERBUFFER_SAMPLES=36011;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052;t.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182;t.UNIFORM_BUFFER=35345;t.UNIFORM_BUFFER_BINDING=35368;t.UNIFORM_BUFFER_START=35369;t.UNIFORM_BUFFER_SIZE=35370;t.MAX_VERTEX_UNIFORM_BLOCKS=35371;t.MAX_FRAGMENT_UNIFORM_BLOCKS=35373;t.MAX_COMBINED_UNIFORM_BLOCKS=35374;t.MAX_UNIFORM_BUFFER_BINDINGS=35375;t.MAX_UNIFORM_BLOCK_SIZE=
35376;t.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377;t.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379;t.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380;t.ACTIVE_UNIFORM_BLOCKS=35382;t.UNIFORM_TYPE=35383;t.UNIFORM_SIZE=35384;t.UNIFORM_BLOCK_INDEX=35386;t.UNIFORM_OFFSET=35387;t.UNIFORM_ARRAY_STRIDE=35388;t.UNIFORM_MATRIX_STRIDE=35389;t.UNIFORM_IS_ROW_MAJOR=35390;t.UNIFORM_BLOCK_BINDING=35391;t.UNIFORM_BLOCK_DATA_SIZE=35392;t.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394;t.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395;t.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=
35396;t.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398;t.OBJECT_TYPE=37138;t.SYNC_CONDITION=37139;t.SYNC_STATUS=37140;t.SYNC_FLAGS=37141;t.SYNC_FENCE=37142;t.SYNC_GPU_COMMANDS_COMPLETE=37143;t.UNSIGNALED=37144;t.SIGNALED=37145;t.ALREADY_SIGNALED=37146;t.TIMEOUT_EXPIRED=37147;t.CONDITION_SATISFIED=37148;t.WAIT_FAILED=37149;t.SYNC_FLUSH_COMMANDS_BIT=1;t.COLOR=6144;t.DEPTH=6145;t.STENCIL=6146;t.MIN=32775;t.MAX=32776;t.DEPTH_COMPONENT24=33190;t.STREAM_READ=35041;t.STREAM_COPY=35042;t.STATIC_READ=35045;
t.STATIC_COPY=35046;t.DYNAMIC_READ=35049;t.DYNAMIC_COPY=35050;t.DEPTH_COMPONENT32F=36012;t.DEPTH32F_STENCIL8=36013;t.INVALID_INDEX=-1;t.TIMEOUT_IGNORED=-1;t.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447;Hd.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];ta.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];B.NONE=0;B.FALSE=0;B.TRUE=1;B.SOURCE_RELATIVE=514;B.CONE_INNER_ANGLE=4097;B.CONE_OUTER_ANGLE=4098;B.PITCH=4099;B.POSITION=4100;B.DIRECTION=4101;B.VELOCITY=4102;B.LOOPING=4103;B.BUFFER=4105;B.GAIN=4106;B.MIN_GAIN=
4109;B.MAX_GAIN=4110;B.ORIENTATION=4111;B.SOURCE_STATE=4112;B.INITIAL=4113;B.PLAYING=4114;B.PAUSED=4115;B.STOPPED=4116;B.BUFFERS_QUEUED=4117;B.BUFFERS_PROCESSED=4118;B.REFERENCE_DISTANCE=4128;B.ROLLOFF_FACTOR=4129;B.CONE_OUTER_GAIN=4130;B.MAX_DISTANCE=4131;B.SEC_OFFSET=4132;B.SAMPLE_OFFSET=4133;B.BYTE_OFFSET=4134;B.SOURCE_TYPE=4135;B.STATIC=4136;B.STREAMING=4137;B.UNDETERMINED=4144;B.FORMAT_MONO8=4352;B.FORMAT_MONO16=4353;B.FORMAT_STEREO8=4354;B.FORMAT_STEREO16=4355;B.FREQUENCY=8193;B.BITS=8194;B.CHANNELS=
8195;B.SIZE=8196;B.NO_ERROR=0;B.INVALID_NAME=40961;B.INVALID_ENUM=40962;B.INVALID_VALUE=40963;B.INVALID_OPERATION=40964;B.OUT_OF_MEMORY=40965;B.VENDOR=45057;B.VERSION=45058;B.RENDERER=45059;B.EXTENSIONS=45060;B.DOPPLER_FACTOR=49152;B.SPEED_OF_SOUND=49155;B.DOPPLER_VELOCITY=49153;B.DISTANCE_MODEL=53248;B.INVERSE_DISTANCE=53249;B.INVERSE_DISTANCE_CLAMPED=53250;B.LINEAR_DISTANCE=53251;B.LINEAR_DISTANCE_CLAMPED=53252;B.EXPONENT_DISTANCE=53253;B.EXPONENT_DISTANCE_CLAMPED=53254;B.METERS_PER_UNIT=131076;
B.DIRECT_FILTER=131077;B.AUXILIARY_SEND_FILTER=131078;B.AIR_ABSORPTION_FACTOR=131079;B.ROOM_ROLLOFF_FACTOR=131080;B.CONE_OUTER_GAINHF=131081;B.DIRECT_FILTER_GAINHF_AUTO=131082;B.AUXILIARY_SEND_FILTER_GAIN_AUTO=131083;B.AUXILIARY_SEND_FILTER_GAINHF_AUTO=131084;B.REVERB_DENSITY=1;B.REVERB_DIFFUSION=2;B.REVERB_GAIN=3;B.REVERB_GAINHF=4;B.REVERB_DECAY_TIME=5;B.REVERB_DECAY_HFRATIO=6;B.REVERB_REFLECTIONS_GAIN=7;B.REVERB_REFLECTIONS_DELAY=8;B.REVERB_LATE_REVERB_GAIN=9;B.REVERB_LATE_REVERB_DELAY=10;B.REVERB_AIR_ABSORPTION_GAINHF=
11;B.REVERB_ROOM_ROLLOFF_FACTOR=12;B.REVERB_DECAY_HFLIMIT=13;B.EAXREVERB_DENSITY=1;B.EAXREVERB_DIFFUSION=2;B.EAXREVERB_GAIN=3;B.EAXREVERB_GAINHF=4;B.EAXREVERB_GAINLF=5;B.EAXREVERB_DECAY_TIME=6;B.EAXREVERB_DECAY_HFRATIO=7;B.EAXREVERB_DECAY_LFRATIO=8;B.EAXREVERB_REFLECTIONS_GAIN=9;B.EAXREVERB_REFLECTIONS_DELAY=10;B.EAXREVERB_REFLECTIONS_PAN=11;B.EAXREVERB_LATE_REVERB_GAIN=12;B.EAXREVERB_LATE_REVERB_DELAY=13;B.EAXREVERB_LATE_REVERB_PAN=14;B.EAXREVERB_ECHO_TIME=15;B.EAXREVERB_ECHO_DEPTH=16;B.EAXREVERB_MODULATION_TIME=
17;B.EAXREVERB_MODULATION_DEPTH=18;B.EAXREVERB_AIR_ABSORPTION_GAINHF=19;B.EAXREVERB_HFREFERENCE=20;B.EAXREVERB_LFREFERENCE=21;B.EAXREVERB_ROOM_ROLLOFF_FACTOR=22;B.EAXREVERB_DECAY_HFLIMIT=23;B.CHORUS_WAVEFORM=1;B.CHORUS_PHASE=2;B.CHORUS_RATE=3;B.CHORUS_DEPTH=4;B.CHORUS_FEEDBACK=5;B.CHORUS_DELAY=6;B.DISTORTION_EDGE=1;B.DISTORTION_GAIN=2;B.DISTORTION_LOWPASS_CUTOFF=3;B.DISTORTION_EQCENTER=4;B.DISTORTION_EQBANDWIDTH=5;B.ECHO_DELAY=1;B.ECHO_LRDELAY=2;B.ECHO_DAMPING=3;B.ECHO_FEEDBACK=4;B.ECHO_SPREAD=5;
B.FLANGER_WAVEFORM=1;B.FLANGER_PHASE=2;B.FLANGER_RATE=3;B.FLANGER_DEPTH=4;B.FLANGER_FEEDBACK=5;B.FLANGER_DELAY=6;B.FREQUENCY_SHIFTER_FREQUENCY=1;B.FREQUENCY_SHIFTER_LEFT_DIRECTION=2;B.FREQUENCY_SHIFTER_RIGHT_DIRECTION=3;B.VOCAL_MORPHER_PHONEMEA=1;B.VOCAL_MORPHER_PHONEMEA_COARSE_TUNING=2;B.VOCAL_MORPHER_PHONEMEB=3;B.VOCAL_MORPHER_PHONEMEB_COARSE_TUNING=4;B.VOCAL_MORPHER_WAVEFORM=5;B.VOCAL_MORPHER_RATE=6;B.PITCH_SHIFTER_COARSE_TUNE=1;B.PITCH_SHIFTER_FINE_TUNE=2;B.RING_MODULATOR_FREQUENCY=1;B.RING_MODULATOR_HIGHPASS_CUTOFF=
2;B.RING_MODULATOR_WAVEFORM=3;B.AUTOWAH_ATTACK_TIME=1;B.AUTOWAH_RELEASE_TIME=2;B.AUTOWAH_RESONANCE=3;B.AUTOWAH_PEAK_GAIN=4;B.COMPRESSOR_ONOFF=1;B.EQUALIZER_LOW_GAIN=1;B.EQUALIZER_LOW_CUTOFF=2;B.EQUALIZER_MID1_GAIN=3;B.EQUALIZER_MID1_CENTER=4;B.EQUALIZER_MID1_WIDTH=5;B.EQUALIZER_MID2_GAIN=6;B.EQUALIZER_MID2_CENTER=7;B.EQUALIZER_MID2_WIDTH=8;B.EQUALIZER_HIGH_GAIN=9;B.EQUALIZER_HIGH_CUTOFF=10;B.EFFECT_FIRST_PARAMETER=0;B.EFFECT_LAST_PARAMETER=32768;B.EFFECT_TYPE=32769;B.EFFECT_NULL=0;B.EFFECT_EAXREVERB=
32768;B.EFFECT_REVERB=1;B.EFFECT_CHORUS=2;B.EFFECT_DISTORTION=3;B.EFFECT_ECHO=4;B.EFFECT_FLANGER=5;B.EFFECT_FREQUENCY_SHIFTER=6;B.EFFECT_VOCAL_MORPHER=7;B.EFFECT_PITCH_SHIFTER=8;B.EFFECT_RING_MODULATOR=9;B.FFECT_AUTOWAH=10;B.EFFECT_COMPRESSOR=11;B.EFFECT_EQUALIZER=12;B.EFFECTSLOT_EFFECT=1;B.EFFECTSLOT_GAIN=2;B.EFFECTSLOT_AUXILIARY_SEND_AUTO=3;B.LOWPASS_GAIN=1;B.LOWPASS_GAINHF=2;B.HIGHPASS_GAIN=1;B.HIGHPASS_GAINLF=2;B.BANDPASS_GAIN=1;B.BANDPASS_GAINLF=2;B.BANDPASS_GAINHF=3;B.FILTER_FIRST_PARAMETER=
0;B.FILTER_LAST_PARAMETER=32768;B.FILTER_TYPE=32769;B.FILTER_NULL=0;B.FILTER_LOWPASS=1;B.FILTER_HIGHPASS=2;B.FILTER_BANDPASS=3;Gb.FALSE=0;Gb.TRUE=1;Gb.FREQUENCY=4103;Gb.REFRESH=4104;Gb.SYNC=4105;Gb.MONO_SOURCES=4112;Gb.STEREO_SOURCES=4113;Gb.NO_ERROR=0;Gb.INVALID_DEVICE=40961;Gb.INVALID_CONTEXT=40962;Gb.INVALID_ENUM=40963;Gb.INVALID_VALUE=40964;Gb.OUT_OF_MEMORY=40965;Gb.ATTRIBUTES_SIZE=4098;Gb.ALL_ATTRIBUTES=4099;Gb.DEFAULT_DEVICE_SPECIFIER=4100;Gb.DEVICE_SPECIFIER=4101;Gb.EXTENSIONS=4102;Gb.ENUMERATE_ALL_EXT=
1;Gb.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Gb.ALL_DEVICES_SPECIFIER=4115;he.onUpdate=new Bd;re.alreadyCreated=new ia;re.initialized=!1;Pf.sensorByID=new Xa;Pf.sensors=[];Qa.__directories=new Xa;Gd.devices=new Xa;Gd.onConnect=new Go;Xc.devices=new Xa;Xc.onConnect=new Ho;zb.NONE=0;zb.LEFT_SHIFT=1;zb.RIGHT_SHIFT=2;zb.LEFT_CTRL=64;zb.RIGHT_CTRL=128;zb.LEFT_ALT=256;zb.RIGHT_ALT=512;zb.LEFT_META=1024;zb.RIGHT_META=2048;zb.NUM_LOCK=4096;zb.CAPS_LOCK=8192;zb.MODE=16384;zb.CTRL=192;zb.SHIFT=3;zb.ALT=768;zb.META=
3072;kd.onCancel=new Hi;kd.onEnd=new Hi;kd.onMove=new Hi;kd.onStart=new Hi;sa.cache=new Ro;sa.onChange=new Bd;sa.bundlePaths=new ia;sa.libraries=new ia;sa.libraryPaths=new ia;Rg.BYTES_PER_ELEMENT=4;xc.throwErrors=!0;Ur.VERSION=2;Da.__lastTimerID=0;Da.__sentWarnings=new ia;Da.__timers=new Xa;Da.__registeredClassAliases=new ia;Ug.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Cf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Ef.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ff.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Df.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};nf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},
toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};ej.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};La.__meta__={fields:{image:{SuppressWarnings:["checkstyle:Dynamic"]},__framebufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__indexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__surface:{SuppressWarnings:["checkstyle:Dynamic"]},__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__vertexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},
compare:{SuppressWarnings:["checkstyle:Dynamic"]},getSurface:{SuppressWarnings:["checkstyle:Dynamic"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};La.VERTEX_BUFFER_STRIDE=14;La.__tempVector=new Vd;Re.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};Am.__meta__={fields:{cairo:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix3:{SuppressWarnings:["checkstyle:Dynamic"]},applyMatrix:{SuppressWarnings:["checkstyle:Dynamic"]},
__setBlendModeCairo:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Vg.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};xr.NONE=0;xr.ROUND=1;xr.SQUARE=2;Em.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},
_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Tj.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},applyStyle:{SuppressWarnings:["checkstyle:Dynamic"]},clearStyle:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Te.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ki.SIN45=.7071067811865476;Ki.TAN22=.41421356237309503;Ar.BEVEL=0;Ar.MITER=1;Ar.ROUND=2;xj.__meta__={fields:{BitmapData_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Kf.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};Kf.__rootURL=Qg.get_supported()?window.document.URL:"";Cb.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]},getMatrix:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Cb.__alphaValue=[1];Cb.__colorMultipliersValue=[0,0,0,0];Cb.__colorOffsetsValue=[0,0,0,0];Cb.__defaultColorMultipliersValue=[1,1,1,1];Cb.__emptyColorValue=[0,0,0,0];Cb.__emptyAlphaValue=[1];Cb.__hasColorTransformValue=[!1];Cb.__scissorRectangle=new fa;Cb.__textureSizeValue=[0,0];Yo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};Tm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};dl.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},
name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};si.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ni.__meta__={fields:{__broadcastEvent:{SuppressWarnings:["checkstyle:Dynamic"]},__dispatchEvent:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchStack:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchTarget:{SuppressWarnings:["checkstyle:Dynamic"]},__handleError:{SuppressWarnings:["checkstyle:Dynamic"]}}};
fg.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};Um.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Sj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Xm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Ym.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ji.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};vh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ae.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Ae.empty=new Ae;z.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};z.SIN45=.7071067811865476;z.TAN22=.41421356237309503;z.fillCommands=new Ae;z.strokeCommands=new Ae;Fr.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Z.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Vf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Th.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};tf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xh.MAX_INDEX_BUFFER_LENGTH=65535;xh.MAX_QUADS_PER_INDEX_BUFFER=10922;xh.MAX_QUAD_INDEX_BUFFER_LENGTH=65532;Xg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Qc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Qc.blankBitmapData=new La(1,1,!1,0);Qc.tempColorTransform=new Kc(1,1,1,1,0,0,0,0);Uh.opaqueBitmapData=new La(1,1,!1,0);Zf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ea.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};uf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};uf.__textureSizeValue=[0,0];yc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
He.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};wf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ie.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ie.__regexColor=new aa("color=(\"#([^\"]+)\"|'#([^']+)')","i");Ie.__regexFace=new aa("face=(\"([^\"]+)\"|'([^']+)')","i");Ie.__regexFont=new aa("<font ([^>]+)>","gi");Ie.__regexCloseFont=new aa("</font>","gi");Ie.__regexSize=new aa("size=(\"([^\"]+)\"|'([^']+)')","i");Ag.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Wg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};yh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zh.alphaColorTransform=new Kc;Zh.bitmap=new dd;Zh.destPoint=new pa;Zh.sourceRect=new fa;Sh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};
Sh.P=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,
82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,
240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,
70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];Ng.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Im.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Ub.supportsVideoTexture=!0;Ub.__glDepthStencil=-1;Ub.__glMaxTextureMaxAnisotropy=-1;Ub.__glMaxViewportDims=-1;Ub.__glMemoryCurrentAvailable=-1;Ub.__glMemoryTotalAvailable=-1;Ub.__glTextureMaxAnisotropy=-1;Gr.DYNAMIC_DRAW=0;Gr.STATIC_DRAW=1;Hr.FRAGMENT=0;Hr.VERTEX=1;Xj.BGR_PACKED=0;Xj.BGRA=1;Xj.BGRA_PACKED=2;Xj.COMPRESSED=3;Xj.COMPRESSED_ALPHA=4;Xj.RGBA_HALF_FLOAT=5;bn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Be.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Be.limitedProfile=!0;Si.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ti.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ai.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ac.__meta__=
{fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};$h.__lowMemoryMode=!1;wc.DEFAULT_TO_STRING="Error";ah.ACTIVITY="activity";cf.LINK="link";cf.TEXT_INPUT="textInput";te.ERROR="error";gj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yf.FOCUS_IN="focusIn";Yf.FOCUS_OUT="focusOut";Yf.KEY_FOCUS_CHANGE="keyFocusChange";Yf.MOUSE_FOCUS_CHANGE=
"mouseFocusChange";Zg.FULL_SCREEN="fullScreen";Zg.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";Dg.DEVICE_ADDED="deviceAdded";Dg.DEVICE_REMOVED="deviceRemoved";Dg.DEVICE_UNUSABLE="deviceUnusable";bi.HTTP_RESPONSE_STATUS="httpResponseStatus";bi.HTTP_STATUS="httpStatus";lg.IO_ERROR="ioError";Wh.KEY_DOWN="keyDown";Wh.KEY_UP="keyUp";Kb.CLICK="click";Kb.DOUBLE_CLICK="doubleClick";Kb.MIDDLE_CLICK="middleClick";Kb.MIDDLE_MOUSE_DOWN="middleMouseDown";Kb.MIDDLE_MOUSE_UP="middleMouseUp";
Kb.MOUSE_DOWN="mouseDown";Kb.MOUSE_MOVE="mouseMove";Kb.MOUSE_OUT="mouseOut";Kb.MOUSE_OVER="mouseOver";Kb.MOUSE_UP="mouseUp";Kb.MOUSE_WHEEL="mouseWheel";Kb.RELEASE_OUTSIDE="releaseOutside";Kb.RIGHT_CLICK="rightClick";Kb.RIGHT_MOUSE_DOWN="rightMouseDown";Kb.RIGHT_MOUSE_UP="rightMouseUp";Kb.ROLL_OUT="rollOut";Kb.ROLL_OVER="rollOver";ci.NET_STATUS="netStatus";Bg.PROGRESS="progress";Bg.SOCKET_DATA="socketData";pg.CLEAR_DOM="clearDOM";pg.RENDER_CAIRO="renderCairo";pg.RENDER_CANVAS="renderCanvas";pg.RENDER_DOM=
"renderDOM";pg.RENDER_OPENGL="renderOpenGL";Vi.SECURITY_ERROR="securityError";Td.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Td.TOUCH_BEGIN="touchBegin";Td.TOUCH_END="touchEnd";Td.TOUCH_MOVE="touchMove";Td.TOUCH_OUT="touchOut";Td.TOUCH_OVER="touchOver";Td.TOUCH_ROLL_OUT="touchRollOut";Td.TOUCH_ROLL_OVER="touchRollOver";Td.TOUCH_TAP="touchTap";Oi.UNCAUGHT_ERROR="uncaughtError";ak.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Xe.__colorMatrixShader=
new ak;$d.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};pd.MAX_ACTIVE_CHANNELS=32;pd.__soundChannels=[];pd.__soundTransform=new gf;en.VERTEX_BUFFER_STRIDE=5;bk.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};bk.CONNECT_SUCCESS="NetConnection.Connect.Success";fn.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},
decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};id.defaultObjectEncoding=10;zh.followRedirects=!0;zh.idleTimeout=0;zh.manageCookies=!0;Nr.__meta__={statics:{__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Li.currentDomain=new Li(null);vc.avHardwareDisable=!0;vc.hasAccessibility=!1;vc.hasAudio=
!0;vc.hasAudioEncoder=!1;vc.hasEmbeddedVideo=!1;vc.hasIME=!1;vc.hasMP3=!1;vc.hasPrinting=!0;vc.hasScreenBroadcast=!1;vc.hasScreenPlayback=!1;vc.hasStreamingAudio=!1;vc.hasStreamingVideo=!1;vc.hasTLS=!0;vc.hasVideoEncoder=!0;vc.isDebugger=!0;vc.isEmbeddedInAcrobat=!1;vc.localFileReadDisable=!0;vc.maxLevelIDC=0;vc.playerType="PlugIn";vc.screenColor="color";vc.serverString="";vc.supports32BitProcesses=!1;vc.supports64BitProcesses=!1;vc.touchscreenType=0;vc.__standardDensities=[120,160,240,320,480,640,
800,960];ck.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};ck.currentDomain=new ck;dg.useCodePage=!1;Rc.__fontByName=new ia;Rc.__registeredFonts=[];gn.__supportedStyles="color display font-family font-size font-style font-weight kerning leading letter-spacing margin-left margin-right text-align text-decoration text-indent".split(" ");ef.__missingFontWarning=new ia;tg.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};dk.CENTER=0;dk.END=1;dk.JUSTIFY=
2;dk.LEFT=3;dk.RIGHT=4;dk.START=5;ek.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};kp.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};mb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mb.__regexAlign=new aa("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexBreakTag=new aa("<br\\s*/?>","gi");mb.__regexBlockIndent=new aa("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexClass=new aa("class\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");mb.__regexColor=new aa("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");mb.__regexEntities=[new aa("&quot;","g"),new aa("&apos;","g"),new aa("&amp;","g"),new aa("&lt;","g"),new aa("&gt;","g"),new aa("&nbsp;","g")];mb.__regexCharEntity=new aa("&#(?:([0-9]+)|(x[0-9a-fA-F]+));","g");mb.__regexFace=new aa("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexHTMLTag=new aa("<.*?>","g");mb.__regexHref=new aa("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexIndent=new aa(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");mb.__regexLeading=new aa("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexLeftMargin=new aa("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexRightMargin=new aa("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexSize=new aa("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");mb.__regexTabStops=new aa("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Yi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Qb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qb.GUTTER=2;Qb.UTF8_TAB=9;Qb.UTF8_ENDLINE=10;Qb.UTF8_SPACE=32;Qb.UTF8_HYPHEN=45;Rd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{glyphs:{SuppressWarnings:["checkstyle:Dynamic"]},__handle:{SuppressWarnings:["checkstyle:Dynamic"]},__hbBuffer:{SuppressWarnings:["checkstyle:Dynamic"]},__hbFont:{SuppressWarnings:["checkstyle:Dynamic"]},get_glyphs:{SuppressWarnings:["checkstyle:Dynamic"]}}};Rd.FT_LOAD_DEFAULT=0;Rd.FT_LOAD_NO_SCALE=
1;Rd.FT_LOAD_NO_HINTING=2;Rd.FT_LOAD_RENDER=4;Rd.FT_LOAD_NO_BITMAP=8;Rd.FT_LOAD_VERTICAL_LAYOUT=16;Rd.FT_LOAD_FORCE_AUTOHINT=32;Rd.FT_LOAD_CROP_BITMAP=64;Rd.FT_LOAD_PEDANTIC=128;Rd.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;Rd.FT_LOAD_NO_RECURSE=512;Rd.FT_LOAD_IGNORE_TRANSFORM=1024;Rd.FT_LOAD_MONOCHROME=2048;Rd.FT_LOAD_LINEAR_DESIGN=4096;Rd.FT_LOAD_NO_AUTOHINT=8192;Rd.FT_LOAD_COLOR=16384;Rd.FT_LOAD_COMPUTE_METRICS=32768;Rd.FT_LOAD_BITMAP_METRICS_ONLY=65536;Rd.FT_LOAD_TARGET_NORMAL=0;Rd.FT_LOAD_TARGET_LIGHT=
0;hn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Pb.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};Pb.isSupported=!0;Pb.numDevices=0;Pb.__deviceList=[];Pb.__instances=[];Pb.__devices=new Vb;jn.MAX_BUFFER_SIZE=32E3;Ea.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ea.NUMBER_0=48;Ea.NUMBER_1=49;Ea.NUMBER_2=50;Ea.NUMBER_3=51;Ea.NUMBER_4=52;Ea.NUMBER_5=53;Ea.NUMBER_6=
54;Ea.NUMBER_7=55;Ea.NUMBER_8=56;Ea.NUMBER_9=57;Ea.A=65;Ea.B=66;Ea.C=67;Ea.D=68;Ea.E=69;Ea.F=70;Ea.G=71;Ea.H=72;Ea.I=73;Ea.J=74;Ea.K=75;Ea.L=76;Ea.M=77;Ea.N=78;Ea.O=79;Ea.P=80;Ea.Q=81;Ea.R=82;Ea.S=83;Ea.T=84;Ea.U=85;Ea.V=86;Ea.W=87;Ea.X=88;Ea.Y=89;Ea.Z=90;Ea.NUMPAD_0=96;Ea.NUMPAD_1=97;Ea.NUMPAD_2=98;Ea.NUMPAD_3=99;Ea.NUMPAD_4=100;Ea.NUMPAD_5=101;Ea.NUMPAD_6=102;Ea.NUMPAD_7=103;Ea.NUMPAD_8=104;Ea.NUMPAD_9=105;Ea.NUMPAD_MULTIPLY=106;Ea.NUMPAD_ADD=107;Ea.NUMPAD_ENTER=108;Ea.NUMPAD_SUBTRACT=109;Ea.NUMPAD_DECIMAL=
110;Ea.NUMPAD_DIVIDE=111;Ea.F1=112;Ea.F2=113;Ea.F3=114;Ea.F4=115;Ea.F5=116;Ea.F6=117;Ea.F7=118;Ea.F8=119;Ea.F9=120;Ea.F10=121;Ea.F11=122;Ea.F12=123;Ea.F13=124;Ea.F14=125;Ea.F15=126;Ea.BACKSPACE=8;Ea.TAB=9;Ea.ALTERNATE=18;Ea.ENTER=13;Ea.COMMAND=15;Ea.SHIFT=16;Ea.CONTROL=17;Ea.BREAK=19;Ea.CAPS_LOCK=20;Ea.NUMPAD=21;Ea.ESCAPE=27;Ea.SPACE=32;Ea.PAGE_UP=33;Ea.PAGE_DOWN=34;Ea.END=35;Ea.HOME=36;Ea.LEFT=37;Ea.RIGHT=39;Ea.UP=38;Ea.DOWN=40;Ea.INSERT=45;Ea.DELETE=46;Ea.NUMLOCK=144;Ea.SEMICOLON=186;Ea.EQUAL=187;
Ea.COMMA=188;Ea.MINUS=189;Ea.PERIOD=190;Ea.SLASH=191;Ea.BACKQUOTE=192;Ea.LEFTBRACKET=219;Ea.BACKSLASH=220;Ea.RIGHTBRACKET=221;Ea.QUOTE=222;le.supportsCursor=!0;le.supportsNativeCursor=!0;le.__cursor="auto";vf.ARROW="arrow";vf.AUTO="auto";vf.BUTTON="button";vf.HAND="hand";vf.IBEAM="ibeam";vf.__CROSSHAIR="crosshair";vf.__CUSTOM="custom";vf.__MOVE="move";vf.__RESIZE_NESW="resize_nesw";vf.__RESIZE_NS="resize_ns";vf.__RESIZE_NWSE="resize_nwse";vf.__RESIZE_WE="resize_we";vf.__WAIT="wait";vf.__WAIT_ARROW=
"waitarrow";Y.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};Y.OPMAP=new ia;Y.REGMAP=new ia;Y.SAMPLEMAP=new ia;Y.MAX_NESTING=4;Y.MAX_OPCODES=4096;Y.FRAGMENT="fragment";Y.VERTEX="vertex";Y.SAMPLER_TYPE_SHIFT=8;Y.SAMPLER_DIM_SHIFT=12;Y.SAMPLER_SPECIAL_SHIFT=16;Y.SAMPLER_REPEAT_SHIFT=20;Y.SAMPLER_MIPMAP_SHIFT=24;Y.SAMPLER_FILTER_SHIFT=28;Y.REG_WRITE=1;Y.REG_READ=2;Y.REG_FRAG=32;Y.REG_VERT=64;Y.OP_SCALAR=1;Y.OP_SPECIAL_TEX=8;Y.OP_SPECIAL_MATRIX=16;Y.OP_FRAG_ONLY=
32;Y.OP_VERT_ONLY=64;Y.OP_NO_DEST=128;Y.OP_VERSION2=256;Y.OP_INCNEST=512;Y.OP_DECNEST=1024;Y.MOV="mov";Y.ADD="add";Y.SUB="sub";Y.MUL="mul";Y.DIV="div";Y.RCP="rcp";Y.MIN="min";Y.MAX="max";Y.FRC="frc";Y.SQT="sqt";Y.RSQ="rsq";Y.POW="pow";Y.LOG="log";Y.EXP="exp";Y.NRM="nrm";Y.SIN="sin";Y.COS="cos";Y.CRS="crs";Y.DP3="dp3";Y.DP4="dp4";Y.ABS="abs";Y.NEG="neg";Y.SAT="sat";Y.M33="m33";Y.M44="m44";Y.M34="m34";Y.DDX="ddx";Y.DDY="ddy";Y.IFE="ife";Y.INE="ine";Y.IFG="ifg";Y.IFL="ifl";Y.IEG="ieg";Y.IEL="iel";Y.ELS=
"els";Y.EIF="eif";Y.TED="ted";Y.KIL="kil";Y.TEX="tex";Y.SGE="sge";Y.SLT="slt";Y.SGN="sgn";Y.SEQ="seq";Y.SNE="sne";Y.VA="va";Y.VC="vc";Y.VT="vt";Y.VO="vo";Y.VI="vi";Y.FC="fc";Y.FT="ft";Y.FS="fs";Y.FO="fo";Y.FD="fd";Y.IID="iid";Y.D2="2d";Y.D3="3d";Y.CUBE="cube";Y.MIPNEAREST="mipnearest";Y.MIPLINEAR="miplinear";Y.MIPNONE="mipnone";Y.NOMIP="nomip";Y.NEAREST="nearest";Y.LINEAR="linear";Y.ANISOTROPIC2X="anisotropic2x";Y.ANISOTROPIC4X="anisotropic4x";Y.ANISOTROPIC8X="anisotropic8x";Y.ANISOTROPIC16X="anisotropic16x";
Y.CENTROID="centroid";Y.SINGLE="single";Y.IGNORESAMPLER="ignoresampler";Y.REPEAT="repeat";Y.WRAP="wrap";Y.CLAMP="clamp";Y.REPEAT_U_CLAMP_V="repeat_u_clamp_v";Y.CLAMP_U_REPEAT_V="clamp_u_repeat_v";Y.RGBA="rgba";Y.COMPRESSED="compressed";Y.COMPRESSEDALPHA="compressedalpha";Y.DXT1="dxt1";Y.DXT5="dxt5";Y.VIDEO="video";Y.initialized=!1;Zb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};lf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
va.cache=new ln;va.dispatcher=new za;va.libraryBindings=new ia;Ab.__bytePointer=new Uf(null,0);oc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};oc.defaultObjectEncoding=10;aj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};$i.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vr.BIG_ENDIAN=0;Vr.LITTLE_ENDIAN=1;je.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},
__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]},__getArray:{SuppressWarnings:["checkstyle:FieldDocComment"]},__setArray:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};on.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ec.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};
Ec.__sentWarnings=new ia;Xh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xh.__pool=new qd(function(){return new Xh},function(a){a.reset()});Gg.VAL_ABSENT=-2147483648;Gg.EMPTY_SLOT=-1;Gg.NULL_POINTER=-1;og.KEY_ABSENT=-2147483648;og.VAL_ABSENT=-2147483648;og.EMPTY_SLOT=-1;og.NULL_POINTER=-1;Va.DEFAULT_PRECISION=6;Va.DEFAULT_NUM_EXP_DIGITS=2;Va._initialized=!1;Va.PAD_0=0;Va.PAD_SPACE=20;Eg.FIXED=0;Eg.MILD=-1;Eg.NORMAL=-2;Eg.DOUBLE=
-3;Hb.PI=3.141592653589793;Hb.PI_H=1.5707963267948966;Hb.LN_2=.6931471805599453;Hb.LN_2_10=6.931471805599453;Hb.overshoot=1.70158;Hb.amplitude=1;Hb.period=3E-4;Ba.main()})("undefined"!=typeof w?w:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof E?E:"undefined"!=typeof self?self:this)};ma.lime.embed=function(N){var E={},V=ma.lime.$scripts[N];if(!V)throw Error('Cannot find project name "'+N+'"');V(E,w);for(var ra in E)ma[ra]=
ma[ra]||E[ra];(V=E.lime||window.lime)&&V.embed&&this!=V.embed&&V.embed.apply(V,arguments);return E};"function"==typeof define&&define.amd&&(define([],function(){return ma.lime}),define.__amd=define.amd,define.amd=null)})("undefined"!=typeof exports?exports:"function"==typeof define&&define.amd?{}:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(){var ma=function(){this.init()};ma.prototype={init:function(){var k=this||w;return k._counter=1E3,k._html5AudioPool=[],k.html5PoolSize=10,k._codecs={},k._howls=[],k._muted=!1,k._volume=1,k._canPlayEvent="canplaythrough",k._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,k.masterGain=null,k.noAudio=!1,k.usingWebAudio=!0,k.autoSuspend=!0,k.ctx=null,k.autoUnlock=!0,k._setup(),k},volume:function(v){var r=this||w;if(v=parseFloat(v),r.ctx||k(),void 0!==v&&0<=v&&1>=
v){if(r._volume=v,r._muted)return r;r.usingWebAudio&&r.masterGain.gain.setValueAtTime(v,w.ctx.currentTime);for(var u=0;u<r._howls.length;u++)if(!r._howls[u]._webAudio)for(var Ba=r._howls[u]._getSoundIds(),aa=0;aa<Ba.length;aa++){var I=r._howls[u]._soundById(Ba[aa]);I&&I._node&&(I._node.volume=I._volume*v)}return r}return r._volume},mute:function(v){var r=this||w;r.ctx||k();r._muted=v;r.usingWebAudio&&r.masterGain.gain.setValueAtTime(v?0:r._volume,w.ctx.currentTime);for(var u=0;u<r._howls.length;u++)if(!r._howls[u]._webAudio)for(var Ba=
r._howls[u]._getSoundIds(),aa=0;aa<Ba.length;aa++){var I=r._howls[u]._soundById(Ba[aa]);I&&I._node&&(I._node.muted=!!v||I._muted)}return r},unload:function(){for(var v=this||w,r=v._howls.length-1;0<=r;r--)v._howls[r].unload();return v.usingWebAudio&&v.ctx&&void 0!==v.ctx.close&&(v.ctx.close(),v.ctx=null,k()),v},codecs:function(k){return(this||w)._codecs[k.replace(/^x-/,"")]},_setup:function(){var k=this||w;if(k.state=k.ctx?k.ctx.state||"suspended":"suspended",k._autoSuspend(),!k.usingWebAudio)if("undefined"!=
typeof Audio)try{var r=new Audio;void 0===r.oncanplaythrough&&(k._canPlayEvent="canplay")}catch(C){k.noAudio=!0}else k.noAudio=!0;try{r=new Audio,r.muted&&(k.noAudio=!0)}catch(C){}return k.noAudio||k._setupCodecs(),k},_setupCodecs:function(){var k=this||w,r=null;try{r="undefined"!=typeof Audio?new Audio:null}catch(aa){return k}if(!r||"function"!=typeof r.canPlayType)return k;var u=r.canPlayType("audio/mpeg;").replace(/^no$/,""),Ba=k._navigator&&k._navigator.userAgent.match(/OPR\/([0-6].)/g);Ba=Ba&&
33>parseInt(Ba[0].split("/")[1],10);return k._codecs={mp3:!(Ba||!u&&!r.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!u,opus:!!r.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!r.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!r.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!r.canPlayType("audio/x-caf;").replace(/^no$/,""),
m4a:!!(r.canPlayType("audio/x-m4a;")||r.canPlayType("audio/m4a;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(r.canPlayType("audio/x-mp4;")||r.canPlayType("audio/mp4;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!r.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(r.canPlayType("audio/x-flac;")||r.canPlayType("audio/flac;")).replace(/^no$/,
"")},k},_unlockAudio:function(){var k=this||w,r=/iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome|Safari/i.test(k._navigator&&k._navigator.userAgent);if(!k._audioUnlocked&&k.ctx&&r){k._audioUnlocked=!1;k.autoUnlock=!1;k._mobileUnloaded||44100===k.ctx.sampleRate||(k._mobileUnloaded=!0,k.unload());k._scratchBuffer=k.ctx.createBuffer(1,1,22050);var u=function(v){for(v=0;v<k.html5PoolSize;v++){var r=new Audio;r._unlocked=!0;k._releaseHtml5Audio(r)}for(v=0;v<k._howls.length;v++)if(!k._howls[v]._webAudio){r=
k._howls[v]._getSoundIds();for(var x=0;x<r.length;x++){var C=k._howls[v]._soundById(r[x]);C&&C._node&&!C._node._unlocked&&(C._node._unlocked=!0,C._node.load())}}k._autoResume();var w=k.ctx.createBufferSource();w.buffer=k._scratchBuffer;w.connect(k.ctx.destination);void 0===w.start?w.noteOn(0):w.start(0);"function"==typeof k.ctx.resume&&k.ctx.resume();w.onended=function(){w.disconnect(0);k._audioUnlocked=!0;document.removeEventListener("touchstart",u,!0);document.removeEventListener("touchend",u,!0);
document.removeEventListener("click",u,!0);for(var v=0;v<k._howls.length;v++)k._howls[v]._emit("unlock")}};return document.addEventListener("touchstart",u,!0),document.addEventListener("touchend",u,!0),document.addEventListener("click",u,!0),k}},_obtainHtml5Audio:function(){var k=this||w;if(k._html5AudioPool.length)return k._html5AudioPool.pop();k=(new Audio).play();return k&&"undefined"!=typeof Promise&&(k instanceof Promise||"function"==typeof k.then)&&k.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),
new Audio},_releaseHtml5Audio:function(k){var v=this||w;return k._unlocked&&v._html5AudioPool.push(k),v},_autoSuspend:function(){var k=this;if(k.autoSuspend&&k.ctx&&void 0!==k.ctx.suspend&&w.usingWebAudio){for(var r=0;r<k._howls.length;r++)if(k._howls[r]._webAudio)for(var u=0;u<k._howls[r]._sounds.length;u++)if(!k._howls[r]._sounds[u]._paused)return k;return k._suspendTimer&&clearTimeout(k._suspendTimer),k._suspendTimer=setTimeout(function(){k.autoSuspend&&(k._suspendTimer=null,k.state="suspending",
k.ctx.suspend().then(function(){k.state="suspended";k._resumeAfterSuspend&&(delete k._resumeAfterSuspend,k._autoResume())}))},3E4),k}},_autoResume:function(){var k=this;if(k.ctx&&void 0!==k.ctx.resume&&w.usingWebAudio)return"running"===k.state&&k._suspendTimer?(clearTimeout(k._suspendTimer),k._suspendTimer=null):"suspended"===k.state?(k.ctx.resume().then(function(){k.state="running";for(var v=0;v<k._howls.length;v++)k._howls[v]._emit("resume")}),k._suspendTimer&&(clearTimeout(k._suspendTimer),k._suspendTimer=
null)):"suspending"===k.state&&(k._resumeAfterSuspend=!0),k}};var w=new ma,N=function(k){if(!k.src||0===k.src.length)return void console.error("An array of source files must be passed with any new Howl.");this.init(k)};N.prototype={init:function(v){var r=this;return w.ctx||k(),r._autoplay=v.autoplay||!1,r._format="string"!=typeof v.format?v.format:[v.format],r._html5=v.html5||!1,r._muted=v.mute||!1,r._loop=v.loop||!1,r._pool=v.pool||5,r._preload="boolean"!=typeof v.preload||v.preload,r._rate=v.rate||
1,r._sprite=v.sprite||{},r._src="string"!=typeof v.src?v.src:[v.src],r._volume=void 0!==v.volume?v.volume:1,r._xhrWithCredentials=v.xhrWithCredentials||!1,r._duration=0,r._state="unloaded",r._sounds=[],r._endTimers={},r._queue=[],r._playLock=!1,r._onend=v.onend?[{fn:v.onend}]:[],r._onfade=v.onfade?[{fn:v.onfade}]:[],r._onload=v.onload?[{fn:v.onload}]:[],r._onloaderror=v.onloaderror?[{fn:v.onloaderror}]:[],r._onplayerror=v.onplayerror?[{fn:v.onplayerror}]:[],r._onpause=v.onpause?[{fn:v.onpause}]:[],
r._onplay=v.onplay?[{fn:v.onplay}]:[],r._onstop=v.onstop?[{fn:v.onstop}]:[],r._onmute=v.onmute?[{fn:v.onmute}]:[],r._onvolume=v.onvolume?[{fn:v.onvolume}]:[],r._onrate=v.onrate?[{fn:v.onrate}]:[],r._onseek=v.onseek?[{fn:v.onseek}]:[],r._onunlock=v.onunlock?[{fn:v.onunlock}]:[],r._onresume=[],r._webAudio=w.usingWebAudio&&!r._html5,void 0!==w.ctx&&w.ctx&&w.autoUnlock&&w._unlockAudio(),w._howls.push(r),r._autoplay&&r._queue.push({event:"play",action:function(){r.play()}}),r._preload&&r.load(),r},load:function(){var k=
null;if(w.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var r=0;r<this._src.length;r++){var u;if(this._format&&this._format[r])var Ba=this._format[r];else{if("string"!=typeof(u=this._src[r])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(Ba=/^data:audio\/([^;,]+);/i.exec(u))||(Ba=/\.([^.]+)$/.exec(u.split("?",1)[0]));Ba&&(Ba=Ba[1].toLowerCase())}if(Ba||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),
Ba&&w.codecs(Ba)){k=this._src[r];break}}return k?(this._src=k,this._state="loading","https:"===window.location.protocol&&"http:"===k.slice(0,5)&&(this._html5=!0,this._webAudio=!1),new E(this),this._webAudio&&ra(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(k,r){var v=this,u=null;if("number"==typeof k)u=k,k=null;else{if("string"==typeof k&&"loaded"===v._state&&!v._sprite[k])return null;if(void 0===k&&(k="__default",!v._playLock)){for(var x=
0,I=0;I<v._sounds.length;I++)v._sounds[I]._paused&&!v._sounds[I]._ended&&(x++,u=v._sounds[I]._id);1===x?k=null:u=null}}var E=u?v._soundById(u):v._inactiveSound();if(!E)return null;if(u&&!k&&(k=E._sprite||"__default"),"loaded"!==v._state){E._sprite=k;E._ended=!1;var N=E._id;return v._queue.push({event:"play",action:function(){v.play(N)}}),N}if(u&&!E._paused)return r||v._loadQueue("play"),E._id;v._webAudio&&w._autoResume();var V=Math.max(0,0<E._seek?E._seek:v._sprite[k][0]/1E3),X=Math.max(0,(v._sprite[k][0]+
v._sprite[k][1])/1E3-V),A=1E3*X/Math.abs(E._rate),ra=v._sprite[k][0]/1E3,ma=(v._sprite[k][0]+v._sprite[k][1])/1E3,R=!(!E._loop&&!v._sprite[k][2]);E._sprite=k;E._ended=!1;var Ca=function(){E._paused=!1;E._seek=V;E._start=ra;E._stop=ma;E._loop=R};if(V>=ma)return void v._ended(E);var Ia=E._node;if(v._webAudio)u=function(){v._playLock=!1;Ca();v._refreshBuffer(E);Ia.gain.setValueAtTime(E._muted||v._muted?0:E._volume,w.ctx.currentTime);E._playStart=w.ctx.currentTime;void 0===Ia.bufferSource.start?E._loop?
Ia.bufferSource.noteGrainOn(0,V,86400):Ia.bufferSource.noteGrainOn(0,V,X):E._loop?Ia.bufferSource.start(0,V,86400):Ia.bufferSource.start(0,V,X);A!==1/0&&(v._endTimers[E._id]=setTimeout(v._ended.bind(v,E),A));r||setTimeout(function(){v._emit("play",E._id);v._loadQueue()},0)},"running"===w.state?u():(v._playLock=!0,v.once("resume",u),v._clearTimer(E._id));else{var ua=function(){Ia.currentTime=V;Ia.muted=E._muted||v._muted||w._muted||Ia.muted;Ia.volume=E._volume*w.volume();Ia.playbackRate=E._rate;try{var u=
Ia.play();if(u&&"undefined"!=typeof Promise&&(u instanceof Promise||"function"==typeof u.then)?(v._playLock=!0,Ca(),u.then(function(){v._playLock=!1;Ia._unlocked=!0;r||(v._emit("play",E._id),v._loadQueue())}).catch(function(){v._playLock=!1;v._emit("playerror",E._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");E._ended=!0;E._paused=!0})):r||(v._playLock=!1,Ca(),v._emit("play",E._id),v._loadQueue()),Ia.playbackRate=
E._rate,Ia.paused)return void v._emit("playerror",E._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==k||E._loop?v._endTimers[E._id]=setTimeout(v._ended.bind(v,E),A):(v._endTimers[E._id]=function(){v._ended(E);Ia.removeEventListener("ended",v._endTimers[E._id],!1)},Ia.addEventListener("ended",v._endTimers[E._id],!1))}catch(ae){v._emit("playerror",E._id,ae)}};u=window&&window.ejecta||!Ia.readyState&&
w._navigator.isCocoonJS;if(3<=Ia.readyState||u)ua();else{v._playLock=!0;var Fa=function(){ua();Ia.removeEventListener(w._canPlayEvent,Fa,!1)};Ia.addEventListener(w._canPlayEvent,Fa,!1);v._clearTimer(E._id)}}return E._id},pause:function(k,r){var v=this;if("loaded"!==v._state||v._playLock)return v._queue.push({event:"pause",action:function(){v.pause(k)}}),v;for(var u=v._getSoundIds(k),x=0;x<u.length;x++){v._clearTimer(u[x]);var w=v._soundById(u[x]);if(w&&!w._paused&&(w._seek=v.seek(u[x]),w._rateSeek=
0,w._paused=!0,v._stopFade(u[x]),w._node))if(v._webAudio){if(!w._node.bufferSource)continue;void 0===w._node.bufferSource.stop?w._node.bufferSource.noteOff(0):w._node.bufferSource.stop(0);v._cleanBuffer(w._node)}else isNaN(w._node.duration)&&w._node.duration!==1/0||w._node.pause();r||v._emit("pause",w?w._id:null)}return v},stop:function(k,r){var v=this;if("loaded"!==v._state||v._playLock)return v._queue.push({event:"stop",action:function(){v.stop(k)}}),v;for(var u=v._getSoundIds(k),x=0;x<u.length;x++){v._clearTimer(u[x]);
var w=v._soundById(u[x]);w&&(w._seek=w._start||0,w._rateSeek=0,w._paused=!0,w._ended=!0,v._stopFade(u[x]),w._node&&(v._webAudio?w._node.bufferSource&&(void 0===w._node.bufferSource.stop?w._node.bufferSource.noteOff(0):w._node.bufferSource.stop(0),v._cleanBuffer(w._node)):isNaN(w._node.duration)&&w._node.duration!==1/0||(w._node.currentTime=w._start||0,w._node.pause())),r||v._emit("stop",w._id))}return v},mute:function(k,r){var v=this;if("loaded"!==v._state||v._playLock)return v._queue.push({event:"mute",
action:function(){v.mute(k,r)}}),v;if(void 0===r){if("boolean"!=typeof k)return v._muted;v._muted=k}for(var u=v._getSoundIds(r),x=0;x<u.length;x++){var I=v._soundById(u[x]);I&&(I._muted=k,I._interval&&v._stopFade(I._id),v._webAudio&&I._node?I._node.gain.setValueAtTime(k?0:I._volume,w.ctx.currentTime):I._node&&(I._node.muted=!!w._muted||k),v._emit("mute",I._id))}return v},volume:function(){var k,r,u=this,E=arguments;if(0===E.length)return u._volume;1===E.length||2===E.length&&void 0===E[1]?0<=u._getSoundIds().indexOf(E[0])?
r=parseInt(E[0],10):k=parseFloat(E[0]):2<=E.length&&(k=parseFloat(E[0]),r=parseInt(E[1],10));var aa;if(!(void 0!==k&&0<=k&&1>=k))return aa=r?u._soundById(r):u._sounds[0],aa?aa._volume:0;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"volume",action:function(){u.volume.apply(u,E)}}),u;void 0===r&&(u._volume=k);r=u._getSoundIds(r);for(var I=0;I<r.length;I++)(aa=u._soundById(r[I]))&&(aa._volume=k,E[2]||u._stopFade(r[I]),u._webAudio&&aa._node&&!aa._muted?aa._node.gain.setValueAtTime(k,
w.ctx.currentTime):aa._node&&!aa._muted&&(aa._node.volume=k*w.volume()),u._emit("volume",aa._id));return u},fade:function(k,r,u,E){var v=this;if("loaded"!==v._state||v._playLock)return v._queue.push({event:"fade",action:function(){v.fade(k,r,u,E)}}),v;k=parseFloat(k);r=parseFloat(r);u=parseFloat(u);v.volume(k,E);for(var x=v._getSoundIds(E),C=0;C<x.length;C++){var Ba=v._soundById(x[C]);if(Ba){if(E||v._stopFade(x[C]),v._webAudio&&!Ba._muted){var N=w.ctx.currentTime,X=N+u/1E3;Ba._volume=k;Ba._node.gain.setValueAtTime(k,
N);Ba._node.gain.linearRampToValueAtTime(r,X)}v._startFadeInterval(Ba,k,r,u,x[C],void 0===E)}}return v},_startFadeInterval:function(k,r,u,w,E,I){var v=this,x=r,C=u-r;E=Math.abs(C/.01);E=Math.max(4,0<E?w/E:w);var X=Date.now();k._fadeTo=u;k._interval=setInterval(function(){var A=(Date.now()-X)/w;X=Date.now();x+=C*A;x=Math.max(0,x);x=Math.min(1,x);x=Math.round(100*x)/100;v._webAudio?k._volume=x:v.volume(x,k._id,!0);I&&(v._volume=x);(u<r&&x<=u||u>r&&x>=u)&&(clearInterval(k._interval),k._interval=null,
k._fadeTo=null,v.volume(u,k._id),v._emit("fade",k._id))},E)},_stopFade:function(k){var v=this._soundById(k);return v&&v._interval&&(this._webAudio&&v._node.gain.cancelScheduledValues(w.ctx.currentTime),clearInterval(v._interval),v._interval=null,this.volume(v._fadeTo,k),v._fadeTo=null,this._emit("fade",k)),this},loop:function(){var k,r,u,w=arguments;if(0===w.length)return this._loop;if(1===w.length){if("boolean"!=typeof w[0])return!!(u=this._soundById(parseInt(w[0],10)))&&u._loop;this._loop=k=w[0]}else 2===
w.length&&(k=w[0],r=parseInt(w[1],10));r=this._getSoundIds(r);for(w=0;w<r.length;w++)(u=this._soundById(r[w]))&&(u._loop=k,this._webAudio&&u._node&&u._node.bufferSource&&(u._node.bufferSource.loop=k,k&&(u._node.bufferSource.loopStart=u._start||0,u._node.bufferSource.loopEnd=u._stop)));return this},rate:function(){var k,r,u=this,E=arguments;0===E.length?r=u._sounds[0]._id:1===E.length?0<=u._getSoundIds().indexOf(E[0])?r=parseInt(E[0],10):k=parseFloat(E[0]):2===E.length&&(k=parseFloat(E[0]),r=parseInt(E[1],
10));var aa;if("number"!=typeof k)return aa=u._soundById(r),aa?aa._rate:u._rate;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"rate",action:function(){u.rate.apply(u,E)}}),u;void 0===r&&(u._rate=k);r=u._getSoundIds(r);for(var I=0;I<r.length;I++)if(aa=u._soundById(r[I])){u.playing(r[I])&&(aa._rateSeek=u.seek(r[I]),aa._playStart=u._webAudio?w.ctx.currentTime:aa._playStart);aa._rate=k;u._webAudio&&aa._node&&aa._node.bufferSource?aa._node.bufferSource.playbackRate.setValueAtTime(k,w.ctx.currentTime):
aa._node&&(aa._node.playbackRate=k);var N=u.seek(r[I]);N=1E3*((u._sprite[aa._sprite][0]+u._sprite[aa._sprite][1])/1E3-N)/Math.abs(aa._rate);!u._endTimers[r[I]]&&aa._paused||(u._clearTimer(r[I]),u._endTimers[r[I]]=setTimeout(u._ended.bind(u,aa),N));u._emit("rate",aa._id)}return u},seek:function(){var k,r,u=this,E=arguments;0===E.length?r=u._sounds[0]._id:1===E.length?0<=u._getSoundIds().indexOf(E[0])?r=parseInt(E[0],10):u._sounds.length&&(r=u._sounds[0]._id,k=parseFloat(E[0])):2===E.length&&(k=parseFloat(E[0]),
r=parseInt(E[1],10));if(void 0===r)return u;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"seek",action:function(){u.seek.apply(u,E)}}),u;var aa=u._soundById(r);if(aa){if(!("number"==typeof k&&0<=k))return u._webAudio?(k=u.playing(r)?w.ctx.currentTime-aa._playStart:0,aa._seek+((aa._rateSeek?aa._rateSeek-aa._seek:0)+k*Math.abs(aa._rate))):aa._node.currentTime;var I=u.playing(r);I&&u.pause(r,!0);aa._seek=k;aa._ended=!1;u._clearTimer(r);u._webAudio||!aa._node||isNaN(aa._node.duration)||
(aa._node.currentTime=k);var N=function(){u._emit("seek",r);I&&u.play(r,!0)};if(I&&!u._webAudio){var V=function(){u._playLock?setTimeout(V,0):N()};setTimeout(V,0)}else N()}return u},playing:function(k){if("number"==typeof k)return k=this._soundById(k),!!k&&!k._paused;for(k=0;k<this._sounds.length;k++)if(!this._sounds[k]._paused)return!0;return!1},duration:function(k){var r=this._duration;k=this._soundById(k);return k&&(r=this._sprite[k._sprite][1]/1E3),r},state:function(){return this._state},unload:function(){for(var k=
this._sounds,r=0;r<k.length;r++)(k[r]._paused||this.stop(k[r]._id),this._webAudio)||(/MSIE |Trident\//.test(w._navigator&&w._navigator.userAgent)||(k[r]._node.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"),k[r]._node.removeEventListener("error",k[r]._errorFn,!1),k[r]._node.removeEventListener(w._canPlayEvent,k[r]._loadFn,!1),w._releaseHtml5Audio(k[r]._node)),delete k[r]._node,this._clearTimer(k[r]._id);r=w._howls.indexOf(this);0<=r&&w._howls.splice(r,
1);k=!0;for(r=0;r<w._howls.length;r++)if(w._howls[r]._src===this._src||0<=this._src.indexOf(w._howls[r]._src)){k=!1;break}return V&&k&&delete V[this._src],w.noAudio=!1,this._state="unloaded",this._sounds=[],null},on:function(k,r,u,w){k=this["_on"+k];return"function"==typeof r&&k.push(w?{id:u,fn:r,once:w}:{id:u,fn:r}),this},off:function(k,r,u){var v=this["_on"+k];if("number"==typeof r&&(u=r,r=null),r||u)for(k=0;k<v.length;k++){var x=u===v[k].id;if(r===v[k].fn&&x||!r&&x){v.splice(k,1);break}}else if(k)this["_on"+
k]=[];else for(r=Object.keys(this),k=0;k<r.length;k++)0===r[k].indexOf("_on")&&Array.isArray(this[r[k]])&&(this[r[k]]=[]);return this},once:function(k,r,u){return this.on(k,r,u,1),this},_emit:function(k,r,u){for(var v=this["_on"+k],x=v.length-1;0<=x;x--)v[x].id&&v[x].id!==r&&"load"!==k||(setTimeout(function(k){k.call(this,r,u)}.bind(this,v[x].fn),0),v[x].once&&this.off(k,v[x].fn,v[x].id));return this._loadQueue(k),this},_loadQueue:function(k){if(0<this._queue.length){var r=this._queue[0];r.event===
k&&(this._queue.shift(),this._loadQueue());k||r.action()}return this},_ended:function(k){var r=k._sprite;if(!this._webAudio&&k._node&&!k._node.paused&&!k._node.ended&&k._node.currentTime<k._stop)return setTimeout(this._ended.bind(this,k),100),this;r=!(!k._loop&&!this._sprite[r][2]);if(this._emit("end",k._id),!this._webAudio&&r&&this.stop(k._id,!0).play(k._id),this._webAudio&&r){this._emit("play",k._id);k._seek=k._start||0;k._rateSeek=0;k._playStart=w.ctx.currentTime;var v=1E3*(k._stop-k._start)/Math.abs(k._rate);
this._endTimers[k._id]=setTimeout(this._ended.bind(this,k),v)}return this._webAudio&&!r&&(k._paused=!0,k._ended=!0,k._seek=k._start||0,k._rateSeek=0,this._clearTimer(k._id),this._cleanBuffer(k._node),w._autoSuspend()),this._webAudio||r||this.stop(k._id,!0),this},_clearTimer:function(k){if(this._endTimers[k]){if("function"!=typeof this._endTimers[k])clearTimeout(this._endTimers[k]);else{var r=this._soundById(k);r&&r._node&&r._node.removeEventListener("ended",this._endTimers[k],!1)}delete this._endTimers[k]}return this},
_soundById:function(k){for(var r=0;r<this._sounds.length;r++)if(k===this._sounds[r]._id)return this._sounds[r];return null},_inactiveSound:function(){this._drain();for(var k=0;k<this._sounds.length;k++)if(this._sounds[k]._ended)return this._sounds[k].reset();return new E(this)},_drain:function(){var k=this._pool,r=0,u;if(!(this._sounds.length<k)){for(u=0;u<this._sounds.length;u++)this._sounds[u]._ended&&r++;for(u=this._sounds.length-1;0<=u&&!(r<=k);u--)this._sounds[u]._ended&&(this._webAudio&&this._sounds[u]._node&&
this._sounds[u]._node.disconnect(0),this._sounds.splice(u,1),r--)}},_getSoundIds:function(k){if(void 0===k){k=[];for(var r=0;r<this._sounds.length;r++)k.push(this._sounds[r]._id);return k}return[k]},_refreshBuffer:function(k){return k._node.bufferSource=w.ctx.createBufferSource(),k._node.bufferSource.buffer=V[this._src],k._panner?k._node.bufferSource.connect(k._panner):k._node.bufferSource.connect(k._node),k._node.bufferSource.loop=k._loop,k._loop&&(k._node.bufferSource.loopStart=k._start||0,k._node.bufferSource.loopEnd=
k._stop||0),k._node.bufferSource.playbackRate.setValueAtTime(k._rate,w.ctx.currentTime),this},_cleanBuffer:function(k){var r=w._navigator&&0<=w._navigator.vendor.indexOf("Apple");if(w._scratchBuffer&&k.bufferSource&&(k.bufferSource.onended=null,k.bufferSource.disconnect(0),r))try{k.bufferSource.buffer=w._scratchBuffer}catch(C){}return k.bufferSource=null,this}};var E=function(k){this._parent=k;this.init()};E.prototype={init:function(){var k=this._parent;return this._muted=k._muted,this._loop=k._loop,
this._volume=k._volume,this._rate=k._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++w._counter,k._sounds.push(this),this.create(),this},create:function(){var k=this._parent,r=w._muted||this._muted||this._parent._muted?0:this._volume;return k._webAudio?(this._node=void 0===w.ctx.createGain?w.ctx.createGainNode():w.ctx.createGain(),this._node.gain.setValueAtTime(r,w.ctx.currentTime),this._node.paused=!0,this._node.connect(w.masterGain)):(this._node=w._obtainHtml5Audio(),
this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(w._canPlayEvent,this._loadFn,!1),this._node.src=k._src,this._node.preload="auto",this._node.volume=r*w.volume(),this._node.load()),this},reset:function(){var k=this._parent;return this._muted=k._muted,this._loop=k._loop,this._volume=k._volume,this._rate=k._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite=
"__default",this._id=++w._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0);this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var k=this._parent;k._duration=Math.ceil(10*this._node.duration)/10;0===Object.keys(k._sprite).length&&(k._sprite={__default:[0,1E3*k._duration]});"loaded"!==k._state&&(k._state="loaded",k._emit("load"),k._loadQueue());this._node.removeEventListener(w._canPlayEvent,this._loadFn,
!1)}};var V={},ra=function(k){var v=k._src;if(V[v])return k._duration=V[v].duration,void r(k);if(/^data:[^;]+;base64,/.test(v)){for(var w=atob(v.split(",")[1]),E=new Uint8Array(w.length),aa=0;aa<w.length;++aa)E[aa]=w.charCodeAt(aa);Fa(E.buffer,k)}else{var I=new XMLHttpRequest;I.open("GET",v,!0);I.withCredentials=k._xhrWithCredentials;I.responseType="arraybuffer";I.onload=function(){var r=(I.status+"")[0];if("0"!==r&&"2"!==r&&"3"!==r)return void k._emit("loaderror",null,"Failed loading audio file with status: "+
I.status+".");Fa(I.response,k)};I.onerror=function(){k._webAudio&&(k._html5=!0,k._webAudio=!1,k._sounds=[],delete V[v],k.load())};u(I)}},u=function(k){try{k.send()}catch(x){k.onerror()}},Fa=function(k,u){var v=function(){u._emit("loaderror",null,"Decoding audio data failed.")},x=function(k){k&&0<u._sounds.length?(V[u._src]=k,r(u,k)):v()};"undefined"!=typeof Promise&&1===w.ctx.decodeAudioData.length?w.ctx.decodeAudioData(k).then(x).catch(v):w.ctx.decodeAudioData(k,x,v)},r=function(k,r){r&&!k._duration&&
(k._duration=r.duration);0===Object.keys(k._sprite).length&&(k._sprite={__default:[0,1E3*k._duration]});"loaded"!==k._state&&(k._state="loaded",k._emit("load"),k._loadQueue())},k=function(){if(w.usingWebAudio){try{"undefined"!=typeof AudioContext?w.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?w.ctx=new webkitAudioContext:w.usingWebAudio=!1}catch(C){w.usingWebAudio=!1}w.ctx||(w.usingWebAudio=!1);var k=/iP(hone|od|ad)/.test(w._navigator&&w._navigator.platform),r=w._navigator&&w._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
r=r?parseInt(r[1],10):null;k&&r&&9>r&&(k=/safari/.test(w._navigator&&w._navigator.userAgent.toLowerCase()),(w._navigator&&w._navigator.standalone&&!k||w._navigator&&!w._navigator.standalone&&!k)&&(w.usingWebAudio=!1));w.usingWebAudio&&(w.masterGain=void 0===w.ctx.createGain?w.ctx.createGainNode():w.ctx.createGain(),w.masterGain.gain.setValueAtTime(w._muted?0:1,w.ctx.currentTime),w.masterGain.connect(w.ctx.destination));w._setup()}};"function"==typeof define&&define.amd&&define([],function(){return{Howler:w,
Howl:N}});"undefined"!=typeof exports&&(exports.Howler=w,exports.Howl=N);"undefined"!=typeof window?(window.HowlerGlobal=ma,window.Howler=w,window.Howl=N,window.Sound=E):"undefined"!=typeof global&&(global.HowlerGlobal=ma,global.Howler=w,global.Howl=N,global.Sound=E)}();
!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(w){if(!this.ctx||!this.ctx.listener)return this;for(var N=this._howls.length-1;0<=N;N--)this._howls[N].stereo(w);return this};HowlerGlobal.prototype.pos=function(w,N,E){return this.ctx&&this.ctx.listener?(N="number"!=typeof N?this._pos[1]:N,E="number"!=typeof E?this._pos[2]:E,"number"!=typeof w?this._pos:(this._pos=[w,N,E],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],
Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this};HowlerGlobal.prototype.orientation=function(w,N,E,V,ra,u){if(!this.ctx||!this.ctx.listener)return this;var ma=this._orientation;return N="number"!=typeof N?ma[1]:N,E="number"!=typeof E?ma[2]:E,V="number"!=typeof V?ma[3]:V,
ra="number"!=typeof ra?ma[4]:ra,u="number"!=typeof u?ma[5]:u,"number"!=typeof w?ma:(this._orientation=[w,N,E,V,ra,u],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(w,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(N,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(E,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(w,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(N,Howler.ctx.currentTime,.1),
this.ctx.listener.upZ.setTargetAtTime(E,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(w,N,E,V,ra,u),this)};Howl.prototype.init=function(w){return function(N){return this._orientation=N.orientation||[1,0,0],this._stereo=N.stereo||null,this._pos=N.pos||null,this._pannerAttr={coneInnerAngle:void 0!==N.coneInnerAngle?N.coneInnerAngle:360,coneOuterAngle:void 0!==N.coneOuterAngle?N.coneOuterAngle:360,coneOuterGain:void 0!==N.coneOuterGain?N.coneOuterGain:0,distanceModel:void 0!==N.distanceModel?
N.distanceModel:"inverse",maxDistance:void 0!==N.maxDistance?N.maxDistance:1E4,panningModel:void 0!==N.panningModel?N.panningModel:"HRTF",refDistance:void 0!==N.refDistance?N.refDistance:1,rolloffFactor:void 0!==N.rolloffFactor?N.rolloffFactor:1},this._onstereo=N.onstereo?[{fn:N.onstereo}]:[],this._onpos=N.onpos?[{fn:N.onpos}]:[],this._onorientation=N.onorientation?[{fn:N.onorientation}]:[],w.call(this,N)}}(Howl.prototype.init);Howl.prototype.stereo=function(w,N){var E=this;if(!E._webAudio)return E;
if("loaded"!==E._state)return E._queue.push({event:"stereo",action:function(){E.stereo(w,N)}}),E;var V=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===N){if("number"!=typeof w)return E._stereo;E._stereo=w;E._pos=[w,0,0]}for(var ra=E._getSoundIds(N),u=0;u<ra.length;u++){var Fa=E._soundById(ra[u]);if(Fa){if("number"!=typeof w)return Fa._stereo;Fa._stereo=w;Fa._pos=[w,0,0];Fa._node&&(Fa._pannerAttr.panningModel="equalpower",Fa._panner&&Fa._panner.pan||ma(Fa,V),"spatial"===V?void 0!==
Fa._panner.positionX?(Fa._panner.positionX.setValueAtTime(w,Howler.ctx.currentTime),Fa._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Fa._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Fa._panner.setPosition(w,0,0):Fa._panner.pan.setValueAtTime(w,Howler.ctx.currentTime));E._emit("stereo",Fa._id)}}return E};Howl.prototype.pos=function(w,N,E,V){var ra=this;if(!ra._webAudio)return ra;if("loaded"!==ra._state)return ra._queue.push({event:"pos",action:function(){ra.pos(w,N,E,V)}}),
ra;if(N="number"!=typeof N?0:N,E="number"!=typeof E?-.5:E,void 0===V){if("number"!=typeof w)return ra._pos;ra._pos=[w,N,E]}for(var u=ra._getSoundIds(V),Fa=0;Fa<u.length;Fa++){var r=ra._soundById(u[Fa]);if(r){if("number"!=typeof w)return r._pos;r._pos=[w,N,E];r._node&&(r._panner&&!r._panner.pan||ma(r,"spatial"),void 0!==r._panner.positionX?(r._panner.positionX.setValueAtTime(w,Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(N,Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(E,
Howler.ctx.currentTime)):r._panner.setPosition(w,N,E));ra._emit("pos",r._id)}}return ra};Howl.prototype.orientation=function(w,N,E,V){var ra=this;if(!ra._webAudio)return ra;if("loaded"!==ra._state)return ra._queue.push({event:"orientation",action:function(){ra.orientation(w,N,E,V)}}),ra;if(N="number"!=typeof N?ra._orientation[1]:N,E="number"!=typeof E?ra._orientation[2]:E,void 0===V){if("number"!=typeof w)return ra._orientation;ra._orientation=[w,N,E]}for(var u=ra._getSoundIds(V),Fa=0;Fa<u.length;Fa++){var r=
ra._soundById(u[Fa]);if(r){if("number"!=typeof w)return r._orientation;r._orientation=[w,N,E];r._node&&(r._panner||(r._pos||(r._pos=ra._pos||[0,0,-.5]),ma(r,"spatial")),void 0!==r._panner.orientationX?(r._panner.orientationX.setValueAtTime(w,Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(N,Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(E,Howler.ctx.currentTime)):r._panner.setOrientation(w,N,E));ra._emit("orientation",r._id)}}return ra};Howl.prototype.pannerAttr=function(){var w,
N,E=arguments;if(!this._webAudio)return this;if(0===E.length)return this._pannerAttr;if(1===E.length){if("object"!=typeof E[0])return N=this._soundById(parseInt(E[0],10)),N?N._pannerAttr:this._pannerAttr;var V=E[0];void 0===w&&(V.pannerAttr||(V.pannerAttr={coneInnerAngle:V.coneInnerAngle,coneOuterAngle:V.coneOuterAngle,coneOuterGain:V.coneOuterGain,distanceModel:V.distanceModel,maxDistance:V.maxDistance,refDistance:V.refDistance,rolloffFactor:V.rolloffFactor,panningModel:V.panningModel}),this._pannerAttr=
{coneInnerAngle:void 0!==V.pannerAttr.coneInnerAngle?V.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==V.pannerAttr.coneOuterAngle?V.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==V.pannerAttr.coneOuterGain?V.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==V.pannerAttr.distanceModel?V.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==V.pannerAttr.maxDistance?V.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==
V.pannerAttr.refDistance?V.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==V.pannerAttr.rolloffFactor?V.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==V.pannerAttr.panningModel?V.pannerAttr.panningModel:this._panningModel})}else 2===E.length&&(V=E[0],w=parseInt(E[1],10));w=this._getSoundIds(w);for(E=0;E<w.length;E++)if(N=this._soundById(w[E])){var ra=N._pannerAttr;ra={coneInnerAngle:void 0!==V.coneInnerAngle?V.coneInnerAngle:ra.coneInnerAngle,coneOuterAngle:void 0!==
V.coneOuterAngle?V.coneOuterAngle:ra.coneOuterAngle,coneOuterGain:void 0!==V.coneOuterGain?V.coneOuterGain:ra.coneOuterGain,distanceModel:void 0!==V.distanceModel?V.distanceModel:ra.distanceModel,maxDistance:void 0!==V.maxDistance?V.maxDistance:ra.maxDistance,refDistance:void 0!==V.refDistance?V.refDistance:ra.refDistance,rolloffFactor:void 0!==V.rolloffFactor?V.rolloffFactor:ra.rolloffFactor,panningModel:void 0!==V.panningModel?V.panningModel:ra.panningModel};var u=N._panner;u?(u.coneInnerAngle=
ra.coneInnerAngle,u.coneOuterAngle=ra.coneOuterAngle,u.coneOuterGain=ra.coneOuterGain,u.distanceModel=ra.distanceModel,u.maxDistance=ra.maxDistance,u.refDistance=ra.refDistance,u.rolloffFactor=ra.rolloffFactor,u.panningModel=ra.panningModel):(N._pos||(N._pos=this._pos||[0,0,-.5]),ma(N,"spatial"))}return this};Sound.prototype.init=function(w){return function(){var N=this._parent;this._orientation=N._orientation;this._stereo=N._stereo;this._pos=N._pos;this._pannerAttr=N._pannerAttr;w.call(this);this._stereo?
N.stereo(this._stereo):this._pos&&N.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(w){return function(){var N=this._parent;return this._orientation=N._orientation,this._stereo=N._stereo,this._pos=N._pos,this._pannerAttr=N._pannerAttr,this._stereo?N.stereo(this._stereo):this._pos?N.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,N._refreshBuffer(this)),w.call(this)}}(Sound.prototype.reset);
var ma=function(w,N){"spatial"===(N||"spatial")?(w._panner=Howler.ctx.createPanner(),w._panner.coneInnerAngle=w._pannerAttr.coneInnerAngle,w._panner.coneOuterAngle=w._pannerAttr.coneOuterAngle,w._panner.coneOuterGain=w._pannerAttr.coneOuterGain,w._panner.distanceModel=w._pannerAttr.distanceModel,w._panner.maxDistance=w._pannerAttr.maxDistance,w._panner.refDistance=w._pannerAttr.refDistance,w._panner.rolloffFactor=w._pannerAttr.rolloffFactor,w._panner.panningModel=w._pannerAttr.panningModel,void 0!==
w._panner.positionX?(w._panner.positionX.setValueAtTime(w._pos[0],Howler.ctx.currentTime),w._panner.positionY.setValueAtTime(w._pos[1],Howler.ctx.currentTime),w._panner.positionZ.setValueAtTime(w._pos[2],Howler.ctx.currentTime)):w._panner.setPosition(w._pos[0],w._pos[1],w._pos[2]),void 0!==w._panner.orientationX?(w._panner.orientationX.setValueAtTime(w._orientation[0],Howler.ctx.currentTime),w._panner.orientationY.setValueAtTime(w._orientation[1],Howler.ctx.currentTime),w._panner.orientationZ.setValueAtTime(w._orientation[2],
Howler.ctx.currentTime)):w._panner.setOrientation(w._orientation[0],w._orientation[1],w._orientation[2])):(w._panner=Howler.ctx.createStereoPanner(),w._panner.pan.setValueAtTime(w._stereo,Howler.ctx.currentTime));w._panner.connect(w._node);w._paused||w._parent.pause(w._id,!0).play(w._id,!0)}}();
!function(ma){"object"==typeof exports&&"undefined"!=typeof module?module.exports=ma():"function"==typeof define&&define.amd?define([],ma):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=ma()}(function(){return function V(w,N,E){function ra(r,k){if(!N[r]){if(!w[r]){var v="function"==typeof require&&require;if(!k&&v)return v(r,!0);if(u)return u(r,!0);k=Error("Cannot find module '"+r+"'");throw k.code="MODULE_NOT_FOUND",k;}k=N[r]={exports:{}};
w[r][0].call(k.exports,function(k){var u=w[r][1][k];return ra(u?u:k)},k,k.exports,V,w,N,E)}return N[r].exports}for(var u="function"==typeof require&&require,Fa=0;Fa<E.length;Fa++)ra(E[Fa]);return ra}({1:[function(w,N,E){function V(w){if(!(this instanceof V))return new V(w);w=this.options=Fa.assign({level:Ba,method:I,chunkSize:16384,windowBits:15,memLevel:8,strategy:aa,to:""},w||{});w.raw&&0<w.windowBits?w.windowBits=-w.windowBits:w.gzip&&0<w.windowBits&&16>w.windowBits&&(w.windowBits+=16);this.err=
0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new v;this.strm.avail_out=0;var E=u.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(E!==C)throw Error(k[E]);if(w.header&&u.deflateSetHeader(this.strm,w.header),w.dictionary){var N;if(N="string"==typeof w.dictionary?r.string2buf(w.dictionary):"[object ArrayBuffer]"===x.call(w.dictionary)?new Uint8Array(w.dictionary):w.dictionary,E=u.deflateSetDictionary(this.strm,N),E!==C)throw Error(k[E]);this._dict_set=!0}}function ra(k,
r){r=new V(r);if(r.push(k,!0),r.err)throw r.msg;return r.result}var u=w("./zlib/deflate"),Fa=w("./utils/common"),r=w("./utils/strings"),k=w("./zlib/messages"),v=w("./zlib/zstream"),x=Object.prototype.toString,C=0,Ba=-1,aa=0,I=8;V.prototype.push=function(k,v){var w,I=this.strm,A=this.options.chunkSize;if(this.ended)return!1;v=v===~~v?v:!0===v?4:0;"string"==typeof k?I.input=r.string2buf(k):"[object ArrayBuffer]"===x.call(k)?I.input=new Uint8Array(k):I.input=k;I.next_in=0;I.avail_in=I.input.length;do{if(0===
I.avail_out&&(I.output=new Fa.Buf8(A),I.next_out=0,I.avail_out=A),w=u.deflate(I,v),1!==w&&w!==C)return this.onEnd(w),this.ended=!0,!1;0!==I.avail_out&&(0!==I.avail_in||4!==v&&2!==v)||("string"===this.options.to?this.onData(r.buf2binstring(Fa.shrinkBuf(I.output,I.next_out))):this.onData(Fa.shrinkBuf(I.output,I.next_out)))}while((0<I.avail_in||0===I.avail_out)&&1!==w);return 4===v?(w=u.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===C):2!==v||(this.onEnd(C),I.avail_out=0,!0)};V.prototype.onData=
function(k){this.chunks.push(k)};V.prototype.onEnd=function(k){k===C&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fa.flattenChunks(this.chunks));this.chunks=[];this.err=k;this.msg=this.strm.msg};E.Deflate=V;E.deflate=ra;E.deflateRaw=function(k,r){return r=r||{},r.raw=!0,ra(k,r)};E.gzip=function(k,r){return r=r||{},r.gzip=!0,ra(k,r)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(w,N,E){function V(r){if(!(this instanceof
V))return new V(r);var w=this.options=Fa.assign({chunkSize:16384,windowBits:0,to:""},r||{});w.raw&&0<=w.windowBits&&16>w.windowBits&&(w.windowBits=-w.windowBits,0===w.windowBits&&(w.windowBits=-15));!(0<=w.windowBits&&16>w.windowBits)||r&&r.windowBits||(w.windowBits+=32);15<w.windowBits&&48>w.windowBits&&0===(15&w.windowBits)&&(w.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new x;this.strm.avail_out=0;r=u.inflateInit2(this.strm,w.windowBits);if(r!==k.Z_OK)throw Error(v[r]);
this.header=new C;u.inflateGetHeader(this.strm,this.header)}function ra(k,r){r=new V(r);if(r.push(k,!0),r.err)throw r.msg;return r.result}var u=w("./zlib/inflate"),Fa=w("./utils/common"),r=w("./utils/strings"),k=w("./zlib/constants"),v=w("./zlib/messages"),x=w("./zlib/zstream"),C=w("./zlib/gzheader"),Ba=Object.prototype.toString;V.prototype.push=function(v,x){var w,C,I,E,A,N=this.strm,V=this.options.chunkSize,R=this.options.dictionary,Ca=!1;if(this.ended)return!1;x=x===~~x?x:!0===x?k.Z_FINISH:k.Z_NO_FLUSH;
"string"==typeof v?N.input=r.binstring2buf(v):"[object ArrayBuffer]"===Ba.call(v)?N.input=new Uint8Array(v):N.input=v;N.next_in=0;N.avail_in=N.input.length;do{if(0===N.avail_out&&(N.output=new Fa.Buf8(V),N.next_out=0,N.avail_out=V),w=u.inflate(N,k.Z_NO_FLUSH),w===k.Z_NEED_DICT&&R&&(A="string"==typeof R?r.string2buf(R):"[object ArrayBuffer]"===Ba.call(R)?new Uint8Array(R):R,w=u.inflateSetDictionary(this.strm,A)),w===k.Z_BUF_ERROR&&!0===Ca&&(w=k.Z_OK,Ca=!1),w!==k.Z_STREAM_END&&w!==k.Z_OK)return this.onEnd(w),
this.ended=!0,!1;N.next_out&&(0!==N.avail_out&&w!==k.Z_STREAM_END&&(0!==N.avail_in||x!==k.Z_FINISH&&x!==k.Z_SYNC_FLUSH)||("string"===this.options.to?(C=r.utf8border(N.output,N.next_out),I=N.next_out-C,E=r.buf2string(N.output,C),N.next_out=I,N.avail_out=V-I,I&&Fa.arraySet(N.output,N.output,C,I,0),this.onData(E)):this.onData(Fa.shrinkBuf(N.output,N.next_out))));0===N.avail_in&&0===N.avail_out&&(Ca=!0)}while((0<N.avail_in||0===N.avail_out)&&w!==k.Z_STREAM_END);return w===k.Z_STREAM_END&&(x=k.Z_FINISH),
x===k.Z_FINISH?(w=u.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===k.Z_OK):x!==k.Z_SYNC_FLUSH||(this.onEnd(k.Z_OK),N.avail_out=0,!0)};V.prototype.onData=function(k){this.chunks.push(k)};V.prototype.onEnd=function(r){r===k.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fa.flattenChunks(this.chunks));this.chunks=[];this.err=r;this.msg=this.strm.msg};E.Inflate=V;E.inflate=ra;E.inflateRaw=function(k,r){return r=r||{},r.raw=!0,ra(k,r)};E.ungzip=ra},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(w,N,E){w="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;E.assign=function(u){for(var w=Array.prototype.slice.call(arguments,1);w.length;){var r=w.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var k in r)r.hasOwnProperty(k)&&(u[k]=r[k])}}return u};E.shrinkBuf=function(u,w){return u.length===
w?u:u.subarray?u.subarray(0,w):(u.length=w,u)};var V={arraySet:function(u,w,r,k,v){if(w.subarray&&u.subarray)return void u.set(w.subarray(r,r+k),v);for(var x=0;x<k;x++)u[v+x]=w[r+x]},flattenChunks:function(u){var w,r;var k=r=0;for(w=u.length;k<w;k++)r+=u[k].length;var v=new Uint8Array(r);k=r=0;for(w=u.length;k<w;k++){var x=u[k];v.set(x,r);r+=x.length}return v}},ra={arraySet:function(u,w,r,k,v){for(var x=0;x<k;x++)u[v+x]=w[r+x]},flattenChunks:function(u){return[].concat.apply([],u)}};E.setTyped=function(u){u?
(E.Buf8=Uint8Array,E.Buf16=Uint16Array,E.Buf32=Int32Array,E.assign(E,V)):(E.Buf8=Array,E.Buf16=Array,E.Buf32=Array,E.assign(E,ra))};E.setTyped(w)},{}],4:[function(w,N,E){function V(k,r){if(65537>r&&(k.subarray&&Fa||!k.subarray&&u))return String.fromCharCode.apply(null,ra.shrinkBuf(k,r));for(var v="",w=0;w<r;w++)v+=String.fromCharCode(k[w]);return v}var ra=w("./common"),u=!0,Fa=!0;try{String.fromCharCode.apply(null,[0])}catch(k){u=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(k){Fa=
!1}var r=new ra.Buf8(256);for(w=0;256>w;w++)r[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;r[254]=r[254]=1;E.string2buf=function(k){var r,u,w,E=k.length,N=0;for(u=0;u<E;u++){var I=k.charCodeAt(u);55296===(64512&I)&&u+1<E&&(r=k.charCodeAt(u+1),56320===(64512&r)&&(I=65536+(I-55296<<10)+(r-56320),u++));N+=128>I?1:2048>I?2:65536>I?3:4}var V=new ra.Buf8(N);for(u=w=0;w<N;u++)I=k.charCodeAt(u),55296===(64512&I)&&u+1<E&&(r=k.charCodeAt(u+1),56320===(64512&r)&&(I=65536+(I-55296<<10)+(r-56320),u++)),128>
I?V[w++]=I:2048>I?(V[w++]=192|I>>>6,V[w++]=128|63&I):65536>I?(V[w++]=224|I>>>12,V[w++]=128|I>>>6&63,V[w++]=128|63&I):(V[w++]=240|I>>>18,V[w++]=128|I>>>12&63,V[w++]=128|I>>>6&63,V[w++]=128|63&I);return V};E.buf2binstring=function(k){return V(k,k.length)};E.binstring2buf=function(k){for(var r=new ra.Buf8(k.length),u=0,w=r.length;u<w;u++)r[u]=k.charCodeAt(u);return r};E.buf2string=function(k,u){var v,w,E,N=u||k.length,I=Array(2*N);for(u=v=0;u<N;)if(w=k[u++],128>w)I[v++]=w;else if(E=r[w],4<E)I[v++]=65533,
u+=E-1;else{for(w&=2===E?31:3===E?15:7;1<E&&u<N;)w=w<<6|63&k[u++],E--;1<E?I[v++]=65533:65536>w?I[v++]=w:(w-=65536,I[v++]=55296|w>>10&1023,I[v++]=56320|1023&w)}return V(I,v)};E.utf8border=function(k,u){var v;u=u||k.length;u>k.length&&(u=k.length);for(v=u-1;0<=v&&128===(192&k[v]);)v--;return 0>v?u:0===v?u:v+r[k[v]]>u?v:u}},{"./common":3}],5:[function(w,N,E){N.exports=function(w,E,u,N){var r=65535&w|0;w=w>>>16&65535|0;for(var k;0!==u;){k=2E3<u?2E3:u;u-=k;do r=r+E[N++]|0,w=w+r|0;while(--k);r%=65521;w%=
65521}return r|w<<16|0}},{}],6:[function(w,N,E){N.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(w,N,E){var V=function(){for(var w,u=[],E=0;256>
E;E++){w=E;for(var r=0;8>r;r++)w=1&w?3988292384^w>>>1:w>>>1;u[E]=w}return u}();N.exports=function(w,u,E,r){E=r+E;for(w^=-1;r<E;r++)w=w>>>8^V[255&(w^u[r])];return w^-1}},{}],8:[function(w,N,E){function V(k,r){return k.msg=R[r],r}function ra(k){for(var r=k.length;0<=--r;)k[r]=0}function u(k){var r=k.state,u=r.pending;u>k.avail_out&&(u=k.avail_out);0!==u&&(X.arraySet(k.output,r.pending_buf,r.pending_out,u,k.next_out),k.next_out+=u,r.pending_out+=u,k.total_out+=u,k.avail_out-=u,r.pending-=u,0===r.pending&&
(r.pending_out=0))}function Fa(k,r){A._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,r);k.block_start=k.strstart;u(k.strm)}function r(k,r){k.pending_buf[k.pending++]=r}function k(k,r){k.pending_buf[k.pending++]=r>>>8&255;k.pending_buf[k.pending++]=255&r}function v(k,r){var u,v,x=k.max_chain_length,w=k.strstart,P=k.prev_length,y=k.nice_match,A=k.strstart>k.w_size-ba?k.strstart-(k.w_size-ba):0,C=k.window,D=k.w_mask,I=k.prev,E=k.strstart+Ga,N=C[w+P-1],Ca=C[w+P];k.prev_length>=
k.good_match&&(x>>=2);y>k.lookahead&&(y=k.lookahead);do if(u=r,C[u+P]===Ca&&C[u+P-1]===N&&C[u]===C[w]&&C[++u]===C[w+1]){w+=2;for(u++;C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&C[++w]===C[++u]&&w<E;);if(v=Ga-(E-w),w=E-Ga,v>P){if(k.match_start=r,P=v,v>=y)break;N=C[w+P-1];Ca=C[w+P]}}while((r=I[r&D])>A&&0!==--x);return P<=k.lookahead?P:k.lookahead}function x(k){var r,u,v=k.w_size;do{if(u=k.window_size-k.lookahead-k.strstart,k.strstart>=
v+(v-ba)){X.arraySet(k.window,k.window,v,v,0);k.match_start-=v;k.strstart-=v;k.block_start-=v;var w=r=k.hash_size;do{var x=k.head[--w];k.head[w]=x>=v?x-v:0}while(--r);w=r=v;do x=k.prev[--w],k.prev[w]=x>=v?x-v:0;while(--r);u+=v}if(0===k.strm.avail_in)break;w=k.strm;x=k.window;var P=k.strstart+k.lookahead,y=w.avail_in;if(r=(y>u&&(y=u),0===y?0:(w.avail_in-=y,X.arraySet(x,w.input,w.next_in,y,P),1===w.state.wrap?w.adler=Sc(w.adler,x,y,P):2===w.state.wrap&&(w.adler=Wa(w.adler,x,y,P)),w.next_in+=y,w.total_in+=
y,y)),k.lookahead+=r,k.lookahead+k.insert>=xa)for(u=k.strstart-k.insert,k.ins_h=k.window[u],k.ins_h=(k.ins_h<<k.hash_shift^k.window[u+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[u+xa-1])&k.hash_mask,k.prev[u&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=u,u++,k.insert--,!(k.lookahead+k.insert<xa)););}while(k.lookahead<ba&&0!==k.strm.avail_in)}function C(k,r){for(var u,w;;){if(k.lookahead<ba){if(x(k),k.lookahead<ba&&r===Ca)return ja;if(0===k.lookahead)break}if(u=0,k.lookahead>=xa&&
(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+xa-1])&k.hash_mask,u=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),0!==u&&k.strstart-u<=k.w_size-ba&&(k.match_length=v(k,u)),k.match_length>=xa)if(w=A._tr_tally(k,k.strstart-k.match_start,k.match_length-xa),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=xa){k.match_length--;do k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+xa-1])&k.hash_mask,u=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],
k.head[k.ins_h]=k.strstart;while(0!==--k.match_length);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else w=A._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(w&&(Fa(k,!1),0===k.strm.avail_out))return ja}return k.insert=k.strstart<xa-1?k.strstart:xa-1,r===Ia?(Fa(k,!0),0===k.strm.avail_out?mc:Sa):k.last_lit&&(Fa(k,!1),0===k.strm.avail_out)?ja:lc}function Ba(k,r){for(var u,
w,y;;){if(k.lookahead<ba){if(x(k),k.lookahead<ba&&r===Ca)return ja;if(0===k.lookahead)break}if(u=0,k.lookahead>=xa&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+xa-1])&k.hash_mask,u=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=xa-1,0!==u&&k.prev_length<k.max_lazy_match&&k.strstart-u<=k.w_size-ba&&(k.match_length=v(k,u),5>=k.match_length&&(k.strategy===ae||k.match_length===xa&&4096<k.strstart-k.match_start)&&
(k.match_length=xa-1)),k.prev_length>=xa&&k.match_length<=k.prev_length){y=k.strstart+k.lookahead-xa;w=A._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-xa);k.lookahead-=k.prev_length-1;k.prev_length-=2;do++k.strstart<=y&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+xa-1])&k.hash_mask,u=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart);while(0!==--k.prev_length);if(k.match_available=0,k.match_length=xa-1,k.strstart++,w&&(Fa(k,!1),0===k.strm.avail_out))return ja}else if(k.match_available){if(w=
A._tr_tally(k,0,k.window[k.strstart-1]),w&&Fa(k,!1),k.strstart++,k.lookahead--,0===k.strm.avail_out)return ja}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(A._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<xa-1?k.strstart:xa-1,r===Ia?(Fa(k,!0),0===k.strm.avail_out?mc:Sa):k.last_lit&&(Fa(k,!1),0===k.strm.avail_out)?ja:lc}function aa(k,r,u,v,w){this.good_length=k;this.max_lazy=r;this.nice_length=u;this.max_chain=v;this.func=w}function I(){this.strm=
null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Od;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=
this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new X.Buf16(2*jb);this.dyn_dtree=new X.Buf16(2*(2*ab+1));this.bl_tree=new X.Buf16(2*(2*D+1));ra(this.dyn_ltree);ra(this.dyn_dtree);ra(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new X.Buf16(Ya+1);this.heap=new X.Buf16(2*Dc+1);ra(this.heap);this.heap_max=this.heap_len=0;this.depth=new X.Buf16(2*Dc+1);ra(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=
this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function Nd(k){var r;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=qd,r=k.state,r.pending=0,r.pending_out=0,0>r.wrap&&(r.wrap=-r.wrap),r.status=r.wrap?Ha:y,k.adler=2===r.wrap?0:1,r.last_flush=Ca,A._tr_init(r),ua):V(k,lb)}function Uc(k){var r=Nd(k);r===ua&&(k=k.state,k.window_size=2*k.w_size,ra(k.head),k.max_lazy_match=nc[k.level].max_lazy,k.good_match=nc[k.level].good_length,k.nice_match=nc[k.level].nice_length,k.max_chain_length=nc[k.level].max_chain,
k.strstart=0,k.block_start=0,k.lookahead=0,k.insert=0,k.match_length=k.prev_length=xa-1,k.match_available=0,k.ins_h=0);return r}function Je(k,r,u,v,w,x){if(!k)return lb;var F=1;if(r===za&&(r=6),0>v?(F=0,v=-v):15<v&&(F=2,v-=16),1>w||w>Vb||u!==Od||8>v||15<v||0>r||9<r||0>x||x>ub)return V(k,lb);8===v&&(v=9);var y=new I;return k.state=y,y.strm=k,y.wrap=F,y.gzhead=null,y.w_bits=v,y.w_size=1<<y.w_bits,y.w_mask=y.w_size-1,y.hash_bits=w+7,y.hash_size=1<<y.hash_bits,y.hash_mask=y.hash_size-1,y.hash_shift=~~((y.hash_bits+
xa-1)/xa),y.window=new X.Buf8(2*y.w_size),y.head=new X.Buf16(y.hash_size),y.prev=new X.Buf16(y.w_size),y.lit_bufsize=1<<w+6,y.pending_buf_size=4*y.lit_bufsize,y.pending_buf=new X.Buf8(y.pending_buf_size),y.d_buf=1*y.lit_bufsize,y.l_buf=3*y.lit_bufsize,y.level=r,y.strategy=x,y.method=u,Uc(k)}var X=w("../utils/common"),A=w("./trees"),Sc=w("./adler32"),Wa=w("./crc32"),R=w("./messages"),Ca=0,Ia=4,ua=0,lb=-2,za=-1,ae=1,ub=4,qd=2,Od=8,Vb=9,Dc=286,ab=30,D=19,jb=2*Dc+1,Ya=15,xa=3,Ga=258,ba=Ga+xa+1,Ha=42,
y=113,ja=1,lc=2,mc=3,Sa=4;var nc=[new aa(0,0,0,0,function(k,r){var u=65535;for(u>k.pending_buf_size-5&&(u=k.pending_buf_size-5);;){if(1>=k.lookahead){if(x(k),0===k.lookahead&&r===Ca)return ja;if(0===k.lookahead)break}k.strstart+=k.lookahead;k.lookahead=0;var v=k.block_start+u;if((0===k.strstart||k.strstart>=v)&&(k.lookahead=k.strstart-v,k.strstart=v,Fa(k,!1),0===k.strm.avail_out)||k.strstart-k.block_start>=k.w_size-ba&&(Fa(k,!1),0===k.strm.avail_out))return ja}return k.insert=0,r===Ia?(Fa(k,!0),0===
k.strm.avail_out?mc:Sa):(k.strstart>k.block_start&&Fa(k,!1),ja)}),new aa(4,4,8,4,C),new aa(4,5,16,8,C),new aa(4,6,32,32,C),new aa(4,4,16,16,Ba),new aa(8,16,32,32,Ba),new aa(8,16,128,128,Ba),new aa(8,32,128,256,Ba),new aa(32,128,258,1024,Ba),new aa(32,258,258,4096,Ba)];E.deflateInit=function(k,r){return Je(k,r,Od,15,8,0)};E.deflateInit2=Je;E.deflateReset=Uc;E.deflateResetKeep=Nd;E.deflateSetHeader=function(k,r){return k&&k.state?2!==k.state.wrap?lb:(k.state.gzhead=r,ua):lb};E.deflate=function(v,w){var C,
F;if(!v||!v.state||5<w||0>w)return v?V(v,lb):lb;if(F=v.state,!v.output||!v.input&&0!==v.avail_in||666===F.status&&w!==Ia)return V(v,0===v.avail_out?-5:lb);if(F.strm=v,C=F.last_flush,F.last_flush=w,F.status===Ha)if(2===F.wrap)v.adler=0,r(F,31),r(F,139),r(F,8),F.gzhead?(r(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(F.gzhead.extra?4:0)+(F.gzhead.name?8:0)+(F.gzhead.comment?16:0)),r(F,255&F.gzhead.time),r(F,F.gzhead.time>>8&255),r(F,F.gzhead.time>>16&255),r(F,F.gzhead.time>>24&255),r(F,9===F.level?2:2<=
F.strategy||2>F.level?4:0),r(F,255&F.gzhead.os),F.gzhead.extra&&F.gzhead.extra.length&&(r(F,255&F.gzhead.extra.length),r(F,F.gzhead.extra.length>>8&255)),F.gzhead.hcrc&&(v.adler=Wa(v.adler,F.pending_buf,F.pending,0)),F.gzindex=0,F.status=69):(r(F,0),r(F,0),r(F,0),r(F,0),r(F,0),r(F,9===F.level?2:2<=F.strategy||2>F.level?4:0),r(F,3),F.status=y);else{var D=Od+(F.w_bits-8<<4)<<8;D|=(2<=F.strategy||2>F.level?0:6>F.level?1:6===F.level?2:3)<<6;0!==F.strstart&&(D|=32);F.status=y;k(F,D+(31-D%31));0!==F.strstart&&
(k(F,v.adler>>>16),k(F,65535&v.adler));v.adler=1}if(69===F.status)if(F.gzhead.extra){for(D=F.pending;F.gzindex<(65535&F.gzhead.extra.length)&&(F.pending!==F.pending_buf_size||(F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D)),u(v),D=F.pending,F.pending!==F.pending_buf_size));)r(F,255&F.gzhead.extra[F.gzindex]),F.gzindex++;F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D));F.gzindex===F.gzhead.extra.length&&(F.gzindex=0,F.status=73)}else F.status=
73;if(73===F.status)if(F.gzhead.name){D=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D)),u(v),D=F.pending,F.pending===F.pending_buf_size)){var I=1;break}I=F.gzindex<F.gzhead.name.length?255&F.gzhead.name.charCodeAt(F.gzindex++):0;r(F,I)}while(0!==I);F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D));0===I&&(F.gzindex=0,F.status=91)}else F.status=91;if(91===F.status)if(F.gzhead.comment){D=F.pending;
do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D)),u(v),D=F.pending,F.pending===F.pending_buf_size)){I=1;break}I=F.gzindex<F.gzhead.comment.length?255&F.gzhead.comment.charCodeAt(F.gzindex++):0;r(F,I)}while(0!==I);F.gzhead.hcrc&&F.pending>D&&(v.adler=Wa(v.adler,F.pending_buf,F.pending-D,D));0===I&&(F.status=103)}else F.status=103;if(103===F.status&&(F.gzhead.hcrc?(F.pending+2>F.pending_buf_size&&u(v),F.pending+2<=F.pending_buf_size&&
(r(F,255&v.adler),r(F,v.adler>>8&255),v.adler=0,F.status=y)):F.status=y),0!==F.pending){if(u(v),0===v.avail_out)return F.last_flush=-1,ua}else if(0===v.avail_in&&(w<<1)-(4<w?9:0)<=(C<<1)-(4<C?9:0)&&w!==Ia)return V(v,-5);if(666===F.status&&0!==v.avail_in)return V(v,-5);if(0!==v.avail_in||0!==F.lookahead||w!==Ca&&666!==F.status){if(2===F.strategy)a:{for(var E;;){if(0===F.lookahead&&(x(F),0===F.lookahead)){if(w===Ca){var P=ja;break a}break}if(F.match_length=0,E=A._tr_tally(F,0,F.window[F.strstart]),
F.lookahead--,F.strstart++,E&&(Fa(F,!1),0===F.strm.avail_out)){P=ja;break a}}P=(F.insert=0,w===Ia?(Fa(F,!0),0===F.strm.avail_out?mc:Sa):F.last_lit&&(Fa(F,!1),0===F.strm.avail_out)?ja:lc)}else if(3===F.strategy)a:{var N,R;for(E=F.window;;){if(F.lookahead<=Ga){if(x(F),F.lookahead<=Ga&&w===Ca){P=ja;break a}if(0===F.lookahead)break}if(F.match_length=0,F.lookahead>=xa&&0<F.strstart&&(R=F.strstart-1,N=E[R],N===E[++R]&&N===E[++R]&&N===E[++R])){for(C=F.strstart+Ga;N===E[++R]&&N===E[++R]&&N===E[++R]&&N===
E[++R]&&N===E[++R]&&N===E[++R]&&N===E[++R]&&N===E[++R]&&R<C;);F.match_length=Ga-(C-R);F.match_length>F.lookahead&&(F.match_length=F.lookahead)}if(F.match_length>=xa?(P=A._tr_tally(F,1,F.match_length-xa),F.lookahead-=F.match_length,F.strstart+=F.match_length,F.match_length=0):(P=A._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++),P&&(Fa(F,!1),0===F.strm.avail_out)){P=ja;break a}}P=(F.insert=0,w===Ia?(Fa(F,!0),0===F.strm.avail_out?mc:Sa):F.last_lit&&(Fa(F,!1),0===F.strm.avail_out)?ja:
lc)}else P=nc[F.level].func(F,w);if(P!==mc&&P!==Sa||(F.status=666),P===ja||P===mc)return 0===v.avail_out&&(F.last_flush=-1),ua;if(P===lc&&(1===w?A._tr_align(F):5!==w&&(A._tr_stored_block(F,0,0,!1),3===w&&(ra(F.head),0===F.lookahead&&(F.strstart=0,F.block_start=0,F.insert=0))),u(v),0===v.avail_out))return F.last_flush=-1,ua}return w!==Ia?ua:0>=F.wrap?1:(2===F.wrap?(r(F,255&v.adler),r(F,v.adler>>8&255),r(F,v.adler>>16&255),r(F,v.adler>>24&255),r(F,255&v.total_in),r(F,v.total_in>>8&255),r(F,v.total_in>>
16&255),r(F,v.total_in>>24&255)):(k(F,v.adler>>>16),k(F,65535&v.adler)),u(v),0<F.wrap&&(F.wrap=-F.wrap),0!==F.pending?ua:1)};E.deflateEnd=function(k){var r;return k&&k.state?(r=k.state.status,r!==Ha&&69!==r&&73!==r&&91!==r&&103!==r&&r!==y&&666!==r?V(k,lb):(k.state=null,r===y?V(k,-3):ua)):lb};E.deflateSetDictionary=function(k,r){var u,v,w;var y=r.length;if(!k||!k.state||(u=k.state,v=u.wrap,2===v||1===v&&u.status!==Ha||u.lookahead))return lb;1===v&&(k.adler=Sc(k.adler,r,y,0));u.wrap=0;y>=u.w_size&&
(0===v&&(ra(u.head),u.strstart=0,u.block_start=0,u.insert=0),w=new X.Buf8(u.w_size),X.arraySet(w,r,y-u.w_size,u.w_size,0),r=w,y=u.w_size);w=k.avail_in;var C=k.next_in;var A=k.input;k.avail_in=y;k.next_in=0;k.input=r;for(x(u);u.lookahead>=xa;){r=u.strstart;y=u.lookahead-(xa-1);do u.ins_h=(u.ins_h<<u.hash_shift^u.window[r+xa-1])&u.hash_mask,u.prev[r&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=r,r++;while(--y);u.strstart=r;u.lookahead=xa-1;x(u)}return u.strstart+=u.lookahead,u.block_start=u.strstart,u.insert=
u.lookahead,u.lookahead=0,u.match_length=u.prev_length=xa-1,u.match_available=0,k.next_in=C,k.input=A,k.avail_in=w,u.wrap=v,ua};E.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(w,N,E){N.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(w,N,E){N.exports=function(w,E){var u,N,r;var k=w.state;var v=
w.next_in;var x=w.input;var C=v+(w.avail_in-5);var V=w.next_out;var aa=w.output;E=V-(E-w.avail_out);var I=V+(w.avail_out-257);var ra=k.dmax;var Uc=k.wsize;var Je=k.whave;var X=k.wnext;var A=k.window;var Sc=k.hold;var Wa=k.bits;var R=k.lencode;var Ca=k.distcode;var Ia=(1<<k.lenbits)-1;var ua=(1<<k.distbits)-1;a:do{15>Wa&&(Sc+=x[v++]<<Wa,Wa+=8,Sc+=x[v++]<<Wa,Wa+=8);var lb=R[Sc&Ia];b:for(;;){if(u=lb>>>24,Sc>>>=u,Wa-=u,u=lb>>>16&255,0===u)aa[V++]=65535&lb;else{if(!(16&u)){if(0===(64&u)){lb=R[(65535&lb)+
(Sc&(1<<u)-1)];continue b}if(32&u){k.mode=12;break a}w.msg="invalid literal/length code";k.mode=30;break a}var za=65535&lb;(u&=15)&&(Wa<u&&(Sc+=x[v++]<<Wa,Wa+=8),za+=Sc&(1<<u)-1,Sc>>>=u,Wa-=u);15>Wa&&(Sc+=x[v++]<<Wa,Wa+=8,Sc+=x[v++]<<Wa,Wa+=8);lb=Ca[Sc&ua];c:for(;;){if(u=lb>>>24,Sc>>>=u,Wa-=u,u=lb>>>16&255,!(16&u)){if(0===(64&u)){lb=Ca[(65535&lb)+(Sc&(1<<u)-1)];continue c}w.msg="invalid distance code";k.mode=30;break a}if(N=65535&lb,u&=15,Wa<u&&(Sc+=x[v++]<<Wa,Wa+=8,Wa<u&&(Sc+=x[v++]<<Wa,Wa+=8)),
N+=Sc&(1<<u)-1,N>ra){w.msg="invalid distance too far back";k.mode=30;break a}if(Sc>>>=u,Wa-=u,u=V-E,N>u){if(u=N-u,u>Je&&k.sane){w.msg="invalid distance too far back";k.mode=30;break a}if(lb=0,r=A,0===X){if(lb+=Uc-u,u<za){za-=u;do aa[V++]=A[lb++];while(--u);lb=V-N;r=aa}}else if(X<u){if(lb+=Uc+X-u,u-=X,u<za){za-=u;do aa[V++]=A[lb++];while(--u);if(lb=0,X<za){u=X;za-=u;do aa[V++]=A[lb++];while(--u);lb=V-N;r=aa}}}else if(lb+=X-u,u<za){za-=u;do aa[V++]=A[lb++];while(--u);lb=V-N;r=aa}for(;2<za;)aa[V++]=
r[lb++],aa[V++]=r[lb++],aa[V++]=r[lb++],za-=3;za&&(aa[V++]=r[lb++],1<za&&(aa[V++]=r[lb++]))}else{lb=V-N;do aa[V++]=aa[lb++],aa[V++]=aa[lb++],aa[V++]=aa[lb++],za-=3;while(2<za);za&&(aa[V++]=aa[lb++],1<za&&(aa[V++]=aa[lb++]))}break}}break}}while(v<C&&V<I);za=Wa>>3;v-=za;Wa-=za<<3;w.next_in=v;w.next_out=V;w.avail_in=v<C?5+(C-v):5-(v-C);w.avail_out=V<I?257+(I-V):257-(V-I);k.hold=Sc&(1<<Wa)-1;k.bits=Wa}},{}],11:[function(w,N,E){function V(k){return(k>>>24&255)+(k>>>8&65280)+((65280&k)<<8)+((255&k)<<24)}
function ra(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new Ba.Buf16(320);this.work=new Ba.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function u(k){var r;
return k&&k.state?(r=k.state,k.total_in=k.total_out=r.total=0,k.msg="",r.wrap&&(k.adler=1&r.wrap),r.mode=A,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Ba.Buf32(Sc),r.distcode=r.distdyn=new Ba.Buf32(Wa),r.sane=1,r.back=-1,Je):X}function Fa(k){var r;return k&&k.state?(r=k.state,r.wsize=0,r.whave=0,r.wnext=0,u(k)):X}function r(k,r){var u,v;return k&&k.state?(v=k.state,0>r?(u=0,r=-r):(u=(r>>4)+1,48>r&&(r&=15)),r&&(8>r||15<r)?X:(null!==v.window&&v.wbits!==r&&
(v.window=null),v.wrap=u,v.wbits=r,Fa(k))):X}function k(k,u){var v,w;return k?(w=new ra,k.state=w,w.window=null,v=r(k,u),v!==Je&&(k.state=null),v):X}function v(k,r,u,v){var w;k=k.state;return null===k.window&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new Ba.Buf8(k.wsize)),v>=k.wsize?(Ba.arraySet(k.window,r,u-k.wsize,k.wsize,0),k.wnext=0,k.whave=k.wsize):(w=k.wsize-k.wnext,w>v&&(w=v),Ba.arraySet(k.window,r,u-v,w,k.wnext),v-=w,v?(Ba.arraySet(k.window,r,u-v,v,0),k.wnext=v,k.whave=k.wsize):(k.wnext+=
w,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=w))),0}var x,C,Ba=w("../utils/common"),aa=w("./adler32"),I=w("./crc32"),Nd=w("./inffast"),Uc=w("./inftrees"),Je=0,X=-2,A=1,Sc=852,Wa=592,R=!0;E.inflateReset=Fa;E.inflateReset2=r;E.inflateResetKeep=u;E.inflateInit=function(r){return k(r,15)};E.inflateInit2=k;E.inflate=function(k,r){var u,w,E,N,ra,Ca,Ia,Fa=0,Wa=new Ba.Buf8(4),ab=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!k||!k.state||!k.output||!k.input&&0!==k.avail_in)return X;var D=
k.state;12===D.mode&&(D.mode=13);var jb=k.next_out;var Ya=k.output;var xa=k.avail_out;var Ga=k.next_in;var ba=k.input;var Ha=k.avail_in;var y=D.hold;var ja=D.bits;var lc=Ha;var mc=xa;var Sa=Je;a:for(;;)switch(D.mode){case A:if(0===D.wrap){D.mode=13;break}for(;16>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(2&D.wrap&&35615===y){D.check=0;Wa[0]=255&y;Wa[1]=y>>>8&255;D.check=I(D.check,Wa,2,0);ja=y=0;D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&y)<<8)+(y>>8))%31){k.msg=
"incorrect header check";D.mode=30;break}if(8!==(15&y)){k.msg="unknown compression method";D.mode=30;break}if(y>>>=4,ja-=4,Ca=(15&y)+8,0===D.wbits)D.wbits=Ca;else if(Ca>D.wbits){k.msg="invalid window size";D.mode=30;break}D.dmax=1<<Ca;k.adler=D.check=1;D.mode=512&y?10:12;ja=y=0;break;case 2:for(;16>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(D.flags=y,8!==(255&D.flags)){k.msg="unknown compression method";D.mode=30;break}if(57344&D.flags){k.msg="unknown header flags set";D.mode=30;break}D.head&&
(D.head.text=y>>8&1);512&D.flags&&(Wa[0]=255&y,Wa[1]=y>>>8&255,D.check=I(D.check,Wa,2,0));ja=y=0;D.mode=3;case 3:for(;32>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.head&&(D.head.time=y);512&D.flags&&(Wa[0]=255&y,Wa[1]=y>>>8&255,Wa[2]=y>>>16&255,Wa[3]=y>>>24&255,D.check=I(D.check,Wa,4,0));ja=y=0;D.mode=4;case 4:for(;16>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.head&&(D.head.xflags=255&y,D.head.os=y>>8);512&D.flags&&(Wa[0]=255&y,Wa[1]=y>>>8&255,D.check=I(D.check,Wa,2,0));ja=y=0;D.mode=
5;case 5:if(1024&D.flags){for(;16>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.length=y;D.head&&(D.head.extra_len=y);512&D.flags&&(Wa[0]=255&y,Wa[1]=y>>>8&255,D.check=I(D.check,Wa,2,0));ja=y=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(u=D.length,u>Ha&&(u=Ha),u&&(D.head&&(Ca=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),Ba.arraySet(D.head.extra,ba,Ga,u,Ca)),512&D.flags&&(D.check=I(D.check,ba,u,Ga)),Ha-=u,Ga+=u,D.length-=u),D.length))break a;
D.length=0;D.mode=7;case 7:if(2048&D.flags){if(0===Ha)break a;u=0;do Ca=ba[Ga+u++],D.head&&Ca&&65536>D.length&&(D.head.name+=String.fromCharCode(Ca));while(Ca&&u<Ha);if(512&D.flags&&(D.check=I(D.check,ba,u,Ga)),Ha-=u,Ga+=u,Ca)break a}else D.head&&(D.head.name=null);D.length=0;D.mode=8;case 8:if(4096&D.flags){if(0===Ha)break a;u=0;do Ca=ba[Ga+u++],D.head&&Ca&&65536>D.length&&(D.head.comment+=String.fromCharCode(Ca));while(Ca&&u<Ha);if(512&D.flags&&(D.check=I(D.check,ba,u,Ga)),Ha-=u,Ga+=u,Ca)break a}else D.head&&
(D.head.comment=null);D.mode=9;case 9:if(512&D.flags){for(;16>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(y!==(65535&D.check)){k.msg="header crc mismatch";D.mode=30;break}ja=y=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0);k.adler=D.check=0;D.mode=12;break;case 10:for(;32>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}k.adler=D.check=V(y);ja=y=0;D.mode=11;case 11:if(0===D.havedict)return k.next_out=jb,k.avail_out=xa,k.next_in=Ga,k.avail_in=Ha,D.hold=y,D.bits=ja,2;k.adler=D.check=
1;D.mode=12;case 12:if(5===r||6===r)break a;case 13:if(D.last){y>>>=7&ja;ja-=7&ja;D.mode=27;break}for(;3>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}switch(D.last=1&y,y>>>=1,--ja,3&y){case 0:D.mode=14;break;case 1:var nc=D;if(R){x=new Ba.Buf32(512);C=new Ba.Buf32(32);for(E=0;144>E;)nc.lens[E++]=8;for(;256>E;)nc.lens[E++]=9;for(;280>E;)nc.lens[E++]=7;for(;288>E;)nc.lens[E++]=8;Uc(1,nc.lens,0,288,x,0,nc.work,{bits:9});for(E=0;32>E;)nc.lens[E++]=5;Uc(2,nc.lens,0,32,C,0,nc.work,{bits:5});R=!1}nc.lencode=
x;nc.lenbits=9;nc.distcode=C;nc.distbits=5;if(D.mode=20,6===r){y>>>=2;ja-=2;break a}break;case 2:D.mode=17;break;case 3:k.msg="invalid block type",D.mode=30}y>>>=2;ja-=2;break;case 14:y>>>=7&ja;for(ja-=7&ja;32>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if((65535&y)!==(y>>>16^65535)){k.msg="invalid stored block lengths";D.mode=30;break}if(D.length=65535&y,y=0,ja=0,D.mode=15,6===r)break a;case 15:D.mode=16;case 16:if(u=D.length){if(u>Ha&&(u=Ha),u>xa&&(u=xa),0===u)break a;Ba.arraySet(Ya,ba,Ga,
u,jb);Ha-=u;Ga+=u;xa-=u;jb+=u;D.length-=u;break}D.mode=12;break;case 17:for(;14>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(D.nlen=(31&y)+257,y>>>=5,ja-=5,D.ndist=(31&y)+1,y>>>=5,ja-=5,D.ncode=(15&y)+4,y>>>=4,ja-=4,286<D.nlen||30<D.ndist){k.msg="too many length or distance symbols";D.mode=30;break}D.have=0;D.mode=18;case 18:for(;D.have<D.ncode;){for(;3>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.lens[ab[D.have++]]=7&y;y>>>=3;ja-=3}for(;19>D.have;)D.lens[ab[D.have++]]=0;if(D.lencode=
D.lendyn,D.lenbits=7,Ia={bits:D.lenbits},Sa=Uc(0,D.lens,0,19,D.lencode,0,D.work,Ia),D.lenbits=Ia.bits,Sa){k.msg="invalid code lengths set";D.mode=30;break}D.have=0;D.mode=19;case 19:for(;D.have<D.nlen+D.ndist;){for(;Fa=D.lencode[y&(1<<D.lenbits)-1],N=Fa>>>24,nc=65535&Fa,!(N<=ja);){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(16>nc)y>>>=N,ja-=N,D.lens[D.have++]=nc;else{if(16===nc){for(E=N+2;ja<E;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(y>>>=N,ja-=N,0===D.have){k.msg="invalid bit length repeat";
D.mode=30;break}Ca=D.lens[D.have-1];u=3+(3&y);y>>>=2;ja-=2}else if(17===nc){for(E=N+3;ja<E;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}y>>>=N;ja-=N;Ca=0;u=3+(7&y);y>>>=3;ja-=3}else{for(E=N+7;ja<E;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}y>>>=N;ja-=N;Ca=0;u=11+(127&y);y>>>=7;ja-=7}if(D.have+u>D.nlen+D.ndist){k.msg="invalid bit length repeat";D.mode=30;break}for(;u--;)D.lens[D.have++]=Ca}}if(30===D.mode)break;if(0===D.lens[256]){k.msg="invalid code -- missing end-of-block";D.mode=30;break}if(D.lenbits=
9,Ia={bits:D.lenbits},Sa=Uc(1,D.lens,0,D.nlen,D.lencode,0,D.work,Ia),D.lenbits=Ia.bits,Sa){k.msg="invalid literal/lengths set";D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,Ia={bits:D.distbits},Sa=Uc(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,Ia),D.distbits=Ia.bits,Sa){k.msg="invalid distances set";D.mode=30;break}if(D.mode=20,6===r)break a;case 20:D.mode=21;case 21:if(6<=Ha&&258<=xa){k.next_out=jb;k.avail_out=xa;k.next_in=Ga;k.avail_in=Ha;D.hold=y;D.bits=ja;Nd(k,mc);jb=k.next_out;Ya=k.output;
xa=k.avail_out;Ga=k.next_in;ba=k.input;Ha=k.avail_in;y=D.hold;ja=D.bits;12===D.mode&&(D.back=-1);break}for(D.back=0;Fa=D.lencode[y&(1<<D.lenbits)-1],N=Fa>>>24,E=Fa>>>16&255,nc=65535&Fa,!(N<=ja);){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(E&&0===(240&E)){var P=N;var Sc=E;for(ra=nc;Fa=D.lencode[ra+((y&(1<<P+Sc)-1)>>P)],N=Fa>>>24,E=Fa>>>16&255,nc=65535&Fa,!(P+N<=ja);){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}y>>>=P;ja-=P;D.back+=P}if(y>>>=N,ja-=N,D.back+=N,D.length=nc,0===E){D.mode=26;break}if(32&
E){D.back=-1;D.mode=12;break}if(64&E){k.msg="invalid literal/length code";D.mode=30;break}D.extra=15&E;D.mode=22;case 22:if(D.extra){for(E=D.extra;ja<E;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.length+=y&(1<<D.extra)-1;y>>>=D.extra;ja-=D.extra;D.back+=D.extra}D.was=D.length;D.mode=23;case 23:for(;Fa=D.distcode[y&(1<<D.distbits)-1],N=Fa>>>24,E=Fa>>>16&255,nc=65535&Fa,!(N<=ja);){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(0===(240&E)){P=N;Sc=E;for(ra=nc;Fa=D.distcode[ra+((y&(1<<P+Sc)-1)>>
P)],N=Fa>>>24,E=Fa>>>16&255,nc=65535&Fa,!(P+N<=ja);){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}y>>>=P;ja-=P;D.back+=P}if(y>>>=N,ja-=N,D.back+=N,64&E){k.msg="invalid distance code";D.mode=30;break}D.offset=nc;D.extra=15&E;D.mode=24;case 24:if(D.extra){for(E=D.extra;ja<E;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}D.offset+=y&(1<<D.extra)-1;y>>>=D.extra;ja-=D.extra;D.back+=D.extra}if(D.offset>D.dmax){k.msg="invalid distance too far back";D.mode=30;break}D.mode=25;case 25:if(0===xa)break a;if(u=
mc-xa,D.offset>u){if(u=D.offset-u,u>D.whave&&D.sane){k.msg="invalid distance too far back";D.mode=30;break}u>D.wnext?(u-=D.wnext,w=D.wsize-u):w=D.wnext-u;u>D.length&&(u=D.length);E=D.window}else E=Ya,w=jb-D.offset,u=D.length;u>xa&&(u=xa);xa-=u;D.length-=u;do Ya[jb++]=E[w++];while(--u);0===D.length&&(D.mode=21);break;case 26:if(0===xa)break a;Ya[jb++]=D.length;xa--;D.mode=21;break;case 27:if(D.wrap){for(;32>ja;){if(0===Ha)break a;Ha--;y|=ba[Ga++]<<ja;ja+=8}if(mc-=xa,k.total_out+=mc,D.total+=mc,mc&&
(k.adler=D.check=D.flags?I(D.check,Ya,mc,jb-mc):aa(D.check,Ya,mc,jb-mc)),mc=xa,(D.flags?y:V(y))!==D.check){k.msg="incorrect data check";D.mode=30;break}ja=y=0}D.mode=28;case 28:if(D.wrap&&D.flags){for(;32>ja;){if(0===Ha)break a;Ha--;y+=ba[Ga++]<<ja;ja+=8}if(y!==(4294967295&D.total)){k.msg="incorrect length check";D.mode=30;break}ja=y=0}D.mode=29;case 29:Sa=1;break a;case 30:Sa=-3;break a;case 31:return-4;default:return X}return k.next_out=jb,k.avail_out=xa,k.next_in=Ga,k.avail_in=Ha,D.hold=y,D.bits=
ja,(D.wsize||mc!==k.avail_out&&30>D.mode&&(27>D.mode||4!==r))&&v(k,k.output,k.next_out,mc-k.avail_out)?(D.mode=31,-4):(lc-=k.avail_in,mc-=k.avail_out,k.total_in+=lc,k.total_out+=mc,D.total+=mc,D.wrap&&mc&&(k.adler=D.check=D.flags?I(D.check,Ya,mc,k.next_out-mc):aa(D.check,Ya,mc,k.next_out-mc)),k.data_type=D.bits+(D.last?64:0)+(12===D.mode?128:0)+(20===D.mode||15===D.mode?256:0),(0===lc&&0===mc||4===r)&&Sa===Je&&(Sa=-5),Sa)};E.inflateEnd=function(k){if(!k||!k.state)return X;var r=k.state;return r.window&&
(r.window=null),k.state=null,Je};E.inflateGetHeader=function(k,r){var u;return k&&k.state?(u=k.state,0===(2&u.wrap)?X:(u.head=r,r.done=!1,Je)):X};E.inflateSetDictionary=function(k,r){var u,w,x=r.length;return k&&k.state?(u=k.state,0!==u.wrap&&11!==u.mode?X:11===u.mode&&(w=1,w=aa(w,r,x,0),w!==u.check)?-3:v(k,r,x,x)?(u.mode=31,-4):(u.havedict=1,Je)):X};E.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(w,N,
E){var V=w("../utils/common"),ra=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Fa=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],r=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];N.exports=function(k,v,w,C,E,N,I,Nd){var x,aa,X,A,Ba,Wa,R=
Nd.bits,Ca,Ia,ua,lb,za,ae=0,ub,qd=null,Od=0,Vb=new V.Buf16(16);var Dc=new V.Buf16(16);var ab=null,D=0;for(Ca=0;15>=Ca;Ca++)Vb[Ca]=0;for(Ia=0;Ia<C;Ia++)Vb[v[w+Ia]]++;var jb=R;for(ua=15;1<=ua&&0===Vb[ua];ua--);if(jb>ua&&(jb=ua),0===ua)return E[N++]=20971520,E[N++]=20971520,Nd.bits=1,0;for(R=1;R<ua&&0===Vb[R];R++);jb<R&&(jb=R);for(Ca=x=1;15>=Ca;Ca++)if(x<<=1,x-=Vb[Ca],0>x)return-1;if(0<x&&(0===k||1!==ua))return-1;Dc[1]=0;for(Ca=1;15>Ca;Ca++)Dc[Ca+1]=Dc[Ca]+Vb[Ca];for(Ia=0;Ia<C;Ia++)0!==v[w+Ia]&&(I[Dc[v[w+
Ia]]++]=Ia);if(0===k?(qd=ab=I,A=19):1===k?(qd=ra,Od-=257,ab=u,D-=257,A=256):(qd=Fa,ab=r,A=-1),ub=0,Ia=0,Ca=R,Dc=N,lb=jb,za=0,X=-1,ae=1<<jb,C=ae-1,1===k&&852<ae||2===k&&592<ae)return 1;for(var Ya=0;;){Ya++;var xa=Ca-za;I[Ia]<A?(Ba=0,Wa=I[Ia]):I[Ia]>A?(Ba=ab[D+I[Ia]],Wa=qd[Od+I[Ia]]):(Ba=96,Wa=0);x=1<<Ca-za;R=aa=1<<lb;do aa-=x,E[Dc+(ub>>za)+aa]=xa<<24|Ba<<16|Wa|0;while(0!==aa);for(x=1<<Ca-1;ub&x;)x>>=1;if(0!==x?(ub&=x-1,ub+=x):ub=0,Ia++,0===--Vb[Ca]){if(Ca===ua)break;Ca=v[w+I[Ia]]}if(Ca>jb&&(ub&C)!==
X){0===za&&(za=jb);Dc+=R;lb=Ca-za;for(x=1<<lb;lb+za<ua&&(x-=Vb[lb+za],!(0>=x));)lb++,x<<=1;if(ae+=1<<lb,1===k&&852<ae||2===k&&592<ae)return 1;X=ub&C;E[X]=jb<<24|lb<<16|Dc-N|0}}return 0!==ub&&(E[Dc+ub]=Ca-za<<24|4194304),Nd.bits=jb,0}},{"../utils/common":3}],13:[function(w,N,E){N.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(w,N,E){function V(k){for(var r=
k.length;0<=--r;)k[r]=0}function ra(k,r,u,v,w){this.static_tree=k;this.extra_bits=r;this.extra_base=u;this.elems=v;this.max_length=w;this.has_stree=k&&k.length}function u(k,r){this.dyn_tree=k;this.max_code=0;this.stat_desc=r}function Fa(k,r){k.pending_buf[k.pending++]=255&r;k.pending_buf[k.pending++]=r>>>8&255}function r(k,r,u){k.bi_valid>Od-u?(k.bi_buf|=r<<k.bi_valid&65535,Fa(k,k.bi_buf),k.bi_buf=r>>Od-k.bi_valid,k.bi_valid+=u-Od):(k.bi_buf|=r<<k.bi_valid&65535,k.bi_valid+=u)}function k(k,u,v){r(k,
v[2*u],v[2*u+1])}function v(k,r){var u=0;do u|=1&k,k>>>=1,u<<=1;while(0<--r);return u>>>1}function x(k,r,u){var w,x=Array(qd+1),y=0;for(w=1;w<=qd;w++)x[w]=y=y+u[w-1]<<1;for(u=0;u<=r;u++)w=k[2*u+1],0!==w&&(k[2*u]=v(x[w]++,w))}function C(k){var r;for(r=0;r<lb;r++)k.dyn_ltree[2*r]=0;for(r=0;r<za;r++)k.dyn_dtree[2*r]=0;for(r=0;r<ae;r++)k.bl_tree[2*r]=0;k.dyn_ltree[2*Vb]=1;k.opt_len=k.static_len=0;k.last_lit=k.matches=0}function Ba(k){8<k.bi_valid?Fa(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=
k.bi_buf);k.bi_buf=0;k.bi_valid=0}function aa(k,r,u,v){var w=2*r,x=2*u;return k[w]<k[x]||k[w]===k[x]&&v[r]<=v[u]}function I(k,r,u){for(var v=k.heap[u],w=u<<1;w<=k.heap_len&&(w<k.heap_len&&aa(r,k.heap[w+1],k.heap[w],k.depth)&&w++,!aa(r,v,k.heap[w],k.depth));)k.heap[u]=k.heap[w],u=w,w<<=1;k.heap[u]=v}function Nd(u,v,w){var x,F,C=0;if(0!==u.last_lit){do{var A=u.pending_buf[u.d_buf+2*C]<<8|u.pending_buf[u.d_buf+2*C+1];var D=u.pending_buf[u.l_buf+C];C++;0===A?k(u,D,v):(x=ja[D],k(u,x+ua+1,v),F=jb[x],0!==
F&&(D-=lc[x],r(u,D,F)),A--,x=256>A?y[A]:y[256+(A>>>7)],k(u,x,w),F=Ya[x],0!==F&&(A-=mc[x],r(u,A,F)))}while(C<u.last_lit)}k(u,Vb,v)}function Uc(k,r){var u,v=r.dyn_tree;var w=r.stat_desc.static_tree;var y=r.stat_desc.has_stree,C=r.stat_desc.elems,F=-1;k.heap_len=0;k.heap_max=ub;for(u=0;u<C;u++)0!==v[2*u]?(k.heap[++k.heap_len]=F=u,k.depth[u]=0):v[2*u+1]=0;for(;2>k.heap_len;){var A=k.heap[++k.heap_len]=2>F?++F:0;v[2*A]=1;k.depth[A]=0;k.opt_len--;y&&(k.static_len-=w[2*A+1])}r.max_code=F;for(u=k.heap_len>>
1;1<=u;u--)I(k,v,u);A=C;do u=k.heap[1],k.heap[1]=k.heap[k.heap_len--],I(k,v,1),w=k.heap[1],k.heap[--k.heap_max]=u,k.heap[--k.heap_max]=w,v[2*A]=v[2*u]+v[2*w],k.depth[A]=(k.depth[u]>=k.depth[w]?k.depth[u]:k.depth[w])+1,v[2*u+1]=v[2*w+1]=A,k.heap[1]=A++,I(k,v,1);while(2<=k.heap_len);k.heap[--k.heap_max]=k.heap[1];var D,E;u=r.dyn_tree;A=r.max_code;C=r.stat_desc.static_tree;var N=r.stat_desc.has_stree,ka=r.stat_desc.extra_bits,P=r.stat_desc.extra_base,R=r.stat_desc.max_length,V=0;for(y=0;y<=qd;y++)k.bl_count[y]=
0;u[2*k.heap[k.heap_max]+1]=0;for(r=k.heap_max+1;r<ub;r++)w=k.heap[r],y=u[2*u[2*w+1]+1]+1,y>R&&(y=R,V++),u[2*w+1]=y,w>A||(k.bl_count[y]++,D=0,w>=P&&(D=ka[w-P]),E=u[2*w],k.opt_len+=E*(y+D),N&&(k.static_len+=E*(C[2*w+1]+D)));if(0!==V){do{for(y=R-1;0===k.bl_count[y];)y--;k.bl_count[y]--;k.bl_count[y+1]+=2;k.bl_count[R]--;V-=2}while(0<V);for(y=R;0!==y;y--)for(w=k.bl_count[y];0!==w;)D=k.heap[--r],D>A||(u[2*D+1]!==y&&(k.opt_len+=(y-u[2*D+1])*u[2*D],u[2*D+1]=y),w--)}x(v,F,k.bl_count)}function Je(k,r,u){var v,
w=-1,x=r[1],y=0,C=7,F=4;0===x&&(C=138,F=3);r[2*(u+1)+1]=65535;for(v=0;v<=u;v++){var A=x;x=r[2*(v+1)+1];++y<C&&A===x||(y<F?k.bl_tree[2*A]+=y:0!==A?(A!==w&&k.bl_tree[2*A]++,k.bl_tree[2*Dc]++):10>=y?k.bl_tree[2*ab]++:k.bl_tree[2*D]++,y=0,w=A,0===x?(C=138,F=3):A===x?(C=6,F=3):(C=7,F=4))}}function X(u,v,w){var x,y,C=-1,A=v[1],F=0,E=7,I=4;0===A&&(E=138,I=3);for(x=0;x<=w;x++)if(y=A,A=v[2*(x+1)+1],!(++F<E&&y===A)){if(F<I){do k(u,y,u.bl_tree);while(0!==--F)}else 0!==y?(y!==C&&(k(u,y,u.bl_tree),F--),k(u,Dc,
u.bl_tree),r(u,F-3,2)):10>=F?(k(u,ab,u.bl_tree),r(u,F-3,3)):(k(u,D,u.bl_tree),r(u,F-11,7));F=0;C=y;0===A?(E=138,I=3):y===A?(E=6,I=3):(E=7,I=4)}}function A(k){var r,u=4093624447;for(r=0;31>=r;r++,u>>>=1)if(1&u&&0!==k.dyn_ltree[2*r])return R;if(0!==k.dyn_ltree[18]||0!==k.dyn_ltree[20]||0!==k.dyn_ltree[26])return Ca;for(r=32;r<ua;r++)if(0!==k.dyn_ltree[2*r])return Ca;return R}function Sc(k,u,v,w){r(k,(Ia<<1)+(w?1:0),3);Ba(k);Fa(k,v);Fa(k,~v);Wa.arraySet(k.pending_buf,k.window,u,v,k.pending);k.pending+=
v}var Wa=w("../utils/common"),R=0,Ca=1,Ia=0,ua=256,lb=ua+1+29,za=30,ae=19,ub=2*lb+1,qd=15,Od=16,Vb=256,Dc=16,ab=17,D=18,jb=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ya=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],xa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ba=Array(2*(lb+2));V(ba);var Ha=Array(2*za);V(Ha);var y=Array(512);V(y);var ja=Array(256);V(ja);var lc=Array(29);V(lc);var mc=Array(za);V(mc);var Sa,nc,
P,Ue=!1;E._tr_init=function(k){if(!Ue){var r,w,A,D=Array(qd+1);for(A=w=0;28>A;A++)for(lc[A]=w,r=0;r<1<<jb[A];r++)ja[w++]=A;ja[w-1]=A;for(A=w=0;16>A;A++)for(mc[A]=w,r=0;r<1<<Ya[A];r++)y[w++]=A;for(w>>=7;A<za;A++)for(mc[A]=w<<7,r=0;r<1<<Ya[A]-7;r++)y[256+w++]=A;for(r=0;r<=qd;r++)D[r]=0;for(r=0;143>=r;)ba[2*r+1]=8,r++,D[8]++;for(;255>=r;)ba[2*r+1]=9,r++,D[9]++;for(;279>=r;)ba[2*r+1]=7,r++,D[7]++;for(;287>=r;)ba[2*r+1]=8,r++,D[8]++;x(ba,lb+1,D);for(r=0;r<za;r++)Ha[2*r+1]=5,Ha[2*r]=v(r,5);Sa=new ra(ba,
jb,ua+1,lb,qd);nc=new ra(Ha,Ya,0,za,qd);P=new ra([],xa,0,ae,7);Ue=!0}k.l_desc=new u(k.dyn_ltree,Sa);k.d_desc=new u(k.dyn_dtree,nc);k.bl_desc=new u(k.bl_tree,P);k.bi_buf=0;k.bi_valid=0;C(k)};E._tr_stored_block=Sc;E._tr_flush_block=function(k,u,v,w){var x=0;if(0<k.level){2===k.strm.data_type&&(k.strm.data_type=A(k));Uc(k,k.l_desc);Uc(k,k.d_desc);Je(k,k.dyn_ltree,k.l_desc.max_code);Je(k,k.dyn_dtree,k.d_desc.max_code);Uc(k,k.bl_desc);for(x=ae-1;3<=x&&0===k.bl_tree[2*Ga[x]+1];x--);x=(k.opt_len+=3*(x+1)+
14,x);var y=k.opt_len+3+7>>>3;var D=k.static_len+3+7>>>3;D<=y&&(y=D)}else y=D=v+5;if(v+4<=y&&-1!==u)Sc(k,u,v,w);else if(4===k.strategy||D===y)r(k,2+(w?1:0),3),Nd(k,ba,Ha);else{r(k,4+(w?1:0),3);u=k.l_desc.max_code+1;v=k.d_desc.max_code+1;x+=1;r(k,u-257,5);r(k,v-1,5);r(k,x-4,4);for(y=0;y<x;y++)r(k,k.bl_tree[2*Ga[y]+1],3);X(k,k.dyn_ltree,u-1);X(k,k.dyn_dtree,v-1);Nd(k,k.dyn_ltree,k.dyn_dtree)}C(k);w&&Ba(k)};E._tr_tally=function(k,r,u){return k.pending_buf[k.d_buf+2*k.last_lit]=r>>>8&255,k.pending_buf[k.d_buf+
2*k.last_lit+1]=255&r,k.pending_buf[k.l_buf+k.last_lit]=255&u,k.last_lit++,0===r?k.dyn_ltree[2*u]++:(k.matches++,r--,k.dyn_ltree[2*(ja[u]+ua+1)]++,k.dyn_dtree[2*(256>r?y[r]:y[256+(r>>>7)])]++),k.last_lit===k.lit_bufsize-1};E._tr_align=function(u){r(u,2,3);k(u,Vb,ba);16===u.bi_valid?(Fa(u,u.bi_buf),u.bi_buf=0,u.bi_valid=0):8<=u.bi_valid&&(u.pending_buf[u.pending++]=255&u.bi_buf,u.bi_buf>>=8,u.bi_valid-=8)}},{"../utils/common":3}],15:[function(w,N,E){N.exports=function(){this.input=null;this.total_in=
this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(w,N,E){E=w("./lib/utils/common").assign;var V=w("./lib/deflate"),ra=w("./lib/inflate");w=w("./lib/zlib/constants");var u={};E(u,V,ra,w);N.exports=u},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var saveAs=saveAs||function(ma){if(!("undefined"===typeof ma||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var w=ma.document.createElementNS("http://www.w3.org/1999/xhtml","a"),N="download"in w,E=/constructor/i.test(ma.HTMLElement)||ma.safari,V=/CriOS\/[\d]+/.test(navigator.userAgent),ra=function(k){(ma.setImmediate||ma.setTimeout)(function(){throw k;},0)},u=function(k){setTimeout(function(){"string"===typeof k?(ma.URL||ma.webkitURL||ma).revokeObjectURL(k):k.remove()},
4E4)},Fa=function(k){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(k.type)?new Blob([String.fromCharCode(65279),k],{type:k.type}):k},r=function(k,r,C){C||(k=Fa(k));var v=this,x="application/octet-stream"===k.type,I=function(){var k=["writestart","progress","write","writeend"];k=[].concat(k);for(var r=k.length;r--;){var u=v["on"+k[r]];if("function"===typeof u)try{u.call(v,v)}catch(A){ra(A)}}};v.readyState=v.INIT;if(N){var Nd=(ma.URL||ma.webkitURL||ma).createObjectURL(k);
setTimeout(function(){w.href=Nd;w.download=r;var k=new MouseEvent("click");w.dispatchEvent(k);I();u(Nd);v.readyState=v.DONE})}else(function(){if((V||x&&E)&&ma.FileReader){var r=new FileReader;r.onloadend=function(){var k=V?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");ma.open(k,"_blank")||(ma.location.href=k);v.readyState=v.DONE;I()};r.readAsDataURL(k);v.readyState=v.INIT}else Nd||(Nd=(ma.URL||ma.webkitURL||ma).createObjectURL(k)),x?ma.location.href=Nd:ma.open(Nd,"_blank")||(ma.location.href=
Nd),v.readyState=v.DONE,I(),u(Nd)})()},k=r.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(k,r,u){r=r||k.name||"download";u||(k=Fa(k));return navigator.msSaveOrOpenBlob(k,r)};k.abort=function(){};k.readyState=k.INIT=0;k.WRITING=1;k.DONE=2;k.error=k.onwritestart=k.onprogress=k.onwrite=k.onabort=k.onerror=k.onwriteend=null;return function(k,u,w){return new r(k,u||k.name||"download",w)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
"undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return saveAs});"function"==typeof define&&define.__amd&&(define.amd=define.__amd,delete define.__amd);
