(function($hx_exports,$global){"use strict";var $hx_script=function(exports,global){(function($hx_exports,$global){"use strict";$hx_exports["lime"]=$hx_exports["lime"]||{};var $hxClasses={},$estr=function(){return js_Boot.__string_rec(this,"")};function $extend(e,t){function i(){}i.prototype=e;var s=new i;for(var a in t)s[a]=t[a];if(t.toString!==Object.prototype.toString)s.toString=t.toString;return s}var lime_app_IModule=function(){};$hxClasses["lime.app.IModule"]=lime_app_IModule;lime_app_IModule.__name__=["lime","app","IModule"];lime_app_IModule.prototype={__registerLimeModule:null,__class__:lime_app_IModule};var lime_app_Module=function(){this.onExit=new lime_app__$Event_$Int_$Void};$hxClasses["lime.app.Module"]=lime_app_Module;lime_app_Module.__name__=["lime","app","Module"];lime_app_Module.__interfaces__=[lime_app_IModule];lime_app_Module.prototype={onExit:null,__registerLimeModule:function(e){},__class__:lime_app_Module};var lime__$internal_backend_html5_HTML5Application=function(e){this.gameDeviceCache=new haxe_ds_IntMap;this.parent=e;this.currentUpdate=0;this.lastUpdate=0;this.nextUpdate=0;this.framePeriod=-1;lime_media_AudioManager.init();this.accelerometer=lime_system_Sensor.registerSensor(lime_system_SensorType.ACCELEROMETER,0)};$hxClasses["lime._internal.backend.html5.HTML5Application"]=lime__$internal_backend_html5_HTML5Application;lime__$internal_backend_html5_HTML5Application.__name__=["lime","_internal","backend","html5","HTML5Application"];lime__$internal_backend_html5_HTML5Application.prototype={gameDeviceCache:null,accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(e){if(e>=65&&e<=90){return e+32}switch(e){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 e},exec:function(){window.addEventListener("keydown",$bind(this,this.handleKeyEvent),false);window.addEventListener("keyup",$bind(this,this.handleKeyEvent),false);window.addEventListener("focus",$bind(this,this.handleWindowEvent),false);window.addEventListener("blur",$bind(this,this.handleWindowEvent),false);window.addEventListener("resize",$bind(this,this.handleWindowEvent),false);window.addEventListener("beforeunload",$bind(this,this.handleWindowEvent),false);window.addEventListener("devicemotion",$bind(this,this.handleSensorEvent),false);if(!CanvasRenderingContext2D.prototype.isPointInStroke){CanvasRenderingContext2D.prototype.isPointInStroke=function(e,t,i){return false}}if(!CanvasRenderingContext2D.prototype.isPointInPath){CanvasRenderingContext2D.prototype.isPointInPath=function(e,t,i){return false}}if("performance"in window==false){window.performance={}}if("now"in window.performance==false){var t=Date.now();if(performance.timing&&performance.timing.navigationStart){t=performance.timing.navigationStart}window.performance.now=function e(){return Date.now()-t}}var r=0;var e=["ms","moz","webkit","o"];for(var i=0;i=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;var a=0;var r=this.parent.__windows;while(a0){s.onButtonDown.dispatch(b)}else{s.onButtonUp.dispatch(b)}if(i!=null){switch(b){case 0:d=0;break;case 1:d=1;break;case 2:d=2;break;case 3:d=3;break;case 4:d=9;break;case 5:d=10;break;case 8:d=4;break;case 9:d=6;break;case 10:d=7;break;case 11:d=8;break;case 12:d=11;break;case 13:d=12;break;case 14:d=13;break;case 15:d=14;break;case 16:d=5;break;default:continue}if(g>0){i.onButtonDown.dispatch(d)}else{i.onButtonUp.dispatch(d)}}}r.buttons[b]=g}}var y=0;var x=a.axes.length;while(y0){var t=null;if(this.__inactiveObject0!=null){t=this.__inactiveObject0;this.__inactiveObject0=null}else if(this.__inactiveObject1!=null){t=this.__inactiveObject1;this.__inactiveObject1=null}else{t=this.__inactiveObjectList.pop();if(this.__inactiveObjectList.length>0){this.__inactiveObject0=this.__inactiveObjectList.pop()}if(this.__inactiveObjectList.length>0){this.__inactiveObject1=this.__inactiveObjectList.pop()}}this.inactiveObjects--;this.activeObjects++;e=t}else if(this.__size==null||this.activeObjectse){this.__removeInactive(t-e)}else if(e>t){var i;var s=0;var a=e-t;while(s=0){i=t[s];i.__update(true,false)}}return this.__worldTransform},__globalToLocal:function(e,t){this.__getRenderTransform();if(e==t){var i=this.__renderTransform;var s=i.a*i.d-i.b*i.c;if(s==0){e.x=-i.tx;e.y=-i.ty}else{var a=1/s*(i.c*(i.ty-e.y)+i.d*(e.x-i.tx));e.y=1/s*(i.a*(e.y-i.ty)+i.b*(i.tx-e.x));e.x=a}}else{var r=this.__renderTransform;var n=r.a*r.d-r.b*r.c;t.x=n==0?-r.tx:1/n*(r.c*(r.ty-e.y)+r.d*(e.x-r.tx));var _=this.__renderTransform;var o=_.a*_.d-_.b*_.c;t.y=o==0?-_.ty:1/o*(_.a*(e.y-_.ty)+_.b*(_.tx-e.x))}return t},__hitTest:function(e,t,i,s,a,r){if(this.__graphics!=null){if(!r.__visible||this.__isMask){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}if(this.__graphics.__hitTest(e,t,i,this.__getRenderTransform())){if(s!=null&&!a){s.push(r)}return true}}return false},__hitTestMask:function(e,t){if(this.__graphics!=null){if(this.__graphics.__hitTest(e,t,true,this.__getRenderTransform())){return true}}return false},__renderCanvas:function(e){if(this.get_mask()==null||this.get_mask().get_width()>0&&this.get_mask().get_height()>0){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!!this.__renderable){var r=e.__getAlpha(this.__worldAlpha);if(!(r<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var n=e.context;e.setTransform(this.__renderTransform,n);var _=this.opaqueBackground;n.fillStyle="rgb("+(_>>>16&255)+","+(_>>>8&255)+","+(_&255)+")";n.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var o=e.__getAlpha(this.__worldAlpha);if(!(o<=0)){var l=this.__graphics;if(l!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(l,e);var h=l.__width;var c=l.__height;var u=l.__canvas;if(u!=null&&l.__visible&&h>=1&&c>=1){var f=l.__worldTransform;var p=e.context;var d=this.__scrollRect;var g=this.__worldScale9Grid;if(d==null||d.width>0&&d.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);p.globalAlpha=o;if(g!=null&&f.b==0&&f.c==0){p.setTransform(1,0,0,1,f.tx,f.ty);var m=l.__bounds;var v=l.__renderTransform.a;var b=l.__renderTransform.d;var y=f.a;var x=f.d;var w=Math.round(g.x*v);var k=Math.round(g.y*b);var P=Math.round((m.get_right()-g.get_right())*v);var C=Math.round((m.get_bottom()-g.get_bottom())*b);var T=Math.round(g.width*v);var M=Math.round(g.height*b);var S=Math.round(g.x*y);var $=Math.round(g.y*x);var E=Math.round((m.get_right()-g.get_right())*y);var B=Math.round((m.get_bottom()-g.get_bottom())*x);var L=Math.round(h*y)-S-E;var R=Math.round(c*x)-$-B;e.applySmoothing(p,false);if(T!=0&&M!=0){p.drawImage(u,0,0,w,k,0,0,S,$);p.drawImage(u,w,0,T,k,S,0,L,$);p.drawImage(u,w+T,0,P,k,S+L,0,E,$);p.drawImage(u,0,k,w,M,0,$,S,R);p.drawImage(u,w,k,T,M,S,$,L,R);p.drawImage(u,w+T,k,P,M,S+L,$,E,R);p.drawImage(u,0,k+M,w,C,0,$+R,S,B);p.drawImage(u,w,k+M,T,C,S,$+R,L,B);p.drawImage(u,w+T,k+M,P,C,S+L,$+R,E,B)}else if(T==0&&M!=0){var A=S+L+E;p.drawImage(u,0,0,h,k,0,0,A,$);p.drawImage(u,0,k,h,M,0,$,A,R);p.drawImage(u,0,k+M,h,C,0,$+R,A,B)}else if(M==0&&T!=0){var I=$+R+B;p.drawImage(u,0,0,w,c,0,0,S,I);p.drawImage(u,w,0,T,c,S,0,L,I);p.drawImage(u,w+T,0,P,c,S+L,0,E,I)}}else{e.setTransform(f,p);if(e.__isDOM){var D=1/e.pixelRatio;p.scale(D,D)}p.drawImage(u,0,0,h,c)}e.__popMaskObject(this)}}}}}}}}}}this.__renderEvent(e)},__renderCanvasMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,e)}},__renderDOM:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{var i=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var s=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&s!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(s,e.__canvasRenderer);if(s.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=s.__canvas){if(s.__canvas!=null){if(this.__canvas!=s.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=s.__canvas;this.__context=s.__context;e.__initializeElement(this,this.__canvas)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}if(this.__canvas!=null){e.__pushMaskObject(this);var a=this.__renderTransform;this.__renderTransform=s.__worldTransform;if(s.__transformDirty){s.__transformDirty=false;this.__renderTransformChanged=true}e.__updateClip(this);e.__applyStyle(this,true,true,true);this.__renderTransform=a;e.__popMaskObject(this)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMDisplayObject.clear(this,e)},__renderEvent:function(e){if(this.__customRenderEvent!=null&&this.__renderable){this.__customRenderEvent.allowSmoothing=e.__allowSmoothing;this.__customRenderEvent.objectMatrix.copyFrom(this.__renderTransform);this.__customRenderEvent.objectColorTransform.__copyFrom(this.__worldColorTransform);this.__customRenderEvent.renderer=e;var t=e.__type;switch(t){case"cairo":this.__customRenderEvent.type="renderCairo";break;case"canvas":this.__customRenderEvent.type="renderCanvas";break;case"dom":if(this.stage!=null&&this.__worldVisible){this.__customRenderEvent.type="renderDOM"}else{this.__customRenderEvent.type="clearDOM"}break;case"opengl":if(!e.__cleared){e.__clear()}var i=e;i.setShader(this.__worldShader);i.__context3D.__flushGL();this.__customRenderEvent.type="renderOpenGL";break;default:return}e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);this.dispatchEvent(this.__customRenderEvent);e.__popMaskObject(this);if(e.__type=="opengl"){var s=e;s.setViewport()}}},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!(!this.__renderable||this.__worldAlpha<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var t=e.__context3D;var i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}this.__renderEvent(e)},__renderGLMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.renderMask(this,e)}},__setParentRenderDirty:function(){var e=this.__renderParent!=null?this.__renderParent:this.parent;if(e!=null&&!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}},__setStageReference:function(e){this.stage=e},__setTransformDirty:function(){if(!this.__transformDirty){this.__transformDirty=true;this.__setWorldTransformInvalid();this.__setParentRenderDirty()}},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=true},__shouldCacheHardware:function(e){if(e==true||this.__filters!=null){return true}if(e==false||this.__graphics!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible(this.__graphics)){return false}return null},__update:function(e,t){var i=this.__renderParent!=null?this.__renderParent:this.parent;if(this.__isMask&&i==null){i=this.__maskTarget}this.__renderable=this.__visible&&this.__scaleX!=0&&this.__scaleY!=0&&!this.__isMask&&(i==null||!i.__isMask);this.__updateTransforms();this.__transformDirty=false;this.__worldTransformInvalid=false;if(!e){if(openfl_display_DisplayObject.__supportDOM){this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache);if(this.__renderTransformCache==null){this.__renderTransformCache=this.__renderTransform.clone()}else{this.__renderTransformCache.copyFrom(this.__renderTransform)}}if(i!=null){if(openfl_display_DisplayObject.__supportDOM){var s=i.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=s;this.__worldVisible=s;var a=this.get_alpha()*i.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=a;this.__worldAlpha=a}else{this.__worldAlpha=this.get_alpha()*i.__worldAlpha}if(this.__objectTransform!=null){this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform());this.__worldColorTransform.__combine(i.__worldColorTransform)}else{this.__worldColorTransform.__copyFrom(i.__worldColorTransform)}if(this.__blendMode==null||this.__blendMode==10){this.__worldBlendMode=i.__worldBlendMode}else{this.__worldBlendMode=this.__blendMode}if(this.__shader==null){this.__worldShader=i.__shader}else{this.__worldShader=this.__shader}if(this.__scale9Grid==null){this.__worldScale9Grid=i.__scale9Grid}else{this.__worldScale9Grid=this.__scale9Grid}}else{this.__worldAlpha=this.get_alpha();if(openfl_display_DisplayObject.__supportDOM){this.__worldVisibleChanged=this.__worldVisible!=this.__visible;this.__worldVisible=this.__visible;this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha()}if(this.__objectTransform!=null){this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform())}else{this.__worldColorTransform.__identity()}this.__worldBlendMode=this.__blendMode;this.__worldShader=this.__shader;this.__worldScale9Grid=this.__scale9Grid}}if(t&&this.get_mask()!=null){this.get_mask().__update(e,true)}},__updateCacheBitmap:function(e,t){if(this.__isCacheBitmapRender){return false}var i=openfl_geom_ColorTransform.__pool.get();i.__copyFrom(this.__worldColorTransform);if(e.__worldColorTransform!=null){i.__combine(e.__worldColorTransform)}var s=false;if(this.get_cacheAsBitmap()||e.__type!="opengl"&&!i.__isDefault(true)){var a=null;var r=this.__cacheBitmap==null||this.__renderDirty&&(t||this.__children!=null&&this.__children.length>0)||this.opaqueBackground!=this.__cacheBitmapBackground;var n=r||this.__graphics!=null&&this.__graphics.__softwareDirty||!this.__cacheBitmapColorTransform.__equals(i,true);var _=r||this.__graphics!=null&&this.__graphics.__hardwareDirty;var o=e.__type;if(n||_){if(o=="opengl"){if(this.__shouldCacheHardware(null)==false){o="canvas"}}if(n&&(o=="canvas"||o=="cairo")){r=true}if(_&&o=="opengl"){r=true}}var l=r||!this.__cacheBitmap.__worldTransform.equals(this.__worldTransform);var h=this.__filters!=null;if(h&&!r){var c=0;var u=this.__filters;while(c0){b=Math.ceil(a.x)}else{b=Math.floor(a.x)}if(a.y>0){y=Math.ceil(a.y)}else{y=Math.floor(a.y)}if(this.__cacheBitmapData!=null){if(m>this.__cacheBitmapData.width||v>this.__cacheBitmapData.height){d=Math.ceil(Math.max(m*1.25,this.__cacheBitmapData.width));g=Math.ceil(Math.max(v*1.25,this.__cacheBitmapData.height));r=true}else{d=this.__cacheBitmapData.width;g=this.__cacheBitmapData.height}}else{d=m;g=v}}if(r){l=true;this.__cacheBitmapBackground=this.opaqueBackground;if(m>=.5&&v>=.5){var x=this.opaqueBackground!=null&&(d!=m||g!=v);var w=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;var k=x?0:w;var P=e.__type=="opengl";if(this.__cacheBitmapData==null||d>this.__cacheBitmapData.width||g>this.__cacheBitmapData.height){this.__cacheBitmapData=new openfl_display_BitmapData(d,g,true,k);if(this.__cacheBitmap==null){this.__cacheBitmap=new openfl_display_Bitmap}this.__cacheBitmap.__bitmapData=this.__cacheBitmapData;this.__cacheBitmapRenderer=null}else{this.__cacheBitmapData.__fillRect(this.__cacheBitmapData.rect,k,P)}if(x){a.setTo(0,0,m,v);this.__cacheBitmapData.__fillRect(a,w,P)}}else{openfl_geom_ColorTransform.__pool.release(i);this.__cacheBitmap=null;this.__cacheBitmapData=null;this.__cacheBitmapData2=null;this.__cacheBitmapData3=null;this.__cacheBitmapRenderer=null;return true}}else{this.__cacheBitmapData=this.__cacheBitmap.get_bitmapData();this.__cacheBitmapData2=null;this.__cacheBitmapData3=null}if(l||r){this.__cacheBitmap.__worldTransform.copyFrom(this.__worldTransform);if(p==this.__renderTransform){this.__cacheBitmap.__renderTransform.identity();this.__cacheBitmap.__renderTransform.tx=this.__renderTransform.tx+b;this.__cacheBitmap.__renderTransform.ty=this.__renderTransform.ty+y}else{this.__cacheBitmap.__renderTransform.copyFrom(this.__cacheBitmapMatrix);this.__cacheBitmap.__renderTransform.invert();this.__cacheBitmap.__renderTransform.concat(this.__renderTransform);this.__cacheBitmap.__renderTransform.tx+=b;this.__cacheBitmap.__renderTransform.ty+=y}}this.__cacheBitmap.smoothing=e.__allowSmoothing;this.__cacheBitmap.__renderable=this.__renderable;this.__cacheBitmap.__worldAlpha=this.__worldAlpha;this.__cacheBitmap.__worldBlendMode=this.__worldBlendMode;this.__cacheBitmap.__worldShader=this.__worldShader;this.__cacheBitmap.set_mask(this.__mask);if(r){if(this.__cacheBitmapRenderer==null||o!=this.__cacheBitmapRenderer.__type){if(o=="opengl"){this.__cacheBitmapRenderer=new openfl_display_OpenGLRenderer(js_Boot.__cast(e,openfl_display_OpenGLRenderer).__context3D,this.__cacheBitmapData)}else{if(this.__cacheBitmapData.image==null){var C=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;this.__cacheBitmapData=new openfl_display_BitmapData(d,g,true,C);this.__cacheBitmap.__bitmapData=this.__cacheBitmapData}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.__cacheBitmapData.image);this.__cacheBitmapRenderer=new openfl_display_CanvasRenderer(this.__cacheBitmapData.image.buffer.__srcContext)}this.__cacheBitmapRenderer.__worldTransform=new openfl_geom_Matrix;this.__cacheBitmapRenderer.__worldColorTransform=new openfl_geom_ColorTransform}if(this.__cacheBitmapColorTransform==null){this.__cacheBitmapColorTransform=new openfl_geom_ColorTransform}this.__cacheBitmapRenderer.__stage=this.stage;this.__cacheBitmapRenderer.__allowSmoothing=e.__allowSmoothing;this.__cacheBitmapRenderer.__setBlendMode(10);this.__cacheBitmapRenderer.__worldAlpha=1/this.__worldAlpha;this.__cacheBitmapRenderer.__worldTransform.copyFrom(this.__renderTransform);this.__cacheBitmapRenderer.__worldTransform.invert();this.__cacheBitmapRenderer.__worldTransform.concat(this.__cacheBitmapMatrix);this.__cacheBitmapRenderer.__worldTransform.tx-=b;this.__cacheBitmapRenderer.__worldTransform.ty-=y;this.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(i);this.__cacheBitmapRenderer.__worldColorTransform.__invert();this.__isCacheBitmapRender=true;if(this.__cacheBitmapRenderer.__type=="opengl"){var T=e;var M=this.__cacheBitmapRenderer;var S=M.__context3D;var $=S.__state.renderToTexture;var E=S.__state.renderToTextureDepthStencil;var B=S.__state.renderToTextureAntiAlias;var L=S.__state.renderToTextureSurfaceSelector;var R=T.__blendMode;T.__suspendClipAndMask();M.__copyShader(T);this.__cacheBitmapData.__setUVRect(S,0,0,m,v);M.__setRenderTarget(this.__cacheBitmapData);if(this.__cacheBitmapData.image!=null){this.__cacheBitmapData.__textureVersion=this.__cacheBitmapData.image.version+1}this.__cacheBitmapData.__drawGL(this,M);if(h){var A=true;var I=false;var D=0;var F=this.__filters;while(Dthis.__cacheBitmapData2.width||g>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0);if(this.__cacheBitmapData2.image!=null){this.__cacheBitmapData2.__textureVersion=this.__cacheBitmapData2.image.version+1}}this.__cacheBitmapData2.__setUVRect(S,0,0,m,v);j=this.__cacheBitmapData2;if(I){if(this.__cacheBitmapData3==null||d>this.__cacheBitmapData3.width||g>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData3.fillRect(this.__cacheBitmapData3.rect,0);if(this.__cacheBitmapData3.image!=null){this.__cacheBitmapData3.__textureVersion=this.__cacheBitmapData3.image.version+1}}this.__cacheBitmapData3.__setUVRect(S,0,0,m,v);H=this.__cacheBitmapData3}M.__setBlendMode(10);M.__worldAlpha=1;M.__worldTransform.identity();M.__worldColorTransform.__identity();var U;var N;var W=0;var V=this.__filters;while(Wthis.__cacheBitmapData2.width||g>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0)}ie=this.__cacheBitmapData2}else{ie=te}if(K){if(this.__cacheBitmapData3==null||this.__cacheBitmapData3.image==null||d>this.__cacheBitmapData3.width||g>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData3.fillRect(this.__cacheBitmapData3.rect,0)}se=this.__cacheBitmapData3}if(this.__tempPoint==null){this.__tempPoint=new openfl_geom_Point}var ae=this.__tempPoint;var re;var ne;var _e=0;var oe=this.__filters;while(_e1){e=1}if(e<0){e=0}if(e!=this.__alpha&&!this.get_cacheAsBitmap()){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__alpha=e},set_blendMode:function(e){if(e==null){e=10}if(e!=this.__blendMode){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__blendMode=e},get_cacheAsBitmap:function(){if(this.__filters==null){return this.__cacheAsBitmap}else{return true}},set_cacheAsBitmap:function(e){if(e!=this.__cacheAsBitmap){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__cacheAsBitmap=e},get_filters:function(){if(this.__filters==null){return[]}else{return this.__filters.slice()}},set_filters:function(e){if(e!=null&&e.length>0){this.__filters=e;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}else if(this.__filters!=null){this.__filters=null;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return e},get_height:function(){var e=openfl_geom_Rectangle.__pool.get();this.__getLocalBounds(e);var t=e.height;openfl_geom_Rectangle.__pool.release(e);return t},set_height:function(e){var t=openfl_geom_Rectangle.__pool.get();var i=openfl_geom_Matrix.__pool.get();i.identity();this.__getBounds(t,i);if(e!=t.height){this.set_scaleY(e/t.height)}else{this.set_scaleY(1)}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(i);return e},get_loaderInfo:function(){if(this.stage!=null){return openfl__$internal_Lib.current.__loaderInfo}return null},get_mask:function(){return this.__mask},set_mask:function(e){if(e==this.__mask){return e}if(e!=this.__mask){this.__setTransformDirty();if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}if(this.__mask!=null){this.__mask.__isMask=false;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var t=this.__mask;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}if(e!=null){e.__isMask=true;e.__maskTarget=this;e.__setWorldTransformInvalid()}if(this.__cacheBitmap!=null&&this.__cacheBitmap.get_mask()!=e){this.__cacheBitmap.set_mask(e)}return this.__mask=e},get_mouseX:function(){var e=this.stage!=null?this.stage.__mouseX:openfl__$internal_Lib.current.stage.__mouseX;var t=this.stage!=null?this.stage.__mouseY:openfl__$internal_Lib.current.stage.__mouseY;var i=this.__getRenderTransform();var s=i.a*i.d-i.b*i.c;if(s==0){return-i.tx}else{return 1/s*(i.c*(i.ty-t)+i.d*(e-i.tx))}},get_mouseY:function(){var e=this.stage!=null?this.stage.__mouseX:openfl__$internal_Lib.current.stage.__mouseX;var t=this.stage!=null?this.stage.__mouseY:openfl__$internal_Lib.current.stage.__mouseY;var i=this.__getRenderTransform();var s=i.a*i.d-i.b*i.c;if(s==0){return-i.ty}else{return 1/s*(i.a*(t-i.ty)+i.b*(i.tx-e))}},get_name:function(){return this.__name},set_name:function(e){return this.__name=e},get_rotation:function(){return this.__rotation},set_rotation:function(e){if(e!=this.__rotation){this.__rotation=e;var t=this.__rotation*(Math.PI/180);this.__rotationSine=Math.sin(t);this.__rotationCosine=Math.cos(t);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 e},set_scale9Grid:function(e){if(e==null&&this.__scale9Grid==null){return e}if(e!=null&&this.__scale9Grid!=null&&this.__scale9Grid.equals(e)){return e}if(e!=null){if(this.__scale9Grid==null){this.__scale9Grid=new openfl_geom_Rectangle}this.__scale9Grid.copyFrom(e)}else{this.__scale9Grid=null}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}return e},get_scaleX:function(){return this.__scaleX},set_scaleX:function(e){if(e!=this.__scaleX){this.__scaleX=e;if(this.__transform.b==0){if(e!=this.__transform.a){this.__setTransformDirty()}this.__transform.a=e}else{var t=this.__rotationCosine*e;var i=this.__rotationSine*e;if(this.__transform.a!=t||this.__transform.b!=i){this.__setTransformDirty()}this.__transform.a=t;this.__transform.b=i}}return e},get_scaleY:function(){return this.__scaleY},set_scaleY:function(e){if(e!=this.__scaleY){this.__scaleY=e;if(this.__transform.c==0){if(e!=this.__transform.d){this.__setTransformDirty()}this.__transform.d=e}else{var t=-this.__rotationSine*e;var i=this.__rotationCosine*e;if(this.__transform.d!=i||this.__transform.c!=t){this.__setTransformDirty()}this.__transform.c=t;this.__transform.d=i}}return e},get_transform:function(){if(this.__objectTransform==null){this.__objectTransform=new openfl_geom_Transform(this)}return this.__objectTransform},set_transform:function(e){if(e==null){throw new js__$Boot_HaxeError(new openfl_errors_TypeError("Parameter transform must be non-null."))}if(this.__objectTransform==null){this.__objectTransform=new openfl_geom_Transform(this)}this.__setTransformDirty();this.__objectTransform.set_matrix(e.get_matrix());if(!this.__objectTransform.get_colorTransform().__equals(e.get_colorTransform(),true)||!this.get_cacheAsBitmap()&&this.__objectTransform.get_colorTransform().alphaMultiplier!=e.get_colorTransform().alphaMultiplier){this.__objectTransform.get_colorTransform().__copyFrom(e.get_colorTransform());if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(e){if(e!=this.__visible){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__visible=e},get_width:function(){var e=openfl_geom_Rectangle.__pool.get();this.__getLocalBounds(e);var t=e.width;openfl_geom_Rectangle.__pool.release(e);return t},set_width:function(e){var t=openfl_geom_Rectangle.__pool.get();var i=openfl_geom_Matrix.__pool.get();i.identity();this.__getBounds(t,i);if(e!=t.width){this.set_scaleX(e/t.width)}else{this.set_scaleX(1)}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(i);return e},get_x:function(){return this.__transform.tx},set_x:function(e){if(e!=this.__transform.tx){this.__setTransformDirty()}return this.__transform.tx=e},get_y:function(){return this.__transform.ty},set_y:function(e){if(e!=this.__transform.ty){this.__setTransformDirty()}return this.__transform.ty=e},__class__:openfl_display_DisplayObject,__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_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_scale9Grid:"set_scale9Grid",set_rotation:"set_rotation",get_rotation:"get_rotation",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_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var openfl_display_InteractiveObject=function(){openfl_display_DisplayObject.call(this);this.doubleClickEnabled=false;this.mouseEnabled=true;this.needsSoftKeyboard=false;this.__tabEnabled=null;this.__tabIndex=-1};$hxClasses["openfl.display.InteractiveObject"]=openfl_display_InteractiveObject;openfl_display_InteractiveObject.__name__=["openfl","display","InteractiveObject"];openfl_display_InteractiveObject.__super__=openfl_display_DisplayObject;openfl_display_InteractiveObject.prototype=$extend(openfl_display_DisplayObject.prototype,{doubleClickEnabled:null,mouseEnabled:null,needsSoftKeyboard:null,__tabEnabled:null,__tabIndex:null,__allowMouseFocus:function(){return this.get_tabEnabled()},__getInteractive:function(e){if(e!=null){e.push(this);if(this.parent!=null){this.parent.__getInteractive(e)}}return true},__hitTest:function(e,t,i,s,a,r){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled){return false}return openfl_display_DisplayObject.prototype.__hitTest.call(this,e,t,i,s,a,r)},__tabTest:function(e){if(this.get_tabEnabled()){e.push(this)}},get_tabEnabled:function(){if(this.__tabEnabled==true){return true}else{return false}},set_tabEnabled:function(e){if(this.__tabEnabled!=e){this.__tabEnabled=e;this.dispatchEvent(new openfl_events_Event("tabEnabledChange",true,false))}return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},__class__:openfl_display_InteractiveObject,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var openfl_display_DisplayObjectContainer=function(){openfl_display_InteractiveObject.call(this);this.mouseChildren=true;this.__tabChildren=true;this.__children=[];this.__removedChildren=openfl__$Vector_Vector_$Impl_$.toObjectVector(null)};$hxClasses["openfl.display.DisplayObjectContainer"]=openfl_display_DisplayObjectContainer;openfl_display_DisplayObjectContainer.__name__=["openfl","display","DisplayObjectContainer"];openfl_display_DisplayObjectContainer.__super__=openfl_display_InteractiveObject;openfl_display_DisplayObjectContainer.prototype=$extend(openfl_display_InteractiveObject.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(e){return this.addChildAt(e,this.get_numChildren())},addChildAt:function(e,t){if(e==null){var i=new openfl_errors_TypeError("Error #2007: Parameter child must be non-null.");i.errorID=2007;throw new js__$Boot_HaxeError(i)}else if(e.stage==e){var s=new openfl_errors_ArgumentError("Error #3783: A Stage object cannot be added as the child of another object.");s.errorID=3783;throw new js__$Boot_HaxeError(s)}if(t>this.__children.length||t<0){throw new js__$Boot_HaxeError("Invalid index position "+t)}if(e.parent==this){if(this.__children[t]!=e){HxOverrides.remove(this.__children,e);this.__children.splice(t,0,e);if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}else{if(e.parent!=null){e.parent.removeChild(e)}this.__children.splice(t,0,e);e.parent=this;var a=this.stage!=null&&e.stage==null;if(a){this.__setStageReference(this.stage)}e.__setTransformDirty();if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}var r=null;r=new openfl_events_Event("added",true);r.target=e;e.__dispatchWithCapture(r);if(a){r=new openfl_events_Event("addedToStage",false,false);e.__dispatchWithCapture(r);e.__dispatchChildren(r)}}return e},getChildAt:function(e){if(e>=0&&e=0&&ethis.__children.length-1){return}else if(tthis.__children.length){throw new js__$Boot_HaxeError(new openfl_errors_RangeError("The supplied index is out of bounds."))}var i=t-e;while(i>=0){this.removeChildAt(e);--i}},setChildIndex:function(e,t){if(t>=0&&t<=this.__children.length&&e.parent==this){HxOverrides.remove(this.__children,e);this.__children.splice(t,0,e)}},__cleanup:function(){openfl_display_InteractiveObject.prototype.__cleanup.call(this);var e=0;var t=this.__children;while(e=0)if(this.__children[h].__hitTest(e,t,i,null,true,this.__children[h])){if(s!=null){s.push(r)}return true}}else if(s!=null){var c=s.length;var u=false;var f=false;while(--h>=0){u=this.__children[h].__getInteractive(null);if(u||this.mouseEnabled&&!f){if(this.__children[h].__hitTest(e,t,i,s,true,this.__children[h])){f=true;if(u&&s.length>c){break}}}}if(f){s.splice(c,0,r);return true}}}else{var p=false;while(--h>=0)if(this.__children[h].__hitTest(e,t,i,s,false,this.__children[h])){p=true;if(s==null){break}}return p}return false},__hitTestMask:function(e,t){var i=this.__children.length;while(--i>=0)if(this.__children[i].__hitTestMask(e,t)){return true}return false},__renderCanvas:function(e){var t=0;var i=this.__removedChildren;while(t0){e.__pushMaskObject(this);if(e.__stage!=null){var a=0;var r=this.__children;while(a0){e.__popMaskObject(this)}},__renderGLMask:function(e){var t=0;var i=this.__removedChildren;while(t=0&&et){return 1}else{return-1}};Reflect.compareMethods=function(e,t){if(e==t){return true}if(!Reflect.isFunction(e)||!Reflect.isFunction(t)){return false}if(e.scope==t.scope&&e.method==t.method){return e.method!=null}else{return false}};Reflect.isObject=function(e){if(e==null){return false}var t=typeof e;if(!(t=="string"||t=="object"&&e.__enum__==null)){if(t=="function"){return(e.__name__||e.__ename__)!=null}else{return false}}else{return true}};Reflect.deleteField=function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t)){return false}delete e[t];return true};Reflect.copy=function(e){var t={};var i=0;var s=Reflect.fields(e);while(i").join(">");if(t){return e.split('"').join(""").split("'").join("'")}else{return e}};StringTools.htmlUnescape=function(e){return e.split(">").join(">").split("<").join("<").split(""").join('"').split("'").join("'").split("&").join("&")};StringTools.startsWith=function(e,t){if(e.length>=t.length){return HxOverrides.substr(e,0,t.length)==t}else{return false}};StringTools.endsWith=function(e,t){var i=t.length;var s=e.length;if(s>=i){return HxOverrides.substr(e,s-i,i)==t}else{return false}};StringTools.isSpace=function(e,t){var i=HxOverrides.cca(e,t);if(!(i>8&&i<14)){return i==32}else{return true}};StringTools.ltrim=function(e){var t=e.length;var i=0;while(i0){return HxOverrides.substr(e,i,t-i)}else{return e}};StringTools.rtrim=function(e){var t=e.length;var i=0;while(i0){return HxOverrides.substr(e,0,t-i)}else{return e}};StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))};StringTools.replace=function(e,t,i){return e.split(t).join(i)};StringTools.hex=function(e,t){var i="";var s="0123456789ABCDEF";while(true){i=s.charAt(e&15)+i;e>>>=4;if(!(e>0)){break}}if(t!=null){while(i.lengtht}};_$UInt_UInt_$Impl_$.gte=function(e,t){var i=e<0;var s=t<0;if(i!=s){return i}else{return e>=t}};_$UInt_UInt_$Impl_$.toFloat=function(e){var t=e;if(t<0){return 4294967296+t}else{return t+0}};var Xml=function(e){this.nodeType=e;this.children=[];this.attributeMap=new haxe_ds_StringMap};$hxClasses["Xml"]=Xml;Xml.__name__=["Xml"];Xml.parse=function(e){return haxe_xml_Parser.parse(e)};Xml.createElement=function(e){var t=new Xml(Xml.Element);if(t.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+t.nodeType)}t.nodeName=e;return t};Xml.createPCData=function(e){var t=new Xml(Xml.PCData);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createCData=function(e){var t=new Xml(Xml.CData);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createComment=function(e){var t=new Xml(Xml.Comment);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createDocType=function(e){var t=new Xml(Xml.DocType);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createProcessingInstruction=function(e){var t=new Xml(Xml.ProcessingInstruction);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createDocument=function(){return new Xml(Xml.Document)};Xml.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(e){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var t=this.attributeMap;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},set:function(e,t){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var i=this.attributeMap;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}},exists:function(e){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var t=this.attributeMap;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},attributes:function(){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}return this.attributeMap.keys()},elements:function(){if(this.nodeType!=Xml.Document&&this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+this.nodeType)}var e=[];var t=0;var i=this.children;while(t0||a.indexOf(".png",0)>0){this.type="jpg|png";this.loader=new base_baseLoad_LoadImg(e,t,i,s);this.addChild(this.loader)}else if(a.indexOf(".gif",0)>0){this.type="gif";this.loader=new base_baseLoad_LoadGifImg(e,t,i,s);this.addChild(this.loader)}else if(a.indexOf(".swf",0)>0){this.type="swf";this.loader=new base_baseLoad_LoadFlash(e,t,i,s);this.addChild(this.loader)}else{this.type="data";this.loader=new base_baseLoad_LoadData(e,t,i,s)}a=null},__class__:base_baseLoad_LoadResource});var base_baseLoad_LoadVideo=function(e,t,i){var s=this;openfl_display_Sprite.call(this);this.videoURL=e;this.videoW=t;this.videoH=i;var a=HxOverrides.substr(e,0,e.length-4)+".png";this.back=new base_baseLoad_LoadImg(a,function(e){s.back.resize(s.videoW,s.videoH)});this.addChild(this.back);this.connection=new openfl_net_NetConnection;this.connection.addEventListener("netStatus",$bind(this,this.netStatusHandler));this.connection.addEventListener("ioError",$bind(this,this.ioErrorHandle));this.connection.addEventListener("securityError",$bind(this,this.securityErrorHandler));this.connection.connect(null);window.onclick=function(){s.play()}};$hxClasses["base.baseLoad.LoadVideo"]=base_baseLoad_LoadVideo;base_baseLoad_LoadVideo.__name__=["base","baseLoad","LoadVideo"];base_baseLoad_LoadVideo.__super__=openfl_display_Sprite;base_baseLoad_LoadVideo.prototype=$extend(openfl_display_Sprite.prototype,{videoURL:null,connection:null,stream:null,video:null,videoW:null,videoH:null,back:null,line:null,ioErrorHandle:function(e){},netStatusHandler:function(e){var t=e.info.code;switch(t){case"NetConnection.Connect.Success":this.connectStream();break;case"NetStream.Play.Stop":if(this.stream!=null){this.stream.togglePause()}break;case"NetStream.Play.StreamNotFound":break}},connectStream:function(){this.stream=new openfl_net_NetStream(this.connection);this.stream.addEventListener("netStatus",$bind(this,this.netStatusHandler));this.stream.addEventListener("asyncError",$bind(this,this.asyncErrorHandler));this.video=new openfl_media_Video(this.videoW|0,this.videoH|0);this.video.attachNetStream(this.stream);this.stream.play(this.videoURL);this.stream.resume();this.addChild(this.video);this.line=new openfl_display_Shape;this.line.get_graphics().lineStyle(2,0,1);this.line.get_graphics().moveTo(0,0);this.line.get_graphics().lineTo(0,this.videoH);this.line.get_graphics().endFill();this.addChild(this.line)},securityErrorHandler:function(e){},asyncErrorHandler:function(e){},play:function(){if(this.stream!=null){this.stream.resume()}},resize:function(e,t){this.videoW=e;this.videoH=t;if(this.video!=null){this.video.set_width(this.videoW);this.video.set_height(this.videoH)}if(this.back!=null){this.back.resize(this.videoW,this.videoH)}if(this.line!=null){this.line.set_height(this.videoH)}},__class__:base_baseLoad_LoadVideo});var base_baseSprite_PlayMusicJS=function(e){this.pausePosition=0;if(e!=null&&e.length>0){this.snd=window.document.createElement("audio");this.snd.src=new openfl_net_URLRequest(e).url;this.snd.onended=$bind(this,this.onCom);flipbookMM_global_GetDivJs.getInstance().music.appendChild(this.snd);this.snd.style.display="none"}};$hxClasses["base.baseSprite.PlayMusicJS"]=base_baseSprite_PlayMusicJS;base_baseSprite_PlayMusicJS.__name__=["base","baseSprite","PlayMusicJS"];base_baseSprite_PlayMusicJS.prototype={snd:null,pausePosition:null,loopCount:null,play:function(e){if(e==null){e=1}if(this.snd==null){return}this.loopCount=e;if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},changeStatus:function(e){if(this.snd==null){return}if(e){this.snd.play()}else{this.pausePosition=this.snd.currentTime;this.snd.pause()}},ContinuePlay:function(){this.changeStatus(true)},stop:function(){this.changeStatus(false)},onCom:function(e){if(this.loopCount>0){this.loopCount-=1}if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},__class__:base_baseSprite_PlayMusicJS};var base_baseSprite_TextSprite=function(e,t){if(t==null){t=true}if(e==null){e=""}openfl_display_Sprite.call(this);this.format=new openfl_text_TextFormat;this.format.font="Arial";this.format.color=0;this.format.size=15*(window.devicePixelRatio|0);this.format.align=3;this.textField=new openfl_text_TextField;this.textField.set_defaultTextFormat(this.format);if(t){this.textField.set_autoSize(1);this.textField.set_multiline(false);this.textField.set_selectable(false)}this.textField.set_text(e);this.addChild(this.textField)};$hxClasses["base.baseSprite.TextSprite"]=base_baseSprite_TextSprite;base_baseSprite_TextSprite.__name__=["base","baseSprite","TextSprite"];base_baseSprite_TextSprite.__super__=openfl_display_Sprite;base_baseSprite_TextSprite.prototype=$extend(openfl_display_Sprite.prototype,{format:null,textField:null,set_text:function(e){this.textField.set_text(e);return e},set_textColor:function(e){this.textField.set_textColor(e);return e},__class__:base_baseSprite_TextSprite,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{set_textColor:"set_textColor",set_text:"set_text"})});var base_baseSprite_TouchSprite=function(){openfl_display_Sprite.call(this);this.init()};$hxClasses["base.baseSprite.TouchSprite"]=base_baseSprite_TouchSprite;base_baseSprite_TouchSprite.__name__=["base","baseSprite","TouchSprite"];base_baseSprite_TouchSprite.__super__=openfl_display_Sprite;base_baseSprite_TouchSprite.prototype=$extend(openfl_display_Sprite.prototype,{dotMap:null,timer:null,timeCount:null,initialDistance:null,currentDistance:null,firstDotId:null,secondDotId:null,curScale:null,firstDotPoint:null,isSlowMove:null,isZoomMode:null,init:function(){this.curScale=1;this.timeCount=0;this.isSlowMove=false;this.isZoomMode=false;this.dotMap=new haxe_ds_IntMap;this.timer=new openfl_utils_Timer(100);this.timer.addEventListener("timer",$bind(this,this.onTime));this.addEventListener("touchBegin",$bind(this,this.begin));this.addEventListener("touchMove",$bind(this,this.move));this.addEventListener("touchEnd",$bind(this,this.end))},begin:function(e){this.addData(e)},move:function(e){this.updateData(e);this.sendDragMove();this.sendZoomMove()},end:function(e){this.remove(null)},remove:function(e){this.sendSlide();this.sendDragEnd();this.sendZoomEnd();this.resetData()},addData:function(e){var t=base_baseUtils_MapUtil.$length(this.dotMap);if(t==0){this.firstDotId=e.touchPointID;this.dotMap.h[this.firstDotId]=e;this.firstDotPoint=new openfl_geom_Point(e.stageX,e.stageY);this.timer.start()}else if(t==1){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[this.firstDotId]=e}else{this.secondDotId=e.touchPointID;this.dotMap.h[this.secondDotId]=e;var i=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var s=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.initialDistance=Math.sqrt(i*i+s*s)}}else if(t==2){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[e.touchPointID]=e}}},updateData:function(e){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[e.touchPointID]=e}},resetData:function(){var e=this.dotMap.keys();while(e.hasNext()){var t=e.next();this.dotMap.remove(t)}this.dotMap=null;this.dotMap=new haxe_ds_IntMap;this.firstDotPoint=null;if(this.timer.running){this.timer.stop()}this.timeCount=0;this.isSlowMove=false;this.isZoomMode=false;this.curScale=1},onTime:function(e){this.timeCount++},sendDragMove:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==1){var t=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var i=t.x-this.firstDotPoint.x;var s=t.y-this.firstDotPoint.y;var a=Math.sqrt(i*i+s*s);if(this.timeCount>1){this.isSlowMove=true}if(this.isSlowMove==true&&a!=0){var r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DRAG);r.set_touchScale(1);r.set_touchSlideSpeed(a);r.set_touchSlidePoint(new openfl_geom_Point(i,s));r.set_touchStartPoint(this.firstDotPoint);this.dispatchEvent(r);r=null}}},sendDragEnd:function(){if(this.isSlowMove){var e=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var t=e.x-this.firstDotPoint.x;var i=e.y-this.firstDotPoint.y;var s=Math.sqrt(t*t+i*i);var a=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END);a.set_touchScale(1);a.set_touchSlideSpeed(s);a.set_touchSlidePoint(new openfl_geom_Point(t,i));a.set_touchStartPoint(this.firstDotPoint);this.dispatchEvent(a);a=null;this.isSlowMove=false}},sendZoomMove:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==2){this.isZoomMode=true;var t=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var i=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.currentDistance=Math.sqrt(t*t+i*i);this.curScale=this.currentDistance/this.initialDistance;var s=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM);s.set_touchScale(this.curScale);s.set_touchSlideSpeed(0);s.set_touchSlidePoint(new openfl_geom_Point(0,0));s.set_touchStartPoint(new openfl_geom_Point((this.dotMap.h[this.firstDotId].stageX+this.dotMap.h[this.secondDotId].stageX)/2,(this.dotMap.h[this.firstDotId].stageY+this.dotMap.h[this.secondDotId].stageY)/2));this.dispatchEvent(s);s=null}},sendZoomEnd:function(){if(this.isZoomMode){var e=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var t=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.currentDistance=Math.sqrt(e*e+t*t);this.curScale=this.currentDistance/this.initialDistance;var i=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END);i.set_touchScale(this.curScale);i.set_touchSlideSpeed(0);i.set_touchSlidePoint(new openfl_geom_Point(0,0));i.set_touchStartPoint(new openfl_geom_Point((this.dotMap.h[this.firstDotId].stageX+this.dotMap.h[this.secondDotId].stageX)/2,(this.dotMap.h[this.firstDotId].stageY+this.dotMap.h[this.secondDotId].stageY)/2));this.dispatchEvent(i);i=null;this.isZoomMode=false}},sendSlide:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==1){var t=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var i=t.x-this.firstDotPoint.x;var s=t.y-this.firstDotPoint.y;var a=Math.sqrt(i*i+s*s);if(this.timeCount<=1&&a!=0){var r;if(Math.abs(i)>Math.abs(s)){if(i>0){r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE)}else{r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE)}}else if(s>0){r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE)}else{r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE)}if(i+s<0){a=-a}r.set_touchScale(1);r.set_touchSlideSpeed(a);r.set_touchSlidePoint(new openfl_geom_Point(i,s));this.dispatchEvent(r);r=null}}},__class__:base_baseSprite_TouchSprite});var base_baseUtils_GlobalFun=function(){};$hxClasses["base.baseUtils.GlobalFun"]=base_baseUtils_GlobalFun;base_baseUtils_GlobalFun.__name__=["base","baseUtils","GlobalFun"];base_baseUtils_GlobalFun.serach=function(e){var t=window.location.search.substring(1);if(t!=null&&t.length>0){var i=t.split("&");var s=0;var a=i.length;while(s0){return"?"+e+"="+t}else{return""}};var base_baseUtils_MapUtil=function(){};$hxClasses["base.baseUtils.MapUtil"]=base_baseUtils_MapUtil;base_baseUtils_MapUtil.__name__=["base","baseUtils","MapUtil"];base_baseUtils_MapUtil.$length=function(e){if(e==null){return 0}else{var t=0;var i=e.keys();while(i.hasNext()){var s=i.next();++t}return t}};base_baseUtils_MapUtil.strLength=function(e){var t=0;if(e!=null){var i=e.keys();while(i.hasNext()){var s=i.next();++t}}return t};var fabric_FabricBaseObject=function(e){this.refresh=false;openfl_display_Sprite.call(this);this.set_visible(false);this.json=e;this.objW=this.json.realWidth;this.objH=this.json.realHeight;this.objAngle=this.json.realAngle;this.objX=this.json.realLeft;this.objY=this.json.realTop;this.objectContainerId="id"+Std.string(this.json.id);this.set_x(this.objX);this.set_y(this.objY);this.lastPoint=new openfl_geom_Point(0,0);this.back=new openfl_display_Sprite;this.back.get_graphics().beginFill(0,0);this.back.get_graphics().drawRect(0,0,this.objW,this.objH);this.back.get_graphics().endFill();this.addChild(this.back);this.objectContainer=new base_baseSprite_SpriteJs(this.objectContainerId);this.objectContainer.set_visible(false);this.objectContainer.set_width(this.objW/window.devicePixelRatio);this.objectContainer.set_height(this.objH/window.devicePixelRatio);if(this.objAngle!=0){this.objectContainer.div.style.transform="rotate("+this.objAngle+"deg)";this.objectContainer.div.style.transformOrigin="top left"}var t=flipbookMM_global_GetDivJs.getInstance().fObject;t.appendChild(this.objectContainer.div);t=null;this.addEventListener("enterFrame",$bind(this,this.enterFrameHandle))};$hxClasses["fabric.FabricBaseObject"]=fabric_FabricBaseObject;fabric_FabricBaseObject.__name__=["fabric","FabricBaseObject"];fabric_FabricBaseObject.__super__=openfl_display_Sprite;fabric_FabricBaseObject.prototype=$extend(openfl_display_Sprite.prototype,{objW:null,objH:null,objX:null,objY:null,objAngle:null,objectContainer:null,objectContainerId:null,json:null,back:null,canvasF:null,fabricObject:null,objElement:null,lastPoint:null,refresh:null,enterFrameHandle:function(e){if(this.refresh&&this.get_visible()==true&&this.objectContainer!=null&&this.objElement!=null&&this.parent!=null){var t=this.parent.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));if(t.x!=this.lastPoint.x||t.y!=this.lastPoint.y){this.lastPoint.x=t.x;this.lastPoint.y=t.y;this.objectContainer.set_x(t.x/window.devicePixelRatio);this.objectContainer.set_y(t.y/window.devicePixelRatio);var i=this.getScaleX(this);var s=this.objW*i/window.devicePixelRatio;var a=this.objH*i/window.devicePixelRatio;var r=window.document.getElementById(this.objectContainerId).querySelectorAll(".canvas-container");if(r!=null&&r.length>0){js_Boot.__cast(r[0],HTMLDivElement).style.width=s+"px";js_Boot.__cast(r[0],HTMLDivElement).style.height=a+"px";var n=js_Boot.__cast(r[0],HTMLDivElement).getElementsByTagName("Canvas");var _=0;while(_50){this.objectJson=JSON.parse(e.target.data);var t=$iterator(openfl_utils__$Object_Object_$Impl_$)(this.objectJson);while(t.hasNext()){var i=t.next();var s=this.loadObject(Reflect.field(this.objectJson,i));var a=this.pageObjects;if(__map_reserved[i]!=null){a.setReserved(i,s)}else{a.h[i]=s}}this.onCom(e)}else{this.onErrorHandle(e)}},onErrorHandle:function(e){this.onErr(e)},loadObject:function(e){var t=Reflect.field(e,"backgroundImage").left;var i=Reflect.field(e,"backgroundImage").top;var s=2;var a=2;var r=$iterator(openfl_utils__$Object_Object_$Impl_$)(e);while(r.hasNext()){var n=r.next();if(n=="objects"){var _=Reflect.field(e,n);var o=$iterator(openfl_utils__$Object_Object_$Impl_$)(_);while(o.hasNext()){var l=o.next();var h=Reflect.field(_,l);if(h.master==null){var c=0;var u=0;if(h.shadow!=null){c=Reflect.field(h,"shadow").offsetX;u=Reflect.field(h,"shadow").offsetY}h.selectable=false;h.hoverCursor="auto";h.editable=false;h.realLeft=0+h.left-t;h.realTop=0+h.top-i;h.realAngle=h.angle;h.realWidth=(h.width+c*2+h.strokeWidth*2)*h.scaleX;h.realHeight=(h.height+u*2+h.strokeWidth*2)*h.scaleY;h.left=0;h.top=0;h.angle=0}else if(h.master==h.id){var f=[];var p=$iterator(openfl_utils__$Object_Object_$Impl_$)(h);while(p.hasNext()){var d=p.next();if(Reflect.field(h,d).master!=null&&Reflect.field(h,d).id!=null){f.push([Reflect.field(h,d).left,Reflect.field(h,d).top,Reflect.field(h,d).left+Reflect.field(h,d).width*Reflect.field(h,d).scaleX,Reflect.field(h,d).top+Reflect.field(h,d).height*Reflect.field(h,d).scaleY])}}var g=null;var m=null;var v=null;var b=null;var y=0;while(yx[0]){g=x[0]}if(m==null){m=x[1]}else if(m>x[1]){m=x[1]}if(v==null){v=x[2]}else if(v0){var e=0;var t=this.ffobjects;while(e0){var e=0;var t=this.ffobjects;while(ei.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var n=s.b;var _=i.b;var o=0;var l=r;while(o>>2&3;var T=v-1;while(T>=0){b=m[T>0?T-1:v-1];w=(b>>>5^y<<2)+(y>>>3^b<<4)^(C^y)+(l[T&3^k]^b);var M=m;var S=T;M[S]-=w;y=M[S];--T}C-=x}var $=[];var E=m.length;var B;var L;var R;var A;var I=0;var D=E;while(I>8;R=(m[F]&16711680)>>16;A=(m[F]&-16777216)>>24;if(A<0){A+=256}$[F*4]=B;$[F*4+1]=L;$[F*4+2]=R;$[F*4+3]=A}return $};var ffcrypt_samples_TSBaseLoader=function(e,t,i,s,a){this.isLoad=false;this.progress=0;this.loader=null;this.progress=0;this.loadType="";this.isLoad=false;this.onOpen=e;this.onProgress=i;this.onIoError=s;this.onHttpStatus=null;this.onSecurityError=a;this.onComplete=t;return};$hxClasses["ffcrypt.samples.TSBaseLoader"]=ffcrypt_samples_TSBaseLoader;ffcrypt_samples_TSBaseLoader.__name__=["ffcrypt","samples","TSBaseLoader"];ffcrypt_samples_TSBaseLoader.prototype={url:null,loader:null,loadType:null,progress:null,isLoad:null,onOpen:null,onComplete:null,onProgress:null,onHttpStatus:null,onSecurityError:null,onIoError:null,startLoad:function(e){if(e==null){e=""}if(e==null||e.length<=0){return false}this.url=e;this.progress=0;this.isLoad=false;this.loader=new openfl_net_URLLoader;this.loader.dataFormat=0;this.loadType=0;this.loader.addEventListener("complete",$bind(this,this.completeHandler));this.loader.addEventListener("open",$bind(this,this.openHandler));this.loader.addEventListener("progress",$bind(this,this.progressHandler));this.loader.addEventListener("securityError",$bind(this,this.securityErrorHandler));this.loader.addEventListener("httpStatus",$bind(this,this.httpStatusHandler));this.loader.addEventListener("ioError",$bind(this,this.ioErrorHandler));try{this.loader.load(new openfl_net_URLRequest(e))}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){}else throw e}return true},openHandler:function(e){},ioErrorHandler:function(e){this.isLoad=false;if(this.onIoError!=null){this.onIoError(this)}},progressHandler:function(e){this.progress=e.bytesLoaded/e.bytesTotal;if(this.onProgress!=null){this.onProgress(this)}},httpStatusHandler:function(e){},securityErrorHandler:function(e){this.isLoad=false;if(this.onSecurityError!=null){this.onSecurityError(this)}},completeHandler:function(e){var t;try{t=js_Boot.__cast(e.target,openfl_net_URLLoader)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){t=null}else throw e}if(t==null){this.isLoad=false;if(this.onComplete!=null){this.onComplete(this)}}else{this.isLoad=true;this.loadType=t.dataFormat;if(this.onComplete!=null){this.onComplete(this)}}return},__class__:ffcrypt_samples_TSBaseLoader};var ffcrypt_samples_TSBookBinParse=function(e,t,i,s,a){this.xmlString=null;this.progress=0;this.isLoaded=false;this.isError=false;this.base=new ffcrypt_samples_TSBaseLoader($bind(this,this.openHandler),$bind(this,this.completeHandler),$bind(this,this.progressHandler),$bind(this,this.ioErrorHandler),$bind(this,this.securityErrorHandler));this.isError=false;this.isLoaded=false;this.onOpen=e;this.onProgress=i;this.onIoError=s;this.onHttpStatus=null;this.onSecurityError=a;this.onComplete=t;return};$hxClasses["ffcrypt.samples.TSBookBinParse"]=ffcrypt_samples_TSBookBinParse;ffcrypt_samples_TSBookBinParse.__name__=["ffcrypt","samples","TSBookBinParse"];ffcrypt_samples_TSBookBinParse.prototype={isError:null,isLoaded:null,base:null,progress:null,xmlString:null,onOpen:null,onComplete:null,onProgress:null,onHttpStatus:null,onSecurityError:null,onIoError:null,onParseComplete:null,onCompleteToParse:function(e){var t;try{t=js_Boot.__cast(e,openfl_net_URLLoader)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){t=null}else throw e}if(t==null){return}var i=t.data;var s=new ffcrypt_codes_FFBookBinParse(ffcrypt_samples_TSBookBinParse.BinTestKey);this.xmlString=s.parse(t.data);if(this.onParseComplete!=null){this.onParseComplete(this)}return},startLoad:function(e,t){if(e==null){e=""}this.progress=0;this.isError=false;this.isLoaded=false;this.onParseComplete=t;if(this.base!=null){return this.base.startLoad(e)}return false},openHandler:function(e){if(this.onOpen!=null){this.onOpen(this)}},ioErrorHandler:function(e){this.isError=true;if(this.onIoError!=null){this.onIoError(this)}},progressHandler:function(e){this.progress=e.progress;if(this.onProgress!=null){this.onProgress(this)}},securityErrorHandler:function(e){if(this.onSecurityError!=null){this.onSecurityError(this)}},completeHandler:function(e){if(e!=null){this.onCompleteToParse(e.isLoad!=false?e.loader:null)}if(this.onComplete!=null){this.onComplete(this)}return},__class__:ffcrypt_samples_TSBookBinParse};var flipbookMM_AppMain=function(e,t){this.isPdfjs=false;this.isPC=false;this.isConfigEncryption=true;openfl_display_Sprite.call(this);this.appWidth=e;this.appHeight=t;this.loadingGif=new base_baseLoad_LoadResource("./img/loading.gif");this.loadingGif.set_x(this.appWidth/2);this.loadingGif.set_y(this.appHeight/2);this.addChild(this.loadingGif);if(this.isPdfjs){var i=flipbookMM_global_GetDivJs.getInstance();i.loadPdfjs($bind(this,this.init))}else{this.init()}};$hxClasses["flipbookMM.AppMain"]=flipbookMM_AppMain;flipbookMM_AppMain.__name__=["flipbookMM","AppMain"];flipbookMM_AppMain.getInstance=function(e,t){if(t==null){t=0}if(e==null){e=0}if(flipbookMM_AppMain.instance==null){flipbookMM_AppMain.instance=new flipbookMM_AppMain(e,t)}return flipbookMM_AppMain.instance};flipbookMM_AppMain.__super__=openfl_display_Sprite;flipbookMM_AppMain.prototype=$extend(openfl_display_Sprite.prototype,{appWidth:null,appHeight:null,appLoader:null,ffcrptMain:null,ffcrptMainJs:null,book:null,styleType:null,background:null,toolBar:null,isConfigEncryption:null,isPC:null,isPdfjs:null,loadingGif:null,register:null,encrypt:null,pdfHandle:function(e){var t=flipbookMM_bookBox_Pdfjs.getInstance();if(t.getPageNum()>0){this.removeEventListener("enterFrame",$bind(this,this.pdfHandle));this.loadBook()}},init:function(){this.initConfig()},initConfig:function(){var t=this;var e=base_baseUtils_GlobalFun.serachToStr("latest");if(this.isConfigEncryption){if(this.isPC){this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH_BIN+e,$bind(this,this.loadConfig))}else{this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN+e,$bind(this,this.loadConfig))}this.addChild(this.ffcrptMain)}else{var i=function(e){t.loadConfig(e.target.data);t.appLoader.destroyMe();t.appLoader=null};if(this.isPC){this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH+e,i)}else{this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PATH+e,i)}}},loadConfig:function(e){this.ffcrptMainJs=null;var t=new flipbookMM_config_ConfigInit(Xml.parse(e));this.isMobileDevice();this.initOtherParameter();this.pdfjsInit()},pdfjsInit:function(){if(this.isPdfjs){var e=flipbookMM_bookBox_Pdfjs.getInstance();var t=flipbookMM_config_ConfigSetting.getInstance();e.loadPdf(t.get(flipbookMM_config_ConfigKey.DownloadFileUrl));t=null;this.addEventListener("enterFrame",$bind(this,this.pdfHandle))}else{this.loadBook()}},loadBackground:function(){this.background=new flipbookMM_background_Background(this.appWidth,this.appHeight);this.addChild(this.background)},loadRegisterInfo:function(){this.register=new flipbookMM_market_RegisterJs;this.register.set_x(this.appWidth/2/window.devicePixelRatio);this.register.set_y(this.appHeight/2/window.devicePixelRatio)},loadEncryptInfo:function(){this.encrypt=new flipbookMM_market_EncryptJs;this.encrypt.set_x((this.appWidth-this.encrypt.get_width())/2/window.devicePixelRatio);this.encrypt.set_y((this.appHeight-this.encrypt.get_height())/2/window.devicePixelRatio)},loadBook:function(){var e=flipbookMM_config_ConfigSetting.getInstance();this.styleType=e.getBookStyleType();e=null;if(this.styleType==3){var t=flipbookMM_global_GetDivJs.getInstance();t.loadThreejs($bind(this,this.loadFarbric));t=null}else{this.loadFarbric()}},loadFarbric:function(){var t=this;var e=flipbookMM_config_ConfigSetting.getInstance();var i=e.get(flipbookMM_config_ConfigKey.PageObjectEnable);var s=e.get(flipbookMM_config_ConfigKey.PageObjectConfigJson);var a=e.get(flipbookMM_config_ConfigKey.PageObjectConfigJs);if(i=="Enable"){var r=base_baseUtils_GlobalFun.serachToStr("latest");var n=fabric_PageObjectGet.getInstance();n.initConfig(a+r,s+r,function(e){t.loadBookHandle()},function(e){t.loadBookHandle()})}else{this.loadBookHandle()}},loadBookHandle:function(){this.loadBackground();this.loadRegisterInfo();this.loadEncryptInfo();this.initBookContent(this.styleType);this.loadToolBar()},initBookContent:function(e){var t=flipbookMM_config_ConfigSetting.getInstance();window.console.log(Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageBackgroundColor)));this.book=new flipbookMM_bookBox_BookBox(this.appWidth,this.appHeight,Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageWidth)),Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageHeight)),Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageCount)),e,Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageBackgroundColor)),this.getFisrtPageIndex(Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageCount))));this.addChild(this.book);t=null},loadToolBar:function(){var e=flipbookMM_config_ConfigSetting.getInstance();this.toolBar=new flipbookMM_toolbar_ToolBarJs(this.appWidth,this.appHeight,this.getFisrtPageIndex(Std.parseInt(e.get(flipbookMM_config_ConfigKey.PageCount))));this.addChild(this.toolBar);e=null},isMobileDevice:function(){var e=flipbookMM_config_ConfigSetting.getInstance();var t=flipbookMM_global_GetDivJs.getInstance();if(t.isMobileDevice()){e.set(flipbookMM_config_ConfigKey.JS_mobile,"true");e.set(flipbookMM_config_ConfigKey.ZoomButtonEnable,"Hide")}else{e.set(flipbookMM_config_ConfigKey.JS_mobile,"false")}e=null;t=null},initOtherParameter:function(){var e=flipbookMM_config_ConfigSetting.getInstance();e.set(flipbookMM_config_ConfigKey.TopToolBarHeight,"50");e.set(flipbookMM_config_ConfigKey.BottomToolbarHeight,"50");e.set(flipbookMM_config_ConfigKey.ContentDisplayMarginTop,"20");e.set(flipbookMM_config_ConfigKey.ContentDisplayMarginBot,"20");if(this.isPdfjs){e.set(flipbookMM_config_ConfigKey.PdfjsRenderEnable,"yes");if(e.get(flipbookMM_config_ConfigKey.JS_mobile)=="true"){e.set(flipbookMM_config_ConfigKey.TxtViewButtionEnable,"hide")}}else{e.set(flipbookMM_config_ConfigKey.PdfjsRenderEnable,"no");e.set(flipbookMM_config_ConfigKey.TxtViewButtionEnable,"hide")}e=null},getFisrtPageIndex:function(e){var t=1;var i=this.getUrlParam("pageIndex");if(i.length>0){t=Std.parseInt(i);if(t<=0||t>e){t=1}}return t},getUrlParam:function(e){var t=window.location.search;var i=t.split("?");if(i.length>1){var s=i[1].split("&");var a;var r=0;var n=s.length;while(r4){this.bgResUrl=a}}if(s.hasKey(flipbookMM_config_ConfigKey.StageBackgroundScene)){var r=s.get(flipbookMM_config_ConfigKey.StageBackgroundScene);if(r.length>4){this.bgResUrl=r}}if(s.yesOrNo(s.get(flipbookMM_config_ConfigKey.StageBackgroundMusicEnable))){var n=s.get(flipbookMM_config_ConfigKey.StageBackgroundMusicUrl);if(n!=null&&n.length>4){this.bgMusic=new base_baseSprite_PlayMusicJS(n);this.bgMusic.play(Std.parseInt(s.get(flipbookMM_config_ConfigKey.MusicLoopCount)));if(!s.yesOrNo(s.get(flipbookMM_config_ConfigKey.MusicAutoStart))){this.bgMusic.stop()}}}s=null;this.bgType=this.detectType(this.bgResUrl);this.resize(e,t);var _=flipbookMM_events_EventCenter.getInstance();_.addEventListener(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t!=null&&t.length>0){if(t=="on"){if(i.bgMusic!=null){i.bgMusic.ContinuePlay()}}else if(t=="off"){if(i.bgMusic!=null){i.bgMusic.stop()}}}});_=null};$hxClasses["flipbookMM.background.Background"]=flipbookMM_background_Background;flipbookMM_background_Background.__name__=["flipbookMM","background","Background"];flipbookMM_background_Background.__super__=openfl_display_Sprite;flipbookMM_background_Background.prototype=$extend(openfl_display_Sprite.prototype,{bgWidth:null,bgHeight:null,bgAlpha:null,bgColor:null,bgResUrl:null,bgResLoader:null,bgMusic:null,bgType:null,resize:function(e,t){var i=this;this.bgWidth=e;this.bgHeight=t;var s=this.bgType;if(s==null){this.get_graphics().clear();this.get_graphics().beginFill(this.bgColor);this.get_graphics().drawRect(0,0,this.bgWidth,this.bgHeight);this.get_graphics().endFill();this.set_alpha(this.bgAlpha)}else{switch(s){case"gif":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadGifJs(this.bgResUrl,this.bgWidth/window.devicePixelRatio|0,this.bgHeight/window.devicePixelRatio|0);var a=window.document.getElementsByTagName("canvas")[0];flipbookMM_global_GetDivJs.getInstance().openfl.insertBefore(this.bgResLoader.div,a)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadGifJs).resize(this.bgWidth/window.devicePixelRatio|0,this.bgHeight/window.devicePixelRatio|0)}break;case"img":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadImg(this.bgResUrl,function(e){js_Boot.__cast(i.bgResLoader,base_baseLoad_LoadImg).resize(i.bgWidth,i.bgHeight)});this.addChild(this.bgResLoader)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadImg).resize(this.bgWidth,this.bgHeight)}break;case"mp4":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadVideo(this.bgResUrl,this.bgWidth,this.bgHeight);this.addChild(this.bgResLoader)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadVideo).resize(this.bgWidth,this.bgHeight)}break}}},detectType:function(e){var t=null;if(e==null||StringTools.trim(e).length==0){return t}var i=e.toLowerCase();if(i.indexOf(".jpg",0)>0||i.indexOf(".jpeg",0)>0||i.indexOf(".png",0)>0){t="img"}else if(i.indexOf(".gif",0)>0){t="gif"}else if(i.indexOf(".swf",0)>0){t="swf"}else if(i.indexOf(".mp4",0)>0){t="mp4"}else{t="data"}i=null;return t},__class__:flipbookMM_background_Background});var flipbookMM_bookBox_BookBox=function(e,t,i,s,a,r,n,_){if(_==null){_=1}if(r==null){r=0}this.doubleStatus=0;this.pageDefScale=1;openfl_display_Sprite.call(this);this.pageWidth=i;this.pageHeight=s;this.maxPageIndex=a;this.bookStyle=r;this.isZooming=false;this.isSlide=false;this.isDrag=false;this.doubleStatus=0;this.curPageIndex=0;this.tarPageIndex=0;var o=flipbookMM_config_ConfigSetting.getInstance();this.isMobile=o.yesOrNo(o.get(flipbookMM_config_ConfigKey.JS_mobile));this.topbarHeight=Std.parseInt(o.get(flipbookMM_config_ConfigKey.TopToolBarHeight));this.bottomBarHeight=Std.parseInt(o.get(flipbookMM_config_ConfigKey.BottomToolbarHeight));this.contentMarginTop=Std.parseInt(o.get(flipbookMM_config_ConfigKey.ContentDisplayMarginTop));this.contentMarginBot=Std.parseInt(o.get(flipbookMM_config_ConfigKey.ContentDisplayMarginBot));o=null;if(this.isMobile){this.pageDefPosiX=0;this.pageDefPosiY=0;this.doubleDefScale=2;this.maxZoomScale=2;this.pageStyleW=e;this.pageStyleH=t}else{this.pageDefPosiX=0;this.pageDefPosiY=this.topbarHeight+this.contentMarginTop;this.doubleDefScale=2;this.maxZoomScale=4;this.pageStyleW=e;this.pageStyleH=t-this.topbarHeight-this.bottomBarHeight-this.contentMarginTop-this.contentMarginBot}this.back=new openfl_display_Sprite;this.addChild(this.back);if(this.bookStyle==0){this.pageStyle=new flipbookMM_bookBox_style_SlideStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_)}else if(this.bookStyle==1){this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_)}else if(this.bookStyle==2){this.pageStyle=new flipbookMM_bookBox_style_SlideDoubleStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_)}else if(this.bookStyle==3){this.pageStyle=new flipbookMM_bookBox_style_ThreeStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_)}else{this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_)}this.addChild(this.pageStyle);this.pageStyle.set_x(this.pageDefPosiX);this.pageStyle.set_y(this.pageDefPosiY);this.pageStyle.set_scaleX(this.pageDefScale);this.pageStyle.set_scaleY(this.pageDefScale);this.currentPosition=new openfl_geom_Point;this.currentPosition.x=this.pageStyle.get_x();this.currentPosition.y=this.pageStyle.get_y();this.lastPosition=new openfl_geom_Point;this.lastPosition.x=this.currentPosition.x;this.lastPosition.y=this.currentPosition.y;this.currentScale=this.pageStyle.get_scaleY();this.lastScale=this.currentScale;this.resize(e,t);this.addListEvent()};$hxClasses["flipbookMM.bookBox.BookBox"]=flipbookMM_bookBox_BookBox;flipbookMM_bookBox_BookBox.__name__=["flipbookMM","bookBox","BookBox"];flipbookMM_bookBox_BookBox.__super__=openfl_display_Sprite;flipbookMM_bookBox_BookBox.prototype=$extend(openfl_display_Sprite.prototype,{bookBoxWidth:null,bookBoxHeight:null,pageStyleW:null,pageStyleH:null,LrNavigateWidth:null,bookStyle:null,isZooming:null,isSlide:null,isDrag:null,isMobile:null,curPageIndex:null,tarPageIndex:null,maxPageIndex:null,pageWidth:null,pageHeight:null,topbarHeight:null,bottomBarHeight:null,contentMarginTop:null,contentMarginBot:null,pageDefPosiX:null,pageDefPosiY:null,pageDefScale:null,back:null,pageStyle:null,doubleStatus:null,doubleDefScale:null,maxZoomScale:null,lastPosition:null,currentPosition:null,lastScale:null,currentScale:null,cofeX:null,cofeY:null,resize:function(e,t){this.bookBoxWidth=e;this.bookBoxHeight=t;if(this.isMobile){this.pageStyleW=this.bookBoxWidth;this.pageStyleH=this.bookBoxHeight}else{this.pageStyleW=this.bookBoxWidth;this.pageStyleH=this.bookBoxHeight-this.topbarHeight-this.bottomBarHeight-this.contentMarginTop-this.contentMarginBot}if(this.bookStyle==0){this.LrNavigateWidth=100}else if(this.bookStyle==1){this.LrNavigateWidth=100}else{this.LrNavigateWidth=100}this.back.get_graphics().clear();this.back.get_graphics().beginFill(0);this.back.get_graphics().drawRect(0,0,this.bookBoxWidth,this.bookBoxHeight);this.back.get_graphics().endFill();this.back.set_alpha(0);this.setPageDefault();if(this.pageStyle!=null){this.pageStyle.resize(this.pageStyleW,this.pageStyleH)}},addListEvent:function(){var l=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,this,function(e){var t=js_Boot.__cast(e._data._object,Int);l.setPageDefault();l.pageStyle.gotoPage(t)});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,this,function(e){l.setPageDefault();l.pageStyle.gotoNextPage()});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,this,function(e){l.setPageDefault();l.pageStyle.gotoPrePage()});e.addEventListener(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t!=null&&t.length>0){if(t=="on"){if(l.pageStyle!=null){l.pageStyle.setMuteMode(false)}}else if(t=="off"){if(l.pageStyle!=null){l.pageStyle.setMuteMode(true)}}}});e.addEventListener(flipbookMM_events_EventConst.SECURITY_PASS_OK,this,function(e){l.resize(l.bookBoxWidth+.001,l.bookBoxHeight+.001)});e=null;if(this.isMobile){this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE,function(e){l.isSlide=true;l.pageStyle.gotoNextPage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE,function(e){l.isSlide=true;l.pageStyle.gotoPrePage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.isDrag=true;var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastPosition.x+e.get_touchSlidePoint().x;if(t>=l.bookBoxWidth){if(s>0){s=0}else if(sl.bookBoxWidth-t){s=l.bookBoxWidth-t}var a=l.lastPosition.y+e.get_touchSlidePoint().y;if(i>=l.bookBoxHeight){if(a>0){a=0}else if(al.bookBoxHeight-i){a=l.bookBoxHeight-i}l.currentPosition.x=s;l.currentPosition.y=a;l.pageStyle.set_x(l.currentPosition.x);l.pageStyle.set_y(l.currentPosition.y)}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END,function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastPosition.x+e.get_touchSlidePoint().x;if(t>=l.bookBoxWidth){if(s>0){s=0}else if(sl.bookBoxWidth-t){s=l.bookBoxWidth-t}var a=l.lastPosition.y+e.get_touchSlidePoint().y;if(i>=l.bookBoxHeight){if(a>0){a=0}else if(al.bookBoxHeight-i){a=l.bookBoxHeight-i}l.currentPosition.x=s;l.currentPosition.y=a;l.pageStyle.set_x(l.currentPosition.x);l.pageStyle.set_y(l.currentPosition.y);l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.pageStyle.updatePdfTxtPosition()}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM,function(e){if(l.isZooming==false){l.cofeX=l.pageStyle.getZoomCenterCoefX();l.cofeY=l.pageStyle.getZoomCenterCoefY()}l.isZooming=true;l.pageStyle.updateStyleStatus(true);var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastScale;var a=e.get_touchScale();l.currentScale=s*a;if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleY()==l.currentScale){return}l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);var r=l.pageStyle.get_width();var n=l.pageStyle.get_height();var _=l.pageStyle.get_x()+(t-r)/l.pageStyle.getZoomCoefX(l.cofeX);if(r>=l.bookBoxWidth){if(_>0){_=0}else if(_l.bookBoxWidth-r){_=l.bookBoxWidth-r}var o=l.pageStyle.get_y()+(i-n)/l.pageStyle.getZoomCoefY(l.cofeY);if(n>=l.bookBoxHeight){if(o>0){o=0}else if(ol.bookBoxHeight-n){o=l.bookBoxHeight-n}l.pageStyle.set_x(_);l.pageStyle.set_y(o);l.lastPosition.x=l.pageStyle.get_x();l.lastPosition.y=l.pageStyle.get_y()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END,function(e){var t=l.lastScale;var i=e.get_touchScale();l.currentScale=t*i;if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleX()<1){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.5,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);l.isZooming=false})}else{l.pageStyle.updateContentSta(true);l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);l.lastScale=l.currentScale;l.pageStyle.updatePdfTxtPosition()}})}else{this.pageStyle.addEventListener("mouseDown",function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.isDrag=true;l.pageStyle.startDrag(false);l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y}});this.pageStyle.addEventListener("mouseUp",function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.pageStyle.stopDrag();l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.pageStyle.updatePdfTxtPosition()}});var t=flipbookMM_events_EventCenter.getInstance();t.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM,this,function(e){l.currentScale=js_Boot.__cast(e._data._object,Float);if(l.isZooming==false){l.cofeX=l.pageStyle.getZoomCenterCoefX();l.cofeY=l.pageStyle.getZoomCenterCoefY()}l.isZooming=true;l.pageStyle.updateStyleStatus(true);var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleY()==l.currentScale){return}l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);var s=l.pageStyle.get_width();var a=l.pageStyle.get_height();var r=l.pageStyle.get_x()+(t-s)/l.pageStyle.getZoomCoefX(l.cofeX);if(s>=l.bookBoxWidth){if(r>0){r=0}else if(rl.bookBoxWidth-s){r=l.bookBoxWidth-s}var n=l.pageStyle.get_y()+(i-a)/l.pageStyle.getZoomCoefY(l.cofeY);if(a>=l.bookBoxHeight){if(n>0){n=0}else if(nl.bookBoxHeight-a){n=l.bookBoxHeight-a}l.pageStyle.set_x(r);l.pageStyle.set_y(n);l.lastPosition.x=l.pageStyle.get_x();l.lastPosition.y=l.pageStyle.get_y()});t.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM_END,this,function(e){if(l.pageStyle.get_scaleX()<=1){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.5,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);l.isZooming=false})}else{l.pageStyle.updateContentSta(true);l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);l.lastScale=l.currentScale;l.pageStyle.updatePdfTxtPosition();l.isZooming=false}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));t=null});t=null}this.addEventListener("click",function(e){var t=e.stageX;l.doubleStatus++;if(l.doubleStatus==1){haxe_Timer.delay(function(){if(l.doubleStatus==1){if(l.isMobile&&!l.isZooming&&!l.isSlide&&!l.isDrag){if(tl.bookBoxWidth-l.LrNavigateWidth*window.devicePixelRatio){l.setPageDefault();l.pageStyle.gotoNextPage()}else{var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.TOOL_BAR_ON_OFF,new flipbookMM_events_EventObject(l,null,null)));e=null}}}l.isSlide=false;l.isZooming=false;l.isDrag=false;l.doubleStatus=0},300)}else if(l.doubleStatus>=2){l.doubleStatus=0;l.isSlide=false;l.isZooming=false;l.isDrag=false;if(l.pageStyle.isPlaying){return}if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.3,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));e=null})}else{var i=l.doubleDefScale;var s=l.pageStyle.get_x()+l.pageStyle.get_width()*(l.pageStyle.get_scaleX()-i)/l.pageStyle.getZoomCoefX(.5);var a=l.pageStyle.get_y()+l.pageStyle.get_height()*(l.pageStyle.get_scaleY()-i)/l.pageStyle.getZoomCoefY(.5);l.pageStyle.updateStyleStatus(true);motion_Actuate.tween(l.pageStyle,.3,{x:s,y:a,scaleX:i,scaleY:i}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateContentSta(true);l.pageStyle.updatePdfTxtPosition();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));e=null})}}l.pageStyle.playBKMusic()});this.addEventListener("mouseWheel",function(e){if(e.delta>0){l.pageStyle.gotoNextPage()}else{l.pageStyle.gotoPrePage()}});var i=flipbookMM_config_ConfigSetting.getInstance();if(i.yesOrNo(i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicEnable))){var s=i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicUrl);if(s!=null&&s.length>4){if(i.yesOrNo(i.get(flipbookMM_config_ConfigKey.MusicAutoStart))){this.addEventListener("click",$bind(this,this.playBookBackgroundMusic))}}}},playBookBackgroundMusic:function(e){var t=this;var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,new flipbookMM_events_EventObject(this,"on",null)));i=null;haxe_Timer.delay(function(){t.removeEventListener("click",$bind(t,t.playBookBackgroundMusic))},5e3)},setPageDefault:function(){if(this.pageStyle!=null&&this.pageStyle.get_scaleY()!=this.pageDefScale){this.pageStyle.updateContentSta(false);this.pageStyle.set_scaleX(this.pageDefScale);this.pageStyle.set_scaleY(this.pageDefScale);this.pageStyle.set_x(this.pageDefPosiX);this.pageStyle.set_y(this.pageDefPosiY);this.pageStyle.updateStyleStatus(false);var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(this,this.pageDefScale,null)));e=null}},__class__:flipbookMM_bookBox_BookBox});var flipbookMM_bookBox_ManagerBookLayer=function(e,t,i,s){this.pageWidth=e;this.pageHeight=t;this.maxPageIndex=i;this.pageBackColor=s;this.layerWidth=this.pageWidth;this.layerHeight=this.pageHeight;this.preloadInterval=1;this.isTxtRender=false;this.isPdfjsRender=false;var a=flipbookMM_config_ConfigSetting.getInstance();if(a.get(flipbookMM_config_ConfigKey.PdfjsRenderEnable)=="yes"){this.isPdfjsRender=true;if(a.get(flipbookMM_config_ConfigKey.JS_mobile)=="false"){this.isTxtRender=true}}this.layerList=new haxe_ds_IntMap};$hxClasses["flipbookMM.bookBox.ManagerBookLayer"]=flipbookMM_bookBox_ManagerBookLayer;flipbookMM_bookBox_ManagerBookLayer.__name__=["flipbookMM","bookBox","ManagerBookLayer"];flipbookMM_bookBox_ManagerBookLayer.getInstance=function(e,t,i,s){if(flipbookMM_bookBox_ManagerBookLayer.instance==null){flipbookMM_bookBox_ManagerBookLayer.instance=new flipbookMM_bookBox_ManagerBookLayer(e,t,i,s)}return flipbookMM_bookBox_ManagerBookLayer.instance};flipbookMM_bookBox_ManagerBookLayer.prototype={layerList:null,layerWidth:null,layerHeight:null,pageWidth:null,pageHeight:null,pageBackColor:null,isPdfjsRender:null,isTxtRender:null,maxPageIndex:null,preloadInterval:null,resize:function(e,t){this.layerWidth=e;this.layerHeight=t;var i=this.layerList.keys();while(i.hasNext()){var s=i.next();js_Boot.__cast(this.layerList.h[s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(s);this.getLoadPage(s)}},updateBufferNum:function(e){this.preloadInterval=e},getLoadPage:function(e,t){if(t==null){t=false}if(e>0&&e<=this.maxPageIndex){var i=null;if(t){if(!this.layerList.h.hasOwnProperty(-e)){i=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,9999,this.pageBackColor,t,this.isPdfjsRender,this.isTxtRender);this.layerList.h[-e]=i}else{i=this.layerList.h[-e]}}else if(!this.layerList.h.hasOwnProperty(e)){i=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,e,this.pageBackColor,t,this.isPdfjsRender,this.isTxtRender);this.layerList.h[e]=i}else{i=this.layerList.h[e]}return i}else{var s=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,0,this.pageBackColor,t,this.isPdfjsRender,this.isTxtRender);return s}},preloadPage:function(e,t){if(t==null){t=false}if(base_baseUtils_MapUtil.$length(this.layerList)>2*this.preloadInterval+1){var i=this.layerList.keys();while(i.hasNext()){var s=i.next();if(s>=0){if(Math.abs(s-e)>this.preloadInterval){js_Boot.__cast(this.layerList.h[s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(s);if(this.layerList.h.hasOwnProperty(-s)){js_Boot.__cast(this.layerList.h[-s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(-s)}}}}}var a=e-this.preloadInterval;var r=e+this.preloadInterval;if(a>0){a=a}else{a=1}if(r0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.svgPngUrl,$bind(this,this.onSvgImgCom))}else if(this.imgUrl.length>0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.imgUrl,$bind(this,this.onSvgImgCom))}else{return}e=null;this.pageLayerShell.addChild(this.pageContent)},loadPdfjsPage:function(){this.pdfjsContent=new flipbookMM_bookBox_book_PdfjsPage(this.pageIndex,this.isTxtRenderFlag,$bind(this,this.onPdfjsCom))},onPdfjsCom:function(e){if(this.loadOkFlag==false){if(this.loading!=null){this.removeChild(this.loading);this.loading.destroyMe();this.loading=null}this.pageRealW=this.pdfjsContent.originW;this.pageRealH=this.pdfjsContent.originH;this.pageContent=new flipbookMM_bookBox_book_Page;this.pageContent.get_graphics().beginFill(0,0);this.pageContent.get_graphics().drawRect(0,0,this.pageRealW,this.pageRealH);this.pageContent.get_graphics().endFill();this.pageLayerShell.addChild(this.pageContent);var t=this.pageOrginalW/this.pageRealW;var i=this.pageOrginalH/this.pageRealH;var s=t0&&this.svgPngUrl.length>0){this.svgContent=new flipbookMM_bookBox_book_SvgPage(this.svgTxtUrl);this.pageContent.addChild(this.svgContent);this.svgScaleContent=new flipbookMM_bookBox_book_SvgPage(this.svgTxtUrl);this.pageContent.addChild(this.svgScaleContent)}this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.pageLink);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(s);this.pageContent.set_scaleY(s);this.pageContent.set_x((this.pageOrginalW-this.pageRealW*s)/2);this.pageContent.set_y((this.pageOrginalH-this.pageRealH*s)/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var n=a0){var t=0;var i=this.object._ffobjects;while(t0){var t=0;var i=this.object._ffobjects;while(t0){this.removeChildren()}if(this.pdfjsContent!=null){if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}var e=js_Boot.__cast(this.pdfPageView.canvas,HTMLCanvasElement);this.pdfjsContent=new openfl_display_Bitmap(openfl_display_BitmapData.fromCanvas(e));this.updateTxtPosition(9999*window.devicePixelRatio,0,false);this.addChild(this.pdfjsContent)},loadFinished:function(){if(this.comFun!=null){this.comFun();this.comFun=null}},updateTxtPosition:function(e,t,i){if(i==null){i=true}if(this.pdfPageView!=null){this.pdfPageView.div.style.position="absolute";this.pdfPageView.div.style.left=e/window.devicePixelRatio+"px";this.pdfPageView.div.style.top=t/window.devicePixelRatio+"px";var s=this.pdfPageView.div.getElementsByClassName("canvasWrapper")[0];if(s!=null){s.remove()}if(this.txtFlag){var a=this.pdfPageView.div.getElementsByClassName("textLayer")[0];if(a!=null){if(i){a.style.display="block"}else{a.style.display="none"}}}}},initPage:function(){var t=this;var e=flipbookMM_bookBox_Pdfjs.getInstance();var i=e.getPdfDocument();var s=1;var a=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);var r=this;i.getPage(this.pageIndex).then(function(e){t.originW=e.view[2]-e.view[0];t.originH=e.view[3]-e.view[1];t.loadFinished()})},loadPage:function(a,r,n){var _=this;var e=flipbookMM_bookBox_Pdfjs.getInstance();var t=e.getPdfDocument();var o=1;var l=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);var h=this;t.getPage(this.pageIndex).then(function(e){_.originW=e.view[2]-e.view[0];_.originH=e.view[3]-e.view[1];var t=a/_.originW;var i=r/_.originH;if(t<=i){o=t}else{o=i}o*=_.offsetScale;if(_.txtFlag){_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),textLayerFactory:new pdfjsViewer.DefaultTextLayerFactory,annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}else{_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}_.pdfPageView.setPdfPage(e);var s=_.pdfPageView.draw();_.drawContent();if(n!=null){n();n=null}})},resize:function(e,t){if(this.pdfPageView){var i=e/this.originW;var s=t/this.originH;var a=i<=s?i:s;a*=this.offsetScale;this.pdfPageView.update(a,0);this.pdfPageView.draw();this.drawContent()}},destroyMe:function(){if(this.pdfPageView){this.pdfPageView.destroy();this.pdfPageView.div.remove();this.pdfPageView=null}if(this.pdfjsContent!=null){if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}},__class__:flipbookMM_bookBox_book_PdfjsPage});var flipbookMM_bookBox_book_SvgPage=function(e){this.defScal=1;flipbookMM_bookBox_book_Page.call(this);this.svgUrl=e};$hxClasses["flipbookMM.bookBox.book.SvgPage"]=flipbookMM_bookBox_book_SvgPage;flipbookMM_bookBox_book_SvgPage.__name__=["flipbookMM","bookBox","book","SvgPage"];flipbookMM_bookBox_book_SvgPage.__super__=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_SvgPage.prototype=$extend(flipbookMM_bookBox_book_Page.prototype,{svgUrl:null,bitmapdata:null,defScal:null,loadSvg:function(i,s,a){var r=this;var n=window.document.createElement("img");n.onload=function(){n.onload=null;var e=window.document.createElement("canvas");e.width=i;e.height=s;var t=e.getContext("2d");t.drawImage(n,0,0,n.width,n.height,0,0,i,s);r.bitmapdata=openfl_display_BitmapData.fromCanvas(e);r.removeChildren();r.addChild(new openfl_display_Bitmap(r.bitmapdata));if(a!=null){a(e);a=null}t=null;e=null;n=null};n.src=this.svgUrl},destroyMe:function(){if(this.bitmapdata!=null){this.bitmapdata.dispose();this.bitmapdata=null;this.get_graphics().clear();this.get_graphics().endFill()}},__class__:flipbookMM_bookBox_book_SvgPage});var flipbookMM_bookBox_highlightText_HighlightTextNode=function(e,t,i){openfl_display_Sprite.call(this);if(flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().targetContentPosition!=null){var s=null;var a=0;var r=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().targetContentPosition;while(a=0&&_.startArea<=3){var t=_.get_mouseX();var i=_.get_mouseY();_.flipPathUpdate(t,i)}}});var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){_.isDisplayEmbedObject=true}else if(t=="off"){_.isDisplayEmbedObject=false}_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){_.isHighlightText=true;_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){_.isHighlightText=false;_.flipFinished()});l=null;haxe_Timer.delay(function(){if(_.isHScreen){_.pageList[3].changeObjectStatus(true);_.pageList[4].changeObjectStatus(true)}else{_.pageList[1].changeObjectStatus(true)}_.playBKMusic()},1e3)};$hxClasses["flipbookMM.bookBox.style.FlipStyle"]=flipbookMM_bookBox_style_FlipStyle;flipbookMM_bookBox_style_FlipStyle.__name__=["flipbookMM","bookBox","style","FlipStyle"];flipbookMM_bookBox_style_FlipStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_FlipStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{isRefresh:null,isGoRight:null,hardCoverEnable:null,backSprite:null,backMask:null,curMask:null,moveContain:null,moveLayer:null,moveMask:null,shdowContain:null,shadowCur:null,shadowCurMask:null,shadowMove:null,shadowMoveMask:null,shadowEffect:null,flipPoint:null,currentPoint:null,originPoint:null,TLPoint:null,BLPoint:null,TRPoint:null,BRPoint:null,startArea:null,flipStance:null,manualFlipStatus:null,diagonalLen:null,resize:function(e,t){if(this.styleWidth==e&&this.styleHeight==t){return}this.styleWidth=e;this.styleHeight=t;this.backSprite.get_graphics().clear();this.backSprite.get_graphics().beginFill(0,0);this.backSprite.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backSprite.get_graphics().endFill();var i=0;if(this.styleWidth>this.styleHeight){i=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex+1:this.tarPageIndex}this.isHScreen=true;this.pageStep=2}else{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=i/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=sthis.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=1;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==0){this.autoFlip(this.TLPoint,this.TRPoint.x)}else if(this.startArea==1){this.autoFlip(this.BLPoint,this.BRPoint.x)}else if(this.startArea==2){this.autoFlip(this.TRPoint,this.TLPoint.x)}else if(this.startArea==3){this.autoFlip(this.BRPoint,this.BLPoint.x)}}else{if(this.tarPageIndex>this.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=3;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==2){if(this.isGoRight){this.autoFlip(this.TRPoint,this.TLPoint.x)}else{this.autoFlip(this.TLPoint,this.TRPoint.x)}}else if(this.startArea==3){if(this.isGoRight){this.autoFlip(this.BRPoint,this.BLPoint.x)}else{this.autoFlip(this.BLPoint,this.BRPoint.x)}}}}},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},isGoNormalPage:function(e){if(this.isHScreen){var t=this.maxPageIndex%2==1?this.maxPageIndex:this.maxPageIndex+1;if(e<0||e>t){return false}if((this.curPageIndex/2|0)==(e/2|0)){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e%2==1?e:e+1}else{if(e<=0||e>this.maxPageIndex){return false}if(this.curPageIndex==e){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e}return true},onTouchRelease:function(e){if(this.isHScreen){if(this.startArea==0||this.startArea==1){if(e0){this.containLayer.removeChildren(0)}var o=0;while(o<8){var l=o++;if(l==0||l==7){this.pageList[l]=this.pageLoad.getLoadPage(0)}else{this.pageList[l]=this.pageLoad.getLoadPage(this.tarPageIndex-4+l)}this.containLayer.addChild(this.pageList[l]);if((l/4|0)==0){this.pageList[l].set_x(this.styleWidth/2-this.layerWidth+e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}else{this.pageList[l].set_x(this.styleWidth/2-e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}}var h=0;while(h<8){var c=h++;if((c/4|0)==0){this.containLayer.setChildIndex(this.pageList[c],c)}else{this.containLayer.setChildIndex(this.pageList[c],8-c+3)}}var u=0;while(u<8){var f=u++;if(this.isDisplayEmbedObject){if(f==3||f==4){this.pageList[f].changeObjectStatus(true)}else{this.pageList[f].changeObjectStatus(false)}}else{this.pageList[f].changeObjectStatus(false)}if(this.isHighlightText){if(f==3||f==4){this.pageList[f].addHighlightText()}}else{this.pageList[f].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}else{if(this.moveLayer!=null){this.moveContain.removeChildren(0);this.moveLayer.set_mask(null);this.moveLayer=null}if(this.pageList!=null){var p=this.pageList.length;var d=0;var g=p;while(d0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var w=x++;var k=this.tarPageIndex-1+w;if(k<0){k=0}this.pageList[w]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[w]);if(w==0){this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}else{this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}}var P=0;while(P<3){var C=P++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var M=T++;if(this.isDisplayEmbedObject){if(M==1){this.pageList[M].changeObjectStatus(true)}else{this.pageList[M].changeObjectStatus(false)}}else{this.pageList[M].changeObjectStatus(false)}if(this.isHighlightText){if(M==1){this.pageList[M].addHighlightText()}}else{this.pageList[M].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(t=this._Op.y-this._height/2){if(this.getDis(this._bPoint.x,this._bPoint.y,e,t)<=this._width){this._point.x=e;this._point.y=t}else{i=this.getAngleByPoint(this._bPoint.x,this._bPoint.y,e,t);this._point.x=Math.cos(i)*this._width+this._bPoint.x;this._point.y=Math.sin(i)*this._width+this._bPoint.y}}else if(this.getDis(this._tPoint.x,this._tPoint.y,e,t)<=this._dia){this._point.x=e;this._point.y=t}else{i=this.getAngleByPoint(this._tPoint.x,this._tPoint.y,e,t);this._point.x=Math.cos(i)*this._dia+this._tPoint.x;this._point.y=Math.sin(i)*this._dia+this._tPoint.y}if(this._point.xthis._Op.x+this._width){this._point.x=this._Op.x+this._width;if(this._isTop){this._point.y=this._Op.y-this._height/2}else{this._point.y=this._Op.y+this._height/2}}},__class__:flipbookMM_bookBox_style_LimitPoint};var flipbookMM_bookBox_style_SlideDoubleStyle=function(e,t,i,s,a,r,n){if(n==null){n=1}var _=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,2);this.pageWidth=i;this.pageHeight=s;this.maxPageIndex=a;this.curPageIndex=-1;this.tarPageIndex=-1;this.isPlaying=false;this.isZoom=false;this.pageStep=1;this.offsetX=10;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);fabric_FabricBaseObject._fn_gotoPage=$bind(this,this.gotoPage);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(i,s,a,r);var o=flipbookMM_config_ConfigSetting.getInstance();if(o.yesOrNo(o.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}o=null;this.resize(e,t);this.gotoPage(n);this.playBKMusic();var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){_.isDisplayEmbedObject=true}else if(t=="off"){_.isDisplayEmbedObject=false}_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){_.isHighlightText=true;_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){_.isHighlightText=false;_.flipFinished()});l=null};$hxClasses["flipbookMM.bookBox.style.SlideDoubleStyle"]=flipbookMM_bookBox_style_SlideDoubleStyle;flipbookMM_bookBox_style_SlideDoubleStyle.__name__=["flipbookMM","bookBox","style","SlideDoubleStyle"];flipbookMM_bookBox_style_SlideDoubleStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_SlideDoubleStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{moveLayer:null,offsetX:null,backMask:null,resize:function(e,t){this.styleWidth=e;this.styleHeight=t;if(this.backMask==null){this.backMask=new openfl_display_Shape;this.addChild(this.backMask);this.set_mask(this.backMask)}this.backMask.get_graphics().clear();this.backMask.get_graphics().beginFill(61440,.5);this.backMask.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backMask.get_graphics().endFill();var i=0;if(this.styleWidth>this.styleHeight){i=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex:this.tarPageIndex+1}this.isHScreen=true;this.pageStep=2}else{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=this.pageWidth/this.pageHeight;var a=i/this.pageWidth;var r=this.styleHeight/this.pageHeight;var n=ai){return}if(((this.curPageIndex-1)/2|0)==((e-1)/2|0)){return}if(this.isPlaying){return}this.tarPageIndex=e%2==0?e:e+1}else{if(e<=0||e>this.maxPageIndex){return}if(this.curPageIndex==e){return}if(this.isPlaying){return}else{this.isPlaying=true}this.tarPageIndex=e}if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.isHScreen){if(this.curPageIndex0){this.containLayer.removeChildren(0);this.moveLayer=null}if(this.isHScreen){this.containLayer.set_x(0);var e=0;while(e<6){var t=e++;this.pageList[t]=this.pageLoad.getLoadPage(this.tarPageIndex-3+t);this.pageList[t].set_x(this.styleWidth*((t/2|0)-1)+(this.styleWidth-2*this.layerWidth)/2+t%2*this.layerWidth);this.pageList[t].set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.pageList[t])}this.curPageIndex=this.tarPageIndex;var i=0;while(i<6){var s=i++;if(this.isDisplayEmbedObject){if(s==2||s==3){this.pageList[s].changeObjectStatus(true)}else{this.pageList[s].changeObjectStatus(false)}}else{this.pageList[s].changeObjectStatus(false)}if(this.isHighlightText){if(s==2||s==3){this.pageList[s].addHighlightText()}}else{this.pageList[s].removeHighlightText()}}this.pageLoad.preloadPage(this.curPageIndex)}else{this.containLayer.set_x(0);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.containLayer.addChild(this.pageList[0]);this.pageList[0].set_x(-this.layerWidth-this.offsetX);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex);this.containLayer.addChild(this.pageList[1]);this.pageList[1].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex+1);this.containLayer.addChild(this.pageList[2]);this.pageList[2].set_x(this.styleWidth+this.offsetX);this.pageList[2].set_y((this.styleHeight-this.layerHeight)/2);this.curPageIndex=this.tarPageIndex;if(this.isDisplayEmbedObject){this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(true);this.pageList[2].changeObjectStatus(false)}else{this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(false);this.pageList[2].changeObjectStatus(false)}if(this.isHighlightText){this.pageList[1].addHighlightText()}else{this.pageList[0].removeHighlightText();this.pageList[1].removeHighlightText();this.pageList[2].removeHighlightText()}this.pageLoad.preloadPage(this.curPageIndex)}this.isPlaying=false;this.playBKMusic();if(this.curPageIndex>this.maxPageIndex){this.curPageIndex=this.maxPageIndex}var a=flipbookMM_events_EventCenter.getInstance();a.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));a=null},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(ta){this.layerWidth=this.styleHeight*i;this.layerHeight=this.styleHeight}this.pageLoad.resize(this.layerWidth,this.layerHeight);this.pageLoad.updateBufferNum(1);var n=0;var _=this.pageList;while(n<_.length){var o=_[n];++n;if(o!=null){o.set_x((this.styleWidth-this.layerWidth)/2);o.set_y((this.styleHeight-this.layerHeight)/2)}}this.flipFinished()},gotoPage:function(e){var t=this;if(this.isZoom){return}if(e<=0||e>this.maxPageIndex){return}if(this.curPageIndex==e){return}if(this.isPlaying){return}else{this.isPlaying=true}this.tarPageIndex=e;if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.curPageIndex0){this.containLayer.removeChildren(0);this.moveLayer=null}this.containLayer.set_x(0);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.containLayer.addChild(this.pageList[0]);this.pageList[0].set_x(-this.layerWidth-this.offsetX);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex);this.containLayer.addChild(this.pageList[1]);this.pageList[1].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex+1);this.containLayer.addChild(this.pageList[2]);this.pageList[2].set_x(this.styleWidth+this.offsetX);this.pageList[2].set_y((this.styleHeight-this.layerHeight)/2);this.curPageIndex=this.tarPageIndex;if(this.isDisplayEmbedObject){this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(true);this.pageList[2].changeObjectStatus(false)}else{this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(false);this.pageList[2].changeObjectStatus(false)}if(this.isHighlightText){this.pageList[1].addHighlightText()}else{this.pageList[0].removeHighlightText();this.pageList[1].removeHighlightText();this.pageList[2].removeHighlightText()}this.pageLoad.preloadPage(this.curPageIndex);this.isPlaying=false;this.playBKMusic();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));e=null},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(t0){y=1}else{y=-1;_=-_+c}l=Math.abs(l);var x=0;var w=(c-1)*u/2;var k=0;var P=m;while(k=n[f]){if(f==0){s=o[0];a=l[0];r=_[0]}else{s=this.lineScale(n[f-1],o[f-1],n[f],o[f],e);a=this.lineScale(n[f-1],l[f-1],n[f],l[f],e);r=this.lineScale(n[f-1],_[f-1],n[f],_[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(s,a,r,t)},paperDoubleParamesR:function(e,t){var i=!(Math.abs(e)<1.001&&Math.abs(t)<1.001);var s=0;var a=0;var r=0;var n=[1,.9,.5,0,-.5,-.75,-.9,-1];var _=[0,20,30,60,100,135,170,180];var o=[90,55,20,25,30,50,85,90];var l=[-200,-20,-5,-6,-7,-10,-20,-2e3];var h=n.length;var c=0;var u=h;while(c=n[f]){if(f==0){s=o[0];a=l[0];r=_[0]}else{s=this.lineScale(n[f-1],o[f-1],n[f],o[f],e);a=this.lineScale(n[f-1],l[f-1],n[f],l[f],e);r=this.lineScale(n[f-1],_[f-1],n[f],_[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(s,a,r,t)},clearThreeStyle:function(){if(this._renderer!=null){this._renderer.dispose();this._renderer.clear();this._renderer.render(this._scene,this._camera)}},computeWH:function(e,t){var i=e>=t?e:t;var s=i;var a=8;while(a<14){var r=a++;s=Math.pow(2,r);if(i<=s){break}}return s|0},updateThreeStyle:function(e,t,i){if(this.turnDirection){var s=this.paperDoubleParamesR(e,t);this.curlPage(s,i)}else{var a=this.paperDoubleParamesL(e,t);this.curlPage(a,i)}this._coneCube=THREE.SceneUtils.createMultiMaterialObject(this._geometry,this._material);if(this.displayShadow){this._coneCube.traverse(function(e){if(e!=null&&e.type=="Mesh"){e.castShadow=true}})}this._scene.add(this._coneCube);this._renderer.render(this._scene,this._camera);this._scene.remove(this._coneCube);this._geometry.dispose();this._material[0].dispose();this._material[1].dispose();this._texture[0].dispose();this._texture[1].dispose();this._coneCube=null},resizeThreeStyle:function(e,t,i,s,a){if(this._renderer!=null){this.clearThreeStyle();window.document.getElementById("openfl-content").removeChild(this._renderer.domElement)}this.initThree(s,a);this._scene.position.set(e,t,i)},updateCanvasParamater:function(e,t,i,s,a){this.curPageW=e;this.curPageH=t;this.curPageM=i;this.curPageS=s;this.turnDirection=a},__class__:flipbookMM_bookBox_style_ThreeAlgo});var flipbookMM_bookBox_style_ThreeStyle=function(e,t,i,s,a,r,n){if(n==null){n=1}var _=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,1);this.pageWidth=i;this.pageHeight=s;this.maxPageIndex=a;this.curPageIndex=0;this.tarPageIndex=0;this.isPlaying=false;this.isHScreen=true;this.isGoRight=false;this.isRefresh=false;this.isZoom=false;this.isAutoPlay=true;this.hardCoverEnable=false;var o=flipbookMM_config_ConfigSetting.getInstance();if(o.hasKey(flipbookMM_config_ConfigKey.FLipStyleHardEnable)){this.hardCoverEnable=o.yesOrNo(o.get(flipbookMM_config_ConfigKey.FLipStyleHardEnable))}if(o.yesOrNo(o.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}o=null;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);fabric_FabricBaseObject._fn_gotoPage=$bind(this,this.gotoPage);this.backSprite=new openfl_display_Sprite;this.addChild(this.backSprite);this.backMask=new openfl_display_Shape;this.addChild(this.backMask);this.set_mask(this.backMask);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.shdowContain=new openfl_display_Sprite;this.addChild(this.shdowContain);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(i,s,a,r);this.flipStance=new flipbookMM_bookBox_style_FlipStance;this.curPageIndex=n;this.tarPageIndex=this.curPageIndex;this.startArea=-1;this.manualFlipStatus=0;this.pageStep=0;this.resize(e,t);this.addEventListener("mouseDown",function(e){if(_.isPlaying){return}if(_.get_scaleY()!=1){return}var s=new openfl_geom_Point(_.get_mouseX(),_.get_mouseY());_.manualFlipStatus=1;var t=function(){if(_.manualFlipStatus==1){var e=0;if(_.isHScreen){if(s.x<_.currentPoint.x){if(s.y<_.currentPoint.y){_.startArea=0}else{_.startArea=1}}else if(s.y<_.currentPoint.y){_.startArea=2}else{_.startArea=3}if(_.startArea==0||_.startArea==1){e=_.curPageIndex-_.pageStep;_.isGoRight=false}else if(_.startArea==2||_.startArea==3){e=_.curPageIndex+_.pageStep;_.isGoRight=true}}else{if(s.x<_.currentPoint.x){e=_.curPageIndex-_.pageStep;_.isGoRight=false}else{e=_.curPageIndex+_.pageStep;_.isGoRight=true}if(s.y<_.currentPoint.y){_.startArea=2}else{_.startArea=3}}if(_.isGoNormalPage(e)){_.flipMoveInit();if(_.isHScreen){_.flipPathUpdate((s.x-_.layerWidth)/_.layerWidth,(_.layerHeight/2-s.y)/(_.layerHeight/2))}else{var t=(s.x+_.layerWidth-_.layerWidth)/_.layerWidth;var i=_.layerHeight/2-_.get_mouseY();_.flipPathUpdate(t,i/(_.layerHeight/2))}_.isAutoPlay=false;_.manualFlipStatus=2}}};haxe_Timer.delay(t,500)});this.addEventListener("mouseUp",function(e){if(_.manualFlipStatus==2){var t=_.get_mouseX();var i=_.get_mouseY();_.onTouchRelease(t,i)}_.manualFlipStatus=3});this.addEventListener("rollOut",function(e){if(_.manualFlipStatus==2){var t=_.get_mouseX();var i=_.get_mouseY();_.onTouchRelease(t,i)}_.manualFlipStatus=3});this.addEventListener("mouseMove",function(e){if(_.manualFlipStatus==2){if(_.startArea>=0&&_.startArea<=3){if(_.isHScreen){var t=(_.get_mouseX()-_.layerWidth)/_.layerWidth;var i=_.layerHeight/2-_.get_mouseY();_.flipPathUpdate(t,i/(_.layerHeight/2))}else if(_.startArea==0||_.startArea==1){var s=(_.get_mouseX()+_.layerWidth-_.layerWidth)/_.layerWidth;var a=_.layerHeight/2-_.get_mouseY();_.flipPathUpdate(s,a/(_.layerHeight/2))}else{var r=(_.get_mouseX()+_.layerWidth-_.layerWidth)/_.layerWidth;var n=_.layerHeight/2-_.get_mouseY();_.flipPathUpdate(r,n/(_.layerHeight/2))}}}});var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){_.isDisplayEmbedObject=true}else if(t=="off"){_.isDisplayEmbedObject=false}_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){_.isHighlightText=true;_.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){_.isHighlightText=false;_.flipFinished()});l=null;haxe_Timer.delay(function(){if(_.isHScreen){_.pageList[3].changeObjectStatus(true);_.pageList[4].changeObjectStatus(true)}else{_.pageList[1].changeObjectStatus(true)}_.playBKMusic()},1e3)};$hxClasses["flipbookMM.bookBox.style.ThreeStyle"]=flipbookMM_bookBox_style_ThreeStyle;flipbookMM_bookBox_style_ThreeStyle.__name__=["flipbookMM","bookBox","style","ThreeStyle"];flipbookMM_bookBox_style_ThreeStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_ThreeStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{isRefresh:null,isGoRight:null,hardCoverEnable:null,backSprite:null,backMask:null,shdowContain:null,shadowEffect:null,flipPoint:null,currentPoint:null,originPoint:null,TLPoint:null,BLPoint:null,TRPoint:null,BRPoint:null,startArea:null,flipStance:null,manualFlipStatus:null,diagonalLen:null,threeAlog:null,threeCanvas:null,resize:function(e,t){if(this.styleWidth==e&&this.styleHeight==t){return}this.styleWidth=e;this.styleHeight=t;this.backSprite.get_graphics().clear();this.backSprite.get_graphics().beginFill(0,0);this.backSprite.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backSprite.get_graphics().endFill();var i=0;if(this.styleWidth>this.styleHeight){i=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex+1:this.tarPageIndex}this.isHScreen=true;this.pageStep=2}else{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=i/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=sthis.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=1;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==0){this.autoFlip(new openfl_geom_Point(0,0),2*this.layerWidth)}else if(this.startArea==1){this.autoFlip(new openfl_geom_Point(0,this.layerHeight),2*this.layerWidth)}else if(this.startArea==2){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,0),0)}else if(this.startArea==3){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,this.layerHeight),0)}}else{if(this.tarPageIndex>this.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=3;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==2){if(this.isGoRight){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,0),0)}else{this.autoFlip(new openfl_geom_Point(0,0),2*this.layerWidth)}}else if(this.startArea==3){if(this.isGoRight){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,this.layerHeight),0)}else{this.autoFlip(new openfl_geom_Point(0,this.layerHeight),2*this.layerWidth)}}}}},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},isGoNormalPage:function(e){if(this.isHScreen){var t=this.maxPageIndex%2==1?this.maxPageIndex:this.maxPageIndex+1;if(e<0||e>t){return false}if((this.curPageIndex/2|0)==(e/2|0)){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e%2==1?e:e+1}else{if(e<=0||e>this.maxPageIndex){return false}if(this.curPageIndex==e){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e}return true},onTouchRelease:function(e,t){if(this.isHScreen){if(this.startArea==0||this.startArea==1){if(e1){i=1}else if(i<-1){i=-1}s*=1.5;if(s>1){s=1}else if(s<-1){s=-1}if(this.isGoRight){this.softFlipPathUpdate(i,-s)}else{this.softFlipPathUpdate(-i,-s)}this.isRefresh=false},flipFinished:function(){if(this.threeAlog!=null){this.threeAlog.clearThreeStyle()}this.softFlipFinished();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_MOVE_END));e=null;this.isPlaying=false;this.playBKMusic()},softFlipFinished:function(){this.shdowContain.set_visible(false);this.setChildIndex(this.shdowContain,0);var e=0;if(this.isHScreen){if(this.pageList!=null){var t=this.pageList.length;var i=0;var s=t;while(i0){this.containLayer.removeChildren(0)}var o=0;while(o<8){var l=o++;if(l==0||l==7){this.pageList[l]=this.pageLoad.getLoadPage(0)}else{this.pageList[l]=this.pageLoad.getLoadPage(this.tarPageIndex-4+l)}this.containLayer.addChild(this.pageList[l]);if((l/4|0)==0){this.pageList[l].set_x(this.styleWidth/2-this.layerWidth+e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}else{this.pageList[l].set_x(this.styleWidth/2-e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}}var h=0;while(h<8){var c=h++;if((c/4|0)==0){this.containLayer.setChildIndex(this.pageList[c],c)}else{this.containLayer.setChildIndex(this.pageList[c],8-c+3)}}var u=0;while(u<8){var f=u++;if(this.isDisplayEmbedObject){if(f==3||f==4){this.pageList[f].changeObjectStatus(true)}else{this.pageList[f].changeObjectStatus(false)}}else{this.pageList[f].changeObjectStatus(false)}if(this.isHighlightText){if(f==3||f==4){this.pageList[f].addHighlightText()}}else{this.pageList[f].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}else{if(this.pageList!=null){var p=this.pageList.length;var d=0;var g=p;while(d0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var w=x++;var k=this.tarPageIndex-1+w;if(k<0){k=0}this.pageList[w]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[w]);if(w==0){this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}else{this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}}var P=0;while(P<3){var C=P++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var M=T++;if(this.isDisplayEmbedObject){if(M==1){this.pageList[M].changeObjectStatus(true)}else{this.pageList[M].changeObjectStatus(false)}}else{this.pageList[M].changeObjectStatus(false)}if(this.isHighlightText){if(M==1){this.pageList[M].addHighlightText()}}else{this.pageList[M].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(t0){t.set(r.att.resolve("name"),r.get_innerData())}}}else if(s.get_name()=="pageobjects"){var n=flipbookMM_bookBox_ObjectConfigInit.getInstance();n.setXmlData(s.x);n=null;var _=xeditor_objects_VideoHtmlManage.getInstance();_.parseVideoXml(s.x);_.videoLoad();_=null}else if(s.get_name()=="bookmark"){var o=flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance();o.setXmlData(s.x);o=null}else if(s.get_name()=="pages"){var l=flipbookMM_bookBox_PagesConfigGet.getInstance();l.setXmlData(s.x);l.getPagesConfig();l=null}else if(s.get_name()=="security"){if(t.get(flipbookMM_config_ConfigKey.SecurityMode)!="Public"){var h=flipbookMM_bookBox_PagesConfigGet.getInstance();h.setEncryptData(s.x);h.getEncryptData();h=null}}}this.fast=null};$hxClasses["flipbookMM.config.ConfigInit"]=flipbookMM_config_ConfigInit;flipbookMM_config_ConfigInit.__name__=["flipbookMM","config","ConfigInit"];flipbookMM_config_ConfigInit.prototype={fast:null,__class__:flipbookMM_config_ConfigInit};var flipbookMM_config_ConfigKey=function(){};$hxClasses["flipbookMM.config.ConfigKey"]=flipbookMM_config_ConfigKey;flipbookMM_config_ConfigKey.__name__=["flipbookMM","config","ConfigKey"];var flipbookMM_config_ConfigSetting=function(){this.settings=null;this.settings=new haxe_ds_StringMap};$hxClasses["flipbookMM.config.ConfigSetting"]=flipbookMM_config_ConfigSetting;flipbookMM_config_ConfigSetting.__name__=["flipbookMM","config","ConfigSetting"];flipbookMM_config_ConfigSetting.getInstance=function(){if(flipbookMM_config_ConfigSetting.instance==null){flipbookMM_config_ConfigSetting.instance=new flipbookMM_config_ConfigSetting}return flipbookMM_config_ConfigSetting.instance};flipbookMM_config_ConfigSetting.prototype={settings:null,hasKey:function(e){var t=this.settings;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},get:function(e){var t=this.settings;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},set:function(e,t){var i=this.settings;var s=t;if(__map_reserved[e]!=null){i.setReserved(e,s)}else{i.h[e]=s}return},yesOrNo:function(e){if(e!=null&&e.length>0){var t=e.toLowerCase();if(t=="yes"||t=="enable"||t=="show"||t=="true"){return true}else{return false}}else{return false}},ColorTrans:function(e){var t=Std.string(StringTools.hex(e,16));t=HxOverrides.substr(t,t.length-6,null);t="#"+t;return t},getBookStyleType:function(){var e;var t=this.get(flipbookMM_config_ConfigKey.DefaultBookStyle);if(t=="Flip"){e=1}else if(t=="Slide"){e=0}else if(t=="Flip:Hardcover"){e=1;this.set(flipbookMM_config_ConfigKey.IsHardCoverStyle,"Enable")}else if(t=="Slide:Double page"){e=2}else if(t=="Flip:3D"){e=3}else{e=1}return e},__class__:flipbookMM_config_ConfigSetting};var flipbookMM_config_Resource=function(){};$hxClasses["flipbookMM.config.Resource"]=flipbookMM_config_Resource;flipbookMM_config_Resource.__name__=["flipbookMM","config","Resource"];var flipbookMM_events_EventAction=function(e,t){this.action=0;this.target=0;this.target=e;this.action=t};$hxClasses["flipbookMM.events.EventAction"]=flipbookMM_events_EventAction;flipbookMM_events_EventAction.__name__=["flipbookMM","events","EventAction"];flipbookMM_events_EventAction.prototype={target:null,action:null,__class__:flipbookMM_events_EventAction};var flipbookMM_events_EventCenter=function(){this._eventMode=false;this._eventSprite=null;this._eventMap=new haxe_ds_StringMap};$hxClasses["flipbookMM.events.EventCenter"]=flipbookMM_events_EventCenter;flipbookMM_events_EventCenter.__name__=["flipbookMM","events","EventCenter"];flipbookMM_events_EventCenter.getInstance=function(){if(flipbookMM_events_EventCenter.Instance==null){flipbookMM_events_EventCenter.Instance=new flipbookMM_events_EventCenter;flipbookMM_events_EventCenter.Instance.setEventMode(false)}return flipbookMM_events_EventCenter.Instance};flipbookMM_events_EventCenter.prototype={_eventMode:null,_eventSprite:null,_eventMap:null,setEventMode:function(e){this._eventMode=e;return e},getMap:function(){return this._eventMap},getNewEvent:function(e,t,i){var s=null;s=new flipbookMM_events_EventCenterEvent(e,t);s._action=i;return s},addEventListener:function(e,t,i){if(t==null||i==null||e==null){return false}if(this._eventMode==true&&this._eventSprite!=null){t.addEventListener(e,i)}var s=this.getMap();var a=null;a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];if(a==null){a=[];if(__map_reserved[e]!=null){s.setReserved(e,a)}else{s.h[e]=a}}return this.helpAddTargetAction(a,t,i)},helpAddTargetAction:function(e,t,i){if(t==null||e==null){return false}var s=null;if(e.length==0){s=new flipbookMM_events_EventAction(t,i);e.push(s);return true}else{var a=0;while(a0){var _=null;_=this.getNewEvent(t,i,s);var o=0;while(o-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&e.indexOf("KHTML")==-1,mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Linux")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:e.indexOf("Safari")==-1}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()};if(e.versions.mobile||e.versions.ios||e.versions.android||e.versions.iPhone||e.versions.iPad){return true}else{return false}};return e()},__class__:flipbookMM_global_GetDivJs};var flipbookMM_market_EncryptJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.pageEncrypt=flipbookMM_bookBox_PagesConfigGet.getInstance().getEncryptData();if(this.pageEncrypt.isEncrypt==false){return}this.createContainer();var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.SECURITY_WINDOW_ON,this,function(e){t.set_visible(true)});e.addEventListener(flipbookMM_events_EventConst.SECURITY_WINDOW_OFF,this,function(e){t.set_visible(false)})};$hxClasses["flipbookMM.market.EncryptJs"]=flipbookMM_market_EncryptJs;flipbookMM_market_EncryptJs.__name__=["flipbookMM","market","EncryptJs"];flipbookMM_market_EncryptJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_EncryptJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{pageEncrypt:null,createContainer:function(){if(this.pageEncrypt.securityMode=="single"){this.createSinglePasswordContainer()}else if(this.pageEncrypt.securityMode=="userlist"){this.createUserPasswordContainer()}},createUserPasswordContainer:function(){var s=this;this.set_width(300);this.set_height(200);this.set_visible(false);this.setBackgroundColor(15724527);var e=window.document.createElement("div");e.innerText="Login";e.style.padding="5px";e.style.backgroundColor="#312f2f";e.style.color="white";e.style.height="22px";this.div.appendChild(e);var t=window.document.createElement("div");t.style.padding="30px 5px";var i=window.document.createElement("div");i.style.padding="5px";var a=window.document.createElement("div");a.innerText="User:";a.style.display="inline-block";a.style.width="100px";i.appendChild(a);var r=window.document.createElement("input");r.id="encrypt-user";r.style.display="inline-block";i.appendChild(r);t.appendChild(i);var n=window.document.createElement("div");n.style.padding="5px";var _=window.document.createElement("div");_.innerText="Password:";_.style.display="inline-block";_.style.width="100px";n.appendChild(_);var o=window.document.createElement("input");o.style.display="inline-block";o.id="encrypt-password";n.appendChild(o);t.appendChild(n);this.div.appendChild(t);var l=window.document.createElement("div");l.style.display="flex";l.style.justifyContent="space-around";var h=window.document.createElement("div");h.innerText="Login";h.id="encrypt-login";h.style.backgroundColor="#e8e7e7";h.style.borderRadius="5px";h.style.padding="5px";h.style.cursor="pointer";var c=window.document.createElement("div");c.innerText="Cancel";c.id="encrypt-cancel";c.style.backgroundColor="#e8e7e7";c.style.borderRadius="5px";c.style.padding="5px";c.style.cursor="pointer";l.appendChild(h);l.appendChild(c);this.div.appendChild(l);flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);h.onmouseover=function(){h.style.backgroundColor="#bdb6b6"};h.onmouseout=function(){h.style.backgroundColor="#e8e7e7"};h.onmousedown=function(){h.style.backgroundColor="#757070"};h.onmouseup=function(){h.style.backgroundColor="#e8e7e7"};h.onclick=function(){var e=js_Boot.__cast(window.document.getElementById("encrypt-user"),HTMLInputElement).value;var t=js_Boot.__cast(window.document.getElementById("encrypt-password"),HTMLInputElement).value;if(t!=null&&e!=null){if(s.pageEncrypt.verifyUserPassword(e,t)){s.set_visible(false);s.pageEncrypt.isEncrypt=false;var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SECURITY_PASS_OK));i=null}}};c.onmouseover=function(){c.style.backgroundColor="#bdb6b6"};c.onmouseout=function(){c.style.backgroundColor="#e8e7e7"};c.onmousedown=function(){c.style.backgroundColor="#757070"};c.onmouseup=function(){c.style.backgroundColor="#e8e7e7"};c.onclick=function(){s.set_visible(false)}},createSinglePasswordContainer:function(){var i=this;this.set_width(300);this.set_height(200);this.set_visible(false);this.setBackgroundColor(15724527);var e=window.document.createElement("div");e.innerText="Login";e.style.padding="5px";e.style.backgroundColor="#312f2f";e.style.color="white";e.style.height="22px";this.div.appendChild(e);var t=window.document.createElement("div");t.style.padding="40px 5px";var s=window.document.createElement("div");s.style.padding="5px";s.style.textAlign="center";var a=window.document.createElement("div");a.innerText="Password:";a.style.display="inline-block";a.style.width="100px";s.appendChild(a);var r=window.document.createElement("input");r.style.display="inline-block";r.id="encrypt-password";s.appendChild(r);t.appendChild(s);this.div.appendChild(t);var n=window.document.createElement("div");n.style.display="flex";n.style.justifyContent="space-around";var _=window.document.createElement("div");_.innerText="Login";_.id="encrypt-login";_.style.backgroundColor="#e8e7e7";_.style.borderRadius="5px";_.style.padding="5px";_.style.cursor="pointer";var o=window.document.createElement("div");o.innerText="Cancel";o.id="encrypt-cancel";o.style.backgroundColor="#e8e7e7";o.style.borderRadius="5px";o.style.padding="5px";o.style.cursor="pointer";n.appendChild(_);n.appendChild(o);this.div.appendChild(n);flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);_.onmouseover=function(){_.style.backgroundColor="#bdb6b6"};_.onmouseout=function(){_.style.backgroundColor="#e8e7e7"};_.onmousedown=function(){_.style.backgroundColor="#757070"};_.onmouseup=function(){_.style.backgroundColor="#e8e7e7"};_.onclick=function(){var e=js_Boot.__cast(window.document.getElementById("encrypt-password"),HTMLInputElement).value;if(e!=null){if(i.pageEncrypt.verifySinglePassword(e)){i.set_visible(false);i.pageEncrypt.isEncrypt=false;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SECURITY_PASS_OK));t=null}}};o.onmouseover=function(){o.style.backgroundColor="#bdb6b6"};o.onmouseout=function(){o.style.backgroundColor="#e8e7e7"};o.onmousedown=function(){o.style.backgroundColor="#757070"};o.onmouseup=function(){o.style.backgroundColor="#e8e7e7"};o.onclick=function(){i.set_visible(false)}},__class__:flipbookMM_market_EncryptJs});var flipbookMM_market_LogoJs=function(e,t,i,s,a,r,n,_){var o=this;base_baseSprite_SpriteJs.call(this);this.logWid=i;this.logHei=s;this.offWid=a;this.offHei=r;this.logUrl=n;if(this.logUrl!=null&&this.logUrl.length>0){this.log=window.document.createElement("img");this.log.style.position="absolute";this.log.style.display="block";this.log.src=this.logUrl;this.div.appendChild(this.log);this.log.onload=function(){o.log.onload=null;o.resize(e,t)};this.logNet=_;if(this.logNet!=null&&this.logNet.length>0){this.log.onclick=function(){openfl_Lib.getURL(new openfl_net_URLRequest(o.logNet),"_blank")}}}};$hxClasses["flipbookMM.market.LogoJs"]=flipbookMM_market_LogoJs;flipbookMM_market_LogoJs.__name__=["flipbookMM","market","LogoJs"];flipbookMM_market_LogoJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_LogoJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{log:null,logUrl:null,logNet:null,logWid:null,logHei:null,offWid:null,offHei:null,resize:function(e,t){if(this.log==null){return}var i=e/2-36-27;var s=t/3*2;var a=i/this.logWid;var r=s/this.logHei;var n=0;var _=0;if(a<=r){n=i;_=this.logHei*i/this.logWid}else{n=this.logWid*s/this.logHei;_=s}this.log.style.height=_+"px";this.log.style.width=n+"px";this.log.style.left=this.offWid+"px";this.log.style.top=this.offHei+(t-_)/2+"px";var o=flipbookMM_toolbar_bar_AutoLayout.getInstance();o.updateLogWidht(n);o=null},__class__:flipbookMM_market_LogoJs});var flipbookMM_market_RegisterJs=function(){var e=this;base_baseSprite_SpriteJs.call(this);var t=flipbookMM_config_ConfigSetting.getInstance();if(t.get(flipbookMM_config_ConfigKey.AppRegister)!="20120808"){var i=t.get(flipbookMM_config_ConfigKey.AppShowName);var s=t.get(flipbookMM_config_ConfigKey.AppLinkWebsite);var a;if(i.indexOf("Next")==0){a="./img/register_logo_next.png"}else{a="./img/register_logo_1st.png"}this.img=window.document.createElement("img");this.img.src=a;this.img.style.left=-141+"px";this.img.style.top=-31+"px";this.img.style.position="absolute";this.img.style.display="block";this.img.style.setProperty("-webkit-user-select","none");this.img.style.setProperty("-moz-user-select","none");this.img.style.setProperty("-ms-user-select","none");this.img.style.setProperty("user-select","none");this.img.onselect=function(){return false};this.img.onload=function(){e.img.onload=null;e.div.appendChild(e.img);e.name=new base_baseSprite_SpriteJs;e.name.set_x(-70);e.name.set_y(-20);e.name.set_width(200);e.div.appendChild(e.name.div);e.name.set_text(i);e.link=new base_baseSprite_SpriteJs;e.link.set_x(-70);e.link.set_y(0);e.link.set_textColor(255);e.link.set_text(s);e.div.appendChild(e.link.div)};flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);this.div.onclick=function(){openfl_Lib.getURL(new openfl_net_URLRequest(s),"_blank")}}};$hxClasses["flipbookMM.market.RegisterJs"]=flipbookMM_market_RegisterJs;flipbookMM_market_RegisterJs.__name__=["flipbookMM","market","RegisterJs"];flipbookMM_market_RegisterJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_RegisterJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{img:null,name:null,link:null,__class__:flipbookMM_market_RegisterJs});var flipbookMM_toolbar_IconBtnSprite=function(e,t,i,s,a){if(a==null){a=36}if(s==null){s=36}if(i==null){i=0}if(t==null){t=16777215}var r=this;openfl_display_Sprite.call(this);this.backG=new openfl_display_Sprite;this.backG.get_graphics().beginFill(i);this.backG.get_graphics().drawRect(0,0,s,a);this.backG.get_graphics().endFill();this.backG.set_alpha(0);this.addChild(this.backG);this.loader=new base_baseLoad_LoadImg(e,function(e){r._bitmap=e.target.loader.content;r._bitmap.smoothing=true;r.drawColorTransform(t);r.loader.set_scaleX(window.devicePixelRatio);r.loader.set_scaleY(window.devicePixelRatio)});this.addChild(this.loader)};$hxClasses["flipbookMM.toolbar.IconBtnSprite"]=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_IconBtnSprite.__name__=["flipbookMM","toolbar","IconBtnSprite"];flipbookMM_toolbar_IconBtnSprite.__super__=openfl_display_Sprite;flipbookMM_toolbar_IconBtnSprite.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,backG:null,_bitmap:null,drawColorTransform:function(e,t){if(t==null){t=1}var i=e>>16&255;if(i<0){i=0}else{i=i}var s=e>>8&255;if(s<0){s=0}else{s=s}var a=e&255;if(a<0){a=0}else{a=a}if(this._bitmap==null){return}var r=0;var n=0;var _=0;var o=1;var l=this._bitmap.get_bitmapData();if(l==null){return}try{var h=0;var c=l.width;while(h>16&255;var r=e>>8&255;var n=e&255;var _=s.getImageData(0,0,this.iconW,this.iconH);var o=_.data.length/4|0;var l=0;var h=o;while(l0){t=js_Boot.__cast(e._data._object,Int)}else{var i=flipbookMM_toolbar_bar_AutoLayout.getInstance();var s=0;var a=i.leftExpandList;while(s0||s.lastCount==-1){var t=s.curPageIndex++;if(t<=s.maxPageIndex){var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(s,t,null)));i=null}else{if(s.lastCount>0){s.lastCount--}if(s.lastCount==-1||s.lastCount>0){s.curPageIndex=0;s.isPlaying=true;s.updateStatus()}else{s.curPageIndex=s.maxPageIndex;s.isPlaying=false;s.updateStatus()}}}});var r=flipbookMM_events_EventCenter.getInstance();r.addEventListener(flipbookMM_events_EventConst.PAGE_CURRENT,this,function(e){s.curPageIndex=js_Boot.__cast(e._data._object,Int)});r.addEventListener(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){if(s.isPlaying==false){s.isPlaying=true;s.updateStatus()}}else if(t=="off"){if(s.isPlaying==true){s.isPlaying=false;s.updateStatus()}}});r=null;this.div.addEventListener("click",function(e){if(s.isPlaying){s.isPlaying=false}else{s.isPlaying=true}if(s.curPageIndex==s.maxPageIndex){s.curPageIndex=0}if(s.loopCount!=-1){s.lastCount=1}s.updateStatus()});this.updateStatus()};$hxClasses["flipbookMM.toolbar.autoPlay.AutoPlayJs"]=flipbookMM_toolbar_autoPlay_AutoPlayJs;flipbookMM_toolbar_autoPlay_AutoPlayJs.__name__=["flipbookMM","toolbar","autoPlay","AutoPlayJs"];flipbookMM_toolbar_autoPlay_AutoPlayJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_autoPlay_AutoPlayJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{playUrl:null,pauseUrl:null,playBtn:null,pauseBtn:null,isPlaying:null,timer:null,curPageIndex:null,maxPageIndex:null,intervalSecond:null,loopCount:null,lastCount:null,updateBgAlpha:function(e){this.playBtn.updateBgAlpha(e);this.pauseBtn.updateBgAlpha(e)},updateStatus:function(){if(this.isPlaying){this.pauseBtn.set_visible(true);this.playBtn.set_visible(false);this.timer.start()}else{this.pauseBtn.set_visible(false);this.playBtn.set_visible(true);this.timer.stop()}},__class__:flipbookMM_toolbar_autoPlay_AutoPlayJs});var flipbookMM_toolbar_bar_AutoLayout=function(){this.logHeight=0;this.allList=[];this.leftList=[];this.rightList=[];this.leftExpandList=[];this.rightExpandList=[];this.getEnabledItem()};$hxClasses["flipbookMM.toolbar.bar.AutoLayout"]=flipbookMM_toolbar_bar_AutoLayout;flipbookMM_toolbar_bar_AutoLayout.__name__=["flipbookMM","toolbar","bar","AutoLayout"];flipbookMM_toolbar_bar_AutoLayout.getInstance=function(){if(flipbookMM_toolbar_bar_AutoLayout.instance==null){flipbookMM_toolbar_bar_AutoLayout.instance=new flipbookMM_toolbar_bar_AutoLayout}return flipbookMM_toolbar_bar_AutoLayout.instance};flipbookMM_toolbar_bar_AutoLayout.prototype={layoutWidth:null,layoutHeight:null,allList:null,leftList:null,leftExpandList:null,rightList:null,rightExpandList:null,isLog:null,logWidth:null,logHeight:null,isThumbnail:null,isSearchText:null,getEnabledItem:function(){var e=flipbookMM_config_ConfigSetting.getInstance();if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.BookMarkButtonEnable))){this.allList.push(1)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.ThumbnailButtonEnable))){this.allList.push(2);this.isThumbnail=true}else{this.isThumbnail=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SearchTextButtonEnable))){this.allList.push(3);this.isSearchText=true}else{this.isSearchText=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.TxtViewButtionEnable))){this.allList.push(11)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SoundButtonEnable))){this.allList.push(4)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.NavigateFlipButtonEnable))){this.allList.push(6)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.AutoFlipButtonEnable))){this.allList.push(7)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.LogoEnable))){this.allList.push(8);this.isLog=true}else{this.isLog=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.DownloadEnable))){this.allList.push(9)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.PrintEnable))){this.allList.push(10)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SocialShareButtonEnable))){this.allList.push(5)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.ZoomButtonEnable))){this.allList.push(12)}},autoAssign:function(){var e=0;var t=0;var i=this.allList;while(t0){this.leftList.push(-1);if(this.isLog){this.leftList.push(8)}this.leftExpandList.push(0);var a=0;var r=this.allList;while(a0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 5:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 7:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 9:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 10:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 11:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 12:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;default:}}}},updateLogWidht:function(e){this.logWidth=e},resize:function(e,t){this.layoutWidth=e;this.layoutHeight=t;this.leftList.splice(0,this.leftList.length);this.leftExpandList.splice(0,this.leftExpandList.length);this.rightList.splice(0,this.rightList.length);this.rightExpandList.splice(0,this.rightExpandList.length);this.autoAssign()},__class__:flipbookMM_toolbar_bar_AutoLayout};var flipbookMM_toolbar_bar_BottomBarJs=function(e,t,i,s,a,r){if(r==null){r=1}base_baseSprite_SpriteJs.call(this);this.color=s;this.botAlp=a;this.pageTotalNum=i;this.isSending=true;this.back=new base_baseSprite_SpriteJs;this.div.appendChild(this.back.div);this.back.setBackgroundColor(this.color);this.line=new base_baseSprite_SpriteJs;this.div.appendChild(this.line.div);this.slide=new flipbookMM_toolbar_bar_SlideObjectJs(e,t,i,this.color,r);this.div.appendChild(this.slide.div);this.resize(e,t)};$hxClasses["flipbookMM.toolbar.bar.BottomBarJs"]=flipbookMM_toolbar_bar_BottomBarJs;flipbookMM_toolbar_bar_BottomBarJs.__name__=["flipbookMM","toolbar","bar","BottomBarJs"];flipbookMM_toolbar_bar_BottomBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_BottomBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{bottomBarWidth:null,bottomBarHeight:null,color:null,botAlp:null,back:null,slide:null,isSending:null,pageTotalNum:null,line:null,resize:function(e,t){this.bottomBarWidth=e;this.bottomBarHeight=t;this.back.set_width(this.bottomBarWidth);this.back.set_height(this.bottomBarHeight);this.back.div.style.opacity=this.botAlp;this.line.set_width(this.bottomBarWidth);this.line.set_height(1);this.line.div.style.backgroundColor="#cccccc";this.slide.resize(this.bottomBarWidth,this.bottomBarHeight);this.slide.set_x(this.bottomBarWidth/6/2)},__class__:flipbookMM_toolbar_bar_BottomBarJs});var flipbookMM_toolbar_bar_LefeNavigationBarJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.backW=79;this.backH=235.5;this.back=new base_baseSprite_SpriteJs;this.back.set_width(this.backW);this.back.set_height(this.backH);this.back.setBackgroundColor(8684676);this.back.div.style.borderRadius=5+"px";this.back.set_visible(true);this.back.div.style.opacity="0";this.set_width(this.backW);this.set_height(this.backH);this.div.appendChild(this.back.div);var e="./img/toolbarImg/big_navigation_left.png";this.nav=new flipbookMM_toolbar_IconBtnSpriteJs(e,11184810,0,$bind(this,this.loadCom));this.nav.updateBgAlpha(0);this.div.appendChild(this.nav.div);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,new flipbookMM_events_EventObject(t,null,null)));e=null};this.div.onmouseover=function(){t.back.div.style.opacity=Std.string(.5)};this.div.onmouseout=function(){t.back.div.style.opacity="0"}};$hxClasses["flipbookMM.toolbar.bar.LefeNavigationBarJs"]=flipbookMM_toolbar_bar_LefeNavigationBarJs;flipbookMM_toolbar_bar_LefeNavigationBarJs.__name__=["flipbookMM","toolbar","bar","LefeNavigationBarJs"];flipbookMM_toolbar_bar_LefeNavigationBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_LefeNavigationBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{nav:null,backW:null,backH:null,back:null,loadCom:function(){this.nav.set_x((this.backW-this.nav.iconW)/2);this.nav.set_y((this.backH-this.nav.iconH)/2)},__class__:flipbookMM_toolbar_bar_LefeNavigationBarJs});var flipbookMM_toolbar_bar_RightNavigationBarJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.backW=79;this.backH=235.5;this.back=new base_baseSprite_SpriteJs;this.back.set_width(this.backW);this.back.set_height(this.backH);this.back.setBackgroundColor(8684676);this.back.div.style.borderRadius=5+"px";this.back.set_visible(true);this.back.div.style.opacity="0";this.set_width(this.backW);this.set_height(this.backH);this.div.appendChild(this.back.div);var e="./img/toolbarImg/big_navigation_right.png";this.nav=new flipbookMM_toolbar_IconBtnSpriteJs(e,11184810,0,$bind(this,this.loadCom));this.nav.updateBgAlpha(0);this.div.appendChild(this.nav.div);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,new flipbookMM_events_EventObject(t,null,null)));e=null};this.div.onmouseover=function(){t.back.div.style.opacity=Std.string(.5)};this.div.onmouseout=function(){t.back.div.style.opacity="0"}};$hxClasses["flipbookMM.toolbar.bar.RightNavigationBarJs"]=flipbookMM_toolbar_bar_RightNavigationBarJs;flipbookMM_toolbar_bar_RightNavigationBarJs.__name__=["flipbookMM","toolbar","bar","RightNavigationBarJs"];flipbookMM_toolbar_bar_RightNavigationBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_RightNavigationBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{nav:null,backW:null,backH:null,back:null,loadCom:function(){this.nav.set_x((this.backW-this.nav.iconW)/2);this.nav.set_y((this.backH-this.nav.iconH)/2)},__class__:flipbookMM_toolbar_bar_RightNavigationBarJs});var flipbookMM_toolbar_bar_SlideObjectJs=function(e,t,i,s,a){if(a==null){a=1}var r=this;base_baseSprite_SpriteJs.call(this);this.maxNum=i;this.progress=0;this.isRecord=false;this.maxRecentCount=10;if(this.maxRecentCount>this.maxNum){this.maxRecentCount=this.maxNum}this.curPageIndex=a;this.recentViewPage=[];this.recentViewPage.push(this.curPageIndex);this.curRecentIndex=0;var n=flipbookMM_config_ConfigSetting.getInstance();this.lineLeftColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.BottomSlideActionColor));this.lineRightColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.BottomSlideDefaultColor));this.circleColor=this.lineLeftColor;this.textActionColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.TextResponsivColor));this.textDisplayColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.TextDefaultColor));this.styleStr=n.get(flipbookMM_config_ConfigKey.DefaultBookStyle);n=null;this.rect=new base_baseSprite_SpriteJs;this.rect.div.style.cursor="pointer";this.div.appendChild(this.rect.div);this.back=new base_baseSprite_SpriteJs;this.rect.div.appendChild(this.back.div);this.lineL=new base_baseSprite_SpriteJs;this.lineL.set_width(0);this.lineL.set_height(2);this.lineL.setBackgroundColor(this.lineLeftColor);this.rect.div.appendChild(this.lineL.div);this.lineR=new base_baseSprite_SpriteJs;this.lineR.set_width(0);this.lineR.set_height(2);this.lineR.setBackgroundColor(this.lineRightColor);this.rect.div.appendChild(this.lineR.div);this.circle=new base_baseSprite_SpriteJs;this.circle.set_width(10);this.circle.set_height(10);this.circle.div.style.borderRadius=5+"px";this.circle.setBackgroundColor(this.circleColor);this.rect.div.appendChild(this.circle.div);this.centerTag=new base_baseSprite_SpriteJs;this.centerTag.div.style.textAlign="center";this.centerTag.div.style.whiteSpace="nowrap";this.div.appendChild(this.centerTag.div);this.leftTag=new base_baseSprite_SpriteJs;this.leftTag.div.style.textAlign="left";this.leftTag.div.style.cursor="pointer";this.div.appendChild(this.leftTag.div);this.leftTag.set_width(150);this.leftTag.div.addEventListener("click",function(e){if(r.curRecentIndex>0){r.isRecord=true;r.curRecentIndex--;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,r.recentViewPage[r.curRecentIndex],null)));t=null}e.stopPropagation()});this.rightTag=new base_baseSprite_SpriteJs;this.rightTag.div.style.textAlign="right";this.rightTag.div.style.cursor="pointer";this.div.appendChild(this.rightTag.div);this.rightTag.set_width(150);this.rightTag.div.addEventListener("click",function(e){if(r.curRecentIndex=0){r.isRecord=true;r.curRecentIndex++;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,r.recentViewPage[r.curRecentIndex],null)));t=null}e.stopPropagation()});this.circleClickFlag=0;this.isSendGotoPage=false;this.resize(e,t);this.rect.div.onmousedown=function(e){r.circleClickFlag=1};this.rect.div.onmousedown=function(e){r.circleClickFlag=1};this.rect.div.onmouseup=function(e){if(r.circleClickFlag==1){r.circleClickFlag=2}if(r.circleClickFlag>=1){r.circleClickFlag=0;r.updateSlideBar(e.pageX-r.slideStartX);r.isSendGotoPage=true;var t=1+(r.progress*(r.maxNum-1)+.5|0);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_HIDE,new flipbookMM_events_EventObject(r,null,null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,t,null)));i=null}};this.rect.div.onmousemove=function(e){if(r.circleClickFlag==1){r.updateSlideBar(e.pageX-r.slideStartX);var t=1+(r.progress*(r.maxNum-1)+.5|0);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,new flipbookMM_events_EventObject(r,t,null)));i=null}};this.rect.div.addEventListener("touchmove",function(e){var t=e.targetTouches[0].pageX;r.updateSlideBar(t-r.slideStartX);var i=1+(r.progress*(r.maxNum-1)+.5|0);var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,new flipbookMM_events_EventObject(r,i,null)));s=null},false);this.rect.div.addEventListener("touchend",function(e){var t=e.targetTouches[0];r.circleClickFlag=0;if(t!=null){r.updateSlideBar(t.pageX-r.slideStartX)}r.isSendGotoPage=true;var i=1+(r.progress*(r.maxNum-1)+.5|0);var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_HIDE,new flipbookMM_events_EventObject(r,null,null)));s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,i,null)));s=null});var _=flipbookMM_events_EventCenter.getInstance();_.addEventListener(flipbookMM_events_EventConst.PAGE_CURRENT,this,function(e){r.curPageIndex=js_Boot.__cast(e._data._object,Int);if(r.isSendGotoPage==false){if(r.maxNum>1){r.upBarProgress((r.curPageIndex-1)/(r.maxNum-1))}else{r.upBarProgress(0)}}else{r.isSendGotoPage=false}if(r.isRecord){r.isRecord=false}else{r.recentViewPage.push(r.curPageIndex);if(r.recentViewPage.length>r.maxRecentCount){r.recentViewPage.shift()}r.curRecentIndex=r.recentViewPage.length-1}r.updateTextStatus()});_=null};$hxClasses["flipbookMM.toolbar.bar.SlideObjectJs"]=flipbookMM_toolbar_bar_SlideObjectJs;flipbookMM_toolbar_bar_SlideObjectJs.__name__=["flipbookMM","toolbar","bar","SlideObjectJs"];flipbookMM_toolbar_bar_SlideObjectJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_SlideObjectJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{slideWidth:null,slideHeight:null,slideStartX:null,maxNum:null,curPageIndex:null,circle:null,lineL:null,lineR:null,rect:null,back:null,circleClickFlag:null,isSendGotoPage:null,centerTag:null,leftTag:null,rightTag:null,lineLeftColor:null,lineRightColor:null,circleColor:null,textActionColor:null,textDisplayColor:null,recentViewPage:null,maxRecentCount:null,curRecentIndex:null,isRecord:null,styleStr:null,progress:null,updateSlideBar:function(e){var t=e;if(t<0){t=0}else if(t>this.slideWidth){t=this.slideWidth}this.lineL.set_x(0);this.lineL.set_y(0);this.lineL.set_width(t);this.lineR.set_x(t);this.lineR.set_y(0);this.lineR.set_width(this.slideWidth-t);this.circle.set_x(t);this.progress=t/this.slideWidth},upBarProgress:function(e){this.progress=e;var t=this.slideWidth*this.progress;this.lineL.set_x(0);this.lineL.set_y(0);this.lineL.set_width(t);this.lineR.set_x(t);this.lineR.set_y(0);this.lineR.set_width(this.slideWidth-t);this.circle.set_x(t);this.circle.set_y(-4)},updateTextStatus:function(){if(this.curRecentIndex>0){this.leftTag.set_text("Back to page "+this.recentViewPage[this.curRecentIndex-1]);this.leftTag.set_textColor(this.textActionColor)}else{this.leftTag.set_text(" ");this.leftTag.set_textColor(this.textDisplayColor)}if(this.curRecentIndex0){this.rightTag.set_text("Go to page "+this.recentViewPage[this.curRecentIndex+1]);this.rightTag.set_textColor(this.textActionColor)}else{var e=this.maxNum-this.curPageIndex;var t;if(e>1){t=" pages left"}else{t=" page left"}this.rightTag.set_text(e+t);this.rightTag.set_textColor(this.textDisplayColor)}if(this.styleStr=="Flip"||this.styleStr=="Flip:Hardcover"||this.styleStr=="Flip:3D"){if(openfl_Lib.get_current().stage.stageWidth>=openfl_Lib.get_current().stage.stageHeight){if(this.curPageIndex==1){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex=openfl_Lib.get_current().stage.stageHeight){if(this.curPageIndex==this.maxNum&&this.maxNum==1){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex=0){this.data[s.parent].extend=true}}};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkConfigDecode"]=flipbookMM_toolbar_bookMark_BookMarkConfigDecode;flipbookMM_toolbar_bookMark_BookMarkConfigDecode.__name__=["flipbookMM","toolbar","bookMark","BookMarkConfigDecode"];flipbookMM_toolbar_bookMark_BookMarkConfigDecode.prototype={fast:null,data:null,curOrder:null,xmlParse:function(e){var t=0;if(e.hasNode.resolve("node")!=false){t=this.curOrder-1}var i=e.get_elements();while(i.hasNext()){var s=i.next();if(s.get_name()=="node"&&s.get_innerHTML().length>0){var a=new flipbookMM_toolbar_bookMark_MarkDataType;var r=s.get_elements();while(r.hasNext()){var n=r.next();var _=n.get_name();switch(_){case"child":this.xmlParse(n);break;case"index":a.link=Std.parseInt(n.get_innerData());break;case"label":a.text=n.get_innerData();break;case"level":a.level=Std.parseInt(n.get_innerData());a.id=this.curOrder;a.parent=t;this.data.push(a);this.curOrder++;break;default:}}}}},__class__:flipbookMM_toolbar_bookMark_BookMarkConfigDecode};var flipbookMM_toolbar_bookMark_BookMarkConfigInit=function(){};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkConfigInit"]=flipbookMM_toolbar_bookMark_BookMarkConfigInit;flipbookMM_toolbar_bookMark_BookMarkConfigInit.__name__=["flipbookMM","toolbar","bookMark","BookMarkConfigInit"];flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance=function(){if(flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance==null){flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance=new flipbookMM_toolbar_bookMark_BookMarkConfigInit}return flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance};flipbookMM_toolbar_bookMark_BookMarkConfigInit.prototype={markXml:null,setXmlData:function(e){this.markXml=e},getXmlData:function(){return this.markXml},__class__:flipbookMM_toolbar_bookMark_BookMarkConfigInit};var flipbookMM_toolbar_bookMark_BookMarkNode=function(e,t,i){openfl_display_Sprite.call(this);this.nodeData=i;this.extendStatus=false;this.selfStatus=false;this.extendShell=new openfl_display_Sprite;this.addChild(this.extendShell);this.extendStatus=true;this.clickFlag=0;this.offsetX=10;this.nodeContStyle=new openfl_display_Sprite;this.addChild(this.nodeContStyle);this.line=new openfl_display_Sprite;this.addChild(this.line);this.extendSHellBack=new openfl_display_Sprite;this.extendShell.addChild(this.extendSHellBack);this.extendMark=new openfl_display_Sprite;this.extendShell.addChild(this.extendMark);this.nodeContent=new openfl_display_Sprite;this.addChild(this.nodeContent);this.nodeContentBack=new openfl_display_Sprite;this.nodeContent.addChild(this.nodeContentBack);this.loadText();this.resize(e,t);this.addListEvent()};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkNode"]=flipbookMM_toolbar_bookMark_BookMarkNode;flipbookMM_toolbar_bookMark_BookMarkNode.__name__=["flipbookMM","toolbar","bookMark","BookMarkNode"];flipbookMM_toolbar_bookMark_BookMarkNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_bookMark_BookMarkNode.prototype=$extend(openfl_display_Sprite.prototype,{extendMark:null,extendShell:null,extendSHellBack:null,nodeText:null,pageNum:null,nodeContent:null,nodeContStyle:null,nodeContentBack:null,nodeTextMask:null,line:null,nodeWidth:null,nodeHeight:null,offsetX:null,nodeData:null,clickFlag:null,extendStatus:null,selfStatus:null,loadText:function(){this.nodeText=new base_baseSprite_TextSprite;if(this.nodeData.level==1){this.nodeText.format.bold=true;this.nodeText.textField.setTextFormat(this.nodeText.format)}this.nodeText.set_text(this.nodeData.text);this.nodeText.set_textColor(16777215);this.nodeContent.addChild(this.nodeText);this.pageNum=new base_baseSprite_TextSprite;this.pageNum.set_text(Std.string("page "+this.nodeData.link));this.pageNum.set_textColor(13421772);this.nodeContent.addChild(this.pageNum);this.nodeTextMask=new openfl_display_Shape;this.nodeText.addChild(this.nodeTextMask);this.nodeText.set_mask(this.nodeTextMask)},updateExtendShape:function(e){return},updatePosition:function(){this.extendMark.set_x(this.offsetX+this.nodeHeight*(this.nodeData.level-1));this.extendMark.set_y((this.nodeHeight-this.extendMark.get_height())/2);this.extendSHellBack.get_graphics().clear();this.extendSHellBack.get_graphics().beginFill(16777215);this.extendSHellBack.get_graphics().drawRect(0,0,this.extendMark.get_x()+this.extendMark.get_width(),this.nodeHeight);this.extendSHellBack.get_graphics().endFill();this.extendSHellBack.set_alpha(0);this.nodeContent.set_x(this.extendMark.get_width()+this.extendMark.get_x());this.nodeText.set_x(0);this.nodeText.set_y((this.nodeHeight-this.pageNum.get_height())/2);this.pageNum.set_x(this.nodeWidth-this.nodeContent.get_x()-this.offsetX-this.pageNum.get_width());this.pageNum.set_y((this.nodeHeight-this.pageNum.get_height())/2)},addListEvent:function(){var i=this;this.nodeData.extend=false;if(this.nodeData.extend){this.extendShell.addEventListener("click",function(e){e.stopPropagation();i.updateExtendShape(!i.extendStatus);var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.UPDATE_BOOK_MARK,new flipbookMM_events_EventObject(i,null,null)));t=null});this.extendShell.addEventListener("mouseDown",function(e){i.extendSHellBack.set_alpha(.5)});this.extendShell.addEventListener("mouseUp",function(e){i.extendSHellBack.set_alpha(0)});this.extendShell.addEventListener("mouseOut",function(e){i.extendSHellBack.set_alpha(0)})}this.addEventListener("click",function(e){e.stopPropagation()});this.addEventListener("mouseDown",function(e){i.clickFlag=1});this.addEventListener("mouseUp",function(e){if(i.clickFlag==1){e.stopPropagation();var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(i,i.nodeData.link,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"on",null)));t=null}i.clickFlag=0});this.addEventListener("mouseOut",function(e){i.clickFlag=0})},resize:function(e,t){this.nodeWidth=e;this.nodeHeight=t;this.line.get_graphics().clear();this.line.get_graphics().beginFill(8947848);this.line.get_graphics().drawRect(0,0,this.nodeWidth,1);this.line.set_alpha(.3);this.line.set_x(0);this.line.set_y(this.nodeHeight);this.updateExtendShape(this.extendStatus);this.updatePosition();var i=this.nodeWidth-this.offsetX-this.nodeContent.get_x()-this.pageNum.get_width();this.nodeContentBack.get_graphics().clear();this.nodeContentBack.get_graphics().beginFill(255);this.nodeContentBack.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.nodeContentBack.get_graphics().endFill();this.nodeContentBack.set_alpha(0);this.nodeTextMask.get_graphics().clear();this.nodeTextMask.get_graphics().beginFill(65280);this.nodeTextMask.get_graphics().drawRect(0,0,i-this.offsetX,this.nodeHeight);this.nodeTextMask.get_graphics().endFill();this.nodeTextMask.set_alpha(0);this.nodeContStyle.get_graphics().clear();this.nodeContStyle.get_graphics().beginFill(16777215);this.nodeContStyle.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.nodeContStyle.get_graphics().endFill();this.nodeContStyle.set_alpha(.5);this.nodeContStyle.set_visible(false)},__class__:flipbookMM_toolbar_bookMark_BookMarkNode});var flipbookMM_toolbar_bookMark_BookMarkUI=function(e,t,i,s){base_baseSprite_TouchSprite.call(this);this.backColor=i;this.backALpha=s;this.back=new openfl_display_Sprite;this.addChild(this.back);this.bookMarkPanel=new openfl_display_Sprite;this.addChild(this.bookMarkPanel);this.tray=new openfl_display_Sprite;this.bookMarkPanel.addChild(this.tray);this.tableMask=new openfl_display_Shape;this.addChild(this.tableMask);this.bookMarkPanel.set_mask(this.tableMask);this.tableContent=[];this.displayNode=new haxe_ds_IntMap;this.bufferRow=1;this.displayHeight=0;this.preTrayPosition=new openfl_geom_Point;this.resize(e,t);this.initData();this.curRowNum=-1;this.updateShowData(0);this.addListEvent()};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkUI"]=flipbookMM_toolbar_bookMark_BookMarkUI;flipbookMM_toolbar_bookMark_BookMarkUI.__name__=["flipbookMM","toolbar","bookMark","BookMarkUI"];flipbookMM_toolbar_bookMark_BookMarkUI.__super__=base_baseSprite_TouchSprite;flipbookMM_toolbar_bookMark_BookMarkUI.prototype=$extend(base_baseSprite_TouchSprite.prototype,{tableWidth:null,tableHeight:null,unitWidth:null,unitHeight:null,maxRow:null,bufferRow:null,displayHeight:null,curRowNum:null,displayNode:null,tray:null,bookMarkPanel:null,back:null,backColor:null,backALpha:null,tableMask:null,tableContent:null,markDecode:null,preTrayPosition:null,initData:function(){var e=flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance();if(e.getXmlData()!=null){var t=new haxe_xml_Fast(e.getXmlData());this.markDecode=new flipbookMM_toolbar_bookMark_BookMarkConfigDecode(t);var i=0;var s=this.markDecode.data.length;while(i=this.bufferRow){i-=this.bufferRow}var s=i;var a=i+this.maxRow+this.bufferRow+1;while(s=0){if(!this.displayNode.h.hasOwnProperty(r)){this.displayNode.h[r]=this.tableContent[r];var n=this.displayNode.h[r];this.tray.addChild(n);n.set_x(0);n.set_y(r*this.unitHeight);n=null}}}var _=this.displayNode.keys();while(_.hasNext()){var o=_.next();if(oi+this.maxRow+this.bufferRow){this.tray.removeChild(this.displayNode.h[o]);this.displayNode.remove(o)}}},resize:function(e,t){this.tableWidth=e;this.tableHeight=t;this.unitWidth=this.tableWidth;this.unitHeight=40*window.devicePixelRatio;this.maxRow=this.tableHeight/this.unitHeight|0;this.tableMask.get_graphics().clear();this.tableMask.get_graphics().beginFill(255);this.tableMask.get_graphics().drawRect(0,0,this.tableWidth,this.tableHeight);this.tableMask.get_graphics().endFill();this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.backColor);this.back.get_graphics().drawRect(0,0,this.tableWidth,this.tableHeight);this.back.get_graphics().endFill();this.back.set_alpha(this.backALpha);var i=0;var s=this.tableContent;while(i0){this.tray.removeChildren();this.displayNode=null;this.displayNode=new haxe_ds_IntMap;var r=this.curRowNum;this.curRowNum=-1;this.updateShowData(r)}},addListEvent:function(){var s=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.UPDATE_BOOK_MARK,this,function(e){});e=null;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=s.tray.get_y();t+=e.get_touchSlidePoint().y*4;if(s.displayHeight<=s.tableHeight){t=0}else if(t0){t=0}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);s.updateShowData(-t/s.unitHeight|0)})});this.addEventListener("mouseDown",function(e){s.preTrayPosition.y=s.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=s.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||s.displayHeight<=s.tableHeight){s.tray.set_y(0)}else if(t0){t=0}}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);s.updateShowData(-t/s.unitHeight|0)})})},__class__:flipbookMM_toolbar_bookMark_BookMarkUI});var flipbookMM_toolbar_download_DownloadJs=function(e,t){var i="./img/toolbarImg/ic_file_download_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.onclick=function(){var e=flipbookMM_config_ConfigSetting.getInstance();var t=e.get(flipbookMM_config_ConfigKey.DownloadFileUrl);e=null;var i=encodeURI(t);openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}};$hxClasses["flipbookMM.toolbar.download.DownloadJs"]=flipbookMM_toolbar_download_DownloadJs;flipbookMM_toolbar_download_DownloadJs.__name__=["flipbookMM","toolbar","download","DownloadJs"];flipbookMM_toolbar_download_DownloadJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_download_DownloadJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_download_DownloadJs});var flipbookMM_toolbar_menu_BackBtn=function(e,t){var i=this;var s="./img/toolbarImg/ic_keyboard_arrow_left_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,s,e,t);this.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"on",null)));t=null})};$hxClasses["flipbookMM.toolbar.menu.BackBtn"]=flipbookMM_toolbar_menu_BackBtn;flipbookMM_toolbar_menu_BackBtn.__name__=["flipbookMM","toolbar","menu","BackBtn"];flipbookMM_toolbar_menu_BackBtn.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_menu_BackBtn.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_menu_BackBtn});var flipbookMM_toolbar_menu_SwitchBtnJs=function(e,t){var i=this;var s="./img/toolbarImg/ic_menu_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.menu.SwitchBtnJs"]=flipbookMM_toolbar_menu_SwitchBtnJs;flipbookMM_toolbar_menu_SwitchBtnJs.__name__=["flipbookMM","toolbar","menu","SwitchBtnJs"];flipbookMM_toolbar_menu_SwitchBtnJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_menu_SwitchBtnJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_menu_SwitchBtnJs});var flipbookMM_toolbar_menu_SwitchMenu=function(e,t,i,s,a,r){if(s==null){s=1}var n=this;openfl_display_Sprite.call(this);this.pageNum=i;this.swtColor=a;this.swtAlp=r;var _=flipbookMM_config_ConfigSetting.getInstance();this.topButDefCol=Std.parseInt(_.get(flipbookMM_config_ConfigKey.ButtonDefaultColor));this.topButActCol=Std.parseInt(_.get(flipbookMM_config_ConfigKey.ButtonResponsiveColor));_=null;this.curTitle=s;this.back=new openfl_display_Sprite;this.addChild(this.back);this.exitAction=new flipbookMM_toolbar_menu_BackBtn(this.topButDefCol,this.swtColor);this.addChild(this.exitAction);this.autoLayout=flipbookMM_toolbar_bar_AutoLayout.getInstance();this.resize(e,t);this.exitAction.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(n,null,null)));t=null});if(this.bookmark!=null){this.bookmark.addEventListener("click",function(e){n.curTitle=1;n.updateMenuDisplay(n.curTitle)})}if(this.thumbnails!=null){this.thumbnails.addEventListener("click",function(e){n.curTitle=2;n.updateMenuDisplay(n.curTitle)})}if(this.searchText!=null){this.searchText.addEventListener("click",function(e){n.curTitle=3;n.updateMenuDisplay(n.curTitle)})}};$hxClasses["flipbookMM.toolbar.menu.SwitchMenu"]=flipbookMM_toolbar_menu_SwitchMenu;flipbookMM_toolbar_menu_SwitchMenu.__name__=["flipbookMM","toolbar","menu","SwitchMenu"];flipbookMM_toolbar_menu_SwitchMenu.__super__=openfl_display_Sprite;flipbookMM_toolbar_menu_SwitchMenu.prototype=$extend(openfl_display_Sprite.prototype,{swtBarWidth:null,swtBarHeight:null,titleHeight:null,swtColor:null,swtAlp:null,topButDefCol:null,topButActCol:null,pageNum:null,exitAction:null,back:null,bookmark:null,thumbnails:null,searchText:null,curTitle:null,switchUI:null,autoLayout:null,updateMenuDisplay:function(e){this.updateIconColor(e);this.switchUI.updateCurStatus(e)},setMenuVisible:function(e,t){if(t==null){t=-1}this.set_visible(e);if(e){if(t>0){this.updateMenuDisplay(t)}else{this.updateMenuDisplay(this.curTitle)}}else{this.switchUI.setUIVisible(e)}},updateIconColor:function(e){var t=this.autoLayout.leftExpandList.length;var i=1;var s=this.topButActCol;if(t>1){var a=0;var r=this.autoLayout.leftExpandList;while(a0&&p.length>0){var v=window.document.createElement("img");v.src=p;v.className="imgStyle";g.appendChild(v);m.style.position="absolute";m.style.left="0px";m.style.top="0px";m.src=d;m.className="imgStyle";m.onload=function(){o+=1;r.innerHTML="loading page "+o;if(o==l.pageList.length){a.noOPenfl.removeChild(t.div);t=null;window.print();haxe_Timer.delay(function(){a.body.removeChild(_);a=null;_=null;e.isloading=false},1e3)}};g.appendChild(m)}else{m.src=f;m.className="imgStyle";m.onload=function(){o+=1;r.innerHTML="loading page "+o;if(o==l.pageList.length){a.noOPenfl.removeChild(t.div);t=null;window.print();haxe_Timer.delay(function(){a.body.removeChild(_);a=null;_=null;e.isloading=false},1e3)}};g.appendChild(m)}_.appendChild(g)}},myPrint:function(){this.createPrintContent()},__class__:flipbookMM_toolbar_print_PrintJs});var flipbookMM_toolbar_searchText_InputContentJs=function(){var e=this;base_baseSprite_SpriteJs.call(this);this.input=window.document.createElement("input");this.div.appendChild(this.input);this.input.style.fontFamily="Arial";this.input.style.fontSize="15px";this.input.style.display="inline-block";this.input.style.setProperty("-web-kit-appearance","none");this.input.style.setProperty("-moz-appearance","none");this.input.style.setProperty("appearance","none");var t=flipbookMM_config_ConfigSetting.getInstance();var i=t.get(flipbookMM_config_ConfigKey.SearchTextBgColor);this.input.style.backgroundColor=t.ColorTrans(i);var s=t.get(flipbookMM_config_ConfigKey.ButtonDefaultColor);this.input.style.color=t.ColorTrans(s);var a=t.get(flipbookMM_config_ConfigKey.ButtonDefaultColor);this.input.style.borderColor=t.ColorTrans(a);this.input.style.borderRadius=5+"px";t=null;this.cancleBtn=window.document.createElement("img");this.cancleBtn.style.display="inline-block";this.cancleBtn.style.position="absolute";this.cancleBtn.src="./img/toolbarImg/ic_highlight_off_white_24dp.png";this.cancleBtn.onload=function(){e.cancleBtn.onload=null;e.div.appendChild(e.cancleBtn)};this.searchBtn=window.document.createElement("img");this.searchBtn.src="./img/toolbarImg/ic_search_white_24dp.png";this.searchBtn.style.display="inline-block";this.searchBtn.style.position="absolute";this.searchBtn.onload=function(){e.searchBtn.onload=null;e.div.appendChild(e.searchBtn)}};$hxClasses["flipbookMM.toolbar.searchText.InputContentJs"]=flipbookMM_toolbar_searchText_InputContentJs;flipbookMM_toolbar_searchText_InputContentJs.__name__=["flipbookMM","toolbar","searchText","InputContentJs"];flipbookMM_toolbar_searchText_InputContentJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_searchText_InputContentJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{input:null,searchBtn:null,cancleBtn:null,resize:function(e,t){this.input.style.width=e-60+"px";this.input.style.height=t+"px";this.input.style.lineHeight=t+"px";this.cancleBtn.style.top="6px";this.cancleBtn.style.right=10+"px";this.searchBtn.style.top="6px";this.searchBtn.style.paddingLeft=10+"px"},__class__:flipbookMM_toolbar_searchText_InputContentJs});var flipbookMM_toolbar_searchText_SearchText=function(e,t){var i="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,i,e,t)};$hxClasses["flipbookMM.toolbar.searchText.SearchText"]=flipbookMM_toolbar_searchText_SearchText;flipbookMM_toolbar_searchText_SearchText.__name__=["flipbookMM","toolbar","searchText","SearchText"];flipbookMM_toolbar_searchText_SearchText.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_searchText_SearchText.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_searchText_SearchText});var flipbookMM_toolbar_searchText_SearchTextType=function(){this.pageIndex=0;this.relativePosition=0;this.coreString=null;this.nearString=null};$hxClasses["flipbookMM.toolbar.searchText.SearchTextType"]=flipbookMM_toolbar_searchText_SearchTextType;flipbookMM_toolbar_searchText_SearchTextType.__name__=["flipbookMM","toolbar","searchText","SearchTextType"];flipbookMM_toolbar_searchText_SearchTextType.prototype={pageIndex:null,relativePosition:null,coreString:null,nearString:null,__class__:flipbookMM_toolbar_searchText_SearchTextType};var flipbookMM_toolbar_searchText_PageTextContentType=function(){this.index=0;this.content=null};$hxClasses["flipbookMM.toolbar.searchText.PageTextContentType"]=flipbookMM_toolbar_searchText_PageTextContentType;flipbookMM_toolbar_searchText_PageTextContentType.__name__=["flipbookMM","toolbar","searchText","PageTextContentType"];flipbookMM_toolbar_searchText_PageTextContentType.prototype={index:null,content:null,__class__:flipbookMM_toolbar_searchText_PageTextContentType};var flipbookMM_toolbar_searchText_CoreStrParameterType=function(){this.x=0;this.y=0;this.width=0;this.height=0};$hxClasses["flipbookMM.toolbar.searchText.CoreStrParameterType"]=flipbookMM_toolbar_searchText_CoreStrParameterType;flipbookMM_toolbar_searchText_CoreStrParameterType.__name__=["flipbookMM","toolbar","searchText","CoreStrParameterType"];flipbookMM_toolbar_searchText_CoreStrParameterType.prototype={x:null,y:null,width:null,height:null,__class__:flipbookMM_toolbar_searchText_CoreStrParameterType};var flipbookMM_toolbar_searchText_PageCoreStrPositonType=function(){this.positon=[];this.index=0};$hxClasses["flipbookMM.toolbar.searchText.PageCoreStrPositonType"]=flipbookMM_toolbar_searchText_PageCoreStrPositonType;flipbookMM_toolbar_searchText_PageCoreStrPositonType.__name__=["flipbookMM","toolbar","searchText","PageCoreStrPositonType"];flipbookMM_toolbar_searchText_PageCoreStrPositonType.prototype={positon:null,index:null,__class__:flipbookMM_toolbar_searchText_PageCoreStrPositonType};var flipbookMM_toolbar_searchText_SearchTextDecode=function(){this.pageTotalNum=0;this.pageContent=[];this.targetContent=[];this.targetContentPosition=[];this.pageTextIndex=[]};$hxClasses["flipbookMM.toolbar.searchText.SearchTextDecode"]=flipbookMM_toolbar_searchText_SearchTextDecode;flipbookMM_toolbar_searchText_SearchTextDecode.__name__=["flipbookMM","toolbar","searchText","SearchTextDecode"];flipbookMM_toolbar_searchText_SearchTextDecode.getInstance=function(){if(flipbookMM_toolbar_searchText_SearchTextDecode.instance==null){flipbookMM_toolbar_searchText_SearchTextDecode.instance=new flipbookMM_toolbar_searchText_SearchTextDecode}return flipbookMM_toolbar_searchText_SearchTextDecode.instance};flipbookMM_toolbar_searchText_SearchTextDecode.prototype={loader:null,textSrcFast:null,searchString:null,pageTotalNum:null,pageTextIndex:null,pageContent:null,targetContent:null,targetContentPosition:null,searchText:function(e){this.distoryMe();this.searchString=e;this.pageTotalNum=0;this.pageContent=[];this.targetContent=[];this.targetContentPosition=[];this.getXmlData()},distoryMe:function(){this.searchString=null;this.pageContent=null;this.targetContent=null;this.targetContentPosition=null;var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,new flipbookMM_events_EventObject(this,null,null)));e=null},getXmlData:function(){var i=this;var e=function(e){var t=Xml.parse(e.target.data);i.textSrcFast=new haxe_xml_Fast(t);i.loader.destroyMe();i.loader=null;i.searchStr()};var t=function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(i,null,null)));t=null};this.loader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKTEXT_FILENAME,e,null,t)},searchStr:function(){var e=null;if(this.textSrcFast.hasNode.resolve("Search")){if(this.textSrcFast.node.resolve("Search").hasNode.resolve("pages")){e=this.textSrcFast.node.resolve("Search").node.resolve("pages");if(e.get_innerHTML().length>0){if(e.has.resolve("Count")){this.pageTotalNum=Std.parseInt(e.att.resolve("Count"))}var t=e.get_elements();while(t.hasNext()){var i=t.next();var s=new flipbookMM_toolbar_searchText_PageTextContentType;s.index=Std.parseInt(i.att.resolve("Index"));s.content=i.get_innerData();this.pageContent.push(s);this.pageTextIndex.push(s.index);s=null}var a=0;var r=this.pageTotalNum;while(a0){this.coreStrPositionParse(1)}}}}e=null},coreStrContentParse:function(e){if(e0){if(t.indexOf("\r\n")!=-1){i="\r\n"}else{if(t.indexOf("\r")!=-1){i="\r"}if(t.indexOf("\n")!=-1){i="\n"}}t=StringTools.replace(t,i,",");var a=t.split(",");var r=0;var n=g.targetContent.length;while(r0){var u=new flipbookMM_toolbar_searchText_PageCoreStrPositonType;u.index=d;u.positon=s;g.targetContentPosition.push(u);s=null;u=null}if(d==g.pageTotalNum){var f=flipbookMM_events_EventCenter.getInstance();f.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(g,null,null)));f=null}else{m+=1;g.coreStrPositionParse(m)}t=null}else if(d==g.pageTotalNum){var p=flipbookMM_events_EventCenter.getInstance();p.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(g,null,null)));p=null}else{m+=1;g.coreStrPositionParse(m)}v.destroyMe();v=null};if(this.pageTextIndex.indexOf(d)!=-1){var t="./files/texts/text"+d+".xml";v=new base_baseLoad_LoadData(t,e)}else if(d==this.pageTotalNum){var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(this,null,null)));i=null}else{m+=1;this.coreStrPositionParse(m)}},__class__:flipbookMM_toolbar_searchText_SearchTextDecode};var flipbookMM_toolbar_searchText_SearchTextJs=function(e,t){if(e==null){e=16777215}var i=this;var s="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,3,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.searchText.SearchTextJs"]=flipbookMM_toolbar_searchText_SearchTextJs;flipbookMM_toolbar_searchText_SearchTextJs.__name__=["flipbookMM","toolbar","searchText","SearchTextJs"];flipbookMM_toolbar_searchText_SearchTextJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_searchText_SearchTextJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_searchText_SearchTextJs});var flipbookMM_toolbar_searchText_SearchTextNode=function(e,t,i){var s=this;openfl_display_Sprite.call(this);this.clickFlag=0;this.offsetX=10;this.nodeContent=new openfl_display_Sprite;this.addChild(this.nodeContent);this.nodeContentBack=new openfl_display_Sprite;this.nodeContent.addChild(this.nodeContentBack);this.searchContStyle=new openfl_display_Sprite;this.nodeContent.addChild(this.searchContStyle);this.pageId=new base_baseSprite_TextSprite("page "+(i.pageIndex==null?"null":""+i.pageIndex));this.pageId.set_textColor(16777215);this.nodeContent.addChild(this.pageId);this.nearStr=new base_baseSprite_TextSprite(i.nearString);this.nearStr.set_textColor(13421772);this.nodeContent.addChild(this.nearStr);this.nearStrMask=new openfl_display_Shape;this.nearStr.addChild(this.nearStrMask);this.nearStr.set_mask(this.nearStrMask);this.line=new openfl_display_Sprite;this.addChild(this.line);this.resize(e,t);this.nodeContent.addEventListener("mouseDown",function(e){s.clickFlag=1});this.nodeContent.addEventListener("mouseUp",function(e){if(s.clickFlag==1){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(s,i.pageIndex,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"on",null)));t=null}s.clickFlag=0});this.nodeContent.addEventListener("mouseOut",function(e){s.clickFlag=0})};$hxClasses["flipbookMM.toolbar.searchText.SearchTextNode"]=flipbookMM_toolbar_searchText_SearchTextNode;flipbookMM_toolbar_searchText_SearchTextNode.__name__=["flipbookMM","toolbar","searchText","SearchTextNode"];flipbookMM_toolbar_searchText_SearchTextNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_searchText_SearchTextNode.prototype=$extend(openfl_display_Sprite.prototype,{nodeWidth:null,nodeHeight:null,offsetX:null,pageId:null,nearStr:null,nodeContent:null,nodeContentBack:null,nearStrMask:null,searchContStyle:null,line:null,clickFlag:null,resize:function(e,t){this.nodeWidth=e;this.nodeHeight=t;this.nearStr.set_x(0);this.nearStr.set_y((this.nodeHeight-this.pageId.get_height())/2);this.pageId.set_x(this.nodeWidth-this.pageId.get_width()-this.offsetX);this.pageId.set_y(this.nearStr.get_y());this.line.get_graphics().clear();this.line.get_graphics().beginFill(8947848);this.line.get_graphics().drawRect(0,0,this.nodeWidth,1);this.line.set_alpha(.3);this.line.set_x(0);this.line.set_y(this.nodeHeight);this.searchContStyle.get_graphics().clear();this.searchContStyle.get_graphics().beginFill(16777215);this.searchContStyle.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.searchContStyle.get_graphics().endFill();this.searchContStyle.set_alpha(.6);this.searchContStyle.set_x(0);this.searchContStyle.set_y(0);this.searchContStyle.set_visible(false);var i=this.nodeWidth-this.nodeContent.get_x()-this.offsetX-this.pageId.get_width();this.nodeContentBack.get_graphics().clear();this.nodeContentBack.get_graphics().beginFill(65280);this.nodeContentBack.get_graphics().drawRect(0,0,i,this.nodeHeight);this.nodeContentBack.get_graphics().endFill();this.nodeContentBack.set_alpha(0);this.nearStrMask.get_graphics().clear();this.nearStrMask.get_graphics().beginFill(255);this.nearStrMask.get_graphics().drawRect(0,0,i-this.offsetX,this.nodeHeight);this.nearStrMask.get_graphics().endFill();this.nearStrMask.set_alpha(0)},__class__:flipbookMM_toolbar_searchText_SearchTextNode});var flipbookMM_toolbar_searchText_SearchTextUI=function(e,t,i,s){var r=this;base_baseSprite_TouchSprite.call(this);this.color=i;this.backAlpha=s;this.coreStr="";this.back=new openfl_display_Sprite;this.addChild(this.back);this.searchPanel=new openfl_display_Sprite;this.addChild(this.searchPanel);this.inputBox=new openfl_display_Sprite;this.addChild(this.inputBox);this.tray=new openfl_display_Sprite;this.searchPanel.addChild(this.tray);this.searchPanelMask=new openfl_display_Shape;this.addChild(this.searchPanelMask);this.searchPanel.set_mask(this.searchPanelMask);this.tableContent=[];this.displayNode=new haxe_ds_IntMap;this.displayHeight=0;this.curRowNum=-1;this.bufferRow=1;this.noResoult=new base_baseSprite_TextSprite;this.preTrayPosition=new openfl_geom_Point;this.resize(e,t);var a=flipbookMM_events_EventCenter.getInstance();a.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){if(r.searchTextDecode!=null){r.tableContent=null;r.tableContent=[];var t=0;var i=r.searchTextDecode.targetContent;while(t0){r.displayHeight=r.tableContent.length*r.unitHeight;r.displayNode=null;r.tray.removeChildren();r.displayNode=new haxe_ds_IntMap;r.curRowNum=-1;r.updateShowData(0)}else{r.displayHeight=0;r.noResoult.set_text("No result.");r.noResoult.set_textColor(16711680);r.tray.addChild(r.noResoult)}}});a=null;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=r.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(r.displayHeight<=r.panelHeigth){t=0}else if(t0){t=0}motion_Actuate.tween(r.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-r.tray.get_y()/r.unitHeight|0;r.updateShowData(e)}).onComplete(function(){r.tray.set_y(t);var e=-r.tray.get_y()/r.unitHeight|0;r.updateShowData(e)})});this.addEventListener("mouseDown",function(e){r.preTrayPosition.y=r.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=r.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||r.displayHeight<=r.panelHeigth){r.tray.set_y(0)}else if(t0){t=r.tray.get_y();t+=e.delta*2;if(r.displayHeight<=r.panelHeigth){t=0}else if(t>0){t=0}}else{t=r.tray.get_y();t+=e.delta*2;if(r.displayHeight<=r.panelHeigth){t=0}else if(t0){s.tray.removeChildren()}if(s.searchTextDecode!=null){s.searchTextDecode.targetContent=null;s.searchTextDecode=null}s.coreStr=t;if(StringTools.trim(s.coreStr).length>1){s.inputContent.div.blur();s.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();s.searchTextDecode.searchText(s.coreStr)}else{flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe();s.displayHeight=0;s.noResoult.set_text("Please enter at least two characters.");s.noResoult.set_textColor(16711680);s.tray.addChild(s.noResoult)}}}};this.inputContent.cancleBtn.onclick=function(){s.coreStr="";s.inputContent.input.value="";s.tableContent=null;var e=s.tray.get_numChildren();if(e>0){s.tray.removeChildren()}flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe()};this.inputContent.searchBtn.onclick=function(){var e=s.inputContent.input.value;if(s.coreStr!=e){s.tableContent=null;var t=s.tray.get_numChildren();if(t>0){s.tray.removeChildren(0)}if(s.searchTextDecode!=null){s.searchTextDecode.targetContent=null;s.searchTextDecode=null}s.coreStr=e;if(StringTools.trim(s.coreStr).length>1){s.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();s.searchTextDecode.searchText(s.coreStr)}}}},updateShowData:function(e){if(this.curRowNum==e){return}this.curRowNum=e;var t=this.curRowNum;if(t>=this.bufferRow){t-=this.bufferRow}var i=t;var s=t+this.maxRow+this.bufferRow+1;while(i=0){if(!this.displayNode.h.hasOwnProperty(a)){this.displayNode.h[a]=this.tableContent[a];var r=this.displayNode.h[a];this.tray.addChild(r);r.set_x(0);r.set_y(a*this.unitHeight);r=null}}}var n=this.displayNode.keys();while(n.hasNext()){var _=n.next();if(_t+this.maxRow+this.bufferRow){this.tray.removeChild(this.displayNode.h[_]);this.displayNode.remove(_)}}},resize:function(e,t){this.UI_Width=e;this.UI_Height=t;this.unitWidth=this.UI_Width;this.unitHeight=40*window.devicePixelRatio;this.maxRow=this.UI_Height/this.unitHeight|0;this.inputBoxWidth=this.UI_Width/window.devicePixelRatio;this.inputBoxHeight=30;this.panelWidth=this.UI_Width;this.panelHeigth=this.UI_Height-this.inputBoxHeight;if(this.inputContent!=null){this.inputContent.set_x(0);this.inputContent.set_y(50);this.inputContent.resize(this.inputBoxWidth,this.inputBoxHeight)}else{this.inputBoxInit();this.inputContent.set_x(0);this.inputContent.set_y(50);this.inputContent.resize(this.inputBoxWidth,this.inputBoxHeight)}this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.color);this.back.get_graphics().drawRect(0,0,this.UI_Width,this.UI_Height);this.back.get_graphics().endFill();this.back.set_alpha(this.backAlpha);this.searchPanelMask.get_graphics().clear();this.searchPanelMask.get_graphics().beginFill(0);this.searchPanelMask.get_graphics().drawRect(0,0,this.UI_Width,this.panelHeigth);this.searchPanelMask.get_graphics().endFill();this.searchPanelMask.set_x(0);this.searchPanelMask.set_y(this.inputBoxHeight*window.devicePixelRatio);this.searchPanel.set_x(0);this.searchPanel.set_y(this.inputBoxHeight*window.devicePixelRatio);if(this.tableContent!=null){var i=0;var s=this.tableContent;while(i0){this.tray.removeChildren();this.displayNode=null;this.displayNode=new haxe_ds_IntMap;var r=this.curRowNum;this.curRowNum=-1;this.updateShowData(r)}}},__class__:flipbookMM_toolbar_searchText_SearchTextUI});var flipbookMM_toolbar_share_ShareJs=function(e,t){var i=this;var s="./img/toolbarImg/ic_share_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SHARE_ON_OFF,new flipbookMM_events_EventObject(i,null,null)));e=null}};$hxClasses["flipbookMM.toolbar.share.ShareJs"]=flipbookMM_toolbar_share_ShareJs;flipbookMM_toolbar_share_ShareJs.__name__=["flipbookMM","toolbar","share","ShareJs"];flipbookMM_toolbar_share_ShareJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_share_ShareJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_share_ShareJs});var flipbookMM_toolbar_share_ShareUIJs=function(){this._linkUrl="";base_baseSprite_SpriteJs.call(this);this.init()};$hxClasses["flipbookMM.toolbar.share.ShareUIJs"]=flipbookMM_toolbar_share_ShareUIJs;flipbookMM_toolbar_share_ShareUIJs.__name__=["flipbookMM","toolbar","share","ShareUIJs"];flipbookMM_toolbar_share_ShareUIJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_share_ShareUIJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{_linkUrl:null,init:function(){var t=this;this.setBackgroundColor(16777215);this.div.style.borderRadius=10+"px";this.set_width(260);this.set_height(100);this.div.style.textAlign="center";this.div.style.border="1px solid #888";var e=window.document.createElement("div");e.style.height=40+"px";e.style.lineHeight=40+"px";e.innerHTML="share";this.div.appendChild(e);var i=window.document.createElement("img");i.src="./img/socialShare/facebook.png";i.style.padding=8+"px";this.div.appendChild(i);i.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/facebook/offer?")};var s=window.document.createElement("img");s.src="./img/socialShare/twitter.png";s.style.padding=8+"px";this.div.appendChild(s);s.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/twitter/offer?")};var a=window.document.createElement("img");a.src="./img/socialShare/google_plusone_share.png";a.style.padding=8+"px";this.div.appendChild(a);a.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/google_plusone_share/offer?")};var r=window.document.createElement("img");r.src="./img/socialShare/linkedin.png";r.style.padding=8+"px";this.div.appendChild(r);r.onclick=function(e){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/linkedin/offer?")};var n=window.document.createElement("img");n.src="./img/socialShare/addthis.png";n.style.padding=8+"px";this.div.appendChild(n);n.onclick=function(){t.set_visible(false);t.openUrl("https://www.addthis.com/bookmark.php?source=tbx32nj-1.0&v=300&")};return},openUrl:function(e){var t=window.location.href;t=StringTools.replace(t,"mobile.html","");var i;var s=flipbookMM_config_ConfigSetting.getInstance();var a=s.get(flipbookMM_config_ConfigKey.AppShowName);if(a.indexOf("Next")==0){i=e+"url="+t+"&pubid=ra-57870619ab04adca&ct=1&pco=tbxnj-1.0"}else{i=e+"url="+t+"&pubid=ra-5786fca66f6f5cc9&ct=1&pco=tbxnj-1.0"}s=null;try{if(this._linkUrl.toLowerCase().indexOf("www")==0){i="http://"+i}if(this._linkUrl.toLowerCase().indexOf("mailto:")==0){i=this._linkUrl;openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}else{openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}}catch(e){haxe_CallStack.lastException=e;return}},__class__:flipbookMM_toolbar_share_ShareUIJs});var flipbookMM_toolbar_sound_SoundBtnJs=function(e,t){var i=this;base_baseSprite_SpriteJs.call(this);this.soundOnUrl="./img/toolbarImg/ic_volume_up_black_36dp.png";this.soundOffUrl="./img/toolbarImg/ic_volume_off_black_36dp.png";this.soundOnOffFlag=true;this.soundOnBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.soundOnUrl,e,t);this.div.appendChild(this.soundOnBtn.div);this.soundOffBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.soundOffUrl,e,t);this.div.appendChild(this.soundOffBtn.div);this.soundOffBtn.set_visible(false);this.updateStatus();this.div.addEventListener("click",function(e){i.soundOnOffFlag=!i.soundOnOffFlag;i.updateStatus()})};$hxClasses["flipbookMM.toolbar.sound.SoundBtnJs"]=flipbookMM_toolbar_sound_SoundBtnJs;flipbookMM_toolbar_sound_SoundBtnJs.__name__=["flipbookMM","toolbar","sound","SoundBtnJs"];flipbookMM_toolbar_sound_SoundBtnJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_sound_SoundBtnJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{soundOnOffFlag:null,soundOnUrl:null,soundOffUrl:null,soundOnBtn:null,soundOffBtn:null,updateBgAlpha:function(e){this.soundOnBtn.updateBgAlpha(e);this.soundOffBtn.updateBgAlpha(e)},updateStatus:function(){var e;if(this.soundOnOffFlag){e="on";this.soundOnBtn.set_visible(true);this.soundOffBtn.set_visible(false)}else{e="off";this.soundOnBtn.set_visible(false);this.soundOffBtn.set_visible(true)}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,new flipbookMM_events_EventObject(this,e,null)));t=null},__class__:flipbookMM_toolbar_sound_SoundBtnJs});var flipbookMM_toolbar_thumbnails_Thumbnails=function(e,t){if(e==null){e=16777215}var i=this;var s="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,s,e,t);this.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,2,null)));t=null})};$hxClasses["flipbookMM.toolbar.thumbnails.Thumbnails"]=flipbookMM_toolbar_thumbnails_Thumbnails;flipbookMM_toolbar_thumbnails_Thumbnails.__name__=["flipbookMM","toolbar","thumbnails","Thumbnails"];flipbookMM_toolbar_thumbnails_Thumbnails.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_thumbnails_Thumbnails.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_thumbnails_Thumbnails});var flipbookMM_toolbar_thumbnails_ThumbnailsJs=function(e,t){if(e==null){e=16777215}var i=this;var s="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,2,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsJs"]=flipbookMM_toolbar_thumbnails_ThumbnailsJs;flipbookMM_toolbar_thumbnails_ThumbnailsJs.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsJs"];flipbookMM_toolbar_thumbnails_ThumbnailsJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_thumbnails_ThumbnailsJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_thumbnails_ThumbnailsJs});var flipbookMM_toolbar_thumbnails_ThumbnailsNode=function(i,e,t,s){this.comFun=null;var a=this;openfl_display_Sprite.call(this);this.pageW=e;this.pageH=t;this.isFinished=false;this.clickFlag=0;this.comFun=s;this.pageT=new base_baseSprite_TextSprite(i==null?"null":""+i);var r=flipbookMM_bookBox_PagesConfigGet.getInstance();var n=r.thumbPageList[i-1];r=null;var _=flipbookMM_config_ConfigSetting.getInstance();if(_.get(flipbookMM_config_ConfigKey.PdfjsRenderEnable)=="yes"){this.isPdfjsRender=true;this.pdfLoader=new flipbookMM_bookBox_book_PdfjsPage(i,false,$bind(this,this.loadHandle))}else{this.isPdfjsRender=false;this.loader=new base_baseLoad_LoadImg(n,$bind(this,this.loadHandle));this.addChild(this.loader)}_=null;this.addEventListener("mouseDown",function(e){a.clickFlag=1});this.addEventListener("mouseUp",function(e){if(a.clickFlag==1){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(a,i,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(a,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(a,"on",null)));t=null}a.clickFlag=0});this.addEventListener("mouseOut",function(e){a.clickFlag=0});this.addEventListener("removed",function(e){a.destroyMe()})};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsNode"]=flipbookMM_toolbar_thumbnails_ThumbnailsNode;flipbookMM_toolbar_thumbnails_ThumbnailsNode.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsNode"];flipbookMM_toolbar_thumbnails_ThumbnailsNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_thumbnails_ThumbnailsNode.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,pdfLoader:null,pageW:null,pageH:null,realW:null,realH:null,isFinished:null,pageT:null,clickFlag:null,comFun:null,isPdfjsRender:null,loadHandle:function(e){if(this.isPdfjsRender){this.onPdfjsCom(e)}else{this.onImgCom(e)}if(this.comFun!=null){this.comFun();this.comFun=null}},onImgCom:function(e){var t=js_Boot.__cast(e.target,openfl_display_LoaderInfo);this.realW=t.content.get_width();this.realH=t.content.get_height();var i=this.pageW/this.realW;var s=this.pageH/this.realH;var a=i=(t+this.row+this.bufferLength*2+1)*this.column){this.tableContent.h[f].destroyMe();this.tray.removeChild(this.tableContent.h[f]);this.tableContent.remove(f)}}},resize:function(e,t){this.TWidth=e;this.THeight=t;this.TUnitWidth=140*window.devicePixelRatio;this.TUnitHeight=180*window.devicePixelRatio;this.column=this.TWidth/this.TUnitWidth|0;this.row=this.THeight/this.TUnitHeight|0;this.offsetX=this.TWidth%this.TUnitWidth/2;var i=this.maxCount%this.column;if(i==0){i=this.maxCount/this.column}else{i=this.maxCount/this.column+1|0}this.tableHeight=this.TUnitHeight*i;this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.backColor);this.back.get_graphics().drawRect(0,0,this.TWidth,this.THeight);this.back.get_graphics().endFill();this.back.set_alpha(this.backAlpha);this.trayMask.get_graphics().clear();this.trayMask.get_graphics().beginFill(0);this.trayMask.get_graphics().drawRect(0,0,this.TWidth,this.THeight);this.trayMask.get_graphics().endFill();var s=this.curRowNum;this.curRowNum=-1;this.tray.removeChildren();this.tableContent=null;this.tableContent=new haxe_ds_IntMap;this.updateShowData(s)},addListEvent:function(){var s=this;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=s.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(s.tableHeight<=s.THeight){t=0}else if(t0){t=0}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)})});this.addEventListener("mouseDown",function(e){s.preTrayPosition.y=s.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=s.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||s.tableHeight<=s.THeight){s.tray.set_y(0)}else if(t0){t=s.tray.get_y();t+=e.delta*2;if(s.tableHeight<=s.THeight){t=0}else if(t>0){t=0}}else{t=s.tray.get_y();t+=e.delta*2;if(s.tableHeight<=s.THeight){t=0}else if(t=s.maxScale){return}var e=s.currentScale+.5;if(e>s.maxScale){e=s.maxScale}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(s,e,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));t=null};this.zoomIn=new base_baseSprite_SpriteJs;this.zoomIn.div.appendChild(t);this.zoomIn.div.style.padding="0px 8px";this.zoomIn.div.style.cursor="pointer";this.zoomIn.set_x(220);this.zoomIn.set_y(13);this.div.appendChild(this.zoomIn.div)},addEvent:function(){var i=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,this,function(e){var t=js_Boot.__cast(e._data._object,Float);i.currentScale=t;if(i.zoomLine!=null){i.zoomLine.updatePositon(t)}});e=null},__class__:flipbookMM_toolbar_zoom_ZoomUIJs});var flipbookMM_utils_color_ColorUtils=function(){};$hxClasses["flipbookMM.utils.color.ColorUtils"]=flipbookMM_utils_color_ColorUtils;flipbookMM_utils_color_ColorUtils.__name__=["flipbookMM","utils","color","ColorUtils"];flipbookMM_utils_color_ColorUtils.red=function(e){return e>>>16&255};flipbookMM_utils_color_ColorUtils.green=function(e){return e>>>8&255};flipbookMM_utils_color_ColorUtils.blue=function(e){return e>>>0&255};flipbookMM_utils_color_ColorUtils.alpha=function(e){return e>>>24&255};flipbookMM_utils_color_ColorUtils.argbMake=function(e,t,i,s){if(s==null){s=0}var a=(e&255)<<16;var r=(t&255)<<8;var n=i&255;var _=(s&255)<<24;return a|r|n|_};flipbookMM_utils_color_ColorUtils.transform=function(e,t,i,s,a,r,n,_,o){if(o==null){o=0}if(_==null){_=0}if(n==null){n=0}if(r==null){r=0}if(a==null){a=1}if(s==null){s=1}if(i==null){i=1}if(t==null){t=1}if(e==null){e=16777215}var l=flipbookMM_utils_color_ColorUtils.red(e);var h=flipbookMM_utils_color_ColorUtils.green(e);var c=flipbookMM_utils_color_ColorUtils.blue(e);var u=flipbookMM_utils_color_ColorUtils.alpha(e);var f=l*t+r|0;var p=h*i+n|0;var d=c*s+_|0;var g=u*a+o|0;f=Math.max(Math.min(f,255),0)|0;p=Math.max(Math.min(p,255),0)|0;d=Math.max(Math.min(d,255),0)|0;g=Math.max(Math.min(g,255),0)|0;return flipbookMM_utils_color_ColorUtils.argbMake(f,p,d,g)};var format_SVG=function(e){if(e!=null){this.data=new format_svg_SVGData(Xml.parse(e))}};$hxClasses["format.SVG"]=format_SVG;format_SVG.__name__=["format","SVG"];format_SVG.prototype={data:null,render:function(e,t,i,s,a,r){if(a==null){a=-1}if(s==null){s=-1}if(i==null){i=0}if(t==null){t=0}if(this.data==null){return}var n=new openfl_geom_Matrix;n.identity();if(s>-1&&a>-1){n.scale(s/this.data.width,a/this.data.height)}n.translate(t,i);var _=new format_svg_SVGRenderer(this.data,r);_.render(e,n)},__class__:format_SVG};var format_gfx_Gfx=function(){};$hxClasses["format.gfx.Gfx"]=format_gfx_Gfx;format_gfx_Gfx.__name__=["format","gfx","Gfx"];format_gfx_Gfx.prototype={geometryOnly:function(){return false},beginGradientFill:function(e){},beginFill:function(e,t){},endFill:function(){},lineStyle:function(e){},endLineStyle:function(){},moveTo:function(e,t){},lineTo:function(e,t){},curveTo:function(e,t,i,s){},renderText:function(e){},__class__:format_gfx_Gfx};var format_gfx_GfxGraphics=function(e){format_gfx_Gfx.call(this);this.graphics=e};$hxClasses["format.gfx.GfxGraphics"]=format_gfx_GfxGraphics;format_gfx_GfxGraphics.__name__=["format","gfx","GfxGraphics"];format_gfx_GfxGraphics.__super__=format_gfx_Gfx;format_gfx_GfxGraphics.prototype=$extend(format_gfx_Gfx.prototype,{graphics:null,beginGradientFill:function(e){this.graphics.beginGradientFill(e.type,e.colors,e.alphas,e.ratios,e.matrix,e.spread,e.interp,e.focus)},beginFill:function(e,t){this.graphics.beginFill(e,t)},endFill:function(){this.graphics.endFill()},lineStyle:function(e){this.graphics.lineStyle(e.thickness,e.color,e.alpha,e.pixelHinting,e.scaleMode,e.capsStyle,e.jointStyle,e.miterLimit)},endLineStyle:function(){this.graphics.lineStyle()},moveTo:function(e,t){this.graphics.moveTo(e,t)},lineTo:function(e,t){this.graphics.lineTo(e,t)},curveTo:function(e,t,i,s){this.graphics.curveTo(e,t,i,s)},__class__:format_gfx_GfxGraphics});var format_gfx_Gradient=function(){this.type=0;this.colors=[];this.alphas=[];this.ratios=[];this.matrix=new openfl_geom_Matrix;this.spread=0;this.interp=1;this.focus=0};$hxClasses["format.gfx.Gradient"]=format_gfx_Gradient;format_gfx_Gradient.__name__=["format","gfx","Gradient"];format_gfx_Gradient.prototype={type:null,colors:null,alphas:null,ratios:null,matrix:null,spread:null,interp:null,focus:null,__class__:format_gfx_Gradient};var format_gfx_LineStyle=function(){this.thickness=1;this.color=0;this.alpha=1;this.pixelHinting=false;this.scaleMode=2;this.capsStyle=1;this.jointStyle=2;this.miterLimit=3};$hxClasses["format.gfx.LineStyle"]=format_gfx_LineStyle;format_gfx_LineStyle.__name__=["format","gfx","LineStyle"];format_gfx_LineStyle.prototype={thickness:null,color:null,alpha:null,pixelHinting:null,scaleMode:null,capsStyle:null,jointStyle:null,miterLimit:null,__class__:format_gfx_LineStyle};var format_svg_FillType=$hxClasses["format.svg.FillType"]={__ename__:["format","svg","FillType"],__constructs__:["FillGrad","FillSolid","FillNone"]};format_svg_FillType.FillGrad=function(e){var t=["FillGrad",0,e];t.__enum__=format_svg_FillType;t.toString=$estr;return t};format_svg_FillType.FillSolid=function(e){var t=["FillSolid",1,e];t.__enum__=format_svg_FillType;t.toString=$estr;return t};format_svg_FillType.FillNone=["FillNone",2];format_svg_FillType.FillNone.toString=$estr;format_svg_FillType.FillNone.__enum__=format_svg_FillType;var format_svg_Grad=function(e){format_gfx_Gradient.call(this);this.type=e;this.radius=0;this.gradMatrix=new openfl_geom_Matrix;this.x1=0;this.y1=0;this.x2=0;this.y2=0};$hxClasses["format.svg.Grad"]=format_svg_Grad;format_svg_Grad.__name__=["format","svg","Grad"];format_svg_Grad.__super__=format_gfx_Gradient;format_svg_Grad.prototype=$extend(format_gfx_Gradient.prototype,{gradMatrix:null,radius:null,x1:null,y1:null,x2:null,y2:null,updateMatrix:function(e){var t=this.x2-this.x1;var i=this.y2-this.y1;var s=Math.atan2(i,t);var a=Math.sqrt(t*t+i*i);var r=new openfl_geom_Matrix;if(this.type==0){r.createGradientBox(1,1);r.scale(a,a)}else{if(this.radius!=0){this.focus=a/this.radius}r.createGradientBox(1,1);r.translate(-.5,-.5);r.scale(this.radius*2,this.radius*2)}r.rotate(s);r.translate(this.x1,this.y1);r.concat(this.gradMatrix);r.concat(e);this.matrix=r},__class__:format_svg_Grad});var format_svg_Group=function(){this.name="";this.children=[]};$hxClasses["format.svg.Group"]=format_svg_Group;format_svg_Group.__name__=["format","svg","Group"];format_svg_Group.prototype={findGroup:function(e){var t=0;var i=this.children;while(t0&&h<128?format_svg_PathParser.sCommandArgs[h]:-1;if(c==-1){throw new js__$Boot_HaxeError("failed parsing path near '"+HxOverrides.substr(e,i,null)+"'")}if(c==-2){++i}else if(c<=-3){var u=i+1;var f=-1;var p=c==-5;if(c==-6){f=0;p=true}while(u127?-1:format_svg_PathParser.sCommandArgs[d];if(g>-3){break}if(g==-5&&p){break}if(f>=0){if(g==-4){if(f!=0){break}}else if(g!=-3){break}++f}else if(g==-6){if(f>=0){break}f=0;p=true}else if(g==-4){break}++u}if(n>=0){var m=parseFloat(HxOverrides.substr(e,i,u-i));s.push(m)}i=u}else{n=h;_=c;l=false;r=i;s=[];++i}var v=0;var b=0;if(n>=0){if(_==s.length){if(t&&this.prev!=null){v=this.prev.prevX();b=this.prev.prevY()}this.prev=this.createCommand(n,s);if(this.prev==null){throw new js__$Boot_HaxeError("Unknown command "+String.fromCharCode(n)+" near '"+HxOverrides.substr(e,r,null)+"'")}if(t&&this.prev.getType()==4){var y=this.prev;var x=y.toQuadratics(v,b);var w=0;while(w=0&&!l){throw new js__$Boot_HaxeError("Unfinished command ("+s.length+"/"+_+") near '"+HxOverrides.substr(e,r,null)+"'")}return a},commandArgs:function(e){if(e==10){return-2}var t=String.fromCharCode(e).toUpperCase();if(t>="0"&&t<="9"){return-3}switch(t){case"+":return-4;case"\t":case"\n":case"\r":case" ":case",":return-2;case"-":return-4;case".":return-5;case"A":return 7;case"C":return 6;case"E":case"e":return-6;case"Q":case"S":return 4;case"L":case"M":case"T":return 2;case"H":case"V":return 1;case"Z":return 0}return-1},prevX:function(){if(this.prev!=null){return this.prev.prevX()}else{return 0}},prevY:function(){if(this.prev!=null){return this.prev.prevY()}else{return 0}},prevCX:function(){if(this.prev!=null){return this.prev.prevCX()}else{return 0}},prevCY:function(){if(this.prev!=null){return this.prev.prevCY()}else{return 0}},createCommand:function(e,t){switch(e){case 65:return new format_svg_ArcSegment(this.prevX(),this.prevY(),t[0],t[1],t[2],t[3]!=0,t[4]!=0,t[5],t[6]);case 67:return new format_svg_CubicSegment(t[0],t[1],t[2],t[3],t[4],t[5]);case 72:return new format_svg_DrawSegment(t[0],this.prevY());case 76:return new format_svg_DrawSegment(t[0],t[1]);case 77:this.lastMoveX=t[0];this.lastMoveY=t[1];return new format_svg_MoveSegment(this.lastMoveX,this.lastMoveY);case 81:return new format_svg_QuadraticSegment(t[0],t[1],t[2],t[3]);case 83:var i=this.prevX();var s=this.prevY();return new format_svg_CubicSegment(i*2-this.prevCX(),s*2-this.prevCY(),t[0],t[1],t[2],t[3]);case 84:var a=this.prevX();var r=this.prevY();return new format_svg_QuadraticSegment(a*2-this.prevCX(),a*2-this.prevCY(),t[2],t[3]);case 86:return new format_svg_DrawSegment(this.prevX(),t[0]);case 90:return new format_svg_DrawSegment(this.lastMoveX,this.lastMoveY);case 97:var n=this.prevX();var _=this.prevY();return new format_svg_ArcSegment(n,_,t[0],t[1],t[2],t[3]!=0,t[4]!=0,t[5]+n,t[6]+_);case 99:var o=this.prevX();var l=this.prevY();return new format_svg_CubicSegment(t[0]+o,t[1]+l,t[2]+o,t[3]+l,t[4]+o,t[5]+l);case 104:return new format_svg_DrawSegment(t[0]+this.prevX(),this.prevY());case 108:return new format_svg_DrawSegment(t[0]+this.prevX(),t[1]+this.prevY());case 109:this.lastMoveX=t[0]+this.prevX();this.lastMoveY=t[1]+this.prevY();return new format_svg_MoveSegment(this.lastMoveX,this.lastMoveY);case 113:var h=this.prevX();var c=this.prevY();return new format_svg_QuadraticSegment(t[0]+h,t[1]+c,t[2]+h,t[3]+c);case 115:var u=this.prevX();var f=this.prevY();return new format_svg_CubicSegment(u*2-this.prevCX(),f*2-this.prevCY(),t[0]+u,t[1]+f,t[2]+u,t[3]+f);case 116:var p=this.prevX();var d=this.prevY();return new format_svg_QuadraticSegment(p*2-this.prevCX(),d*2-this.prevCY(),t[0]+p,t[1]+d);case 118:return new format_svg_DrawSegment(this.prevX(),t[0]+this.prevY());case 122:return new format_svg_DrawSegment(this.lastMoveX,this.lastMoveY)}return null},__class__:format_svg_PathParser};var format_svg_PathSegment=function(e,t){this.x=e;this.y=t};$hxClasses["format.svg.PathSegment"]=format_svg_PathSegment;format_svg_PathSegment.__name__=["format","svg","PathSegment"];format_svg_PathSegment.prototype={x:null,y:null,getType:function(){return 0},prevX:function(){return this.x},prevY:function(){return this.y},prevCX:function(){return this.x},prevCY:function(){return this.y},toGfx:function(e,t){t.setLast(this.x,this.y);t.firstX=t.lastX;t.firstY=t.lastY;e.moveTo(t.lastX,t.lastY)},__class__:format_svg_PathSegment};var format_svg_MoveSegment=function(e,t){format_svg_PathSegment.call(this,e,t)};$hxClasses["format.svg.MoveSegment"]=format_svg_MoveSegment;format_svg_MoveSegment.__name__=["format","svg","MoveSegment"];format_svg_MoveSegment.__super__=format_svg_PathSegment;format_svg_MoveSegment.prototype=$extend(format_svg_PathSegment.prototype,{getType:function(){return 1},__class__:format_svg_MoveSegment});var format_svg_DrawSegment=function(e,t){format_svg_PathSegment.call(this,e,t)};$hxClasses["format.svg.DrawSegment"]=format_svg_DrawSegment;format_svg_DrawSegment.__name__=["format","svg","DrawSegment"];format_svg_DrawSegment.__super__=format_svg_PathSegment;format_svg_DrawSegment.prototype=$extend(format_svg_PathSegment.prototype,{toGfx:function(e,t){t.setLast(this.x,this.y);e.lineTo(t.lastX,t.lastY)},getType:function(){return 2},__class__:format_svg_DrawSegment});var format_svg_QuadraticSegment=function(e,t,i,s){format_svg_PathSegment.call(this,i,s);this.cx=e;this.cy=t};$hxClasses["format.svg.QuadraticSegment"]=format_svg_QuadraticSegment;format_svg_QuadraticSegment.__name__=["format","svg","QuadraticSegment"];format_svg_QuadraticSegment.__super__=format_svg_PathSegment;format_svg_QuadraticSegment.prototype=$extend(format_svg_PathSegment.prototype,{cx:null,cy:null,prevCX:function(){return this.cx},prevCY:function(){return this.cy},toGfx:function(e,t){t.setLast(this.x,this.y);e.curveTo(t.transX(this.cx,this.cy),t.transY(this.cx,this.cy),t.lastX,t.lastY)},getType:function(){return 3},__class__:format_svg_QuadraticSegment});var format_svg_CubicSegment=function(e,t,i,s,a,r){format_svg_PathSegment.call(this,a,r);this.cx1=e;this.cy1=t;this.cx2=i;this.cy2=s};$hxClasses["format.svg.CubicSegment"]=format_svg_CubicSegment;format_svg_CubicSegment.__name__=["format","svg","CubicSegment"];format_svg_CubicSegment.__super__=format_svg_PathSegment;format_svg_CubicSegment.prototype=$extend(format_svg_PathSegment.prototype,{cx1:null,cy1:null,cx2:null,cy2:null,prevCX:function(){return this.cx2},prevCY:function(){return this.cy2},Interp:function(e,t,i){return e+(t-e)*i},toGfx:function(e,t){var i=t.lastX;var s=t.lastY;var a=t.transX(this.cx1,this.cy1);var r=t.transY(this.cx1,this.cy1);var n=t.transX(this.cx2,this.cy2);var _=t.transY(this.cx2,this.cy2);t.setLast(this.x,this.y);var o=t.lastX;var l=t.lastY;var h=this.Interp(i,a,.75);var c=this.Interp(s,r,.75);var u=this.Interp(o,n,.75);var f=this.Interp(l,_,.75);var p=(o-i)/16;var d=(l-s)/16;var g=this.Interp(i,a,.375);var m=this.Interp(s,r,.375);var v=this.Interp(h,u,.375)-p;var b=this.Interp(c,f,.375)-d;var y=this.Interp(u,h,.375)+p;var x=this.Interp(f,c,.375)+d;var w=this.Interp(o,n,.375);var k=this.Interp(l,_,.375);var P=(g+v)*.5;var C=(m+b)*.5;var T=(h+u)*.5;var M=(c+f)*.5;var S=(y+w)*.5;var $=(x+k)*.5;e.curveTo(g,m,P,C);e.curveTo(v,b,T,M);e.curveTo(y,x,S,$);e.curveTo(w,k,o,l)},toQuadratics:function(e,t){var i=[];var s=this.Interp(e,this.cx1,.75);var a=this.Interp(t,this.cy1,.75);var r=this.Interp(this.x,this.cx2,.75);var n=this.Interp(this.y,this.cy2,.75);var _=(this.x-e)/16;var o=(this.y-t)/16;var l=this.Interp(e,this.cx1,.375);var h=this.Interp(t,this.cy1,.375);var c=this.Interp(s,r,.375)-_;var u=this.Interp(a,n,.375)-o;var f=this.Interp(r,s,.375)+_;var p=this.Interp(n,a,.375)+o;var d=this.Interp(this.x,this.cx2,.375);var g=this.Interp(this.y,this.cy2,.375);var m=(l+c)*.5;var v=(h+u)*.5;var b=(s+r)*.5;var y=(a+n)*.5;var x=(f+d)*.5;var w=(p+g)*.5;i.push(new format_svg_QuadraticSegment(l,h,m,v));i.push(new format_svg_QuadraticSegment(c,u,b,y));i.push(new format_svg_QuadraticSegment(f,p,x,w));i.push(new format_svg_QuadraticSegment(d,g,this.x,this.y));return i},getType:function(){return 4},__class__:format_svg_CubicSegment});var format_svg_ArcSegment=function(e,t,i,s,a,r,n,_,o){this.x1=e;this.y1=t;format_svg_PathSegment.call(this,_,o);this.rx=i;this.ry=s;this.phi=a;this.fA=r;this.fS=n};$hxClasses["format.svg.ArcSegment"]=format_svg_ArcSegment;format_svg_ArcSegment.__name__=["format","svg","ArcSegment"];format_svg_ArcSegment.__super__=format_svg_PathSegment;format_svg_ArcSegment.prototype=$extend(format_svg_PathSegment.prototype,{x1:null,y1:null,rx:null,ry:null,phi:null,fA:null,fS:null,toGfx:function(e,t){if(this.x1==this.x&&this.y1==this.y){return}t.setLast(this.x,this.y);if(this.rx==0||this.ry==0){e.lineTo(t.lastX,t.lastY);return}if(this.rx<0){this.rx=-this.rx}if(this.ry<0){this.ry=-this.ry}var i=this.phi*Math.PI/180;var s=Math.cos(i);var a=Math.sin(i);var r=(this.x1-this.x)*.5;var n=(this.y1-this.y)*.5;var _=s*r+a*n;var o=-a*r+s*n;var l=this.rx*this.rx;var h=this.ry*this.ry;var c=_*_;var u=o*o;var f=(l*h-l*u-h*c)/(l*u+h*c);if(f<0){f=0}else if(this.fA==this.fS){f=-Math.sqrt(f)}else{f=Math.sqrt(f)}var p=f*this.rx*o/this.ry;var d=-f*this.ry*_/this.rx;var g=(this.x1+this.x)*.5;var m=(this.y1+this.y)*.5;var v=s*p-a*d+g;var b=a*p+s*d+m;var y=Math.atan2((o-d)/this.ry,(_-p)/this.rx);var x=Math.atan2((-o-d)/this.ry,(-_-p)/this.rx)-y;if(this.fS&&x<0){x+=2*Math.PI}else if(!this.fS&&x>0){x-=2*Math.PI}var w=t.matrix;var k;var P;var C;var T;var M;var S;if(w!=null){k=w.a*this.rx;P=w.c*this.ry;C=w.a*v+w.c*b+w.tx;T=w.b*this.rx;M=w.d*this.ry;S=w.b*v+w.d*b+w.ty}else{k=this.rx;P=0;C=v+w.tx;T=0;M=this.ry;S=b+w.ty}var $=Math.abs(x)*Math.sqrt(k*k+P*P+T*T+M*M);$*=5;var E=Math.round($);if(E>1){x/=E;var B=1;var L=E-1;while(Bthis.rect.x){if(e>this.rect.get_right()){e+=this.rectW-this.rect.width}else{e=this.rect.x+this.rectW*(e-this.rect.x)/this.rect.width}}return e*this.matrix.a+t*this.matrix.c+this.matrix.tx},transY:function(e,t){if(this.rect!=null&&t>this.rect.y){if(t>this.rect.get_right()){t+=this.rectH-this.rect.height}else{t=this.rect.y+this.rectH*(t-this.rect.y)/this.rect.height}}return e*this.matrix.b+t*this.matrix.d+this.matrix.ty},setLast:function(e,t){this.lastX=this.transX(e,t);this.lastY=this.transY(e,t)},matrix:null,rect:null,rectW:null,rectH:null,firstX:null,firstY:null,lastX:null,lastY:null,__class__:format_svg_RenderContext};var format_svg_SVGData=function(e,t){if(t==null){t=false}format_svg_Group.call(this);var i=e.firstElement();var s;if(i!=null){if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}if(i.nodeName!="svg"){if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}s=i.nodeName!="svg:svg"}else{s=false}}else{s=true}if(s){var a;if(i==null){a="null"}else{if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}a=i.nodeName}throw new js__$Boot_HaxeError("Not an SVG file ("+a+")")}this.mGrads=new haxe_ds_StringMap;this.mPathParser=new format_svg_PathParser;this.mConvertCubics=t;this.width=this.getFloatStyle("width",i,null,0);this.height=this.getFloatStyle("height",i,null,0);if(this.width==0&&this.height==0){this.width=this.height=400}else if(this.width==0){this.width=this.height}else if(this.height==0){this.height=this.width}var r=new openfl_geom_Rectangle(0,0,this.width,this.height);if(i.exists("viewBox")){var n=i.get("viewBox");var _=n.indexOf(",")!=-1?n.split(","):n.split(" ");r=new openfl_geom_Rectangle(parseFloat(StringTools.trim(_[0])),parseFloat(StringTools.trim(_[1])),parseFloat(StringTools.trim(_[2])),parseFloat(StringTools.trim(_[3])))}this.loadGroup(this,i,new openfl_geom_Matrix(1,0,0,1,-r.x,-r.y),null)};$hxClasses["format.svg.SVGData"]=format_svg_SVGData;format_svg_SVGData.__name__=["format","svg","SVGData"];format_svg_SVGData.__super__=format_svg_Group;format_svg_SVGData.prototype=$extend(format_svg_Group.prototype,{height:null,width:null,mConvertCubics:null,mGrads:null,mPathParser:null,applyTransform:function(e,t){var i=1;if(format_svg_SVGData.mTranslateMatch.match(t)){e.translate(parseFloat(format_svg_SVGData.mTranslateMatch.matched(1)),parseFloat(format_svg_SVGData.mTranslateMatch.matched(2)))}else if(format_svg_SVGData.mScaleMatch.match(t)){var s=parseFloat(format_svg_SVGData.mScaleMatch.matched(1));e.scale(s,s);i=s}else if(format_svg_SVGData.mMatrixMatch.match(t)){var a=new openfl_geom_Matrix(parseFloat(format_svg_SVGData.mMatrixMatch.matched(1)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(2)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(3)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(4)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(5)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(6)));a.concat(e);e.a=a.a;e.b=a.b;e.c=a.c;e.d=a.d;e.tx=a.tx;e.ty=a.ty;i=Math.sqrt(e.a*e.a+e.c*e.c)}else if(format_svg_SVGData.mRotationMatch.match(t)){var r=parseFloat(format_svg_SVGData.mRotationMatch.matched(1));var n=parseFloat(format_svg_SVGData.mRotationMatch.matched(2));if(isNaN(n)){n=0}var _=parseFloat(format_svg_SVGData.mRotationMatch.matched(3));if(isNaN(_)){_=0}var o=r*Math.PI/180;e.translate(-n,-_);e.rotate(o);e.translate(n,_)}return i},getColorStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}if(a.charAt(0)=="#"){var r=HxOverrides.substr(a,1,null);if(r.length==3){r=HxOverrides.substr(r,0,1)+HxOverrides.substr(r,0,1)+HxOverrides.substr(r,1,1)+HxOverrides.substr(r,1,1)+HxOverrides.substr(r,2,1)+HxOverrides.substr(r,2,1)}return Std.parseInt("0x"+r)}return Std.parseInt(a)},getFillStyle:function(e,t,i){var s=this.getStyle(e,t,i,"");if(s==""){return format_svg_SVGData.defaultFill}if(s.charAt(0)=="#"){var a=HxOverrides.substr(s,1,null);if(a.length==3){a=HxOverrides.substr(a,0,1)+HxOverrides.substr(a,0,1)+HxOverrides.substr(a,1,1)+HxOverrides.substr(a,1,1)+HxOverrides.substr(a,2,1)+HxOverrides.substr(a,2,1)}return format_svg_FillType.FillSolid(Std.parseInt("0x"+a))}if(format_svg_SVGData.mRGBMatch.match(s)){var r=format_svg_SVGData.mRGBMatch;var n=parseFloat(r.matched(1));if(r.matched(2)=="%"){n=n*255/100}var _=parseFloat(r.matched(3));if(r.matched(4)=="%"){_=_*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=n;if(l<0){l=0}if(l>255){l=255}var h=_;if(h<0){h=0}if(h>255){h=255}var c=o;if(c<0){c=0}if(c>255){c=255}return format_svg_FillType.FillSolid((l|0)<<16|(h|0)<<8|(c|0))}if(s=="none"){return format_svg_FillType.FillNone}if(format_svg_SVGData.mURLMatch.match(s)){var u=format_svg_SVGData.mURLMatch.matched(1);var f=this.mGrads;if(__map_reserved[u]!=null?f.existsReserved(u):f.h.hasOwnProperty(u)){var p=this.mGrads;return format_svg_FillType.FillGrad(__map_reserved[u]!=null?p.getReserved(u):p.h[u])}throw new js__$Boot_HaxeError("Unknown url:"+u)}throw new js__$Boot_HaxeError("Unknown fill string:"+s)},getFloat:function(e,t,i){if(i==null){i=0}if(e.exists(t)){return parseFloat(e.get(t))}return i},getFloatStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}return parseFloat(a)},getStyleAndConvert:function(e,t,i,s,a){var r=this.getStyle(e,t,i,"");if(r==""||!(__map_reserved[r]!=null?a.existsReserved(r):a.h.hasOwnProperty(r))){return s}return __map_reserved[r]!=null?a.getReserved(r):a.h[r]},getStrokeStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}if(format_svg_SVGData.mRGBMatch.match(a)){var r=format_svg_SVGData.mRGBMatch;var n=parseFloat(r.matched(1));if(r.matched(2)=="%"){n=n*255/100}var _=parseFloat(r.matched(3));if(r.matched(4)=="%"){_=_*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=n;if(l<0){l=0}if(l>255){l=255}var h=_;if(h<0){h=0}if(h>255){h=255}var c=o;if(c<0){c=0}if(c>255){c=255}return(l|0)<<16|(h|0)<<8|(c|0)}if(a=="none"){return null}if(a.charAt(0)=="#"){var u=HxOverrides.substr(a,1,null);if(u.length==3){u=HxOverrides.substr(u,0,1)+HxOverrides.substr(u,0,1)+HxOverrides.substr(u,1,1)+HxOverrides.substr(u,1,1)+HxOverrides.substr(u,2,1)+HxOverrides.substr(u,2,1)}return Std.parseInt("0x"+u)}return Std.parseInt(a)},getStyle:function(e,t,i,s){if(t!=null&&t.exists(e)){return t.get(e)}if(i!=null&&(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e))){return __map_reserved[e]!=null?i.getReserved(e):i.h[e]}return s},getStyles:function(e,t){if(!e.exists("style")){return t}var i=new haxe_ds_StringMap;if(t!=null){var s=t.keys();while(s.hasNext()){var a=s.next();var r=__map_reserved[a]!=null?t.getReserved(a):t.h[a];if(__map_reserved[a]!=null){i.setReserved(a,r)}else{i.h[a]=r}}}var n=e.get("style");var _=format_svg_SVGData.mStyleSplit.split(n);var o=0;while(o<_.length){var l=_[o];++o;if(format_svg_SVGData.mStyleValue.match(l)){var h=format_svg_SVGData.mStyleValue.matched(1);var c=format_svg_SVGData.mStyleValue.matched(2);if(__map_reserved[h]!=null){i.setReserved(h,c)}else{i.h[h]=c}}}return i},loadDefs:function(e){var t=0;while(t<2){var i=t++;var s=e.elements();while(s.hasNext()){var a=s.next();if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}var r=a.nodeName;if(HxOverrides.substr(r,0,4)=="svg:"){r=HxOverrides.substr(r,4,null)}if(r=="linearGradient"){this.loadGradient(a,0,i==1)}else if(r=="radialGradient"){this.loadGradient(a,1,i==1)}}}},loadGradient:function(e,t,i){var s=e.get("id");var a=new format_svg_Grad(t);if(i&&e.exists("xlink:href")){var r=e.get("xlink:href");if(r.charAt(0)!="#"){throw new js__$Boot_HaxeError("xlink - unkown syntax : "+r)}var n=this.mGrads;var _=HxOverrides.substr(r,1,null);var o=__map_reserved[_]!=null?n.getReserved(_):n.h[_];if(o!=null){a.colors=o.colors;a.alphas=o.alphas;a.ratios=o.ratios;a.gradMatrix=o.gradMatrix.clone();a.spread=o.spread;a.interp=o.interp;a.radius=o.radius}else{throw new js__$Boot_HaxeError("Unknown xlink : "+r)}}if(e.exists("x1")){a.x1=this.getFloat(e,"x1");a.y1=this.getFloat(e,"y1");a.x2=this.getFloat(e,"x2");a.y2=this.getFloat(e,"y2")}else{a.x1=this.getFloat(e,"cx");a.y1=this.getFloat(e,"cy");a.x2=this.getFloat(e,"fx",a.x1);a.y2=this.getFloat(e,"fy",a.y1)}a.radius=this.getFloat(e,"r");if(e.exists("gradientTransform")){this.applyTransform(a.gradMatrix,e.get("gradientTransform"))}var l=e.elements();while(l.hasNext()){var h=l.next();var c=this.getStyles(h,null);a.colors.push(this.getColorStyle("stop-color",h,c,0));a.alphas.push(this.getFloatStyle("stop-opacity",h,c,1));a.ratios.push(parseFloat(h.get("offset"))*255|0)}var u=this.mGrads;if(__map_reserved[s]!=null){u.setReserved(s,a)}else{u.h[s]=a}},loadGroup:function(e,t,i,s){if(t.exists("transform")){i=i.clone();this.applyTransform(i,t.get("transform"))}if(t.exists("inkscape:label")){e.name=t.get("inkscape:label")}else if(t.exists("id")){e.name=t.get("id")}var a=this.getStyles(t,s);if(t.exists("opacity")){var r=t.get("opacity");if(a==null){a=new haxe_ds_StringMap}if(__map_reserved["opacity"]!=null?a.existsReserved("opacity"):a.h.hasOwnProperty("opacity")){r=Std.string(parseFloat(r)*parseFloat(__map_reserved["opacity"]!=null?a.getReserved("opacity"):a.h["opacity"]))}if(__map_reserved["opacity"]!=null){a.setReserved("opacity",r)}else{a.h["opacity"]=r}}var n=t.elements();while(n.hasNext()){var _=n.next();if(_.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+_.nodeType)}var o=_.nodeName;if(HxOverrides.substr(o,0,4)=="svg:"){o=HxOverrides.substr(o,4,null)}if(_.exists("display")&&_.get("display")=="none"){continue}if(o=="defs"){this.loadDefs(_)}else if(o=="g"){if(!(_.exists("display")&&_.get("display")=="none")){e.children.push(format_svg_DisplayElement.DisplayGroup(this.loadGroup(new format_svg_Group,_,i,a)))}}else if(o=="path"||o=="line"||o=="polyline"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,false)))}else if(o=="rect"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,true,false)))}else if(o=="polygon"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,false)))}else if(o=="ellipse"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,true)))}else if(o=="circle"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,true,true)))}else if(o=="text"){e.children.push(format_svg_DisplayElement.DisplayText(this.loadText(_,i,a)))}else if(o=="linearGradient"){this.loadGradient(_,0,true)}else if(o=="radialGradient"){this.loadGradient(_,1,true)}}return e},loadPath:function(e,t,i,s,a,r){if(r==null){r=false}if(e.exists("transform")){t=t.clone();this.applyTransform(t,e.get("transform"))}var n=this.getStyles(e,i);var _=e.exists("id")?e.get("id"):"";var o=new format_svg_Path;o.fill=this.getFillStyle("fill",e,n);o.alpha=this.getFloatStyle("opacity",e,n,1);o.fill_alpha=this.getFloatStyle("fill-opacity",e,n,1);o.stroke_alpha=this.getFloatStyle("stroke-opacity",e,n,1);o.stroke_colour=this.getStrokeStyle("stroke",e,n,null);o.stroke_width=this.getFloatStyle("stroke-width",e,n,1);var l=new haxe_ds_StringMap;var h=1;if(__map_reserved["round"]!=null){l.setReserved("round",h)}else{l.h["round"]=h}var c=2;if(__map_reserved["square"]!=null){l.setReserved("square",c)}else{l.h["square"]=c}var u=0;if(__map_reserved["butt"]!=null){l.setReserved("butt",u)}else{l.h["butt"]=u}o.stroke_caps=this.getStyleAndConvert("stroke-linecap",e,n,0,l);var f=new haxe_ds_StringMap;var p=0;if(__map_reserved["bevel"]!=null){f.setReserved("bevel",p)}else{f.h["bevel"]=p}var d=2;if(__map_reserved["round"]!=null){f.setReserved("round",d)}else{f.h["round"]=d}var g=1;if(__map_reserved["miter"]!=null){f.setReserved("miter",g)}else{f.h["miter"]=g}o.joint_style=this.getStyleAndConvert("stroke-linejoin",e,n,1,f);o.miter_limit=this.getFloatStyle("stroke-miterlimit",e,n,3);o.segments=[];o.matrix=t;o.name=_;if(s){var m=e.exists("x")?parseFloat(e.get("x")):0;var v=e.exists("y")?parseFloat(e.get("y")):0;var b=parseFloat(e.get("width"));var y=parseFloat(e.get("height"));var x=e.exists("rx")?parseFloat(e.get("rx")):0;var w=e.exists("ry")?parseFloat(e.get("ry")):0;if(x==0||w==0){o.segments.push(new format_svg_MoveSegment(m,v));o.segments.push(new format_svg_DrawSegment(m+b,v));o.segments.push(new format_svg_DrawSegment(m+b,v+y));o.segments.push(new format_svg_DrawSegment(m,v+y));o.segments.push(new format_svg_DrawSegment(m,v))}else{o.segments.push(new format_svg_MoveSegment(m,v+w));o.segments.push(new format_svg_QuadraticSegment(m,v,m+x,v));o.segments.push(new format_svg_DrawSegment(m+b-x,v));o.segments.push(new format_svg_QuadraticSegment(m+b,v,m+b,v+x));o.segments.push(new format_svg_DrawSegment(m+b,v+y-w));o.segments.push(new format_svg_QuadraticSegment(m+b,v+y,m+b-x,v+y));o.segments.push(new format_svg_DrawSegment(m+x,v+y));o.segments.push(new format_svg_QuadraticSegment(m,v+y,m,v+y-w));o.segments.push(new format_svg_DrawSegment(m,v+w))}}else if(a){var k=e.exists("cx")?parseFloat(e.get("cx")):0;var P=e.exists("cy")?parseFloat(e.get("cy")):0;var C=r&&e.exists("r")?parseFloat(e.get("r")):0;var T=r?C:e.exists("rx")?parseFloat(e.get("rx")):0;var M=T*.7071067811865476;var S=T*.41421356237309503;var $=r?C:e.exists("ry")?parseFloat(e.get("ry")):0;var E=$*.7071067811865476;var B=$*.41421356237309503;o.segments.push(new format_svg_MoveSegment(k+T,P));o.segments.push(new format_svg_QuadraticSegment(k+T,P+B,k+M,P+E));o.segments.push(new format_svg_QuadraticSegment(k+S,P+$,k,P+$));o.segments.push(new format_svg_QuadraticSegment(k-S,P+$,k-M,P+E));o.segments.push(new format_svg_QuadraticSegment(k-T,P+B,k-T,P));o.segments.push(new format_svg_QuadraticSegment(k-T,P-B,k-M,P-E));o.segments.push(new format_svg_QuadraticSegment(k-S,P-$,k,P-$));o.segments.push(new format_svg_QuadraticSegment(k+S,P-$,k+M,P-E));o.segments.push(new format_svg_QuadraticSegment(k+T,P-B,k+T,P))}else{var L=e.exists("points")?"M"+e.get("points")+"z":e.exists("x1")?"M"+e.get("x1")+","+e.get("y1")+" "+e.get("x2")+","+e.get("y2")+"z":e.get("d");var R=0;var A=this.mPathParser.parse(L,this.mConvertCubics);while(R=0){this.bmaps[this.pos].set_visible(this.frames[this.pos].disposalMethod==1)}this.pos=(this.pos+1)%this.bmaps.length;if(this.pos==0){var e=1;var t=this.bmaps.length;while(e10){return this.frames[this.pos].delayTime*10}else{return 100}},timerTick:function(e){this.timer.stop();this.timer.set_delay(this.nextFrame());this.timer.start()},__class__:gif_AnimatedGif});var gif_bytes_Endian=$hxClasses["gif.bytes.Endian"]={__ename__:["gif","bytes","Endian"],__constructs__:["BigEndian","LittleEndian"]};gif_bytes_Endian.BigEndian=["BigEndian",0];gif_bytes_Endian.BigEndian.toString=$estr;gif_bytes_Endian.BigEndian.__enum__=gif_bytes_Endian;gif_bytes_Endian.LittleEndian=["LittleEndian",1];gif_bytes_Endian.LittleEndian.toString=$estr;gif_bytes_Endian.LittleEndian.__enum__=gif_bytes_Endian;var haxe_io_Input=function(){};$hxClasses["haxe.io.Input"]=haxe_io_Input;haxe_io_Input.__name__=["haxe","io","Input"];haxe_io_Input.prototype={bigEndian:null,readByte:function(){throw new js__$Boot_HaxeError("Not implemented")},readBytes:function(e,t,i){var s=i;var a=e.b;if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}try{while(s>0){a[t]=this.readByte();++t;--s}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,haxe_io_Eof)){}else throw e}return i-s},set_bigEndian:function(e){this.bigEndian=e;return e},readFullBytes:function(e,t,i){while(i>0){var s=this.readBytes(e,t,i);if(s==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}t+=s;i-=s}},read:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));var i=0;while(e>0){var s=this.readBytes(t,i,e);if(s==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}i+=s;e-=s}return t},readInt16:function(){var e=this.readByte();var t=this.readByte();var i=this.bigEndian?t|e<<8:e|t<<8;if((i&32768)!=0){return i-65536}return i},readUInt16:function(){var e=this.readByte();var t=this.readByte();if(this.bigEndian){return t|e<<8}else{return e|t<<8}},readInt32:function(){var e=this.readByte();var t=this.readByte();var i=this.readByte();var s=this.readByte();if(this.bigEndian){return s|i<<8|t<<16|e<<24}else{return e|t<<8|i<<16|s<<24}},readString:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));this.readFullBytes(t,0,e);return t.toString()},__class__:haxe_io_Input,__properties__:{set_bigEndian:"set_bigEndian"}};var haxe_io_BytesInput=function(e,t,i){if(t==null){t=0}if(i==null){i=e.length-t}if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}this.b=e.b;this.pos=t;this.len=i;this.totlen=i};$hxClasses["haxe.io.BytesInput"]=haxe_io_BytesInput;haxe_io_BytesInput.__name__=["haxe","io","BytesInput"];haxe_io_BytesInput.__super__=haxe_io_Input;haxe_io_BytesInput.prototype=$extend(haxe_io_Input.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(this.len==0){throw new js__$Boot_HaxeError(new haxe_io_Eof)}this.len--;return this.b[this.pos++]},readBytes:function(e,t,i){if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(this.len==0&&i>0){throw new js__$Boot_HaxeError(new haxe_io_Eof)}if(this.len255){return 255}else{var i=e;if(i<0){return 0}else{return e}}};var gif_images_Error=$hxClasses["gif.images.Error"]={__ename__:["gif","images","Error"],__constructs__:["InvalidFormat","UnsupportedFormat"]};gif_images_Error.InvalidFormat=["InvalidFormat",0];gif_images_Error.InvalidFormat.toString=$estr;gif_images_Error.InvalidFormat.__enum__=gif_images_Error;gif_images_Error.UnsupportedFormat=["UnsupportedFormat",1];gif_images_Error.UnsupportedFormat.toString=$estr;gif_images_Error.UnsupportedFormat.__enum__=gif_images_Error;var gif_images_GifDecoder=function(){};$hxClasses["gif.images.GifDecoder"]=gif_images_GifDecoder;gif_images_GifDecoder.__name__=["gif","images","GifDecoder"];gif_images_GifDecoder.decode=function(e){var t=new gif_bytes_BytesInputWrapper(e,gif_bytes_Endian.LittleEndian);var i=new gif_images_GifInfo;gif_images_GifDecoder.readHeader(t,i);if(i.globalColorTableFlag){gif_images_GifDecoder.readGlobalColorTable(t,i)}var s=new gif_images_GifFrameInfo(i);try{while(true){var a=t.readByte();switch(a){case 33:var r=t.readByte();switch(r){case 249:gif_images_GifDecoder.readGraphicControlExtension(t,s);break;case 254:gif_images_GifDecoder.readComment(t,s);break;case 255:gif_images_GifDecoder.readApplicationExtension(t,s);break}break;case 44:gif_images_GifDecoder.readImageDescriptor(t,s);if(s.localColorTableFlag){gif_images_GifDecoder.readLocalColorTable(t,s)}gif_images_GifDecoder.readImageData(t,s);i.frameList.push(s);s=new gif_images_GifFrameInfo(i);break;case 59:throw"__break__";break;default:throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}}}catch(e){if(e!="__break__")throw e}return i};gif_images_GifDecoder.readHeader=function(e,t){gif_images_GifDecoder.validateSignature(e.read(3));gif_images_GifDecoder.readVersion(e.read(3),t);t.logicalScreenWidth=e.readInt16();t.logicalScreenHeight=e.readInt16();var i=e.readByte();t.globalColorTableFlag=(i&128)==128;t.colorResolution=(i&112)>>4;t.sortFlag=(i&8)==8;t.sizeOfGlobalTable=i&7;t.backgroundColorIndex=e.readByte();t.pixelAspectRaito=e.readByte()};gif_images_GifDecoder.validateSignature=function(e){if(e.toString()!="GIF"){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readVersion=function(e,t){var i=e.toString();switch(i){case"87a":t.version=gif_images_Version.Gif87a;throw new js__$Boot_HaxeError(gif_images_Error.UnsupportedFormat);break;case"89a":t.version=gif_images_Version.Gif89a;break;default:throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readGlobalColorTable=function(e,t){var i=1<>2;t.userInputFlag=(s&2)==2;t.transparentColorFlag=(s&1)==1;t.delayTime=e.readInt16();t.transparentColorIndex=e.readByte();var a=e.readByte();if(a!=0){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readComment=function(e,t){var i;while(true){i=e.readByte()&255;if(i>0){e.read(i)}if(!(i>0)){break}}};gif_images_GifDecoder.readApplicationExtension=function(e,t){var i=e.readByte();if(i!=11){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}var s=e.readInt32();var a=e.readInt32();var r=e.readByte();var n=e.readByte();var _=e.readByte();if(s==1346454355&&a==808333893&&r==50&&n==46&&_==48){var o=e.readByte();if(o==3){e.readByte();t.parent.animationLoopCount=e.readInt16()}else{throw new js__$Boot_HaxeError(gif_images_Error.UnsupportedFormat)}var l=e.readByte();if(l!=0){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}}else{var h;while(true){h=e.readByte()&255;if(h>0){e.read(h)}if(!(h>0)){break}}}};gif_images_GifDecoder.readImageDescriptor=function(e,t){t.imageLeftPosition=e.readInt16();t.imageTopPosition=e.readInt16();t.imageWidth=e.readInt16();t.imageHeight=e.readInt16();var i=e.readByte();t.localColorTableFlag=(i&128)==128;t.interlaceFlag=(i&64)==64;t.sortFlag=(i&32)==32;t.sizeOfLocalColorTable=i&7};gif_images_GifDecoder.readLocalColorTable=function(e,t){var i=1<0){try{var a=0;while(s>=o;u-=o;if(f>r||f==l){break}if(f==n){o=m+1;_=(1<n){S[b++]=T[f];f=P[f]}v=T[f]&255;if(r>=s){break}S[b++]=v;P[r]=c;T[r]=v;++r;if((r&_)==0&&r=0){var o=HxOverrides.substr(n,0,_);var l=HxOverrides.substr(n,_+1,null);r=haxe_StackItem.Method(o,l)}}i.push(haxe_StackItem.FilePos(r,a.getFileName(),a.getLineNumber()))}return i};var i=haxe_CallStack.makeStack(e.stack);Error.prepareStackTrace=t;return i};haxe_CallStack.callStack=function(){try{throw new Error}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;var t=haxe_CallStack.getStack(e);t.shift();return t}};haxe_CallStack.exceptionStack=function(){return haxe_CallStack.getStack(haxe_CallStack.lastException)};haxe_CallStack.toString=function(e){var t=new StringBuf;var i=0;while(i0){if(n==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=n==null?"null":""+n}n=0}this.serialize(e[h])}}if(n>0){if(n==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=n==null?"null":""+n}}this.buf.b+="h";break;case Date:var c=e;this.buf.b+="v";this.buf.b+=Std.string(c.getTime());break;case List:this.buf.b+="l";var u=e;var f=u.h;while(f!=null){var p=f.item;f=f.next;var d=p;this.serialize(d)}this.buf.b+="h";break;case haxe_ds_IntMap:this.buf.b+="q";var g=e;var m=g.keys();while(m.hasNext()){var v=m.next();this.buf.b+=":";this.buf.b+=v==null?"null":""+v;this.serialize(g.h[v])}this.buf.b+="h";break;case haxe_ds_ObjectMap:this.buf.b+="M";var b=e;var y=b.keys();while(y.hasNext()){var x=y.next();var w=Reflect.field(x,"__id__");Reflect.deleteField(x,"__id__");this.serialize(x);x["__id__"]=w;this.serialize(b.h[x.__id__])}this.buf.b+="h";break;case haxe_ds_StringMap:this.buf.b+="b";var k=e;var P=k.keys();while(P.hasNext()){var C=P.next();this.serializeString(C);this.serialize(__map_reserved[C]!=null?k.getReserved(C):k.h[C])}this.buf.b+="h";break;case haxe_io_Bytes:var T=e;this.buf.b+="s";this.buf.b+=Std.string(Math.ceil(T.length*8/6));this.buf.b+=":";var M=0;var S=T.length-2;var $=haxe_Serializer.BASE64_CODES;if($==null){var E=haxe_Serializer.BASE64.length;var B=new Array(E);$=B;var L=0;var R=haxe_Serializer.BASE64.length;while(L>2]);this.buf.b+=String.fromCharCode($[(I<<4|D>>4)&63]);this.buf.b+=String.fromCharCode($[(D<<2|F>>6)&63]);this.buf.b+=String.fromCharCode($[F&63])}if(M==S){var O=T.b[M++];var G=T.b[M++];this.buf.b+=String.fromCharCode($[O>>2]);this.buf.b+=String.fromCharCode($[(O<<4|G>>4)&63]);this.buf.b+=String.fromCharCode($[G<<2&63])}else if(M==S+1){var j=T.b[M++];this.buf.b+=String.fromCharCode($[j>>2]);this.buf.b+=String.fromCharCode($[j<<4&63])}break;default:if(this.useCache){this.cache.pop()}if(e.hxSerialize!=null){this.buf.b+="C";this.serializeString(Type.getClassName(r));if(this.useCache){this.cache.push(e)}e.hxSerialize(this);this.buf.b+="g"}else{this.buf.b+="c";this.serializeString(Type.getClassName(r));if(this.useCache){this.cache.push(e)}this.serializeFields(e)}}break;case 7:var H=t[2];if(this.useCache){if(this.serializeRef(e)){return}this.cache.pop()}this.buf.b+=Std.string(this.useEnumIndex?"j":"w");this.serializeString(Type.getEnumName(H));if(this.useEnumIndex){this.buf.b+=":";this.buf.b+=Std.string(e[1])}else{this.serializeString(e[0])}this.buf.b+=":";var U=e["length"];this.buf.b+=Std.string(U-2);var N=2;var W=U;while(N57){break}e=e*10+(s-48);this.pos++}if(t){e*=-1}return e},readFloat:function(){var e=this.pos;while(true){var t=this.buf.charCodeAt(this.pos);if(t!=t){break}if(t>=43&&t<58||t==101||t==69){this.pos++}else{break}}return parseFloat(HxOverrides.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){while(true){if(this.pos>=this.length){throw new js__$Boot_HaxeError("Invalid object")}if(this.buf.charCodeAt(this.pos)==103){break}var t=this.unserialize();if(typeof t!="string"){throw new js__$Boot_HaxeError("Invalid object key")}var i=this.unserialize();e[t]=i}this.pos++},unserializeEnum:function(e,t){if(this.buf.charCodeAt(this.pos++)!=58){throw new js__$Boot_HaxeError("Invalid enum format")}var i=this.readDigits();if(i==0){return Type.createEnum(e,t)}var s=[];while(i-- >0)s.push(this.unserialize());return Type.createEnum(e,t,s)},unserialize:function(){var e=this.buf.charCodeAt(this.pos++);switch(e){case 65:var t=this.unserialize();var i=this.resolver.resolveClass(t);if(i==null){throw new js__$Boot_HaxeError("Class not found "+t)}return i;case 66:var s=this.unserialize();var a=this.resolver.resolveEnum(s);if(a==null){throw new js__$Boot_HaxeError("Enum not found "+s)}return a;case 67:var r=this.unserialize();var n=this.resolver.resolveClass(r);if(n==null){throw new js__$Boot_HaxeError("Class not found "+r)}var _=Type.createEmptyInstance(n);this.cache.push(_);_.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103){throw new js__$Boot_HaxeError("Invalid custom data")}return _;case 77:var o=new haxe_ds_ObjectMap;this.cache.push(o);var l=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var h=this.unserialize();o.set(h,this.unserialize())}this.pos++;return o;case 82:var c=this.readDigits();if(c<0||c>=this.scache.length){throw new js__$Boot_HaxeError("Invalid string reference")}return this.scache[c];case 97:var u=this.buf;var f=[];this.cache.push(f);while(true){var p=this.buf.charCodeAt(this.pos);if(p==104){this.pos++;break}if(p==117){this.pos++;var d=this.readDigits();f[f.length+d-1]=null}else{f.push(this.unserialize())}}return f;case 98:var g=new haxe_ds_StringMap;this.cache.push(g);var m=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var v=this.unserialize();var b=this.unserialize();if(__map_reserved[v]!=null){g.setReserved(v,b)}else{g.h[v]=b}}this.pos++;return g;case 99:var y=this.unserialize();var x=this.resolver.resolveClass(y);if(x==null){throw new js__$Boot_HaxeError("Class not found "+y)}var w=Type.createEmptyInstance(x);this.cache.push(w);this.unserializeObject(w);return w;case 100:return this.readFloat();case 102:return false;case 105:return this.readDigits();case 106:var k=this.unserialize();var P=this.resolver.resolveEnum(k);if(P==null){throw new js__$Boot_HaxeError("Enum not found "+k)}this.pos++;var C=this.readDigits();var T=P.__constructs__.slice()[C];if(T==null){throw new js__$Boot_HaxeError("Unknown enum index "+k+"@"+C)}var M=this.unserializeEnum(P,T);this.cache.push(M);return M;case 107:return NaN;case 108:var S=new List;this.cache.push(S);var $=this.buf;while(this.buf.charCodeAt(this.pos)!=104)S.add(this.unserialize());this.pos++;return S;case 109:return-Infinity;case 110:return null;case 111:var E={};this.cache.push(E);this.unserializeObject(E);return E;case 112:return Infinity;case 113:var B=new haxe_ds_IntMap;this.cache.push(B);var L=this.buf;var R=this.buf.charCodeAt(this.pos++);while(R==58){var A=this.readDigits();var I=this.unserialize();B.h[A]=I;R=this.buf.charCodeAt(this.pos++)}if(R!=104){throw new js__$Boot_HaxeError("Invalid IntMap format")}return B;case 114:var D=this.readDigits();if(D<0||D>=this.cache.length){throw new js__$Boot_HaxeError("Invalid reference")}return this.cache[D];case 115:var F=this.readDigits();var O=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos>2)*3+(H>=2?H-1:0);var N=j+(F-H);var W=new haxe_io_Bytes(new ArrayBuffer(U));var V=0;while(j>4)&255;var Y=G[O.charCodeAt(j++)];W.b[V++]=(X<<4|Y>>2)&255;var q=G[O.charCodeAt(j++)];W.b[V++]=(Y<<6|q)&255}if(H>=2){var J=G[O.charCodeAt(j++)];var K=G[O.charCodeAt(j++)];W.b[V++]=(J<<2|K>>4)&255;if(H==3){var Z=G[O.charCodeAt(j++)];W.b[V++]=(K<<4|Z>>2)&255}}this.pos+=F;this.cache.push(W);return W;case 116:return true;case 118:var Q;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&this.buf.charCodeAt(this.pos+4)==45){Q=HxOverrides.strDate(HxOverrides.substr(this.buf,this.pos,19));this.pos+=19}else{var ee=this.readFloat();Q=new Date(ee)}this.cache.push(Q);return Q;case 119:var te=this.unserialize();var ie=this.resolver.resolveEnum(te);if(ie==null){throw new js__$Boot_HaxeError("Enum not found "+te)}var se=this.unserializeEnum(ie,this.unserialize());this.cache.push(se);return se;case 120:throw js__$Boot_HaxeError.wrap(this.unserialize());break;case 121:var ae=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos>6);i.push(128|a&63)}else if(a<=65535){i.push(224|a>>12);i.push(128|a>>6&63);i.push(128|a&63)}else{i.push(240|a>>18);i.push(128|a>>12&63);i.push(128|a>>6&63);i.push(128|a&63)}}return new haxe_io_Bytes(new Uint8Array(i).buffer)};haxe_io_Bytes.ofData=function(e){var t=e.hxBytes;if(t!=null){return t}return new haxe_io_Bytes(e)};haxe_io_Bytes.ofHex=function(e){if((e.length&1)!=0){throw new js__$Boot_HaxeError("Not a hex string (odd number of digits)")}var t=[];var i=0;var s=e.length>>1;while(i>6)*9;r=(r&15)+((r&64)>>6)*9;t.push((a<<4|r)&255);++i}return new haxe_io_Bytes(new Uint8Array(t).buffer)};haxe_io_Bytes.fastGet=function(e,t){return e.bytes[t]};haxe_io_Bytes.prototype={length:null,b:null,data:null,blit:function(e,t,i,s){if(e<0||i<0||s<0||e+s>this.length||i+s>t.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(i==0&&s==t.b.byteLength){this.b.set(t.b,e)}else{this.b.set(t.b.subarray(i,i+s),e)}},getString:function(e,t,i){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var s="";var a=this.b;var r=String.fromCharCode;var n=e;var _=e+t;while(n<_){var o=a[n++];if(o<128){if(o==0){break}s+=r(o)}else if(o<224){s+=r((o&63)<<6|a[n++]&127)}else if(o<240){var l=a[n++];s+=r((o&31)<<12|(l&127)<<6|a[n++]&127)}else{var h=a[n++];var c=a[n++];var u=(o&15)<<18|(h&127)<<12|(c&127)<<6|a[n++]&127;s+=r((u>>10)+55232);s+=r(u&1023|56320)}}return s},toString:function(){return this.getString(0,this.length)},__class__:haxe_io_Bytes};var haxe_crypto_Base64=function(){};$hxClasses["haxe.crypto.Base64"]=haxe_crypto_Base64;haxe_crypto_Base64.__name__=["haxe","crypto","Base64"];haxe_crypto_Base64.encode=function(e,t){if(t==null){t=true}var i=new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).encodeBytes(e).toString();if(t){var s=e.length%3;switch(s){case 1:i+="==";break;case 2:i+="=";break;default:}}return i};haxe_crypto_Base64.decode=function(e,t){if(t==null){t=true}if(t){while(HxOverrides.cca(e,e.length-1)==61)e=HxOverrides.substr(e,0,-1)}return new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).decodeBytes(haxe_io_Bytes.ofString(e))};var haxe_crypto_BaseCode=function(e){var t=e.length;var i=1;while(t>1<8||t!=1<>n&_]&255}if(n>0){a.b[l++]=i.b[r<>3;var r=new haxe_io_Bytes(new ArrayBuffer(a));var n=0;var _=0;var o=0;var l=0;while(l>_&255&255}return r},__class__:haxe_crypto_BaseCode};var haxe_ds_ArraySort=function(){};$hxClasses["haxe.ds.ArraySort"]=haxe_ds_ArraySort;haxe_ds_ArraySort.__name__=["haxe","ds","ArraySort"];haxe_ds_ArraySort.sort=function(e,t){haxe_ds_ArraySort.rec(e,t,0,e.length)};haxe_ds_ArraySort.rec=function(e,t,i,s){var a=i+s>>1;if(s-i<12){if(s<=i){return}var r=i+1;var n=s;while(ri){if(t(e[o],e[o-1])<0){haxe_ds_ArraySort.swap(e,o-1,o)}else{break}--o}}return}haxe_ds_ArraySort.rec(e,t,i,a);haxe_ds_ArraySort.rec(e,t,a,s);haxe_ds_ArraySort.doMerge(e,t,i,a,s,a-i,s-a)};haxe_ds_ArraySort.doMerge=function(e,t,i,s,a,r,n){var _;var o;var l;var h;var c;if(r==0||n==0){return}if(r+n==2){if(t(e[s],e[i])<0){haxe_ds_ArraySort.swap(e,s,i)}return}if(r>n){l=r>>1;_=i+l;o=haxe_ds_ArraySort.lower(e,t,s,a,_);h=o-s}else{h=n>>1;o=s+h;_=haxe_ds_ArraySort.upper(e,t,i,s,o);l=_-i}haxe_ds_ArraySort.rotate(e,t,_,s,o);c=_+h;haxe_ds_ArraySort.doMerge(e,t,i,_,c,l,h);haxe_ds_ArraySort.doMerge(e,t,c,o,a,r-l,n-h)};haxe_ds_ArraySort.rotate=function(e,t,i,s,a){var r;if(i==s||s==a){return}r=haxe_ds_ArraySort.gcd(a-i,s-i);while(r--!=0){var n=e[i+r];var _=s-i;var o=i+r;var l=i+r+_;while(l!=i+r){e[o]=e[l];o=l;if(a-l>_){l+=_}else{l=i+(_-(a-l))}}e[o]=n}};haxe_ds_ArraySort.gcd=function(e,t){while(t!=0){var i=e%t;e=t;t=i}return e};haxe_ds_ArraySort.upper=function(e,t,i,s,a){var r=s-i;var n;var _;while(r>0){n=r>>1;_=i+n;if(t(e[a],e[_])<0){r=n}else{i=_+1;r=r-n-1}}return i};haxe_ds_ArraySort.lower=function(e,t,i,s,a){var r=s-i;var n;var _;while(r>0){n=r>>1;_=i+n;if(t(e[_],e[a])<0){i=_+1;r=r-n-1}else{r=n}}return i};haxe_ds_ArraySort.swap=function(e,t,i){var s=e[t];e[t]=e[i];e[i]=s};var haxe_ds_IntMap=function(){this.h={}};$hxClasses["haxe.ds.IntMap"]=haxe_ds_IntMap;haxe_ds_IntMap.__name__=["haxe","ds","IntMap"];haxe_ds_IntMap.__interfaces__=[haxe_IMap];haxe_ds_IntMap.prototype={h:null,set:function(e,t){this.h[e]=t},get:function(e){return this.h[e]},exists:function(e){return this.h.hasOwnProperty(e)},remove:function(e){if(!this.h.hasOwnProperty(e)){return false}delete this.h[e];return true},keys:function(){var e=[];for(var t in this.h)if(this.h.hasOwnProperty(t)){e.push(t|0)}return HxOverrides.iter(e)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var e=this.it.next();return this.ref[e]}}},__class__:haxe_ds_IntMap};var haxe_ds__$StringMap_StringMapIterator=function(e,t){this.map=e;this.keys=t;this.index=0;this.count=t.length};$hxClasses["haxe.ds._StringMap.StringMapIterator"]=haxe_ds__$StringMap_StringMapIterator;haxe_ds__$StringMap_StringMapIterator.__name__=["haxe","ds","_StringMap","StringMapIterator"];haxe_ds__$StringMap_StringMapIterator.prototype={map:null,keys:null,index:null,count:null,hasNext:function(){return this.index>>31<<1);var i=e>>>23&255;var s=e&8388607;if(s==0&&i==0){return 0}return t*(1+Math.pow(2,-23)*s)*Math.pow(2,i-127)};haxe_io_FPHelper.floatToI32=function(e){if(e==0){return 0}var t=e<0?-e:e;var i=Math.floor(Math.log(t)/.6931471805599453);if(i<-127){i=-127}else if(i>128){i=128}var s=Math.round((t/Math.pow(2,i)-1)*8388608);if(s==8388608&&i<128){s=0;++i}return(e<0?-2147483648:0)|i+127<<23|s};haxe_io_FPHelper.i64ToDouble=function(e,t){var i=1-(t>>>31<<1);var s=(t>>20&2047)-1023;var a=(t&1048575)*4294967296+(e>>>31)*2147483648+(e&2147483647);if(a==0&&s==-1023){return 0}return i*(1+Math.pow(2,-52)*a)*Math.pow(2,s)};haxe_io_FPHelper.doubleToI64=function(e){var t=haxe_io_FPHelper.i64tmp;if(e==0){t.low=0;t.high=0}else if(!isFinite(e)){if(e>0){t.low=0;t.high=2146435072}else{t.low=0;t.high=-1048576}}else{var i=e<0?-e:e;var s=Math.floor(Math.log(i)/.6931471805599453);var a=Math.round((i/Math.pow(2,s)-1)*4503599627370496);var r=a|0;var n=a/4294967296|0;t.low=r;t.high=(e<0?-2147483648:0)|s+1023<<20|n}return t};var haxe_io_Path=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var i=e.lastIndexOf("\\");if(t=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){if(i==o){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,i))}a=Xml.createElement(HxOverrides.substr(e,o,i-o));s.addChild(a);++l;r=0;n=4;continue}break;case 4:switch(c){case 47:r=11;break;case 62:r=9;break;default:r=5;o=i;continue}break;case 5:if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){var d;if(o==i){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected attribute name",e,i))}d=HxOverrides.substr(e,o,i-o);_=d;if(a.exists(_)){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Duplicate attribute ["+_+"]",e,i))}r=0;n=6;continue}break;case 6:if(c==61){r=0;n=7}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected =",e,i))}break;case 7:switch(c){case 34:case 39:u=new StringBuf;r=8;o=i+1;p=c;break;default:throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException('Expected "',e,i))}break;case 8:switch(c){case 38:var g=i-o;u.b+=g==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,g);r=18;f=8;o=i+1;break;case 60:case 62:if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid unescaped "+String.fromCharCode(c)+" in attribute value",e,i))}else if(c==p){var m=i-o;u.b+=m==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,m);var v=u.b;u=new StringBuf;a.set(_,v);r=0;n=4}break;default:if(c==p){var b=i-o;u.b+=b==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,b);var y=u.b;u=new StringBuf;a.set(_,y);r=0;n=4}}break;case 9:i=haxe_xml_Parser.doParse(e,t,i,a);o=i;r=1;break;case 10:if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){if(o==i){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,i))}var x=HxOverrides.substr(e,o,i-o);if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}if(x!=s.nodeName){if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected ",e,i))}r=0;n=12;continue}break;case 11:if(c==62){r=1}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,i))}break;case 12:if(c==62){if(l==0){s.addChild(Xml.createPCData(""))}return i}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,i))}break;case 13:if(c==60){var w=i-o;u.b+=w==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,w);var k=Xml.createPCData(u.b);u=new StringBuf;s.addChild(k);++l;r=0;n=2}else if(c==38){var P=i-o;u.b+=P==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,P);r=18;f=13;o=i+1}break;case 14:if(c==63&&e.charCodeAt(i+1)==62){++i;var C=HxOverrides.substr(e,o+1,i-o-2);s.addChild(Xml.createProcessingInstruction(C));++l;r=1}break;case 15:if(c==45&&e.charCodeAt(i+1)==45&&e.charCodeAt(i+2)==62){s.addChild(Xml.createComment(HxOverrides.substr(e,o,i-o)));++l;i+=2;r=1}break;case 16:if(c==91){++h}else if(c==93){--h}else if(c==62&&h==0){s.addChild(Xml.createDocType(HxOverrides.substr(e,o,i-o)));++l;r=1}break;case 17:if(c==93&&e.charCodeAt(i+1)==93&&e.charCodeAt(i+2)==62){var T=Xml.createCData(HxOverrides.substr(e,o,i-o));s.addChild(T);++l;i+=2;r=1}break;case 18:if(c==59){var M=HxOverrides.substr(e,o,i-o);if(M.charCodeAt(0)==35){var S=M.charCodeAt(1)==120?Std.parseInt("0"+HxOverrides.substr(M,1,M.length-1)):Std.parseInt(HxOverrides.substr(M,1,M.length-1));u.b+=String.fromCharCode(S)}else{var $=haxe_xml_Parser.escapes;if(!(__map_reserved[M]!=null?$.existsReserved(M):$.h.hasOwnProperty(M))){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: "+M,e,i))}u.b+=Std.string("&"+M+";")}else{var E=haxe_xml_Parser.escapes;var B=__map_reserved[M]!=null?E.getReserved(M):E.h[M];u.b+=Std.string(B)}}o=i+1;r=f}else if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)&&c!=35){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid character in entity: "+String.fromCharCode(c),e,i))}u.b+="&";var L=i-o;u.b+=L==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,L);o=i--;r=f}break}c=e.charCodeAt(++i)}if(r==1){o=i;r=13}if(r==13){if(i!=o||l==0){var R=i-o;u.b+=R==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,R);s.addChild(Xml.createPCData(u.b));++l}return i}if(!t&&r==18&&f==13){u.b+="&";var A=i-o;u.b+=A==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,A);s.addChild(Xml.createPCData(u.b));++l;return i}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Unexpected end",e,i))};var haxe_xml_Printer=function(e){this.output=new StringBuf;this.pretty=e};$hxClasses["haxe.xml.Printer"]=haxe_xml_Printer;haxe_xml_Printer.__name__=["haxe","xml","Printer"];haxe_xml_Printer.print=function(e,t){if(t==null){t=false}var i=new haxe_xml_Printer(t);i.writeNode(e,"");return i.output.b};haxe_xml_Printer.prototype={output:null,pretty:null,writeNode:function(e,t){var i=e.nodeType;switch(i){case 0:this.output.b+=Std.string(t+"<");if(e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+e.nodeType)}this.output.b+=Std.string(e.nodeName);var s=e.attributes();while(s.hasNext()){var a=s.next();this.output.b+=Std.string(" "+a+'="');var r=StringTools.htmlEscape(e.get(a),true);this.output.b+=Std.string(r);this.output.b+='"'}if(this.hasChildren(e)){this.output.b+=">";if(this.pretty){this.output.b+="\n"}if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var n=HxOverrides.iter(e.children);while(n.hasNext()){var _=n.next();this.writeNode(_,this.pretty?t+"\t":t)}this.output.b+=Std.string(t+"";if(this.pretty){this.output.b+="\n"}}else{this.output.b+="/>";if(this.pretty){this.output.b+="\n"}}break;case 1:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}var o=e.nodeValue;if(o.length!=0){var l=t+StringTools.htmlEscape(o);this.output.b+=Std.string(l);if(this.pretty){this.output.b+="\n"}}break;case 2:this.output.b+=Std.string(t+"";if(this.pretty){this.output.b+="\n"}break;case 3:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}var c=e.nodeValue;var u=new RegExp("[\n\r\t]+","g".split("u").join(""));c=c.replace(u,"");c="\x3c!--"+c+"--\x3e";this.output.b+=t==null?"null":""+t;var f=StringTools.trim(c);this.output.b+=Std.string(f);if(this.pretty){this.output.b+="\n"}break;case 4:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}this.output.b+=Std.string("");if(this.pretty){this.output.b+="\n"}break;case 5:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}this.output.b+=Std.string("");if(this.pretty){this.output.b+="\n"}break;case 6:if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var p=HxOverrides.iter(e.children);while(p.hasNext()){var d=p.next();this.writeNode(d,t)}break}},hasChildren:function(e){if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var t=HxOverrides.iter(e.children);while(t.hasNext()){var i=t.next();var s=i.nodeType;switch(s){case 0:case 1:return true;case 2:case 3:if(i.nodeType==Xml.Document||i.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+i.nodeType)}if(StringTools.ltrim(i.nodeValue).length!=0){return true}break;default:}}return false},__class__:haxe_xml_Printer};var haxe_zip_ExtraField=$hxClasses["haxe.zip.ExtraField"]={__ename__:["haxe","zip","ExtraField"],__constructs__:["FUnknown","FInfoZipUnicodePath","FUtf8"]};haxe_zip_ExtraField.FUnknown=function(e,t){var i=["FUnknown",0,e,t];i.__enum__=haxe_zip_ExtraField;i.toString=$estr;return i};haxe_zip_ExtraField.FInfoZipUnicodePath=function(e,t){var i=["FInfoZipUnicodePath",1,e,t];i.__enum__=haxe_zip_ExtraField;i.toString=$estr;return i};haxe_zip_ExtraField.FUtf8=["FUtf8",2];haxe_zip_ExtraField.FUtf8.toString=$estr;haxe_zip_ExtraField.FUtf8.__enum__=haxe_zip_ExtraField;var haxe_zip_Huffman=$hxClasses["haxe.zip.Huffman"]={__ename__:["haxe","zip","Huffman"],__constructs__:["Found","NeedBit","NeedBits"]};haxe_zip_Huffman.Found=function(e){var t=["Found",0,e];t.__enum__=haxe_zip_Huffman;t.toString=$estr;return t};haxe_zip_Huffman.NeedBit=function(e,t){var i=["NeedBit",1,e,t];i.__enum__=haxe_zip_Huffman;i.toString=$estr;return i};haxe_zip_Huffman.NeedBits=function(e,t){var i=["NeedBits",2,e,t];i.__enum__=haxe_zip_Huffman;i.toString=$estr;return i};var haxe_zip_HuffTools=function(){};$hxClasses["haxe.zip.HuffTools"]=haxe_zip_HuffTools;haxe_zip_HuffTools.__name__=["haxe","zip","HuffTools"];haxe_zip_HuffTools.prototype={treeDepth:function(e){switch(e[1]){case 0:return 0;case 1:var t=e[3];var i=e[2];var s=this.treeDepth(i);var a=this.treeDepth(t);return 1+(s0){this.treeWalk(e,t,i+1,s-1,n);this.treeWalk(e,t|1<t){throw new js__$Boot_HaxeError("Invalid huffman")}var a=i<<5|s;if(e.h.hasOwnProperty(a)){return haxe_zip_Huffman.Found(e.h[a])}i<<=1;++s;return haxe_zip_Huffman.NeedBit(this.treeMake(e,t,i,s),this.treeMake(e,t,i|1,s))},make:function(e,t,i,s){var a=[];var r=[];if(s>32){throw new js__$Boot_HaxeError("Invalid huffman")}var n=0;var _=s;while(n<_){var o=n++;a.push(0);r.push(0)}var l=0;var h=i;while(l=s){throw new js__$Boot_HaxeError("Invalid huffman")}a[u]++}var f=0;var p=1;var d=s-1;while(p65536){this.slide()}this.buffer.blit(this.pos,e,t,i);this.pos+=i},addByte:function(e){if(this.pos==65536){this.slide()}this.buffer.b[this.pos]=e&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){if(this.crc!=null){this.crc.update(this.buffer,0,this.pos)}return this.crc},__class__:haxe_zip__$InflateImpl_Window};var haxe_zip__$InflateImpl_State=$hxClasses["haxe.zip._InflateImpl.State"]={__ename__:["haxe","zip","_InflateImpl","State"],__constructs__:["Head","Block","CData","Flat","Crc","Dist","DistOne","Done"]};haxe_zip__$InflateImpl_State.Head=["Head",0];haxe_zip__$InflateImpl_State.Head.toString=$estr;haxe_zip__$InflateImpl_State.Head.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Block=["Block",1];haxe_zip__$InflateImpl_State.Block.toString=$estr;haxe_zip__$InflateImpl_State.Block.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.CData=["CData",2];haxe_zip__$InflateImpl_State.CData.toString=$estr;haxe_zip__$InflateImpl_State.CData.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Flat=["Flat",3];haxe_zip__$InflateImpl_State.Flat.toString=$estr;haxe_zip__$InflateImpl_State.Flat.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Crc=["Crc",4];haxe_zip__$InflateImpl_State.Crc.toString=$estr;haxe_zip__$InflateImpl_State.Crc.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Dist=["Dist",5];haxe_zip__$InflateImpl_State.Dist.toString=$estr;haxe_zip__$InflateImpl_State.Dist.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.DistOne=["DistOne",6];haxe_zip__$InflateImpl_State.DistOne.toString=$estr;haxe_zip__$InflateImpl_State.DistOne.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Done=["Done",7];haxe_zip__$InflateImpl_State.Done.toString=$estr;haxe_zip__$InflateImpl_State.Done.__enum__=haxe_zip__$InflateImpl_State;var haxe_zip_InflateImpl=function(e,t,i){if(i==null){i=true}if(t==null){t=true}this["final"]=false;this.htools=new haxe_zip_HuffTools;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.len=0;this.dist=0;this.state=t?haxe_zip__$InflateImpl_State.Head:haxe_zip__$InflateImpl_State.Block;this.input=e;this.bits=0;this.nbits=0;this.needed=0;this.output=null;this.outpos=0;this.lengths=[];var s=0;while(s<19){var a=s++;this.lengths.push(-1)}this.window=new haxe_zip__$InflateImpl_Window(i)};$hxClasses["haxe.zip.InflateImpl"]=haxe_zip_InflateImpl;haxe_zip_InflateImpl.__name__=["haxe","zip","InflateImpl"];haxe_zip_InflateImpl.prototype={nbits:null,bits:null,state:null,final: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(haxe_zip_InflateImpl.FIXED_HUFFMAN!=null){return haxe_zip_InflateImpl.FIXED_HUFFMAN}var e=[];var t=0;while(t<288){var i=t++;e.push(i<=143?8:i<=255?9:i<=279?7:8)}haxe_zip_InflateImpl.FIXED_HUFFMAN=this.htools.make(e,0,288,10);return haxe_zip_InflateImpl.FIXED_HUFFMAN},readBytes:function(e,t,i){this.needed=i;this.outpos=t;this.output=e;if(i>0){while(this.inflateLoop()){}}return i-this.needed},getBits:function(e){while(this.nbits>=e;return t},getBit:function(){if(this.nbits==0){this.nbits=8;this.bits=this.input.readByte()}var e=(this.bits&1)==1;this.nbits--;this.bits>>=1;return e},getRevBits:function(e){if(e==0){return 0}else if(this.getBit()){return 1<t){throw new js__$Boot_HaxeError("Invalid data")}while(it){throw new js__$Boot_HaxeError("Invalid data")}break;case 18:i+=11+this.getBits(7);if(i>t){throw new js__$Boot_HaxeError("Invalid data")}break;default:throw new js__$Boot_HaxeError("Invalid data")}}},inflateLoop:function(){var e=this.state;switch(e[1]){case 0:var t=this.input.readByte();var i=t&15;var s=t>>4;if(i!=8){throw new js__$Boot_HaxeError("Invalid data")}var a=this.input.readByte();var r=(a&32)!=0;if(((t<<8)+a)%31!=0){throw new js__$Boot_HaxeError("Invalid data")}if(r){throw new js__$Boot_HaxeError("Unsupported dictionary")}this.state=haxe_zip__$InflateImpl_State.Block;return true;case 1:this["final"]=this.getBit();var n=this.getBits(2);switch(n){case 0:this.len=this.input.readUInt16();var _=this.input.readUInt16();if(_!=65535-this.len){throw new js__$Boot_HaxeError("Invalid data")}this.state=haxe_zip__$InflateImpl_State.Flat;var o=this.inflateLoop();this.resetBits();return o;case 1:this.huffman=this.buildFixedHuffman();this.huffdist=null;this.state=haxe_zip__$InflateImpl_State.CData;return true;case 2:var l=this.getBits(5)+257;var h=this.getBits(5)+1;var c=this.getBits(4)+4;var u=0;var f=c;while(u0}else if(x==256){this.state=this["final"]?haxe_zip__$InflateImpl_State.Crc:haxe_zip__$InflateImpl_State.Block;return true}else{x-=257;var w=haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL[x];if(w==-1){throw new js__$Boot_HaxeError("Invalid data")}this.len=haxe_zip_InflateImpl.LEN_BASE_VAL_TBL[x]+this.getBits(w);var k=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);w=haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL[k];if(w==-1){throw new js__$Boot_HaxeError("Invalid data")}this.dist=haxe_zip_InflateImpl.DIST_BASE_VAL_TBL[k]+this.getBits(w);if(this.dist>this.window.available()){throw new js__$Boot_HaxeError("Invalid data")}this.state=this.dist==1?haxe_zip__$InflateImpl_State.DistOne:haxe_zip__$InflateImpl_State.Dist;return true}break;case 3:var P=this.len0;case 4:var T=this.window.checksum();if(T==null){this.state=haxe_zip__$InflateImpl_State.Done;return true}var M=haxe_crypto_Adler32.read(this.input);if(!T.equals(M)){throw new js__$Boot_HaxeError("Invalid CRC")}this.state=haxe_zip__$InflateImpl_State.Done;return true;case 5:while(this.len>0&&this.needed>0){var S=this.len0;case 6:var E=this.len0;case 7:return false}},__class__:haxe_zip_InflateImpl};var haxe_zip_Reader=function(e){this.i=e};$hxClasses["haxe.zip.Reader"]=haxe_zip_Reader;haxe_zip_Reader.__name__=["haxe","zip","Reader"];haxe_zip_Reader.prototype={i:null,readZipDate:function(){var e=this.i.readUInt16();var t=e>>11&31;var i=e>>5&63;var s=e&31;var a=this.i.readUInt16();var r=a>>9;var n=a>>5&15;var _=a&31;return new Date(r+1980,n-1,_,t,i,s<<1)},readExtraFields:function(e){var t=new List;while(e>0){if(e<4){throw new js__$Boot_HaxeError("Invalid extra fields data")}var i=this.i.readUInt16();var s=this.i.readUInt16();if(ei.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var o=r.b;var l=i.b;var h=0;var c=_;while(h0){f.push(d)}}}u.sort($bind(this,this.__sortDepths));var g;var m;var v;var b;var y;var x=0;var w=u.length;while(xC.depth&&m<=C.clipDepth){b.set_mask(C.displayObject);y=true;break}}if(f.length>0&&!y&&b.get_mask()!=null){b.set_mask(null)}}var T;var M=u.length;var S=this.__children.length;while(M1){this.play()}this.__enterFrame(0);this.__instanceFields=Type.getInstanceFields(js_Boot.getClass(this));this.__updateInstanceFields()},__getNextFrame:function(e){var t=0;this.__timeElapsed+=e;t=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime);if(t<1){t=1}if(t>this.__totalFrames){t=Math.floor((t-1)%this.__totalFrames)+1}this.__timeElapsed%=this.__frameTime;return t},__goto:function(e){if(this.__symbol==null){return}if(e<1){e=1}else if(e>this.__totalFrames){e=this.__totalFrames}this.__currentFrame=e;this.__enterFrame(0)},__resolveFrameReference:function(e){if(typeof e=="number"&&(e|0)===e){return e}else if(typeof e=="string"){var t=e;var i=0;var s=this.__currentLabels;while(i0){this._currentObject.alpha-=.1}else{this._currentObject.visible=false;this._fadeOutTimer.stop()}},fadeInTimer:function(e){if(this._currentObject.alpha<1){this._currentObject.alpha+=.1}else{this._fadeInTimer.stop()}},fadeOut:function(e,t){if(t==null){t=500}if(!e.visible){e.visible=true}e.alpha=1;this._currentObject=e;this._fadeOutTimer=new openfl_utils_Timer(t/10);this._fadeOutTimer.addEventListener("timer",$bind(this,this.fadeOutTimer));this._fadeOutTimer.start()},fadeIn:function(e,t){if(t==null){t=500}if(e.visible){e.visible=false}e.alpha=0;this._currentObject=e;this._currentObject.visible=true;this._fadeInTimer=new openfl_utils_Timer(t/10);this._fadeInTimer.addEventListener("timer",$bind(this,this.fadeInTimer));this._fadeInTimer.start()},__class__:jaris_animation_AnimationsBase};var jaris_display_Loader=function(e){openfl_display_Sprite.call(this);this._movieClip=e;this._background=new openfl_display_Sprite;this.addChild(this._background);this._loaderTrack=new openfl_display_Sprite;this.addChild(this._loaderTrack);this._loaderThumb=new openfl_display_Sprite;this.addChild(this._loaderThumb);this._brightColor=5000268;this._controlColor=16777215;this._forward=true;this._visible=true;this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this.drawLoader()};$hxClasses["jaris.display.Loader"]=jaris_display_Loader;jaris_display_Loader.__name__=["jaris","display","Loader"];jaris_display_Loader.__super__=openfl_display_Sprite;jaris_display_Loader.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_background:null,_loaderTrack:null,_loaderThumb:null,_visible:null,_brightColor:null,_controlColor:null,_forward:null,onEnterFrame:function(e){if(this._visible){if(this._forward){if(this._loaderThumb.get_x()+this._loaderThumb.get_width()>=this._loaderTrack.get_x()+this._loaderTrack.get_width()){this._forward=false}else{var t=this._loaderThumb;t.set_x(t.get_x()+10)}}else if(this._loaderThumb.get_x()<=this._loaderTrack.get_x()){this._forward=true}else{var i=this._loaderThumb;i.set_x(i.get_x()-10)}}},onResize:function(e){this.drawLoader()},drawLoader:function(){this._background.get_graphics().clear();this._loaderTrack.get_graphics().clear();this._loaderThumb.get_graphics().clear();var e=.65*this._movieClip.get_width();var t=30;this._background.set_x(this._movieClip.get_width()/2-e/2);this._background.set_y(this._movieClip.get_height()/2-t/2);this._background.get_graphics().lineStyle();this._background.get_graphics().beginFill(this._brightColor,.5);this._background.get_graphics().drawRoundRect(0,0,e,t,6,6);this._background.get_graphics().endFill();var i=.5*this._movieClip.get_width();var s=15;this._loaderTrack.set_x(this._movieClip.get_width()/2-i/2);this._loaderTrack.set_y(this._movieClip.get_height()/2-s/2);this._loaderTrack.get_graphics().lineStyle(2,this._controlColor);this._loaderTrack.get_graphics().drawRect(0,0,i,s);this._loaderThumb.set_x(this._loaderTrack.get_x());this._loaderThumb.set_y(this._loaderTrack.get_y());this._loaderThumb.get_graphics().lineStyle();this._loaderThumb.get_graphics().beginFill(this._controlColor,1);this._loaderThumb.get_graphics().drawRect(0,0,s,s)},show:function(){this.set_visible(true);this._visible=true},setColors:function(e){this._brightColor=e[0].length>0?Std.parseInt("0x"+e[0]):5000268;this._controlColor=e[1].length>0?Std.parseInt("0x"+e[1]):16777215;this.drawLoader()},__class__:jaris_display_Loader});var jaris_display_Logo=function(e,t,i,s){if(s==null){s=0}openfl_display_Sprite.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=openfl_Lib.get_current();this._loader=new openfl_display_Loader;this._position=t;this._alpha=i;this._source=e;this._width=s;this._loading=true;this.set_tabEnabled(false);this._loader.contentLoaderInfo.addEventListener("complete",$bind(this,this.onLoaderComplete));this._loader.contentLoaderInfo.addEventListener("ioError",$bind(this,this.onNotLoaded));this._loader.load(new openfl_net_URLRequest(e))};$hxClasses["jaris.display.Logo"]=jaris_display_Logo;jaris_display_Logo.__name__=["jaris","display","Logo"];jaris_display_Logo.__super__=openfl_display_Sprite;jaris_display_Logo.prototype=$extend(openfl_display_Sprite.prototype,{_stage:null,_movieClip:null,_loader:null,_position:null,_alpha:null,_source:null,_width:null,_link:null,_loading:null,onNotLoaded:function(e){},onLoaderComplete:function(e){this.addChild(this._loader);this.setWidth(this._width);this.setPosition(this._position);this.setAlpha(this._alpha);this._loading=false;this._stage.addEventListener("resize",$bind(this,this.onStageResize))},onStageResize:function(e){this.setPosition(this._position)},onLogoClick:function(e){openfl_Lib.getURL(new openfl_net_URLRequest(this._link),"_blank");e.stopPropagation()},setPosition:function(e){switch(e){case"bottom left":this.set_x(25);this.set_y(this._stage.stageHeight-this.get_height()-25);break;case"bottom right":this.set_x(this._stage.stageWidth-this.get_width()-25);this.set_y(this._stage.stageHeight-this.get_height()-25);break;case"top left":this.set_x(25);this.set_y(25);break;case"top right":this.set_x(this._stage.stageWidth-this._width-25);this.set_y(25);break;default:this.set_x(25);this.set_y(25)}},setAlpha:function(e){this.set_alpha(e)},setWidth:function(e){if(e>0){this.set_height(this.get_height()/this.get_width()*e);this.set_width(e)}},setLink:function(e){this._link=e;this.set_buttonMode(true);this.useHandCursor=true;this.addEventListener("click",$bind(this,this.onLogoClick))},__class__:jaris_display_Logo});var jaris_display_Poster=function(e,t){openfl_display_Sprite.call(this);this._movieClip=t;this._loader=new openfl_display_Loader;this._source=e;this._loading=true;var i=openfl_Lib.get_current().get_loaderInfo().parameters;var s=["","","",""];s[0]=i.brightcolor!=null?i.brightcolor:"";s[1]=i.controlcolor!=null?i.controlcolor:"";this._loaderStatus=new jaris_display_Loader(this._movieClip);this._loaderStatus.show();this._loaderStatus.setColors(s);this._loader.contentLoaderInfo.addEventListener("complete",$bind(this,this.onLoaderComplete));this._loader.contentLoaderInfo.addEventListener("ioError",$bind(this,this.onNotLoaded));this._loader.load(new openfl_net_URLRequest(e))};$hxClasses["jaris.display.Poster"]=jaris_display_Poster;jaris_display_Poster.__name__=["jaris","display","Poster"];jaris_display_Poster.__super__=openfl_display_Sprite;jaris_display_Poster.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_loader:null,_source:null,_width:null,_height:null,_loading:null,_loaderStatus:null,_player:null,onNotLoaded:function(e){},onLoaderComplete:function(e){this.addChild(this._loader);this._width=this.get_width();this._height=this.get_height();this._loading=false;this._movieClip.addEventListener("resize",$bind(this,this.onStageResize));this.resizeImage()},onStageResize:function(e){this.resizeImage()},onPlayerMediaInitialized:function(e){if(this._player.getType()==jaris_player_InputType.VIDEO){this.set_visible(false)}},onPlayerPlay:function(e){if(this._player.getType()==jaris_player_InputType.VIDEO){this.set_visible(false)}},onPlayBackFinished:function(e){this.set_visible(true)},resizeImage:function(){var e=this._width/this._height;var t=this._movieClip.get_realWidth();var i=this._movieClip.get_realHeight();var s=this._movieClip.get_realWidth();var a=this._movieClip.get_realHeight();if(e>=1){a=t/e;if(a>i){a=i;s=a*e}}else{s=i*e;if(s>t){s=t;a=s/e}}this.set_height(a);this.set_width(s);this.set_x(this._movieClip.get_realWidth()/2-this.get_width()/2)},setPlayer:function(e){this._player=e;this._player.addEventListener(jaris_events_PlayerEvents.MEDIA_INITIALIZED,$bind(this,this.onPlayerMediaInitialized));this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayBackFinished));this._player.addEventListener(jaris_events_PlayerEvents.PLAY_PAUSE,$bind(this,this.onPlayerPlay))},__class__:jaris_display_Poster});var jaris_events_PlayerEvents=function(e,t,i){if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.fullscreen=false;this.mute=false;this.volume=1;this.duration=0;this.width=0;this.height=0;this.time=0;this.name=e;this.errinfo=""};$hxClasses["jaris.events.PlayerEvents"]=jaris_events_PlayerEvents;jaris_events_PlayerEvents.__name__=["jaris","events","PlayerEvents"];jaris_events_PlayerEvents.__super__=openfl_events_Event;jaris_events_PlayerEvents.prototype=$extend(openfl_events_Event.prototype,{name:null,aspectRatio:null,duration:null,fullscreen:null,mute:null,volume:null,width:null,height:null,stream:null,sound:null,time:null,id3Info:null,errinfo:null,__class__:jaris_events_PlayerEvents});var jaris_player_AspectRatio=function(){};$hxClasses["jaris.player.AspectRatio"]=jaris_player_AspectRatio;jaris_player_AspectRatio.__name__=["jaris","player","AspectRatio"];jaris_player_AspectRatio.getAspectRatio=function(e,t){return e/t};var jaris_player_InputType=function(){};$hxClasses["jaris.player.InputType"]=jaris_player_InputType;jaris_player_InputType.__name__=["jaris","player","InputType"];var jaris_player_Loop=function(e){this._player=e;this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayerStop))};$hxClasses["jaris.player.Loop"]=jaris_player_Loop;jaris_player_Loop.__name__=["jaris","player","Loop"];jaris_player_Loop.prototype={_player:null,onPlayerStop:function(e){this._player.togglePlay()},__class__:jaris_player_Loop};var openfl_media_Video=function(e,t){if(t==null){t=240}if(e==null){e=320}openfl_display_DisplayObject.call(this);this.__width=e;this.__height=t;this.__textureTime=-1;this.smoothing=false;this.deblocking=0};$hxClasses["openfl.media.Video"]=openfl_media_Video;openfl_media_Video.__name__=["openfl","media","Video"];openfl_media_Video.__super__=openfl_display_DisplayObject;openfl_media_Video.prototype=$extend(openfl_display_DisplayObject.prototype,{deblocking:null,smoothing:null,__active:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__width:null,attachNetStream:function(e){this.__stream=e;if(this.__stream!=null&&this.__stream.__video!=null&&!this.__stream.__closed){this.__stream.__video.play()}},__enterFrame:function(e){if(this.__renderable&&this.__stream!=null){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__getBounds:function(e,t){var i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.__width,this.__height);i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__getIndexBuffer:function(e){var t=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context){var i=new Uint16Array(6);this.__indexBufferData=i;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=e.__context;this.__indexBuffer=e.createIndexBuffer(6);this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},__getTexture:function(e){if(this.__stream==null||this.__stream.__video==null){return null}var t=e.__context.webgl;var i=t.RGBA;var s=t.RGBA;if(!this.__stream.__closed&&this.__stream.__video.currentTime!=this.__textureTime){if(this.__texture==null){this.__texture=e.createRectangleTexture(this.__stream.__video.videoWidth,this.__stream.__video.videoHeight,1,false)}e.__bindGLTexture2D(this.__texture.__textureID);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,i,s,t.UNSIGNED_BYTE,this.__stream.__video);this.__textureTime=this.__stream.__video.currentTime}return this.__texture},__getVertexBuffer:function(e){var t=e.gl;if(this.__vertexBuffer==null||this.__vertexBufferContext!=e.__context){var i=1;var s=1;var a=new Float32Array(20);this.__vertexBufferData=a;this.__vertexBufferData[0]=this.get_width();this.__vertexBufferData[1]=this.get_height();this.__vertexBufferData[3]=i;this.__vertexBufferData[4]=s;this.__vertexBufferData[6]=this.get_height();this.__vertexBufferData[9]=s;this.__vertexBufferData[10]=this.get_width();this.__vertexBufferData[13]=i;this.__vertexBufferContext=e.__context;this.__vertexBuffer=e.createVertexBuffer(3,5);this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},__hitTest:function(e,t,i,s,a,r){if(!r.get_visible()||this.__isMask){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}this.__getRenderTransform();var n=this.__renderTransform;var _=n.a*n.d-n.b*n.c;var o=_==0?-n.tx:1/_*(n.c*(n.ty-t)+n.d*(e-n.tx));var l=this.__renderTransform;var h=l.a*l.d-l.b*l.c;var c=h==0?-l.ty:1/h*(l.a*(t-l.ty)+l.b*(l.tx-e));if(o>0&&c>0&&o<=this.__width&&c<=this.__height){if(s!=null&&!a){s.push(r)}return true}return false},__hitTestMask:function(e,t){var i=openfl_geom_Point.__pool.get();i.setTo(e,t);this.__globalToLocal(i,i);var s=i.x>0&&i.y>0&&i.x<=this.__width&&i.y<=this.__height;openfl_geom_Point.__pool.release(i);return s},__renderCanvas:function(e){openfl__$internal_renderer_canvas_CanvasVideo.render(this,e);this.__renderEvent(e)},__renderDOM:function(e){openfl__$internal_renderer_dom_DOMVideo.render(this,e);this.__renderEvent(e)},__renderGL:function(e){openfl__$internal_renderer_context3D_Context3DVideo.render(this,e);this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DVideo.renderMask(this,e)},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(e){if(this.get_scaleY()!=1||e!=this.__height){this.__setTransformDirty();this.__dirty=true}this.set_scaleY(1);return this.__height=e},get_width:function(){return this.__width*this.__scaleX},set_width:function(e){if(this.__scaleX!=1||this.__width!=e){this.__setTransformDirty();this.__dirty=true}this.set_scaleX(1);return this.__width=e},__class__:openfl_media_Video});var openfl_net_NetStream=function(e,t){openfl_events_EventDispatcher.call(this);this.__connection=e;this.__video=window.document.createElement("video");this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.addEventListener("error",$bind(this,this.video_onError),false);this.__video.addEventListener("waiting",$bind(this,this.video_onWaiting),false);this.__video.addEventListener("ended",$bind(this,this.video_onEnd),false);this.__video.addEventListener("pause",$bind(this,this.video_onPause),false);this.__video.addEventListener("seeking",$bind(this,this.video_onSeeking),false);this.__video.addEventListener("playing",$bind(this,this.video_onPlaying),false);this.__video.addEventListener("timeupdate",$bind(this,this.video_onTimeUpdate),false);this.__video.addEventListener("loadstart",$bind(this,this.video_onLoadStart),false);this.__video.addEventListener("stalled",$bind(this,this.video_onStalled),false);this.__video.addEventListener("durationchanged",$bind(this,this.video_onDurationChanged),false);this.__video.addEventListener("canplay",$bind(this,this.video_onCanPlay),false);this.__video.addEventListener("canplaythrough",$bind(this,this.video_onCanPlayThrough),false);this.__video.addEventListener("loadedmetadata",$bind(this,this.video_onLoadMetaData),false)};$hxClasses["openfl.net.NetStream"]=openfl_net_NetStream;openfl_net_NetStream.__name__=["openfl","net","NetStream"];openfl_net_NetStream.__super__=openfl_events_EventDispatcher;openfl_net_NetStream.prototype=$extend(openfl_events_EventDispatcher.prototype,{bufferTime:null,bytesLoaded:null,bytesTotal:null,client:null,soundTransform:null,time:null,__closed:null,__connection:null,__video:null,play:function(e,t,i,s,a,r){if(this.__video==null){return}this.__video.src=e;this.__video.play()},resume:function(){if(this.__video!=null){this.__video.play()}},togglePause:function(){if(this.__video==null){return}if(this.__video.paused){this.__video.play()}else{this.__video.pause()}},__playStatus:function(e){if(this.__video==null){return}if(this.client!=null){try{var t=this.client.onPlayStatus;t({code:e,duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,start:this.__video.startTime})}catch(e){haxe_CallStack.lastException=e}}},video_onCanPlay:function(e){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(e){this.__playStatus("NetStream.Play.canplaythrough")},video_onDurationChanged:function(e){this.__playStatus("NetStream.Play.durationchanged")},video_onEnd:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Stop"}));this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Complete"}));this.__playStatus("NetStream.Play.Complete")},video_onError:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Stop"}));this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(e){if(this.__video==null){return}if(this.client!=null){try{var t=this.client.onMetaData;t({width:this.__video.videoWidth,height:this.__video.videoHeight,duration:this.__video.duration})}catch(e){haxe_CallStack.lastException=e}}},video_onLoadStart:function(e){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(e){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Start"}));this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(e){this.__playStatus("NetStream.Play.seeking");this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Seek.Complete"}))},video_onStalled:function(e){this.__playStatus("NetStream.Play.stalled")},video_onTimeUpdate:function(e){if(this.__video==null){return}this.time=this.__video.currentTime;this.__playStatus("NetStream.Play.timeupdate")},video_onWaiting:function(e){this.__playStatus("NetStream.Play.waiting")},__class__:openfl_net_NetStream});var jaris_player_MyNetStream=function(e){openfl_net_NetStream.call(this,e);this.displayStatus=false;window.document.getElementById("openfl-content").appendChild(this.__video);this.__video.addEventListener("seeked",$bind(this,this.video_onSeeked),false);this.__video.addEventListener("progress",$bind(this,this.video_onProgress),false);this.__video.addEventListener("volumechange",$bind(this,this.video_onVolumechange),false)};$hxClasses["jaris.player.MyNetStream"]=jaris_player_MyNetStream;jaris_player_MyNetStream.__name__=["jaris","player","MyNetStream"];jaris_player_MyNetStream.__super__=openfl_net_NetStream;jaris_player_MyNetStream.prototype=$extend(openfl_net_NetStream.prototype,{displayStatus:null,seek:function(e){var t=e;if(t<0){t=0}else if(t>this.__video.duration){t=this.__video.duration}this.__video.currentTime=t},set_displayState:function(e){if(e){var t=function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.msRequestFullscreen)e.msRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();e.webkitEnterFullscreen()};t(this.__video)}else{var i=function(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}};i()}this.displayStatus=e;return this.displayStatus},video_onCanPlayThrough:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.canplaythrough"}));this.__playStatus("NetStream.Play.canplaythrough")},video_onError:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Error"}));this.__playStatus("NetStream.Play.error")},video_onPause:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.pause"}));this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Start",duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,width:this.__video.videoWidth,height:this.__video.videoHeight,start:this.__video.startTime}));this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.SeekStart.Notify"}));this.__playStatus("NetStream.SeekStart.Notify")},video_onSeeked:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Seek.Notify"}));this.__playStatus("NetStream.Seek.Notify")},video_onProgress:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Buffer.Empty"}));try{this.bytesLoaded=this.__video.buffered.end(0)|0;this.bytesTotal=this.__video.duration|0}catch(e){haxe_CallStack.lastException=e}this.__playStatus("NetStream.Buffer.Empty")},video_onTimeUpdate:function(e){this.time=this.__video.currentTime;if(this.soundTransform!=null){if(this.soundTransform.volume!=null){if(this.__video.volume!=this.soundTransform.volume){this.__video.volume=this.soundTransform.volume}}}this.__playStatus("NetStream.Play.timeupdate")},video_onVolumechange:function(e){if(this.soundTransform!=null){if(null!=this.soundTransform.volume){this.soundTransform.volume=this.__video.volume}}this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.volumechange"}));this.__playStatus("NetStream.Play.volumechange")},__class__:jaris_player_MyNetStream});var jaris_player_Player=function(e){openfl_events_EventDispatcher.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=e;this._mouseVisible=true;this._soundMuted=false;this._volume=1;this._bufferTime=10;this._fullscreen=false;this._mediaLoaded=false;this._hideMouseTimer=new openfl_utils_Timer(1500);this._checkAudioTimer=new openfl_utils_Timer(100);this._seekPoints=[];this._downloadCompleted=false;this._startTime=0;this._firstLoad=true;this._stopped=false;this._videoQualityHigh=false;this._isPlaying=false;this._streamType=jaris_player_StreamType.FILE;this._type=jaris_player_InputType.VIDEO;this._server="";this._currentAspectRatio="original";this._aspectRatio=0;this._lastTime=0;this._lastProgress=0;this._userSettings=new jaris_player_UserSettings;this._sound=new openfl_media_Sound;this._sound.addEventListener("complete",$bind(this,this.onSoundComplete));this._sound.addEventListener("id3",$bind(this,this.onSoundID3));this._sound.addEventListener("ioError",$bind(this,this.onSoundIOError));this._sound.addEventListener("progress",$bind(this,this.onSoundProgress));this._connection=new openfl_net_NetConnection;this._connection.connect(null);this._stream=new jaris_player_MyNetStream(this._connection);this._video=new openfl_media_Video(this._movieClip.get_realWidth()|0,this._movieClip.get_realHeight()|0);this._movieClip.addChild(this._video);this._video.attachNetStream(this._stream);this._videoMask=new openfl_display_Sprite;this._movieClip.addChild(this._videoMask);this.toggleQuality();this._movieClip.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("keyDown",$bind(this,this.onKeyDown));this._movieClip.addEventListener("mouseMove",$bind(this,this.onMouseMove));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this._hideMouseTimer.addEventListener("timer",$bind(this,this.hideMouseTimer));this._checkAudioTimer.addEventListener("timer",$bind(this,this.checkAudioTimer));this._connection.addEventListener("netStatus",$bind(this,this.onNetStatus));this._connection.addEventListener("asyncError",$bind(this,this.errorHandler));this._connection.addEventListener("ioError",$bind(this,this.errorHandler))};$hxClasses["jaris.player.Player"]=jaris_player_Player;jaris_player_Player.__name__=["jaris","player","Player"];jaris_player_Player.__super__=openfl_events_EventDispatcher;jaris_player_Player.prototype=$extend(openfl_events_EventDispatcher.prototype,{_stage:null,_movieClip:null,_connection:null,_stream:null,_fullscreen:null,_soundMuted:null,_volume:null,_bufferTime:null,_mouseVisible:null,_mediaLoaded:null,_hideMouseTimer:null,_checkAudioTimer:null,_mediaSource:null,_type:null,_streamType:null,_server:null,_sound:null,_soundChannel:null,_id3Info:null,_video:null,_videoWidth:null,_videoHeight:null,_videoMask:null,_videoQualityHigh:null,_mediaDuration:null,_lastTime:null,_lastProgress:null,_isPlaying:null,_aspectRatio:null,_currentAspectRatio:null,_originalAspectRatio:null,_mediaEndReached:null,_seekPoints:null,_downloadCompleted:null,_startTime:null,_firstLoad:null,_stopped:null,_useHardWareScaling:null,_youtubeLoader:null,_userSettings:null,_org_parent:null,_org_RealWidth:null,_org_RealHeight:null,get_movieClip:function(){return this._movieClip},hideMouseTimer:function(e){if(this._fullscreen){if(this._mouseVisible){this._mouseVisible=false}else{openfl_ui_Mouse.hide();this.callEvents(jaris_events_PlayerEvents.MOUSE_HIDE);this._hideMouseTimer.stop()}}},checkAudioTimer:function(e){if(this._soundChannel.get_position()+100>=this._sound.get_length()){this._isPlaying=false;this._mediaEndReached=true;this.callEvents(jaris_events_PlayerEvents.PLAYBACK_FINISHED);this._checkAudioTimer.stop()}},errorHandler:function(e){this.callEvents(jaris_events_PlayerEvents.ERROR,e.text)},onNetStatus:function(e){var t=e.info.code;switch(t){case"NetStream.Buffer.Empty":if(this._stream.bytesLoaded!=this._stream.bytesTotal){this.callEvents(jaris_events_PlayerEvents.BUFFERING)}break;case"NetStream.Play.Error":this.callEvents(jaris_events_PlayerEvents.CONNECTION_FAILED);break;case"NetStream.Play.Start":this.onConnectFinished(e);this._isPlaying=true;this._mediaEndReached=false;if(this._stream.bytesLoaded!=this._stream.bytesTotal||this._streamType==jaris_player_StreamType.RTMP){this.callEvents(jaris_events_PlayerEvents.BUFFERING)}break;case"NetStream.Play.Stop":if(this._streamType!=jaris_player_StreamType.RTMP){this._isPlaying=false;this._mediaEndReached=true;this.callEvents(jaris_events_PlayerEvents.PLAYBACK_FINISHED)}break;case"NetStream.Play.canplaythrough":if(this._stream.bytesLoaded==this._stream.bytesTotal){this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING);this._downloadCompleted=true}break;case"NetStream.Play.volumechange":this.setVolume(this._stream.soundTransform.volume);break;case"NetStream.Seek.Notify":this._mediaEndReached=false;if(this._streamType==jaris_player_StreamType.RTMP){this._isPlaying=true;this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE)}break;case"connectSuccess":if(this._streamType==jaris_player_StreamType.RTMP){this._stream=new jaris_player_MyNetStream(this._connection);this._stream.addEventListener("netStatus",$bind(this,this.onNetStatus));this._stream.bufferTime=10;this._stream.play(jaris_utils_Utils.rtmpSourceParser(this._mediaSource),true);this._stream.client=this;if(this._type==jaris_player_InputType.VIDEO){this._video.attachNetStream(this._stream)}}this.callEvents(jaris_events_PlayerEvents.CONNECTION_SUCCESS);break}},onKeyDown:function(e){var t=70;var i=77;var s=88;if(e.keyCode==9){this.toggleAspectRatio()}else if(e.keyCode==t){this.toggleFullscreen()}else if(e.keyCode==i){this.toggleMute()}else if(e.keyCode==38){this.volumeUp()}else if(e.keyCode==40){this.volumeDown()}else if(e.keyCode==39){this.forward()}else if(e.keyCode==37){this.rewind()}else if(e.keyCode==32){this.togglePlay()}else if(e.keyCode==s){this.stopAndClose()}e.stopPropagation()},onMouseMove:function(e){if(this._fullscreen&&!this._mouseVisible){if(!this._hideMouseTimer.running){this._hideMouseTimer.start()}this._mouseVisible=true;openfl_ui_Mouse.show();this.callEvents(jaris_events_PlayerEvents.MOUSE_SHOW)}e.stopPropagation()},onResize:function(e){this.resizeAndCenterPlayer()},onmyFullScreen:function(){if(!this._fullscreen){openfl_ui_Mouse.show();this.callEvents(jaris_events_PlayerEvents.MOUSE_SHOW);this._mouseVisible=true}else{this._mouseVisible=true;this._hideMouseTimer.start()}this.resizeAndCenterPlayer();this.callEvents(jaris_events_PlayerEvents.FULLSCREEN)},onConnectFinished:function(e){if(this._firstLoad){this._isPlaying=true;this._firstLoad=false;if(e.info.width){this._videoWidth=e.info.width;this._videoHeight=e.info.height}else{this._videoWidth=this._video.get_width();this._videoHeight=this._video.get_height()}this._mediaLoaded=true;this._mediaDuration=e.info.duration;this._originalAspectRatio=jaris_player_AspectRatio.getAspectRatio(this._videoWidth,this._videoHeight);if(this._aspectRatio<=0){this._aspectRatio=this._originalAspectRatio}this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED);this.resizeAndCenterPlayer();this.setVolume(this._userSettings.getVolume())}},onEnterFrame:function(e){if(this.getDuration()>0&&this._lastTime!=this.getCurrentTime()){this._lastTime=this.getCurrentTime();this.callEvents(jaris_events_PlayerEvents.TIME)}if(this.getBytesLoaded()>0&&this._lastProgress0){this._video.set_width(this._video.get_height()*this._aspectRatio)}this._video.set_x(this._movieClip.get_realWidth()/2-this._video.get_width()/2);this._video.set_y(0);if(this._video.get_width()>this._movieClip.get_realWidth()&&this._aspectRatio==this._originalAspectRatio){var e=this._videoHeight/this._videoWidth;this._video.set_width(this._movieClip.get_realWidth());this._video.set_height(e*this._video.get_width());this._video.set_x(0);this._video.set_y(this._movieClip.get_realHeight()/2-this._video.get_height()/2)}this._videoMask.get_graphics().clear();this._videoMask.get_graphics().lineStyle();this._videoMask.get_graphics().beginFill(0,0);this._videoMask.get_graphics().drawRect(this._video.get_x(),this._video.get_y(),this._video.get_width(),this._video.get_height());this._videoMask.get_graphics().endFill()}else{if(this._youtubeLoader!=null){if(Reflect.field(this._youtubeLoader.content,"setSize")!=null){Reflect.field(this._youtubeLoader.content,"setSize")(this._movieClip.get_realWidth(),this._movieClip.get_realHeight())}}this._videoMask.get_graphics().clear();this._videoMask.get_graphics().lineStyle();this._videoMask.get_graphics().beginFill(0,0);this._videoMask.get_graphics().drawRect(0,0,this._movieClip.get_realWidth(),this._movieClip.get_realHeight());this._videoMask.get_graphics().endFill()}this.callEvents(jaris_events_PlayerEvents.RESIZE)},getBestSeekPoint:function(e){if(this._seekPoints.length>0){var t="0";var i="0";var s=0;var a=Reflect.fields(this._seekPoints);while(s=this._startTime&&ee){e=this.seek(e)}return e},rewind:function(){var e=this.getCurrentTime()-8+this._startTime;if(e>=this._startTime){e=this.seek(e)}return e},seek:function(e){if(this._startTime<=1&&this._downloadCompleted){if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.stop();this._soundChannel=this._sound.play(e*1e3);if(!this._isPlaying){this._soundChannel.stop()}this.setVolume(this._userSettings.getVolume())}}else if(this._seekPoints.length>0&&this._streamType==jaris_player_StreamType.PSEUDOSTREAM){e=this.getBestSeekPoint(e);if(this.canSeek(e)){this._stream.seek(e-this._startTime)}else if(e!=this._startTime){this._startTime=e;var t;if(this._mediaSource.indexOf("?")!=-1){t=this._mediaSource+"&start="+e}else{t=this._mediaSource+"?start="+e}this._stream.play(t)}}else if(this._streamType==jaris_player_StreamType.YOUTUBE){if(!this.canSeek(e)){if(this._youtubeLoader!=null){this._startTime=e;var i=Reflect.field(this._youtubeLoader.content,"seekTo");if(i!=null){i(e)}}}else if(this._youtubeLoader!=null){var s=Reflect.field(this._youtubeLoader.content,"seekTo");if(s!=null){s(e)}}}else if(this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this.canSeek(e)){if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.stop();this._soundChannel=this._sound.play(e*1e3);if(!this._isPlaying){this._soundChannel.stop()}this.setVolume(this._userSettings.getVolume())}}this.callEvents(jaris_events_PlayerEvents.SEEK);return e},isPlaying:function(){return this._isPlaying},toggleAspectRatio:function(){var e=this._currentAspectRatio;switch(e){case"14:10":this._aspectRatio=1.7777777777777777;this._currentAspectRatio="16:9";break;case"14:9":this._aspectRatio=1.4;this._currentAspectRatio="14:10";break;case"16:10":this._aspectRatio=this._originalAspectRatio;this._currentAspectRatio="original";break;case"16:9":this._aspectRatio=1.6;this._currentAspectRatio="16:10";break;case"1:1":this._aspectRatio=1.5;this._currentAspectRatio="3:2";break;case"3:2":this._aspectRatio=1.3333333333333333;this._currentAspectRatio="4:3";break;case"4:3":this._aspectRatio=1.25;this._currentAspectRatio="5:4";break;case"5:4":this._aspectRatio=1.5555555555555556;this._currentAspectRatio="14:9";break;case"original":this._aspectRatio=1;this._currentAspectRatio="1:1";break;default:this._aspectRatio=this._originalAspectRatio;this._currentAspectRatio="original"}this.resizeAndCenterPlayer();this.callEvents(jaris_events_PlayerEvents.ASPECT_RATIO);if(this._aspectRatio==this._originalAspectRatio){this._userSettings.setAspectRatio(0)}else{this._userSettings.setAspectRatio(this._aspectRatio)}return this._aspectRatio},togglePlay:function(){if(this._mediaLoaded){if(this._mediaEndReached){this._mediaEndReached=false;if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"seekTo")(0);Reflect.field(this._youtubeLoader.content,"playVideo")()}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(0);this._stream.togglePause()}else if(this._type==jaris_player_InputType.AUDIO){this._checkAudioTimer.start();this._soundChannel=this._sound.play();this.setVolume(this._userSettings.getVolume())}}else if(this._mediaLoaded){if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._isPlaying){Reflect.field(this._youtubeLoader.content,"pauseVideo")()}else{Reflect.field(this._youtubeLoader.content,"playVideo")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.togglePause()}else if(this._type==jaris_player_InputType.AUDIO){if(this._isPlaying){this._soundChannel.stop()}else{if(this._soundChannel.get_position()+100>=this._sound.get_length()){this._soundChannel=this._sound.play()}else{this._soundChannel=this._sound.play(this._soundChannel.get_position())}this.setVolume(this._userSettings.getVolume())}}}else if(this._stopped){this.load(this._mediaSource,this._type,this._streamType,this._server)}this._isPlaying=!this._isPlaying;this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE);return this._isPlaying}else if(this._mediaSource!=""){this.load(this._mediaSource,this._type,this._streamType,this._server);return true}this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE);return false},toggleFullscreen:function(){if(this._fullscreen){if(this._org_parent!=null){this._org_parent.addChild(this._movieClip)}this._movieClip.resize(this._org_RealWidth,this._org_RealHeight);this._stage.set_displayState(2);this._fullscreen=false;this.onmyFullScreen();return false}else{this._org_parent=js_Boot.__cast(this._movieClip.parent,openfl_display_Sprite);this._org_RealWidth=this._movieClip.get_realWidth();this._org_RealHeight=this._movieClip.get_realHeight();if(this._useHardWareScaling){var e=openfl_system_Capabilities.get_screenResolutionY()/openfl_system_Capabilities.get_screenResolutionX()}this._stage.set_displayState(0);this._stage.addChild(this._movieClip);this._movieClip.set_x(0);this._movieClip.set_y(0);this._movieClip.resize(this._stage.stageWidth,this._stage.stageHeight);this._stage.set_focus(this._stage);this._fullscreen=true;this.onmyFullScreen();return true}},toggleQuality:function(){if(this._videoQualityHigh){this._video.smoothing=false;this._video.deblocking=1}else{this._video.smoothing=true;this._video.deblocking=5}this._videoQualityHigh=this._videoQualityHigh?false:true;return this._videoQualityHigh},toggleMute:function(){var e=new openfl_media_SoundTransform;var t;if(this._soundMuted){this._soundMuted=false;if(this._volume>0){e.volume=this._volume}else{this._volume=1;e.volume=this._volume}t=false}else{this._soundMuted=true;this._volume=this._stream.soundTransform.volume;e.volume=0;this._stream.soundTransform=e;t=true}if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"setVolume")(e.volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.set_soundTransform(e);this.setVolume(this._userSettings.getVolume())}this.callEvents(jaris_events_PlayerEvents.MUTE);return t},isFullscreen:function(){return this._stage.get_displayState()==0},volumeUp:function(){var e=new openfl_media_SoundTransform;if(this._soundMuted){this._soundMuted=false}if(this._volume<1){if(this._streamType==jaris_player_StreamType.YOUTUBE){this._volume=(Reflect.field(this._youtubeLoader.content,"getVolume")()+10)/100;if(this._volume>1){this._volume=1}Reflect.field(this._youtubeLoader.content,"setVolume")(this._volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._volume=this._stream.soundTransform.volume+.1;if(this._volume>1){this._volume=1}e.volume=this._volume;this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._volume=this._soundChannel.get_soundTransform().volume+.1;if(this._volume>1){this._volume=1}e.volume=this._volume;this._soundChannel.set_soundTransform(e)}}if(this._volume>=1){this._volume=1}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_UP);return this._volume},volumeDown:function(){var e=new openfl_media_SoundTransform;if(!this._soundMuted){if(this._streamType==jaris_player_StreamType.YOUTUBE){this._volume=(Reflect.field(this._youtubeLoader.content,"getVolume")()-10)/100;if(this._volume<0){this._volume=0}Reflect.field(this._youtubeLoader.content,"setVolume")(this._volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._volume=this._stream.soundTransform.volume-.1;if(this._volume<0){this._volume=0}e.volume=this._volume;this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._volume=this._soundChannel.get_soundTransform().volume-.1;if(this._volume<0){this._volume=0}e.volume=this._volume;this._soundChannel.set_soundTransform(e)}if(this._volume<=0){this._soundMuted=true;this._volume=0}}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_DOWN);return this._volume},setStreamType:function(e){this._streamType=e},setSource:function(e){this._mediaSource=e},setVolume:function(e){var t=new openfl_media_SoundTransform;if(e>this._volume){this.callEvents(jaris_events_PlayerEvents.VOLUME_UP)}if(e0){this._soundMuted=false;this._volume=e}else{this._soundMuted=true;this._volume=1}t.volume=e;if(!this._firstLoad){if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"setVolume")(t.volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.soundTransform=t}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.set_soundTransform(t)}}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_CHANGE)},getVolume:function(){return this._volume},getAspectRatio:function(){return this._aspectRatio},getAspectRatioString:function(){return this._currentAspectRatio},getDuration:function(){return this._mediaDuration},getStartTime:function(){return this._startTime},getNetStream:function(){return this._stream},getSound:function(){return this._sound},getId3Info:function(){return this._id3Info},getMute:function(){return this._soundMuted},getBytesTotal:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null&&this._mediaLoaded){e=Reflect.field(this._youtubeLoader.content,"getVideoBytesTotal")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.bytesTotal}else if(this._type==jaris_player_InputType.AUDIO){e=this._sound.bytesTotal}return e},getBytesLoaded:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null&&this._mediaLoaded){e=Reflect.field(this._youtubeLoader.content,"getVideoBytesLoaded")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.bytesLoaded}else if(this._type==jaris_player_InputType.AUDIO){e=this._sound.bytesLoaded}return e},getType:function(){return this._type},getCurrentTime:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null){if(this._youtubeLoader.content!=null){var t=Reflect.field(this._youtubeLoader.content,"getCurrentTime");if(t!=null){e=t()}else{e=0}}else{e=0}}else{e=0}}else if(this._streamType==jaris_player_StreamType.PSEUDOSTREAM){e=this.getStartTime()+this._stream.time}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.time}else if(this._type==jaris_player_InputType.AUDIO){if(this._soundChannel!=null){e=this._soundChannel.get_position()/1e3}else{e=0}}return e},__class__:jaris_player_Player});var jaris_player_StreamType=function(){};$hxClasses["jaris.player.StreamType"]=jaris_player_StreamType;jaris_player_StreamType.__name__=["jaris","player","StreamType"];var jaris_player_UserSettings=function(){this._settings=openfl_net_SharedObject.getLocal("JarisPlayerUserSettings")};$hxClasses["jaris.player.UserSettings"]=jaris_player_UserSettings;jaris_player_UserSettings.__name__=["jaris","player","UserSettings"];jaris_player_UserSettings.prototype={_settings:null,isSet:function(e){return Object.prototype.hasOwnProperty.call(this._settings.data,e)},setVolume:function(e){this._settings.data.volume=e;this._settings.flush()},setAspectRatio:function(e){this._settings.data.aspectratio=e;this._settings.flush()},getVolume:function(){if(!this.isSet("volume")){return 1}return this._settings.data.volume},__class__:jaris_player_UserSettings};var jaris_player_newcontrols_AspectRatioIcon=function(e,t,i,s,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=i;this._height=s;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.AspectRatioIcon"]=jaris_player_newcontrols_AspectRatioIcon;jaris_player_newcontrols_AspectRatioIcon.__name__=["jaris","player","newcontrols","AspectRatioIcon"];jaris_player_newcontrols_AspectRatioIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_AspectRatioIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor)},onMouseOut:function(e){this.draw(this._normalColor)},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var i=[e,e];var s=[.75,1];var a=[0,255];var r=.7*this.get_width();var n=.4*this.get_height();var _=this.get_width()/2-r/2+1;var o=this.get_height()/2-n/2+1;this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,a,t);this.get_graphics().drawRect(0,0,1,this._height+1);this.get_graphics().drawRect(0,0,this._width+1,1);this.get_graphics().drawRect(this._width+1,0,1,this._height+1);this.get_graphics().drawRect(0,this._height+1,this._width+1,1);this.get_graphics().drawRect(_,o,r,n);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_AspectRatioIcon});var jaris_player_newcontrols_FullscreenIcon=function(e,t,i,s,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=i;this._height=s;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.FullscreenIcon"]=jaris_player_newcontrols_FullscreenIcon;jaris_player_newcontrols_FullscreenIcon.__name__=["jaris","player","newcontrols","FullscreenIcon"];jaris_player_newcontrols_FullscreenIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_FullscreenIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=this._width/2*.8|0;var i=new openfl_geom_Matrix;i.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var a=[.75,1];var r=[0,255];this.get_graphics().lineStyle(0,e,0,true);this.get_graphics().beginGradientFill(0,s,a,r,i);this.get_graphics().drawRect(0,0,t,2);this.get_graphics().drawRect(0,2,2,t-2);this.get_graphics().drawRect(this._width-t+1,0,t,2);this.get_graphics().drawRect(this._width-1,2,2,t-2);this.get_graphics().drawRect(0,this._height-t+2,2,t);this.get_graphics().drawRect(2,this._height,t-2,2);this.get_graphics().drawRect(this._width-1,this._height-t+2,2,t-2);this.get_graphics().drawRect(this._width-t+1,this._height,t,2);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_FullscreenIcon});var jaris_player_newcontrols_Loader=function(e){openfl_display_Sprite.call(this);this._movieClip=e;this._background=new openfl_display_Sprite;this.addChild(this._background);this._loaderTrack=new openfl_display_Sprite;this.addChild(this._loaderTrack);this._loaderThumb=new openfl_display_Sprite;this.addChild(this._loaderThumb);this._darkColor=0;this._controlColor=16777215;this._seekColor=7631988;this._forward=true;this._visible=true;this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this.drawLoader()};$hxClasses["jaris.player.newcontrols.Loader"]=jaris_player_newcontrols_Loader;jaris_player_newcontrols_Loader.__name__=["jaris","player","newcontrols","Loader"];jaris_player_newcontrols_Loader.__super__=openfl_display_Sprite;jaris_player_newcontrols_Loader.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_background:null,_loaderTrack:null,_loaderThumb:null,_visible:null,_darkColor:null,_controlColor:null,_seekColor:null,_forward:null,onEnterFrame:function(e){if(this._visible){if(this._forward){if(this._loaderThumb.get_x()+this._loaderThumb.get_width()>=this._loaderTrack.get_x()+this._loaderTrack.get_width()){this._forward=false}else{var t=this._loaderThumb;t.set_x(t.get_x()+10)}}else if(this._loaderThumb.get_x()<=this._loaderTrack.get_x()){this._forward=true}else{var i=this._loaderThumb;i.set_x(i.get_x()-10)}}},onResize:function(e){this.drawLoader()},drawLoader:function(){this._background.get_graphics().clear();this._loaderTrack.get_graphics().clear();this._loaderThumb.get_graphics().clear();var e=.65*this._movieClip.get_realWidth();var t=30;this._background.set_x(this._movieClip.get_realWidth()/2-e/2);this._background.set_y(this._movieClip.get_realHeight()/2-t/2);this._background.get_graphics().lineStyle();this._background.get_graphics().beginFill(this._darkColor,.75);this._background.get_graphics().drawRoundRect(0,0,e,t,6,6);this._background.get_graphics().endFill();var i=.5*this._movieClip.get_realWidth();var s=11;this._loaderTrack.set_x(this._movieClip.get_realWidth()/2-i/2);this._loaderTrack.set_y(this._movieClip.get_realHeight()/2-s/2);this._loaderTrack.get_graphics().lineStyle();this._loaderTrack.get_graphics().beginFill(this._seekColor,.3);this._loaderTrack.get_graphics().drawRoundRect(0,s/2/2,i,s/2,5,5);var a=new openfl_geom_Matrix;a.createGradientBox(s*3,s,jaris_utils_Utils.degreesToRadians(-90),s*3,0);var r=[this._controlColor,this._controlColor];var n=[.75,1];var _=[0,255];this._loaderThumb.set_x(this._loaderTrack.get_x());this._loaderThumb.set_y(this._loaderTrack.get_y());this._loaderThumb.get_graphics().lineStyle();this._loaderThumb.get_graphics().beginGradientFill(0,r,n,_,a);this._loaderThumb.get_graphics().drawRoundRect(0,0,s*3,s,10,10)},hide:function(){this.set_visible(false);this._visible=false},setColors:function(e){this._darkColor=e[0].length>0?Std.parseInt("0x"+e[0]):0;this._controlColor=e[1].length>0?Std.parseInt("0x"+e[1]):16777215;this._seekColor=e[2].length>0?Std.parseInt("0x"+e[2]):7631988;this.drawLoader()},__class__:jaris_player_newcontrols_Loader});var jaris_player_newcontrols_TVideooPlayerBigButton=function(e){openfl_display_Sprite.call(this);this._container=new openfl_display_Sprite;var t=new openfl_display_Bitmap(openfl_utils_Assets.getBitmapData(e));this._container.addChild(t);this.addChild(this._container);this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUp));this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver))};$hxClasses["jaris.player.newcontrols.TVideooPlayerBigButton"]=jaris_player_newcontrols_TVideooPlayerBigButton;jaris_player_newcontrols_TVideooPlayerBigButton.__name__=["jaris","player","newcontrols","TVideooPlayerBigButton"];jaris_player_newcontrols_TVideooPlayerBigButton.__super__=openfl_display_Sprite;jaris_player_newcontrols_TVideooPlayerBigButton.prototype=$extend(openfl_display_Sprite.prototype,{OnClick:null,_container:null,onMouseUp:function(e){this._container.set_alpha(1);e.stopPropagation()},onMouseClick:function(e){this._container.set_alpha(.8);if(this.OnClick!=null){this.OnClick()}e.stopPropagation()},onMouseOver:function(e){this._container.set_alpha(.8);e.stopPropagation()},onMouseOut:function(e){this._container.set_alpha(1);e.stopPropagation()},__class__:jaris_player_newcontrols_TVideooPlayerBigButton});var jaris_player_newcontrols_NewControls=function(e){var t=this;openfl_display_MovieClip.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=e.get_movieClip();this._player=e;this._darkColor=0;this._brightColor=5000268;this._controlColor=16777215;this._hoverColor=6793409;this._seekColor=8158332;this._controlSize=40;this._percentLoaded=0;this._hideControlsTimer=new openfl_utils_Timer(500);this._hideAspectRatioLabelTimer=new openfl_utils_Timer(500);this._controlsVisible=false;this._textFormat=new openfl_text_TextFormat;this._textFormat.font="arial";this._textFormat.color=this._controlColor;this._textFormat.size=14;this._controlsBar=new openfl_display_Sprite;this._controlsBar.set_visible(true);this.addChild(this._controlsBar);this._controlsBar.addEventListener("mouseDown",function(e){e.stopPropagation()});this._controlsBar.addEventListener("mouseUp",function(e){e.stopPropagation()});this._playControl=new jaris_player_newcontrols_PlayIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._playControl);this._pauseControl=new jaris_player_newcontrols_PauseIcon(0,0,0,0,this._controlColor,this._hoverColor);this._pauseControl.set_visible(false);this._controlsBar.addChild(this._pauseControl);this._aspectRatioControl=new jaris_player_newcontrols_AspectRatioIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._aspectRatioControl);this._fullscreenControl=new jaris_player_newcontrols_FullscreenIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._fullscreenControl);this._volumeIcon=new jaris_player_newcontrols_VolumeIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._volumeIcon);this._volumeSlider=new openfl_display_Sprite;this._volumeSlider.set_visible(false);this._controlsBar.addChild(this._volumeSlider);this._volumeTrack=new openfl_display_Sprite;this._volumeTrack.set_visible(false);this._volumeTrack.set_buttonMode(true);this._volumeTrack.useHandCursor=true;this._volumeTrack.set_tabEnabled(false);this._controlsBar.addChild(this._volumeTrack);this._seekBar=new openfl_display_Sprite;this._controlsBar.addChild(this._seekBar);this._trackDownloaded=new openfl_display_Sprite;this._trackDownloaded.set_tabEnabled(false);this._seekBar.addChild(this._trackDownloaded);this._track=new openfl_display_Sprite;this._track.set_tabEnabled(false);this._track.set_buttonMode(true);this._track.useHandCursor=true;this._seekBar.addChild(this._track);this._thumb=new openfl_display_Sprite;this._thumb.set_buttonMode(true);this._thumb.useHandCursor=true;this._thumb.set_tabEnabled(false);this._seekBar.addChild(this._thumb);this._currentPlayTimeLabel=new openfl_text_TextField;this._currentPlayTimeLabel.set_autoSize(1);this._currentPlayTimeLabel.set_text("00:00:00");this._currentPlayTimeLabel.set_tabEnabled(false);this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._seekBar.addChild(this._currentPlayTimeLabel);this._totalPlayTimeLabel=new openfl_text_TextField;this._totalPlayTimeLabel.set_autoSize(1);this._totalPlayTimeLabel.set_text("00:00:00");this._totalPlayTimeLabel.set_tabEnabled(false);this._totalPlayTimeLabel.setTextFormat(this._textFormat);this._seekBar.addChild(this._totalPlayTimeLabel);this._seekPlayTimeLabel=new openfl_text_TextField;this._seekPlayTimeLabel.set_visible(false);this._seekPlayTimeLabel.set_autoSize(1);this._seekPlayTimeLabel.set_text("00:00:00");this._seekPlayTimeLabel.set_tabEnabled(false);this._seekPlayTimeLabel.setTextFormat(this._textFormat);this.addChild(this._seekPlayTimeLabel);this._aspectRatioLabelContainer=new openfl_display_Sprite;this.addChild(this._aspectRatioLabelContainer);this._aspectRatioLabel=new openfl_text_TextField;this._aspectRatioLabel.set_autoSize(0);this._aspectRatioLabel.set_text("original");this._aspectRatioLabel.set_tabEnabled(false);this._aspectRatioLabelContainer.addChild(this._aspectRatioLabel);this._errorContainer=new openfl_display_Sprite;this.addChild(this._errorContainer);this._errorLabel=new openfl_text_TextField;this._errorLabel.set_autoSize(0);this._errorLabel.set_text("");this._errorLabel.set_tabEnabled(false);this._errorLabel.set_multiline(true);this._errorLabel.set_wordWrap(true);this._errorContainer.addChild(this._errorLabel);this.hide_errorLabel();this._bigPlayButton=new jaris_player_newcontrols_TVideooPlayerBigButton("img/videoplayer1/ic_play_circle_fill_white_24dp.png");this.addChild(this._bigPlayButton);this._bigPlayButton.addEventListener("click",function(e){t.onPlayClick(e)});this.redrawControls();this._loader=new jaris_player_newcontrols_Loader(e.get_movieClip());this._loader.hide();var i=["","","",""];i[0]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._darkColor));i[1]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._controlColor));i[2]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._seekColor));this._loader.setColors(i);this.addChild(this._loader);this._movieClip.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._thumb.addEventListener("mouseDown",$bind(this,this.onThumbMouseDown));this._thumb.addEventListener("mouseUp",$bind(this,this.onThumbMouseUp));this._thumb.addEventListener("mouseOver",$bind(this,this.onThumbHover));this._thumb.addEventListener("mouseOut",$bind(this,this.onThumbMouseOut));this._thumb.addEventListener("mouseMove",$bind(this,this.onTrackMouseMove));this._thumb.addEventListener("mouseOut",$bind(this,this.onTrackMouseOut));this._track.addEventListener("click",$bind(this,this.onTrackClick));this._track.addEventListener("mouseMove",$bind(this,this.onTrackMouseMove));this._track.addEventListener("mouseOut",$bind(this,this.onTrackMouseOut));this._playControl.addEventListener("click",$bind(this,this.onPlayClick));this._pauseControl.addEventListener("click",$bind(this,this.onPauseClick));this._aspectRatioControl.addEventListener("click",$bind(this,this.onAspectRatioClick));this._fullscreenControl.addEventListener("click",$bind(this,this.onFullscreenClick));this._volumeIcon.addEventListener("click",$bind(this,this.onVolumeIconClick));this._volumeTrack.addEventListener("click",$bind(this,this.onVolumeTrackClick));this._player.addEventListener(jaris_events_PlayerEvents.MOUSE_HIDE,$bind(this,this.onPlayerMouseHide));this._player.addEventListener(jaris_events_PlayerEvents.MOUSE_SHOW,$bind(this,this.onPlayerMouseShow));this._player.addEventListener(jaris_events_PlayerEvents.MEDIA_INITIALIZED,$bind(this,this.onPlayerMediaInitialized));this._player.addEventListener(jaris_events_PlayerEvents.BUFFERING,$bind(this,this.onPlayerBuffering));this._player.addEventListener(jaris_events_PlayerEvents.NOT_BUFFERING,$bind(this,this.onPlayerNotBuffering));this._player.addEventListener(jaris_events_PlayerEvents.RESIZE,$bind(this,this.onPlayerResize));this._player.addEventListener(jaris_events_PlayerEvents.PLAY_PAUSE,$bind(this,this.onPlayerPlayPause));this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayerPlaybackFinished));this._player.addEventListener(jaris_events_PlayerEvents.CONNECTION_FAILED,$bind(this,this.onPlayerStreamNotFound));this._player.addEventListener(jaris_events_PlayerEvents.ASPECT_RATIO,$bind(this,this.onPlayerAspectRatio));this._player.addEventListener(jaris_events_PlayerEvents.ERROR,$bind(this,this.onError));this._stage.addEventListener("mouseUp",$bind(this,this.onThumbMouseUp));this._stage.addEventListener("mouseOut",$bind(this,this.onThumbMouseUp));this._movieClip.addEventListener("mouseMove",$bind(this,this.onMouseMove));this._movieClip.addEventListener("resize",$bind(this,this.onStageResize));this._hideControlsTimer.addEventListener("timer",$bind(this,this.hideControlsTimer));this._hideAspectRatioLabelTimer.addEventListener("timer",$bind(this,this.hideAspectRatioLabelTimer));this._hideControlsTimer.start()};$hxClasses["jaris.player.newcontrols.NewControls"]=jaris_player_newcontrols_NewControls;jaris_player_newcontrols_NewControls.__name__=["jaris","player","newcontrols","NewControls"];jaris_player_newcontrols_NewControls.__super__=openfl_display_MovieClip;jaris_player_newcontrols_NewControls.prototype=$extend(openfl_display_MovieClip.prototype,{_thumb:null,_track:null,_trackDownloaded:null,_scrubbing:null,_stage:null,_movieClip:null,_player:null,_darkColor:null,_brightColor:null,_seekColor:null,_controlColor:null,_controlSize:null,_hoverColor:null,_hideControlsTimer:null,_hideAspectRatioLabelTimer:null,_currentPlayTimeLabel:null,_totalPlayTimeLabel:null,_seekPlayTimeLabel:null,_percentLoaded:null,_controlsVisible:null,_seekBar:null,_controlsBar:null,_playControl:null,_pauseControl:null,_aspectRatioControl:null,_fullscreenControl:null,_volumeIcon:null,_volumeTrack:null,_volumeSlider:null,_loader:null,_aspectRatioLabelContainer:null,_aspectRatioLabel:null,_textFormat:null,_errorContainer:null,_errorLabel:null,_bigPlayButton:null,hide_errorLabel:function(){if(this._errorContainer.get_visible()){this._errorContainer.set_visible(false)}},show_errorLabel:function(e){this._loader.hide();this._errorContainer.get_graphics().clear();this._errorContainer.set_visible(false);var t=new openfl_text_TextFormat;t.font="arial";t.bold=true;t.size=16;t.color=this._controlColor;this._errorLabel.set_text(e);this._errorLabel.set_width(this._movieClip.get_realWidth()-20);this._errorLabel.setTextFormat(t);this._errorLabel.set_x(this._movieClip.get_realWidth()/2-this._errorLabel.get_width()/2);this._errorLabel.set_y(this._movieClip.get_realHeight()/2-this._errorLabel.get_height()/2);this._errorContainer.set_x(this._errorLabel.get_x()-10);this._errorContainer.set_y(this._errorLabel.get_y()-10);this._errorLabel.set_x(10);this._errorLabel.set_y(10);this._errorContainer.set_visible(true)},hideControlsTimer:function(e){if(this._player.isPlaying()){if(this._controlsVisible){if(!this._movieClip.hitTestPoint(this._stage.get_mouseX(),this._stage.get_mouseY(),true)){this._controlsVisible=false}}else{this.hideControls();this._hideControlsTimer.stop()}}},hideAspectRatioLabelTimer:function(e){if(this._aspectRatioLabelContainer.get_alpha()>=1){jaris_animation_Animation.fadeOut(this._aspectRatioLabelContainer,300);this._hideAspectRatioLabelTimer.stop()}},onEnterFrame:function(e){if(this._player.getDuration()>0){if(this._scrubbing){this._player.seek((this._thumb.get_x()-this._track.get_x())/this._track.get_width()*this._player.getDuration())}else{this._currentPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(this._player.getCurrentTime()));this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._thumb.set_x(this._player.getCurrentTime()/this._player.getDuration()*(this._track.get_width()-this._thumb.get_width())+this._track.get_x())}}this._volumeSlider.set_height(this._volumeTrack.get_height()*(this._player.getVolume()/1));this._volumeSlider.set_y(this._volumeTrack.get_y()+this._volumeTrack.get_height()-this._volumeSlider.get_height());this.drawDownloadProgress()},onMouseMove:function(e){if(!this._hideControlsTimer.running){this._hideControlsTimer.start()}this._controlsVisible=true;this.showControls();e.stopPropagation()},onStageResize:function(e){this.redrawControls()},onPlayClick:function(e){this._player.togglePlay();this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(e!=null){e.stopPropagation()}},onPauseClick:function(e){this._player.togglePlay();this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());e.stopPropagation()},onAspectRatioClick:function(e){this._player.toggleAspectRatio();e.stopPropagation()},onFullscreenClick:function(e){this._player._stream.set_displayState(true);e.stopPropagation()},onVolumeIconClick:function(e){if(this._volumeSlider.get_visible()){this._volumeSlider.set_visible(false);this._volumeTrack.set_visible(false)}else{this._volumeSlider.set_visible(true);this._volumeTrack.set_visible(true)}e.stopPropagation()},onVolumeTrackClick:function(e){var t=this._volumeTrack.get_height()-this._volumeTrack.get_mouseY();var i=t/this._volumeTrack.get_height();this._player.setVolume(i);e.stopPropagation()},onPlayerStreamNotFound:function(e){},onPlayerBuffering:function(e){if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}this.hide_errorLabel();this._player.removeEventListener(jaris_events_PlayerEvents.BUFFERING,$bind(this,this.onPlayerBuffering))},onPlayerNotBuffering:function(e){this._loader.hide();this._player.removeEventListener(jaris_events_PlayerEvents.NOT_BUFFERING,$bind(this,this.onPlayerNotBuffering))},onPlayerAspectRatio:function(e){this._hideAspectRatioLabelTimer.stop();this._aspectRatioLabel.set_text(this._player.getAspectRatioString());this.drawAspectRatioLabel();while(this._aspectRatioLabelContainer.get_visible()){}jaris_animation_Animation.fadeIn(this._aspectRatioLabelContainer,1);this._hideAspectRatioLabelTimer.start()},onPlayerPlaybackFinished:function(e){this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(!this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(true)}this.showControls()},onPlayerPlayPause:function(e){this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}},onPlayerResize:function(e){},onPlayerMediaInitialized:function(e){this._totalPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(e.duration));this._totalPlayTimeLabel.setTextFormat(this._textFormat);this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}this.hide_errorLabel()},onPlayerMouseHide:function(e){if(this._controlsBar.get_visible()&&this._player.isFullscreen()){this.hideControls()}},onPlayerMouseShow:function(e){if(this._player.isFullscreen()&&!this._controlsBar.get_visible()){this._controlsBar.set_visible(true)}else if(!this._controlsBar.get_visible()){this._controlsBar.set_visible(true)}},onError:function(e){this.show_errorLabel(e.errinfo)},onTrackClick:function(e){var t=this._track.get_mouseX();this._player.seek(this._player.getDuration()*(t/this._track.get_width()));e.stopPropagation()},onTrackMouseMove:function(e){var t=this._track.get_mouseX();this._seekPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(this._player.getDuration()*(t/this._track.get_width())));this._seekPlayTimeLabel.setTextFormat(this._textFormat);this._seekPlayTimeLabel.set_y(this._movieClip.get_realHeight()-this._seekBar.get_height()-this._seekPlayTimeLabel.get_height()-1);this._seekPlayTimeLabel.set_x(t+this._seekPlayTimeLabel.get_width()/2+(this._playControl.get_width()+10)*2);this._seekPlayTimeLabel.set_backgroundColor(this._darkColor);this._seekPlayTimeLabel.set_background(true);this._seekPlayTimeLabel.set_textColor(this._controlColor);this._seekPlayTimeLabel.set_borderColor(this._darkColor);this._seekPlayTimeLabel.set_border(true);if(!this._seekPlayTimeLabel.get_visible()){this._seekPlayTimeLabel.set_visible(true)}e.stopPropagation()},onTrackMouseOut:function(e){this._seekPlayTimeLabel.set_visible(false);e.stopPropagation()},onThumbMouseDown:function(e){this._scrubbing=true;var t=new openfl_geom_Rectangle(this._track.get_x(),this._track.get_y(),this._track.get_width()-this._thumb.get_width(),0);this._thumb.startDrag(false,t);e.stopPropagation()},onThumbHover:function(e){this._thumb.get_graphics().lineStyle();this._thumb.get_graphics().beginFill(this._hoverColor);this._thumb.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();e.stopPropagation()},onThumbMouseOut:function(e){var t=new openfl_geom_Matrix;t.createGradientBox(11,11,jaris_utils_Utils.degreesToRadians(-90),11,0);var i=[this._controlColor,this._controlColor];var s=[.75,1];var a=[0,255];this._thumb.get_graphics().beginGradientFill(0,i,s,a,t);this._thumb.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();e.stopPropagation()},onThumbMouseUp:function(e){this._scrubbing=false;this._thumb.stopDrag();e.stopPropagation()},redrawControls:function(){this.drawControls();this.drawAspectRatioLabel()},drawDownloadProgress:function(){if(this._player.getBytesTotal()>0){var e=this._player.getBytesLoaded();var t=this._player.getBytesTotal();this._percentLoaded=e/t}var i=this._player.getStartTime()/this._player.getDuration();var s=(i>0?i*this._track.get_width():0)+this._track.get_x();this._trackDownloaded.get_graphics().clear();this._trackDownloaded.get_graphics().lineStyle();this._trackDownloaded.set_x(s);this._trackDownloaded.get_graphics().beginFill(this._seekColor,.5);this._trackDownloaded.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-2.5,(this._track.get_width()+this._track.get_x()-this._trackDownloaded.get_x())*this._percentLoaded,5,3,3);this._trackDownloaded.get_graphics().endFill()},drawControls:function(){this._controlsBar.get_graphics().clear();this._volumeTrack.get_graphics().clear();this._volumeSlider.get_graphics().clear();this._volumeSlider.set_visible(false);this._volumeTrack.set_visible(false);this._seekBar.get_graphics().clear();this._track.get_graphics().clear();this._thumb.get_graphics().clear();var e=10;var t=this._movieClip.get_realWidth();var i=this._controlSize;var s=t/2;var a=.8*(i-e*2)|0;this._controlsBar.set_x(0);this._controlsBar.set_y(this._movieClip.get_realHeight()-i);var r=new openfl_geom_Matrix;r.createGradientBox(t,i,jaris_utils_Utils.degreesToRadians(-90),t,0);var n=[this._brightColor,this._darkColor];var _=[1,1];var o=[0,255];this._controlsBar.get_graphics().lineStyle();this._controlsBar.get_graphics().beginGradientFill(0,n,_,o,r);this._controlsBar.get_graphics().drawRect(0,2,t,i-2);this._controlsBar.get_graphics().endFill();this._controlsBar.get_graphics().beginFill(this._darkColor,1);this._controlsBar.get_graphics().drawRect(0,0,t,1);this._controlsBar.get_graphics().endFill();this._controlsBar.get_graphics().beginFill(this._brightColor,1);this._controlsBar.get_graphics().drawRect(0,1,t,1);this._controlsBar.get_graphics().endFill();var l=t-(a+e)*3-(this._playControl.get_x()+this._playControl.get_width()+e)-e;var h=i;this._seekBar.set_x(this._playControl.get_x()+this._playControl.get_width()+e);this._seekBar.set_y(0);this._seekBar.get_graphics().lineStyle();this._seekBar.get_graphics().beginFill(this._darkColor,0);this._seekBar.get_graphics().drawRect(0,0,l,h);this._seekBar.get_graphics().endFill();this._playControl.setNormalColor(this._controlColor);this._playControl.setHoverColor(this._hoverColor);this._playControl.setPosition(e,e);this._playControl.setSize(a+5,a+5);this._pauseControl.setNormalColor(this._controlColor);this._pauseControl.setHoverColor(this._hoverColor);this._pauseControl.setPosition(this._playControl.get_x(),this._playControl.get_y());this._pauseControl.setSize(a+5,a+5);this._textFormat.color=this._seekColor;this._currentPlayTimeLabel.set_x(0);this._currentPlayTimeLabel.set_y(h-h/2-this._currentPlayTimeLabel.get_height()/2);this._currentPlayTimeLabel.set_antiAliasType(0);this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._totalPlayTimeLabel.set_x(l-this._totalPlayTimeLabel.get_width());this._totalPlayTimeLabel.set_y(h-h/2-this._totalPlayTimeLabel.get_height()/2);this._totalPlayTimeLabel.set_antiAliasType(0);this._totalPlayTimeLabel.setTextFormat(this._textFormat);this.drawDownloadProgress();this._track.set_x(this._currentPlayTimeLabel.get_x()+this._currentPlayTimeLabel.get_width()+e);this._track.get_graphics().lineStyle();this._track.get_graphics().beginFill(this._seekColor,0);this._track.get_graphics().drawRect(0,h/2-(a+e)/2,this._totalPlayTimeLabel.get_x()-this._totalPlayTimeLabel.get_width()-e-e,a+e);this._track.get_graphics().endFill();this._track.get_graphics().lineStyle();this._track.get_graphics().beginFill(this._seekColor,.3);this._track.get_graphics().drawRoundRect(0,h/2-2.5,this._totalPlayTimeLabel.get_x()-this._totalPlayTimeLabel.get_width()-e-e,5,3,3);this._track.get_graphics().endFill();var c=new openfl_geom_Matrix;c.createGradientBox(11,11,jaris_utils_Utils.degreesToRadians(-90),11,0);var u=[this._controlColor,this._controlColor];var f=[.75,1];var p=[0,255];this._thumb.set_x(this._currentPlayTimeLabel.get_width()+this._currentPlayTimeLabel.get_x()+e);this._thumb.get_graphics().lineStyle();this._thumb.get_graphics().beginGradientFill(0,u,f,p,c);this._thumb.get_graphics().drawRoundRect(0,h/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();this._volumeIcon.setNormalColor(this._controlColor);this._volumeIcon.setHoverColor(this._hoverColor);this._volumeIcon.setPosition(this._seekBar.get_x()+this._seekBar.get_width()+e,this._playControl.get_y()+1);this._volumeIcon.setSize(a,a);this._aspectRatioControl.setNormalColor(this._controlColor);this._aspectRatioControl.setHoverColor(this._hoverColor);this._aspectRatioControl.setPosition(this._volumeIcon.get_x()+this._volumeIcon.get_width()+e,this._playControl.get_y()+1);this._aspectRatioControl.setSize(a,a);this._fullscreenControl.setNormalColor(this._controlColor);this._fullscreenControl.setHoverColor(this._hoverColor);this._fullscreenControl.setPosition(this._aspectRatioControl.get_x()+this._aspectRatioControl.get_width()+e,this._playControl.get_y()+1);this._fullscreenControl.setSize(a,a);this._volumeTrack.set_x(this._controlsBar.get_width()-(a+e)*3);this._volumeTrack.set_y(-this._controlsBar.get_height()-2);this._volumeTrack.get_graphics().lineStyle(1,this._controlColor);this._volumeTrack.get_graphics().beginFill(0,0);this._volumeTrack.get_graphics().drawRect(0,0,a,this._controlsBar.get_height());this._volumeTrack.get_graphics().endFill();var d=new openfl_geom_Matrix;d.createGradientBox(this._volumeTrack.get_width(),this._volumeTrack.get_height(),jaris_utils_Utils.degreesToRadians(-90),this._volumeTrack.get_width(),0);var g=[this._hoverColor,this._hoverColor];var m=[.75,1];var v=[0,255];this._volumeSlider.set_x(this._volumeTrack.get_x());this._volumeSlider.set_y(this._volumeTrack.get_y());this._volumeSlider.get_graphics().lineStyle();this._volumeSlider.get_graphics().beginGradientFill(0,g,m,v,d);this._volumeSlider.get_graphics().drawRect(0,0,this._volumeTrack.get_width(),this._volumeTrack.get_height());this._volumeSlider.get_graphics().endFill();this._bigPlayButton.set_x((this._movieClip.get_realWidth()-this._bigPlayButton.get_width())*.5);this._bigPlayButton.set_y((this._movieClip.get_realHeight()-this._bigPlayButton.get_height())*.5)},drawAspectRatioLabel:function(){this._aspectRatioLabelContainer.get_graphics().clear();this._aspectRatioLabelContainer.set_visible(false);var e=new openfl_text_TextFormat;e.font="arial";e.bold=true;e.size=40;e.color=this._controlColor;this._aspectRatioLabel.setTextFormat(e);this._aspectRatioLabel.set_x(this._movieClip.get_realWidth()/2-this._aspectRatioLabel.get_width()/2);this._aspectRatioLabel.set_y(this._movieClip.get_realHeight()/2-this._aspectRatioLabel.get_height()/2);this._aspectRatioLabelContainer.set_x(this._aspectRatioLabel.get_x()-10);this._aspectRatioLabelContainer.set_y(this._aspectRatioLabel.get_y()-10);this._aspectRatioLabelContainer.get_graphics().lineStyle(0,this._darkColor);this._aspectRatioLabelContainer.get_graphics().beginFill(this._darkColor,1);this._aspectRatioLabelContainer.get_graphics().drawRoundRect(0,0,this._aspectRatioLabel.get_width()+20,this._aspectRatioLabel.get_height()+20,15,15);this._aspectRatioLabelContainer.get_graphics().endFill();this._aspectRatioLabel.set_x(10);this._aspectRatioLabel.set_y(10)},hideControls:function(){if(this._controlsBar.get_visible()){this.drawControls();this._controlsBar.set_visible(false)}},showControls:function(){if(!this._controlsBar.get_visible()){this.drawControls();this._controlsBar.set_visible(true)}},setControlColors:function(e){this._darkColor=e[0].length>0?Std.parseInt(e[0]):0;this._brightColor=e[1].length>0?Std.parseInt(e[1]):5000268;this._controlColor=e[2].length>0?Std.parseInt(e[2]):16777215;this._hoverColor=e[3].length>0?Std.parseInt(e[3]):6793409;this._seekColor=e[4].length>0?Std.parseInt(e[4]):8158332;var t=["",""];t[0]=e[0];t[1]=e[2];t[2]=e[4];this._loader.setColors(t);this.redrawControls()},setControlSize:function(e){if(e==0){return}this._controlSize=e;this.redrawControls()},setDurationLabel:function(e){if(e.indexOf(":")!=-1){this._totalPlayTimeLabel.set_text(e)}else{this._totalPlayTimeLabel.set_text(Std.string(jaris_utils_Utils.formatTime(parseFloat(e))))}this._totalPlayTimeLabel.setTextFormat(this._textFormat)},__class__:jaris_player_newcontrols_NewControls});var jaris_player_newcontrols_PauseIcon=function(e,t,i,s,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=i;this._height=s;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.PauseIcon"]=jaris_player_newcontrols_PauseIcon;jaris_player_newcontrols_PauseIcon.__name__=["jaris","player","newcontrols","PauseIcon"];jaris_player_newcontrols_PauseIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_PauseIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,a,t);this.get_graphics().drawRoundRect(0,0,.33*this._width,this._height,6,6);this.get_graphics().drawRoundRect(this._width-.33*this._width,0,.33*this._width,this._height,6,6);this.get_graphics().endFill();this.get_graphics().lineStyle();this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_PauseIcon});var jaris_player_newcontrols_PlayIcon=function(e,t,i,s,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=i;this._height=s;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.PlayIcon"]=jaris_player_newcontrols_PlayIcon;jaris_player_newcontrols_PlayIcon.__name__=["jaris","player","newcontrols","PlayIcon"];jaris_player_newcontrols_PlayIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_PlayIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,a,t);this.get_graphics().lineTo(0,this._height);this.get_graphics().lineTo(this._width,this._height/2);this.get_graphics().lineTo(0,0);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_PlayIcon});var jaris_player_newcontrols_VolumeIcon=function(e,t,i,s,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=i;this._height=s;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.VolumeIcon"]=jaris_player_newcontrols_VolumeIcon;jaris_player_newcontrols_VolumeIcon.__name__=["jaris","player","newcontrols","VolumeIcon"];jaris_player_newcontrols_VolumeIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_VolumeIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,a,t);this.get_graphics().drawRect(0,.5*this._height/2+1,this._width/2-1,.5*this._height);this.get_graphics().moveTo(this._width/2-1,.5*this._height/2+1);this.get_graphics().lineTo(this._width,0);this.get_graphics().lineTo(this._width,this._height+2);this.get_graphics().lineTo(this._width/2-1,.5*this._height+.5*this._height/2+1);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_VolumeIcon});var jaris_utils_Utils=function(){};$hxClasses["jaris.utils.Utils"]=jaris_utils_Utils;jaris_utils_Utils.__name__=["jaris","utils","Utils"];jaris_utils_Utils.degreesToRadians=function(e){return Math.PI/180*e};jaris_utils_Utils.formatTime=function(e){var t="";var i="";var s="";var a="";if(e/60/60>=1){if(Math.floor(e/60)/60<10){s="0"+Math.floor(e/60/60)+":"}else{s=Math.floor(e/60/60)+":"}if(Math.floor(e/60%60)<10){i="0"+Math.floor(e/60%60)+":"}else{i=Math.floor(e/60%60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else if(e/60>=1){s="00:";if(Math.floor(e/60)<10){i="0"+Math.floor(e/60)+":"}else{i=Math.floor(e/60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else{s="00:";i="00:";if(Math.floor(e)<10){t="0"+Math.floor(e)}else{t=Std.string(Math.floor(e))}}a+=s+i+t;return a};jaris_utils_Utils.rtmpSourceParser=function(e){if(e.indexOf(".flv")!=-1){return e.split(".flv").join("")}else if(e.indexOf(".mp3")!=-1){return"mp3:"+e.split(".mp3").join("")}else if(e.indexOf(".mp4")!=-1){return"mp4:"+e}else if(e.indexOf(".f4v")!=-1){return"mp4:"+e}return e};jaris_utils_Utils.youtubeSourceParse=function(e){return e.split("watch?v=").join("v/")};var js__$Boot_HaxeError=function(e){Error.call(this);this.val=e;this.message=String(e);if(Error.captureStackTrace){Error.captureStackTrace(this,js__$Boot_HaxeError)}};$hxClasses["js._Boot.HaxeError"]=js__$Boot_HaxeError;js__$Boot_HaxeError.__name__=["js","_Boot","HaxeError"];js__$Boot_HaxeError.wrap=function(e){if(e instanceof Error){return e}else{return new js__$Boot_HaxeError(e)}};js__$Boot_HaxeError.__super__=Error;js__$Boot_HaxeError.prototype=$extend(Error.prototype,{val:null,__class__:js__$Boot_HaxeError});var js_Boot=function(){};$hxClasses["js.Boot"]=js_Boot;js_Boot.__name__=["js","Boot"];js_Boot.getClass=function(e){if(e instanceof Array&&e.__enum__==null){return Array}else{var t=e.__class__;if(t!=null){return t}var i=js_Boot.__nativeClassName(e);if(i!=null){return js_Boot.__resolveNativeClass(i)}return null}};js_Boot.__string_rec=function(e,t){if(e==null){return"null"}if(t.length>=5){return"<...>"}var i=typeof e;if(i=="function"&&(e.__name__||e.__ename__)){i="object"}switch(i){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(e.length==2){return e[0]}var s=e[0]+"(";t+="\t";var a=2;var r=e.length;while(a0?",":"")+js_Boot.__string_rec(e[u],t)}l+="]";return l}var f;try{f=e.toString}catch(e){haxe_CallStack.lastException=e;return"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"){var p=e.toString();if(p!="[object Object]"){return p}}var d=null;var g="{\n";t+="\t";var m=e.hasOwnProperty!=null;for(var d in e){if(m&&!e.hasOwnProperty(d)){continue}if(d=="prototype"||d=="__class__"||d=="__super__"||d=="__interfaces__"||d=="__properties__"){continue}if(g.length!=2){g+=", \n"}g+=t+d+" : "+js_Boot.__string_rec(e[d],t)}t=t.substring(1);g+="\n"+t+"}";return g;case"string":return e;default:return String(e)}};js_Boot.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}var i=e.__interfaces__;if(i!=null){var s=0;var a=i.length;while(se.byteLength){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}this.byteLength=this.length;this.byteOffset=this.offset;this.buffer=this.buf};$hxClasses["js.html.compat.DataView"]=js_html_compat_DataView;js_html_compat_DataView.__name__=["js","html","compat","DataView"];js_html_compat_DataView.prototype={buf:null,offset:null,length:null,byteLength:null,byteOffset:null,buffer:null,getInt8:function(e){var t=this.buf.a[this.offset+e];if(t>=128){return t-256}else{return t}},getUint8:function(e){return this.buf.a[this.offset+e]},getInt16:function(e,t){var i=this.getUint16(e,t);if(i>=32768){return i-65536}else{return i}},getUint16:function(e,t){if(t){return this.buf.a[this.offset+e]|this.buf.a[this.offset+e+1]<<8}else{return this.buf.a[this.offset+e]<<8|this.buf.a[this.offset+e+1]}},getInt32:function(e,t){var i=this.offset+e;var s=this.buf.a[i++];var a=this.buf.a[i++];var r=this.buf.a[i++];var n=this.buf.a[i++];if(t){return s|a<<8|r<<16|n<<24}else{return n|r<<8|a<<16|s<<24}},getUint32:function(e,t){var i=this.getInt32(e,t);if(i<0){return i+4294967296}else{return i}},getFloat32:function(e,t){return haxe_io_FPHelper.i32ToFloat(this.getInt32(e,t))},getFloat64:function(e,t){var i=this.getInt32(e,t);var s=this.getInt32(e+4,t);return haxe_io_FPHelper.i64ToDouble(t?i:s,t?s:i)},setInt8:function(e,t){this.buf.a[e+this.offset]=t<0?t+128&255:t&255},setUint8:function(e,t){this.buf.a[e+this.offset]=t&255},setInt16:function(e,t,i){this.setUint16(e,t<0?t+65536:t,i)},setUint16:function(e,t,i){var s=e+this.offset;if(i){this.buf.a[s]=t&255;this.buf.a[s++]=t>>8&255}else{this.buf.a[s++]=t>>8&255;this.buf.a[s]=t&255}},setInt32:function(e,t,i){this.setUint32(e,t,i)},setUint32:function(e,t,i){var s=e+this.offset;if(i){this.buf.a[s++]=t&255;this.buf.a[s++]=t>>8&255;this.buf.a[s++]=t>>16&255;this.buf.a[s++]=t>>>24}else{this.buf.a[s++]=t>>>24;this.buf.a[s++]=t>>16&255;this.buf.a[s++]=t>>8&255;this.buf.a[s++]=t&255}},setFloat32:function(e,t,i){this.setUint32(e,haxe_io_FPHelper.floatToI32(t),i)},setFloat64:function(e,t,i){var s=haxe_io_FPHelper.doubleToI64(t);if(i){this.setUint32(e,s.low);this.setUint32(e,s.high)}else{this.setUint32(e,s.high);this.setUint32(e,s.low)}},__class__:js_html_compat_DataView};var js_html_compat_Float32Array=function(){};$hxClasses["js.html.compat.Float32Array"]=js_html_compat_Float32Array;js_html_compat_Float32Array.__name__=["js","html","compat","Float32Array"];js_html_compat_Float32Array._new=function(e,t,i){var s;if(typeof e=="number"){s=[];var a=0;var r=e;while(a>2}s=[];var u=0;var f=i;while(u>8&255);g.push(b>>16&255);g.push(b>>>24)}s.byteLength=s.length<<2;s.byteOffset=0;s.buffer=new js_html_compat_ArrayBuffer(g)}else{throw new js__$Boot_HaxeError("TODO "+Std.string(e))}s.subarray=js_html_compat_Float32Array._subarray;s.set=js_html_compat_Float32Array._set;return s};js_html_compat_Float32Array._set=function(e,t){if(js_Boot.__instanceof(e.buffer,js_html_compat_ArrayBuffer)){var i=e;if(e.byteLength+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var s=0;var a=e.byteLength;while(sthis.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _=0;var o=n.length;while(_this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var s=0;var a=e.byteLength;while(sthis.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _=0;var o=n.length;while(_0){this.loops--;this.stop();this.play();return}else if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){this.parent.buffer.__srcHowl.stop(this.id)}this.completed=true;this.parent.onComplete.dispatch()},getCurrentTime:function(){if(this.id==-1){return 0}if(this.completed){return this.getLength()}else if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var e=(this.parent.buffer.__srcHowl.seek(this.id)*1e3|0)-this.parent.offset;if(e<0){return 0}return e}return 0},setCurrentTime:function(e){if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var t=(e+this.parent.offset)/1e3;if(t<0){t=0}this.parent.buffer.__srcHowl.seek(t,this.id)}return e},getGain:function(){return this.gain},setGain:function(e){if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.id!=-1){this.parent.buffer.__srcHowl.volume(e,this.id)}return this.gain=e},getLength:function(){if(this.length!=0){return this.length}if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){return this.parent.buffer.__srcHowl.duration()*1e3|0}return 0},setLength:function(e){return this.length=e},setLoops:function(e){return this.loops=e},getPosition:function(){return this.position},setPosition:function(e){this.position.x=e.x;this.position.y=e.y;this.position.z=e.z;this.position.w=e.w;if(this.parent.buffer.__srcHowl!=null&&($_=this.parent.buffer.__srcHowl,$bind($_,$_.pos))!=null){this.parent.buffer.__srcHowl.pos(this.position.x,this.position.y,this.position.z,this.id)}return this.position},__class__:lime__$internal_backend_html5_HTML5AudioSource};var lime__$internal_backend_html5_HTML5HTTPRequest=function(){this.validStatus0=new EReg("Tizen","gi").match(window.navigator.userAgent)};$hxClasses["lime._internal.backend.html5.HTML5HTTPRequest"]=lime__$internal_backend_html5_HTML5HTTPRequest;lime__$internal_backend_html5_HTML5HTTPRequest.__name__=["lime","_internal","backend","html5","HTML5HTTPRequest"];lime__$internal_backend_html5_HTML5HTTPRequest.loadImage=function(e){var t=new lime_app_Promise;if(lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests0){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests++;var e=lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.pop();var t=e.type;switch(t){case"BINARY":e.instance.__loadData(e.uri,e.promise);break;case"IMAGE":lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage(e.uri,e.promise);break;case"TEXT":e.instance.__loadText(e.uri,e.promise);break;default:lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--}}};lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname=function(e){if(e==null){return""}else{return e}};lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort=function(e,t){if(e==null||e==""){switch(t){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 e};lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol=function(e){if(e==null||e==""){return"http:"}else{return e}};lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin=function(e){if(lime__$internal_backend_html5_HTML5HTTPRequest.originElement==null){lime__$internal_backend_html5_HTML5HTTPRequest.originElement=window.document.createElement("a");lime__$internal_backend_html5_HTML5HTTPRequest.originHostname=lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname(window.location.hostname);lime__$internal_backend_html5_HTML5HTTPRequest.originProtocol=lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol(window.location.protocol);lime__$internal_backend_html5_HTML5HTTPRequest.originPort=lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort(window.location.port,lime__$internal_backend_html5_HTML5HTTPRequest.originProtocol)}var t=lime__$internal_backend_html5_HTML5HTTPRequest.originElement;t.href=e;if(t.hostname==""){t.href=t.href}var i=lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname(t.hostname);var s=lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol(t.protocol);var a=lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort(t.port,s);var r=i==""||i==lime__$internal_backend_html5_HTML5HTTPRequest.originHostname;var n=a==""||a==lime__$internal_backend_html5_HTML5HTTPRequest.originPort;if(s!="file:"&&r){return n}else{return false}};lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage=function(e,i){var s=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){s.crossOrigin="Anonymous"}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress==null){lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress="onprogress"in s}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress||StringTools.startsWith(e,"data:")){s.addEventListener("load",function(e){var t=new lime_graphics_ImageBuffer(null,s.width,s.height);t.__srcImage=s;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();i.complete(new lime_graphics_Image(t))},false);s.addEventListener("progress",function(e){i.progress(e.loaded,e.total)},false);s.addEventListener("error",function(e){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();i.error(e.detail)},false);s.src=e}else{var a=new XMLHttpRequest;a.onload=function(e){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();var t=new lime_graphics_Image;t.__fromBytes(haxe_io_Bytes.ofData(a.response),function(e){i.complete(e)})};a.onerror=function(e){i.error(e.message)};a.onprogress=function(e){if(e.lengthComputable){i.progress(e.loaded,e.total)}};a.open("GET",e,true);a.responseType="arraybuffer";a.overrideMimeType("text/plain; charset=x-user-defined");a.send(null)}};lime__$internal_backend_html5_HTML5HTTPRequest.prototype={binary:null,parent:null,request:null,validStatus0:null,init:function(e){this.parent=e},load:function(e,t,i){this.request=new XMLHttpRequest;if(this.parent.method=="POST"){this.request.upload.addEventListener("progress",t,false)}else{this.request.addEventListener("progress",t,false)}this.request.onreadystatechange=i;var s="";if(this.parent.data==null){var a=this.parent.formData.keys();while(a.hasNext()){var r=a.next();if(s.length>0){s+="&"}var n=encodeURIComponent(r)+"=";var _=this.parent.formData;var o=Std.string(__map_reserved[r]!=null?_.getReserved(r):_.h[r]);s+=n+encodeURIComponent(o)}if(this.parent.method=="GET"&&s!=""){if(e.indexOf("?")>-1){e+="&"+s}else{e+="?"+s}s=""}}this.request.open(Std.string(this.parent.method),e,true);if(this.parent.timeout>0){this.request.timeout=this.parent.timeout}if(this.binary){this.request.responseType="arraybuffer"}var l=null;var h=0;var c=this.parent.headers;while(h=200&&s.request.status<400||s.validStatus0&&s.request.status==0)){var t=null;if(s.request.responseType==""){if(s.request.responseText!=null){t=haxe_io_Bytes.ofString(s.request.responseText)}}else if(s.request.response!=null){t=haxe_io_Bytes.ofData(s.request.response)}s.processResponse();i.complete(t)}else{s.processResponse();i.error(s.request.status)}s.request=null;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue()};this.binary=true;this.load(e,t,a)},__loadText:function(e,t){var i=this;var s=function(e){t.progress(e.loaded,e.total)};var a=function(e){if(i.request.readyState!=4){return}if(i.request.status!=null&&(i.request.status>=200&&i.request.status<=400||i.validStatus0&&i.request.status==0)){i.processResponse();t.complete(i.request.responseText)}else{i.processResponse();t.error(i.request.status)}i.request=null;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue()};this.binary=false;this.load(e,s,a)},__class__:lime__$internal_backend_html5_HTML5HTTPRequest};var lime__$internal_backend_html5_HTML5Window=function(e){this.unusedTouchesPool=new List;this.scale=1;this.currentTouches=new haxe_ds_IntMap;this.parent=e;this.cursor=lime_ui_MouseCursor.DEFAULT;this.cacheMouseX=0;this.cacheMouseY=0;var t=e.__attributes;if(!Object.prototype.hasOwnProperty.call(t,"context")){t.context={}}this.renderType=t.context.type;if(Object.prototype.hasOwnProperty.call(t,"element")){e.element=t.element}var i=e.element;if(Object.prototype.hasOwnProperty.call(t,"allowHighDPI")&&t.allowHighDPI&&this.renderType!="dom"){this.scale=window.devicePixelRatio}e.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(t,"width")?t.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(t,"height")?t.height:0;e.__width=this.setWidth;e.__height=this.setHeight;e.id=lime__$internal_backend_html5_HTML5Window.windowID++;if(js_Boot.__instanceof(i,HTMLCanvasElement)){this.canvas=i}else if(this.renderType=="dom"){this.div=window.document.createElement("div")}else{this.canvas=window.document.createElement("canvas")}if(this.canvas!=null){var s=this.canvas.style;s.setProperty("-webkit-transform","translateZ(0)",null);s.setProperty("transform","translateZ(0)",null)}else if(this.div!=null){var a=this.div.style;a.setProperty("-webkit-transform","translate3D(0,0,0)",null);a.setProperty("transform","translate3D(0,0,0)",null);a.position="relative";a.overflow="hidden";a.setProperty("-webkit-user-select","none",null);a.setProperty("-moz-user-select","none",null);a.setProperty("-ms-user-select","none",null);a.setProperty("-o-user-select","none",null)}if(e.__width==0&&e.__height==0){if(i!=null){e.__width=i.clientWidth;e.__height=i.clientHeight}else{e.__width=window.innerWidth;e.__height=window.innerHeight}this.cacheElementWidth=e.__width;this.cacheElementHeight=e.__height;this.resizeElement=true}if(this.canvas!=null){this.canvas.width=Math.round(e.__width*this.scale);this.canvas.height=Math.round(e.__height*this.scale);this.canvas.style.width=e.__width+"px";this.canvas.style.height=e.__height+"px"}else{this.div.style.width=e.__width+"px";this.div.style.height=e.__height+"px"}if(Object.prototype.hasOwnProperty.call(t,"resizable")&&t.resizable||!Object.prototype.hasOwnProperty.call(t,"width")&&this.setWidth==0&&this.setHeight==0){e.__resizable=true}this.updateSize();if(i!=null){if(this.canvas!=null){if(i!=this.canvas){i.appendChild(this.canvas)}}else{i.appendChild(this.div)}var r=["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];var n=0;while(n16,antialias:l,depth:Object.prototype.hasOwnProperty.call(t,"depth")?t.depth:true,premultipliedAlpha:true,stencil:Object.prototype.hasOwnProperty.call(t,"stencil")&&t.stencil,preserveDrawingBuffer:false};var c=["webgl","experimental-webgl"];if(r){c.unshift("webgl2")}var u=0;while(u0){this.parent.onDropFile.dispatch(e.dataTransfer.files);e.preventDefault();return false}break}return true},handleFocusEvent:function(e){var t=this;if(this.textInputEnabled){if(e.relatedTarget==null||this.isDescendent(e.relatedTarget)){haxe_Timer.delay(function(){if(t.textInputEnabled){lime__$internal_backend_html5_HTML5Window.textInput.focus()}},20)}}},handleFullscreenEvent:function(e){var t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(t!=null){this.isFullscreen=true;this.parent.__fullscreen=true;if(this.requestedFullscreen){this.requestedFullscreen=false;this.parent.onFullscreen.dispatch()}}else{this.isFullscreen=false;this.parent.__fullscreen=false;this.parent.onRestore.dispatch();var i=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];var s=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror","MSFullscreenError"];var a=0;var r=i.length;while(a0){this.parent.onTextInput.dispatch(t)}lime__$internal_backend_html5_HTML5Window.textInput.value=lime__$internal_backend_html5_HTML5Window.dummyCharacter}},handleMouseEvent:function(e){var t=0;var i=0;if(e.type!="wheel"){if(this.parent.element!=null){if(this.canvas!=null){var s=this.canvas.getBoundingClientRect();t=(e.clientX-s.left)*(this.parent.__width/s.width);i=(e.clientY-s.top)*(this.parent.__height/s.height)}else if(this.div!=null){var a=this.div.getBoundingClientRect();t=e.clientX-a.left;i=e.clientY-a.top}else{var r=this.parent.element.getBoundingClientRect();t=(e.clientX-r.left)*(this.parent.__width/r.width);i=(e.clientY-r.top)*(this.parent.__height/r.height)}}else{t=e.clientX;i=e.clientY}var n=e.type;switch(n){case"mousedown":if(e.currentTarget==this.parent.element){window.addEventListener("mouseup",$bind(this,this.handleMouseEvent))}this.parent.onMouseDown.dispatch(t,i,e.button);if(this.parent.onMouseDown.canceled&&e.cancelable){e.preventDefault()}break;case"mouseenter":if(e.target==this.parent.element){this.parent.onEnter.dispatch();if(this.parent.onEnter.canceled&&e.cancelable){e.preventDefault()}}break;case"mouseleave":if(e.target==this.parent.element){this.parent.onLeave.dispatch();if(this.parent.onLeave.canceled&&e.cancelable){e.preventDefault()}}break;case"mousemove":if(t!=this.cacheMouseX||i!=this.cacheMouseY){this.parent.onMouseMove.dispatch(t,i);this.parent.onMouseMoveRelative.dispatch(t-this.cacheMouseX,i-this.cacheMouseY);if((this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&e.cancelable){e.preventDefault()}}break;case"mouseup":window.removeEventListener("mouseup",$bind(this,this.handleMouseEvent));if(e.currentTarget==this.parent.element){e.stopPropagation()}this.parent.onMouseUp.dispatch(t,i,e.button);if(this.parent.onMouseUp.canceled&&e.cancelable){e.preventDefault()}break;default:}this.cacheMouseX=t;this.cacheMouseY=i}else{var _;var o=e.deltaMode;switch(o){case 0:_=lime_ui_MouseWheelMode.PIXELS;break;case 1:_=lime_ui_MouseWheelMode.LINES;break;case 2:_=lime_ui_MouseWheelMode.PAGES;break;default:_=lime_ui_MouseWheelMode.UNKNOWN}this.parent.onMouseWheel.dispatch(e.deltaX,-e.deltaY,_);if(this.parent.onMouseWheel.canceled&&e.cancelable){e.preventDefault()}}},handlePasteEvent:function(e){if(e.clipboardData.types.indexOf("text/plain")>-1){var t=e.clipboardData.getData("text/plain");lime_system_Clipboard.set_text(t);if(this.textInputEnabled){this.parent.onTextInput.dispatch(t)}if(e.cancelable){e.preventDefault()}}},handleResizeEvent:function(e){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(e){if(e.cancelable){e.preventDefault()}var t=null;if(this.parent.element!=null){if(this.canvas!=null){t=this.canvas.getBoundingClientRect()}else if(this.div!=null){t=this.div.getBoundingClientRect()}else{t=this.parent.element.getBoundingClientRect()}}var i=this.setWidth;var s=this.setHeight;if(i==0||s==0){if(t!=null){i=t.width;s=t.height}else{i=1;s=1}}var a;var r;var n;var _;var o;var l=0;var h=e.changedTouches;while(l=e.width||s.y>=e.height||i==null||i.width<1||i.height<1){return}if(a!=null&&a.get_transparent()){if(r==null){r=new lime_math_Vector2}var _=e.clone();_.copyChannel(a,new lime_math_Rectangle(r.x,r.y,i.width,i.height),new lime_math_Vector2(i.x,i.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);t=_}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e,true);if(!n){if(e.get_transparent()&&t.get_transparent()){e.buffer.__srcContext.clearRect(s.x+e.offsetX,s.y+e.offsetY,i.width+e.offsetX,i.height+e.offsetY)}}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t);if(t.buffer.get_src()!=null){e.buffer.__srcContext.globalCompositeOperation="source-over";e.buffer.__srcContext.drawImage(t.buffer.get_src(),i.x+t.offsetX|0,i.y+t.offsetY|0,i.width|0,i.height|0,s.x+e.offsetX|0,s.y+e.offsetY|0,i.width|0,i.height|0)}e.dirty=true;e.version++};lime__$internal_graphics_ImageCanvasUtil.createCanvas=function(e,t,i){var s=e.buffer;if(s.__srcCanvas==null){s.__srcCanvas=window.document.createElement("canvas");s.__srcCanvas.width=t;s.__srcCanvas.height=i;if(!e.get_transparent()){if(!e.get_transparent()){s.__srcCanvas.setAttribute("moz-opaque","true")}s.__srcContext=s.__srcCanvas.getContext("2d",{alpha:false})}else{s.__srcContext=s.__srcCanvas.getContext("2d")}}};lime__$internal_graphics_ImageCanvasUtil.createImageData=function(e){var t=e.buffer;if(t.__srcImageData==null){if(t.data==null){t.__srcImageData=t.__srcContext.getImageData(0,0,t.width,t.height)}else{t.__srcImageData=t.__srcContext.createImageData(t.width,t.height);t.__srcImageData.data.set(t.data)}var i=t.__srcImageData.data.buffer;var s;if(i!=null){s=new Uint8Array(i)}else{s=null}t.data=s}};lime__$internal_graphics_ImageCanvasUtil.fillRect=function(e,t,i,s){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e);var a;var r;var n;var _;if(s==1){a=i>>16&255;r=i>>8&255;n=i&255;if(e.get_transparent()){_=i>>24&255}else{_=255}}else{a=i>>24&255;r=i>>16&255;n=i>>8&255;if(e.get_transparent()){_=i&255}else{_=255}}if(t.x==0&&t.y==0&&t.width==e.width&&t.height==e.height){if(e.get_transparent()&&_==0){e.buffer.__srcCanvas.width=e.buffer.width;return}}if(_<255){e.buffer.__srcContext.clearRect(t.x+e.offsetX,t.y+e.offsetY,t.width+e.offsetX,t.height+e.offsetY)}if(_>0){e.buffer.__srcContext.fillStyle="rgba("+a+", "+r+", "+n+", "+_/255+")";e.buffer.__srcContext.fillRect(t.x+e.offsetX,t.y+e.offsetY,t.width+e.offsetX,t.height+e.offsetY)}e.dirty=true;e.version++};lime__$internal_graphics_ImageCanvasUtil.getPixel32=function(e,t,i,s){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);return lime__$internal_graphics_ImageDataUtil.getPixel32(e,t,i,s)};lime__$internal_graphics_ImageCanvasUtil.setPixel32=function(e,t,i,s,a){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.setPixel32(e,t,i,s,a)};lime__$internal_graphics_ImageCanvasUtil.sync=function(e,t){if(e==null){return}if(e.type==lime_graphics_ImageType.CANVAS&&(e.buffer.__srcCanvas!=null||e.buffer.data!=null)){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e,t)}else if(e.type==lime_graphics_ImageType.DATA){lime__$internal_graphics_ImageCanvasUtil.convertToData(e,t)}};var lime__$internal_graphics_ImageDataUtil=function(){};$hxClasses["lime._internal.graphics.ImageDataUtil"]=lime__$internal_graphics_ImageDataUtil;lime__$internal_graphics_ImageDataUtil.__name__=["lime","_internal","graphics","ImageDataUtil"];lime__$internal_graphics_ImageDataUtil.colorTransform=function(e,t,i){var s=e.buffer.data;if(s==null){return}var a=e.buffer.format;var r=e.buffer.premultiplied;var n=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,t);var _=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(i);var o=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(i);var l=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(i);var h=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(i);var c;var u;var f;var p=0;var d=n.height;while(p>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|f&255&255}}f=(o[f>>>24&255]&255)<<24|(l[f>>>16&255]&255)<<16|(h[f>>>8&255]&255)<<8|_[f&255]&255;if(r){if((f&255)==0){if(f!=0){f=0}}else if((f&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[f&255];f=((f>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((f>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((f>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|f&255&255}}switch(a){case 0:s[u]=f>>>24&255;s[u+1]=f>>>16&255;s[u+2]=f>>>8&255;s[u+3]=f&255;break;case 1:s[u]=f&255;s[u+1]=f>>>24&255;s[u+2]=f>>>16&255;s[u+3]=f>>>8&255;break;case 2:s[u]=f>>>8&255;s[u+1]=f>>>16&255;s[u+2]=f>>>24&255;s[u+3]=f&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.copyChannel=function(e,t,i,s,a,r){var n;switch(r[1]){case 0:n=0;break;case 1:n=1;break;case 2:n=2;break;case 3:n=3;break}var _;switch(a[1]){case 0:_=0;break;case 1:_=1;break;case 2:_=2;break;case 3:_=3;break}var o=t.buffer.data;var l=e.buffer.data;if(o==null||l==null){return}var h=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(t,i);var c=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,new lime_math_Rectangle(s.x,s.y,h.width,h.height));var u=t.buffer.format;var f=e.buffer.format;var p=t.buffer.premultiplied;var d=e.buffer.premultiplied;var g;var m;var v;var b;var y=0;var x=0;var w=c.height;while(x>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|v&255&255}}switch(f){case 0:b=(l[m]&255)<<24|(l[m+1]&255)<<16|(l[m+2]&255)<<8|l[m+3]&255;break;case 1:b=(l[m+1]&255)<<24|(l[m+2]&255)<<16|(l[m+3]&255)<<8|l[m]&255;break;case 2:b=(l[m+2]&255)<<24|(l[m+1]&255)<<16|(l[m]&255)<<8|l[m+3]&255;break}if(d){if((b&255)!=0&&(b&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(b&255);b=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|b&255&255}}switch(_){case 0:y=v>>>24&255;break;case 1:y=v>>>16&255;break;case 2:y=v>>>8&255;break;case 3:y=v&255;break}switch(n){case 0:b=(y&255)<<24|(b>>>16&255&255)<<16|(b>>>8&255&255)<<8|b&255&255;break;case 1:b=(b>>>24&255&255)<<24|(y&255)<<16|(b>>>8&255&255)<<8|b&255&255;break;case 2:b=(b>>>24&255&255)<<24|(b>>>16&255&255)<<16|(y&255)<<8|b&255&255;break;case 3:b=(b>>>24&255&255)<<24|(b>>>16&255&255)<<16|(b>>>8&255&255)<<8|y&255;break}if(d){if((b&255)==0){if(b!=0){b=0}}else if((b&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[b&255];b=((b>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((b>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((b>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|b&255&255}}switch(f){case 0:l[m]=b>>>24&255;l[m+1]=b>>>16&255;l[m+2]=b>>>8&255;l[m+3]=b&255;break;case 1:l[m]=b&255;l[m+1]=b>>>24&255;l[m+2]=b>>>16&255;l[m+3]=b>>>8&255;break;case 2:l[m]=b>>>8&255;l[m+1]=b>>>16&255;l[m+2]=b>>>24&255;l[m+3]=b&255;break}g+=4;m+=4}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.copyPixels=function(e,t,i,s,a,r,n){if(n==null){n=false}if(e.width==t.width&&e.height==t.height&&i.width==t.width&&i.height==t.height&&i.x==0&&i.y==0&&s.x==0&&s.y==0&&a==null&&r==null&&n==false&&e.get_format()==t.get_format()){e.buffer.data.set(t.buffer.data)}else{var _=t.buffer.data;var o=e.buffer.data;if(_==null||o==null){return}var l=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(t,i);var h=new lime_math_Rectangle(s.x,s.y,l.width,l.height);var c=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,h);var u=t.buffer.format;var f=e.buffer.format;var p;var d;var g;var m;var v;var b;var y;var x;var w=t.buffer.premultiplied;var k=e.buffer.premultiplied;var P=t.buffer.bitsPerPixel/8|0;var C=e.buffer.bitsPerPixel/8|0;var T=a!=null&&a.get_transparent();var M=n||T&&!e.get_transparent();if(!T){if(M){var S=0;var $=c.height;while(S<$){var E=S++;p=l.byteOffset+l.stride*E;d=c.byteOffset+c.stride*E;var B=0;var L=c.width;while(B>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(f){case 0:x=(o[d]&255)<<24|(o[d+1]&255)<<16|(o[d+2]&255)<<8|o[d+3]&255;break;case 1:x=(o[d+1]&255)<<24|(o[d+2]&255)<<16|(o[d+3]&255)<<8|o[d]&255;break;case 2:x=(o[d+2]&255)<<24|(o[d+1]&255)<<16|(o[d]&255)<<8|o[d+3]&255;break}if(k){if((x&255)!=0&&(x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|x&255&255}}g=(y&255)/255;m=(x&255)/255;v=1-g;b=g+m*v;if(b==0){x=0}else{var A=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>24&255)*g+(x>>>24&255)*m*v)/b)];x=(A&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|x&255&255;var I=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>16&255)*g+(x>>>16&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(I&255)<<16|(x>>>8&255&255)<<8|x&255&255;var D=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>8&255)*g+(x>>>8&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(D&255)<<8|x&255&255;var F=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(b*255)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|F&255}if(k){if((x&255)==0){if(x!=0){x=0}}else if((x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|x&255&255}}switch(f){case 0:o[d]=x>>>24&255;o[d+1]=x>>>16&255;o[d+2]=x>>>8&255;o[d+3]=x&255;break;case 1:o[d]=x&255;o[d+1]=x>>>24&255;o[d+2]=x>>>16&255;o[d+3]=x>>>8&255;break;case 2:o[d]=x>>>8&255;o[d+1]=x>>>16&255;o[d+2]=x>>>24&255;o[d+3]=x&255;break}p+=4;d+=4}}}else if(u==f&&w==k&&P==C){var O=0;var G=c.height;while(O>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}if(k){if((y&255)==0){if(y!=0){y=0}}else if((y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|y&255&255}}switch(f){case 0:o[d]=y>>>24&255;o[d+1]=y>>>16&255;o[d+2]=y>>>8&255;o[d+3]=y&255;break;case 1:o[d]=y&255;o[d+1]=y>>>24&255;o[d+2]=y>>>16&255;o[d+3]=y>>>8&255;break;case 2:o[d]=y>>>8&255;o[d+1]=y>>>16&255;o[d+2]=y>>>24&255;o[d+3]=y&255;break}p+=4;d+=4}}}}else{if(r==null){r=new lime_math_Vector2}var X=a.buffer.data;var Y=a.buffer.format;var q;var J;var K=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(a,new lime_math_Rectangle(r.x,r.y,a.width,a.height));c.clip(s.x|0,s.y|0,K.width,K.height);if(M){var Z=0;var Q=c.height;while(Z>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(f){case 0:x=(o[d]&255)<<24|(o[d+1]&255)<<16|(o[d+2]&255)<<8|o[d+3]&255;break;case 1:x=(o[d+1]&255)<<24|(o[d+2]&255)<<16|(o[d+3]&255)<<8|o[d]&255;break;case 2:x=(o[d+2]&255)<<24|(o[d+1]&255)<<16|(o[d]&255)<<8|o[d+3]&255;break}if(k){if((x&255)!=0&&(x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|x&255&255}}switch(Y){case 0:J=(X[q]&255)<<24|(X[q+1]&255)<<16|(X[q+2]&255)<<8|X[q+3]&255;break;case 1:J=(X[q+1]&255)<<24|(X[q+2]&255)<<16|(X[q+3]&255)<<8|X[q]&255;break;case 2:J=(X[q+2]&255)<<24|(X[q+1]&255)<<16|(X[q]&255)<<8|X[q+3]&255;break}g=(J&255)/255*((y&255)/255);if(g>0){m=(x&255)/255;v=1-g;b=g+m*v;var ae=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>24&255)*g+(x>>>24&255)*m*v)/b)];x=(ae&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|x&255&255;var re=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>16&255)*g+(x>>>16&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(re&255)<<16|(x>>>8&255&255)<<8|x&255&255;var ne=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>8&255)*g+(x>>>8&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(ne&255)<<8|x&255&255;var _e=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(b*255)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|_e&255;if(k){if((x&255)==0){if(x!=0){x=0}}else if((x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|x&255&255}}switch(f){case 0:o[d]=x>>>24&255;o[d+1]=x>>>16&255;o[d+2]=x>>>8&255;o[d+3]=x&255;break;case 1:o[d]=x&255;o[d+1]=x>>>24&255;o[d+2]=x>>>16&255;o[d+3]=x>>>8&255;break;case 2:o[d]=x>>>8&255;o[d+1]=x>>>16&255;o[d+2]=x>>>24&255;o[d+3]=x&255;break}}p+=4;d+=4;q+=4}}}else{var oe=0;var le=c.height;while(oe>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(Y){case 0:J=(X[q]&255)<<24|(X[q+1]&255)<<16|(X[q+2]&255)<<8|X[q+3]&255;break;case 1:J=(X[q+1]&255)<<24|(X[q+2]&255)<<16|(X[q+3]&255)<<8|X[q]&255;break;case 2:J=(X[q+2]&255)<<24|(X[q+1]&255)<<16|(X[q]&255)<<8|X[q+3]&255;break}var pe=Math.round((y&255)*((J&255)/255));y=(y>>>24&255&255)<<24|(y>>>16&255&255)<<16|(y>>>8&255&255)<<8|pe&255;if(k){if((y&255)==0){if(y!=0){y=0}}else if((y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|y&255&255}}switch(f){case 0:o[d]=y>>>24&255;o[d+1]=y>>>16&255;o[d+2]=y>>>8&255;o[d+3]=y&255;break;case 1:o[d]=y&255;o[d+1]=y>>>24&255;o[d+2]=y>>>16&255;o[d+3]=y>>>8&255;break;case 2:o[d]=y>>>8&255;o[d+1]=y>>>16&255;o[d+2]=y>>>24&255;o[d+3]=y&255;break}p+=4;d+=4;q+=4}}}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.fillRect=function(e,t,i,s){var a;switch(s){case 1:var r=i;var n=0;var _=n;_=(r>>>16&255&255)<<24|(r>>>8&255&255)<<16|(r&255&255)<<8|r>>>24&255&255;a=_;break;case 2:var o=i;var l=0;var h=l;h=(o>>>8&255&255)<<24|(o>>>16&255&255)<<16|(o>>>24&255&255)<<8|o&255&255;a=h;break;default:a=i}if(!e.get_transparent()){a=(a>>>24&255&255)<<24|(a>>>16&255&255)<<16|(a>>>8&255&255)<<8|255}var c=e.buffer.data;if(c==null){return}var u=e.buffer.format;var f=e.buffer.premultiplied;if(f){if((a&255)==0){if(a!=0){a=0}}else if((a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[a&255];a=((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|a&255&255}}var p=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,t);var d;var g=0;var m=p.height;while(g>>24&255;c[w+1]=a>>>16&255;c[w+2]=a>>>8&255;c[w+3]=a&255;break;case 1:c[w]=a&255;c[w+1]=a>>>24&255;c[w+2]=a>>>16&255;c[w+3]=a>>>8&255;break;case 2:c[w]=a>>>8&255;c[w+1]=a>>>16&255;c[w+2]=a>>>24&255;c[w+3]=a&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.gaussianBlur=function(e,t,i,s,a,r,n,_,o){if(_==null){_=1}if(n==null){n=1}if(r==null){r=4}if(a==null){a=4}var l=e.get_premultiplied();var h=t.get_premultiplied();if(l){e.set_premultiplied(false)}if(h){t.set_premultiplied(false)}var c=e.get_data();var u=t.get_data();var f=i.width|0;var p=i.height|0;var d=a|0;var g=r|0;var m=s.x|0;var v=s.y|0;var b=n*2-1;var y=Math.pow(2,n)*.125;var x=lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur(d*y,b);var w=lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur(g*y,b);var k=(f*v+m)*4|0;lime__$internal_graphics_ImageDataUtil.__boxBlur(u,c,f,p,(x[0]-1)/2,(w[0]-1)/2);var P=1;var C=0;var T=b/2|0;while(C=0){S=f-1;while(S>=0){lime__$internal_graphics_ImageDataUtil.__translatePixel(c,t.get_rect(),e.get_rect(),s,S,$,_);--S}--$}}}e.dirty=true;e.version++;t.dirty=true;t.version++;if(l){e.set_premultiplied(true)}if(h){t.set_premultiplied(true)}if(c==e.get_data()){return e}return t};lime__$internal_graphics_ImageDataUtil.getPixel32=function(e,t,i,s){var a;var r=e.buffer.data;var n=4*(i+e.offsetY)*e.buffer.width+(t+e.offsetX)*4;var _=e.buffer.premultiplied;switch(e.buffer.format){case 0:a=(r[n]&255)<<24|(r[n+1]&255)<<16|(r[n+2]&255)<<8|r[n+3]&255;break;case 1:a=(r[n+1]&255)<<24|(r[n+2]&255)<<16|(r[n+3]&255)<<8|r[n]&255;break;case 2:a=(r[n+2]&255)<<24|(r[n+1]&255)<<16|(r[n]&255)<<8|r[n+3]&255;break}if(_){if((a&255)!=0&&(a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(a&255);a=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|a&255&255}}switch(s){case 1:var o=0;var l=o;l=(a&255&255)<<24|(a>>>24&255&255)<<16|(a>>>16&255&255)<<8|a>>>8&255&255;return l;case 2:var h=0;var c=h;c=(a>>>8&255&255)<<24|(a>>>16&255&255)<<16|(a>>>24&255&255)<<8|a&255&255;return c;default:return a}};lime__$internal_graphics_ImageDataUtil.multiplyAlpha=function(e){var t=e.buffer.data;if(t==null||!e.buffer.transparent){return}var i=e.buffer.format;var s=t.length/4|0;var a;var r=0;var n=s;while(r>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|a&255&255}switch(i){case 0:t[l]=a>>>24&255;t[l+1]=a>>>16&255;t[l+2]=a>>>8&255;t[l+3]=a&255;break;case 1:t[l]=a&255;t[l+1]=a>>>24&255;t[l+2]=a>>>16&255;t[l+3]=a>>>8&255;break;case 2:t[l]=a>>>8&255;t[l+1]=a>>>16&255;t[l+2]=a>>>24&255;t[l+3]=a&255;break}}e.buffer.premultiplied=true;e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.setFormat=function(e,t){var i=e.buffer.data;if(i==null){return}var s;var a;var r=i.length/4|0;var n;var _;var o;var l;var h;var c;var u;var f;var p;var d;var g;var m;var v=e.get_format();switch(v){case 0:n=0;_=1;o=2;l=3;break;case 1:n=1;_=2;o=3;l=0;break;case 2:n=2;_=1;o=0;l=3;break}switch(t){case 0:h=0;c=1;u=2;f=3;break;case 1:h=1;c=2;u=3;f=0;break;case 2:h=2;c=1;u=0;f=3;break}var b=0;var y=r;while(b>>16&255&255)<<24|(n>>>8&255&255)<<16|(n&255&255)<<8|n>>>24&255&255;r=o;break;case 2:var l=s;var h=0;var c=h;c=(l>>>8&255&255)<<24|(l>>>16&255&255)<<16|(l>>>24&255&255)<<8|l&255&255;r=c;break;default:r=s}if(!e.get_transparent()){r=(r>>>24&255&255)<<24|(r>>>16&255&255)<<16|(r>>>8&255&255)<<8|255}var u=e.buffer.data;var f=4*(i+e.offsetY)*e.buffer.width+(t+e.offsetX)*4;if(e.buffer.premultiplied){if((r&255)==0){if(r!=0){r=0}}else if((r&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[r&255];r=((r>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((r>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((r>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|r&255&255}}switch(e.buffer.format){case 0:u[f]=r>>>24&255;u[f+1]=r>>>16&255;u[f+2]=r>>>8&255;u[f+3]=r&255;break;case 1:u[f]=r&255;u[f+1]=r>>>24&255;u[f+2]=r>>>16&255;u[f+3]=r>>>8&255;break;case 2:u[f]=r>>>8&255;u[f+1]=r>>>16&255;u[f+2]=r>>>24&255;u[f+3]=r&255;break}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.unmultiplyAlpha=function(e){var t=e.buffer.data;if(t==null){return}var i=e.buffer.format;var s=t.length/4|0;var a;var r=0;var n=s;while(r>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|a&255&255}var l=_*4;switch(i){case 0:t[l]=a>>>24&255;t[l+1]=a>>>16&255;t[l+2]=a>>>8&255;t[l+3]=a&255;break;case 1:t[l]=a&255;t[l+1]=a>>>24&255;t[l+2]=a>>>16&255;t[l+3]=a>>>8&255;break;case 2:t[l]=a>>>8&255;t[l+1]=a>>>16&255;t[l+2]=a>>>24&255;t[l+3]=a&255;break}}e.buffer.premultiplied=false;e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.__boxBlur=function(e,t,i,s,a,r){t.set(e);var n=a|0;var _=r|0;lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,0);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,1);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,2);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,3);var o=1/(_+_+1);var l=i*4;var h;var c;var u;var f;var p;var d;var g=0;var m=i;while(g=e.width||r>=e.height){n=-1}else{n=4*(r*(e.width|0)+a)}return n};lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur=function(e,t){var i=Math.sqrt(12*e*e/t+1);var s=Math.floor(i);if(s%2==0){--s}var a=s+2;var r=(12*e*e-t*s*s-4*t*s-3*t)/(-4*s-4);var n=Math.round(r);var _=[];var o=0;var l=t;while(o255?255:l}};var lime__$internal_graphics__$ImageDataUtil_ImageDataView=function(e,t){this.image=e;if(t==null){this.rect=e.get_rect()}else{if(t.x<0){t.x=0}if(t.y<0){t.y=0}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}if(t.width<0){t.width=0}if(t.height<0){t.height=0}this.rect=t}this.stride=e.buffer.get_stride();this.__update()};$hxClasses["lime._internal.graphics._ImageDataUtil.ImageDataView"]=lime__$internal_graphics__$ImageDataUtil_ImageDataView;lime__$internal_graphics__$ImageDataUtil_ImageDataView.__name__=["lime","_internal","graphics","_ImageDataUtil","ImageDataView"];lime__$internal_graphics__$ImageDataUtil_ImageDataView.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,tempRect:null,clip:function(e,t,i,s){if(this.tempRect==null){this.tempRect=new lime_math_Rectangle}this.tempRect.setTo(e,t,i,s);this.rect.intersection(this.tempRect,this.rect);this.__update()},__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)+(this.x+this.image.offsetX)*4},__class__:lime__$internal_graphics__$ImageDataUtil_ImageDataView};var lime__$internal_unifill_Exception=function(){};$hxClasses["lime._internal.unifill.Exception"]=lime__$internal_unifill_Exception;lime__$internal_unifill_Exception.__name__=["lime","_internal","unifill","Exception"];lime__$internal_unifill_Exception.prototype={__class__:lime__$internal_unifill_Exception};var lime__$internal_unifill_InvalidCodeUnitSequence=function(e){lime__$internal_unifill_Exception.call(this);this.index=e};$hxClasses["lime._internal.unifill.InvalidCodeUnitSequence"]=lime__$internal_unifill_InvalidCodeUnitSequence;lime__$internal_unifill_InvalidCodeUnitSequence.__name__=["lime","_internal","unifill","InvalidCodeUnitSequence"];lime__$internal_unifill_InvalidCodeUnitSequence.__super__=lime__$internal_unifill_Exception;lime__$internal_unifill_InvalidCodeUnitSequence.prototype=$extend(lime__$internal_unifill_Exception.prototype,{index:null,toString:function(){return"InvalidCodeUnitSequence(index: "+this.index+")"},__class__:lime__$internal_unifill_InvalidCodeUnitSequence});var lime__$internal_unifill_Unifill=function(){};$hxClasses["lime._internal.unifill.Unifill"]=lime__$internal_unifill_Unifill;lime__$internal_unifill_Unifill.__name__=["lime","_internal","unifill","Unifill"];lime__$internal_unifill_Unifill.uCompare=function(e,t){var i;var s;var a;var r;a=0;i=e;s=0;r=e.length;var n;var _;var o;var l;o=0;n=t;_=0;l=t.length;while(sx){return 1}}if(_this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(s=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var i=this.__listeners;var s=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$Int_$Float_$Float_$Void};var lime_app__$Event_$Int_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_Float_Void"]=lime_app__$Event_$Int_$Float_$Void;lime_app__$Event_$Int_$Float_$Void.__name__=["lime","app","_Event_Int_Float_Void"];lime_app__$Event_$Int_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var i=this.__listeners;var s=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var i=this.__listeners;var s=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void};var lime_app__$Event_$String_$Int_$Int_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_String_Int_Int_Void"]=lime_app__$Event_$String_$Int_$Int_$Void;lime_app__$Event_$String_$Int_$Int_$Void.__name__=["lime","app","_Event_String_Int_Int_Void"];lime_app__$Event_$String_$Int_$Int_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$String_$Int_$Int_$Void};var lime_app__$Event_$String_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_String_Void"]=lime_app__$Event_$String_$Void;lime_app__$Event_$String_$Void.__name__=["lime","app","_Event_String_Void"];lime_app__$Event_$String_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},has:function(e){var t=0;var i=this.__listeners;while(t=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(){this.canceled=false;var e=this.__listeners;var t=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var i=this.__listeners;var s=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var i=this.__listeners;var s=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var i=this.__repeat;var s=0;while(s0&&a>0){var _=this.type;switch(_[1]){case 0:this.buffer=new lime_graphics_ImageBuffer(null,s,a);lime__$internal_graphics_ImageCanvasUtil.createCanvas(this,s,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,s,a),r)}break;case 1:var o=s*a*4;var l;if(o!=null){l=new Uint8Array(o)}else{l=null}this.buffer=new lime_graphics_ImageBuffer(l,s,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,s,a),r)}break;case 2:break;default:}}}else{this.__fromImageBuffer(e)}};$hxClasses["lime.graphics.Image"]=lime_graphics_Image;lime_graphics_Image.__name__=["lime","graphics","Image"];lime_graphics_Image.fromBase64=function(e,t){if(e==null){return null}var i=new lime_graphics_Image;i.__fromBase64(e,t);return i};lime_graphics_Image.fromBitmapData=function(e){if(e==null){return null}return e.image};lime_graphics_Image.fromBytes=function(e){if(e==null){return null}var t=new lime_graphics_Image;if(t.__fromBytes(e)){return t}else{return null}};lime_graphics_Image.fromCanvas=function(e){if(e==null){return null}var t=new lime_graphics_ImageBuffer(null,e.width,e.height);t.set_src(e);var i=new lime_graphics_Image(t);i.type=lime_graphics_ImageType.CANVAS;return i};lime_graphics_Image.fromFile=function(e){if(e==null){return null}var t=new lime_graphics_Image;if(t.__fromFile(e)){return t}else{return null}};lime_graphics_Image.fromImageElement=function(e){if(e==null){return null}var t=new lime_graphics_ImageBuffer(null,e.width,e.height);t.set_src(e);var i=new lime_graphics_Image(t);i.type=lime_graphics_ImageType.CANVAS;return i};lime_graphics_Image.loadFromBase64=function(e,t){if(e==null||t==null){return lime_app_Future.withValue(null)}return lime__$internal_backend_html5_HTML5HTTPRequest.loadImage("data:"+t+";base64,"+e)};lime_graphics_Image.loadFromBytes=function(e){if(e==null){return lime_app_Future.withValue(null)}var t="";if(lime_graphics_Image.__isPNG(e)){t="image/png"}else if(lime_graphics_Image.__isJPG(e)){t="image/jpeg"}else if(lime_graphics_Image.__isGIF(e)){t="image/gif"}else if(lime_graphics_Image.__isWebP(e)){t="image/webp"}else{return lime_app_Future.withValue(null)}return lime_graphics_Image.loadFromBase64(lime_graphics_Image.__base64Encode(e),t)};lime_graphics_Image.loadFromFile=function(e){if(e==null){return lime_app_Future.withValue(null)}return lime__$internal_backend_html5_HTML5HTTPRequest.loadImage(e)};lime_graphics_Image.__base64Encode=function(e){var t;var i=e.length%3;switch(i){case 1:t="==";break;case 2:t="=";break;default:t=""}if(lime_graphics_Image.__base64Encoder==null){lime_graphics_Image.__base64Encoder=new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_graphics_Image.__base64Chars))}return lime_graphics_Image.__base64Encoder.encodeBytes(e).toString()+t};lime_graphics_Image.__isGIF=function(e){if(e==null||e.length<6){return false}var t=e.getString(0,6);if(t!="GIF87a"){return t=="GIF89a"}else{return true}};lime_graphics_Image.__isJPG=function(e){if(e==null||e.length<4){return false}if(e.b[0]==255&&e.b[1]==216&&e.b[e.length-2]==255){return e.b[e.length-1]==217}else{return false}};lime_graphics_Image.__isPNG=function(e){if(e==null||e.length<8){return false}if(e.b[0]==137&&e.b[1]==80&&e.b[2]==78&&e.b[3]==71&&e.b[4]==13&&e.b[5]==10&&e.b[6]==26){return e.b[7]==10}else{return false}};lime_graphics_Image.__isWebP=function(e){if(e==null||e.length<16){return false}if(e.getString(0,4)=="RIFF"){return e.getString(8,4)=="WEBP"}else{return false}};lime_graphics_Image.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,type:null,version:null,width:null,clone:function(){if(this.buffer!=null){if(this.type==lime_graphics_ImageType.CANVAS){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this)}else{lime__$internal_graphics_ImageCanvasUtil.convertToData(this)}var e=new lime_graphics_Image(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);e.version=this.version;return e}else{return new lime_graphics_Image(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)}},colorTransform:function(e,t){e=this.__clipRect(e);if(this.buffer==null||e==null){return}var i=this.type;switch(i[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.colorTransform(this,e,t);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.colorTransform(this,e,t);break;case 2:e.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.colorTransform(e.__toFlashRectangle(),lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform(t));break;default:}},copyChannel:function(e,t,i,s,a){t=this.__clipRect(t);if(this.buffer==null||t==null){return}if(a==lime_graphics_ImageChannel.ALPHA&&!this.get_transparent()){return}if(t.width<=0||t.height<=0){return}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}var r=this.type;switch(r[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.copyChannel(this,e,t,i,s,a);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.copyChannel(this,e,t,i,s,a);break;case 2:var n;switch(s[1]){case 0:n=1;break;case 1:n=2;break;case 2:n=4;break;case 3:n=8;break}var _;switch(a[1]){case 0:_=1;break;case 1:_=2;break;case 2:_=4;break;case 3:_=8;break}t.offset(e.offsetX,e.offsetY);i.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(e.buffer.get_src(),t.__toFlashRectangle(),i.__toFlashPoint(),n,_);break;default:}},copyPixels:function(e,t,i,s,a,r){if(r==null){r=false}if(this.buffer==null||e==null){return}if(t.width<=0||t.height<=0){return}if(this.width<=0||this.height<=0){return}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}if(t.x<0){t.width+=t.x;t.x=0}if(t.y<0){t.height+=t.y;t.y=0}if(i.x+t.width>this.width){t.width=this.width-i.x}if(i.y+t.height>this.height){t.height=this.height-i.y}if(i.x<0){t.width+=i.x;t.x-=i.x;i.x=0}if(i.y<0){t.height+=i.y;t.y-=i.y;i.y=0}if(e==this&&i.x>>24&255&255)<<16|(r>>>16&255&255)<<8|r>>>8&255&255;a=_}else{switch(i){case 1:a=t;break;case 2:var o=t;var l=0;var h=l;h=(o&255&255)<<24|(o>>>8&255&255)<<16|(o>>>16&255&255)<<8|o>>>24&255&255;a=h;break;default:var c=t;var u=0;var f=u;f=(c&255&255)<<24|(c>>>24&255&255)<<16|(c>>>16&255&255)<<8|c>>>8&255&255;a=f}}this.buffer.__srcBitmapData.fillRect(e.__toFlashRectangle(),a);break;default:}},getPixel32:function(e,t,i){if(this.buffer==null||e<0||t<0||e>=this.width||t>=this.height){return 0}var s=this.type;switch(s[1]){case 0:return lime__$internal_graphics_ImageCanvasUtil.getPixel32(this,e,t,i);case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);return lime__$internal_graphics_ImageDataUtil.getPixel32(this,e,t,i);case 2:var a=this.buffer.__srcBitmapData.getPixel32(e+this.offsetX,t+this.offsetY);if(i==null){var r=0;var n=r;n=(a>>>16&255&255)<<24|(a>>>8&255&255)<<16|(a&255&255)<<8|a>>>24&255&255;var _=n;return _}else{switch(i){case 1:return a;case 2:var o=0;var l=o;l=(a&255&255)<<24|(a>>>8&255&255)<<16|(a>>>16&255&255)<<8|a>>>24&255&255;var h=l;return h;default:var c=0;var u=c;u=(a>>>16&255&255)<<24|(a>>>8&255&255)<<16|(a&255&255)<<8|a>>>24&255&255;var f=u;return f}}break;default:return 0}},setPixel32:function(e,t,i,s){if(this.buffer==null||e<0||t<0||e>=this.width||t>=this.height){return}var a=this.type;switch(a[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.setPixel32(this,e,t,i,s);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.setPixel32(this,e,t,i,s);break;case 2:var r;if(s==null){var n=i;var _=0;var o=_;o=(n&255&255)<<24|(n>>>24&255&255)<<16|(n>>>16&255&255)<<8|n>>>8&255&255;r=o}else{switch(s){case 1:r=i;break;case 2:var l=i;var h=0;var c=h;c=(l&255&255)<<24|(l>>>8&255&255)<<16|(l>>>16&255&255)<<8|l>>>24&255&255;r=c;break;default:var u=i;var f=0;var p=f;p=(u&255&255)<<24|(u>>>24&255&255)<<16|(u>>>16&255&255)<<8|u>>>8&255&255;r=p}}this.buffer.__srcBitmapData.setPixel32(e+this.offsetX,t+this.offsetY,r);break;default:}},__clipRect:function(e){if(e==null){return null}if(e.x<0){e.width-=-e.x;e.x=0;if(e.x+e.width<=0){return null}}if(e.y<0){e.height-=-e.y;e.y=0;if(e.y+e.height<=0){return null}}if(e.x+e.width>=this.width){e.width-=e.x+e.width-this.width;if(e.width<=0){return null}}if(e.y+e.height>=this.height){e.height-=e.y+e.height-this.height;if(e.height<=0){return null}}return e},__fromBase64:function(e,t,i){var s=this;var a=new Image;var r=function(e){s.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);s.buffer.__srcImage=a;s.offsetX=0;s.offsetY=0;s.width=s.buffer.width;s.height=s.buffer.height;if(i!=null){i(s)}};a.addEventListener("load",r,false);a.src="data:"+t+";base64,"+e},__fromBytes:function(e,t){var i="";if(lime_graphics_Image.__isPNG(e)){i="image/png"}else if(lime_graphics_Image.__isJPG(e)){i="image/jpeg"}else if(lime_graphics_Image.__isGIF(e)){i="image/gif"}else{return false}this.__fromBase64(lime_graphics_Image.__base64Encode(e),i,t);return true},__fromFile:function(e,t,i){var s=this;var a=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){a.crossOrigin="Anonymous"}a.onload=function(e){s.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);s.buffer.__srcImage=a;s.width=a.width;s.height=a.height;if(t!=null){t(s)}};a.onerror=function(e){if(i!=null){i()}};a.src=e;var r=a.complete;return true},__fromImageBuffer:function(e){this.buffer=e;if(e!=null){if(this.width==-1){this.width=e.width}if(this.height==-1){this.height=e.height}}},get_data:function(){if(this.buffer.data==null&&this.buffer.width>0&&this.buffer.height>0){lime__$internal_graphics_ImageCanvasUtil.convertToData(this)}return this.buffer.data},get_format:function(){return this.buffer.format},set_format:function(e){if(this.buffer.format!=e){var t=this.type;if(t[1]==1){lime__$internal_graphics_ImageDataUtil.setFormat(this,e)}}return this.buffer.format=e},get_premultiplied:function(){return this.buffer.premultiplied},set_premultiplied:function(e){if(e&&!this.buffer.premultiplied){var t=this.type;switch(t[1]){case 0:case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.multiplyAlpha(this);break;default:}}else if(!e&&this.buffer.premultiplied){var i=this.type;if(i[1]==1){lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.unmultiplyAlpha(this)}}return e},get_rect:function(){return new lime_math_Rectangle(0,0,this.width,this.height)},get_src:function(){if(this.buffer.__srcCanvas==null&&(this.buffer.data!=null||this.type==lime_graphics_ImageType.DATA)){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this)}return this.buffer.get_src()},get_transparent:function(){if(this.buffer==null){return false}return this.buffer.transparent},set_transparent:function(e){if(this.buffer==null){return false}return this.buffer.transparent=e},__class__:lime_graphics_Image,__properties__:{get_rect:"get_rect",set_transparent:"set_transparent",get_transparent:"get_transparent",get_src:"get_src",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_format:"set_format",get_format:"get_format",get_data:"get_data"}};var lime_graphics_ImageBuffer=function(e,t,i,s,a){if(s==null){s=32}if(i==null){i=0}if(t==null){t=0}this.data=e;this.width=t;this.height=i;this.bitsPerPixel=s;this.format=a==null?0:a;this.premultiplied=false;this.transparent=true};$hxClasses["lime.graphics.ImageBuffer"]=lime_graphics_ImageBuffer;lime_graphics_ImageBuffer.__name__=["lime","graphics","ImageBuffer"];lime_graphics_ImageBuffer.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcImage:null,__srcImageData:null,clone:function(){var e=new lime_graphics_ImageBuffer(this.data,this.width,this.height,this.bitsPerPixel);if(this.data!=null){var t=this.data.byteLength;var i;if(t!=null){i=new Uint8Array(t)}else{i=null}e.data=i;var s=this.data;var a;if(s!=null){a=new Uint8Array(s)}else{a=null}var r=a;e.data.set(r)}else if(this.__srcImageData!=null){e.__srcCanvas=window.document.createElement("canvas");e.__srcContext=e.__srcCanvas.getContext("2d");e.__srcCanvas.width=this.__srcImageData.width;e.__srcCanvas.height=this.__srcImageData.height;e.__srcImageData=e.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height);var n=new Uint8ClampedArray(this.__srcImageData.data);e.__srcImageData.data.set(n)}else if(this.__srcCanvas!=null){e.__srcCanvas=window.document.createElement("canvas");e.__srcContext=e.__srcCanvas.getContext("2d");e.__srcCanvas.width=this.__srcCanvas.width;e.__srcCanvas.height=this.__srcCanvas.height;e.__srcContext.drawImage(this.__srcCanvas,0,0)}else{e.__srcImage=this.__srcImage}e.bitsPerPixel=this.bitsPerPixel;e.format=this.format;e.premultiplied=this.premultiplied;e.transparent=this.transparent;return e},get_src:function(){if(this.__srcImage!=null){return this.__srcImage}return this.__srcCanvas},set_src:function(e){if(js_Boot.__instanceof(e,Image)){this.__srcImage=e}else if(js_Boot.__instanceof(e,HTMLCanvasElement)){this.__srcCanvas=e;this.__srcContext=this.__srcCanvas.getContext("2d")}return e},get_stride:function(){return this.width*(this.bitsPerPixel/8|0)},__class__:lime_graphics_ImageBuffer,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var lime_graphics_ImageChannel=$hxClasses["lime.graphics.ImageChannel"]={__ename__:["lime","graphics","ImageChannel"],__constructs__:["RED","GREEN","BLUE","ALPHA"]};lime_graphics_ImageChannel.RED=["RED",0];lime_graphics_ImageChannel.RED.toString=$estr;lime_graphics_ImageChannel.RED.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.GREEN=["GREEN",1];lime_graphics_ImageChannel.GREEN.toString=$estr;lime_graphics_ImageChannel.GREEN.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.BLUE=["BLUE",2];lime_graphics_ImageChannel.BLUE.toString=$estr;lime_graphics_ImageChannel.BLUE.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.ALPHA=["ALPHA",3];lime_graphics_ImageChannel.ALPHA.toString=$estr;lime_graphics_ImageChannel.ALPHA.__enum__=lime_graphics_ImageChannel;var lime_graphics_ImageType=$hxClasses["lime.graphics.ImageType"]={__ename__:["lime","graphics","ImageType"],__constructs__:["CANVAS","DATA","FLASH","CUSTOM"]};lime_graphics_ImageType.CANVAS=["CANVAS",0];lime_graphics_ImageType.CANVAS.toString=$estr;lime_graphics_ImageType.CANVAS.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.DATA=["DATA",1];lime_graphics_ImageType.DATA.toString=$estr;lime_graphics_ImageType.DATA.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.FLASH=["FLASH",2];lime_graphics_ImageType.FLASH.toString=$estr;lime_graphics_ImageType.FLASH.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.CUSTOM=["CUSTOM",3];lime_graphics_ImageType.CUSTOM.toString=$estr;lime_graphics_ImageType.CUSTOM.__enum__=lime_graphics_ImageType;var lime_graphics_RenderContext=function(){};$hxClasses["lime.graphics.RenderContext"]=lime_graphics_RenderContext;lime_graphics_RenderContext.__name__=["lime","graphics","RenderContext"];lime_graphics_RenderContext.prototype={attributes:null,canvas2D:null,dom:null,type:null,version:null,webgl:null,webgl2:null,window:null,__class__:lime_graphics_RenderContext};var lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$={};$hxClasses["lime.graphics._WebGL2RenderContext.WebGL2RenderContext_Impl_"]=lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$;lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.__name__=["lime","graphics","_WebGL2RenderContext","WebGL2RenderContext_Impl_"];lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.uniform2fv=function(e,t,i,s,a){if(s!=null){e.uniform2fv(t,i,s,a)}else{e.uniform2fv(t,i)}};var lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$={};$hxClasses["lime.graphics._WebGLRenderContext.WebGLRenderContext_Impl_"]=lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$;lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.__name__=["lime","graphics","_WebGLRenderContext","WebGLRenderContext_Impl_"];lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData=function(e,t,i,s){e.bufferData(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D=function(e,t,i,s,a,r,n,_,o,l){if(_!=null){e.texImage2D(t,i,s,a,r,n,_,o,l)}else{e.texImage2D(t,i,s,a,r,n)}};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv=function(e,t,i,s){e.uniformMatrix2fv(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv=function(e,t,i,s){e.uniformMatrix3fv(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv=function(e,t,i,s){e.uniformMatrix4fv(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.fromWebGL2RenderContext=function(e){return e};var lime_graphics_cairo_Cairo=function(){};$hxClasses["lime.graphics.cairo.Cairo"]=lime_graphics_cairo_Cairo;lime_graphics_cairo_Cairo.__name__=["lime","graphics","cairo","Cairo"];lime_graphics_cairo_Cairo.prototype={__class__:lime_graphics_cairo_Cairo};var lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$={};$hxClasses["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"]=lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$;lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.__name__=["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush=function(e){};var lime_graphics_opengl_GL=function(){};$hxClasses["lime.graphics.opengl.GL"]=lime_graphics_opengl_GL;lime_graphics_opengl_GL.__name__=["lime","graphics","opengl","GL"];var lime_graphics_opengl_ext_KHR_$debug=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};$hxClasses["lime.graphics.opengl.ext.KHR_debug"]=lime_graphics_opengl_ext_KHR_$debug;lime_graphics_opengl_ext_KHR_$debug.__name__=["lime","graphics","opengl","ext","KHR_debug"];lime_graphics_opengl_ext_KHR_$debug.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__:lime_graphics_opengl_ext_KHR_$debug};var lime_math__$ColorMatrix_ColorMatrix_$Impl_$={};$hxClasses["lime.math._ColorMatrix.ColorMatrix_Impl_"]=lime_math__$ColorMatrix_ColorMatrix_$Impl_$;lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__name__=["lime","math","_ColorMatrix","ColorMatrix_Impl_"];lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable=t}var i;lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[0]=0;var s=1;while(s<256){var a=s++;i=Math.floor(a*e[18]+e[19]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[a]=i}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable=t}var i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[12]+e[14]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable[a]=i}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable=t}var i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[6]+e[9]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable[a]=i}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable=t}var i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[0]+e[4]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable[a]=i}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform=function(e){return null};var lime_math_Matrix3=function(){};$hxClasses["lime.math.Matrix3"]=lime_math_Matrix3;lime_math_Matrix3.__name__=["lime","math","Matrix3"];var lime_math__$Matrix4_Matrix4_$Impl_$={};$hxClasses["lime.math._Matrix4.Matrix4_Impl_"]=lime_math__$Matrix4_Matrix4_$Impl_$;lime_math__$Matrix4_Matrix4_$Impl_$.__name__=["lime","math","_Matrix4","Matrix4_Impl_"];lime_math__$Matrix4_Matrix4_$Impl_$._new=function(e){var t;if(e!=null&&e.length==16){t=e}else{var i=lime_math__$Matrix4_Matrix4_$Impl_$.__identity;var s;if(i!=null){s=new Float32Array(i)}else{s=null}t=s}return t};lime_math__$Matrix4_Matrix4_$Impl_$.append=function(e,t){var i=e[0];var s=e[4];var a=e[8];var r=e[12];var n=e[1];var _=e[5];var o=e[9];var l=e[13];var h=e[2];var c=e[6];var u=e[10];var f=e[14];var p=e[3];var d=e[7];var g=e[11];var m=e[15];var v=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,0);var b=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,4);var y=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,8);var x=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,12);var w=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,1);var k=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,5);var P=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,9);var C=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,13);var T=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,2);var M=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,6);var S=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,10);var $=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,14);var E=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,3);var B=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,7);var L=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,11);var R=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,15);e[0]=i*v+n*b+h*y+p*x;e[1]=i*w+n*k+h*P+p*C;e[2]=i*T+n*M+h*S+p*$;e[3]=i*E+n*B+h*L+p*R;e[4]=s*v+_*b+c*y+d*x;e[5]=s*w+_*k+c*P+d*C;e[6]=s*T+_*M+c*S+d*$;e[7]=s*E+_*B+c*L+d*R;e[8]=a*v+o*b+u*y+g*x;e[9]=a*w+o*k+u*P+g*C;e[10]=a*T+o*M+u*S+g*$;e[11]=a*E+o*B+u*L+g*R;e[12]=r*v+l*b+f*y+m*x;e[13]=r*w+l*k+f*P+m*C;e[14]=r*T+l*M+f*S+m*$;e[15]=r*E+l*B+f*L+m*R};lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho=function(e,t,i,s,a,r,n){var _=1/(i-t);var o=1/(a-s);var l=1/(n-r);e[0]=2*_;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*o;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2*l;e[11]=0;e[12]=-(t+i)*_;e[13]=-(s+a)*o;e[14]=-(r+n)*l;e[15]=1};lime_math__$Matrix4_Matrix4_$Impl_$.identity=function(e){e[0]=1;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=1;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=1;e[11]=0;e[12]=0;e[13]=0;e[14]=0;e[15]=1};lime_math__$Matrix4_Matrix4_$Impl_$.get=function(e,t){return e[t]};lime_math__$Matrix4_Matrix4_$Impl_$.set=function(e,t,i){e[t]=i;return i};var lime_math__$RGBA_RGBA_$Impl_$={};$hxClasses["lime.math._RGBA.RGBA_Impl_"]=lime_math__$RGBA_RGBA_$Impl_$;lime_math__$RGBA_RGBA_$Impl_$.__name__=["lime","math","_RGBA","RGBA_Impl_"];var lime_math_Rectangle=function(e,t,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=i;this.height=s};$hxClasses["lime.math.Rectangle"]=lime_math_Rectangle;lime_math_Rectangle.__name__=["lime","math","Rectangle"];lime_math_Rectangle.prototype={height:null,width:null,x:null,y:null,intersection:function(e,t){if(t==null){t=new lime_math_Rectangle}var i=this.xe.get_right()?e.get_right():this.get_right();if(s<=i){t.setEmpty();return t}var a=this.ye.get_bottom()?e.get_bottom():this.get_bottom();if(r<=a){t.setEmpty();return t}t.x=i;t.y=a;t.width=s-i;t.height=r-a;return t},offset:function(e,t){this.x+=e;this.y+=t},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(e,t,i,s){this.x=e;this.y=t;this.width=i;this.height=s},__toFlashRectangle:function(){return null},get_bottom:function(){return this.y+this.height},get_right:function(){return this.x+this.width},__class__:lime_math_Rectangle,__properties__:{get_right:"get_right",get_bottom:"get_bottom"}};var lime_math_Vector2=function(e,t){if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t};$hxClasses["lime.math.Vector2"]=lime_math_Vector2;lime_math_Vector2.__name__=["lime","math","Vector2"];lime_math_Vector2.prototype={x:null,y:null,offset:function(e,t){this.x+=e;this.y+=t},__toFlashPoint:function(){return null},__class__:lime_math_Vector2};var lime_math_Vector4=function(e,t,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.w=s;this.x=e;this.y=t;this.z=i};$hxClasses["lime.math.Vector4"]=lime_math_Vector4;lime_math_Vector4.__name__=["lime","math","Vector4"];lime_math_Vector4.prototype={w:null,x:null,y:null,z:null,__class__:lime_math_Vector4};var lime_media_AudioBuffer=function(){};$hxClasses["lime.media.AudioBuffer"]=lime_media_AudioBuffer;lime_media_AudioBuffer.__name__=["lime","media","AudioBuffer"];lime_media_AudioBuffer.fromBase64=function(e){if(e==null){return null}if(e.indexOf(",")==-1){e="data:"+lime_media_AudioBuffer.__getCodec(haxe_crypto_Base64.decode(e))+";base64,"+e}var t=new lime_media_AudioBuffer;t.set_src(new Howl({src:[e],html5:true,preload:false}));return t};lime_media_AudioBuffer.fromBytes=function(e){if(e==null){return null}var t=new lime_media_AudioBuffer;t.set_src(new Howl({src:["data:"+lime_media_AudioBuffer.__getCodec(e)+";base64,"+haxe_crypto_Base64.encode(e)],html5:true,preload:false}));return t};lime_media_AudioBuffer.fromFile=function(e){if(e==null){return null}var t=new lime_media_AudioBuffer;t.__srcHowl=new Howl({src:[e],preload:false});return t};lime_media_AudioBuffer.fromFiles=function(e){var t=new lime_media_AudioBuffer;t.__srcHowl=new Howl({src:e,preload:false});return t};lime_media_AudioBuffer.fromVorbisFile=function(e){return null};lime_media_AudioBuffer.loadFromFile=function(e){var i=new lime_app_Promise;var t=lime_media_AudioBuffer.fromFile(e);if(t!=null){if(t!=null){t.__srcHowl.on("load",function(){i.complete(t)});t.__srcHowl.on("loaderror",function(e,t){i.error(t)});t.__srcHowl.load()}}else{i.error(null)}return i.future};lime_media_AudioBuffer.loadFromFiles=function(e){var t=new lime_app_Promise;var i=lime_media_AudioBuffer.fromFiles(e);if(i!=null){i.__srcHowl.on("load",function(){t.complete(i)});i.__srcHowl.on("loaderror",function(){t.error(null)});i.__srcHowl.load()}else{t.error(null)}return t.future};lime_media_AudioBuffer.__getCodec=function(e){var t=e.getString(0,4);switch(t){case"OggS":return"audio/ogg";case"RIFF":if(e.getString(8,4)=="WAVE"){return"audio/wav"}else{var i=e.b[2];var s=e.b[1];var a=e.b[0];switch(a){case 73:if(s==68){if(i==51){return"audio/mp3"}}break;case 255:switch(s){case 243:case 250:case 251:return"audio/mp3";default:}break;default:}}break;case"fLaC":return"audio/flac";default:var r=e.b[2];var n=e.b[1];var _=e.b[0];switch(_){case 73:if(n==68){if(r==51){return"audio/mp3"}}break;case 255:switch(n){case 243:case 250:case 251:return"audio/mp3";default:}break;default:}}lime_utils_Log.error("Unsupported sound format",{fileName:"AudioBuffer.hx",lineNumber:361,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};lime_media_AudioBuffer.prototype={__srcHowl:null,dispose:function(){this.__srcHowl.unload()},get_src:function(){return this.__srcHowl},set_src:function(e){return this.__srcHowl=e},__class__:lime_media_AudioBuffer,__properties__:{set_src:"set_src",get_src:"get_src"}};var lime_media_AudioContext=function(e){if(e!="custom"){if(e==null||e=="web"){try{window.AudioContext=window.AudioContext||window.webkitAudioContext;this.web=new window.AudioContext;this.type="web"}catch(e){haxe_CallStack.lastException=e}}if(this.web==null&&e!="web"){this.html5=new lime_media_HTML5AudioContext;this.type="html5"}}else{this.type="custom"}};$hxClasses["lime.media.AudioContext"]=lime_media_AudioContext;lime_media_AudioContext.__name__=["lime","media","AudioContext"];lime_media_AudioContext.prototype={html5:null,openal:null,type:null,web:null,__class__:lime_media_AudioContext};var lime_media_AudioManager=function(){};$hxClasses["lime.media.AudioManager"]=lime_media_AudioManager;lime_media_AudioManager.__name__=["lime","media","AudioManager"];lime_media_AudioManager.init=function(e){if(lime_media_AudioManager.context==null){if(e==null){lime_media_AudioManager.context=new lime_media_AudioContext;e=lime_media_AudioManager.context;if(e.type=="openal"){var t=e.openal;var i=t.openDevice();var s=t.createContext(i);t.makeContextCurrent(s);t.processContext(s)}}lime_media_AudioManager.context=e}};var lime_media_AudioSource=function(e,t,i,s){if(s==null){s=0}if(t==null){t=0}this.onComplete=new lime_app__$Event_$Void_$Void;this.buffer=e;this.offset=t;this.__backend=new lime__$internal_backend_html5_HTML5AudioSource(this);if(i!=null&&i!=0){this.set_length(i)}this.set_loops(s);if(e!=null){this.init()}};$hxClasses["lime.media.AudioSource"]=lime_media_AudioSource;lime_media_AudioSource.__name__=["lime","media","AudioSource"];lime_media_AudioSource.prototype={onComplete:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},stop:function(){this.__backend.stop()},get_currentTime:function(){return this.__backend.getCurrentTime()},set_currentTime:function(e){return this.__backend.setCurrentTime(e)},get_gain:function(){return this.__backend.getGain()},set_gain:function(e){return this.__backend.setGain(e)},set_length:function(e){return this.__backend.setLength(e)},set_loops:function(e){return this.__backend.setLoops(e)},get_position:function(){return this.__backend.getPosition()},set_position:function(e){return this.__backend.setPosition(e)},__class__:lime_media_AudioSource,__properties__:{set_position:"set_position",get_position:"get_position",set_loops:"set_loops",set_length:"set_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var lime_media_HTML5AudioContext=function(){};$hxClasses["lime.media.HTML5AudioContext"]=lime_media_HTML5AudioContext;lime_media_HTML5AudioContext.__name__=["lime","media","HTML5AudioContext"];lime_media_HTML5AudioContext.prototype={__class__:lime_media_HTML5AudioContext};var lime_media_OpenALAudioContext=function(){};$hxClasses["lime.media.OpenALAudioContext"]=lime_media_OpenALAudioContext;lime_media_OpenALAudioContext.__name__=["lime","media","OpenALAudioContext"];lime_media_OpenALAudioContext.prototype={createContext:function(e,t){return lime_media_openal_ALC.createContext(e,t)},makeContextCurrent:function(e){return lime_media_openal_ALC.makeContextCurrent(e)},openDevice:function(e){return lime_media_openal_ALC.openDevice(e)},processContext:function(e){lime_media_openal_ALC.processContext(e)},__class__:lime_media_OpenALAudioContext};var lime_media_openal_ALC=function(){};$hxClasses["lime.media.openal.ALC"]=lime_media_openal_ALC;lime_media_openal_ALC.__name__=["lime","media","openal","ALC"];lime_media_openal_ALC.createContext=function(e,t){return null};lime_media_openal_ALC.makeContextCurrent=function(e){return false};lime_media_openal_ALC.openDevice=function(e){return null};lime_media_openal_ALC.processContext=function(e){};var lime_net__$IHTTPRequest=function(){};$hxClasses["lime.net._IHTTPRequest"]=lime_net__$IHTTPRequest;lime_net__$IHTTPRequest.__name__=["lime","net","_IHTTPRequest"];lime_net__$IHTTPRequest.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,__class__:lime_net__$IHTTPRequest};var lime_net__$HTTPRequest_AbstractHTTPRequest=function(e){this.uri=e;this.contentType="application/x-www-form-urlencoded";this.followRedirects=true;this.enableResponseHeaders=false;this.formData=new haxe_ds_StringMap;this.headers=[];this.method="GET";this.timeout=3e4;this.withCredentials=false;this.__backend=new lime__$internal_backend_html5_HTML5HTTPRequest;this.__backend.init(this)};$hxClasses["lime.net._HTTPRequest.AbstractHTTPRequest"]=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_AbstractHTTPRequest.__name__=["lime","net","_HTTPRequest","AbstractHTTPRequest"];lime_net__$HTTPRequest_AbstractHTTPRequest.__interfaces__=[lime_net__$IHTTPRequest];lime_net__$HTTPRequest_AbstractHTTPRequest.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,__backend:null,__class__:lime_net__$HTTPRequest_AbstractHTTPRequest};var lime_net__$HTTPRequest_$Bytes=function(e){lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,e)};$hxClasses["lime.net._HTTPRequest_Bytes"]=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$Bytes.__name__=["lime","net","_HTTPRequest_Bytes"];lime_net__$HTTPRequest_$Bytes.__super__=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_$Bytes.prototype=$extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{fromBytes:function(e){return e},load:function(e){var t=this;if(e!=null){this.uri=e}var i=new lime_app_Promise;var s=this.__backend.loadData(this.uri);s.onProgress($bind(i,i.progress));s.onError($bind(i,i.error));s.onComplete(function(e){t.responseData=t.fromBytes(e);i.complete(t.responseData)});return i.future},__class__:lime_net__$HTTPRequest_$Bytes});var lime_net__$HTTPRequest_$String=function(e){lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,e)};$hxClasses["lime.net._HTTPRequest_String"]=lime_net__$HTTPRequest_$String;lime_net__$HTTPRequest_$String.__name__=["lime","net","_HTTPRequest_String"];lime_net__$HTTPRequest_$String.__super__=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_$String.prototype=$extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{load:function(e){var t=this;if(e!=null){this.uri=e}var i=new lime_app_Promise;var s=this.__backend.loadText(this.uri);s.onProgress($bind(i,i.progress));s.onError($bind(i,i.error));s.onComplete(function(e){t.responseData=e;i.complete(t.responseData)});return i.future},__class__:lime_net__$HTTPRequest_$String});var lime_net_HTTPRequestHeader=function(e,t){if(t==null){t=""}this.name=e;this.value=t};$hxClasses["lime.net.HTTPRequestHeader"]=lime_net_HTTPRequestHeader;lime_net_HTTPRequestHeader.__name__=["lime","net","HTTPRequestHeader"];lime_net_HTTPRequestHeader.prototype={name:null,value:null,__class__:lime_net_HTTPRequestHeader};var lime_net__$HTTPRequest_$lime_$utils_$Bytes=function(e){lime_net__$HTTPRequest_$Bytes.call(this,e)};$hxClasses["lime.net._HTTPRequest_lime_utils_Bytes"]=lime_net__$HTTPRequest_$lime_$utils_$Bytes;lime_net__$HTTPRequest_$lime_$utils_$Bytes.__name__=["lime","net","_HTTPRequest_lime_utils_Bytes"];lime_net__$HTTPRequest_$lime_$utils_$Bytes.__super__=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$lime_$utils_$Bytes.prototype=$extend(lime_net__$HTTPRequest_$Bytes.prototype,{fromBytes:function(e){return lime_utils__$Bytes_Bytes_$Impl_$.fromBytes(e)},__class__:lime_net__$HTTPRequest_$lime_$utils_$Bytes});var lime_net__$HTTPRequest_$openfl_$utils_$ByteArray=function(e){lime_net__$HTTPRequest_$Bytes.call(this,e)};$hxClasses["lime.net._HTTPRequest_openfl_utils_ByteArray"]=lime_net__$HTTPRequest_$openfl_$utils_$ByteArray;lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__name__=["lime","net","_HTTPRequest_openfl_utils_ByteArray"];lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__super__=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.prototype=$extend(lime_net__$HTTPRequest_$Bytes.prototype,{fromBytes:function(e){return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(e)},__class__:lime_net__$HTTPRequest_$openfl_$utils_$ByteArray});var lime_system_Clipboard=function(){};$hxClasses["lime.system.Clipboard"]=lime_system_Clipboard;lime_system_Clipboard.__name__=["lime","system","Clipboard"];lime_system_Clipboard.__properties__={set_text:"set_text",get_text:"get_text"};lime_system_Clipboard.__update=function(){var e=lime_system_Clipboard._text;if(lime_system_Clipboard._text!=e){lime_system_Clipboard.onUpdate.dispatch()}};lime_system_Clipboard.get_text=function(){lime_system_Clipboard.__update();return lime_system_Clipboard._text};lime_system_Clipboard.set_text=function(e){var t=lime_system_Clipboard._text;lime_system_Clipboard._text=e;var i=lime_app_Application.current.__window;if(i!=null){i.__backend.setClipboard(e)}if(lime_system_Clipboard._text!=t){lime_system_Clipboard.onUpdate.dispatch()}return e};var lime_system_Display=function(){};$hxClasses["lime.system.Display"]=lime_system_Display;lime_system_Display.__name__=["lime","system","Display"];lime_system_Display.prototype={bounds:null,currentMode:null,id:null,dpi:null,name:null,supportedModes:null,__class__:lime_system_Display};var lime_system_DisplayMode=function(e,t,i,s){this.width=e;this.height=t;this.refreshRate=i;this.pixelFormat=s};$hxClasses["lime.system.DisplayMode"]=lime_system_DisplayMode;lime_system_DisplayMode.__name__=["lime","system","DisplayMode"];lime_system_DisplayMode.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:lime_system_DisplayMode};var lime_system_Endian=$hxClasses["lime.system.Endian"]={__ename__:["lime","system","Endian"],__constructs__:["LITTLE_ENDIAN","BIG_ENDIAN"]};lime_system_Endian.LITTLE_ENDIAN=["LITTLE_ENDIAN",0];lime_system_Endian.LITTLE_ENDIAN.toString=$estr;lime_system_Endian.LITTLE_ENDIAN.__enum__=lime_system_Endian;lime_system_Endian.BIG_ENDIAN=["BIG_ENDIAN",1];lime_system_Endian.BIG_ENDIAN.toString=$estr;lime_system_Endian.BIG_ENDIAN.__enum__=lime_system_Endian;var lime_system_Sensor=function(e,t){this.onUpdate=new lime_app__$Event_$Float_$Float_$Float_$Void;this.type=e;this.id=t};$hxClasses["lime.system.Sensor"]=lime_system_Sensor;lime_system_Sensor.__name__=["lime","system","Sensor"];lime_system_Sensor.registerSensor=function(e,t){var i=new lime_system_Sensor(e,t);lime_system_Sensor.sensors.push(i);lime_system_Sensor.sensorByID.h[t]=i;return i};lime_system_Sensor.prototype={id:null,onUpdate:null,type:null,__class__:lime_system_Sensor};var lime_system_SensorType=$hxClasses["lime.system.SensorType"]={__ename__:["lime","system","SensorType"],__constructs__:["ACCELEROMETER"]};lime_system_SensorType.ACCELEROMETER=["ACCELEROMETER",0];lime_system_SensorType.ACCELEROMETER.toString=$estr;lime_system_SensorType.ACCELEROMETER.__enum__=lime_system_SensorType;var lime_system_System=function(){};$hxClasses["lime.system.System"]=lime_system_System;lime_system_System.__name__=["lime","system","System"];lime_system_System.__properties__={get_endianness:"get_endianness"};lime_system_System.embed=$hx_exports["lime"]["embed"]=function(e,t,i,s,a){if(lime_system_System.__applicationEntryPoint==null){return}var r=lime_system_System.__applicationEntryPoint;if(__map_reserved[e]!=null?r.existsReserved(e):r.h.hasOwnProperty(e)){var n=null;if(typeof t=="string"){n=window.document.getElementById(t)}else if(t==null){n=window.document.createElement("div")}else{n=t}if(n==null){window.console.log("[lime.embed] ERROR: Cannot find target element: "+Std.string(t));return}if(i==null){i=0}if(s==null){s=0}if(a==null){a={}}if(Object.prototype.hasOwnProperty.call(a,"background")&&typeof a.background=="string"){var _=StringTools.replace(Std.string(a.background),"#","");if(_.indexOf("0x")>-1){a.background=Std.parseInt(_)}else{a.background=Std.parseInt("0x"+_)}}a.element=n;a.width=i;a.height=s;var o=lime_system_System.__applicationEntryPoint;(__map_reserved[e]!=null?o.getReserved(e):o.h[e])(a)}};lime_system_System.exit=function(e){};lime_system_System.getDisplay=function(e){if(e==0){var t=new lime_system_Display;t.id=0;t.name="Generic Display";t.dpi=96*window.devicePixelRatio;t.currentMode=new lime_system_DisplayMode(window.screen.width,window.screen.height,60,1);t.supportedModes=[t.currentMode];t.bounds=new lime_math_Rectangle(0,0,t.currentMode.width,t.currentMode.height);return t}return null};lime_system_System.getTimer=function(){return window.performance.now()|0};lime_system_System.openURL=function(e,t){if(t==null){t="_blank"}if(e!=null){window.open(e,t)}};lime_system_System.__registerEntryPoint=function(e,t){if(lime_system_System.__applicationEntryPoint==null){lime_system_System.__applicationEntryPoint=new haxe_ds_StringMap}var i=lime_system_System.__applicationEntryPoint;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}};lime_system_System.get_endianness=function(){if(lime_system_System.__endianness==null){var e=new ArrayBuffer(2);var t;if(e!=null){t=new Uint8Array(e,0)}else{t=null}var i=t;var s;if(e!=null){s=new Uint16Array(e,0)}else{s=null}var a=s;i[0]=170;i[1]=187;if(a[0]==43707){lime_system_System.__endianness=lime_system_Endian.BIG_ENDIAN}else{lime_system_System.__endianness=lime_system_Endian.LITTLE_ENDIAN}}return lime_system_System.__endianness};var lime_system_ThreadPool=function(e,t){if(t==null){t=1}if(e==null){e=0}this.onRun=new lime_app__$Event_$Dynamic_$Void;this.onError=new lime_app__$Event_$Dynamic_$Void;this.onComplete=new lime_app__$Event_$Dynamic_$Void;this.doWork=new lime_app__$Event_$Dynamic_$Void;this.minThreads=e;this.maxThreads=t;this.currentThreads=0};$hxClasses["lime.system.ThreadPool"]=lime_system_ThreadPool;lime_system_ThreadPool.__name__=["lime","system","ThreadPool"];lime_system_ThreadPool.prototype={currentThreads:null,doWork:null,maxThreads:null,minThreads:null,onComplete:null,onError:null,onRun:null,queue:function(e){this.runWork(e)},sendComplete:function(e){this.onComplete.dispatch(e)},sendError:function(e){this.onError.dispatch(e)},runWork:function(e){this.onRun.dispatch(e);this.doWork.dispatch(e)},__class__:lime_system_ThreadPool};var lime_text_Font=function(e){if(e!=null){this.name=e}if(!this.__init){if(this.ascender==undefined){this.ascender=0}if(this.descender==undefined){this.descender=0}if(this.height==undefined){this.height=0}if(this.numGlyphs==undefined){this.numGlyphs=0}if(this.underlinePosition==undefined){this.underlinePosition=0}if(this.underlineThickness==undefined){this.underlineThickness=0}if(this.unitsPerEM==undefined){this.unitsPerEM=0}if(this.__fontID!=null){if(lime_utils_Assets.isLocal(this.__fontID)){this.__fromBytes(lime_utils_Assets.getBytes(this.__fontID))}}else if(this.__fontPath!=null){this.__fromFile(this.__fontPath)}}};$hxClasses["lime.text.Font"]=lime_text_Font;lime_text_Font.__name__=["lime","text","Font"];lime_text_Font.fromFile=function(e){if(e==null){return null}var t=new lime_text_Font;t.__fromFile(e);return t};lime_text_Font.loadFromName=function(e){var t=new lime_text_Font;return t.__loadFromName(e)};lime_text_Font.__measureFontNode=function(e){var t=window.document.createElement("span");t.setAttribute("aria-hidden","true");var i=window.document.createTextNode("BESbswy");t.appendChild(i);var s=t.style;s.display="block";s.position="absolute";s.top="-9999px";s.left="-9999px";s.fontSize="300px";s.width="auto";s.height="auto";s.lineHeight="normal";s.margin="0";s.padding="0";s.fontVariant="normal";s.whiteSpace="nowrap";s.fontFamily=e;window.document.body.appendChild(t);return t};lime_text_Font.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,__copyFrom:function(e){if(e!=null){this.ascender=e.ascender;this.descender=e.descender;this.height=e.height;this.name=e.name;this.numGlyphs=e.numGlyphs;this.src=e.src;this.underlinePosition=e.underlinePosition;this.underlineThickness=e.underlineThickness;this.unitsPerEM=e.unitsPerEM;this.__fontID=e.__fontID;this.__fontPath=e.__fontPath;this.__init=true}},__fromBytes:function(e){this.__fontPath=null},__fromFile:function(e){this.__fontPath=e},__loadFromName:function(t){var i=this;var s=new lime_app_Promise;this.name=t;var e=window.navigator.userAgent.toLowerCase();var a=e.indexOf(" safari/")>=0&&e.indexOf(" chrome/")<0;var r=new EReg("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i").match(e);if(!a&&!r&&(window.document.fonts&&($_=window.document.fonts,$bind($_,$_.load)))){window.document.fonts.load("1em '"+t+"'").then(function(e){s.complete(i)},function(e){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:512,className:"lime.text.Font",methodName:"__loadFromName"});s.complete(i)})}else{var n=lime_text_Font.__measureFontNode("'"+t+"', sans-serif");var _=lime_text_Font.__measureFontNode("'"+t+"', serif");var o=n.offsetWidth;var l=_.offsetWidth;var h=-1;var c=3e3;var u=50;var f=0;var p;var d;var g=function(){f+=1;if(n.offsetWidth==o){p=_.offsetWidth!=l}else{p=true}d=f*u>=c;if(p||d){window.clearInterval(h);n.parentNode.removeChild(n);_.parentNode.removeChild(_);n=null;_=null;if(d){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:547,className:"lime.text.Font",methodName:"__loadFromName"})}s.complete(i)}};h=window.setInterval(g,u)}return s.future},__class__:lime_text_Font};var lime_text__$UTF8String_UTF8String_$Impl_$={};$hxClasses["lime.text._UTF8String.UTF8String_Impl_"]=lime_text__$UTF8String_UTF8String_$Impl_$;lime_text__$UTF8String_UTF8String_$Impl_$.__name__=["lime","text","_UTF8String","UTF8String_Impl_"];lime_text__$UTF8String_UTF8String_$Impl_$.__properties__={get_length:"get_length"};lime_text__$UTF8String_UTF8String_$Impl_$.charAt=function(e,t){var i=e;var s=i;var a=s;var r;if(t>=0){var n=0;var _=a.length;var o=0;while(o=0){var s=e;var a=s;i=t>=lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(a,0,e.length)}else{i=true}if(i){return null}var r=e;var n=r;var _=n;var o;if(t>=0){var l=0;var h=_.length;var c=0;while(c=0){var _=0;var o=r.length;var l=0;while(l=0){var d=e;var g=d;return lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(g,0,p)}else{return-1}};lime_text__$UTF8String_UTF8String_$Impl_$.substr=function(e,t,i){if(i==null){i=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e)-t}return HxOverrides.substr(e,t,i)};lime_text__$UTF8String_UTF8String_$Impl_$.substring=function(e,t,i){var s;if(t<0){s=0}else{var a=e;var r=a;var n=r;if(t>=0){var _=0;var o=n.length;var l=0;while(l=0){var v=0;var b=m.length;var y=0;while(y0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey=function(e){if((e&64)<=0){return(e&128)>0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey=function(e){if((e&1024)<=0){return(e&2048)>0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey=function(e){if((e&1)<=0){return(e&2)>0}else{return true}};var lime_ui_MouseCursor=$hxClasses["lime.ui.MouseCursor"]={__ename__:["lime","ui","MouseCursor"],__constructs__:["ARROW","CROSSHAIR","DEFAULT","MOVE","POINTER","RESIZE_NESW","RESIZE_NS","RESIZE_NWSE","RESIZE_WE","TEXT","WAIT","WAIT_ARROW","CUSTOM"]};lime_ui_MouseCursor.ARROW=["ARROW",0];lime_ui_MouseCursor.ARROW.toString=$estr;lime_ui_MouseCursor.ARROW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.CROSSHAIR=["CROSSHAIR",1];lime_ui_MouseCursor.CROSSHAIR.toString=$estr;lime_ui_MouseCursor.CROSSHAIR.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.DEFAULT=["DEFAULT",2];lime_ui_MouseCursor.DEFAULT.toString=$estr;lime_ui_MouseCursor.DEFAULT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.MOVE=["MOVE",3];lime_ui_MouseCursor.MOVE.toString=$estr;lime_ui_MouseCursor.MOVE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.POINTER=["POINTER",4];lime_ui_MouseCursor.POINTER.toString=$estr;lime_ui_MouseCursor.POINTER.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NESW=["RESIZE_NESW",5];lime_ui_MouseCursor.RESIZE_NESW.toString=$estr;lime_ui_MouseCursor.RESIZE_NESW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NS=["RESIZE_NS",6];lime_ui_MouseCursor.RESIZE_NS.toString=$estr;lime_ui_MouseCursor.RESIZE_NS.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NWSE=["RESIZE_NWSE",7];lime_ui_MouseCursor.RESIZE_NWSE.toString=$estr;lime_ui_MouseCursor.RESIZE_NWSE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_WE=["RESIZE_WE",8];lime_ui_MouseCursor.RESIZE_WE.toString=$estr;lime_ui_MouseCursor.RESIZE_WE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.TEXT=["TEXT",9];lime_ui_MouseCursor.TEXT.toString=$estr;lime_ui_MouseCursor.TEXT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.WAIT=["WAIT",10];lime_ui_MouseCursor.WAIT.toString=$estr;lime_ui_MouseCursor.WAIT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.WAIT_ARROW=["WAIT_ARROW",11];lime_ui_MouseCursor.WAIT_ARROW.toString=$estr;lime_ui_MouseCursor.WAIT_ARROW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.CUSTOM=["CUSTOM",12];lime_ui_MouseCursor.CUSTOM.toString=$estr;lime_ui_MouseCursor.CUSTOM.__enum__=lime_ui_MouseCursor;var lime_ui_MouseWheelMode=$hxClasses["lime.ui.MouseWheelMode"]={__ename__:["lime","ui","MouseWheelMode"],__constructs__:["PIXELS","LINES","PAGES","UNKNOWN"]};lime_ui_MouseWheelMode.PIXELS=["PIXELS",0];lime_ui_MouseWheelMode.PIXELS.toString=$estr;lime_ui_MouseWheelMode.PIXELS.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.LINES=["LINES",1];lime_ui_MouseWheelMode.LINES.toString=$estr;lime_ui_MouseWheelMode.LINES.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.PAGES=["PAGES",2];lime_ui_MouseWheelMode.PAGES.toString=$estr;lime_ui_MouseWheelMode.PAGES.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.UNKNOWN=["UNKNOWN",3];lime_ui_MouseWheelMode.UNKNOWN.toString=$estr;lime_ui_MouseWheelMode.UNKNOWN.__enum__=lime_ui_MouseWheelMode;var lime_ui_Touch=function(e,t,i,s,a,r,n){this.x=e;this.y=t;this.id=i;this.dx=s;this.dy=a;this.pressure=r;this.device=n};$hxClasses["lime.ui.Touch"]=lime_ui_Touch;lime_ui_Touch.__name__=["lime","ui","Touch"];lime_ui_Touch.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:lime_ui_Touch};var lime_ui_Window=function(e,t){this.onTextInput=new lime_app__$Event_$String_$Void;this.onTextEdit=new lime_app__$Event_$String_$Int_$Int_$Void;this.onRestore=new lime_app__$Event_$Void_$Void;this.onResize=new lime_app__$Event_$Int_$Int_$Void;this.onRenderContextRestored=new lime_app__$Event_$lime_$graphics_$RenderContext_$Void;this.onRenderContextLost=new lime_app__$Event_$Void_$Void;this.onRender=new lime_app__$Event_$lime_$graphics_$RenderContext_$Void;this.onMove=new lime_app__$Event_$Float_$Float_$Void;this.onMouseWheel=new lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void;this.onMouseUp=new lime_app__$Event_$Float_$Float_$Int_$Void;this.onMouseMoveRelative=new lime_app__$Event_$Float_$Float_$Void;this.onMouseMove=new lime_app__$Event_$Float_$Float_$Void;this.onMouseDown=new lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void;this.onMinimize=new lime_app__$Event_$Void_$Void;this.onLeave=new lime_app__$Event_$Void_$Void;this.onKeyUp=new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;this.onKeyDown=new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;this.onFullscreen=new lime_app__$Event_$Void_$Void;this.onFocusOut=new lime_app__$Event_$Void_$Void;this.onFocusIn=new lime_app__$Event_$Void_$Void;this.onExpose=new lime_app__$Event_$Void_$Void;this.onEnter=new lime_app__$Event_$Void_$Void;this.onDropFile=new lime_app__$Event_$String_$Void;this.onDeactivate=new lime_app__$Event_$Void_$Void;this.onClose=new lime_app__$Event_$Void_$Void;this.onActivate=new lime_app__$Event_$Void_$Void;this.application=e;this.__attributes=t!=null?t:{};if(Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")){this.parameters=this.__attributes.parameters}this.__width=0;this.__height=0;this.__fullscreen=false;this.__scale=1;this.__x=0;this.__y=0;this.__title="";this.id=-1;this.__backend=new lime__$internal_backend_html5_HTML5Window(this)};$hxClasses["lime.ui.Window"]=lime_ui_Window;lime_ui_Window.__name__=["lime","ui","Window"];lime_ui_Window.prototype={application:null,context:null,element: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,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,stage:null,__attributes:null,__backend:null,__fullscreen:null,__height:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,close:function(){this.__backend.close()},set_cursor:function(e){return this.__backend.setCursor(e)},get_display:function(){return this.__backend.getDisplay()},set_fullscreen:function(e){return this.__fullscreen=this.__backend.setFullscreen(e)},__class__:lime_ui_Window,__properties__:{get_display:"get_display",set_fullscreen:"set_fullscreen",set_cursor:"set_cursor"}};var lime_utils_AssetCache=function(){this.enabled=true;this.audio=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.image=new haxe_ds_StringMap;this.version=102841};$hxClasses["lime.utils.AssetCache"]=lime_utils_AssetCache;lime_utils_AssetCache.__name__=["lime","utils","AssetCache"];lime_utils_AssetCache.prototype={audio:null,enabled:null,image:null,font:null,version:null,exists:function(e,t){if(t=="IMAGE"||t==null){var i=this.image;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){return true}}if(t=="FONT"||t==null){var s=this.font;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){return true}}if(t=="SOUND"||t=="MUSIC"||t==null){var a=this.audio;if(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e)){return true}}return false},set:function(e,t,i){switch(t){case"FONT":this.font.set(e,i);break;case"IMAGE":if(!js_Boot.__instanceof(i,lime_graphics_Image)){throw new js__$Boot_HaxeError("Cannot cache non-Image asset: "+Std.string(i)+" as Image")}this.image.set(e,i);break;case"MUSIC":case"SOUND":if(!js_Boot.__instanceof(i,lime_media_AudioBuffer)){throw new js__$Boot_HaxeError("Cannot cache non-AudioBuffer asset: "+Std.string(i)+" as AudioBuffer")}this.audio.set(e,i);break;default:throw new js__$Boot_HaxeError(t+" assets are not cachable")}},clear:function(e){if(e==null){this.audio=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.image=new haxe_ds_StringMap}else{var t=this.audio.keys();var i=t;while(i.hasNext()){var s=i.next();if(StringTools.startsWith(s,e)){this.audio.remove(s)}}var a=this.font.keys();var r=a;while(r.hasNext()){var n=r.next();if(StringTools.startsWith(n,e)){this.font.remove(n)}}var _=this.image.keys();var o=_;while(o.hasNext()){var l=o.next();if(StringTools.startsWith(l,e)){this.image.remove(l)}}}},__class__:lime_utils_AssetCache};var lime_utils_AssetLibrary=function(){this.types=new haxe_ds_StringMap;this.sizes=new haxe_ds_StringMap;this.preload=new haxe_ds_StringMap;this.paths=new haxe_ds_StringMap;this.pathGroups=new haxe_ds_StringMap;this.classTypes=new haxe_ds_StringMap;this.cachedText=new haxe_ds_StringMap;this.cachedImages=new haxe_ds_StringMap;this.cachedFonts=new haxe_ds_StringMap;this.cachedBytes=new haxe_ds_StringMap;this.cachedAudioBuffers=new haxe_ds_StringMap;this.onChange=new lime_app__$Event_$Void_$Void;this.bytesLoaded=0;this.bytesTotal=0};$hxClasses["lime.utils.AssetLibrary"]=lime_utils_AssetLibrary;lime_utils_AssetLibrary.__name__=["lime","utils","AssetLibrary"];lime_utils_AssetLibrary.fromManifest=function(e){if(e==null){return null}var t=null;if(e.libraryType==null){t=new lime_utils_AssetLibrary}else{var i=Type.resolveClass(e.libraryType);if(i!=null){t=Type.createInstance(i,e.libraryArgs)}else{lime_utils_Log.warn("Could not find library type: "+e.libraryType,{fileName:"AssetLibrary.hx",lineNumber:119,className:"lime.utils.AssetLibrary",methodName:"fromManifest"});return null}}t.__fromManifest(e);return t};lime_utils_AssetLibrary.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(e,t){var i=t!=null?js_Boot.__cast(t,String):null;var s=this.types;var a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];if(a!=null){if(a==i||(i=="SOUND"||i=="MUSIC")&&(a=="MUSIC"||a=="SOUND")){return true}if(i=="BINARY"||i==null||a=="BINARY"&&i=="TEXT"){return true}}return false},getAsset:function(e,t){switch(t){case"BINARY":return this.getBytes(e);case"FONT":return this.getFont(e);case"IMAGE":return this.getImage(e);case"MUSIC":case"SOUND":return this.getAudioBuffer(e);case"TEMPLATE":throw new js__$Boot_HaxeError("Not sure how to get template: "+e);break;case"TEXT":return this.getText(e);default:throw new js__$Boot_HaxeError("Unknown asset type: "+t)}},getAudioBuffer:function(e){var t=this.cachedAudioBuffers;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedAudioBuffers;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return lime_media_AudioBuffer.fromBytes(js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),haxe_io_Bytes))}else{var r=this.paths;return lime_media_AudioBuffer.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getBytes:function(e){var t=this.cachedBytes;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedBytes;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.cachedText;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.cachedText;var r=lime_utils__$Bytes_Bytes_$Impl_$.ofString(__map_reserved[e]!=null?a.getReserved(e):a.h[e]);var n=this.cachedBytes;if(__map_reserved[e]!=null){n.setReserved(e,r)}else{n.h[e]=r}return r}else{var _=this.classTypes;if(__map_reserved[e]!=null?_.existsReserved(e):_.h.hasOwnProperty(e)){var o=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?o.getReserved(e):o.h[e],[]),haxe_io_Bytes)}else{var l=this.paths;return lime_utils__$Bytes_Bytes_$Impl_$.fromFile(__map_reserved[e]!=null?l.getReserved(e):l.h[e])}}}},getFont:function(e){var t=this.cachedFonts;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedFonts;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),lime_text_Font)}else{var r=this.paths;return lime_text_Font.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getImage:function(e){var t=this.cachedImages;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedImages;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),lime_graphics_Image)}else{var r=this.paths;return lime_graphics_Image.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getText:function(e){var t=this.cachedText;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedText;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.getBytes(e);if(s==null){return null}else{return s.getString(0,s.length)}}},isLocal:function(e,t){var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){return true}var s=t!=null?js_Boot.__cast(t,String):null;switch(s){case"FONT":return this.cachedFonts.exists(e);case"IMAGE":return this.cachedImages.exists(e);case"MUSIC":case"SOUND":return this.cachedAudioBuffers.exists(e);default:if(!this.cachedBytes.exists(e)){return this.cachedText.exists(e)}else{return true}}},load:function(){if(this.loaded){return lime_app_Future.withValue(this)}if(this.promise==null){this.promise=new lime_app_Promise;this.bytesLoadedCache=new haxe_ds_StringMap;this.assetsLoaded=0;this.assetsTotal=1;var e=this.preload.keys();while(e.hasNext()){var t=e.next();var i=this.preload;if(!(__map_reserved[t]!=null?i.getReserved(t):i.h[t])){continue}var s=this.types;lime_utils_Log.verbose("Preloading asset: "+t+" ["+(__map_reserved[t]!=null?s.getReserved(t):s.h[t])+"]",{fileName:"AssetLibrary.hx",lineNumber:365,className:"lime.utils.AssetLibrary",methodName:"load"});var a=this.types.get(t);if(a!=null){switch(a){case"BINARY":this.assetsTotal++;var r=this.loadBytes(t);r.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));r.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));r.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadBytes_onComplete)]));break;case"FONT":this.assetsTotal++;var n=this.loadFont(t);n.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));n.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));n.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadFont_onComplete)]));break;case"IMAGE":this.assetsTotal++;var _=this.loadImage(t);_.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));_.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));_.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadImage_onComplete)]));break;case"MUSIC":case"SOUND":this.assetsTotal++;var o=this.loadAudioBuffer(t);o.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));o.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onError)]));o.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onComplete)]));break;case"TEXT":this.assetsTotal++;var l=this.loadText(t);l.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));l.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));l.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadText_onComplete)]));break;default:}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(e){var t=this.cachedAudioBuffers;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedAudioBuffers;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.pathGroups;if(__map_reserved[e]!=null?r.existsReserved(e):r.h.hasOwnProperty(e)){var n=this.pathGroups;return lime_media_AudioBuffer.loadFromFiles(__map_reserved[e]!=null?n.getReserved(e):n.h[e])}else{var _=this.paths;return lime_media_AudioBuffer.loadFromFile(__map_reserved[e]!=null?_.getReserved(e):_.h[e])}}}},loadBytes:function(e){var t=this.cachedBytes;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedBytes;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.paths;return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},loadFont:function(e){var t=this.cachedFonts;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedFonts;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;var r=Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]);return r.__loadFromName(r.name)}else{var n=this.paths;return lime_text_Font.loadFromName(__map_reserved[e]!=null?n.getReserved(e):n.h[e])}}},loadImage:function(e){var t=this.cachedImages;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedImages;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.paths;return lime_graphics_Image.loadFromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},loadText:function(e){var t=this.cachedText;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedText;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s;var a=this.cachedBytes;if(!(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e))){var r=this.classTypes;if(__map_reserved[e]!=null){s=r.existsReserved(e)}else{s=r.h.hasOwnProperty(e)}}else{s=true}if(s){var n=this.getBytes(e);if(n==null){return lime_app_Future.withValue(null)}else{var _=n.getString(0,n.length);var o=this.cachedText;if(__map_reserved[e]!=null){o.setReserved(e,_)}else{o.h[e]=_}return lime_app_Future.withValue(_)}}else{var l=new lime_net__$HTTPRequest_$String;var h=this.paths;return l.load(__map_reserved[e]!=null?h.getReserved(e):h.h[e])}}},unload:function(){},__assetLoaded:function(e){this.assetsLoaded++;if(e!=null){var t=this.types;lime_utils_Log.verbose("Loaded asset: "+e+" ["+(__map_reserved[e]!=null?t.getReserved(e):t.h[e])+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"AssetLibrary.hx",lineNumber:570,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"})}if(e!=null){var i=this.sizes;var s=__map_reserved[e]!=null?i.getReserved(e):i.h[e];var a=this.bytesLoadedCache;if(!(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e))){this.bytesLoaded+=s}else{var r=this.bytesLoadedCache;var n=__map_reserved[e]!=null?r.getReserved(e):r.h[e];if(n=2;var i;var s;var a;var r;var n=e.rootPath;if(n==null){n=""}if(n!=""){n+="/"}var _=0;var o=e.assets;while(_-1){var c=this.cachedAudioBuffers;if(__map_reserved[_]!=null){c.setReserved(_,t)}else{c.h[_]=t}break}}}}this.__assetLoaded(e)},loadAudioBuffer_onError:function(e,t){if(t!=null&&t!=""){lime_utils_Log.warn('Could not load "'+e+'": '+Std.string(t),{fileName:"AssetLibrary.hx",lineNumber:710,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}else{lime_utils_Log.warn('Could not load "'+e+'"',{fileName:"AssetLibrary.hx",lineNumber:714,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}this.loadAudioBuffer_onComplete(e,new lime_media_AudioBuffer)},loadBytes_onComplete:function(e,t){var i=this.cachedBytes;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadFont_onComplete:function(e,t){var i=this.cachedFonts;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadImage_onComplete:function(e,t){var i=this.cachedImages;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadText_onComplete:function(e,t){var i=this.cachedText;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},load_onError:function(e,t){if(t!=null&&t!=""){this.promise.error('Error loading asset "'+e+'": '+Std.string(t))}else{this.promise.error('Error loading asset "'+e+'"')}},load_onProgress:function(e,t,i){if(t>0){var s=this.sizes;var a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];var r;if(i>0){r=t/i;if(r>1){r=1}t=Math.floor(r*a)}else if(t>a){t=a}var n=this.bytesLoadedCache;if(__map_reserved[e]!=null?n.existsReserved(e):n.h.hasOwnProperty(e)){var _=this.bytesLoadedCache;var o=__map_reserved[e]!=null?_.getReserved(e):_.h[e];if(t!=o){this.bytesLoaded+=t-o}}else{this.bytesLoaded+=t}var l=this.bytesLoadedCache;if(__map_reserved[e]!=null){l.setReserved(e,t)}else{l.h[e]=t}this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:lime_utils_AssetLibrary};var lime_utils_AssetManifest=function(){this.assets=[];this.libraryArgs=[];this.version=2};$hxClasses["lime.utils.AssetManifest"]=lime_utils_AssetManifest;lime_utils_AssetManifest.__name__=["lime","utils","AssetManifest"];lime_utils_AssetManifest.fromBytes=function(e,t){if(e!=null){return lime_utils_AssetManifest.parse(e.getString(0,e.length),t)}else{return null}};lime_utils_AssetManifest.fromFile=function(e,t){e=lime_utils_AssetManifest.__resolvePath(e);t=lime_utils_AssetManifest.__resolveRootPath(t,e);if(e==null){return null}return lime_utils_AssetManifest.fromBytes(lime_utils__$Bytes_Bytes_$Impl_$.fromFile(e),t)};lime_utils_AssetManifest.loadFromBytes=function(e,t){return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(e,t))};lime_utils_AssetManifest.loadFromFile=function(e,t){e=lime_utils_AssetManifest.__resolvePath(e);t=lime_utils_AssetManifest.__resolveRootPath(t,e);if(e==null){return null}return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(e).then(function(e){return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(e,t))})};lime_utils_AssetManifest.parse=function(e,t){if(e==null||e==""){return null}var i=JSON.parse(e);var s=new lime_utils_AssetManifest;s.name=i.name;s.libraryType=i.libraryType;s.libraryArgs=i.libraryArgs;s.assets=haxe_Unserializer.run(i.assets);if(Object.prototype.hasOwnProperty.call(i,"rootPath")){s.rootPath=i.rootPath}if(t!=null&&t!=""){if(s.rootPath==null||s.rootPath==""){s.rootPath=t}else{s.rootPath=t+"/"+s.rootPath}}return s};lime_utils_AssetManifest.__resolvePath=function(e){if(e==null){return null}var t=e.indexOf("?");var i;if(t>-1){i=HxOverrides.substr(e,0,t)}else{i=e}StringTools.replace(i,"\\","/");while(StringTools.endsWith(i,"/"))i=HxOverrides.substr(i,0,i.length-1);if(StringTools.endsWith(i,".bundle")){if(t>-1){return i+"/library.json"+HxOverrides.substr(e,t,null)}else{return i+"/library.json"}}else{return e}};lime_utils_AssetManifest.__resolveRootPath=function(e,t){if(e!=null){return e}var i=t.indexOf("?");if(i>-1){e=HxOverrides.substr(t,0,i)}else{e=t}StringTools.replace(e,"\\","/");while(StringTools.endsWith(e,"/")){if(e=="/"){return e}e=HxOverrides.substr(e,0,e.length-1)}if(StringTools.endsWith(e,".bundle")){return e}else{return haxe_io_Path.directory(e)}};lime_utils_AssetManifest.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,__class__:lime_utils_AssetManifest};var lime_utils_Assets=function(){};$hxClasses["lime.utils.Assets"]=lime_utils_Assets;lime_utils_Assets.__name__=["lime","utils","Assets"];lime_utils_Assets.exists=function(e,t){if(t==null){t="BINARY"}var i;var s;var a;var r=e.indexOf(":");s=e.substring(0,r);i=e.substring(r+1);a=lime_utils_Assets.getLibrary(s);if(a!=null){return a.exists(i,t)}return false};lime_utils_Assets.getAsset=function(e,t,i){if(i&&lime_utils_Assets.cache.enabled){switch(t){case"BINARY":case"TEXT":i=false;break;case"FONT":var s=lime_utils_Assets.cache.font.get(e);if(s!=null){return s}break;case"IMAGE":var a=lime_utils_Assets.cache.image.get(e);if(lime_utils_Assets.isValidImage(a)){return a}break;case"MUSIC":case"SOUND":var r=lime_utils_Assets.cache.audio.get(e);if(lime_utils_Assets.isValidAudio(r)){return r}break;case"TEMPLATE":throw new js__$Boot_HaxeError("Not sure how to get template: "+e);break;default:return null}}var n;var _;var o;var l=e.indexOf(":");_=e.substring(0,l);n=e.substring(l+1);o=lime_utils_Assets.getLibrary(_);if(o!=null){if(o.exists(n,t)){if(o.isLocal(n,t)){var h=o.getAsset(n,t);if(i&&lime_utils_Assets.cache.enabled){lime_utils_Assets.cache.set(e,t,h)}return h}else{lime_utils_Log.error(t+' asset "'+e+'" exists, but only asynchronously',{fileName:"Assets.hx",lineNumber:132,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error("There is no "+t+' asset with an ID of "'+e+'"',{fileName:"Assets.hx",lineNumber:137,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(_),{fileName:"Assets.hx",lineNumber:142,className:"lime.utils.Assets",methodName:"getAsset"})}return null};lime_utils_Assets.getBytes=function(e){return lime_utils_Assets.getAsset(e,"BINARY",false)};lime_utils_Assets.getImage=function(e,t){if(t==null){t=true}return lime_utils_Assets.getAsset(e,"IMAGE",t)};lime_utils_Assets.getLibrary=function(e){if(e==null||e==""){e="default"}var t=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}};lime_utils_Assets.hasLibrary=function(e){if(e==null||e==""){e="default"}var t=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}};lime_utils_Assets.isLocal=function(e,t,i){if(i==null){i=true}if(i&&lime_utils_Assets.cache.enabled){if(lime_utils_Assets.cache.exists(e,t)){return true}}var s;var a;var r;var n=e.indexOf(":");a=e.substring(0,n);s=e.substring(n+1);r=lime_utils_Assets.getLibrary(a);if(r!=null){return r.isLocal(s,t)}else{return false}};lime_utils_Assets.isValidAudio=function(e){return e!=null};lime_utils_Assets.isValidImage=function(e){if(e!=null){return e.buffer!=null}else{return false}};lime_utils_Assets.loadLibrary=function(a){var r=new lime_app_Promise;var e=lime_utils_Assets.getLibrary(a);if(e!=null){return e.load()}var t=a;var i=null;var s=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null?s.existsReserved(a):s.h.hasOwnProperty(a)){var n=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null){t=n.getReserved(a)}else{t=n.h[a]}i=lime_utils_Assets.defaultRootPath}else{if(StringTools.endsWith(t,".bundle")){t+="/library.json"}t=lime_utils_Assets.__cacheBreak(t)}lime_utils_AssetManifest.loadFromFile(t,i).onComplete(function(e){if(e==null){r.error('Cannot parse asset manifest for library "'+a+'"');return}var t=lime_utils_AssetLibrary.fromManifest(e);if(t==null){r.error('Cannot open library "'+a+'"')}else{var i=lime_utils_Assets.libraries;if(__map_reserved[a]!=null){i.setReserved(a,t)}else{i.h[a]=t}t.onChange.add(($_=lime_utils_Assets.onChange,$bind($_,$_.dispatch)));var s=t.load();r.completeWith(s)}}).onError(function(e){r.error('There is no asset library with an ID of "'+a+'"')});return r.future};lime_utils_Assets.registerLibrary=function(e,t){var i=lime_utils_Assets.libraries;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var s=lime_utils_Assets.libraries;if((__map_reserved[e]!=null?s.getReserved(e):s.h[e])==t){return}else{lime_utils_Assets.unloadLibrary(e)}}if(t!=null){t.onChange.add(lime_utils_Assets.library_onChange)}var a=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){a.setReserved(e,t)}else{a.h[e]=t}};lime_utils_Assets.unloadLibrary=function(e){var t=lime_utils_Assets.libraries;var i=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(i!=null){lime_utils_Assets.cache.clear(e+":");i.onChange.remove(lime_utils_Assets.library_onChange);i.unload()}lime_utils_Assets.libraries.remove(e)};lime_utils_Assets.__cacheBreak=function(e){if(lime_utils_Assets.cache.version>0){if(e.indexOf("?")>-1){e+="&"+lime_utils_Assets.cache.version}else{e+="?"+lime_utils_Assets.cache.version}}return e};lime_utils_Assets.__libraryNotFound=function(e){if(e==null||e==""){e="default"}if(lime_app_Application.current!=null&&lime_app_Application.current.__preloader!=null&&!lime_app_Application.current.__preloader.complete){return'There is no asset library named "'+e+'", or it is not yet preloaded'}else{return'There is no asset library named "'+e+'"'}};lime_utils_Assets.library_onChange=function(){lime_utils_Assets.cache.clear();lime_utils_Assets.onChange.dispatch()};var lime_utils_BytePointerData=function(e,t){this.bytes=e;this.offset=t};$hxClasses["lime.utils.BytePointerData"]=lime_utils_BytePointerData;lime_utils_BytePointerData.__name__=["lime","utils","BytePointerData"];lime_utils_BytePointerData.prototype={bytes:null,offset:null,__class__:lime_utils_BytePointerData};var lime_utils__$Bytes_Bytes_$Impl_$={};$hxClasses["lime.utils._Bytes.Bytes_Impl_"]=lime_utils__$Bytes_Bytes_$Impl_$;lime_utils__$Bytes_Bytes_$Impl_$.__name__=["lime","utils","_Bytes","Bytes_Impl_"];lime_utils__$Bytes_Bytes_$Impl_$._new=function(e,t){var i=new haxe_io_Bytes(t);return i};lime_utils__$Bytes_Bytes_$Impl_$.fromBytes=function(e){if(e==null){return null}return lime_utils__$Bytes_Bytes_$Impl_$._new(e.length,e.b.bufferValue)};lime_utils__$Bytes_Bytes_$Impl_$.fromFile=function(e){return null};lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile=function(e){var t=new lime_net__$HTTPRequest_$lime_$utils_$Bytes;return t.load(e)};lime_utils__$Bytes_Bytes_$Impl_$.ofString=function(e){var t=haxe_io_Bytes.ofString(e);return lime_utils__$Bytes_Bytes_$Impl_$._new(t.length,t.b.bufferValue)};var lime_utils_Log=function(){};$hxClasses["lime.utils.Log"]=lime_utils_Log;lime_utils_Log.__name__=["lime","utils","Log"];lime_utils_Log.error=function(e,t){if(lime_utils_Log.level>=1){var i="["+t.className+"] ERROR: "+Std.string(e);if(lime_utils_Log.throwErrors){throw new js__$Boot_HaxeError(i)}else{console.error(i)}}};lime_utils_Log.info=function(e,t){if(lime_utils_Log.level>=3){console.info("["+t.className+"] "+Std.string(e))}};lime_utils_Log.verbose=function(e,t){if(lime_utils_Log.level>=5){console.log("["+t.className+"] "+Std.string(e))}};lime_utils_Log.warn=function(e,t){if(lime_utils_Log.level>=2){console.warn("["+t.className+"] WARNING: "+Std.string(e))}};var lime_utils_Preloader=function(){this.bytesTotalCache=new haxe_ds_StringMap;this.bytesLoadedCache2=new haxe_ds_StringMap;this.bytesLoadedCache=new haxe_ds_ObjectMap;this.onProgress=new lime_app__$Event_$Int_$Int_$Void;this.onComplete=new lime_app__$Event_$Void_$Void;this.bytesLoaded=0;this.bytesTotal=0;this.libraries=[];this.libraryNames=[];this.onProgress.add($bind(this,this.update))};$hxClasses["lime.utils.Preloader"]=lime_utils_Preloader;lime_utils_Preloader.__name__=["lime","utils","Preloader"];lime_utils_Preloader.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,preloadComplete:null,preloadStarted:null,simulateProgress:null,addLibrary:function(e){this.libraries.push(e)},addLibraryName:function(e){if(this.libraryNames.indexOf(e)==-1){this.libraryNames.push(e)}},load:function(){var s=this;var e=0;var t=this.libraries;while(e0){var i=o.bytesTotalCache;if(!(__map_reserved[_[0]]!=null?i.existsReserved(_[0]):i.h.hasOwnProperty(_[0]))){var s=o.bytesTotalCache;if(__map_reserved[_[0]]!=null){s.setReserved(_[0],t)}else{s.h[_[0]]=t}o.bytesTotal+=t-200}if(e>t){e=t}var a=o.bytesLoadedCache2;if(!(__map_reserved[_[0]]!=null?a.existsReserved(_[0]):a.h.hasOwnProperty(_[0]))){o.bytesLoaded+=e}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=e-(__map_reserved[_[0]]!=null?r.getReserved(_[0]):r.h[_[0]])}var n=o.bytesLoadedCache2;if(__map_reserved[_[0]]!=null){n.setReserved(_[0],e)}else{n.h[_[0]]=e}if(!o.simulateProgress){o.onProgress.dispatch(o.bytesLoaded,o.bytesTotal)}}}}(i)).onComplete(function(n){return function(e){var t=200;var i=o.bytesTotalCache;if(__map_reserved[n[0]]!=null?i.existsReserved(n[0]):i.h.hasOwnProperty(n[0])){var s=o.bytesTotalCache;if(__map_reserved[n[0]]!=null){t=s.getReserved(n[0])}else{t=s.h[n[0]]}}var a=o.bytesLoadedCache2;if(!(__map_reserved[n[0]]!=null?a.existsReserved(n[0]):a.h.hasOwnProperty(n[0]))){o.bytesLoaded+=t}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=t-(__map_reserved[n[0]]!=null?r.getReserved(n[0]):r.h[n[0]])}o.loadedAssetLibrary(n[0])}}(i)).onError(function(){return function(e){lime_utils_Log.error(e,{fileName:"Preloader.hx",lineNumber:290,className:"lime.utils.Preloader",methodName:"updateProgress"})}}())}}if(!this.simulateProgress&&this.loadedLibraries==this.libraries.length+this.libraryNames.length){if(!this.preloadComplete){this.preloadComplete=true;lime_utils_Log.verbose("Preload complete",{fileName:"Preloader.hx",lineNumber:301,className:"lime.utils.Preloader",methodName:"updateProgress"})}this.start()}},__class__:lime_utils_Preloader};var motion_actuators_IGenericActuator=function(){};$hxClasses["motion.actuators.IGenericActuator"]=motion_actuators_IGenericActuator;motion_actuators_IGenericActuator.__name__=["motion","actuators","IGenericActuator"];motion_actuators_IGenericActuator.prototype={stop:null,__class__:motion_actuators_IGenericActuator};var motion_actuators_GenericActuator=function(e,t,i){this._autoVisible=true;this._delay=0;this._reflect=false;this._repeat=0;this._reverse=false;this._smartRotation=false;this._snapping=false;this.special=false;this.target=e;this.properties=i;this.duration=t;this._ease=motion_Actuate.defaultEase};$hxClasses["motion.actuators.GenericActuator"]=motion_actuators_GenericActuator;motion_actuators_GenericActuator.__name__=["motion","actuators","GenericActuator"];motion_actuators_GenericActuator.__interfaces__=[motion_actuators_IGenericActuator];motion_actuators_GenericActuator.prototype={duration:null,id:null,properties:null,target:null,_autoVisible:null,_delay:null,_ease:null,_onComplete:null,_onCompleteParams:null,_onRepeat:null,_onRepeatParams:null,_onUpdate:null,_onUpdateParams:null,_onResume:null,_onResumeParams:null,_onPause:null,_onPauseParams:null,_reflect:null,_repeat:null,_reverse:null,_smartRotation:null,_snapping:null,special:null,apply:function(){var e=0;var t=Reflect.fields(this.properties);while(e=i.timeOffset){i.update(t)}++s}else{motion_actuators_SimpleActuator.actuators.splice(s,1);--motion_actuators_SimpleActuator.actuatorsLength}}};motion_actuators_SimpleActuator.__super__=motion_actuators_GenericActuator;motion_actuators_SimpleActuator.prototype=$extend(motion_actuators_GenericActuator.prototype,{setField_openfl_geom_Transform:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_TransformActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_MotionPathActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_openfl_display_DisplayObject:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_SimpleActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},timeOffset:null,active:null,cacheVisible:null,detailsLength:null,initialized:null,paused:null,pauseTime:null,propertyDetails:null,sendChange:null,setVisible:null,startTime:null,toggleVisible:null,autoVisible:function(e){if(e==null){e=true}this._autoVisible=e;if(!e){this.toggleVisible=false;if(this.setVisible){var t=this.target;var i=this.cacheVisible;if(Object.prototype.hasOwnProperty.call(t,"visible")){t["visible"]=i}else{Reflect.setProperty(t,"visible",i)}}}return this},delay:function(e){this._delay=e;this.timeOffset=this.startTime+e;return this},getField:function(e,t){var i=null;if(Object.prototype.hasOwnProperty.call(e,t)){i=Reflect.field(e,t)}else{i=Reflect.getProperty(e,t)}return i},initialize:function(){var e;var t;var i=0;var s=Reflect.fields(this.properties);while(i1){a=1}if(!this.initialized){this.initialize()}if(!this.special){i=this._ease.calculate(a);var r=0;var n=this.detailsLength;while(r180){f-=360}else if(f<-180){f+=360}l=t.start+f*i}else{l=t.start+t.change*i}if(!this._snapping){if(t.isField){t.target[t.propertyName]=l}else{Reflect.setProperty(t.target,t.propertyName,l)}}else{var p=Math.round(l);if(t.isField){t.target[t.propertyName]=p}else{Reflect.setProperty(t.target,t.propertyName,p)}}}}if(a==1){if(this._repeat==0){this.active=false;var d;if(this.toggleVisible){var g=this.target;var m=null;if(Object.prototype.hasOwnProperty.call(g,"alpha")){m=Reflect.field(g,"alpha")}else{m=Reflect.getProperty(g,"alpha")}d=m==0}else{d=false}if(d){var v=this.target;if(Object.prototype.hasOwnProperty.call(v,"visible")){v["visible"]=false}else{Reflect.setProperty(v,"visible",false)}}this.complete(true);return}else{if(this._onRepeat!=null){var b=this._onRepeat;var y=this._onRepeatParams;if(y==null){y=[]}b.apply(b,y)}if(this._reflect){this._reverse=!this._reverse}this.startTime=e;this.timeOffset=this.startTime+this._delay;if(this._repeat>0){this._repeat--}}}if(this.sendChange){this.change()}}},__class__:motion_actuators_SimpleActuator});var motion_easing_Expo=function(){};$hxClasses["motion.easing.Expo"]=motion_easing_Expo;motion_easing_Expo.__name__=["motion","easing","Expo"];motion_easing_Expo.__properties__={get_easeOut:"get_easeOut"};motion_easing_Expo.get_easeOut=function(){return new motion_easing_ExpoEaseOut};var motion_easing_IEasing=function(){};$hxClasses["motion.easing.IEasing"]=motion_easing_IEasing;motion_easing_IEasing.__name__=["motion","easing","IEasing"];motion_easing_IEasing.prototype={calculate:null,__class__:motion_easing_IEasing};var motion_easing_ExpoEaseOut=function(){};$hxClasses["motion.easing.ExpoEaseOut"]=motion_easing_ExpoEaseOut;motion_easing_ExpoEaseOut.__name__=["motion","easing","ExpoEaseOut"];motion_easing_ExpoEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_ExpoEaseOut.prototype={calculate:function(e){if(e==1){return 1}else{return 1-Math.pow(2,-10*e)}},__class__:motion_easing_ExpoEaseOut};var motion_Actuate=function(){};$hxClasses["motion.Actuate"]=motion_Actuate;motion_Actuate.__name__=["motion","Actuate"];motion_Actuate.apply=function(e,t,i){motion_Actuate.stop(e,t);if(i==null){i=motion_Actuate.defaultActuator}var s=Type.createInstance(i,[e,0,t]);s.apply();return s};motion_Actuate.getLibrary=function(e,t){if(t==null){t=true}if(motion_Actuate.targetLibraries.h.__keys__[e.__id__]==null&&t){motion_Actuate.targetLibraries.set(e,[])}return motion_Actuate.targetLibraries.h[e.__id__]};motion_Actuate.stop=function(e,t,i,s){if(s==null){s=true}if(i==null){i=false}if(e!=null){if(js_Boot.__instanceof(e,motion_actuators_IGenericActuator)){var a=e;a.stop(null,i,s)}else{var r=motion_Actuate.getLibrary(e,false);if(r!=null){if(typeof t=="string"){var n={};n[t]=null;t=n}else if(t instanceof Array&&t.__enum__==null){var _={};var o=0;var l=js_Boot.__cast(t,Array);while(o=0){r[c].stop(t,i,s);--c}}}}};motion_Actuate.tween=function(e,t,i,s,a){if(s==null){s=true}if(e!=null){if(t>0){if(a==null){a=motion_Actuate.defaultActuator}var r=Type.createInstance(a,[e,t,i]);var n=motion_Actuate.getLibrary(r.target);if(s){var _=n.length-1;while(_>=0){n[_].stop(r.properties,false,false);--_}n=motion_Actuate.getLibrary(r.target)}n.push(r);r.move();return r}else{return motion_Actuate.apply(e,i,a)}}return null};motion_Actuate.unload=function(e){var t=e.target;if(motion_Actuate.targetLibraries.h.__keys__[t.__id__]!=null){HxOverrides.remove(motion_Actuate.targetLibraries.h[t.__id__],e);if(motion_Actuate.targetLibraries.h[t.__id__].length==0){motion_Actuate.targetLibraries.remove(t)}}};var motion_IComponentPath=function(){};$hxClasses["motion.IComponentPath"]=motion_IComponentPath;motion_IComponentPath.__name__=["motion","IComponentPath"];motion_IComponentPath.prototype={get_end:null,start:null,calculate:null,__class__:motion_IComponentPath,__properties__:{get_end:"get_end"}};var motion_actuators_FilterActuator=function(e,t,i){this.filterIndex=-1;motion_actuators_SimpleActuator.call(this,e,t,i);if(js_Boot.__instanceof(i.filter,Class)){this.filterClass=i.filter;if(e.get_filters().length==0){e.set_filters([Type.createInstance(this.filterClass,[])])}var s=0;var a=e.get_filters();while(s-1){t[this.properties.filter]=this.filter}else{var i=0;var s=t.length;while(i1){s=1}if(!this.initialized){this.initialize()}if(!this.special){i=this._ease.calculate(s);var a=0;var r=this.propertyDetails;while(a0){this._repeat--}}}if(this.sendChange){this.change()}}},__class__:motion_actuators_MotionPathActuator});var motion_actuators_PropertyDetails=function(e,t,i,s,a){if(a==null){a=true}this.target=e;this.propertyName=t;this.start=i;this.change=s;this.isField=a};$hxClasses["motion.actuators.PropertyDetails"]=motion_actuators_PropertyDetails;motion_actuators_PropertyDetails.__name__=["motion","actuators","PropertyDetails"];motion_actuators_PropertyDetails.prototype={change:null,isField:null,propertyName:null,start:null,target:null,__class__:motion_actuators_PropertyDetails};var motion_actuators_PropertyPathDetails=function(e,t,i,s){if(s==null){s=true}motion_actuators_PropertyDetails.call(this,e,t,0,0,s);this.path=i};$hxClasses["motion.actuators.PropertyPathDetails"]=motion_actuators_PropertyPathDetails;motion_actuators_PropertyPathDetails.__name__=["motion","actuators","PropertyPathDetails"];motion_actuators_PropertyPathDetails.__super__=motion_actuators_PropertyDetails;motion_actuators_PropertyPathDetails.prototype=$extend(motion_actuators_PropertyDetails.prototype,{path:null,__class__:motion_actuators_PropertyPathDetails});var motion_actuators_TransformActuator=function(e,t,i){motion_actuators_SimpleActuator.call(this,e,t,i)};$hxClasses["motion.actuators.TransformActuator"]=motion_actuators_TransformActuator;motion_actuators_TransformActuator.__name__=["motion","actuators","TransformActuator"];motion_actuators_TransformActuator.__super__=motion_actuators_SimpleActuator;motion_actuators_TransformActuator.prototype=$extend(motion_actuators_SimpleActuator.prototype,{endColorTransform:null,endSoundTransform:null,tweenColorTransform:null,tweenSoundTransform:null,apply:function(){this.initialize();if(this.endColorTransform!=null){var e=this.target;var t=null;if(Object.prototype.hasOwnProperty.call(e,"transform")){t=Reflect.field(e,"transform")}else{t=Reflect.getProperty(e,"transform")}var i=t;var s=this.endColorTransform;if(Object.prototype.hasOwnProperty.call(i,"colorTransform")){i["colorTransform"]=s}else{Reflect.setProperty(i,"colorTransform",s)}}if(this.endSoundTransform!=null){var a=this.target;var r=this.endSoundTransform;if(Object.prototype.hasOwnProperty.call(a,"soundTransform")){a["soundTransform"]=r}else{Reflect.setProperty(a,"soundTransform",r)}}},initialize:function(){if(Object.prototype.hasOwnProperty.call(this.properties,"colorValue")&&js_Boot.__instanceof(this.target,openfl_display_DisplayObject)){this.initializeColor()}if(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")||Object.prototype.hasOwnProperty.call(this.properties,"soundPan")){this.initializeSound()}this.detailsLength=this.propertyDetails.length;this.initialized=true},initializeColor:function(){this.endColorTransform=new openfl_geom_ColorTransform;var e=this.properties.colorValue;var t=this.properties.colorStrength;if(t<1){var i;var s;if(t<.5){i=1;s=t*2}else{i=1-(t-.5)*2;s=1}this.endColorTransform.redMultiplier=i;this.endColorTransform.greenMultiplier=i;this.endColorTransform.blueMultiplier=i;this.endColorTransform.redOffset=s*(e>>16&255);this.endColorTransform.greenOffset=s*(e>>8&255);this.endColorTransform.blueOffset=s*(e&255)}else{this.endColorTransform.redMultiplier=0;this.endColorTransform.greenMultiplier=0;this.endColorTransform.blueMultiplier=0;this.endColorTransform.redOffset=e>>16&255;this.endColorTransform.greenOffset=e>>8&255;this.endColorTransform.blueOffset=e&255}var a=["redMultiplier","greenMultiplier","blueMultiplier","redOffset","greenOffset","blueOffset"];if(Object.prototype.hasOwnProperty.call(this.properties,"colorAlpha")){this.endColorTransform.alphaMultiplier=this.properties.colorAlpha;a.push("alphaMultiplier")}else{var r=this.target;var n=null;if(Object.prototype.hasOwnProperty.call(r,"alpha")){n=Reflect.field(r,"alpha")}else{n=Reflect.getProperty(r,"alpha")}this.endColorTransform.alphaMultiplier=n}var _=this.target;var o=null;if(Object.prototype.hasOwnProperty.call(_,"transform")){o=Reflect.field(_,"transform")}else{o=Reflect.getProperty(_,"transform")}var l=o;var h=null;if(Object.prototype.hasOwnProperty.call(l,"colorTransform")){h=Reflect.field(l,"colorTransform")}else{h=Reflect.getProperty(l,"colorTransform")}var c=h;this.tweenColorTransform=new openfl_geom_ColorTransform;var u;var f;var p=0;while(p0){s+="&"}var _=encodeURIComponent(n)+"=";var o=Std.string(Reflect.field(e.data,n));s+=_+encodeURIComponent(o)}if(i.indexOf("?")>-1){i+="&"+s}else{i+="?"+s}}lime_system_System.openURL(i,t)};openfl_Lib.get_current=function(){if(openfl__$internal_Lib.current==null){openfl__$internal_Lib.current=new openfl_display_MovieClip}return openfl__$internal_Lib.current};var openfl__$Vector_IVector=function(){};$hxClasses["openfl._Vector.IVector"]=openfl__$Vector_IVector;openfl__$Vector_IVector.__name__=["openfl","_Vector","IVector"];openfl__$Vector_IVector.prototype={get_length:null,set_length:null,get:null,__class__:openfl__$Vector_IVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_BoolVector=function(){};$hxClasses["openfl._Vector.BoolVector"]=openfl__$Vector_BoolVector;openfl__$Vector_BoolVector.__name__=["openfl","_Vector","BoolVector"];openfl__$Vector_BoolVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_BoolVector.prototype={fixed:null,__array:null,get:function(e){if(e>=this.__array.length){return false}else{return this.__array[e]}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var i=t;var s=e;while(ie)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_BoolVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_FloatVector=function(e,t,i,s){if(s==null){s=false}if(t==null){t=false}if(e==null){e=0}if(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a0){this.set_length(e)}this.fixed=t};$hxClasses["openfl._Vector.FloatVector"]=openfl__$Vector_FloatVector;openfl__$Vector_FloatVector.__name__=["openfl","_Vector","FloatVector"];openfl__$Vector_FloatVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_FloatVector.prototype={fixed:null,__array:null,concat:function(e){if(e==null){return new openfl__$Vector_FloatVector(0,false,this.__array.slice())}else{var t=e;if(t.__array.length>0){return new openfl__$Vector_FloatVector(0,false,this.__array.concat(t.__array))}else{return new openfl__$Vector_FloatVector(0,false,this.__array.slice())}}},copy:function(){return new openfl__$Vector_FloatVector(0,this.fixed,this.__array.slice())},get:function(e){return this.__array[e]},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},set:function(e,t){if(!this.fixed||et){var i=t;var s=e;while(ie)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_FloatVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_FunctionVector=function(){};$hxClasses["openfl._Vector.FunctionVector"]=openfl__$Vector_FunctionVector;openfl__$Vector_FunctionVector.__name__=["openfl","_Vector","FunctionVector"];openfl__$Vector_FunctionVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_FunctionVector.prototype={fixed:null,__array:null,get:function(e){if(e>=this.__array.length){return null}else{return this.__array[e]}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var i=t;var s=e;while(ie)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_FunctionVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_IntVector=function(e,t,i){if(t==null){t=false}if(e==null){e=0}if(i==null){i=[]}this.__array=i;if(e>0){this.set_length(e)}this.fixed=t};$hxClasses["openfl._Vector.IntVector"]=openfl__$Vector_IntVector;openfl__$Vector_IntVector.__name__=["openfl","_Vector","IntVector"];openfl__$Vector_IntVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_IntVector.prototype={fixed:null,__array:null,get:function(e){return this.__array[e]},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var i=t;var s=e;while(ie)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_IntVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_ObjectVector=function(e,t,i,s){if(s==null){s=false}if(t==null){t=false}if(e==null){e=0}if(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a0){this.set_length(e)}this.fixed=t};$hxClasses["openfl._Vector.ObjectVector"]=openfl__$Vector_ObjectVector;openfl__$Vector_ObjectVector.__name__=["openfl","_Vector","ObjectVector"];openfl__$Vector_ObjectVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_ObjectVector.prototype={fixed:null,__array:null,get:function(e){return this.__array[e]},indexOf:function(e,t){if(t==null){t=0}var i=t;var s=this.__array.length;while(it){var i=t;var s=e;while(ie)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_ObjectVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$internal_Lib=function(){};$hxClasses["openfl._internal.Lib"]=openfl__$internal_Lib;openfl__$internal_Lib.__name__=["openfl","_internal","Lib"];var openfl__$internal_formats_agal_AGALConverter=function(){};$hxClasses["openfl._internal.formats.agal.AGALConverter"]=openfl__$internal_formats_agal_AGALConverter;openfl__$internal_formats_agal_AGALConverter.__name__=["openfl","_internal","formats","agal","AGALConverter"];openfl__$internal_formats_agal_AGALConverter.prefixFromType=function(e,t){switch(e){case 0:return"va";case 1:if(t==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"vc"}else{return"fc"}break;case 2:if(t==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"vt"}else{return"ft"}break;case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Invalid data!"))}};openfl__$internal_formats_agal_AGALConverter.readUInt64=function(e){var t=e.readInt();var i=e.readInt();var s=new haxe__$Int64__$_$_$Int64(i,t);return s};openfl__$internal_formats_agal_AGALConverter.convertToGLSL=function(e,t){e.position=0;e.__endian=1;var i=e.readByte()&255;if(i==176){return e.readUTF()}if(i!=160){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Magic value must be 0xA0, may not be AGAL"))}var s=e.readInt();if(s!=1){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Version must be 1"))}var a=e.readByte()&255;if(a!=161){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Shader type ID must be 0xA1"))}var r=(e.readByte()&255)==0?openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX:openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT;var n=new openfl__$internal_formats_agal_RegisterMap;var _="";while(true){var o=e.position;if(!_$UInt_UInt_$Impl_$.gt(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e),o)){break}var l=e.readInt();var h=e.readUnsignedInt();var c=openfl__$internal_formats_agal_AGALConverter.readUInt64(e);var u=openfl__$internal_formats_agal_AGALConverter.readUInt64(e);var f=openfl__$internal_formats_agal__$AGALConverter_DestRegister.parse(h,r);var p=openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse(c,r,f.mask);var d=openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse(u,r,f.mask);_+="\t";switch(l){case 0:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+"; // mov");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 1:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" + "+d.toGLSL()+"; // add");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 2:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" - "+d.toGLSL()+"; // sub");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 3:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL()+"; // mul");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 4:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" / "+d.toGLSL()+"; // div");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 5:var g=p.toGLSL();if(g.indexOf(".")>-1){_+=Std.string(f.toGLSL()+" = 1.0 / "+p.toGLSL()+"; // rcp")}else{_+=Std.string(f.toGLSL()+" = vec4(1) / "+p.toGLSL()+"; // rcp")}n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 6:_+=Std.string(f.toGLSL()+" = min("+p.toGLSL()+", "+d.toGLSL()+"); // min");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 7:_+=Std.string(f.toGLSL()+" = max("+p.toGLSL()+", "+d.toGLSL()+"); // max");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 8:_+=Std.string(f.toGLSL()+" = fract("+p.toGLSL()+"); // frc");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 9:_+=Std.string(f.toGLSL()+" = sqrt("+p.toGLSL()+"); // sqrt");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 10:_+=Std.string(f.toGLSL()+" = inversesqrt("+p.toGLSL()+"); // rsq");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 11:_+=Std.string(f.toGLSL()+" = pow("+p.toGLSL()+", "+d.toGLSL()+"); // pow");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 12:_+=Std.string(f.toGLSL()+" = log2("+p.toGLSL()+"); // log");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 13:_+=Std.string(f.toGLSL()+" = exp2("+p.toGLSL()+"); // exp");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 14:_+=Std.string(f.toGLSL()+" = normalize("+p.toGLSL()+"); // normalize");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 15:_+=Std.string(f.toGLSL()+" = sin("+p.toGLSL()+"); // sin");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 16:_+=Std.string(f.toGLSL()+" = cos("+p.toGLSL()+"); // cos");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 17:p.sourceMask=d.sourceMask=7;_+=Std.string(f.toGLSL()+" = cross(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")); // crs");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 18:p.sourceMask=d.sourceMask=7;_+=Std.string(f.toGLSL()+" = vec4(dot(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp3");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 19:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(dot(vec4("+p.toGLSL()+"), vec4("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp4");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 20:_+=Std.string(f.toGLSL()+" = abs("+p.toGLSL()+"); // abs");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 21:_+=Std.string(f.toGLSL()+" = -"+p.toGLSL()+"; // neg");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 22:_+=Std.string(f.toGLSL()+" = clamp("+p.toGLSL()+", 0.0, 1.0); // saturate");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 23:var m=n.getRegisterUsage(d);if(m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * mat3("+d.toGLSL(false)+"); // m33");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=7;_+=Std.string(f.toGLSL()+" = vec3("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"),"+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+")); // m33");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 24:var v=n.getRegisterUsage(d);if(v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m44");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,3)+")); // m44");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,3)}break;case 25:f.mask&=7;var b=n.getRegisterUsage(d);if(b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m34");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec3("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"),"+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+")); // m34");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 39:p.sourceMask=15;_+=Std.string("if (any(lessThan("+p.toGLSL()+", vec4(0)))) discard;");n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 40:var y=openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.parse(u,r);var x=y.d;switch(x){case 0:if(y.t==2){p.sourceMask=3;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA);_+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");_+=Std.string("\t\t"+f.toGLSL()+" = vec4(texture2D("+y.toGLSL()+", "+p.toGLSL()+").xyz, texture2D("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");_+="\t} else {\n";_+=Std.string("\t\t"+f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex\n");_+="\t}"}else{p.sourceMask=3;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D);_+=Std.string(f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex")}break;case 1:if(y.t==2){p.sourceMask=7;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA);_+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");_+=Std.string("\t\t"+f.toGLSL()+" = vec4(textureCube("+y.toGLSL()+", "+p.toGLSL()+").xyz, textureCube("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");_+="\t} else {\n";_+=Std.string("\t\t"+f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");_+="\t}"}else{p.sourceMask=7;_+=Std.string(f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE)}break}n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);if(t!=null){t[y.n]=y.toSamplerState()}break;case 41:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(greaterThanEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // ste");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 42:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(lessThan("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // slt");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 44:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(equal("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // seq");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 45:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(notEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // sne");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Opcode "+l))}_+="\n"}if(openfl__$internal_formats_agal_AGALConverter.limitedProfile==null){var w=lime_graphics_opengl_GL.context.getParameter(7938);openfl__$internal_formats_agal_AGALConverter.limitedProfile=w.indexOf("OpenGL ES")>-1||w.indexOf("WebGL")>-1}var k="";k+=Std.string("// AGAL "+(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX?"vertex":"fragment")+" shader\n");if(openfl__$internal_formats_agal_AGALConverter.limitedProfile){k+="#version 100\n";k+="precision highp float;\n"}else{k+="#version 120\n"}k+=Std.string(n.toGLSL(false));if(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){k+="uniform vec4 vcPositionScale;\n"}k+="void main() {\n";k+=Std.string(n.toGLSL(true));k+=Std.string(_);if(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){k+="\tgl_Position *= vcPositionScale;\n"}k+="}\n";return k};var openfl__$internal_formats_agal__$AGALConverter_DestRegister=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.DestRegister"]=openfl__$internal_formats_agal__$AGALConverter_DestRegister;openfl__$internal_formats_agal__$AGALConverter_DestRegister.__name__=["openfl","_internal","formats","agal","_AGALConverter","DestRegister"];openfl__$internal_formats_agal__$AGALConverter_DestRegister.parse=function(e,t){var i=new openfl__$internal_formats_agal__$AGALConverter_DestRegister;i.programType=t;i.type=e>>>24&15;i.mask=e>>>16&15;i.n=e&65535;return i};openfl__$internal_formats_agal__$AGALConverter_DestRegister.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var e=".";if((this.mask&1)!=0){e+="x"}if((this.mask&2)!=0){e+="y"}if((this.mask&4)!=0){e+="z"}if((this.mask&8)!=0){e+="w"}return e},toGLSL:function(e){if(e==null){e=true}var t;if(this.type==3){if(this.programType==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){t="gl_Position"}else{t="gl_FragColor"}}else{t=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType)+this.n}if(e&&this.mask!=15){t+=this.getWriteMask()}return t},__class__:openfl__$internal_formats_agal__$AGALConverter_DestRegister};var openfl__$internal_formats_agal__$AGALConverter_ProgramType=$hxClasses["openfl._internal.formats.agal._AGALConverter.ProgramType"]={__ename__:["openfl","_internal","formats","agal","_AGALConverter","ProgramType"],__constructs__:["VERTEX","FRAGMENT"]};openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX=["VERTEX",0];openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX.__enum__=openfl__$internal_formats_agal__$AGALConverter_ProgramType;openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT=["FRAGMENT",1];openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT.__enum__=openfl__$internal_formats_agal__$AGALConverter_ProgramType;var openfl__$internal_formats_agal_RegisterMap=function(){this.mEntries=[]};$hxClasses["openfl._internal.formats.agal.RegisterMap"]=openfl__$internal_formats_agal_RegisterMap;openfl__$internal_formats_agal_RegisterMap.__name__=["openfl","_internal","formats","agal","RegisterMap"];openfl__$internal_formats_agal_RegisterMap.prototype={mEntries:null,add:function(e,t,i,s){var a=0;var r=this.mEntries;while(a>s,e.high<<32-s|e.low>>>s);a=n}else{var _=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>s-32);a=_}var o=new haxe__$Int64__$_$_$Int64(0,15);var l=o;var h=new haxe__$Int64__$_$_$Int64(a.high&l.high,a.low&l.low);i.f=h.low;var c=56;c&=63;var u;if(c==0){var f=new haxe__$Int64__$_$_$Int64(e.high,e.low);u=f}else if(c<32){var p=new haxe__$Int64__$_$_$Int64(e.high>>c,e.high<<32-c|e.low>>>c);u=p}else{var d=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>c-32);u=d}var g=new haxe__$Int64__$_$_$Int64(0,15);var m=g;var v=new haxe__$Int64__$_$_$Int64(u.high&m.high,u.low&m.low);i.m=v.low;var b=52;b&=63;var y;if(b==0){var x=new haxe__$Int64__$_$_$Int64(e.high,e.low);y=x}else if(b<32){var w=new haxe__$Int64__$_$_$Int64(e.high>>b,e.high<<32-b|e.low>>>b);y=w}else{var k=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>b-32);y=k}var P=new haxe__$Int64__$_$_$Int64(0,15);var C=P;var T=new haxe__$Int64__$_$_$Int64(y.high&C.high,y.low&C.low);i.w=T.low;var M=48;M&=63;var S;if(M==0){var $=new haxe__$Int64__$_$_$Int64(e.high,e.low);S=$}else if(M<32){var E=new haxe__$Int64__$_$_$Int64(e.high>>M,e.high<<32-M|e.low>>>M);S=E}else{var B=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>M-32);S=B}var L=new haxe__$Int64__$_$_$Int64(0,15);var R=L;var A=new haxe__$Int64__$_$_$Int64(S.high&R.high,S.low&R.low);i.s=A.low;var I=44;I&=63;var D;if(I==0){var F=new haxe__$Int64__$_$_$Int64(e.high,e.low);D=F}else if(I<32){var O=new haxe__$Int64__$_$_$Int64(e.high>>I,e.high<<32-I|e.low>>>I);D=O}else{var G=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>I-32);D=G}var j=new haxe__$Int64__$_$_$Int64(0,15);var H=j;var U=new haxe__$Int64__$_$_$Int64(D.high&H.high,D.low&H.low);i.d=U.low;var N=40;N&=63;var W;if(N==0){var V=new haxe__$Int64__$_$_$Int64(e.high,e.low);W=V}else if(N<32){var z=new haxe__$Int64__$_$_$Int64(e.high>>N,e.high<<32-N|e.low>>>N);W=z}else{var X=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>N-32);W=X}var Y=new haxe__$Int64__$_$_$Int64(0,15);var q=Y;var J=new haxe__$Int64__$_$_$Int64(W.high&q.high,W.low&q.low);i.t=J.low;var K=32;K&=63;var Z;if(K==0){var Q=new haxe__$Int64__$_$_$Int64(e.high,e.low);Z=Q}else if(K<32){var ee=new haxe__$Int64__$_$_$Int64(e.high>>K,e.high<<32-K|e.low>>>K);Z=ee}else{var te=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>K-32);Z=te}var ie=new haxe__$Int64__$_$_$Int64(0,15);var se=ie;var ae=new haxe__$Int64__$_$_$Int64(Z.high&se.high,Z.low&se.low);i.type=ae.low;var re=16;re&=63;var ne;if(re==0){var _e=new haxe__$Int64__$_$_$Int64(e.high,e.low);ne=_e}else if(re<32){var oe=new haxe__$Int64__$_$_$Int64(e.high>>re,e.high<<32-re|e.low>>>re);ne=oe}else{var le=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>re-32);ne=le}var he=new haxe__$Int64__$_$_$Int64(0,255);var ce=he;var ue=new haxe__$Int64__$_$_$Int64(ne.high&ce.high,ne.low&ce.low);i.b=ue.low;var fe=new haxe__$Int64__$_$_$Int64(0,65535);var pe=fe;var de=new haxe__$Int64__$_$_$Int64(e.high&pe.high,e.low&pe.low);i.n=de.low;return i};openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){var e=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType)+this.n;return e},toSamplerState:function(){var e;var t;var i;var s=this.f;switch(s){case 0:t=5;break;case 1:t=4;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var a=this.m;switch(a){case 0:i=2;break;case 1:i=1;break;case 2:i=0;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var r=this.w;switch(r){case 0:e=0;break;case 1:e=2;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var n=(this.s&4)==4;var _=(this.s&1)==1;var o=this.t==2;var l=(this.b<<24>>24)/8;return new openfl__$internal_renderer_SamplerState(e,t,i,l,n,_,o)},__class__:openfl__$internal_formats_agal__$AGALConverter_SamplerRegister};var openfl__$internal_formats_agal__$AGALConverter_SourceRegister=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.SourceRegister"]=openfl__$internal_formats_agal__$AGALConverter_SourceRegister;openfl__$internal_formats_agal__$AGALConverter_SourceRegister.__name__=["openfl","_internal","formats","agal","_AGALConverter","SourceRegister"];openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse=function(e,t,i){var s=new openfl__$internal_formats_agal__$AGALConverter_SourceRegister;s.programType=t;var a=63;a&=63;var r;if(a==0){var n=new haxe__$Int64__$_$_$Int64(e.high,e.low);r=n}else if(a<32){var _=new haxe__$Int64__$_$_$Int64(e.high>>a,e.high<<32-a|e.low>>>a);r=_}else{var o=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>a-32);r=o}var l=new haxe__$Int64__$_$_$Int64(0,1);var h=l;var c=new haxe__$Int64__$_$_$Int64(r.high&h.high,r.low&h.low);s.d=c.low;var u=48;u&=63;var f;if(u==0){var p=new haxe__$Int64__$_$_$Int64(e.high,e.low);f=p}else if(u<32){var d=new haxe__$Int64__$_$_$Int64(e.high>>u,e.high<<32-u|e.low>>>u);f=d}else{var g=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>u-32);f=g}var m=new haxe__$Int64__$_$_$Int64(0,3);var v=m;var b=new haxe__$Int64__$_$_$Int64(f.high&v.high,f.low&v.low);s.q=b.low;var y=40;y&=63;var x;if(y==0){var w=new haxe__$Int64__$_$_$Int64(e.high,e.low);x=w}else if(y<32){var k=new haxe__$Int64__$_$_$Int64(e.high>>y,e.high<<32-y|e.low>>>y);x=k}else{var P=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>y-32);x=P}var C=new haxe__$Int64__$_$_$Int64(0,15);var T=C;var M=new haxe__$Int64__$_$_$Int64(x.high&T.high,x.low&T.low);s.itype=M.low;var S=32;S&=63;var $;if(S==0){var E=new haxe__$Int64__$_$_$Int64(e.high,e.low);$=E}else if(S<32){var B=new haxe__$Int64__$_$_$Int64(e.high>>S,e.high<<32-S|e.low>>>S);$=B}else{var L=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>S-32);$=L}var R=new haxe__$Int64__$_$_$Int64(0,15);var A=R;var I=new haxe__$Int64__$_$_$Int64($.high&A.high,$.low&A.low);s.type=I.low;var D=24;D&=63;var F;if(D==0){var O=new haxe__$Int64__$_$_$Int64(e.high,e.low);F=O}else if(D<32){var G=new haxe__$Int64__$_$_$Int64(e.high>>D,e.high<<32-D|e.low>>>D);F=G}else{var j=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>D-32);F=j}var H=new haxe__$Int64__$_$_$Int64(0,255);var U=H;var N=new haxe__$Int64__$_$_$Int64(F.high&U.high,F.low&U.low);s.s=N.low;var W=16;W&=63;var V;if(W==0){var z=new haxe__$Int64__$_$_$Int64(e.high,e.low);V=z}else if(W<32){var X=new haxe__$Int64__$_$_$Int64(e.high>>W,e.high<<32-W|e.low>>>W);V=X}else{var Y=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>W-32);V=Y}var q=new haxe__$Int64__$_$_$Int64(0,255);var J=q;var K=new haxe__$Int64__$_$_$Int64(V.high&J.high,V.low&J.low);s.o=K.low;var Z=new haxe__$Int64__$_$_$Int64(0,65535);var Q=Z;var ee=new haxe__$Int64__$_$_$Int64(e.high&Q.high,e.low&Q.low);s.n=ee.low;s.sourceMask=i;return s};openfl__$internal_formats_agal__$AGALConverter_SourceRegister.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(e,t){if(t==null){t=0}if(e==null){e=true}if(this.type==3){if(this.programType==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"gl_Position"}else{return"gl_FragColor"}}var i=this.s==228&&this.sourceMask==15;var s="";if(this.type!=5&&!i){var a=0;while(a<4){var r=a++;if((this.sourceMask&1<>r*2&3;switch(n){case 0:s+="x";break;case 1:s+="y";break;case 2:s+="z";break;case 3:s+="w";break}}}}var _=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType);if(this.d==0){_+=this.n+t}else{_+=this.o;var o=String.fromCharCode(HxOverrides.cca("x",0)+this.q);var l=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.itype,this.programType)+this.n+"."+o;_+="[ int("+l+") +"+t+"]"}if(e&&s!=""){_+="."+s}return _},__class__:openfl__$internal_formats_agal__$AGALConverter_SourceRegister};var openfl__$internal_formats_html_HTMLParser=function(){};$hxClasses["openfl._internal.formats.html.HTMLParser"]=openfl__$internal_formats_html_HTMLParser;openfl__$internal_formats_html_HTMLParser.__name__=["openfl","_internal","formats","html","HTMLParser"];openfl__$internal_formats_html_HTMLParser.parse=function(e,t,i){e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexBreakTag.r,"\n");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[0].r,'"');e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[1].r,"'");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[2].r,"&");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[5].r," ");var s=e.split("<");if(s.length==1){e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexHTMLTag.r,"");if(i.get_length()>1){i.splice(1,i.get_length()-1)}e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[3].r,"<");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[4].r,">");var a=i.get(0);a.format=t;a.start=0;a.end=e.length;return e}else{i.splice(0,i.get_length());e="";var r;var n=0;var _=s.length;while(n<_){var o=n++;r=s[o];r=r.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[3].r,"<");r=r.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[4].r,">");s[o]=r}var l=[t.clone()];var h=[];var c;var u=false;var f=0;while(f");var m=g+1;var v=p.indexOf(" ");var b=p.substring(d?1:0,v>-1&&v0){e+="\n";u=true}if(m-1){var x=b.toLowerCase();switch(x){case"a":if(openfl__$internal_formats_html_HTMLParser.__regexHref.match(p)){y.url=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexHref)}break;case"b":y.bold=true;break;case"em":case"i":y.italic=true;break;case"font":if(openfl__$internal_formats_html_HTMLParser.__regexFace.match(p)){y.font=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexFace)}if(openfl__$internal_formats_html_HTMLParser.__regexColor.match(p)){y.color=Std.parseInt("0x"+openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexColor))}if(openfl__$internal_formats_html_HTMLParser.__regexSize.match(p)){var w=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexSize);var k=HxOverrides.cca(w,0);if(k==43||k==45){var P=l.length>=2?l[l.length-2]:t;y.size=P.size+Std.parseInt(w)}else{y.size=Std.parseInt(w)}}break;case"p":if(i.get_length()>0&&!u){e+="\n"}if(openfl__$internal_formats_html_HTMLParser.__regexAlign.match(p)){var C=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexAlign).toLowerCase();y.align=openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString(C)}break;case"textformat":if(openfl__$internal_formats_html_HTMLParser.__regexBlockIndent.match(p)){y.blockIndent=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexBlockIndent))}if(openfl__$internal_formats_html_HTMLParser.__regexIndent.match(p)){y.indent=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexIndent))}if(openfl__$internal_formats_html_HTMLParser.__regexLeading.match(p)){y.leading=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexLeading))}if(openfl__$internal_formats_html_HTMLParser.__regexLeftMargin.match(p)){y.leftMargin=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexLeftMargin))}if(openfl__$internal_formats_html_HTMLParser.__regexRightMargin.match(p)){y.rightMargin=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexRightMargin))}if(openfl__$internal_formats_html_HTMLParser.__regexTabStops.match(p)){var T=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexTabStops).split(" ");var M=[];var S=0;while(S>>16;x=(v&65280)>>>8;w=v&255;k=s[T]/255;if(k<0){k=0}if(k>1){k=1}o.addColorStop(k,"rgba("+y+", "+x+", "+w+", "+b+")")}if(l!=null){openfl_geom_Point.__pool.release(l)}if(h!=null){openfl_geom_Point.__pool.release(h)}if(c){openfl_geom_Matrix.__pool.release(a)}return o};openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas=function(e,t,i,s){var a=window.document.createElement("canvas");var r=a.getContext("2d");a.width=i;a.height=s;var n=e.image.get_src();r.fillStyle=r.createPattern(n,t?"repeat":"no-repeat");r.beginPath();r.moveTo(0,0);r.lineTo(0,s);r.lineTo(i,s);r.lineTo(i,0);r.lineTo(0,0);r.closePath();if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){r.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}return a};openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect=function(e,t,i,s,a,r){if(r==null){r=a}a*=.5;r*=.5;if(a>i/2){a=i/2}if(r>s/2){r=s/2}var n=e+i;var _=t+s;var o=-a+a*.7071067811865476;var l=-a+a*.41421356237309503;var h=-r+r*.7071067811865476;var c=-r+r*.41421356237309503;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(n,_-r);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n,_+c,n+o,_+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n+l,_,n-a,_);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(e+a,_);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e-l,_,e-o,_+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e,_+c,e,_-r);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(e,t+r);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e,t-c,e-o,t-h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e-l,t,e+a,t);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(n-a,t);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n+l,t,n+o,t-h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n,t-c,n,t+r);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(n,_-r)};openfl__$internal_renderer_canvas_CanvasGraphics.endFill=function(){openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands,false);openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear()};openfl__$internal_renderer_canvas_CanvasGraphics.endStroke=function(){openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands,true);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear()};openfl__$internal_renderer_canvas_CanvasGraphics.hitTest=function(e,t,i){openfl__$internal_renderer_canvas_CanvasGraphics.bounds=e.__bounds;openfl__$internal_renderer_canvas_CanvasGraphics.graphics=e;if(e.__commands.get_length()==0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds==null||openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width<=0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height<=0){return false}else{openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting=true;var s=e.__renderTransform;var a=t*s.a+i*s.c+s.tx;var r=t*s.b+i*s.d+s.ty;t=a;i=r;t-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*s.a+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*s.c+s.tx;i-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*s.b+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*s.d+s.ty;var n=e.__canvas;var _=e.__context;e.__canvas=openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas;e.__context=openfl__$internal_renderer_canvas_CanvasGraphics.hitTestContext;openfl__$internal_renderer_canvas_CanvasGraphics.context=e.__context;openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(s.a,s.b,s.c,s.d,s.tx,s.ty);openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat=false;openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";var o=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var l=0;var h=e.__commands.types;while(l0){openfl__$internal_renderer_canvas_CanvasGraphics.endFill()}if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(t,i,openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)){ne=true}if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length()>0){openfl__$internal_renderer_canvas_CanvasGraphics.endStroke()}if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(t,i)){ne=true}o.destroy();e.__canvas=n;e.__context=_;return ne}};openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT=function(e,t){if(t==null){t=false}var i=-Infinity;var s=-Infinity;var a=e.get_length();var r=1;var n=a+1;while(r>>16;P=(U.buffer.i[U.iPos]&65280)>>>8;C=U.buffer.i[U.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle="rgba("+k+", "+P+", "+C+", "+U.buffer.f[U.fPos]+")"}openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true}break;case 2:var W=c.prev;switch(W[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;var V=c;var z=V;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(z.buffer.o[z.oPos],z.buffer.ii[z.iiPos],z.buffer.ff[z.ffPos],z.buffer.ii[z.iiPos+1],z.buffer.o[z.oPos+1],z.buffer.o[z.oPos+2],z.buffer.o[z.oPos+3],z.buffer.f[z.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true;break;case 3:var X=c.prev;switch(X[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var Y=c;var q=Y;var J=q.buffer.o[q.oPos];if(J.inputCount>0){openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=J.inputs[0];openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,J.inputWrap[0]!=0,J.inputFilter[0]!=5);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true;openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix=null;openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix=null}break;case 4:var K=c.prev;switch(K[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var Z=c;var Q=Z;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(Q.buffer.f[Q.fPos]-i,Q.buffer.f[Q.fPos+1]-s,Q.buffer.f[Q.fPos+2]-i,Q.buffer.f[Q.fPos+3]-s,Q.buffer.f[Q.fPos+4]-i,Q.buffer.f[Q.fPos+5]-s);break;case 5:var ee=c.prev;switch(ee[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var te=c;var ie=te;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(ie.buffer.f[ie.fPos]-i,ie.buffer.f[ie.fPos+1]-s,ie.buffer.f[ie.fPos+2]-i,ie.buffer.f[ie.fPos+3]-s);break;case 6:var se=c.prev;switch(se[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var ae=c;var re=ae;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(re.buffer.f[re.fPos]-i+re.buffer.f[re.fPos+2],re.buffer.f[re.fPos+1]-s);openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(re.buffer.f[re.fPos]-i,re.buffer.f[re.fPos+1]-s,re.buffer.f[re.fPos+2],0,Math.PI*2,true);break;case 7:var ne=c.prev;switch(ne[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var _e=c;var oe=_e;h=true;u=oe.buffer.f[oe.fPos];f=oe.buffer.f[oe.fPos+1];p=oe.buffer.f[oe.fPos+2];d=oe.buffer.f[oe.fPos+3];u-=i;f-=s;m=p/2*g;v=d/2*g;b=u+p;y=f+d;x=u+p/2;w=f+d/2;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(u,w);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(u,w-v,x-m,f,x,f);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x+m,f,b,w-v,b,w);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(b,w+v,x+m,y,x,y);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x-m,y,u,w+v,u,w);break;case 8:var le=c.prev;switch(le[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var he=c;var ce=he;var ue=ce.buffer.o[ce.oPos];var fe=ce.buffer.o[ce.oPos+1];var pe=ce.buffer.o[ce.oPos+2];var de=fe!=null;var ge=false;var me=false;var ve=de?fe.get_length():Math.floor(ue.get_length()/4);if(ve==0){return}if(pe!=null){if(pe.get_length()>=ve*6){ge=true;me=true}else if(pe.get_length()>=ve*4){ge=true}else if(pe.get_length()>=ve*2){me=true}}var be=openfl_geom_Rectangle.__pool.get();var ye=openfl_geom_Matrix.__pool.get();var xe=openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__renderTransform;var we=openfl__$internal_renderer_canvas_CanvasGraphics.worldAlpha;var ke;var Pe;openfl__$internal_renderer_canvas_CanvasGraphics.context.save();var Ce=0;var Te=ve;while(Ce=0&&B>=0&&$<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width&&E<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height){T=true;if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),B,S,$-B,E-S,Ee.buffer.f[Ee.fPos]-i,Ee.buffer.f[Ee.fPos+1]-s,Ee.buffer.f[Ee.fPos+2],Ee.buffer.f[Ee.fPos+3])}}}if(!T){h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(Ee.buffer.f[Ee.fPos]-i,Ee.buffer.f[Ee.fPos+1]-s,Ee.buffer.f[Ee.fPos+2],Ee.buffer.f[Ee.fPos+3])}break;case 10:var Fe=c.prev;switch(Fe[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var Oe=c;var Ge=Oe;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(Ge.buffer.f[Ge.fPos]-i,Ge.buffer.f[Ge.fPos+1]-s,Ge.buffer.f[Ge.fPos+2],Ge.buffer.f[Ge.fPos+3],Ge.buffer.f[Ge.fPos+4],Ge.buffer.o[Ge.oPos]);break;case 12:var je=c.prev;switch(je[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var He=c;var Ue=He;var Ne=Ue.buffer.o[Ue.oPos];var We=Ue.buffer.o[Ue.oPos+1];var Ve=Ue.buffer.o[Ue.oPos+2];var ze=null;var Xe=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill==null;if(Xe&&Ve!=null){throw"__break__"}if(!Xe){if(Ve==null){Ve=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);var Ye=0;var qe=Ne.get_length()/2|0;while(Ye1){ze=openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width|0,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height|0)}else{ze=openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height)}}var et=0;var tt=We.get_length();var it;var st;var at;var rt;var nt;var _t;var ot;var lt;var ht;var ct;var ut;var ft;var pt;var dt;var gt;var mt;var vt;var bt;var yt;var xt;var wt;var kt;var Pt;var Ct;var Tt;var Mt;var St;var $t;while(et0?Gt.buffer.o[Gt.oPos]:1;var jt=Gt.buffer.o[Gt.oPos+3]==null?"round":openfl_display__$JointStyle_JointStyle_$Impl_$.toString(Gt.buffer.o[Gt.oPos+3]).toLowerCase();openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin=jt;var Ht;if(Gt.buffer.o[Gt.oPos+2]==null){Ht="round"}else{var Ut=Gt.buffer.o[Gt.oPos+2];if(Ut==0){Ht="butt"}else{Ht=openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(Gt.buffer.o[Gt.oPos+2]).toLowerCase()}}openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap=Ht;openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit=Gt.buffer.f[Gt.fPos+1];if(Gt.buffer.f[Gt.fPos]==1){var Nt=StringTools.hex(Gt.buffer.i[Gt.iPos]&16777215,6);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="#"+Nt}else{k=(Gt.buffer.i[Gt.iPos]&16711680)>>>16;P=(Gt.buffer.i[Gt.iPos]&65280)>>>8;C=Gt.buffer.i[Gt.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="rgba("+k+", "+P+", "+C+", "+Gt.buffer.f[Gt.fPos]+")"}openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=true}break;case 17:var Wt=c.prev;switch(Wt[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var Vt=c;var zt=Vt;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(zt.buffer.f[zt.fPos]-i,zt.buffer.f[zt.fPos+1]-s);a=zt.buffer.f[zt.fPos];r=zt.buffer.f[zt.fPos+1];if(a==_&&r==o){n=true}break;case 18:var Xt=c.prev;switch(Xt[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Yt=c;var qt=Yt;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(qt.buffer.f[qt.fPos]-i,qt.buffer.f[qt.fPos+1]-s);a=qt.buffer.f[qt.fPos];r=qt.buffer.f[qt.fPos+1];if(l){n=true}_=qt.buffer.f[qt.fPos];o=qt.buffer.f[qt.fPos+1];l=true;break;case 21:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";break;case 22:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="nonzero";break;default:var Jt=c.prev;switch(Jt[1]){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 13: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;break;case 21:case 22:break;default:}c.prev=D}}}catch(e){if(e!="__break__")throw e}if(L!=null){openfl_geom_Point.__pool.release(L)}if(R!=null){openfl_geom_Point.__pool.release(R)}c.destroy();if(h){if(t&&openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke){if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&n){openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(_-i,o-s);openfl__$internal_renderer_canvas_CanvasGraphics.closePath(false)}else if(n&&a==_&&r==o){openfl__$internal_renderer_canvas_CanvasGraphics.closePath(false)}if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke()}}if(!t){if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill||openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill!=null){openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix!=null){openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.ty);if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.ty)}else if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath()}}}};openfl__$internal_renderer_canvas_CanvasGraphics.render=function(e,t){e.__update(t.__worldTransform);if(e.__softwareDirty){openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting=false;openfl__$internal_renderer_canvas_CanvasGraphics.graphics=e;openfl__$internal_renderer_canvas_CanvasGraphics.allowSmoothing=t.__allowSmoothing;openfl__$internal_renderer_canvas_CanvasGraphics.worldAlpha=t.__getAlpha(e.__owner.__worldAlpha);openfl__$internal_renderer_canvas_CanvasGraphics.bounds=e.__bounds;var i=e.__width;var s=e.__height;if(!e.__visible||e.__commands.get_length()==0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds==null||i<1||s<1){e.__canvas=null;e.__context=null;e.__bitmap=null}else{if(e.__canvas==null){e.__canvas=window.document.createElement("canvas");e.__context=e.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasGraphics.context=e.__context;var a=e.__renderTransform;var r=e.__canvas;var n=t.pixelRatio;var _=i*n|0;var o=s*n|0;t.__setBlendModeContext(openfl__$internal_renderer_canvas_CanvasGraphics.context,10);if(t.__isDOM){if(r.width==_&&r.height==o){openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,_,o)}else{r.width=_;r.height=o;r.style.width=i+"px";r.style.height=s+"px"}var l=e.__renderTransform;openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(l.a*n,l.b*n,l.c*n,l.d*n,l.tx*n,l.ty*n)}else{if(r.width==_&&r.height==o){openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(1,0,0,1,0,0);openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,_,o)}else{r.width=i;r.height=s}openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)}openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat=false;var h=false;var c=0;var u=0;openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";var f=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var p=0;var d=e.__commands.types;while(p0){openfl__$internal_renderer_canvas_CanvasGraphics.endFill()}if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length()>0){openfl__$internal_renderer_canvas_CanvasGraphics.endStroke()}f.destroy();e.__bitmap=openfl_display_BitmapData.fromCanvas(e.__canvas)}e.__softwareDirty=false;e.set___dirty(false)}};openfl__$internal_renderer_canvas_CanvasGraphics.renderMask=function(e,t){if(e.__commands.get_length()!=0){openfl__$internal_renderer_canvas_CanvasGraphics.context=t.context;var i=0;var s=0;var a=0;var r=0;var n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _;var o;var l;var h;var c=.5522848;var u;var f;var p;var d;var g;var m;var v=0;var b=e.__commands.types;while(vthis.vertexCount){this.vertexCount=this.vertexBufferData.length;this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0)}this.vertexBuffer.uploadFromTypedArray(this.vertexBufferData)},resize:function(e,t){if(t==null){t=-1}this.elementCount=e;if(t==-1){t=this.dataPerVertex}if(t!=this.dataPerVertex){this.vertexBuffer=null;this.vertexCount=0;this.dataPerVertex=t}var i=0;var s=this.elementType;switch(s[1]){case 0:i=e*4;break;case 1:i=e*3;break;case 2:i=e*3;break}var a=i*t;if(this.vertexBufferData==null){var r;if(a!=null){r=new Float32Array(a)}else{r=null}this.vertexBufferData=r}else if(a>this.vertexBufferData.length){var n=this.vertexBufferData;var _;if(a!=null){_=new Float32Array(a)}else{_=null}this.vertexBufferData=_;this.vertexBufferData.set(n)}},__class__:openfl__$internal_renderer_context3D_Context3DBuffer};var openfl__$internal_renderer_context3D_Context3DElementType=$hxClasses["openfl._internal.renderer.context3D.Context3DElementType"]={__ename__:["openfl","_internal","renderer","context3D","Context3DElementType"],__constructs__:["QUADS","TRIANGLES","TRIANGLE_INDICES"]};openfl__$internal_renderer_context3D_Context3DElementType.QUADS=["QUADS",0];openfl__$internal_renderer_context3D_Context3DElementType.QUADS.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.QUADS.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES=["TRIANGLES",1];openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES=["TRIANGLE_INDICES",2];openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;var openfl_display_BitmapData=function(e,t,i,s){if(s==null){s=-1}if(i==null){i=true}this.transparent=i;if(e==null){e=0}else{e=e}if(t==null){t=0}else{t=t}if(e<0){e=0}else{e=e}if(t<0){t=0}else{t=t}this.width=e;this.height=t;this.rect=new openfl_geom_Rectangle(0,0,e,t);this.__textureWidth=e;this.__textureHeight=t;if(e>0&&t>0){if(i){if((s&-16777216)==0){s=0}}else{s=-16777216|s&16777215}s=s<<8|s>>>24&255;this.image=new lime_graphics_Image(null,0,0,e,t,s);this.image.set_transparent(i);this.__isValid=true;this.readable=true}this.__renderTransform=new openfl_geom_Matrix;this.__worldAlpha=1;this.__worldTransform=new openfl_geom_Matrix;this.__worldColorTransform=new openfl_geom_ColorTransform;this.__renderable=true};$hxClasses["openfl.display.BitmapData"]=openfl_display_BitmapData;openfl_display_BitmapData.__name__=["openfl","display","BitmapData"];openfl_display_BitmapData.__interfaces__=[openfl_display_IBitmapDrawable];openfl_display_BitmapData.fromBase64=function(e,t){return null};openfl_display_BitmapData.fromBytes=function(e,t){return null};openfl_display_BitmapData.fromCanvas=function(e,t){if(t==null){t=true}if(e==null){return null}var i=new openfl_display_BitmapData(0,0,t,0);i.__fromImage(lime_graphics_Image.fromCanvas(e));i.image.set_transparent(t);return i};openfl_display_BitmapData.fromFile=function(e){return null};openfl_display_BitmapData.fromImage=function(e,t){if(t==null){t=true}if(e==null||e.buffer==null){return null}var i=new openfl_display_BitmapData(0,0,t,0);i.__fromImage(e);i.image.set_transparent(t);if(i.image!=null){return i}else{return null}};openfl_display_BitmapData.fromTexture=function(e){if(e==null){return null}var t=new openfl_display_BitmapData(e.__width,e.__height,true,0);t.readable=false;t.__texture=e;t.__textureContext=e.__textureContext;t.image=null;return t};openfl_display_BitmapData.loadFromBase64=function(e,t){return lime_graphics_Image.loadFromBase64(e,t).then(function(e){return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(e))})};openfl_display_BitmapData.loadFromBytes=function(e,i){return lime_graphics_Image.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(e)).then(function(e){var t=openfl_display_BitmapData.fromImage(e);if(i!=null){t.__applyAlpha(i)}return lime_app_Future.withValue(t)})};openfl_display_BitmapData.loadFromFile=function(e){return lime_graphics_Image.loadFromFile(e).then(function(e){return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(e))})};openfl_display_BitmapData.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__framebuffer:null,__framebufferContext:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__indexBufferGrid:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__surface:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth: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,colorTransform:function(e,t){if(!this.readable){return}this.image.colorTransform(e.__toLimeRectangle(),t.__toLimeColorMatrix())},copyPixels:function(e,t,i,s,a,r){if(r==null){r=false}if(!this.readable||e==null){return}if(a!=null){openfl_display_BitmapData.__tempVector.x=a.x;openfl_display_BitmapData.__tempVector.y=a.y}this.image.copyPixels(e.image,t.__toLimeRectangle(),i.__toLimeVector2(),s!=null?s.image:null,a!=null?openfl_display_BitmapData.__tempVector:null,r)},dispose:function(){this.image=null;this.width=0;this.height=0;this.rect=null;this.__isValid=false;this.readable=false;this.__surface=null;this.__vertexBuffer=null;this.__framebuffer=null;this.__framebufferContext=null;this.__texture=null;this.__textureContext=null},draw:function(e,t,i,s,a,r){if(r==null){r=false}if(e==null){return}e.__update(false,true);var n=openfl_geom_Matrix.__pool.get();n.copyFrom(e.__renderTransform);n.invert();if(t!=null){n.concat(t)}var _=null;if(a!=null){_=openfl_geom_Matrix.__pool.get();_.copyFrom(n);_.invert()}var o=new openfl_geom_ColorTransform;o.__copyFrom(e.__worldColorTransform);o.__invert();if(!this.readable&&openfl_Lib.get_current().stage.context3D!=null){if(this.__textureContext==null){this.__textureContext=lime_app_Application.current.__window.context}if(i!=null){o.__combine(i)}var l=new openfl_display_OpenGLRenderer(openfl_Lib.get_current().stage.context3D,this);l.__allowSmoothing=r;l.__overrideBlendMode=s;l.__worldTransform=n;l.__worldAlpha=1/e.__worldAlpha;l.__worldColorTransform=o;l.__resize(this.width,this.height);if(a!=null){l.__pushMaskRect(a,_)}this.__drawGL(e,l);if(a!=null){l.__popMaskRect();openfl_geom_Matrix.__pool.release(_)}}else{if(i!=null){var h=openfl_geom_Rectangle.__pool.get();var c=openfl_geom_Matrix.__pool.get();e.__getBounds(h,c);var u=Math.ceil(h.width);var f=Math.ceil(h.height);c.tx=-h.x;c.ty=-h.y;var p=new openfl_display_BitmapData(u,f,true,0);p.draw(e,c);p.colorTransform(p.rect,i);p.__renderTransform.identity();p.__renderTransform.tx=h.x;p.__renderTransform.ty=h.y;p.__renderTransform.concat(e.__renderTransform);p.__worldAlpha=e.__worldAlpha;p.__worldColorTransform.__copyFrom(e.__worldColorTransform);e=p;openfl_geom_Rectangle.__pool.release(h);openfl_geom_Matrix.__pool.release(c)}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image);var d=new openfl_display_CanvasRenderer(this.image.buffer.__srcContext);d.__allowSmoothing=r;d.__overrideBlendMode=s;d.__worldTransform=n;d.__worldAlpha=1/e.__worldAlpha;d.__worldColorTransform=o;if(a!=null){d.__pushMaskRect(a,_)}this.__drawCanvas(e,d);if(a!=null){d.__popMaskRect();openfl_geom_Matrix.__pool.release(_)}}openfl_geom_Matrix.__pool.release(n)},fillRect:function(e,t){this.__fillRect(e,t,true)},getIndexBuffer:function(e,t){var i=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context||t!=null&&this.__indexBufferGrid==null||this.__indexBufferGrid!=null&&!this.__indexBufferGrid.equals(t)){this.__indexBufferContext=e.__context;this.__indexBuffer=null;if(t!=null){if(this.__indexBufferGrid==null){this.__indexBufferGrid=new openfl_geom_Rectangle}this.__indexBufferGrid.copyFrom(t);var s=t.width;var a=t.height;if(s!=0&&a!=0){var r=new Uint16Array(54);this.__indexBufferData=r;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=e.createIndexBuffer(54)}else if(s==0&&a!=0){var n=new Uint16Array(18);this.__indexBufferData=n;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=e.createIndexBuffer(18)}else if(s!=0&&a==0){var _=new Uint16Array(18);this.__indexBufferData=_;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=e.createIndexBuffer(18)}}else{this.__indexBufferGrid=null}if(this.__indexBuffer==null){var o=new Uint16Array(6);this.__indexBufferData=o;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=e.createIndexBuffer(6)}this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},getVertexBuffer:function(e,t,i){var s=e.gl;if(this.__vertexBuffer==null||this.__vertexBufferContext!=e.__context||t!=null&&this.__vertexBufferGrid==null||this.__vertexBufferGrid!=null&&!this.__vertexBufferGrid.equals(t)||i!=null&&(this.__vertexBufferWidth!=i.get_width()||this.__vertexBufferHeight!=i.get_height()||this.__vertexBufferScaleX!=i.get_scaleX()||this.__vertexBufferScaleY!=i.get_scaleY())){this.__uvRect=new openfl_geom_Rectangle(0,0,this.width,this.height);var a=1;var r=1;this.__vertexBufferContext=e.__context;this.__vertexBuffer=null;if(t!=null&&i!=null){if(this.__vertexBufferGrid==null){this.__vertexBufferGrid=new openfl_geom_Rectangle}this.__vertexBufferGrid.copyFrom(t);this.__vertexBufferWidth=i.get_width();this.__vertexBufferHeight=i.get_height();this.__vertexBufferScaleX=i.get_scaleX();this.__vertexBufferScaleY=i.get_scaleY();var n=t.width;var _=t.height;if(n!=0&&_!=0){var o=new Float32Array(224);this.__vertexBufferData=o;var l=t.x;var h=t.y;var c=this.width-n-l;var u=this.height-_-h;var f=l/this.width;var p=h/this.height;var d=n/this.width;var g=_/this.height;var m=c/this.width;var v=u/this.height;var b=l/i.get_scaleX();var y=h/i.get_scaleY();var x=c/i.get_scaleX();var w=u/i.get_scaleY();var k=i.get_width()/i.get_scaleX()-b-x;var P=i.get_height()/i.get_scaleY()-y-w;this.__vertexBufferData[0]=b;this.__vertexBufferData[1]=y;this.__vertexBufferData[3]=a*f;this.__vertexBufferData[4]=r*p;this.__vertexBufferData[15]=y;this.__vertexBufferData[18]=r*p;this.__vertexBufferData[28]=b;this.__vertexBufferData[31]=a*f;this.__vertexBufferData[56]=b+k;this.__vertexBufferData[57]=y;this.__vertexBufferData[59]=a*(f+d);this.__vertexBufferData[60]=r*p;this.__vertexBufferData[70]=b+k;this.__vertexBufferData[73]=a*(f+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=y;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r*p;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=a;this.__vertexBufferData[112]=b;this.__vertexBufferData[113]=y+P;this.__vertexBufferData[115]=a*f;this.__vertexBufferData[116]=r*(p+g);this.__vertexBufferData[127]=y+P;this.__vertexBufferData[130]=r*(p+g);this.__vertexBufferData[140]=b+k;this.__vertexBufferData[141]=y+P;this.__vertexBufferData[143]=a*(f+d);this.__vertexBufferData[144]=r*(p+g);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=y+P;this.__vertexBufferData[157]=a;this.__vertexBufferData[158]=r*(p+g);this.__vertexBufferData[168]=b;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=a*f;this.__vertexBufferData[172]=r;this.__vertexBufferData[183]=this.height;this.__vertexBufferData[186]=r;this.__vertexBufferData[196]=b+k;this.__vertexBufferData[197]=this.height;this.__vertexBufferData[199]=a*(f+d);this.__vertexBufferData[200]=r;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=a;this.__vertexBufferData[214]=r;this.__vertexBuffer=e.createVertexBuffer(16,14)}else if(n==0&&_!=0){var C=new Float32Array(112);this.__vertexBufferData=C;var T=t.y;var M=this.height-_-T;var S=T/this.height;var $=_/this.height;var E=M/this.height;var B=T/i.get_scaleY();var L=M/i.get_scaleY();var R=i.get_height()/i.get_scaleY()-B-L;var A=i.get_width()/i.get_scaleX();this.__vertexBufferData[0]=A;this.__vertexBufferData[1]=B;this.__vertexBufferData[3]=a;this.__vertexBufferData[4]=r*S;this.__vertexBufferData[15]=B;this.__vertexBufferData[18]=r*S;this.__vertexBufferData[28]=A;this.__vertexBufferData[31]=a;this.__vertexBufferData[56]=A;this.__vertexBufferData[57]=B+R;this.__vertexBufferData[59]=a;this.__vertexBufferData[60]=r*(S+$);this.__vertexBufferData[71]=B+R;this.__vertexBufferData[74]=r*(S+$);this.__vertexBufferData[84]=A;this.__vertexBufferData[85]=this.height;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r;this.__vertexBufferData[99]=this.height;this.__vertexBufferData[102]=r;this.__vertexBuffer=e.createVertexBuffer(8,14)}else if(_==0&&n!=0){var I=new Float32Array(112);this.__vertexBufferData=I;var D=t.x;var F=this.width-n-D;var O=D/this.width;var G=n/this.width;var j=F/this.width;var H=D/i.get_scaleX();var U=F/i.get_scaleX();var N=i.get_width()/i.get_scaleX()-H-U;var W=i.get_height()/i.get_scaleY();this.__vertexBufferData[0]=H;this.__vertexBufferData[1]=W;this.__vertexBufferData[3]=a*O;this.__vertexBufferData[4]=r;this.__vertexBufferData[15]=W;this.__vertexBufferData[18]=r;this.__vertexBufferData[28]=H;this.__vertexBufferData[31]=a*O;this.__vertexBufferData[56]=H+N;this.__vertexBufferData[57]=W;this.__vertexBufferData[59]=a*(O+G);this.__vertexBufferData[60]=r;this.__vertexBufferData[70]=H+N;this.__vertexBufferData[73]=a*(O+G);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=W;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=a;this.__vertexBuffer=e.createVertexBuffer(8,14)}}else{this.__vertexBufferGrid=null}if(this.__vertexBuffer==null){var V=new Float32Array(56);this.__vertexBufferData=V;this.__vertexBufferData[0]=this.width;this.__vertexBufferData[1]=this.height;this.__vertexBufferData[3]=a;this.__vertexBufferData[4]=r;this.__vertexBufferData[15]=this.height;this.__vertexBufferData[18]=r;this.__vertexBufferData[28]=this.width;this.__vertexBufferData[31]=a;this.__vertexBuffer=e.createVertexBuffer(3,14)}this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},getPixel32:function(e,t){if(!this.readable){return 0}return this.image.getPixel32(e,t,1)},getTexture:function(e){if(!this.__isValid){return null}if(this.__texture==null||this.__textureContext!=e.__context){this.__textureContext=e.__context;this.__texture=e.createRectangleTexture(this.width,this.height,1,false);this.__textureVersion=-1}lime__$internal_graphics_ImageCanvasUtil.sync(this.image,false);if(this.image!=null&&this.image.version>this.__textureVersion){if(this.__surface!=null){lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush(this.__surface)}var t=this.image;if(!openfl_display3D_textures_TextureBase.__supportsBGRA&&t.get_format()!=0){t=t.clone();t.set_format(0)}this.__texture.__uploadFromImage(t);this.__textureVersion=this.image.version;this.__textureWidth=t.buffer.width;this.__textureHeight=t.buffer.height}if(!this.readable&&this.image!=null){this.__surface=null;this.image=null}return this.__texture},setPixel32:function(e,t,i){if(!this.readable){return}this.image.setPixel32(e,t,i,1)},__applyAlpha:function(e){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image);lime__$internal_graphics_ImageCanvasUtil.createImageData(this.image);var t=this.image.buffer.data;var i=0;var s=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);while(i>>16&255)/255,(r>>>8&255)/255,(r&255)/255,this.transparent?(r>>>24&255)/255:1,0,0,1);if(n){a.setScissorRectangle(null)}if(_!=null){a.setRenderToTexture(_,o,l,h)}else{a.setRenderToBackBuffer()}}else if(this.readable){this.image.fillRect(e.__toLimeRectangle(),t,1)}},__fromImage:function(e){if(e!=null&&e.buffer!=null){this.image=e;this.width=e.width;this.height=e.height;this.rect=new openfl_geom_Rectangle(0,0,e.width,e.height);this.__textureWidth=this.width;this.__textureHeight=this.height;this.readable=true;this.__isValid=true}},__getBounds:function(e,t){var i=openfl_geom_Rectangle.__pool.get();this.rect.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__renderCanvas:function(e){if(!this.readable){return}if(this.image.type==lime_graphics_ImageType.DATA){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image)}var t=e.context;t.globalAlpha=1;e.setTransform(this.__renderTransform,t);t.drawImage(this.image.get_src(),0,0,this.image.width,this.image.height)},__renderDOM:function(e){},__renderGL:function(e){var t=e.__context3D;var i=t.gl;e.__setBlendMode(10);var s=e.__defaultDisplayShader;e.setShader(s);e.applyBitmapData(this,e.__upscaled);e.applyMatrix(e.__getMatrix(this.__worldTransform,1));e.applyAlpha(this.__worldAlpha);e.applyColorTransform(this.__worldColorTransform);e.updateShader();var a=this.getVertexBuffer(t);if(s.__position!=null){t.setVertexBufferAt(s.__position.index,a,0,3)}if(s.__textureCoord!=null){t.setVertexBufferAt(s.__textureCoord.index,a,3,2)}var r=this.getIndexBuffer(t);t.drawTriangles(r);e.__clearShader()},__setUVRect:function(e,t,i,s,a){var r=this.getVertexBuffer(e);if(r!=null&&(s!=this.__uvRect.width||a!=this.__uvRect.height||t!=this.__uvRect.x||i!=this.__uvRect.y)){var n=e.gl;if(this.__uvRect==null){this.__uvRect=new openfl_geom_Rectangle}this.__uvRect.setTo(t,i,s,a);var _=this.__textureWidth>0?t/this.__textureWidth:0;var o=this.__textureHeight>0?i/this.__textureHeight:0;var l=this.__textureWidth>0?s/this.__textureWidth:0;var h=this.__textureHeight>0?a/this.__textureHeight:0;this.__vertexBufferData[0]=s;this.__vertexBufferData[1]=a;this.__vertexBufferData[3]=_+l;this.__vertexBufferData[4]=o+h;this.__vertexBufferData[15]=a;this.__vertexBufferData[17]=_;this.__vertexBufferData[18]=o+h;this.__vertexBufferData[28]=s;this.__vertexBufferData[31]=_+l;this.__vertexBufferData[32]=o;this.__vertexBufferData[45]=_;this.__vertexBufferData[46]=o;this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}},__update:function(e,t){this.__updateTransforms()},__updateTransforms:function(e){if(e==null){this.__worldTransform.identity()}else{this.__worldTransform.copyFrom(e)}this.__renderTransform.copyFrom(this.__worldTransform)},__class__:openfl_display_BitmapData};var openfl_geom_Rectangle=function(e,t,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=i;this.height=s};$hxClasses["openfl.geom.Rectangle"]=openfl_geom_Rectangle;openfl_geom_Rectangle.__name__=["openfl","geom","Rectangle"];openfl_geom_Rectangle.prototype={height:null,width:null,x:null,y:null,clone:function(){return new openfl_geom_Rectangle(this.x,this.y,this.width,this.height)},contains:function(e,t){if(e>=this.x&&t>=this.y&&ee+i){n=e+i-this.get_right()}if(this.get_bottom()>t+s){_=t+s-this.get_bottom()}this.x+=a;this.y+=r;this.width+=n-a;this.height+=_-r},__expand:function(e,t,i,s){if(this.width==0&&this.height==0){this.x=e;this.y=t;this.width=i;this.height=s;return}var a=this.get_right();var r=this.get_bottom();if(this.x>e){this.x=e;this.width=a-e}if(this.y>t){this.y=t;this.height=r-t}if(as){s=n}if(_>r){r=_}n=t.a*(this.x+this.width)+t.c*(this.y+this.height);_=t.b*(this.x+this.width)+t.d*(this.y+this.height);if(ns){s=n}if(_>r){r=_}n=t.a*this.x+t.c*(this.y+this.height);_=t.b*this.x+t.d*(this.y+this.height);if(ns){s=n}if(_>r){r=_}e.setTo(i+t.tx,a+t.ty,s-i,r-a)},get_bottom:function(){return this.y+this.height},get_left:function(){return this.x},get_right:function(){return this.x+this.width},get_top:function(){return this.y},__class__:openfl_geom_Rectangle,__properties__:{get_top:"get_top",get_right:"get_right",get_left:"get_left",get_bottom:"get_bottom"}};var openfl_geom_Matrix=function(e,t,i,s,a,r){if(r==null){r=0}if(a==null){a=0}if(s==null){s=1}if(i==null){i=0}if(t==null){t=0}if(e==null){e=1}this.a=e;this.b=t;this.c=i;this.d=s;this.tx=a;this.ty=r};$hxClasses["openfl.geom.Matrix"]=openfl_geom_Matrix;openfl_geom_Matrix.__name__=["openfl","geom","Matrix"];openfl_geom_Matrix.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,clone:function(){return new openfl_geom_Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty)},concat:function(e){var t=this.a*e.a+this.b*e.c;this.b=this.a*e.b+this.b*e.d;this.a=t;var i=this.c*e.a+this.d*e.c;this.d=this.c*e.b+this.d*e.d;this.c=i;var s=this.tx*e.a+this.ty*e.c+e.tx;this.ty=this.tx*e.b+this.ty*e.d+e.ty;this.tx=s},copyFrom:function(e){this.a=e.a;this.b=e.b;this.c=e.c;this.d=e.d;this.tx=e.tx;this.ty=e.ty},createGradientBox:function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=0}if(i==null){i=0}this.a=e/1638.4;this.d=t/1638.4;if(i!=0){var r=Math.cos(i);var n=Math.sin(i);this.b=n*this.d;this.c=-n*this.a;this.a*=r;this.d*=r}else{this.b=0;this.c=0}this.tx=s+e/2;this.ty=a+t/2},equals:function(e){if(e!=null&&this.tx==e.tx&&this.ty==e.ty&&this.a==e.a&&this.b==e.b&&this.c==e.c){return this.d==e.d}else{return false}},identity:function(){this.a=1;this.b=0;this.c=0;this.d=1;this.tx=0;this.ty=0},invert:function(){var e=this.a*this.d-this.b*this.c;if(e==0){this.a=this.b=this.c=this.d=0;this.tx=-this.tx;this.ty=-this.ty}else{e=1/e;var t=this.d*e;this.d=this.a*e;this.a=t;this.b*=-e;this.c*=-e;var i=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=i}return this},rotate:function(e){var t=Math.cos(e);var i=Math.sin(e);var s=this.a*t-this.b*i;this.b=this.a*i+this.b*t;this.a=s;var a=this.c*t-this.d*i;this.d=this.c*i+this.d*t;this.c=a;var r=this.tx*t-this.ty*i;this.ty=this.tx*i+this.ty*t;this.tx=r},scale:function(e,t){this.a*=e;this.b*=t;this.c*=e;this.d*=t;this.tx*=e;this.ty*=t},setTo:function(e,t,i,s,a,r){this.a=e;this.b=t;this.c=i;this.d=s;this.tx=a;this.ty=r},transformPoint:function(e){return new openfl_geom_Point(e.x*this.a+e.y*this.c+this.tx,e.x*this.b+e.y*this.d+this.ty)},translate:function(e,t){this.tx+=e;this.ty+=t},__class__:openfl_geom_Matrix};var openfl_geom_ColorTransform=function(e,t,i,s,a,r,n,_){if(_==null){_=0}if(n==null){n=0}if(r==null){r=0}if(a==null){a=0}if(s==null){s=1}if(i==null){i=1}if(t==null){t=1}if(e==null){e=1}this.redMultiplier=e;this.greenMultiplier=t;this.blueMultiplier=i;this.alphaMultiplier=s;this.redOffset=a;this.greenOffset=r;this.blueOffset=n;this.alphaOffset=_};$hxClasses["openfl.geom.ColorTransform"]=openfl_geom_ColorTransform;openfl_geom_ColorTransform.__name__=["openfl","geom","ColorTransform"];openfl_geom_ColorTransform.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,__copyFrom:function(e){this.redMultiplier=e.redMultiplier;this.greenMultiplier=e.greenMultiplier;this.blueMultiplier=e.blueMultiplier;this.alphaMultiplier=e.alphaMultiplier;this.redOffset=e.redOffset;this.greenOffset=e.greenOffset;this.blueOffset=e.blueOffset;this.alphaOffset=e.alphaOffset},__combine:function(e){this.redMultiplier*=e.redMultiplier;this.greenMultiplier*=e.greenMultiplier;this.blueMultiplier*=e.blueMultiplier;this.alphaMultiplier*=e.alphaMultiplier;this.redOffset+=e.redOffset;this.greenOffset+=e.greenOffset;this.blueOffset+=e.blueOffset;this.alphaOffset+=e.alphaOffset},__identity:function(){this.redMultiplier=1;this.greenMultiplier=1;this.blueMultiplier=1;this.alphaMultiplier=1;this.redOffset=0;this.greenOffset=0;this.blueOffset=0;this.alphaOffset=0},__invert:function(){this.redMultiplier=1/this.redMultiplier;this.greenMultiplier=1/this.greenMultiplier;this.blueMultiplier=1/this.blueMultiplier;this.alphaMultiplier=1/this.alphaMultiplier;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},__equals:function(e,t){if(e!=null&&this.redMultiplier==e.redMultiplier&&this.greenMultiplier==e.greenMultiplier&&this.blueMultiplier==e.blueMultiplier&&(t||this.alphaMultiplier==e.alphaMultiplier)&&this.redOffset==e.redOffset&&this.greenOffset==e.greenOffset&&this.blueOffset==e.blueOffset){return this.alphaOffset==e.alphaOffset}else{return false}},__isDefault:function(e){if(e){if(this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0){return this.alphaOffset==0}else{return false}}else if(this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.alphaMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0){return this.alphaOffset==0}else{return false}},__setArrays:function(e,t){e[0]=this.redMultiplier;e[1]=this.greenMultiplier;e[2]=this.blueMultiplier;e[3]=this.alphaMultiplier;t[0]=this.redOffset;t[1]=this.greenOffset;t[2]=this.blueOffset;t[3]=this.alphaOffset},__toLimeColorMatrix:function(){if(openfl_geom_ColorTransform.__limeColorMatrix==null){var e=new Float32Array(20);openfl_geom_ColorTransform.__limeColorMatrix=e}openfl_geom_ColorTransform.__limeColorMatrix[0]=this.redMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[4]=this.redOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[6]=this.greenMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[9]=this.greenOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[12]=this.blueMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[14]=this.blueOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[18]=this.alphaMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[19]=this.alphaOffset/255;return openfl_geom_ColorTransform.__limeColorMatrix},__class__:openfl_geom_ColorTransform};var openfl__$internal_renderer_context3D_Context3DGraphics=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DGraphics"]=openfl__$internal_renderer_context3D_Context3DGraphics;openfl__$internal_renderer_context3D_Context3DGraphics.__name__=["openfl","_internal","renderer","context3D","Context3DGraphics"];openfl__$internal_renderer_context3D_Context3DGraphics.buildBuffer=function(e,t){var i=0;var s=0;var a=0;var r=0;var n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _=t.__context3D;var o=openfl_geom_Rectangle.__pool.get();var l=openfl_geom_Matrix.__pool.get();var h=null;var c=0;var u=e.__commands.types;while(c=A*6){L=true;R=true}else if(E.get_length()>=A*4){L=true}else if(E.get_length()>=A*2){R=true}}var I=4;var D=I*4;if(e.__quadBuffer==null){e.__quadBuffer=new openfl__$internal_renderer_context3D_Context3DBuffer(_,openfl__$internal_renderer_context3D_Context3DElementType.QUADS,A,I)}else{e.__quadBuffer.resize(i+A,I)}var F;var O=1;var G;var j;var H;var U;var N;var W;var V;var z;var X;var Y;var q;var J;var K;var Z;var Q;var ee;var te;var ie;var se;var ae;var re=e.__quadBuffer.vertexBufferData;H=h.width;U=h.height;var ne=h.rect;var _e=0;var oe=A;while(_e=ve*3;var we=xe?4:2;var ke=xe?3:2;var Pe=we+2;var Ce=xe?r:a;openfl__$internal_renderer_context3D_Context3DGraphics.resizeVertexBuffer(e,xe,Ce+be*Pe);var Te=xe?e.__vertexBufferDataUVT:e.__vertexBufferData;var Me;var Se;var $e;var Ee;var Be=0;var Le=be;while(Be0){e.__quadBuffer.flushVertexBufferData()}if(s>0){var Ie=e.__triangleIndexBuffer;if(Ie==null||s>e.__triangleIndexBufferCount){Ie=_.createIndexBuffer(s,0);e.__triangleIndexBuffer=Ie;e.__triangleIndexBufferCount=s}Ie.uploadFromTypedArray(e.__triangleIndexBufferData)}if(a>0){var De=e.__vertexBuffer;if(De==null||a>e.__vertexBufferCount){De=_.createVertexBuffer(a,4,0);e.__vertexBuffer=De;e.__vertexBufferCount=a}De.uploadFromTypedArray(e.__vertexBufferData)}if(r>0){var Fe=e.__vertexBufferUVT;if(Fe==null||r>e.__vertexBufferCountUVT){Fe=_.createVertexBuffer(r,6,0);e.__vertexBufferUVT=Fe;e.__vertexBufferCountUVT=r}Fe.uploadFromTypedArray(e.__vertexBufferDataUVT)}openfl_geom_Rectangle.__pool.release(o);openfl_geom_Matrix.__pool.release(l)};openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible=function(e){if(e.__owner.__worldScale9Grid!=null){return false}var t=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var i=false;var s=false;var a=false;var r=0;var n=e.__commands.types;while(r=1&&r>=1){if(e.__hardwareDirty||e.__quadBuffer==null&&e.__vertexBuffer==null&&e.__vertexBufferUVT==null){openfl__$internal_renderer_context3D_Context3DGraphics.buildBuffer(e,t)}var n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _=t.__context3D;var o=_.gl;var l=openfl_geom_Matrix.__pool.get();var h=null;var c=null;var u=false;var f=false;var p=null;var d=0;var g=0;var m=0;var v=0;var b=0;var y=0;var x=0;var w=0;var k=e.__commands.types;while(w>>16&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.greenOffset=ee>>>8&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.blueOffset=ee&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.__combine(e.__owner.__worldColorTransform);l.identity();l.scale(Z,Q);l.tx=J;l.ty=K;l.concat(e.__owner.__renderTransform);var te=openfl__$internal_renderer_context3D_Context3DGraphics.maskRender?t.__maskShader:t.__initGraphicsShader(null);t.setShader(te);t.applyMatrix(t.__getMatrix(l,1));t.applyBitmapData(openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData,true,u);t.applyAlpha((ee>>>24&255)/255*e.__owner.__worldAlpha);t.applyColorTransform(openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform);t.updateShader();var ie=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getVertexBuffer(_);if(te.__position!=null){_.setVertexBufferAt(te.__position.index,ie,0,3)}if(te.__textureCoord!=null){_.setVertexBufferAt(te.__textureCoord.index,ie,3,2)}var se=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getIndexBuffer(_);_.drawTriangles(se);v+=4;t.__clearShader()}break;case 12:var ae=n.prev;switch(ae[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var re=n;var ne=re;var _e=ne.buffer.o[ne.oPos];var oe=ne.buffer.o[ne.oPos+1];var le=ne.buffer.o[ne.oPos+2];var he=ne.buffer.o[ne.oPos+3];var ce=oe!=null;var ue=Math.floor(_e.get_length()/2);var fe=ce?oe.get_length():ue;var pe=le!=null;var de=pe&&le.get_length()>=ue*3;var ge=de?4:2;var me=de?3:2;var ve=ge+2;var be=de?e.__vertexBufferUVT:e.__vertexBuffer;var ye=de?x:y;var xe=t.__getMatrix(e.__owner.__renderTransform,1);var we;if(h!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){we=t.__initShaderBuffer(h);t.__setShaderBuffer(h);t.applyMatrix(xe);t.applyBitmapData(c,false,u);t.applyAlpha(1);t.applyColorTransform(null);t.__updateShaderBuffer(v)}else{if(openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){we=t.__maskShader}else{we=t.__initGraphicsShader(null)}t.setShader(we);t.applyMatrix(xe);t.applyBitmapData(c,f,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform);t.updateShader()}if(we.__position!=null){_.setVertexBufferAt(we.__position.index,be,ye,de?4:2)}if(we.__textureCoord!=null){_.setVertexBufferAt(we.__textureCoord.index,be,ye+ge,2)}switch(he){case 0:_.setCulling(0);break;case 2:_.setCulling(1);break;default:}_.__drawTriangles(0,fe);v+=fe;if(de){x+=ve*fe}else{y+=ve*fe}if(he!=1){_.setCulling(0)}t.__clearShader();break;case 13:c=null;p=null;h=null;var ke=n.prev;switch(ke[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=P;break;case 18:var Pe=n.prev;switch(Pe[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Ce=n;var Te=Ce;d=Te.buffer.f[Te.fPos];g=Te.buffer.f[Te.fPos+1];break;case 19:var Me=n.prev;switch(Me[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE;var Se=n;var $e=Se;t.__setBlendMode($e.buffer.o[$e.oPos]);break;default:var Ee=n.prev;switch(Ee[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=P}}openfl_geom_Matrix.__pool.release(l)}e.__hardwareDirty=false;e.set___dirty(false)}};openfl__$internal_renderer_context3D_Context3DGraphics.renderMask=function(e,t){openfl__$internal_renderer_context3D_Context3DGraphics.maskRender=true;openfl__$internal_renderer_context3D_Context3DGraphics.render(e,t);openfl__$internal_renderer_context3D_Context3DGraphics.maskRender=false};openfl__$internal_renderer_context3D_Context3DGraphics.resizeVertexBuffer=function(e,t,i){var s=t?e.__vertexBufferDataUVT:e.__vertexBufferData;var a=null;if(s==null){var r;if(i!=null){r=new Float32Array(i)}else{r=null}a=r}else if(i>s.length){var n;if(i!=null){n=new Float32Array(i)}else{n=null}a=n;a.set(s)}if(a!=null){if(t){e.__vertexBufferDataUVT=a}else{e.__vertexBufferData=a}}};var openfl_display_Shader=function(e){this.byteCode=e;this.precisionHint=1;this.__glSourceDirty=true;this.__numPasses=1;this.__data=openfl_display__$ShaderData_ShaderData_$Impl_$._new(e)};$hxClasses["openfl.display.Shader"]=openfl_display_Shader;openfl_display_Shader.__name__=["openfl","display","Shader"];openfl_display_Shader.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(){var e=0;var t=this.__paramBool;while(e-1&&StringTools.startsWith(o.name,"openfl_")){i.bindAttribLocation(r,0,o.name);break}}i.attachShader(r,s);i.attachShader(r,a);i.linkProgram(r);if(i.getProgramParameter(r,i.LINK_STATUS)==0){var l="Unable to initialize the shader program";l+="\n"+i.getProgramInfoLog(r);lime_utils_Log.error(l,{fileName:"Shader.hx",lineNumber:356,className:"openfl.display.Shader",methodName:"__createGLProgram"})}return r},__disable:function(){if(this.program!=null){this.__disableGL()}},__disableGL:function(){var e=this.__context.gl;var t=0;var i=0;var s=this.__inputBitmapData;while(i0){t.enable(t.TEXTURE_2D)}},__init:function(){if(this.__data==null){this.__data=openfl_display__$ShaderData_ShaderData_$Impl_$._new(null)}if(this.__glFragmentSource!=null&&this.__glVertexSource!=null&&(this.program==null||this.__glSourceDirty)){this.__initGL()}},__initGL:function(){if(this.__glSourceDirty||this.__paramBool==null){this.__glSourceDirty=false;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(this.__context!=null&&this.program==null){var e=this.__context.gl;var t="#ifdef GL_ES\n\t\t\t\t"+(this.precisionHint==1?"#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\t\tprecision highp float;\n\t\t\t\t#else\n\t\t\t\tprecision mediump float;\n\t\t\t\t#endif":"precision lowp float;")+"\n\t\t\t\t#endif\n\t\t\t\t";var i=t+this.get_glVertexSource();var s=t+this.get_glFragmentSource();var a=i+s;var r=this.__context.__programs;if(__map_reserved[a]!=null?r.existsReserved(a):r.h.hasOwnProperty(a)){var n=this.__context.__programs;this.program=__map_reserved[a]!=null?n.getReserved(a):n.h[a]}else{this.program=this.__context.createProgram(1);this.program.__glProgram=this.__createGLProgram(i,s);var _=this.program;var o=this.__context.__programs;if(__map_reserved[a]!=null){o.setReserved(a,_)}else{o.h[a]=_}}if(this.program!=null){this.glProgram=this.program.__glProgram;var l=0;var h=this.__inputBitmapData;while(l0){var d=c*c;var g;if(d!=null){g=new Float32Array(d)}else{g=null}p.__uniformMatrix=g}p.__isFloat=true;p.__isUniform=_;p.__length=h;this.__paramFloat.push(p);if(StringTools.startsWith(r,"openfl_")){switch(r){case"openfl_Alpha":this.__alpha=p;break;case"openfl_ColorMultiplier":this.__colorMultiplier=p;break;case"openfl_ColorOffset":this.__colorOffset=p;break;case"openfl_Matrix":this.__matrix=p;break;case"openfl_Position":this.__position=p;break;case"openfl_TextureCoord":this.__textureCoord=p;break;case"openfl_TextureSize":this.__textureSize=p;break;default:}}this.__data[r]=p;if(this.__isGenerated){this[r]=p}}}s=a.matchedPos();i=s.pos+s.len}},__update:function(){if(this.program!=null){this.__updateGL()}},__updateFromBuffer:function(e,t){if(this.program!=null){this.__updateGLFromBuffer(e,t)}},__updateGL:function(){var e=0;var t=0;var i=this.__inputBitmapData;while(t0){if(e.paramDataBuffer==null){e.paramDataBuffer=c.createBuffer()}this.__context.__bindGLArrayBuffer(e.paramDataBuffer);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(c,c.ARRAY_BUFFER,e.paramData,c.DYNAMIC_DRAW)}else{this.__context.__bindGLArrayBuffer(null)}var u=0;var f=0;var p=0;var d=e.paramBoolCount;var g=e.paramFloatCount;var m=e.paramData;var v;var b;var y;var x;var w=null;var k=null;var P=null;var C=0;var T=e.paramCount;while(Ce.get_scrollV()+a.bottomScrollV-2){break}var P="#"+StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(k.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,k.startIndex,k.endIndex),k.offsetX+d-r.x,k.offsetY+k.ascent+g-r.y);if(e.__caretIndex>-1&&a.selectable){if(e.__selectionIndex==e.__caretIndex){if(e.__showCursor&&k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex){y=0;var C=0;var T=e.__caretIndex-k.startIndex;while(C=e.__caretIndex||k.startIndex<=e.__selectionIndex&&k.endIndex>=e.__selectionIndex||k.startIndex>e.__caretIndex&&k.endIndexe.__selectionIndex&&k.endIndexR){R=k.startIndex}if(k.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)){D=e.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)-1);D.x+=D.width+2}else{D=e.getCharBoundaries(A)}if(I!=null&&D!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(I.x+d,I.y+g,D.x-I.x,k.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,R,A),d+I.x,k.offsetY+k.ascent+g)}}}if(k.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var F=k.offsetX+d-r.x;var O=Math.floor(k.offsetY+g+k.ascent-r.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(F,O);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(F+k.width,O);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(a.border||a.background){if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,r.width,r.height)}if(a.background){var G=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var j=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+j;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(e.__caretIndex>-1&&a.selectable&&e.__showCursor){var H=-e.get_scrollH();var U=0;var N=0;var W=e.get_scrollV()-1;while(Ne.get_scrollV()+a.bottomScrollV-2){break}var P="#"+StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(k.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,k.startIndex,k.endIndex),k.offsetX+d-r.x,k.offsetY+k.ascent+g-r.y);if(e.__caretIndex>-1&&a.selectable){if(e.__selectionIndex==e.__caretIndex){if(e.__showCursor&&k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex){y=0;var C=0;var T=e.__caretIndex-k.startIndex;while(C=e.__caretIndex||k.startIndex<=e.__selectionIndex&&k.endIndex>=e.__selectionIndex||k.startIndex>e.__caretIndex&&k.endIndexe.__selectionIndex&&k.endIndexR){R=k.startIndex}if(k.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)){D=e.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)-1);D.x+=D.width+2}else{D=e.getCharBoundaries(A)}if(I!=null&&D!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(I.x+d,I.y+g,D.x-I.x,k.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,R,A),d+I.x,k.offsetY+k.ascent+g)}}}if(k.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var F=k.offsetX+d-r.x;var O=Math.floor(k.offsetY+g+k.ascent-r.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(F,O);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(F+k.width,O);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(a.border||a.background){if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,r.width,r.height)}if(a.background){var G=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var j=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+j;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(e.__caretIndex>-1&&a.selectable&&e.__showCursor){var H=-e.get_scrollH();var U=0;var N=0;var W=e.get_scrollV()-1;while(N>24&255)/255);break;case 3:var y=v[5];var x=v[4];var w=v[3];var k=v[2];i.curveTo(k*o+n,w*o+_,x*o+n,y*o+_);break;case 4:i.endFill();break;case 5:var P=v[9];var C=v[8];var T=v[7];var M=v[6];var S=v[5];var $=v[4];var E=v[3];var B=v[2];if(B!=null){i.lineStyle(B,E,$,S,M,T,C,P)}else{i.lineStyle()}break;case 6:var L=v[3];var R=v[2];i.lineTo(R*o+n,L*o+_);break;case 7:var A=v[3];var I=v[2];i.moveTo(I*o+n,A*o+_);break;default:}}n+=u.advances[d]*.05}}}}t.text=s;this.records=null;this.rendered=new openfl_text_StaticText;this.rendered.text=s;this.rendered.__graphics.copyFrom(t.__graphics);return t},__class__:openfl__$internal_symbols_StaticTextSymbol});var openfl__$internal_symbols_StaticTextRecord=function(){};$hxClasses["openfl._internal.symbols.StaticTextRecord"]=openfl__$internal_symbols_StaticTextRecord;openfl__$internal_symbols_StaticTextRecord.__name__=["openfl","_internal","symbols","StaticTextRecord"];openfl__$internal_symbols_StaticTextRecord.prototype={advances:null,color:null,fontHeight:null,fontID:null,glyphs:null,offsetX:null,offsetY:null,__class__:openfl__$internal_symbols_StaticTextRecord};var openfl__$internal_symbols_timeline_Frame=function(){};$hxClasses["openfl._internal.symbols.timeline.Frame"]=openfl__$internal_symbols_timeline_Frame;openfl__$internal_symbols_timeline_Frame.__name__=["openfl","_internal","symbols","timeline","Frame"];openfl__$internal_symbols_timeline_Frame.prototype={label:null,objects:null,script:null,scriptSource:null,__class__:openfl__$internal_symbols_timeline_Frame};var openfl__$internal_symbols_timeline_FrameObject=function(){};$hxClasses["openfl._internal.symbols.timeline.FrameObject"]=openfl__$internal_symbols_timeline_FrameObject;openfl__$internal_symbols_timeline_FrameObject.__name__=["openfl","_internal","symbols","timeline","FrameObject"];openfl__$internal_symbols_timeline_FrameObject.prototype={blendMode:null,cacheAsBitmap:null,clipDepth:null,colorTransform:null,depth:null,filters:null,id:null,matrix:null,name:null,symbol:null,type:null,visible:null,__class__:openfl__$internal_symbols_timeline_FrameObject};var openfl__$internal_symbols_timeline_FrameObjectType=$hxClasses["openfl._internal.symbols.timeline.FrameObjectType"]={__ename__:["openfl","_internal","symbols","timeline","FrameObjectType"],__constructs__:["CREATE","UPDATE","DESTROY"]};openfl__$internal_symbols_timeline_FrameObjectType.CREATE=["CREATE",0];openfl__$internal_symbols_timeline_FrameObjectType.CREATE.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.CREATE.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;openfl__$internal_symbols_timeline_FrameObjectType.UPDATE=["UPDATE",1];openfl__$internal_symbols_timeline_FrameObjectType.UPDATE.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.UPDATE.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;openfl__$internal_symbols_timeline_FrameObjectType.DESTROY=["DESTROY",2];openfl__$internal_symbols_timeline_FrameObjectType.DESTROY.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.DESTROY.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;var openfl__$internal_text_TextEngine=function(e){this.textField=e;this.width=100;this.height=100;this.set_text("");this.bounds=new openfl_geom_Rectangle(0,0,0,0);this.textBounds=new openfl_geom_Rectangle(0,0,0,0);this.type=0;this.autoSize=2;this.embedFonts=false;this.selectable=true;this.borderColor=0;this.border=false;this.backgroundColor=16777215;this.background=false;this.gridFitType=1;this.maxChars=0;this.multiline=false;this.sharpness=0;this.scrollH=0;this.scrollV=1;this.wordWrap=false;this.lineAscents=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineBreaks=openfl__$Vector_Vector_$Impl_$.toIntVector(null);this.lineDescents=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineLeadings=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineHeights=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineWidths=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.layoutGroups=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);this.textFormatRanges=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);openfl__$internal_text_TextEngine.__canvas=window.document.createElement("canvas");openfl__$internal_text_TextEngine.__context=openfl__$internal_text_TextEngine.__canvas.getContext("2d")};$hxClasses["openfl._internal.text.TextEngine"]=openfl__$internal_text_TextEngine;openfl__$internal_text_TextEngine.__name__=["openfl","_internal","text","TextEngine"];openfl__$internal_text_TextEngine.findFont=function(e){var t=openfl_text_Font.__fontByName;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}};openfl__$internal_text_TextEngine.findFontVariant=function(e){var t=e.font;var i=e.bold;var s=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(i&&s){var n=openfl_text_Font.__fontByName;var _=a+" Bold Italic";if(__map_reserved[_]!=null){r=n.existsReserved(_)}else{r=n.h.hasOwnProperty(_)}}else{r=false}if(r){return openfl__$internal_text_TextEngine.findFont(a+" Bold Italic")}else{var o;if(i){var l=openfl_text_Font.__fontByName;var h=a+" Bold";if(__map_reserved[h]!=null){o=l.existsReserved(h)}else{o=l.h.hasOwnProperty(h)}}else{o=false}if(o){return openfl__$internal_text_TextEngine.findFont(a+" Bold")}else{var c;if(s){var u=openfl_text_Font.__fontByName;var f=a+" Italic";if(__map_reserved[f]!=null){c=u.existsReserved(f)}else{c=u.h.hasOwnProperty(f)}}else{c=false}if(c){return openfl__$internal_text_TextEngine.findFont(a+" Italic")}}}return openfl__$internal_text_TextEngine.findFont(t)};openfl__$internal_text_TextEngine.getFormatHeight=function(e){var t;var i;var s;openfl__$internal_text_TextEngine.__context.font=openfl__$internal_text_TextEngine.getFont(e);var a=openfl__$internal_text_TextEngine.getFontInstance(e);if(e.__ascent!=null){t=e.size*e.__ascent;i=e.size*e.__descent}else if(a!=null&&a.unitsPerEM!=0){t=a.ascender/a.unitsPerEM*e.size;i=Math.abs(a.descender/a.unitsPerEM*e.size)}else{t=e.size;i=e.size*.185}s=e.leading;return t+i+s};openfl__$internal_text_TextEngine.getFont=function(e){var t=e.font;var i=e.bold;var s=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(i&&s){var n=openfl_text_Font.__fontByName;var _=a+" Bold Italic";if(__map_reserved[_]!=null){r=n.existsReserved(_)}else{r=n.h.hasOwnProperty(_)}}else{r=false}if(r){t=a+" Bold Italic";i=false;s=false}else{var o;if(i){var l=openfl_text_Font.__fontByName;var h=a+" Bold";if(__map_reserved[h]!=null){o=l.existsReserved(h)}else{o=l.h.hasOwnProperty(h)}}else{o=false}if(o){t=a+" Bold";i=false}else{var c;if(s){var u=openfl_text_Font.__fontByName;var f=a+" Italic";if(__map_reserved[f]!=null){c=u.existsReserved(f)}else{c=u.h.hasOwnProperty(f)}}else{c=false}if(c){t=a+" Italic";s=false}else{if(i&&(t.indexOf(" Bold ")>-1||StringTools.endsWith(t," Bold"))){i=false}if(s&&(t.indexOf(" Italic ")>-1||StringTools.endsWith(t," Italic"))){s=false}}}}var p=s?"italic ":"normal ";p+="normal ";p+=i?"bold ":"normal ";p+=e.size+"px";p+="/"+(e.leading+e.size+3)+"px ";var d;switch(t){case"_sans":d="sans-serif";break;case"_serif":d="serif";break;case"_typewriter":d="monospace";break;default:var g=new RegExp("^[\\s'\"]+(.*)[\\s'\"]+$","".split("u").join(""));d="'"+t.replace(g,"$1")+"'"}p+=""+d;return p};openfl__$internal_text_TextEngine.getFontInstance=function(e){return openfl__$internal_text_TextEngine.findFontVariant(e)};openfl__$internal_text_TextEngine.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds: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,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,__hasFocus:null,__restrictRegexp:null,__useIntAdvances:null,getBounds:function(){var e=this.border?1:0;this.bounds.width=this.width+e;this.bounds.height=this.height+e;var t=this.width;var i=this.width;var s=0;var a=this.layoutGroups;while(s=this.width){t=2}if(i>=this.height){i=2}var n=this.textHeight*1.185;this.textBounds.setTo(Math.max(t-2,0),Math.max(i-2,0),Math.min(this.textWidth+4,this.bounds.width+4),Math.min(n+4,this.bounds.height+4))},getLineBreakIndex:function(e){if(e==null){e=0}var t=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\n",e);var i=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\r",e);if(t==-1){return i}if(i==-1){return t}if(tthis.numLines-1){this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(i!=null?i:0);this.lineHeights.push(s);this.lineWidths.push(a);e=0;t=0;i=null;s=0;a=0;this.numLines++;if(this.textHeight<=this.height-2){this.bottomScrollV++}}e=Math.max(e,o.ascent);t=Math.max(t,o.descent);if(i==null){i=o.leading}else{i=Math.max(i,o.leading)|0}s=Math.max(s,o.height);a=o.offsetX-2+o.width;if(a>this.textWidth){this.textWidth=a}r=o.offsetY-2+o.ascent+o.descent;if(r>this.textHeight){this.textHeight=r}}if(this.textHeight==0&&this.textField!=null&&this.textField.get_type()==1){var l=this.textField.__textFormat;var h;var c;var u;var f;var p=openfl__$internal_text_TextEngine.getFontInstance(l);if(l.__ascent!=null){h=l.size*l.__ascent;c=l.size*l.__descent}else if(p!=null&&p.unitsPerEM!=0){h=p.ascender/p.unitsPerEM*l.size;c=Math.abs(p.descender/p.unitsPerEM*l.size)}else{h=l.size;c=l.size*.185}u=l.leading;f=h+c+u;e=h;t=c;i=u;r=h+c;this.textHeight=r}this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(i!=null?i:0);this.lineHeights.push(s);this.lineWidths.push(a);if(this.numLines==1){this.bottomScrollV=1;if(i>0){this.textHeight+=i}}else if(this.textHeight<=this.height-2){this.bottomScrollV++}if(this.autoSize!=2){var d=this.autoSize;switch(d){case 0:case 1:case 3:if(!this.wordWrap){this.width=this.textWidth+4}this.height=this.textHeight+4;this.bottomScrollV=this.numLines;break;default:}}if(this.textWidth>this.width-4){this.maxScrollH=this.textWidth-this.width+4|0}else{this.maxScrollH=0}this.maxScrollV=this.numLines-this.bottomScrollV+1;if(this.scrollV>this.maxScrollV){this.scrollV=this.maxScrollV}if(this.scrollH>this.maxScrollH){this.scrollH=this.maxScrollH}},getLayoutGroups:function(){var m=this;this.layoutGroups.set_length(0);if(this.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(this.text,"")){return}var n=-1;var v=null;var t=null;var i=openfl_text_TextField.__defaultTextFormat.clone();var s=0;var a=0;var r=0;var _=0;var o=null;var l=null;var h=0;var c=0;var u=0;var e=-2;var f=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text," ");var p=this.getLineBreakIndex();var d=2;var g=2;var b=0;var y=0;var x=null;var w=function(e,t,i){var s=[];var a=0;if(v.format.letterSpacing!=null){a=v.format.letterSpacing}if(m.__useIntAdvances==null){var r=new EReg("Trident/7.0","");m.__useIntAdvances=r.match(window.navigator.userAgent)}if(m.__useIntAdvances){var n=0;var _;var o=t;var l=i;while(ou){u=c}if(a>r){r=a}};var M=function(){var e=m.textFormatRanges.get_length()-1;if(n-1){var t=m.layoutGroups.get(e);if(t.lineIndexy){continue}t.ascent=r;t.height=u}g+=u;r=0;u=0;y+=1;d=2};var B=function(e){var t=l;var i;var s;var a;var r;var n;var _=k(t);while(d+_>m.width-2){s=0;i=s;r=0;while(d+rm.width-2){if(b+i-s==e){break}}else{while(d+r>m.width-2){--i;if(i-s>0){S(b,b+i-s);r=h}else{i=1;s=0;S(b,b+1);r=0}}}a=b+i-s;$(a);E();S(a,e);t=l;_=h}};var L=function(e){if(m.width>=4&&m.wordWrap){B(e)}$(e)};M();T();x=v.format;var R;var A=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)+1;while(b-1&&(f==-1||p=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)-1){g-=u}E();b=p+1;p=this.getLineBreakIndex(b)}else if(f>-1){if(o!=null&&o.startIndex!=o.endIndex){o=null}R=false;while(true){var I=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);if(b>=I){break}var D=-1;if(f==-1){D=p}else{D=f+1;if(p>-1&&p0&&b==e){b+=1;var F=l.shift();h-=F;d+=F}if(l.length>0&&D==f+1){--D;var O=l.pop();h-=O}}if(this.wordWrap){if(d+h>this.width-2){R=true;if(l.length>0&&D==f+1){var G=l[l.length-1];var j=G;if(d+h-j<=this.width-2){R=false}}}}if(R){if(x.align!=2&&(o!=null||this.layoutGroups.get_length()>0)){var H=o;if(H==null){H=this.layoutGroups.get(this.layoutGroups.get_length()-1)}H.width-=H.positions[H.positions.length-1];H.endIndex--}var U=this.layoutGroups.get_length()-1;var N=0;while(true){o=this.layoutGroups.get(U);if(U>0&&o.startIndex>e){++N}else{break}--U}if(b==e+1){E()}d=2;if(N>0){var W=this.layoutGroups.get(this.layoutGroups.get_length()-N).offsetX;var V=this.layoutGroups.get_length()-N;var z=this.layoutGroups.get_length();while(V-1&&p<=b&&(f>p||f==-1))){var K=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);J=b>K}else{J=true}if(J){break}}}else{var Z=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);if(b1){s=this.layoutGroups.get(o+a-1);var f=lime_text__$UTF8String_UTF8String_$Impl_$.charCodeAt(this.text,s.endIndex);if(s.endIndex0){s.offsetX+=t}}if(r){this.getLineMeasurements()}},update:function(){if(this.text==null||this.textFormatRanges.get_length()==0){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.textWidth=0;this.textHeight=0;this.numLines=1;this.maxScrollH=0;this.maxScrollV=1;this.bottomScrollV=1}else{this.getLayoutGroups();this.getLineMeasurements();this.setTextAlignment()}this.getBounds()},set_text:function(e){return this.text=e},__class__:openfl__$internal_text_TextEngine,__properties__:{set_text:"set_text"}};var openfl__$internal_text_TextFormatRange=function(e,t,i){this.format=e;this.start=t;this.end=i};$hxClasses["openfl._internal.text.TextFormatRange"]=openfl__$internal_text_TextFormatRange;openfl__$internal_text_TextFormatRange.__name__=["openfl","_internal","text","TextFormatRange"];openfl__$internal_text_TextFormatRange.prototype={end:null,format:null,start:null,__class__:openfl__$internal_text_TextFormatRange};var openfl__$internal_text_TextLayoutGroup=function(e,t,i){this.format=e;this.startIndex=t;this.endIndex=i};$hxClasses["openfl._internal.text.TextLayoutGroup"]=openfl__$internal_text_TextLayoutGroup;openfl__$internal_text_TextLayoutGroup.__name__=["openfl","_internal","text","TextLayoutGroup"];openfl__$internal_text_TextLayoutGroup.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,__class__:openfl__$internal_text_TextLayoutGroup};var openfl__$internal_utils_TouchData=function(){this.rollOutStack=[]};$hxClasses["openfl._internal.utils.TouchData"]=openfl__$internal_utils_TouchData;openfl__$internal_utils_TouchData.__name__=["openfl","_internal","utils","TouchData"];openfl__$internal_utils_TouchData.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touch=null;this.touchDownTarget=null;this.touchOverTarget=null;this.rollOutStack.splice(0,this.rollOutStack.length)},__class__:openfl__$internal_utils_TouchData};var openfl_display_Application=function(){lime_app_Application.call(this);if(openfl__$internal_Lib.application==null){openfl__$internal_Lib.application=this}if(openfl__$internal_Lib.current==null){openfl__$internal_Lib.current=new openfl_display_MovieClip}openfl__$internal_Lib.current.__loaderInfo=openfl_display_LoaderInfo.create(null);openfl__$internal_Lib.current.__loaderInfo.content=openfl__$internal_Lib.current};$hxClasses["openfl.display.Application"]=openfl_display_Application;openfl_display_Application.__name__=["openfl","display","Application"];openfl_display_Application.__super__=lime_app_Application;openfl_display_Application.prototype=$extend(lime_app_Application.prototype,{createWindow:function(e){var t=new openfl_display_Window(this,e);this.__windows.push(t);this.__windowByID.h[t.id]=t;var i=$bind(this,this.__onWindowClose);var s=t;var a=function(){i(s)};t.onClose.add(a,false,-1e4);if(this.__window==null){this.__window=t;t.onActivate.add($bind(this,this.onWindowActivate));t.onRenderContextLost.add($bind(this,this.onRenderContextLost));t.onRenderContextRestored.add($bind(this,this.onRenderContextRestored));t.onDeactivate.add($bind(this,this.onWindowDeactivate));t.onDropFile.add($bind(this,this.onWindowDropFile));t.onEnter.add($bind(this,this.onWindowEnter));t.onExpose.add($bind(this,this.onWindowExpose));t.onFocusIn.add($bind(this,this.onWindowFocusIn));t.onFocusOut.add($bind(this,this.onWindowFocusOut));t.onFullscreen.add($bind(this,this.onWindowFullscreen));t.onKeyDown.add($bind(this,this.onKeyDown));t.onKeyUp.add($bind(this,this.onKeyUp));t.onLeave.add($bind(this,this.onWindowLeave));t.onMinimize.add($bind(this,this.onWindowMinimize));t.onMouseDown.add($bind(this,this.onMouseDown));t.onMouseMove.add($bind(this,this.onMouseMove));t.onMouseMoveRelative.add($bind(this,this.onMouseMoveRelative));t.onMouseUp.add($bind(this,this.onMouseUp));t.onMouseWheel.add($bind(this,this.onMouseWheel));t.onMove.add($bind(this,this.onWindowMove));t.onRender.add($bind(this,this.render));t.onResize.add($bind(this,this.onWindowResize));t.onRestore.add($bind(this,this.onWindowRestore));t.onTextEdit.add($bind(this,this.onTextEdit));t.onTextInput.add($bind(this,this.onTextInput));this.onWindowCreate()}this.onCreateWindow.dispatch(t);return t},__class__:openfl_display_Application});var openfl_display_Bitmap=function(e,t,i){if(i==null){i=false}openfl_display_DisplayObject.call(this);this.__bitmapData=e;this.pixelSnapping=t;this.smoothing=i;if(t==null){this.pixelSnapping=1}};$hxClasses["openfl.display.Bitmap"]=openfl_display_Bitmap;openfl_display_Bitmap.__name__=["openfl","display","Bitmap"];openfl_display_Bitmap.__super__=openfl_display_DisplayObject;openfl_display_Bitmap.prototype=$extend(openfl_display_DisplayObject.prototype,{pixelSnapping:null,smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,__enterFrame:function(e){if(this.__bitmapData!=null&&this.__bitmapData.image!=null&&this.__bitmapData.image.version!=this.__imageVersion){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__getBounds:function(e,t){if(this.__bitmapData!=null){var i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height);i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)}},__hitTest:function(e,t,i,s,a,r){if(!r.get_visible()||this.__isMask||this.__bitmapData==null){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}this.__getRenderTransform();var n=this.__renderTransform;var _=n.a*n.d-n.b*n.c;var o=_==0?-n.tx:1/_*(n.c*(n.ty-t)+n.d*(e-n.tx));var l=this.__renderTransform;var h=l.a*l.d-l.b*l.c;var c=h==0?-l.ty:1/h*(l.a*(t-l.ty)+l.b*(l.tx-e));if(o>0&&c>0&&o<=this.__bitmapData.width&&c<=this.__bitmapData.height){if(this.__scrollRect!=null&&!this.__scrollRect.contains(o,c)){return false}if(s!=null&&!a){s.push(r)}return true}return false},__hitTestMask:function(e,t){if(this.__bitmapData==null){return false}this.__getRenderTransform();var i=this.__renderTransform;var s=i.a*i.d-i.b*i.c;var a=s==0?-i.tx:1/s*(i.c*(i.ty-t)+i.d*(e-i.tx));var r=this.__renderTransform;var n=r.a*r.d-r.b*r.c;var _=n==0?-r.ty:1/n*(r.a*(t-r.ty)+r.b*(r.tx-e));if(a>0&&_>0&&a<=this.__bitmapData.width&&_<=this.__bitmapData.height){return true}return false},__renderCanvas:function(e){this.__updateCacheBitmap(e,false);if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!!this.__renderable){var r=e.__getAlpha(this.__worldAlpha);if(!(r<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var n=e.context;e.setTransform(this.__renderTransform,n);var _=this.opaqueBackground;n.fillStyle="rgb("+(_>>>16&255)+","+(_>>>8&255)+","+(_&255)+")";n.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var o=e.__getAlpha(this.__worldAlpha);if(!(o<=0)){var l=this.__graphics;if(l!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(l,e);var h=l.__width;var c=l.__height;var u=l.__canvas;if(u!=null&&l.__visible&&h>=1&&c>=1){var f=l.__worldTransform;var p=e.context;var d=this.__scrollRect;var g=this.__worldScale9Grid;if(d==null||d.width>0&&d.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);p.globalAlpha=o;if(g!=null&&f.b==0&&f.c==0){p.setTransform(1,0,0,1,f.tx,f.ty);var m=l.__bounds;var v=l.__renderTransform.a;var b=l.__renderTransform.d;var y=f.a;var x=f.d;var w=Math.round(g.x*v);var k=Math.round(g.y*b);var P=Math.round((m.get_right()-g.get_right())*v);var C=Math.round((m.get_bottom()-g.get_bottom())*b);var T=Math.round(g.width*v);var M=Math.round(g.height*b);var S=Math.round(g.x*y);var $=Math.round(g.y*x);var E=Math.round((m.get_right()-g.get_right())*y);var B=Math.round((m.get_bottom()-g.get_bottom())*x);var L=Math.round(h*y)-S-E;var R=Math.round(c*x)-$-B;e.applySmoothing(p,false);if(T!=0&&M!=0){p.drawImage(u,0,0,w,k,0,0,S,$);p.drawImage(u,w,0,T,k,S,0,L,$);p.drawImage(u,w+T,0,P,k,S+L,0,E,$);p.drawImage(u,0,k,w,M,0,$,S,R);p.drawImage(u,w,k,T,M,S,$,L,R);p.drawImage(u,w+T,k,P,M,S+L,$,E,R);p.drawImage(u,0,k+M,w,C,0,$+R,S,B);p.drawImage(u,w,k+M,T,C,S,$+R,L,B);p.drawImage(u,w+T,k+M,P,C,S+L,$+R,E,B)}else if(T==0&&M!=0){var A=S+L+E;p.drawImage(u,0,0,h,k,0,0,A,$);p.drawImage(u,0,k,h,M,0,$,A,R);p.drawImage(u,0,k+M,h,C,0,$+R,A,B)}else if(M==0&&T!=0){var I=$+R+B;p.drawImage(u,0,0,w,c,0,0,S,I);p.drawImage(u,w,0,T,c,S,0,L,I);p.drawImage(u,w+T,0,P,c,S+L,0,E,I)}}else{e.setTransform(f,p);if(e.__isDOM){var D=1/e.pixelRatio;p.scale(D,D)}p.drawImage(u,0,0,h,c)}e.__popMaskObject(this)}}}}}}}}}if(!!this.__renderable){var F=e.__getAlpha(this.__worldAlpha);if(F>0&&this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){var O=e.context;e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.__bitmapData.image);O.globalAlpha=F;var G=this.__scrollRect;e.setTransform(this.__renderTransform,O);if(!e.__allowSmoothing||!this.smoothing){O.imageSmoothingEnabled=false}if(G==null){O.drawImage(this.__bitmapData.image.get_src(),0,0,this.__bitmapData.image.width,this.__bitmapData.image.height)}else{O.drawImage(this.__bitmapData.image.get_src(),G.x,G.y,G.width,G.height)}if(!e.__allowSmoothing||!this.smoothing){O.imageSmoothingEnabled=true}e.__popMaskObject(this,false)}}}this.__renderEvent(e)},__renderCanvasMask:function(e){e.context.rect(0,0,this.get_width(),this.get_height())},__renderDOM:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{var i=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var s=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&s!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(s,e.__canvasRenderer);if(s.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=s.__canvas){if(s.__canvas!=null){if(this.__canvas!=s.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=s.__canvas;this.__context=s.__context;e.__initializeElement(this,this.__canvas)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}if(this.__canvas!=null){e.__pushMaskObject(this);var a=this.__renderTransform;this.__renderTransform=s.__worldTransform;if(s.__transformDirty){s.__transformDirty=false;this.__renderTransformChanged=true}e.__updateClip(this);e.__applyStyle(this,true,true,true);this.__renderTransform=a;e.__popMaskObject(this)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}if(this.stage!=null&&this.__worldVisible&&this.__renderable&&this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){e.__pushMaskObject(this);if(this.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(this,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(this,e)}e.__popMaskObject(this)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(this,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMBitmap.clear(this,e)},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else{if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!(!this.__renderable||this.__worldAlpha<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var t=e.__context3D;var i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}openfl__$internal_renderer_context3D_Context3DBitmap.render(this,e)}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DBitmap.renderMask(this,e)},__updateCacheBitmap:function(e,t){if(this.__bitmapData==null||this.__filters==null&&e.__type=="opengl"&&this.__cacheBitmap==null){return false}return openfl_display_DisplayObject.prototype.__updateCacheBitmap.call(this,e,this.__bitmapData.image!=null&&this.__bitmapData.image.version!=this.__imageVersion)},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(e){this.__bitmapData=e;this.smoothing=false;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}var t=this.__filters!=null;this.__imageVersion=-1;return this.__bitmapData},get_height:function(){if(this.__bitmapData!=null){return this.__bitmapData.height*Math.abs(this.get_scaleY())}return 0},set_height:function(e){if(this.__bitmapData!=null){this.set_scaleY(e/this.__bitmapData.height)}else{this.set_scaleY(0)}return e},get_width:function(){if(this.__bitmapData!=null){return this.__bitmapData.width*Math.abs(this.__scaleX)}return 0},set_width:function(e){if(this.__bitmapData!=null){this.set_scaleX(e/this.__bitmapData.width)}else{this.set_scaleX(0)}return e},__class__:openfl_display_Bitmap,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var openfl_display_DisplayObjectRenderer=function(){openfl_events_EventDispatcher.call(this);this.__allowSmoothing=true;this.__tempColorTransform=new openfl_geom_ColorTransform;this.__worldAlpha=1};$hxClasses["openfl.display.DisplayObjectRenderer"]=openfl_display_DisplayObjectRenderer;openfl_display_DisplayObjectRenderer.__name__=["openfl","display","DisplayObjectRenderer"];openfl_display_DisplayObjectRenderer.__super__=openfl_events_EventDispatcher;openfl_display_DisplayObjectRenderer.prototype=$extend(openfl_events_EventDispatcher.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,__context:null,__overrideBlendMode:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__getAlpha:function(e){return e*this.__worldAlpha},__popMaskObject:function(e,t){if(t==null){t=true}},__pushMaskObject:function(e,t){if(t==null){t=true}},__render:function(e){},__resize:function(e,t){},__setBlendMode:function(e){},__class__:openfl_display_DisplayObjectRenderer});var openfl_display_CanvasRenderer=function(e){this.pixelRatio=1;openfl_display_DisplayObjectRenderer.call(this);this.context=e;this.__tempMatrix=new openfl_geom_Matrix;this.__type="canvas"};$hxClasses["openfl.display.CanvasRenderer"]=openfl_display_CanvasRenderer;openfl_display_CanvasRenderer.__name__=["openfl","display","CanvasRenderer"];openfl_display_CanvasRenderer.__super__=openfl_display_DisplayObjectRenderer;openfl_display_CanvasRenderer.prototype=$extend(openfl_display_DisplayObjectRenderer.prototype,{context:null,pixelRatio:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(e,t){e.imageSmoothingEnabled=t},setTransform:function(e,t){if(t==null){t=this.context}else if(this.context==t&&this.__worldTransform!=null){this.__tempMatrix.copyFrom(e);this.__tempMatrix.concat(this.__worldTransform);e=this.__tempMatrix}if(this.__roundPixels){t.setTransform(e.a,e.b,e.c,e.d,e.tx|0,e.ty|0)}else{t.setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty)}},__clear:function(){if(this.__stage!=null){var e=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;if(!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)}else if(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(e)}},__popMask:function(){this.context.restore()},__popMaskObject:function(e,t){if(t==null){t=true}if(!e.__isCacheBitmapRender&&e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){this.__popMaskRect()}},__popMaskRect:function(){this.context.restore()},__pushMask:function(e){this.context.save();this.setTransform(e.__renderTransform,this.context);this.context.beginPath();e.__renderCanvasMask(this);this.context.closePath();this.context.clip()},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}if(!e.__isCacheBitmapRender&&e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){this.context.save();this.setTransform(t,this.context);this.context.beginPath();this.context.rect(e.x,e.y,e.width,e.height);this.context.clip()},__render:function(e){e.__renderCanvas(this)},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e;this.__setBlendModeContext(this.context,e)},__setBlendModeContext:function(e,t){switch(t){case 0:e.globalCompositeOperation="lighter";break;case 2:e.globalCompositeOperation="darken";break;case 3:e.globalCompositeOperation="difference";break;case 5:e.globalCompositeOperation="hard-light";break;case 8:e.globalCompositeOperation="lighten";break;case 9:e.globalCompositeOperation="multiply";break;case 11:e.globalCompositeOperation="overlay";break;case 12:e.globalCompositeOperation="screen";break;default:e.globalCompositeOperation="source-over"}},__class__:openfl_display_CanvasRenderer});var openfl_display__$CapsStyle_CapsStyle_$Impl_$={};$hxClasses["openfl.display._CapsStyle.CapsStyle_Impl_"]=openfl_display__$CapsStyle_CapsStyle_$Impl_$;openfl_display__$CapsStyle_CapsStyle_$Impl_$.__name__=["openfl","display","_CapsStyle","CapsStyle_Impl_"];openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString=function(e){switch(e){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}};var openfl_display_DOMRenderer=function(e){this.pixelRatio=1;openfl_display_DisplayObjectRenderer.call(this);this.element=e;openfl_display_DisplayObject.__supportDOM=true;var t=function(){var e=window.getComputedStyle(document.documentElement,""),t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||e.OLink===""&&["","o"])[1],i="WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1];return{dom:i,lowercase:t,css:"-"+t+"-",js:t[0].toUpperCase()+t.substr(1)}}();this.__vendorPrefix=t.lowercase;this.__transformProperty=t.lowercase=="webkit"?"-webkit-transform":"transform";this.__transformOriginProperty=t.lowercase=="webkit"?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__numClipRects=0;this.__z=0;this.__type="dom";this.__canvasRenderer=new openfl_display_CanvasRenderer(null);this.__canvasRenderer.__isDOM=true};$hxClasses["openfl.display.DOMRenderer"]=openfl_display_DOMRenderer;openfl_display_DOMRenderer.__name__=["openfl","display","DOMRenderer"];openfl_display_DOMRenderer.__super__=openfl_display_DisplayObjectRenderer;openfl_display_DOMRenderer.prototype=$extend(openfl_display_DisplayObjectRenderer.prototype,{element:null,pixelRatio:null,__canvasRenderer:null,__clipRects:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,__transformProperty:null,__vendorPrefix:null,__z:null,__applyStyle:function(e,t,i,s){var a=e.__style;if(t&&e.__renderTransformChanged){var r=e.__renderTransform;a.setProperty(this.__transformProperty,this.__roundPixels?"matrix3d("+r.a+", "+r.b+", 0, 0, "+r.c+", "+r.d+", 0, 0, 0, 0, 1, 0, "+(r.tx|0)+", "+(r.ty|0)+", 0, 1)":"matrix3d("+r.a+", "+r.b+", 0, 0, "+r.c+", "+r.d+", 0, 0, 0, 0, 1, 0, "+r.tx+", "+r.ty+", 0, 1)",null)}if(e.__worldZ!=++this.__z){e.__worldZ=this.__z;a.setProperty("z-index",e.__worldZ==null?"null":""+e.__worldZ,null)}if(i&&e.__worldAlphaChanged){if(e.__worldAlpha<1){a.setProperty("opacity",e.__worldAlpha==null?"null":""+e.__worldAlpha,null)}else{a.removeProperty("opacity")}}if(s&&e.__worldClipChanged){if(e.__worldClip==null){a.removeProperty("clip")}else{var n=e.__worldClip;a.setProperty("clip","rect("+n.y+"px, "+n.get_right()+"px, "+n.get_bottom()+"px, "+n.x+"px)",null)}}},__initializeElement:function(e,t){var i=e.__style=t.style;i.setProperty("position","absolute",null);i.setProperty("top","0",null);i.setProperty("left","0",null);i.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(t);e.__worldAlphaChanged=true;e.__renderTransformChanged=true;e.__worldVisibleChanged=true;e.__worldClipChanged=true;e.__worldClip=null;e.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(e,t){if(t==null){t=true}if(e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){this.__popMaskRect()}},__popMaskRect:function(){if(this.__numClipRects>0){this.__numClipRects--;if(this.__numClipRects>0){this.__currentClipRect=this.__clipRects[this.__numClipRects-1]}else{this.__currentClipRect=null}}},__pushMask:function(e){this.__pushMaskRect(e.getBounds(e),e.__renderTransform)},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}if(e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){if(this.__numClipRects==this.__clipRects.length){this.__clipRects[this.__numClipRects]=new openfl_geom_Rectangle}var i=this.__clipRects[this.__numClipRects];e.__transform(i,t);if(this.__numClipRects>0){var s=this.__clipRects[this.__numClipRects-1];i.__contract(s.x,s.y,s.width,s.height)}if(i.height<0){i.height=0}if(i.width<0){i.width=0}this.__currentClipRect=i;this.__numClipRects++},__render:function(e){if(!this.__stage.__transparent){this.element.style.background=this.__stage.__colorString}else{this.element.style.background="none"}this.__z=1;e.__renderDOM(this)},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e},__updateClip:function(e){if(this.__currentClipRect==null){e.__worldClipChanged=e.__worldClip!=null;e.__worldClip=null}else{if(e.__worldClip==null){e.__worldClip=new openfl_geom_Rectangle}var t=openfl_geom_Rectangle.__pool.get();var i=openfl_geom_Matrix.__pool.get();i.copyFrom(e.__renderTransform);i.invert();this.__currentClipRect.__transform(t,i);if(t.equals(e.__worldClip)){e.__worldClipChanged=false}else{e.__worldClip.copyFrom(t);e.__worldClipChanged=true}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(i)}},__class__:openfl_display_DOMRenderer});var openfl_display_DisplayObjectShader=function(e){if(this.__glFragmentSource==null){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}"}if(this.__glVertexSource==null){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}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.display.DisplayObjectShader"]=openfl_display_DisplayObjectShader;openfl_display_DisplayObjectShader.__name__=["openfl","display","DisplayObjectShader"];openfl_display_DisplayObjectShader.__super__=openfl_display_Shader;openfl_display_DisplayObjectShader.prototype=$extend(openfl_display_Shader.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__:openfl_display_DisplayObjectShader});var openfl_display_FrameLabel=function(e,t){openfl_events_EventDispatcher.call(this);this.__name=e;this.__frame=t};$hxClasses["openfl.display.FrameLabel"]=openfl_display_FrameLabel;openfl_display_FrameLabel.__name__=["openfl","display","FrameLabel"];openfl_display_FrameLabel.__super__=openfl_events_EventDispatcher;openfl_display_FrameLabel.prototype=$extend(openfl_events_EventDispatcher.prototype,{__frame:null,__name:null,get_frame:function(){return this.__frame},get_name:function(){return this.__name},__class__:openfl_display_FrameLabel,__properties__:{get_name:"get_name",get_frame:"get_frame"}});var openfl_display_Graphics=function(e){this.__dirty=true;this.__owner=e;this.__commands=new openfl__$internal_renderer_DrawCommandBuffer;this.__strokePadding=0;this.__positionX=0;this.__positionY=0;this.__renderTransform=new openfl_geom_Matrix;this.__usedShaderBuffers=new List;this.__worldTransform=new openfl_geom_Matrix;this.__width=0;this.__height=0;this.__shaderBufferPool=new lime_utils_ObjectPool(function(){return new openfl__$internal_renderer_ShaderBuffer});this.moveTo(0,0)};$hxClasses["openfl.display.Graphics"]=openfl_display_Graphics;openfl_display_Graphics.__name__=["openfl","display","Graphics"];openfl_display_Graphics.prototype={__bounds:null,__commands:null,__dirty:null,__hardwareDirty:null,__height: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,__vertexBufferCount:null,__vertexBufferCountUVT:null,__vertexBufferData:null,__vertexBufferDataUVT:null,__vertexBufferUVT:null,__visible:null,__owner:null,__width:null,__worldTransform:null,__canvas:null,__context:null,__bitmap:null,beginBitmapFill:function(e,t,i,s){if(s==null){s=false}if(i==null){i=true}this.__commands.beginBitmapFill(e,t!=null?t.clone():null,i,s);this.__visible=true},beginFill:function(e,t){if(t==null){t=1}if(e==null){e=0}this.__commands.beginFill(e&16777215,t);if(t>0){this.__visible=true}},beginGradientFill:function(e,t,i,s,a,r,n,_){if(_==null){_=0}if(n==null){n=1}if(r==null){r=0}if(t==null||t.length==0){return}if(i==null){i=[];var o=0;var l=t.length;while(o0){this.__visible=true;break}}},clear:function(){var e=this.__usedShaderBuffers.h;while(e!=null){var t=e.item;e=e.next;var i=t;this.__shaderBufferPool.release(i)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;if(this.__bounds!=null){this.set___dirty(true);this.__transformDirty=true;this.__bounds=null}this.__visible=false;this.__positionX=0;this.__positionY=0;this.moveTo(0,0)},copyFrom:function(e){this.__bounds=e.__bounds!=null?e.__bounds.clone():null;this.__commands=e.__commands.copy();this.set___dirty(true);this.__strokePadding=e.__strokePadding;this.__positionX=e.__positionX;this.__positionY=e.__positionY;this.__transformDirty=true;this.__visible=e.__visible},curveTo:function(e,t,i,s){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var a;var r;if(ethis.__positionX||e>i&&ethis.__positionY||t>s&&tthis.__strokePadding){this.__strokePadding=e}}else if(e/2>this.__strokePadding){this.__strokePadding=e/2}}this.__commands.lineStyle(e,t,i,s,a,r,n,_);if(e!=null){this.__visible=true}},lineTo:function(e,t){if(!isFinite(e)||!isFinite(t)){return}this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__positionX=e;this.__positionY=t;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding*2,this.__positionY+this.__strokePadding);this.__commands.lineTo(e,t);this.set___dirty(true)},moveTo:function(e,t){this.__positionX=e;this.__positionY=t;this.__commands.moveTo(e,t)},__calculateBezierQuadPoint:function(e,t,i,s){var a=1-e;return a*a*t+2*a*e*i+e*e*s},__cleanup:function(){if(this.__bounds!=null&&this.__canvas!=null){this.set___dirty(true);this.__transformDirty=true}this.__bitmap=null;this.__canvas=null;this.__context=null},__getBounds:function(e,t){if(this.__bounds==null){return}var i=openfl_geom_Rectangle.__pool.get();this.__bounds.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__hitTest:function(e,t,i,s){if(this.__bounds==null){return false}var a=s.a*s.d-s.b*s.c;var r=a==0?-s.tx:1/a*(s.c*(s.ty-t)+s.d*(e-s.tx));var n=s.a*s.d-s.b*s.c;var _=n==0?-s.ty:1/n*(s.a*(t-s.ty)+s.b*(s.tx-e));if(r>this.__bounds.x&&_>this.__bounds.y&&this.__bounds.contains(r,_)){if(i){return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,r,_)}return true}return false},__inflateBounds:function(e,t){if(this.__bounds==null){this.__bounds=new openfl_geom_Rectangle(e,t,0,0);this.__transformDirty=true;return}if(ethis.__bounds.x+this.__bounds.width){this.__bounds.width=e-this.__bounds.x}if(t>this.__bounds.y+this.__bounds.height){this.__bounds.height=t-this.__bounds.y}},__update:function(e){if(this.__bounds==null||this.__bounds.width<=0||this.__bounds.height<=0){return}var t=this.__owner.__renderTransform;var i=1;var s=1;if(t!=null){if(t.b==0){i=Math.abs(t.a)}else{i=Math.sqrt(t.a*t.a+t.b*t.b)}if(t.c==0){s=Math.abs(t.d)}else{s=Math.sqrt(t.c*t.c+t.d*t.d)}}else{return}if(e!=null){if(e.b==0){i*=e.a}else{i*=Math.sqrt(e.a*e.a+e.b*e.b)}if(e.c==0){s*=e.d}else{s*=Math.sqrt(e.c*e.c+e.d*e.d)}}var a=this.__bounds.width*i;var r=this.__bounds.height*s;if(a<1||r<1){if(this.__width>=1||this.__height>=1){this.set___dirty(true)}this.__width=0;this.__height=0;return}if(openfl_display_Graphics.maxTextureWidth!=null&&a>openfl_display_Graphics.maxTextureWidth){a=openfl_display_Graphics.maxTextureWidth;i=openfl_display_Graphics.maxTextureWidth/this.__bounds.width}if(openfl_display_Graphics.maxTextureWidth!=null&&r>openfl_display_Graphics.maxTextureHeight){r=openfl_display_Graphics.maxTextureHeight;s=openfl_display_Graphics.maxTextureHeight/this.__bounds.height}this.__renderTransform.a=a/this.__bounds.width;this.__renderTransform.d=r/this.__bounds.height;var n=1/this.__renderTransform.a;var _=1/this.__renderTransform.d;this.__worldTransform.a=n*t.a;this.__worldTransform.b=n*t.b;this.__worldTransform.c=_*t.c;this.__worldTransform.d=_*t.d;var o=this.__bounds.x;var l=this.__bounds.y;var h=o*t.a+l*t.c+t.tx;var c=o*t.b+l*t.d+t.ty;this.__worldTransform.tx=Math.floor(h);this.__worldTransform.ty=Math.floor(c);var u=this.__worldTransform;var f=u.a*u.d-u.b*u.c;this.__renderTransform.tx=f==0?-u.tx:1/f*(u.c*(u.ty-c)+u.d*(h-u.tx));var p=this.__worldTransform;var d=p.a*p.d-p.b*p.c;this.__renderTransform.ty=d==0?-p.ty:1/d*(p.a*(c-p.ty)+p.b*(p.tx-h));var g=Math.ceil(a+this.__renderTransform.tx);var m=Math.ceil(r+this.__renderTransform.ty);if(g!=this.__width||m!=this.__height){this.set___dirty(true)}this.__width=g;this.__height=m},set___dirty:function(e){if(e&&this.__owner!=null){var t=this.__owner;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}if(e){this.__softwareDirty=true;this.__hardwareDirty=true}return this.__dirty=e},__class__:openfl_display_Graphics,__properties__:{set___dirty:"set___dirty"}};var openfl_display_GraphicsShader=function(e){if(this.__glFragmentSource==null){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}"}if(this.__glVertexSource==null){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}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.display.GraphicsShader"]=openfl_display_GraphicsShader;openfl_display_GraphicsShader.__name__=["openfl","display","GraphicsShader"];openfl_display_GraphicsShader.__super__=openfl_display_Shader;openfl_display_GraphicsShader.prototype=$extend(openfl_display_Shader.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__:openfl_display_GraphicsShader});var openfl_display__$JointStyle_JointStyle_$Impl_$={};$hxClasses["openfl.display._JointStyle.JointStyle_Impl_"]=openfl_display__$JointStyle_JointStyle_$Impl_$;openfl_display__$JointStyle_JointStyle_$Impl_$.__name__=["openfl","display","_JointStyle","JointStyle_Impl_"];openfl_display__$JointStyle_JointStyle_$Impl_$.toString=function(e){switch(e){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}};var openfl_display_Loader=function(){openfl_display_DisplayObjectContainer.call(this);this.contentLoaderInfo=openfl_display_LoaderInfo.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents};$hxClasses["openfl.display.Loader"]=openfl_display_Loader;openfl_display_Loader.__name__=["openfl","display","Loader"];openfl_display_Loader.__super__=openfl_display_DisplayObjectContainer;openfl_display_Loader.prototype=$extend(openfl_display_DisplayObjectContainer.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__path:null,__unloaded:null,load:function(e,t){this.contentLoaderInfo.loaderURL=openfl_Lib.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=e.url;this.__unloaded=false;if(e.contentType==null||e.contentType==""){var i="";this.__path=e.url;var s=this.__path.indexOf("?");if(s>-1){this.__path=this.__path.substring(0,s)}while(StringTools.endsWith(this.__path,"/"))this.__path=this.__path.substring(0,this.__path.length-1);if(StringTools.endsWith(this.__path,".bundle")){this.__path+="/library.json";if(s>-1){e.url=this.__path+e.url.substring(s)}else{e.url=this.__path}}var a=this.__path.lastIndexOf(".");if(a>-1){i=this.__path.substring(a+1)}var r;switch(i){case"gif":r="image/gif";break;case"jpeg":case"jpg":r="image/jpeg";break;case"js":r="application/javascript";break;case"json":r="application/json";break;case"png":r="image/png";break;case"swf":r="application/x-shockwave-flash";break;default:r="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=r}else{this.contentLoaderInfo.contentType=e.contentType}if(this.contentLoaderInfo.contentType.indexOf("image/")>-1&&e.method=="GET"&&(e.requestHeaders==null||e.requestHeaders.length==0)&&e.userAgent==null){openfl_display_BitmapData.loadFromFile(e.url).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError)).onProgress($bind(this,this.BitmapData_onProgress));return}var n=new openfl_net_URLLoader;n.dataFormat=0;if(this.contentLoaderInfo.contentType.indexOf("/json")>-1||this.contentLoaderInfo.contentType.indexOf("/javascript")>-1||this.contentLoaderInfo.contentType.indexOf("/ecmascript")>-1){n.dataFormat=1}n.addEventListener("complete",$bind(this,this.loader_onComplete));n.addEventListener("ioError",$bind(this,this.loader_onError));n.addEventListener("progress",$bind(this,this.loader_onProgress));n.load(e)},unload:function(){if(!this.__unloaded){while(this.get_numChildren()>0)this.removeChildAt(0);if(this.__library!=null){openfl_utils_Assets.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=true;this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("unload"))}},__dispatchError:function(e){var t=new openfl_events_IOErrorEvent("ioError");t.text=e;this.contentLoaderInfo.dispatchEvent(t)},BitmapData_onError:function(e){this.__dispatchError(Std.string(e))},BitmapData_onLoad:function(e){if(e==null){this.__dispatchError("Unknown error");return}this.content=new openfl_display_Bitmap(e);this.contentLoaderInfo.content=this.content;var t=this.content.get_width()|0;this.contentLoaderInfo.width=t;var i=this.content.get_height()|0;this.contentLoaderInfo.height=i;this.addChild(this.content);this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))},BitmapData_onProgress:function(e,t){var i=new openfl_events_ProgressEvent("progress");i.bytesLoaded=e;i.bytesTotal=t;this.contentLoaderInfo.dispatchEvent(i)},loader_onComplete:function(event){var _gthis=this;var loader=event.target;if(this.contentLoaderInfo.contentType!=null&&this.contentLoaderInfo.contentType.indexOf("/json")>-1){var manifest=lime_utils_AssetManifest.parse(loader.data,haxe_io_Path.directory(this.__path));if(manifest==null){this.__dispatchError("Cannot parse asset manifest");return}var library=lime_utils_AssetLibrary.fromManifest(manifest);if(library==null){this.__dispatchError("Cannot open library");return}if(js_Boot.__instanceof(library,openfl_utils_AssetLibrary)){library.load().onComplete(function(e){_gthis.__library=library;openfl_utils_Assets.registerLibrary(_gthis.contentLoaderInfo.url,_gthis.__library);if(manifest.name!=null&&!openfl_utils_Assets.hasLibrary(manifest.name)){openfl_utils_Assets.registerLibrary(manifest.name,_gthis.__library)}_gthis.content=_gthis.__library.getMovieClip("");_gthis.contentLoaderInfo.content=_gthis.content;_gthis.addChild(_gthis.content);_gthis.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))}).onError(function(e){_gthis.__dispatchError(e)})}}else if(this.contentLoaderInfo.contentType!=null&&(this.contentLoaderInfo.contentType.indexOf("/javascript")>-1||this.contentLoaderInfo.contentType.indexOf("/ecmascript")>-1)){this.content=new openfl_display_Sprite;this.contentLoaderInfo.content=this.content;this.addChild(this.content);eval("(function () {"+Std.string(loader.data)+"})()");this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))}else{this.contentLoaderInfo.bytes=loader.data;openfl_display_BitmapData.loadFromBytes(loader.data).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError))}},loader_onError:function(e){e.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(e)},loader_onProgress:function(e){e.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(e)},__class__:openfl_display_Loader});var openfl_display_LoaderInfo=function(){openfl_events_EventDispatcher.call(this);this.applicationDomain=openfl_system_ApplicationDomain.currentDomain;this.bytesLoaded=0;this.bytesTotal=0;this.childAllowsParent=true;this.parameters={}};$hxClasses["openfl.display.LoaderInfo"]=openfl_display_LoaderInfo;openfl_display_LoaderInfo.__name__=["openfl","display","LoaderInfo"];openfl_display_LoaderInfo.create=function(e){var t=new openfl_display_LoaderInfo;t.uncaughtErrorEvents=new openfl_events_UncaughtErrorEvents;if(e!=null){t.loader=e}else{t.url=openfl_display_LoaderInfo.__rootURL}return t};openfl_display_LoaderInfo.__super__=openfl_events_EventDispatcher;openfl_display_LoaderInfo.prototype=$extend(openfl_events_EventDispatcher.prototype,{applicationDomain:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,height:null,loader:null,loaderURL:null,parameters:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){if(!this.__completed){if(this.bytesLoaded.999)&&(i.d<1.001&&i.d>.999)){i.tx=Math.round(i.tx);i.ty=Math.round(i.ty)}lime_math__$Matrix4_Matrix4_$Impl_$.identity(this.__matrix);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,0,i.a);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,1,i.b);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,4,i.c);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,5,i.d);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,12,i.tx);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,13,i.ty);lime_math__$Matrix4_Matrix4_$Impl_$.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);var s=0;while(s<16){var a=s++;this.__values[a]=lime_math__$Matrix4_Matrix4_$Impl_$.get(this.__matrix,a)}openfl_geom_Matrix.__pool.release(i);return this.__values},__initShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultShader},__initDisplayShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultDisplayShader},__initGraphicsShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultGraphicsShader},__initShaderBuffer:function(e){if(e!=null){return this.__initGraphicsShader(e.shader)}return this.__defaultGraphicsShader},__popMask:function(){if(this.__stencilReference==0){return}var e=this.__maskObjects.pop();if(this.__stencilReference>1){this.__context3D.setStencilActions(2,1,0,0,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(false,false,false,false);e.__renderGLMask(this);this.__stencilReference--;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(true,true,true,true)}else{this.__stencilReference=0;this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}},__popMaskObject:function(e,t){if(t==null){t=true}if(e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){if(e.__renderTransform.b!=0||e.__renderTransform.c!=0){this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-1]);this.__popMask()}else{this.__popMaskRect()}}},__popMaskRect:function(){if(this.__numClipRects>0){this.__numClipRects--;if(this.__numClipRects>0){this.__scissorRect(this.__clipRects[this.__numClipRects-1])}else{this.__scissorRect()}}},__pushMask:function(e){if(this.__stencilReference==0){this.__context3D.clear(0,0,0,0,0,0,4);this.__updatedStencil=true}this.__context3D.setStencilActions(2,1,2,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(false,false,false,false);e.__renderGLMask(this);this.__maskObjects.push(e);this.__stencilReference++;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(true,true,true,true)},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){if(e.__renderTransform.b!=0||e.__renderTransform.c!=0){var i=this.__scrollRectMasks.get();i.get_graphics().clear();i.get_graphics().beginFill(65280);i.get_graphics().drawRect(e.__scrollRect.x,e.__scrollRect.y,e.__scrollRect.width,e.__scrollRect.height);i.__renderTransform.copyFrom(e.__renderTransform);this.__pushMask(i)}else{this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}}if(e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){if(this.__numClipRects==this.__clipRects.length){this.__clipRects[this.__numClipRects]=new openfl_geom_Rectangle}var i=openfl_geom_Matrix.__pool.get();i.copyFrom(t);i.concat(this.__worldTransform);var s=this.__clipRects[this.__numClipRects];e.__transform(s,i);if(this.__numClipRects>0){var a=this.__clipRects[this.__numClipRects-1];s.__contract(a.x,a.y,a.width,a.height)}if(s.height<0){s.height=0}if(s.width<0){s.width=0}openfl_geom_Matrix.__pool.release(i);this.__scissorRect(s);this.__numClipRects++},__render:function(e){this.__context3D.setColorMask(true,true,true,true);this.__context3D.setCulling(3);this.__context3D.setDepthTest(false,0);this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0);this.__context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);if(this.__defaultRenderTarget==null){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1;e.__renderGL(this);if(this.__offsetX>0||this.__offsetY>0){if(this.__offsetX>0){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT);openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)}if(this.__offsetY>0){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT);openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)}this.__context3D.setScissorRectangle(null)}}else{openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);var t=e.__mask;var i=e.__scrollRect;e.__mask=null;e.__scrollRect=null;e.__renderGL(this);e.__mask=t;e.__scrollRect=i}this.__context3D.present()},__renderFilterPass:function(e,t,i,s){if(s==null){s=true}if(e==null||t==null){return}if(this.__defaultRenderTarget==null){return}var a=this.__context3D.__state.renderToTexture;var r=this.__context3D.__state.renderToTextureDepthStencil;var n=this.__context3D.__state.renderToTextureAntiAlias;var _=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),false);if(s){this.__context3D.clear(0,0,0,0,0,0,1)}var o=this.__initShader(t);this.setShader(o);this.applyAlpha(1);this.applyBitmapData(e,i);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(e.__renderTransform,1));this.updateShader();var l=e.getVertexBuffer(this.__context3D);if(o.__position!=null){this.__context3D.setVertexBufferAt(o.__position.index,l,0,3)}if(o.__textureCoord!=null){this.__context3D.setVertexBufferAt(o.__textureCoord.index,l,3,2)}var h=e.getIndexBuffer(this.__context3D);this.__context3D.drawTriangles(h);if(a!=null){this.__context3D.setRenderToTexture(a,r,n,_)}else{this.__context3D.setRenderToBackBuffer()}this.__clearShader()},__resize:function(e,t){this.__width=e;this.__height=t;var i=this.__defaultRenderTarget==null?this.__stage.stageWidth:this.__defaultRenderTarget.width;var s=this.__defaultRenderTarget==null?this.__stage.stageHeight:this.__defaultRenderTarget.height;var a;if(this.__defaultRenderTarget==null){var r=this.__worldTransform;a=Math.round(0*r.a+0*r.c+r.tx)}else{a=0}this.__offsetX=a;var n;if(this.__defaultRenderTarget==null){var _=this.__worldTransform;n=Math.round(0*_.b+0*_.d+_.ty)}else{n=0}this.__offsetY=n;var o;if(this.__defaultRenderTarget==null){var l=this.__worldTransform;o=Math.round(i*l.a+0*l.c+l.tx-this.__offsetX)}else{o=i}this.__displayWidth=o;var h;if(this.__defaultRenderTarget==null){var c=this.__worldTransform;h=Math.round(0*c.b+s*c.d+c.ty-this.__offsetY)}else{h=s}this.__displayHeight=h;lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.__projection,0,this.__displayWidth+this.__offsetX*2,0,this.__displayHeight+this.__offsetY*2,-1e3,1e3);lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.__projectionFlipped,0,this.__displayWidth+this.__offsetX*2,this.__displayHeight+this.__offsetY*2,0,-1e3,1e3)},__resumeClipAndMask:function(e){if(this.__stencilReference>0){this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0)}else{this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}if(this.__numClipRects>0){this.__scissorRect(this.__clipRects[this.__numClipRects-1])}else{this.__scissorRect()}},__scissorRect:function(e){if(e!=null){var t=Math.floor(e.x);var i=Math.floor(e.y);var s=e.width>0?Math.ceil(e.get_right())-t:0;var a=e.height>0?Math.ceil(e.get_bottom())-i:0;if(s<0){s=0}if(a<0){a=0}openfl_display_OpenGLRenderer.__scissorRectangle.setTo(t,i,s,a);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle)}else{this.__context3D.setScissorRectangle(null)}},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e;switch(e){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(e){this.__defaultRenderTarget=e;this.__flipped=e==null;if(e!=null){this.__resize(e.width,e.height)}},__setShaderBuffer:function(e){this.setShader(e.shader);this.__currentShaderBuffer=e},__suspendClipAndMask:function(){if(this.__stencilReference>0){this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}if(this.__numClipRects>0){this.__scissorRect()}},__updateShaderBuffer:function(e){if(this.__currentShader!=null&&this.__currentShaderBuffer!=null){this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,e)}},__class__:openfl_display_OpenGLRenderer});var openfl_display_Preloader=function(e){this.onComplete=new lime_app__$Event_$Void_$Void;this.display=e;if(e!=null){e.addEventListener("unload",$bind(this,this.display_onUnload));openfl_Lib.get_current().addChild(e)}};$hxClasses["openfl.display.Preloader"]=openfl_display_Preloader;openfl_display_Preloader.__name__=["openfl","display","Preloader"];openfl_display_Preloader.prototype={onComplete:null,complete:null,display:null,ready:null,start:function(){this.ready=true;openfl_Lib.get_current().get_loaderInfo().__complete();if(this.display!=null){var e=new openfl_events_Event("complete",true,true);this.display.dispatchEvent(e);if(!e.isDefaultPrevented()){this.display.dispatchEvent(new openfl_events_Event("unload"))}}else if(!this.complete){this.complete=true;this.onComplete.dispatch()}},update:function(e,t){openfl_Lib.get_current().get_loaderInfo().__update(e,t);if(this.display!=null){this.display.dispatchEvent(new openfl_events_ProgressEvent("progress",true,true,e,t))}},display_onUnload:function(e){if(this.display!=null){this.display.removeEventListener("unload",$bind(this,this.display_onUnload));if(this.display.parent==openfl_Lib.get_current()){openfl_Lib.get_current().removeChild(this.display)}openfl_Lib.get_current().stage.set_focus(null);this.display=null}if(this.ready){if(!this.complete){this.complete=true;this.onComplete.dispatch()}}},__class__:openfl_display_Preloader};var openfl_display_DefaultPreloader=function(){openfl_display_Sprite.call(this);var e=this.getBackgroundColor();var t=e>>16&255;var i=e>>8&255;var s=e&255;var a=.299*t+.587*i+.114*s;var r=0;if(a<70){r=16777215}var n=30;var _=7;var o=this.getHeight()/2-_/2;var l=this.getWidth()-n*2;var h=2;this.outline=new openfl_display_Sprite;this.outline.get_graphics().beginFill(r,.07);this.outline.get_graphics().drawRect(0,0,l,_);this.outline.set_x(n);this.outline.set_y(o);this.outline.set_alpha(0);this.addChild(this.outline);this.progress=new openfl_display_Sprite;this.progress.get_graphics().beginFill(r,.35);this.progress.get_graphics().drawRect(0,0,l-h*2,_-h*2);this.progress.set_x(n+h);this.progress.set_y(o+h);this.progress.set_scaleX(0);this.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=openfl_Lib.getTimer()+100;this.endAnimation=this.startAnimation+1e3;this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage))};$hxClasses["openfl.display.DefaultPreloader"]=openfl_display_DefaultPreloader;openfl_display_DefaultPreloader.__name__=["openfl","display","DefaultPreloader"];openfl_display_DefaultPreloader.__super__=openfl_display_Sprite;openfl_display_DefaultPreloader.prototype=$extend(openfl_display_Sprite.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var e=openfl_Lib.get_current().stage.window.context.attributes;if(Object.prototype.hasOwnProperty.call(e,"background")&&e.background!=null){return e.background}else{return 0}},getHeight:function(){var e=openfl_Lib.get_current().stage.window.__height;if(e>0){return e}else{return openfl_Lib.get_current().stage.stageHeight}},getWidth:function(){var e=openfl_Lib.get_current().stage.window.__width;if(e>0){return e}else{return openfl_Lib.get_current().stage.stageWidth}},onInit:function(){this.addEventListener("enterFrame",$bind(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",$bind(this,this.this_onEnterFrame));this.dispatchEvent(new openfl_events_Event("unload"))},onUpdate:function(e,t){var i=0;if(t>0){i=e/t;if(i>1){i=1}}this.progress.set_scaleX(i)},this_onAddedToStage:function(e){this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",$bind(this,this.this_onProgress));this.addEventListener("complete",$bind(this,this.this_onComplete))},this_onComplete:function(e){e.preventDefault();this.removeEventListener("progress",$bind(this,this.this_onProgress));this.removeEventListener("complete",$bind(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(e){var t=openfl_Lib.getTimer()-this.startAnimation;var i=this.endAnimation-this.startAnimation;var s=t/i;if(s<0){s=0}if(s>1){s=1}this.outline.set_alpha(s);this.progress.set_alpha(s)},this_onProgress:function(e){this.onUpdate(e.bytesLoaded|0,e.bytesTotal|0)},__class__:openfl_display_DefaultPreloader});var openfl_display__$ShaderData_ShaderData_$Impl_$={};$hxClasses["openfl.display._ShaderData.ShaderData_Impl_"]=openfl_display__$ShaderData_ShaderData_$Impl_$;openfl_display__$ShaderData_ShaderData_$Impl_$.__name__=["openfl","display","_ShaderData","ShaderData_Impl_"];openfl_display__$ShaderData_ShaderData_$Impl_$._new=function(e){var t={};return t};var openfl_display_ShaderInput=function(){this.channels=0;this.filter=5;this.height=0;this.index=0;this.mipFilter=2;this.width=0;this.wrap=0};$hxClasses["openfl.display.ShaderInput"]=openfl_display_ShaderInput;openfl_display_ShaderInput.__name__=["openfl","display","ShaderInput"];openfl_display_ShaderInput.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,width:null,wrap:null,__isUniform:null,__disableGL:function(e,t){var i=e.gl;e.setTextureAt(t,null)},__updateGL:function(e,t,i,s,a,r){var n=e.gl;var _=i!=null?i:this.input;var o=s!=null?s:this.filter;var l=a!=null?a:this.mipFilter;var h=r!=null?r:this.wrap;if(_!=null){var c=_;e.setTextureAt(t,c.getTexture(e));e.setSamplerStateAt(t,h,o,l)}else{e.setTextureAt(t,null)}},__class__:openfl_display_ShaderInput};var openfl_display_ShaderParameter=function(){this.index=0};$hxClasses["openfl.display.ShaderParameter"]=openfl_display_ShaderParameter;openfl_display_ShaderParameter.__name__=["openfl","display","ShaderParameter"];openfl_display_ShaderParameter.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(e){var t=e.gl;if(!this.__isUniform){var i=0;var s=this.__arrayLength;while(i=this.__length){var _=this.type;switch(_){case 0:i.uniform1i(this.index,a[0]?1:0);break;case 1:i.uniform2i(this.index,a[0]?1:0,a[1]?1:0);break;case 2:i.uniform3i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0);break;case 3:i.uniform4i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0,a[3]?1:0);break;case 4:i.uniform1f(this.index,r[0]);break;case 5:i.uniform2f(this.index,r[0],r[1]);break;case 6:i.uniform3f(this.index,r[0],r[1],r[2]);break;case 7:i.uniform4f(this.index,r[0],r[1],r[2],r[3]);break;case 8:i.uniform1i(this.index,n[0]);break;case 9:i.uniform2i(this.index,n[0],n[1]);break;case 10:i.uniform3i(this.index,n[0],n[1],n[2]);break;case 11:i.uniform4i(this.index,n[0],n[1],n[2],n[3]);break;case 12:var o=0;while(o<4){var l=o++;this.__uniformMatrix[l]=r[l]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(i,this.index,false,this.__uniformMatrix);break;case 16:var h=0;while(h<9){var c=h++;this.__uniformMatrix[c]=r[c]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(i,this.index,false,this.__uniformMatrix);break;case 20:var u=0;while(u<16){var f=u++;this.__uniformMatrix[f]=r[f]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(i,this.index,false,this.__uniformMatrix);break;default:}}else{var p=this.type;switch(p){case 1:case 9:i.uniform2i(this.index,0,0);break;case 3:case 11:i.uniform4i(this.index,0,0,0,0);break;case 4:i.uniform1f(this.index,0);break;case 5:i.uniform2f(this.index,0,0);break;case 6:i.uniform3f(this.index,0,0,0);break;case 7:i.uniform4f(this.index,0,0,0,0);break;case 0:case 8:i.uniform1i(this.index,0);break;case 2:case 10:i.uniform3i(this.index,0,0,0);break;case 12:var d=0;while(d<4){var g=d++;this.__uniformMatrix[g]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(i,this.index,false,this.__uniformMatrix);break;case 16:var m=0;while(m<9){var v=m++;this.__uniformMatrix[v]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(i,this.index,false,this.__uniformMatrix);break;case 20:var b=0;while(b<16){var y=b++;this.__uniformMatrix[y]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(i,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__useArray&&(s==null||s.length==this.__length)){var x=0;var w=this.__arrayLength;while(x=this.__length){var n=this.type;switch(n){case 1:case 9:r.uniform2i(this.index,t[i]|0,t[i+1]|0);break;case 3:case 11:r.uniform4i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0,t[i+3]|0);break;case 4:r.uniform1f(this.index,t[i]);break;case 5:r.uniform2f(this.index,t[i],t[i+1]);break;case 6:r.uniform3f(this.index,t[i],t[i+1],t[i+2]);break;case 7:r.uniform4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 8:r.uniform1i(this.index,t[i]|0);break;case 2:case 10:r.uniform3i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0);break;case 12:var _=0;while(_<4){var o=_++;this.__uniformMatrix[o]=t[i+o]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(r,this.index,false,this.__uniformMatrix);break;case 16:var l=0;while(l<9){var h=l++;this.__uniformMatrix[h]=t[i+h]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(r,this.index,false,this.__uniformMatrix);break;case 20:var c=0;while(c<16){var u=c++;this.__uniformMatrix[u]=t[i+u]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(r,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__internal&&(s==0||s==this.__length)){var f=0;var p=this.__arrayLength;while(f0){var g=this.type;switch(g){case 1:case 5:case 9:r.vertexAttrib2f(this.index,t[i],t[i+1]);break;case 3:case 7:case 11:r.vertexAttrib4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 4:case 8:r.vertexAttrib1f(this.index,t[i]);break;case 2:case 6:case 10:r.vertexAttrib3f(this.index,t[i],t[i+1],t[i+2]);break;case 12:var m=0;while(m<2){var v=m++;r.vertexAttrib2f(this.index+v,t[i+v*2],t[i+v*2+1])}break;case 16:var b=0;while(b<3){var y=b++;r.vertexAttrib3f(this.index+y,t[i+y*3],t[i+y*3+1],t[i+y*3+2])}break;case 20:var x=0;while(x<4){var w=x++;r.vertexAttrib4f(this.index+w,t[i+w*4],t[i+w*4+1],t[i+w*4+2],t[i+w*4+3])}break;default:}}else{var k=this.type;switch(k){case 1:case 5:case 9:r.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:r.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:r.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:r.vertexAttrib3f(this.index,0,0,0);break;case 12:var P=0;while(P<2){var C=P++;r.vertexAttrib2f(this.index+C,0,0)}break;case 16:var T=0;while(T<3){var M=T++;r.vertexAttrib3f(this.index+M,0,0,0)}break;case 20:var S=0;while(S<4){var $=S++;r.vertexAttrib4f(this.index+$,0,0,0,0)}break;default:}}}else{var E=r.FLOAT;if(this.__isBool){E=r.INT}else if(this.__isInt){E=r.INT}var B=0;var L=this.__arrayLength;while(B0){var A=0;var I=this.__arrayLength;while(A1&&s[s.length-1]==s[s.length-2])s.pop()}return n},__hitTestMask:function(e,t){var i=false;if(this.__currentState.__hitTestMask(e,t)){i=true}return i},__renderCanvas:function(e){if(!this.__renderable||this.__worldAlpha<=0||this.__currentState==null){return}e.__pushMaskObject(this);this.__currentState.__renderCanvas(e);e.__popMaskObject(this);this.__renderEvent(e)},__renderCanvasMask:function(e){this.__currentState.__renderCanvasMask(e)},__renderDOM:function(e){e.__pushMaskObject(this);var t=0;var i=this.__previousStates;while(t-1){this.__previousStates.splice(t,1)}}if(e!=null){e.__renderParent=this;if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}this.__currentState=e;return e},__this_onMouseDown:function(e){if(this.enabled){this.set___currentState(this.get_downState())}},__this_onMouseOut:function(e){this.__ignoreEvent=false;if(this.enabled&&this.get_upState()!=this.__currentState){this.set___currentState(this.get_upState())}},__this_onMouseOver:function(e){if(e.buttonDown){this.__ignoreEvent=true}if(this.get_overState()!=this.__currentState&&this.get_overState()!=null&&!this.__ignoreEvent&&this.enabled){this.set___currentState(this.get_overState())}},__this_onMouseUp:function(e){this.__ignoreEvent=false;if(this.enabled){if(this.get_overState()!=null){this.set___currentState(this.get_overState())}else{this.set___currentState(this.get_upState())}}},__class__:openfl_display_SimpleButton,__properties__:$extend(openfl_display_InteractiveObject.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",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 openfl_display_Stage=function(e,t){openfl_display_DisplayObjectContainer.call(this);this.set_name(null);this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__currentTabOrderIndex=0;this.__deltaTime=0;this.__displayState=2;this.__mouseX=0;this.__mouseY=0;this.__lastClickTime=0;this.__logicalWidth=0;this.__logicalHeight=0;this.__displayMatrix=new openfl_geom_Matrix;this.__displayRect=new openfl_geom_Rectangle;this.__renderDirty=true;this.stage3Ds=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);var i=0;while(i<4){var s=i++;this.stage3Ds.push(new openfl_display_Stage3D(this))}this.stage=this;this.align=6;this.allowsFullScreen=true;this.allowsFullScreenInteractive=true;this.__quality=1;this.__scaleMode=2;this.showDefaultContextMenu=true;this.softKeyboardRect=new openfl_geom_Rectangle;this.stageFocusRect=true;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=true;this.__forceRender=false;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new haxe_ds_IntMap;this.application=e.application;this.window=e;this.set_color(t);this.__contentsScaleFactor=e.__scale;this.__wasFullscreen=e.__fullscreen;this.__resize();if(openfl_Lib.get_current().stage==null){this.stage.addChild(openfl_Lib.get_current())}};$hxClasses["openfl.display.Stage"]=openfl_display_Stage;openfl_display_Stage.__name__=["openfl","display","Stage"];openfl_display_Stage.__interfaces__=[lime_app_IModule];openfl_display_Stage.__super__=openfl_display_DisplayObjectContainer;openfl_display_Stage.prototype=$extend(openfl_display_DisplayObjectContainer.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,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime: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,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,localToGlobal:function(e){return e.clone()},__broadcastEvent:function(e){var t=e.type;var i=openfl_display_DisplayObject.__broadcastEvents;if(__map_reserved[t]!=null?i.existsReserved(t):i.h.hasOwnProperty(t)){var s=e.type;var a=openfl_display_DisplayObject.__broadcastEvents;var r=__map_reserved[s]!=null?a.getReserved(s):a.h[s];var n=0;while(n1){if(!this.window.devicePixelRatio){e=1}else{e=true}}var t=this.window.__width*this.window.__scale|0;var i=this.window.__height*this.window.__scale|0;var s=this.window.context.type;switch(s){case"cairo":break;case"canvas":this.__renderer=new openfl_display_CanvasRenderer(this.window.context.canvas2D);js_Boot.__cast(this.__renderer,openfl_display_CanvasRenderer).pixelRatio=e;break;case"dom":this.__renderer=new openfl_display_DOMRenderer(this.window.context.dom);js_Boot.__cast(this.__renderer,openfl_display_DOMRenderer).pixelRatio=e;break;case"opengl":case"opengles":case"webgl":break;default:}if(this.__renderer!=null){var a=this.get_quality();this.__renderer.__allowSmoothing=a!=2;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(t,i)}},__dispatchEvent:function(e){try{return openfl_display_DisplayObjectContainer.prototype.__dispatchEvent.call(this,e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e);return false}},__dispatchPendingMouseEvent:function(){if(this.__pendingMouseEvent){this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0);this.__pendingMouseEvent=false}},__dispatchStack:function(e,t){try{var i;var s=t.length;if(s==0){e.eventPhase=2;i=e.target;i.__dispatch(e)}else{e.eventPhase=1;e.target=t[t.length-1];var a=0;var r=s-1;while(a=0){t[_].__dispatch(e);if(e.__isCanceled){return}--_}}}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__dispatchTarget:function(e,t){try{return e.__dispatchEvent(t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e);return false}},__drag:function(e){var t=this.__dragObject.parent;if(t!=null){var i=t.__getWorldTransform();var s=i.a*i.d-i.b*i.c;if(s==0){e.x=-i.tx;e.y=-i.ty}else{var a=1/s*(i.c*(i.ty-e.y)+i.d*(e.x-i.tx));e.y=1/s*(i.a*(e.y-i.ty)+i.b*(i.tx-e.x));e.x=a}}var r=e.x+this.__dragOffsetX;var n=e.y+this.__dragOffsetY;if(this.__dragBounds!=null){if(rthis.__dragBounds.get_right()){r=this.__dragBounds.get_right()}if(nthis.__dragBounds.get_bottom()){n=this.__dragBounds.get_bottom()}}this.__dragObject.set_x(r);this.__dragObject.set_y(n)},__getInteractive:function(e){if(e!=null){e.push(this)}return true},__globalToLocal:function(e,t){if(e!=t){t.copyFrom(e)}return t},__handleError:function(e){var t=new openfl_events_UncaughtErrorEvent("uncaughtError",true,true,e);try{openfl_Lib.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(t)}catch(e){haxe_CallStack.lastException=e}if(!t.__preventDefault){try{var i=haxe_CallStack.lastException;if(i!=null&&Object.prototype.hasOwnProperty.call(i,"stack")&&i.stack!=null&&i.stack!=""){console.log(i.stack);e.stack=i.stack}else{var s=haxe_CallStack.toString(haxe_CallStack.callStack());console.log(s)}}catch(e){haxe_CallStack.lastException=e}throw e}},__onKey:function(e,t,i){this.__dispatchPendingMouseEvent();openfl_events_MouseEvent.__altKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(i);openfl_events_MouseEvent.__commandKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i);openfl_events_MouseEvent.__ctrlKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i);openfl_events_MouseEvent.__shiftKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i);var s=[];if(this.__focus==null){this.__getInteractive(s)}else{this.__focus.__getInteractive(s)}if(s.length>0){var a;switch(t){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:a=3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:a=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:a=2;break;default:a=0}var r;switch(t){case 8:r=8;break;case 9:r=9;break;case 13:r=13;break;case 27:r=27;break;case 32:r=32;break;case 33:r=49;break;case 34:r=222;break;case 35:r=51;break;case 36:r=52;break;case 37:r=53;break;case 38:r=55;break;case 39:r=222;break;case 40:r=57;break;case 41:r=48;break;case 42:r=56;break;case 44:r=188;break;case 45:r=189;break;case 46:r=190;break;case 47:r=191;break;case 48:r=48;break;case 49:r=49;break;case 50:r=50;break;case 51:r=51;break;case 52:r=52;break;case 53:r=53;break;case 54:r=54;break;case 55:r=55;break;case 56:r=56;break;case 57:r=57;break;case 58:r=186;break;case 59:r=186;break;case 60:r=60;break;case 61:r=187;break;case 62:r=190;break;case 63:r=191;break;case 64:r=50;break;case 91:r=219;break;case 92:r=220;break;case 93:r=221;break;case 94:r=54;break;case 95:r=189;break;case 96:r=192;break;case 97:r=65;break;case 98:r=66;break;case 99:r=67;break;case 100:r=68;break;case 101:r=69;break;case 102:r=70;break;case 103:r=71;break;case 104:r=72;break;case 105:r=73;break;case 106:r=74;break;case 107:r=75;break;case 108:r=76;break;case 109:r=77;break;case 110:r=78;break;case 111:r=79;break;case 112:r=80;break;case 113:r=81;break;case 114:r=82;break;case 115:r=83;break;case 116:r=84;break;case 117:r=85;break;case 118:r=86;break;case 119:r=87;break;case 120:r=88;break;case 121:r=89;break;case 122:r=90;break;case 127:r=46;break;case 1073741881:r=20;break;case 1073741882:r=112;break;case 1073741883:r=113;break;case 1073741884:r=114;break;case 1073741885:r=115;break;case 1073741886:r=116;break;case 1073741887:r=117;break;case 1073741888:r=118;break;case 1073741889:r=119;break;case 1073741890:r=120;break;case 1073741891:r=121;break;case 1073741892:r=122;break;case 1073741893:r=123;break;case 1073741894:r=301;break;case 1073741895:r=145;break;case 1073741896:r=19;break;case 1073741897:r=45;break;case 1073741898:r=36;break;case 1073741899:r=33;break;case 1073741901:r=35;break;case 1073741902:r=34;break;case 1073741903:r=39;break;case 1073741904:r=37;break;case 1073741905:r=40;break;case 1073741906:r=38;break;case 1073741907:r=144;break;case 1073741908:r=111;break;case 1073741909:r=106;break;case 1073741910:r=109;break;case 1073741911:r=107;break;case 1073741912:r=13;break;case 1073741913:r=97;break;case 1073741914:r=98;break;case 1073741915:r=99;break;case 1073741916:r=100;break;case 1073741917:r=101;break;case 1073741918:r=102;break;case 1073741919:r=103;break;case 1073741920:r=104;break;case 1073741921:r=105;break;case 1073741922:r=96;break;case 1073741923:r=110;break;case 1073741925:r=302;break;case 1073741928:r=124;break;case 1073741929:r=125;break;case 1073741930:r=126;break;case 1073741982:r=13;break;case 1073742044:r=110;break;case 1073742048:r=17;break;case 1073742049:r=16;break;case 1073742050:r=18;break;case 1073742051:r=15;break;case 1073742052:r=17;break;case 1073742053:r=16;break;case 1073742054:r=18;break;case 1073742055:r=15;break;default:r=t}var n=openfl_ui_Keyboard.__getCharCode(r,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i));var _=new openfl_events_KeyboardEvent(e,true,true,n,r,a,this.__macKeyboard?lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i):lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i));s.reverse();this.__dispatchStack(_,s);if(_.__preventDefault){if(e=="keyDown"){this.window.onKeyDown.cancel()}else{this.window.onKeyUp.cancel()}}else if(e=="keyDown"&&r==9){var o=[];this.__tabTest(o);var l=-1;var h=null;var c=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i)?-1:1;if(o.length>1){haxe_ds_ArraySort.sort(o,function(e,t){return e.get_tabIndex()-t.get_tabIndex()});if(o[o.length-1].get_tabIndex()==-1){if(this.get_focus()!=null){l=0}else{l=this.__currentTabOrderIndex}}else{var u=0;while(u-1){if(u>0){o.splice(0,u)}break}++u}if(this.get_focus()!=null){var f=o.indexOf(this.get_focus());if(f<0){l=0}else{l=f+c}}else{l=this.__currentTabOrderIndex}}}else if(o.length==1){h=o[0];if(this.get_focus()==h){h=null}}if(o.length==1||o.length==0&&this.get_focus()!=null){l=0}else if(o.length>1){if(l<0){l+=o.length}l%=o.length;h=o[l];if(h==this.get_focus()){l+=c;if(l<0){l+=o.length}l%=o.length;h=o[l]}}var p=null;if(this.get_focus()!=null){p=new openfl_events_FocusEvent("keyFocusChange",true,true,h,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i),0);s=[];this.get_focus().__getInteractive(s);s.reverse();this.__dispatchStack(p,s)}if(p==null||!p.isDefaultPrevented()){this.__currentTabOrderIndex=l;if(h!=null){this.set_focus(h)}}}}},__onLimeCreateWindow:function(e){if(this.window!=e){return}var t=$bind(this,this.__onLimeWindowActivate);var i=e;var s=function(){t(i)};e.onActivate.add(s);var a=$bind(this,this.__onLimeWindowClose);var r=e;var n=function(){a(r)};e.onClose.add(n,false,-9e3);var _=$bind(this,this.__onLimeWindowDeactivate);var o=e;var l=function(){_(o)};e.onDeactivate.add(l);var h=$bind(this,this.__onLimeWindowDropFile);var c=e;var u=function(e){h(c,e)};e.onDropFile.add(u);var f=$bind(this,this.__onLimeWindowEnter);var p=e;var d=function(){f(p)};e.onEnter.add(d);var g=$bind(this,this.__onLimeWindowExpose);var m=e;var v=function(){g(m)};e.onExpose.add(v);var b=$bind(this,this.__onLimeWindowFocusIn);var y=e;var x=function(){b(y)};e.onFocusIn.add(x);var w=$bind(this,this.__onLimeWindowFocusOut);var k=e;var P=function(){w(k)};e.onFocusOut.add(P);var C=$bind(this,this.__onLimeWindowFullscreen);var T=e;var M=function(){C(T)};e.onFullscreen.add(M);var S=$bind(this,this.__onLimeKeyDown);var $=e;var E=function(e,t){S($,e,t)};e.onKeyDown.add(E);var B=$bind(this,this.__onLimeKeyUp);var L=e;var R=function(e,t){B(L,e,t)};e.onKeyUp.add(R);var A=$bind(this,this.__onLimeWindowLeave);var I=e;var D=function(){A(I)};e.onLeave.add(D);var F=$bind(this,this.__onLimeWindowMinimize);var O=e;var G=function(){F(O)};e.onMinimize.add(G);var j=$bind(this,this.__onLimeMouseDown);var H=e;var U=function(e,t,i){j(H,e,t,i)};e.onMouseDown.add(U);var N=$bind(this,this.__onLimeMouseMove);var W=e;var V=function(e,t){N(W,e,t)};e.onMouseMove.add(V);var z=$bind(this,this.__onLimeMouseMoveRelative);var X=e;var Y=function(e,t){z(X,e,t)};e.onMouseMoveRelative.add(Y);var q=$bind(this,this.__onLimeMouseUp);var J=e;var K=function(e,t,i){q(J,e,t,i)};e.onMouseUp.add(K);var Z=$bind(this,this.__onLimeMouseWheel);var Q=e;var ee=function(e,t,i){Z(Q,e,t,i)};e.onMouseWheel.add(ee);var te=$bind(this,this.__onLimeWindowMove);var ie=e;var se=function(e,t){te(ie,e,t)};e.onMove.add(se);e.onRender.add($bind(this,this.__onLimeRender));e.onRenderContextLost.add($bind(this,this.__onLimeRenderContextLost));e.onRenderContextRestored.add($bind(this,this.__onLimeRenderContextRestored));var ae=$bind(this,this.__onLimeWindowResize);var re=e;var ne=function(e,t){ae(re,e,t)};e.onResize.add(ne);var _e=$bind(this,this.__onLimeWindowRestore);var oe=e;var le=function(){_e(oe)};e.onRestore.add(le);var he=$bind(this,this.__onLimeTextEdit);var ce=e;var ue=function(e,t,i){he(ce,e,t,i)};e.onTextEdit.add(ue);var fe=$bind(this,this.__onLimeTextInput);var pe=e;var de=function(e){fe(pe,e)};e.onTextInput.add(de);this.__onLimeWindowCreate(e)},__onLimeGamepadAxisMove:function(e,t,i){try{openfl_ui_GameInput.__onGamepadAxisMove(e,t,i)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__onLimeGamepadButtonDown:function(e,t){try{openfl_ui_GameInput.__onGamepadButtonDown(e,t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__onLimeGamepadButtonUp:function(e,t){try{openfl_ui_GameInput.__onGamepadButtonUp(e,t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__onLimeGamepadConnect:function(e){try{openfl_ui_GameInput.__onGamepadConnect(e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}var i=$bind(this,this.__onLimeGamepadAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.__onLimeGamepadButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.__onLimeGamepadButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.__onLimeGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__onLimeGamepadDisconnect:function(e){try{openfl_ui_GameInput.__onGamepadDisconnect(e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__onLimeKeyDown:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyDown",t,i)},__onLimeKeyUp:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyUp",t,i)},__onLimeModuleExit:function(e){if(this.window!=null){var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t)}},__onLimeMouseDown:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(s){case 1:a="middleMouseDown";break;case 2:a="rightMouseDown";break;default:a="mouseDown"}this.__onMouse(a,t*e.__scale|0,i*e.__scale|0,s);if(!this.showDefaultContextMenu&&s==2){e.onMouseDown.cancel()}},__onLimeMouseMove:function(e,t,i){if(this.window==null||this.window!=e){return}this.__pendingMouseEvent=true;this.__pendingMouseX=t*e.__scale|0;this.__pendingMouseY=i*e.__scale|0},__onLimeMouseMoveRelative:function(e,t,i){},__onLimeMouseUp:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(s){case 1:a="middleMouseUp";break;case 2:a="rightMouseUp";break;default:a="mouseUp"}this.__onMouse(a,t*e.__scale|0,i*e.__scale|0,s);if(!this.showDefaultContextMenu&&s==2){e.onMouseUp.cancel()}},__onLimeMouseWheel:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();if(s==lime_ui_MouseWheelMode.PIXELS){this.__onMouseWheel(t*e.__scale|0,i*e.__scale|0,s)}else{this.__onMouseWheel(t|0,i|0,s)}},__onLimeRender:function(e){if(this.__rendering){return}this.__rendering=true;var t=null;this.__broadcastEvent(new openfl_events_Event("enterFrame"));this.__broadcastEvent(new openfl_events_Event("frameConstructed"));this.__broadcastEvent(new openfl_events_Event("exitFrame"));this.__renderable=true;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;var i=this.__renderer!=null&&(this.__renderDirty||this.__forceRender);if(this.__invalidated&&i){this.__invalidated=false;t=new openfl_events_Event("render");this.__broadcastEvent(t)}this.__update(false,true);if(this.__renderer!=null){if(this.context3D!=null){var s=0;var a=this.stage3Ds;while(s0){i.reverse();this.__dispatchStack(s,i)}else{this.__dispatchEvent(s)}if(s.isDefaultPrevented()){e.onTextInput.cancel()}},__onLimeTouchCancel:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},__onLimeTouchMove:function(e){this.__onTouch("touchMove",e)},__onLimeTouchEnd:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},__onLimeTouchStart:function(e){if(this.__primaryTouch==null){this.__primaryTouch=e}this.__onTouch("touchBegin",e)},__onLimeUpdate:function(e){this.__deltaTime=e;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowClose:function(e){if(this.window==e){this.window=null}this.__primaryTouch=null;var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t)},__onLimeWindowCreate:function(e){if(this.window==null||this.window!=e){return}if(e.context!=null){this.__createRenderer()}},__onLimeWindowDeactivate:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowDropFile:function(e,t){},__onLimeWindowEnter:function(e){},__onLimeWindowExpose:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true},__onLimeWindowFocusIn:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true;var t=null;t=new openfl_events_Event("activate");this.__broadcastEvent(t);this.set_focus(this.__cacheFocus)},__onLimeWindowFocusOut:function(e){if(this.window==null||this.window!=e){return}this.__primaryTouch=null;var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t);var i=this.get_focus();this.set_focus(null);this.__cacheFocus=i},__onLimeWindowFullscreen:function(e){if(this.window==null||this.window!=e){return}this.__resize();if(!this.__wasFullscreen){this.__wasFullscreen=true;if(this.__displayState==2){this.__displayState=1}this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true))}},__onLimeWindowLeave:function(e){if(this.window==null||this.window!=e||openfl_events_MouseEvent.__buttonDown){return}this.__dispatchPendingMouseEvent();var t=null;t=new openfl_events_Event("mouseLeave");this.__dispatchEvent(t)},__onLimeWindowMinimize:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowMove:function(e,t,i){},__onLimeWindowResize:function(e,t,i){if(this.window==null||this.window!=e){return}this.__resize();if(this.__wasFullscreen&&!e.__fullscreen){this.__wasFullscreen=false;this.__displayState=2;this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true))}},__onLimeWindowRestore:function(e){if(this.window==null||this.window!=e){return}if(this.__wasFullscreen&&!e.__fullscreen){this.__wasFullscreen=false;this.__displayState=2;this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true))}},__onMouse:function(e,t,i,s){if(s>2){return}var a=openfl_geom_Point.__pool.get();a.setTo(t,i);var r=this.__displayMatrix;var n=r.a*r.d-r.b*r.c;if(n==0){a.x=-r.tx;a.y=-r.ty}else{var _=1/n*(r.c*(r.ty-a.y)+r.d*(a.x-r.tx));a.y=1/n*(r.a*(a.y-r.ty)+r.b*(r.tx-a.x));a.x=_}this.__mouseX=a.x;this.__mouseY=a.y;var o=[];var l=null;if(this.__hitTest(this.__mouseX,this.__mouseY,true,o,true,this)){l=o[o.length-1]}else{l=this;o=[this]}if(l==null){l=this}var h=null;switch(e){case"middleMouseDown":this.__mouseDownMiddle=l;break;case"middleMouseUp":if(this.__mouseDownMiddle==l){h="middleClick"}this.__mouseDownMiddle=null;break;case"mouseDown":if(l.__allowMouseFocus()){if(this.get_focus()!=null){var c=new openfl_events_FocusEvent("mouseFocusChange",true,true,l,false,0);this.__dispatchStack(c,o);if(!c.isDefaultPrevented()){this.set_focus(l)}}else{this.set_focus(l)}}else{this.set_focus(null)}this.__mouseDownLeft=l;openfl_events_MouseEvent.__buttonDown=true;break;case"mouseUp":if(this.__mouseDownLeft!=null){openfl_events_MouseEvent.__buttonDown=false;if(this.__mouseDownLeft==l){h="click"}else{var u=null;u=openfl_events_MouseEvent.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new openfl_geom_Point(this.__mouseX,this.__mouseY),this);this.__mouseDownLeft.dispatchEvent(u)}this.__mouseDownLeft=null}break;case"rightMouseDown":this.__mouseDownRight=l;break;case"rightMouseUp":if(this.__mouseDownRight==l){h="rightClick"}this.__mouseDownRight=null;break;default:}var f=openfl_geom_Point.__pool.get();var p=null;p=openfl_events_MouseEvent.__create(e,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);if(h!=null){p=openfl_events_MouseEvent.__create(h,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);if(e=="mouseUp"&&js_Boot.__cast(l,openfl_display_InteractiveObject).doubleClickEnabled){var d=openfl_Lib.getTimer();if(d-this.__lastClickTime<500){p=openfl_events_MouseEvent.__create("doubleClick",s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);this.__lastClickTime=0}else{this.__lastClickTime=d}}}if(openfl_ui_Mouse.__cursor=="auto"&&!openfl_ui_Mouse.__hidden){var g=null;if(this.__mouseDownLeft!=null){g=this.__mouseDownLeft.__getCursor()}else{var m=0;while(m>>16;var i=(e&65280)>>>8;var s=e&255;this.__colorSplit[0]=t/255;this.__colorSplit[1]=i/255;this.__colorSplit[2]=s/255;this.__colorString="#"+StringTools.hex(e&16777215,6);this.__renderDirty=true;this.__color=-16777216|e&16777215}return e},get_displayState:function(){return this.__displayState},set_displayState:function(e){if(this.window!=null){if(e==2){if(this.window.__fullscreen){this.window.set_fullscreen(false)}}else if(!this.window.__fullscreen){this.window.set_fullscreen(true)}}return this.__displayState=e},get_focus:function(){return this.__focus},set_focus:function(e){if(e!=this.__focus){var t=this.__focus;this.__focus=e;this.__cacheFocus=e;if(t!=null){var i=new openfl_events_FocusEvent("focusOut",true,false,e,false,0);var s=[];t.__getInteractive(s);s.reverse();this.__dispatchStack(i,s)}if(e!=null){var a=new openfl_events_FocusEvent("focusIn",true,false,t,false,0);var r=[];e.__getInteractive(r);r.reverse();this.__dispatchStack(a,r)}}return e},get_fullScreenSourceRect:function(){if(this.__fullScreenSourceRect==null){return null}else{return this.__fullScreenSourceRect.clone()}},set_height:function(e){return this.get_height()},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},get_quality:function(){return this.__quality},set_rotation:function(e){return 0},set_scaleX:function(e){return 0},set_scaleY:function(e){return 0},get_tabEnabled:function(){return false},set_tabEnabled:function(e){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Error: The Stage class does not implement this property or method."))},get_tabIndex:function(){return-1},set_transform:function(e){return this.get_transform()},set_width:function(e){return this.get_width()},set_x:function(e){return 0},set_y:function(e){return 0},__class__:openfl_display_Stage,__properties__:$extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_quality:"get_quality",get_fullScreenSourceRect:"get_fullScreenSourceRect",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color"})});var openfl_display_Stage3D=function(e){openfl_events_EventDispatcher.call(this);this.__stage=e;this.__height=0;this.__projectionTransform=new openfl_geom_Matrix3D;this.__renderTransform=new openfl_geom_Matrix3D;this.__width=0;this.__x=0;this.__y=0;this.visible=true;if(e.stageWidth>0&&e.stageHeight>0){this.__resize(e.stageWidth,e.stageHeight)}};$hxClasses["openfl.display.Stage3D"]=openfl_display_Stage3D;openfl_display_Stage3D.__name__=["openfl","display","Stage3D"];openfl_display_Stage3D.__super__=openfl_events_EventDispatcher;openfl_display_Stage3D.prototype=$extend(openfl_events_EventDispatcher.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,__webgl:null,__createContext:function(){var e=this.__stage;var t=e.__renderer;if(t.__type=="cairo"||t.__type=="canvas"){this.__dispatchError();return}if(t.__type=="opengl"){this.context3D=new openfl_display3D_Context3D(e,e.context3D.__contextState,this);this.__dispatchCreate()}else if(t.__type=="dom"){this.__canvas=window.document.createElement("canvas");this.__canvas.width=e.stageWidth;this.__canvas.height=e.stageHeight;var i=e.window;var s=t.__context.attributes;var a=Object.prototype.hasOwnProperty.call(s,"background")&&s.background==null;var r=Object.prototype.hasOwnProperty.call(s,"colorDepth")?s.colorDepth:32;var n={alpha:a||r>16,antialias:Object.prototype.hasOwnProperty.call(s,"antialiasing")&&s.antialiasing>0,depth:true,premultipliedAlpha:true,stencil:true,preserveDrawingBuffer:false};this.__webgl=js_html__$CanvasElement_CanvasUtil.getContextWebGL(this.__canvas,n);if(this.__webgl!=null){this.__dispatchError()}else{this.__dispatchError()}}},__dispatchError:function(){this.__contextRequested=false;this.dispatchEvent(new openfl_events_ErrorEvent("error",false,false,"Context3D not available"))},__dispatchCreate:function(){if(this.__contextRequested){this.__contextRequested=false;this.dispatchEvent(new openfl_events_Event("context3DCreate"))}},__lostContext:function(){this.__contextLost=true;if(this.context3D!=null){this.context3D.__dispose();this.__contextRequested=true}},__resize:function(e,t){if(e!=this.__width||t!=this.__height){if(this.__canvas!=null){this.__canvas.width=e;this.__canvas.height=t}this.__projectionTransform.copyRawDataFrom(openfl__$Vector_Vector_$Impl_$.toFloatVector(null,null,null,[2/(e>0?e:1),0,0,0,0,-2/(t>0?t: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=e;this.__height=t}},__restoreContext:function(){this.__contextLost=false;this.__createContext()},get_x:function(){return this.__x},get_y:function(){return this.__y},__class__:openfl_display_Stage3D,__properties__:{get_y:"get_y",get_x:"get_x"}});var openfl_display_Window=function(e,t){lime_ui_Window.call(this,e,t);this.stage=new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(t.context,"background")?t.context.background:16777215);if(Object.prototype.hasOwnProperty.call(t,"parameters")){try{this.stage.get_loaderInfo().parameters=t.parameters}catch(e){haxe_CallStack.lastException=e}}if(Object.prototype.hasOwnProperty.call(t,"resizable")&&!t.resizable){this.stage.__setLogicalSize(t.width,t.height)}e.addModule(this.stage)};$hxClasses["openfl.display.Window"]=openfl_display_Window;openfl_display_Window.__name__=["openfl","display","Window"];openfl_display_Window.__super__=lime_ui_Window;openfl_display_Window.prototype=$extend(lime_ui_Window.prototype,{__class__:openfl_display_Window});var openfl_display3D_Context3D=function(e,t,i){this.driverInfo="OpenGL (Direct blitting)";this.backBufferWidth=0;this.backBufferHeight=0;openfl_events_EventDispatcher.call(this);this.__stage=e;this.__contextState=t;this.__stage3D=i;this.__context=e.window.context;this.gl=this.__context.webgl;if(this.__contextState==null){this.__contextState=new openfl__$internal_renderer_context3D_Context3DState}this.__state=new openfl__$internal_renderer_context3D_Context3DState;var s=new Float32Array(512);this.__vertexConstants=s;var a=new Float32Array(512);this.__fragmentConstants=a;var r=[1,1,1,1];var n;if(r!=null){n=new Float32Array(r)}else{n=null}this.__positionScale=n;this.__programs=new haxe_ds_StringMap;if(openfl_display3D_Context3D.__glMaxViewportDims==-1){openfl_display3D_Context3D.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS)}this.maxBackBufferWidth=openfl_display3D_Context3D.__glMaxViewportDims;this.maxBackBufferHeight=openfl_display3D_Context3D.__glMaxViewportDims;if(openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy==-1){var _=this.gl.getExtension("EXT_texture_filter_anisotropic");if(_==null||!Object.prototype.hasOwnProperty.call(_,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){_=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")}if(_==null||!Object.prototype.hasOwnProperty.call(_,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){_=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")}if(_!=null){openfl_display3D_Context3D.__glTextureMaxAnisotropy=_.TEXTURE_MAX_ANISOTROPY_EXT;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=this.gl.getParameter(_.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{openfl_display3D_Context3D.__glTextureMaxAnisotropy=0;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=0}}if(openfl_display3D_Context3D.__glDepthStencil==-1){openfl_display3D_Context3D.__glDepthStencil=this.gl.DEPTH_STENCIL}if(openfl_display3D_Context3D.__driverInfo==null){var o=this.gl.getParameter(this.gl.VENDOR);var l=this.gl.getParameter(this.gl.VERSION);var h=this.gl.getParameter(this.gl.RENDERER);var c=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION);openfl_display3D_Context3D.__driverInfo="OpenGL Vendor="+o+" Version="+l+" Renderer="+h+" GLSL="+c}this.driverInfo=openfl_display3D_Context3D.__driverInfo;this.__quadIndexBufferElements=16383;this.__quadIndexBufferCount=this.__quadIndexBufferElements*6;var u=this.__quadIndexBufferCount;var f;if(u!=null){f=new Uint16Array(u)}else{f=null}var p=f;var d=0;var g=0;var m=0;var v=this.__quadIndexBufferElements;while(m0&&this.backBufferWidth>0){if(this.__renderStage3DProgram==null){var i=new openfl_utils_AGALMiniAssembler;i.assemble(openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString(1),"m44 op, va0, vc0\n"+"mov v0, va1");var s=new openfl_utils_AGALMiniAssembler;s.assemble(openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\n"+"mov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(i.agalcode,s.agalcode)}this.setProgram(this.__renderStage3DProgram);this.setBlendFactors(2,9);this.setColorMask(true,true,true,true);this.setCulling(3);this.setDepthTest(false,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,t.__frontBufferTexture);this.setVertexBufferAt(0,e.__vertexBuffer,0,3);this.setVertexBufferAt(1,e.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,e.__renderTransform,true);this.drawTriangles(e.__indexBuffer);this.__present=true}},__setGLBlend:function(e){if(this.__contextState.__enableGLBlend!=e){if(e){this.gl.enable(this.gl.BLEND)}else{this.gl.disable(this.gl.BLEND)}this.__contextState.__enableGLBlend=e}},__setGLBlendEquation:function(e){if(this.__contextState.__glBlendEquation!=e){this.gl.blendEquation(e);this.__contextState.__glBlendEquation=e}},__setGLCullFace:function(e){if(this.__contextState.__enableGLCullFace!=e){if(e){this.gl.enable(this.gl.CULL_FACE)}else{this.gl.disable(this.gl.CULL_FACE)}this.__contextState.__enableGLCullFace=e}},__setGLDepthTest:function(e){if(this.__contextState.__enableGLDepthTest!=e){if(e){this.gl.enable(this.gl.DEPTH_TEST)}else{this.gl.disable(this.gl.DEPTH_TEST)}this.__contextState.__enableGLDepthTest=e}},__setGLFrontFace:function(e){if(this.__contextState.__frontFaceGLCCW!=e){this.gl.frontFace(e?this.gl.CCW:this.gl.CW);this.__contextState.__frontFaceGLCCW=e}},__setGLScissorTest:function(e){if(this.__contextState.__enableGLScissorTest!=e){if(e){this.gl.enable(this.gl.SCISSOR_TEST)}else{this.gl.disable(this.gl.SCISSOR_TEST)}this.__contextState.__enableGLScissorTest=e}},__setGLStencilTest:function(e){if(this.__contextState.__enableGLStencilTest!=e){if(e){this.gl.enable(this.gl.STENCIL_TEST)}else{this.gl.disable(this.gl.STENCIL_TEST)}this.__contextState.__enableGLStencilTest=e}},__class__:openfl_display3D_Context3D});var openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$={};$hxClasses["openfl.display3D._Context3DBufferUsage.Context3DBufferUsage_Impl_"]=openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$;openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.__name__=["openfl","display3D","_Context3DBufferUsage","Context3DBufferUsage_Impl_"];openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString=function(e){switch(e){case"dynamicDraw":return 0;case"staticDraw":return 1;default:return null}};openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString=function(e){switch(e){case 0:return"dynamicDraw";case 1:return"staticDraw";default:return null}};var openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$={};$hxClasses["openfl.display3D._Context3DProgramType.Context3DProgramType_Impl_"]=openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$;openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.__name__=["openfl","display3D","_Context3DProgramType","Context3DProgramType_Impl_"];openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString=function(e){switch(e){case 0:return"fragment";case 1:return"vertex";default:return null}};var openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$={};$hxClasses["openfl.display3D._Context3DTextureFormat.Context3DTextureFormat_Impl_"]=openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$;openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.__name__=["openfl","display3D","_Context3DTextureFormat","Context3DTextureFormat_Impl_"];openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.toString=function(e){switch(e){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}};var openfl_display3D_IndexBuffer3D=function(e,t,i){this.__context=e;this.__numIndices=t;var s=this.__context.gl;this.__id=s.createBuffer();this.__usage=i==0?s.DYNAMIC_DRAW:s.STATIC_DRAW};$hxClasses["openfl.display3D.IndexBuffer3D"]=openfl_display3D_IndexBuffer3D;openfl_display3D_IndexBuffer3D.__name__=["openfl","display3D","IndexBuffer3D"];openfl_display3D_IndexBuffer3D.prototype={__context:null,__id:null,__numIndices:null,__tempUInt16Array:null,__usage:null,uploadFromTypedArray:function(e,t){if(t==null){t=-1}if(e==null){return}var i=this.__context.gl;this.__context.__bindGLElementArrayBuffer(this.__id);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(i,i.ELEMENT_ARRAY_BUFFER,e,this.__usage)},uploadFromVector:function(e,t,i){if(e==null){return}var s=this.__context.gl;var a=t+i;var r=this.__tempUInt16Array;if(this.__tempUInt16Array==null||this.__tempUInt16Array.length=0){c.name=c.name.substring(0,u)}var f=c.type;switch(f){case 35674:c.regCount=2;break;case 35675:c.regCount=3;break;case 35676:c.regCount=4;break;default:c.regCount=1}c.regCount*=c.size;this.__agalUniforms.add(c);if(c.name=="vcPositionScale"){this.__agalPositionScale=c}else if(StringTools.startsWith(c.name,"vc")){c.regIndex=Std.parseInt(c.name.substring(2));c.regData=this.__context.__vertexConstants;i.add(c)}else if(StringTools.startsWith(c.name,"fc")){c.regIndex=Std.parseInt(c.name.substring(2));c.regData=this.__context.__fragmentConstants;s.add(c)}else if(StringTools.startsWith(c.name,"sampler")&&c.name.indexOf("alpha")==-1){c.regIndex=Std.parseInt(c.name.substring(7));this.__agalSamplerUniforms.add(c);var p=0;var d=c.regCount;while(p-1&&StringTools.startsWith(h,"openfl_")){i.bindAttribLocation(this.__glProgram,0,h);break}}}i.attachShader(this.__glProgram,this.__glVertexShader);i.attachShader(this.__glProgram,this.__glFragmentShader);i.linkProgram(this.__glProgram);if(i.getProgramParameter(this.__glProgram,i.LINK_STATUS)==0){var c="Unable to initialize the shader program";c+="\n"+i.getProgramInfoLog(this.__glProgram);lime_utils_Log.error(c,{fileName:"Program3D.hx",lineNumber:925,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}},__class__:openfl_display3D_Program3D};var openfl_display3D_Uniform=function(e){this.context=e;this.isDirty=true;var t=new lime_utils_BytePointerData(null,0);this.regDataPointer=t};$hxClasses["openfl.display3D.Uniform"]=openfl_display3D_Uniform;openfl_display3D_Uniform.__name__=["openfl","display3D","Uniform"];openfl_display3D_Uniform.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,context:null,regDataPointer:null,flush:function(){var e=this.context.gl;var t=this.regIndex*4;var i=this.type;switch(i){case 35664:lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.uniform2fv(e,this.location,this.regData.subarray(t,t+this.regCount*2));break;case 35665:var s=this.location;var a=this.regData.subarray(t,t+this.regCount*3);e.uniform3fv(s,a);break;case 35666:var r=this.location;var n=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(r,n);break;case 35674:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(e,this.location,false,this.regData.subarray(t,t+this.size*2*2));break;case 35675:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(e,this.location,false,this.regData.subarray(t,t+this.size*3*3));break;case 35676:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(e,this.location,false,this.regData.subarray(t,t+this.size*4*4));break;default:var _=this.location;var o=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(_,o)}},__class__:openfl_display3D_Uniform};var openfl_display3D_UniformMap=function(e){this.__uniforms=e;this.__uniforms.sort(function(e,t){return Reflect.compare(e.regIndex,t.regIndex)});var t=0;var i=0;var s=this.__uniforms;while(it){t=a.regIndex+a.regCount}}this.__registerLookup=openfl__$Vector_Vector_$Impl_$.toObjectVector(null,t);var r=0;var n=this.__uniforms;while(rthis.__registerLookup.get_length()){i=this.__registerLookup.get_length()}var s=e;while(sopenfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_CUBE_MAP,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}return true}return false},__class__:openfl_display3D_textures_CubeTexture});var openfl_display3D_textures_RectangleTexture=function(e,t,i,s,a){openfl_display3D_textures_TextureBase.call(this,e);this.__width=t;this.__height=i;this.__optimizeForRenderToTexture=a;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);if(a){this.__getGLFramebuffer(true,0,0)}};$hxClasses["openfl.display3D.textures.RectangleTexture"]=openfl_display3D_textures_RectangleTexture;openfl_display3D_textures_RectangleTexture.__name__=["openfl","display3D","textures","RectangleTexture"];openfl_display3D_textures_RectangleTexture.__super__=openfl_display3D_textures_TextureBase;openfl_display3D_textures_RectangleTexture.prototype=$extend(openfl_display3D_textures_TextureBase.prototype,{uploadFromTypedArray:function(e){var t=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,t.UNSIGNED_BYTE,e);this.__context.__bindGLTexture2D(null)},__setSamplerState:function(e){if(openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,e)){var t=this.__context.gl;if(openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy!=0){var i;var s=e.filter;switch(s){case 0:i=16;break;case 1:i=2;break;case 2:i=4;break;case 3:i=8;break;default:i=1}if(i>openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}return true}return false},__uploadFromImage:function(e){var t=this.__context.gl;var i;var s;if(e.buffer.bitsPerPixel==1){i=t.ALPHA;s=t.ALPHA}else{i=openfl_display3D_textures_TextureBase.__textureInternalFormat;s=openfl_display3D_textures_TextureBase.__textureFormat}this.__context.__bindGLTexture2D(this.__textureID);if(e.type!=lime_graphics_ImageType.DATA&&!e.get_premultiplied()){t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}else if(!e.get_premultiplied()&&e.get_transparent()){t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}if(e.type==lime_graphics_ImageType.DATA){lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,i,e.buffer.width,e.buffer.height,0,s,t.UNSIGNED_BYTE,e.get_data())}else{lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,i,s,t.UNSIGNED_BYTE,e.get_src())}this.__context.__bindGLTexture2D(null)},__class__:openfl_display3D_textures_RectangleTexture});var openfl_display3D_textures_Texture=function(){};$hxClasses["openfl.display3D.textures.Texture"]=openfl_display3D_textures_Texture;openfl_display3D_textures_Texture.__name__=["openfl","display3D","textures","Texture"];openfl_display3D_textures_Texture.__super__=openfl_display3D_textures_TextureBase;openfl_display3D_textures_Texture.prototype=$extend(openfl_display3D_textures_TextureBase.prototype,{__setSamplerState:function(e){if(openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,e)){var t=this.__context.gl;if(e.mipfilter!=2&&!this.__samplerState.mipmapGenerated){t.generateMipmap(t.TEXTURE_2D);this.__samplerState.mipmapGenerated=true}if(openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy!=0){var i;var s=e.filter;switch(s){case 0:i=16;break;case 1:i=2;break;case 2:i=4;break;case 3:i=8;break;default:i=1}if(i>openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}return true}return false},__class__:openfl_display3D_textures_Texture});var openfl_errors_Error=function(e,t){if(t==null){t=0}if(e==null){e=""}this.message=e;this.errorID=t;this.name="Error"};$hxClasses["openfl.errors.Error"]=openfl_errors_Error;openfl_errors_Error.__name__=["openfl","errors","Error"];openfl_errors_Error.prototype={errorID:null,message:null,name:null,getStackTrace:function(){return haxe_CallStack.toString(haxe_CallStack.exceptionStack())},toString:function(){if(this.message!=null){return this.message}else{return"Error"}},__class__:openfl_errors_Error};var openfl_errors_ArgumentError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e);this.name="ArgumentError"};$hxClasses["openfl.errors.ArgumentError"]=openfl_errors_ArgumentError;openfl_errors_ArgumentError.__name__=["openfl","errors","ArgumentError"];openfl_errors_ArgumentError.__super__=openfl_errors_Error;openfl_errors_ArgumentError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_ArgumentError});var openfl_errors_IOError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e);this.name="IOError"};$hxClasses["openfl.errors.IOError"]=openfl_errors_IOError;openfl_errors_IOError.__name__=["openfl","errors","IOError"];openfl_errors_IOError.__super__=openfl_errors_Error;openfl_errors_IOError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_IOError});var openfl_errors_EOFError=function(e,t){if(t==null){t=0}openfl_errors_IOError.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030};$hxClasses["openfl.errors.EOFError"]=openfl_errors_EOFError;openfl_errors_EOFError.__name__=["openfl","errors","EOFError"];openfl_errors_EOFError.__super__=openfl_errors_IOError;openfl_errors_EOFError.prototype=$extend(openfl_errors_IOError.prototype,{__class__:openfl_errors_EOFError});var openfl_errors_IllegalOperationError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="IllegalOperationError"};$hxClasses["openfl.errors.IllegalOperationError"]=openfl_errors_IllegalOperationError;openfl_errors_IllegalOperationError.__name__=["openfl","errors","IllegalOperationError"];openfl_errors_IllegalOperationError.__super__=openfl_errors_Error;openfl_errors_IllegalOperationError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_IllegalOperationError});var openfl_errors_RangeError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="RangeError"};$hxClasses["openfl.errors.RangeError"]=openfl_errors_RangeError;openfl_errors_RangeError.__name__=["openfl","errors","RangeError"];openfl_errors_RangeError.__super__=openfl_errors_Error;openfl_errors_RangeError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_RangeError});var openfl_errors_TypeError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="TypeError"};$hxClasses["openfl.errors.TypeError"]=openfl_errors_TypeError;openfl_errors_TypeError.__name__=["openfl","errors","TypeError"];openfl_errors_TypeError.__super__=openfl_errors_Error;openfl_errors_TypeError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_TypeError});var openfl_events_ActivityEvent=function(e,t,i,s){if(s==null){s=false}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.activating=s};$hxClasses["openfl.events.ActivityEvent"]=openfl_events_ActivityEvent;openfl_events_ActivityEvent.__name__=["openfl","events","ActivityEvent"];openfl_events_ActivityEvent.__super__=openfl_events_Event;openfl_events_ActivityEvent.prototype=$extend(openfl_events_Event.prototype,{activating:null,__class__:openfl_events_ActivityEvent});var openfl_events_TextEvent=function(e,t,i,s){if(s==null){s=""}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.text=s};$hxClasses["openfl.events.TextEvent"]=openfl_events_TextEvent;openfl_events_TextEvent.__name__=["openfl","events","TextEvent"];openfl_events_TextEvent.__super__=openfl_events_Event;openfl_events_TextEvent.prototype=$extend(openfl_events_Event.prototype,{text:null,__class__:openfl_events_TextEvent});var openfl_events_ErrorEvent=function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=""}if(i==null){i=false}if(t==null){t=false}openfl_events_TextEvent.call(this,e,t,i,s);this.errorID=a};$hxClasses["openfl.events.ErrorEvent"]=openfl_events_ErrorEvent;openfl_events_ErrorEvent.__name__=["openfl","events","ErrorEvent"];openfl_events_ErrorEvent.__super__=openfl_events_TextEvent;openfl_events_ErrorEvent.prototype=$extend(openfl_events_TextEvent.prototype,{errorID:null,__class__:openfl_events_ErrorEvent});var openfl_events_AsyncErrorEvent=function(){};$hxClasses["openfl.events.AsyncErrorEvent"]=openfl_events_AsyncErrorEvent;openfl_events_AsyncErrorEvent.__name__=["openfl","events","AsyncErrorEvent"];openfl_events_AsyncErrorEvent.__super__=openfl_events_ErrorEvent;openfl_events_AsyncErrorEvent.prototype=$extend(openfl_events_ErrorEvent.prototype,{__class__:openfl_events_AsyncErrorEvent});var openfl_events__$EventDispatcher_DispatchIterator=function(e){this.active=false;this.reset(e)};$hxClasses["openfl.events._EventDispatcher.DispatchIterator"]=openfl_events__$EventDispatcher_DispatchIterator;openfl_events__$EventDispatcher_DispatchIterator.__name__=["openfl","events","_EventDispatcher","DispatchIterator"];openfl_events__$EventDispatcher_DispatchIterator.prototype={active:null,index:null,isCopy:null,list:null,copy:function(){if(!this.isCopy){this.list=this.list.slice();this.isCopy=true}},hasNext:function(){return this.index0){functionName+=".bind("+thisArg+")"}}var fn;try{fn=eval(functionName)}catch(e){haxe_CallStack.lastException=e;return null}if(Type["typeof"](fn)!=ValueType.TFunction){return null}if(p1==null){callResponse=fn()}else if(p2==null){callResponse=fn(p1)}else if(p3==null){callResponse=fn(p1,p2)}else if(p4==null){callResponse=fn(p1,p2,p3)}else if(p5==null){callResponse=fn(p1,p2,p3,p4)}else{callResponse=fn(p1,p2,p3,p4,p5)}return callResponse};var openfl_filters_BitmapFilter=function(){this.__bottomExtension=0;this.__leftExtension=0;this.__needSecondBitmapData=true;this.__numShaderPasses=0;this.__preserveObject=false;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=true};$hxClasses["openfl.filters.BitmapFilter"]=openfl_filters_BitmapFilter;openfl_filters_BitmapFilter.__name__=["openfl","filters","BitmapFilter"];openfl_filters_BitmapFilter.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,__shaderBlendMode:null,__smooth:null,__topExtension:null,__applyFilter:function(e,t,i,s){return t},__initShader:function(e,t){return null},__class__:openfl_filters_BitmapFilter};var openfl_filters_BitmapFilterShader=function(e){if(this.__glFragmentSource==null){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}"}if(this.__glVertexSource==null){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}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters.BitmapFilterShader"]=openfl_filters_BitmapFilterShader;openfl_filters_BitmapFilterShader.__name__=["openfl","filters","BitmapFilterShader"];openfl_filters_BitmapFilterShader.__super__=openfl_display_Shader;openfl_filters_BitmapFilterShader.prototype=$extend(openfl_display_Shader.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:openfl_filters_BitmapFilterShader});var openfl_filters__$BlurFilter_BlurShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[6]) * 0.00443;\n\t\t\t\n\t\t\tgl_FragColor = sum;\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r * 1.0;\n\t\t\t\n\t\t}"}openfl_filters_BitmapFilterShader.call(this);this.uRadius.value=[0,0];this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters._BlurFilter.BlurShader"]=openfl_filters__$BlurFilter_BlurShader;openfl_filters__$BlurFilter_BlurShader.__name__=["openfl","filters","_BlurFilter","BlurShader"];openfl_filters__$BlurFilter_BlurShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$BlurFilter_BlurShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];openfl_filters_BitmapFilterShader.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:openfl_filters__$BlurFilter_BlurShader});var openfl_filters_BlurFilter=function(e,t,i){if(i==null){i=1}if(t==null){t=4}if(e==null){e=4}openfl_filters_BitmapFilter.call(this);this.set_blurX(e);this.set_blurY(t);this.set_quality(i);this.__needSecondBitmapData=true;this.__preserveObject=false;this.__renderDirty=true};$hxClasses["openfl.filters.BlurFilter"]=openfl_filters_BlurFilter;openfl_filters_BlurFilter.__name__=["openfl","filters","BlurFilter"];openfl_filters_BlurFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_BlurFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,__applyFilter:function(e,t,i,s){var a=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);if(a==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var i=Math.pow(.5,t>>1);openfl_filters_BlurFilter.__blurShader.uRadius.value[0]=this.get_blurX()*i;openfl_filters_BlurFilter.__blurShader.uRadius.value[1]=0}else{var s=Math.pow(.5,t-this.__horizontalPasses>>1);openfl_filters_BlurFilter.__blurShader.uRadius.value[0]=0;openfl_filters_BlurFilter.__blurShader.uRadius.value[1]=this.get_blurY()*s}return openfl_filters_BlurFilter.__blurShader},get_blurX:function(){return this.__blurX},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__leftExtension=e>0?Math.ceil(e):0;this.__rightExtension=this.__leftExtension}return e},get_blurY:function(){return this.__blurY},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__topExtension=e>0?Math.ceil(e):0;this.__bottomExtension=this.__topExtension}return e},set_quality:function(e){this.__horizontalPasses=this.__blurX<=0?0:Math.round(this.__blurX*(e/4))+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__blurY*(e/4))+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_BlurFilter,__properties__:{set_quality:"set_quality",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX"}});var openfl_filters__$ColorMatrixFilter_ColorMatrixShader=function(){if(this.__glFragmentSource==null){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}"}if(this.__glVertexSource==null){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}"}openfl_filters_BitmapFilterShader.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=true;this.__initGL()};$hxClasses["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=openfl_filters__$ColorMatrixFilter_ColorMatrixShader;openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__name__=["openfl","filters","_ColorMatrixFilter","ColorMatrixShader"];openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$ColorMatrixFilter_ColorMatrixShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{init:function(e){var t=this.uMultipliers.value;var i=this.uOffsets.value;t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[5];t[5]=e[6];t[6]=e[7];t[7]=e[8];t[8]=e[10];t[9]=e[11];t[10]=e[12];t[11]=e[13];t[12]=e[15];t[13]=e[16];t[14]=e[17];t[15]=e[18];i[0]=e[4]/255;i[1]=e[9]/255;i[2]=e[14]/255;i[3]=e[19]/255},uMultipliers:null,uOffsets:null,__class__:openfl_filters__$ColorMatrixFilter_ColorMatrixShader});var openfl_filters_ColorMatrixFilter=function(e){openfl_filters_BitmapFilter.call(this);this.set_matrix(e);this.__numShaderPasses=1;this.__needSecondBitmapData=false};$hxClasses["openfl.filters.ColorMatrixFilter"]=openfl_filters_ColorMatrixFilter;openfl_filters_ColorMatrixFilter.__name__=["openfl","filters","ColorMatrixFilter"];openfl_filters_ColorMatrixFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_ColorMatrixFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__matrix:null,__applyFilter:function(e,t,i,s){var a=t.image;var r=e.image;lime__$internal_graphics_ImageCanvasUtil.convertToData(a);lime__$internal_graphics_ImageCanvasUtil.convertToData(r);var n=a.get_data();var _=r.get_data();var o=s.x-i.x|0;var l=s.y-i.y|0;var h=t.width*4;var c=e.width*4;var u=a.buffer.format;var f=r.buffer.format;var p=a.buffer.premultiplied;var d=r.buffer.premultiplied;var g;var m=0;var v;var b;var y=i.y|0;var x=i.height|0;while(y>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|g&255&255}}if((g&255)==0){m=0}else{var T=Math.max(0,Math.min(this.__matrix[0]*(g>>>24&255)+this.__matrix[1]*(g>>>16&255)+this.__matrix[2]*(g>>>8&255)+this.__matrix[3]*(g&255)+this.__matrix[4],255))|0;m=(T&255)<<24|(m>>>16&255&255)<<16|(m>>>8&255&255)<<8|m&255&255;var M=Math.max(0,Math.min(this.__matrix[5]*(g>>>24&255)+this.__matrix[6]*(g>>>16&255)+this.__matrix[7]*(g>>>8&255)+this.__matrix[8]*(g&255)+this.__matrix[9],255))|0;m=(m>>>24&255&255)<<24|(M&255)<<16|(m>>>8&255&255)<<8|m&255&255;var S=Math.max(0,Math.min(this.__matrix[10]*(g>>>24&255)+this.__matrix[11]*(g>>>16&255)+this.__matrix[12]*(g>>>8&255)+this.__matrix[13]*(g&255)+this.__matrix[14],255))|0;m=(m>>>24&255&255)<<24|(m>>>16&255&255)<<16|(S&255)<<8|m&255&255;var $=Math.max(0,Math.min(this.__matrix[15]*(g>>>24&255)+this.__matrix[16]*(g>>>16&255)+this.__matrix[17]*(g>>>8&255)+this.__matrix[18]*(g&255)+this.__matrix[19],255))|0;m=(m>>>24&255&255)<<24|(m>>>16&255&255)<<16|(m>>>8&255&255)<<8|$&255}if(d){if((m&255)==0){if(m!=0){m=0}}else if((m&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[m&255];m=((m>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((m>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((m>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|m&255&255}}switch(f){case 0:_[b]=m>>>24&255;_[b+1]=m>>>16&255;_[b+2]=m>>>8&255;_[b+3]=m&255;break;case 1:_[b]=m&255;_[b+1]=m>>>24&255;_[b+2]=m>>>16&255;_[b+3]=m>>>8&255;break;case 2:_[b]=m>>>8&255;_[b+1]=m>>>16&255;_[b+2]=m>>>24&255;_[b+3]=m&255;break}}}e.image.dirty=true;return e},__initShader:function(e,t){openfl_filters_ColorMatrixFilter.__colorMatrixShader.init(this.get_matrix());return openfl_filters_ColorMatrixFilter.__colorMatrixShader},get_matrix:function(){return this.__matrix},set_matrix:function(e){if(e==null){e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}return this.__matrix=e},__class__:openfl_filters_ColorMatrixFilter,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix"}});var openfl_filters__$ConvolutionFilter_ConvolutionShader=function(){};$hxClasses["openfl.filters._ConvolutionFilter.ConvolutionShader"]=openfl_filters__$ConvolutionFilter_ConvolutionShader;openfl_filters__$ConvolutionFilter_ConvolutionShader.__name__=["openfl","filters","_ConvolutionFilter","ConvolutionShader"];openfl_filters__$ConvolutionFilter_ConvolutionShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$ConvolutionFilter_ConvolutionShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{uBias:null,uConvoMatrix:null,uDivisor:null,uPreserveAlpha:null,__class__:openfl_filters__$ConvolutionFilter_ConvolutionShader});var openfl_filters__$DisplacementMapFilter_DisplacementMapShader=function(){};$hxClasses["openfl.filters._DisplacementMapFilter.DisplacementMapShader"]=openfl_filters__$DisplacementMapFilter_DisplacementMapShader;openfl_filters__$DisplacementMapFilter_DisplacementMapShader.__name__=["openfl","filters","_DisplacementMapFilter","DisplacementMapShader"];openfl_filters__$DisplacementMapFilter_DisplacementMapShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$DisplacementMapFilter_DisplacementMapShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{mapTextureCoordsOffset:null,mapTexture:null,uOffsets:null,uDisplacements:null,__class__:openfl_filters__$DisplacementMapFilter_DisplacementMapShader});var openfl_filters_DropShadowFilter=function(e,t,i,s,a,r,n,_,o,l,h){if(h==null){h=false}if(l==null){l=false}if(o==null){o=false}if(_==null){_=1}if(n==null){n=1}if(r==null){r=4}if(a==null){a=4}if(s==null){s=1}if(i==null){i=0}if(t==null){t=45}if(e==null){e=4}openfl_filters_BitmapFilter.call(this);this.__offsetX=0;this.__offsetY=0;this.__distance=e;this.__angle=t;this.__color=i;this.__alpha=s;this.__blurX=a;this.__blurY=r;this.__strength=n;this.__quality=_;this.__inner=o;this.__knockout=l;this.__hideObject=h;this.__updateSize();this.__needSecondBitmapData=true;this.__preserveObject=!this.__hideObject;this.__renderDirty=true};$hxClasses["openfl.filters.DropShadowFilter"]=openfl_filters_DropShadowFilter;openfl_filters_DropShadowFilter.__name__=["openfl","filters","DropShadowFilter"];openfl_filters_DropShadowFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_DropShadowFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__alpha:null,__angle:null,__blurX:null,__blurY:null,__color:null,__distance:null,__hideObject:null,__inner:null,__knockout:null,__offsetX:null,__offsetY:null,__quality:null,__strength:null,__applyFilter:function(e,t,i,s){var a=this.__color>>16&255;var r=this.__color>>8&255;var n=this.__color&255;var _=new openfl_geom_Point(s.x+this.__offsetX,s.y+this.__offsetY);var o=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),_.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);o.colorTransform(o.get_rect(),new openfl_geom_ColorTransform(0,0,0,this.__alpha,a,r,n,0).__toLimeColorMatrix());if(o==e.image){return e}return t},__updateSize:function(){this.__offsetX=this.__distance*Math.cos(this.__angle*Math.PI/180)|0;this.__offsetY=this.__distance*Math.sin(this.__angle*Math.PI/180)|0;this.__topExtension=Math.ceil((this.__offsetY<0?-this.__offsetY:0)+this.__blurY);this.__bottomExtension=Math.ceil((this.__offsetY>0?this.__offsetY:0)+this.__blurY);this.__leftExtension=Math.ceil((this.__offsetX<0?-this.__offsetX:0)+this.__blurX);this.__rightExtension=Math.ceil((this.__offsetX>0?this.__offsetX:0)+this.__blurX)},set_alpha:function(e){if(e!=this.__alpha){this.__renderDirty=true}return this.__alpha=e},set_angle:function(e){if(e!=this.__angle){this.__angle=e;this.__renderDirty=true;this.__updateSize()}return e},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__updateSize()}return e},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__updateSize()}return e},set_distance:function(e){if(e!=this.__distance){this.__distance=e;this.__renderDirty=true;this.__updateSize()}return e},set_quality:function(e){if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_DropShadowFilter,__properties__:{set_quality:"set_quality",set_distance:"set_distance",set_blurY:"set_blurY",set_blurX:"set_blurX",set_angle:"set_angle",set_alpha:"set_alpha"}});var openfl_filters__$GlowFilter_GlowShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\t\t\n\t\tuniform vec4 uColor;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tfloat a = 0.0;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[0]).a * 0.00443;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[1]).a * 0.05399;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[2]).a * 0.24197;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[3]).a * 0.39894;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[4]).a * 0.24197;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[5]).a * 0.05399;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[6]).a * 0.00443;\n\t\t\ta *= uColor.a;\n\t\t\t\n\t\t\tgl_FragColor = vec4(uColor.rgb * a, a);\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t\tvec2 r = uRadius / openfl_TextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r * 1.0;\n\t\t\t\n\t\t}"}openfl_filters_BitmapFilterShader.call(this);this.uRadius.value=[0,0];this.uColor.value=[0,0,0,0];this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters._GlowFilter.GlowShader"]=openfl_filters__$GlowFilter_GlowShader;openfl_filters__$GlowFilter_GlowShader.__name__=["openfl","filters","_GlowFilter","GlowShader"];openfl_filters__$GlowFilter_GlowShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$GlowFilter_GlowShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{uRadius:null,uColor:null,__class__:openfl_filters__$GlowFilter_GlowShader});var openfl_filters_GlowFilter=function(e,t,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=false}if(r==null){r=1}if(a==null){a=2}if(s==null){s=6}if(i==null){i=6}if(t==null){t=1}if(e==null){e=16711680}openfl_filters_BitmapFilter.call(this);this.__color=e;this.__alpha=t;this.set_blurX(i);this.set_blurY(s);this.__strength=a;this.set_quality(r);this.__inner=n;this.__knockout=_;this.__needSecondBitmapData=true;this.__preserveObject=true;this.__renderDirty=true};$hxClasses["openfl.filters.GlowFilter"]=openfl_filters_GlowFilter;openfl_filters_GlowFilter.__name__=["openfl","filters","GlowFilter"];openfl_filters_GlowFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_GlowFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__alpha:null,__blurX:null,__blurY:null,__color:null,__horizontalPasses:null,__inner:null,__knockout:null,__quality:null,__strength:null,__verticalPasses:null,__applyFilter:function(e,t,i,s){var a=this.__color>>16&255;var r=this.__color>>8&255;var n=this.__color&255;var _=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);_.colorTransform(_.get_rect(),new openfl_geom_ColorTransform(0,0,0,this.__alpha,a,r,n,0).__toLimeColorMatrix());if(_==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var i=Math.pow(.5,t>>1);openfl_filters_GlowFilter.__glowShader.uRadius.value[0]=this.get_blurX()*i;openfl_filters_GlowFilter.__glowShader.uRadius.value[1]=0}else{var s=Math.pow(.5,t-this.__horizontalPasses>>1);openfl_filters_GlowFilter.__glowShader.uRadius.value[0]=0;openfl_filters_GlowFilter.__glowShader.uRadius.value[1]=this.get_blurY()*s}openfl_filters_GlowFilter.__glowShader.uColor.value[0]=(this.get_color()>>16&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[1]=(this.get_color()>>8&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[2]=(this.get_color()&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[3]=this.get_alpha()*(this.__strength/this.__numShaderPasses);return openfl_filters_GlowFilter.__glowShader},get_alpha:function(){return this.__alpha},set_alpha:function(e){if(e!=this.__alpha){this.__renderDirty=true}return this.__alpha=e},get_blurX:function(){return this.__blurX},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__leftExtension=e>0?Math.ceil(e*1.5):0;this.__rightExtension=this.__leftExtension}return e},get_blurY:function(){return this.__blurY},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__topExtension=e>0?Math.ceil(e*1.5):0;this.__bottomExtension=this.__topExtension}return e},get_color:function(){return this.__color},set_color:function(e){if(e!=this.__color){this.__renderDirty=true}return this.__color=e},set_inner:function(e){if(e!=this.__inner){this.__renderDirty=true}return this.__inner=e},set_quality:function(e){this.__horizontalPasses=this.__blurX<=0?0:Math.round(this.__blurX*(e/4))+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__blurY*(e/4))+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_GlowFilter,__properties__:{set_quality:"set_quality",set_inner:"set_inner",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var openfl_geom_Matrix3D=function(e){if(e!=null&&e.get_length()==16){this.rawData=e.concat(null)}else{this.rawData=openfl__$Vector_Vector_$Impl_$.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}};$hxClasses["openfl.geom.Matrix3D"]=openfl_geom_Matrix3D;openfl_geom_Matrix3D.__name__=["openfl","geom","Matrix3D"];openfl_geom_Matrix3D.prototype={rawData:null,append:function(e){var t=this.rawData.get(0);var i=this.rawData.get(4);var s=this.rawData.get(8);var a=this.rawData.get(12);var r=this.rawData.get(1);var n=this.rawData.get(5);var _=this.rawData.get(9);var o=this.rawData.get(13);var l=this.rawData.get(2);var h=this.rawData.get(6);var c=this.rawData.get(10);var u=this.rawData.get(14);var f=this.rawData.get(3);var p=this.rawData.get(7);var d=this.rawData.get(11);var g=this.rawData.get(15);var m=e.rawData.get(0);var v=e.rawData.get(4);var b=e.rawData.get(8);var y=e.rawData.get(12);var x=e.rawData.get(1);var w=e.rawData.get(5);var k=e.rawData.get(9);var P=e.rawData.get(13);var C=e.rawData.get(2);var T=e.rawData.get(6);var M=e.rawData.get(10);var S=e.rawData.get(14);var $=e.rawData.get(3);var E=e.rawData.get(7);var B=e.rawData.get(11);var L=e.rawData.get(15);this.rawData.set(0,t*m+r*v+l*b+f*y);this.rawData.set(1,t*x+r*w+l*k+f*P);this.rawData.set(2,t*C+r*T+l*M+f*S);this.rawData.set(3,t*$+r*E+l*B+f*L);this.rawData.set(4,i*m+n*v+h*b+p*y);this.rawData.set(5,i*x+n*w+h*k+p*P);this.rawData.set(6,i*C+n*T+h*M+p*S);this.rawData.set(7,i*$+n*E+h*B+p*L);this.rawData.set(8,s*m+_*v+c*b+d*y);this.rawData.set(9,s*x+_*w+c*k+d*P);this.rawData.set(10,s*C+_*T+c*M+d*S);this.rawData.set(11,s*$+_*E+c*B+d*L);this.rawData.set(12,a*m+o*v+u*b+g*y);this.rawData.set(13,a*x+o*w+u*k+g*P);this.rawData.set(14,a*C+o*T+u*M+g*S);this.rawData.set(15,a*$+o*E+u*B+g*L)},appendTranslation:function(e,t,i){var s=this.rawData;s.set(12,s.get(12)+e);var a=this.rawData;a.set(13,a.get(13)+t);var r=this.rawData;r.set(14,r.get(14)+i)},copyRawDataFrom:function(e,t,i){if(i==null){i=false}if(t==null){t=0}if(i){this.transpose()}var s=e.get_length()-t;var a=0;var r=s;while(a=32){return null}if(i==null){i=new openfl_media_SoundTransform}else{i=i.clone()}var s=openfl_media_SoundMixer.__soundTransform.pan+i.pan;if(s>1){s=1}if(s<-1){s=-1}var a=openfl_media_SoundMixer.__soundTransform.volume*i.volume;var r=new lime_media_AudioSource(this.__buffer);r.offset=e|0;if(t>1){r.set_loops(t-1)}r.set_gain(a);var n=r.get_position();n.x=s;n.z=-1*Math.sqrt(1-Math.pow(s,2));r.set_position(n);return new openfl_media_SoundChannel(r,i)},get_id3:function(){return new openfl_media_ID3Info},get_length:function(){if(this.__buffer!=null){return this.__buffer.get_src().duration()*1e3|0}return 0},AudioBuffer_onURLLoad:function(e){if(e==null){this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"))}else{this.__buffer=e;this.dispatchEvent(new openfl_events_Event("complete"))}},__class__:openfl_media_Sound,__properties__:{get_length:"get_length",get_id3:"get_id3"}});var openfl_media_SoundChannel=function(e,t){openfl_events_EventDispatcher.call(this,this);this.leftPeak=1;this.rightPeak=1;if(t!=null){this.__soundTransform=t}else{this.__soundTransform=new openfl_media_SoundTransform}if(e!=null){this.__source=e;this.__source.onComplete.add($bind(this,this.source_onComplete));this.__isValid=true;this.__source.play()}openfl_media_SoundMixer.__registerSoundChannel(this)};$hxClasses["openfl.media.SoundChannel"]=openfl_media_SoundChannel;openfl_media_SoundChannel.__name__=["openfl","media","SoundChannel"];openfl_media_SoundChannel.__super__=openfl_events_EventDispatcher;openfl_media_SoundChannel.prototype=$extend(openfl_events_EventDispatcher.prototype,{leftPeak:null,rightPeak:null,__isValid:null,__soundTransform:null,__source:null,stop:function(){openfl_media_SoundMixer.__unregisterSoundChannel(this);if(!this.__isValid){return}this.__source.stop();this.__dispose()},__dispose:function(){if(!this.__isValid){return}this.__source.onComplete.remove($bind(this,this.source_onComplete));this.__source.dispose();this.__source=null;this.__isValid=false},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},get_position:function(){if(!this.__isValid){return 0}return this.__source.get_currentTime()+this.__source.offset},set_position:function(e){if(!this.__isValid){return 0}this.__source.set_currentTime((e|0)-this.__source.offset);return e},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(e){if(e!=null){this.__soundTransform.pan=e.pan;this.__soundTransform.volume=e.volume;var t=openfl_media_SoundMixer.__soundTransform.pan+this.__soundTransform.pan;if(t<-1){t=-1}if(t>1){t=1}var i=openfl_media_SoundMixer.__soundTransform.volume*this.__soundTransform.volume;if(this.__isValid){this.__source.set_gain(i);var s=this.__source.get_position();s.x=t;s.z=-1*Math.sqrt(1-Math.pow(t,2));this.__source.set_position(s);return e}}return e},source_onComplete:function(){openfl_media_SoundMixer.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new openfl_events_Event("soundComplete"))},__class__:openfl_media_SoundChannel,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var openfl_media_SoundLoaderContext=function(){};$hxClasses["openfl.media.SoundLoaderContext"]=openfl_media_SoundLoaderContext;openfl_media_SoundLoaderContext.__name__=["openfl","media","SoundLoaderContext"];var openfl_media_SoundTransform=function(e,t){if(t==null){t=0}if(e==null){e=1}this.volume=e;this.pan=t;this.leftToLeft=0;this.leftToRight=0;this.rightToLeft=0;this.rightToRight=0};$hxClasses["openfl.media.SoundTransform"]=openfl_media_SoundTransform;openfl_media_SoundTransform.__name__=["openfl","media","SoundTransform"];openfl_media_SoundTransform.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new openfl_media_SoundTransform(this.volume,this.pan)},__class__:openfl_media_SoundTransform};var openfl_media_SoundMixer=function(){};$hxClasses["openfl.media.SoundMixer"]=openfl_media_SoundMixer;openfl_media_SoundMixer.__name__=["openfl","media","SoundMixer"];openfl_media_SoundMixer.__registerSoundChannel=function(e){openfl_media_SoundMixer.__soundChannels.push(e)};openfl_media_SoundMixer.__unregisterSoundChannel=function(e){HxOverrides.remove(openfl_media_SoundMixer.__soundChannels,e)};var openfl_net_NetConnection=function(){openfl_events_EventDispatcher.call(this)};$hxClasses["openfl.net.NetConnection"]=openfl_net_NetConnection;openfl_net_NetConnection.__name__=["openfl","net","NetConnection"];openfl_net_NetConnection.__super__=openfl_events_EventDispatcher;openfl_net_NetConnection.prototype=$extend(openfl_events_EventDispatcher.prototype,{connect:function(e,t,i,s,a,r){if(e!=null){throw new js__$Boot_HaxeError('Error: Can only connect in "HTTP streaming" mode')}this.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,true,{code:"NetConnection.Connect.Success"}))},__class__:openfl_net_NetConnection});var openfl_net_SharedObject=function(){openfl_events_EventDispatcher.call(this);this.client=this;this.objectEncoding=openfl_net_SharedObject.defaultObjectEncoding};$hxClasses["openfl.net.SharedObject"]=openfl_net_SharedObject;openfl_net_SharedObject.__name__=["openfl","net","SharedObject"];openfl_net_SharedObject.getLocal=function(e,t,i){if(i==null){i=false}var s=[" ","~","%","&","\\",";",":",'"',"'",",","<",">","?","#"];var a=true;if(e==null||e==""){a=false}else{var r=0;while(r-1){a=false;break}}}if(!a){throw new js__$Boot_HaxeError(new openfl_errors_Error("Error #2134: Cannot create SharedObject."))}if(openfl_net_SharedObject.__sharedObjects==null){openfl_net_SharedObject.__sharedObjects=new haxe_ds_StringMap;if(lime_app_Application.current!=null){lime_app_Application.current.onExit.add(openfl_net_SharedObject.application_onExit)}}var _=t+"/"+e;var o=openfl_net_SharedObject.__sharedObjects;if(!(__map_reserved[_]!=null?o.existsReserved(_):o.h.hasOwnProperty(_))){var l=null;try{var h=js_Browser.getLocalStorage();if(t==null){if(h!=null){l=h.getItem(window.location.href+":"+e);h.removeItem(window.location.href+":"+e)}t=window.location.pathname}if(h!=null&&l==null){l=h.getItem(t+":"+e)}}catch(e){haxe_CallStack.lastException=e}var c=new openfl_net_SharedObject;c.data={};c.__localPath=t;c.__name=e;if(l!=null&&l!=""){try{var u=new haxe_Unserializer(l);u.setResolver({resolveEnum:Type.resolveEnum,resolveClass:openfl_net_SharedObject.__resolveClass});c.data=u.unserialize()}catch(e){haxe_CallStack.lastException=e}}var f=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[_]!=null){f.setReserved(_,c)}else{f.h[_]=c}}var p=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[_]!=null){return p.getReserved(_)}else{return p.h[_]}};openfl_net_SharedObject.__resolveClass=function(e){if(e!=null){if(StringTools.startsWith(e,"neash.")){e=StringTools.replace(e,"neash.","openfl.")}if(StringTools.startsWith(e,"native.")){e=StringTools.replace(e,"native.","openfl.")}if(StringTools.startsWith(e,"flash.")){e=StringTools.replace(e,"flash.","openfl.")}if(StringTools.startsWith(e,"openfl._v2.")){e=StringTools.replace(e,"openfl._v2.","openfl.")}if(StringTools.startsWith(e,"openfl._legacy.")){e=StringTools.replace(e,"openfl._legacy.","openfl.")}return Type.resolveClass(e)}return null};openfl_net_SharedObject.application_onExit=function(e){var t=openfl_net_SharedObject.__sharedObjects;var i=new haxe_ds__$StringMap_StringMapIterator(t,t.arrayKeys());while(i.hasNext()){var s=i.next();s.flush()}};openfl_net_SharedObject.__super__=openfl_events_EventDispatcher;openfl_net_SharedObject.prototype=$extend(openfl_events_EventDispatcher.prototype,{client:null,data:null,objectEncoding:null,__localPath:null,__name:null,flush:function(e){if(e==null){e=0}if(Reflect.fields(this.data).length==0){return 0}var t=haxe_Serializer.run(this.data);try{var i=js_Browser.getLocalStorage();if(i!=null){i.removeItem(this.__localPath+":"+this.__name);i.setItem(this.__localPath+":"+this.__name,t)}}catch(e){haxe_CallStack.lastException=e;return 1}return 0},__class__:openfl_net_SharedObject});var openfl_net_URLLoader=function(e){openfl_events_EventDispatcher.call(this);this.bytesLoaded=0;this.bytesTotal=0;this.dataFormat=1;if(e!=null){this.load(e)}};$hxClasses["openfl.net.URLLoader"]=openfl_net_URLLoader;openfl_net_URLLoader.__name__=["openfl","net","URLLoader"];openfl_net_URLLoader.__super__=openfl_events_EventDispatcher;openfl_net_URLLoader.prototype=$extend(openfl_events_EventDispatcher.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,load:function(e){var i=this;if(this.dataFormat==0){var t=new lime_net__$HTTPRequest_$openfl_$utils_$ByteArray;this.__prepareRequest(t,e);t.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(e){i.__dispatchStatus();i.data=e;var t=new openfl_events_Event("complete");i.dispatchEvent(t)})}else{var s=new lime_net__$HTTPRequest_$String;this.__prepareRequest(s,e);s.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(e){i.__dispatchStatus();i.data=e;var t=new openfl_events_Event("complete");i.dispatchEvent(t)})}},__dispatchStatus:function(){var e=new openfl_events_HTTPStatusEvent("httpStatus",false,false,this.__httpRequest.responseStatus);e.responseURL=this.__httpRequest.uri;var t=[];if(this.__httpRequest.enableResponseHeaders&&this.__httpRequest.responseHeaders!=null){var i=0;var s=this.__httpRequest.responseHeaders;while(i0){this.idleTimeout=openfl_net_URLRequestDefaults.idleTimeout}else{this.idleTimeout=3e4}this.manageCookies=openfl_net_URLRequestDefaults.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=openfl_net_URLRequestDefaults.userAgent};$hxClasses["openfl.net.URLRequest"]=openfl_net_URLRequest;openfl_net_URLRequest.__name__=["openfl","net","URLRequest"];openfl_net_URLRequest.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:openfl_net_URLRequest};var openfl_net_URLRequestDefaults=function(){};$hxClasses["openfl.net.URLRequestDefaults"]=openfl_net_URLRequestDefaults;openfl_net_URLRequestDefaults.__name__=["openfl","net","URLRequestDefaults"];var openfl_net_URLRequestHeader=function(e,t){if(t==null){t=""}if(e==null){e=""}this.name=e;this.value=t};$hxClasses["openfl.net.URLRequestHeader"]=openfl_net_URLRequestHeader;openfl_net_URLRequestHeader.__name__=["openfl","net","URLRequestHeader"];openfl_net_URLRequestHeader.prototype={name:null,value:null,__class__:openfl_net_URLRequestHeader};var openfl_system_ApplicationDomain=function(e){if(e!=null){this.parentDomain=e}else{this.parentDomain=openfl_system_ApplicationDomain.currentDomain}};$hxClasses["openfl.system.ApplicationDomain"]=openfl_system_ApplicationDomain;openfl_system_ApplicationDomain.__name__=["openfl","system","ApplicationDomain"];openfl_system_ApplicationDomain.prototype={parentDomain:null,__class__:openfl_system_ApplicationDomain};var openfl_system_Capabilities=function(){};$hxClasses["openfl.system.Capabilities"]=openfl_system_Capabilities;openfl_system_Capabilities.__name__=["openfl","system","Capabilities"];openfl_system_Capabilities.__properties__={get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX"};openfl_system_Capabilities.get_screenResolutionX=function(){var e=openfl__$internal_Lib.current.stage;var t=0;if(e==null){return 0}if(e.window!=null){var i=e.window.get_display();if(i!=null){t=Math.ceil(i.currentMode.width*e.window.__scale)}}if(t>0){return t}return e.stageWidth};openfl_system_Capabilities.get_screenResolutionY=function(){var e=openfl__$internal_Lib.current.stage;var t=0;if(e==null){return 0}if(e.window!=null){var i=e.window.get_display();if(i!=null){t=Math.ceil(i.currentMode.height*e.window.__scale)}}if(t>0){return t}return e.stageHeight};var openfl_system_LoaderContext=function(){};$hxClasses["openfl.system.LoaderContext"]=openfl_system_LoaderContext;openfl_system_LoaderContext.__name__=["openfl","system","LoaderContext"];var openfl_system_Security=function(){};$hxClasses["openfl.system.Security"]=openfl_system_Security;openfl_system_Security.__name__=["openfl","system","Security"];openfl_system_Security.allowDomain=function(e,t,i,s,a){};var openfl_text_Font=function(e){lime_text_Font.call(this,e)};$hxClasses["openfl.text.Font"]=openfl_text_Font;openfl_text_Font.__name__=["openfl","text","Font"];openfl_text_Font.enumerateFonts=function(e){if(e==null){e=false}return openfl_text_Font.__registeredFonts};openfl_text_Font.fromFile=function(e){var t=new openfl_text_Font;t.__fromFile(e);return t};openfl_text_Font.loadFromName=function(e){return lime_text_Font.loadFromName(e).then(function(e){var t=new openfl_text_Font;t.__fromLimeFont(e);return lime_app_Future.withValue(t)})};openfl_text_Font.__super__=lime_text_Font;openfl_text_Font.prototype=$extend(lime_text_Font.prototype,{__fromLimeFont:function(e){this.__copyFrom(e)},__class__:openfl_text_Font});var openfl_text_StaticText=function(){openfl_display_DisplayObject.call(this);this.__graphics=new openfl_display_Graphics(this)};$hxClasses["openfl.text.StaticText"]=openfl_text_StaticText;openfl_text_StaticText.__name__=["openfl","text","StaticText"];openfl_text_StaticText.__super__=openfl_display_DisplayObject;openfl_text_StaticText.prototype=$extend(openfl_display_DisplayObject.prototype,{text:null,__class__:openfl_text_StaticText});var openfl_text_TextField=function(){this.__forceCachedBitmapUpdate=false;this.__renderedOnCanvasWhileOnDOM=false;openfl_display_InteractiveObject.call(this);this.__caretIndex=-1;this.__displayAsPassword=false;this.__graphics=new openfl_display_Graphics(this);this.__textEngine=new openfl__$internal_text_TextEngine(this);this.__layoutDirty=true;this.__offsetX=0;this.__offsetY=0;this.__mouseWheelEnabled=true;this.__text="";if(openfl_text_TextField.__defaultTextFormat==null){openfl_text_TextField.__defaultTextFormat=new openfl_text_TextFormat("Times New Roman",12,0,false,false,false,"","",3,0,0,0,0);openfl_text_TextField.__defaultTextFormat.blockIndent=0;openfl_text_TextField.__defaultTextFormat.bullet=false;openfl_text_TextField.__defaultTextFormat.letterSpacing=0;openfl_text_TextField.__defaultTextFormat.kerning=false}this.__textFormat=openfl_text_TextField.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,0,0));this.addEventListener("mouseDown",$bind(this,this.this_onMouseDown));this.addEventListener("focusIn",$bind(this,this.this_onFocusIn));this.addEventListener("focusOut",$bind(this,this.this_onFocusOut));this.addEventListener("keyDown",$bind(this,this.this_onKeyDown));this.addEventListener("mouseWheel",$bind(this,this.this_onMouseWheel))};$hxClasses["openfl.text.TextField"]=openfl_text_TextField;openfl_text_TextField.__name__=["openfl","text","TextField"];openfl_text_TextField.__super__=openfl_display_InteractiveObject;openfl_text_TextField.prototype=$extend(openfl_display_InteractiveObject.prototype,{__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseWheelEnabled:null,__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__symbol:null,__text:null,__textEngine:null,__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM:null,__rawHtmlText:null,__forceCachedBitmapUpdate:null,getCharBoundaries:function(e){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)-1){return null}var t=new openfl_geom_Rectangle;if(this.__getCharBoundaries(e,t)){return t}else{return null}},getLineIndexOfChar:function(e){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){return-1}this.__updateLayout();var t=0;var i=this.__textEngine.layoutGroups;while(t=e){return s.lineIndex}}return-1},getLineOffset:function(e){this.__updateLayout();if(e<0||e>this.__textEngine.numLines-1){return-1}var t=0;var i=this.__textEngine.layoutGroups;while(t=s){this.__textFormat.__merge(e);var r=0;var n=this.__textEngine.textFormatRanges.get_length();while(r0){--o;a=this.__textEngine.textFormatRanges.get(o);if(a.start==t&&a.end==i){a.format=this.__textFormat.clone();a.format.__merge(e);this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}return}if(a.start>=t&&a.end<=i){l=this.__textEngine.textFormatRanges.indexOf(a,0);if(l>-1){this.__textEngine.textFormatRanges.splice(l,1)}}}var h=null;var c=null;if(t>0){var u=0;var f=this.__textEngine.textFormatRanges.get_length();while(u=t){h=a;break}}}if(i=0){a=this.__textEngine.textFormatRanges.get(d);if(a.start<=i){c=a;break}}}if(c==h){c=new openfl__$internal_text_TextFormatRange(c.format.clone(),c.start,c.end);this.__textEngine.textFormatRanges.push(c)}if(h!=null){h.end=t}if(c!=null){c.start=i}var g=this.__textFormat.clone();g.__merge(e);this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(g,t,i));this.__textEngine.textFormatRanges.sort(function(e,t){if(e.startt.start||e.end>t.end){return 1}return 0})}this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__allowMouseFocus:function(){if(!(this.__textEngine.type==1||this.get_tabEnabled())){return this.get_selectable()}else{return true}},__caretBeginningOfLine:function(){if(this.__selectionIndex==this.__caretIndex||this.__caretIndex0){this.__caretIndex--}},__caretPreviousLine:function(e,t){if(e==null){e=this.getLineIndexOfChar(this.__caretIndex)}if(e>0){if(t==null){t=this.__caretIndex}this.__caretIndex=this.__getCharIndexOnDifferentLine(t,e-1)}else{this.__caretIndex=0}},__disableInput:function(){if(this.__inputEnabled&&this.stage!=null){this.stage.window.__backend.setTextInputEnabled(false);this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown));this.__inputEnabled=false;this.__stopCursorTimer()}},__dispatch:function(e){if(e.eventPhase==2&&e.type=="mouseUp"){var t=e;var i=this.__getGroup(this.get_mouseX(),this.get_mouseY(),true);if(i!=null){var s=i.format.url;if(s!=null&&s!=""){if(StringTools.startsWith(s,"event:")){this.dispatchEvent(new openfl_events_TextEvent("link",false,false,HxOverrides.substr(s,6,null)))}else{openfl_Lib.getURL(new openfl_net_URLRequest(s))}}}}return openfl_display_InteractiveObject.prototype.__dispatch.call(this,e)},__enableInput:function(){if(this.stage!=null){this.stage.window.__backend.setTextInputEnabled(true);if(!this.__inputEnabled){this.stage.window.__backend.setTextInputEnabled(true);if(!this.stage.window.onTextInput.has($bind(this,this.window_onTextInput))){this.stage.window.onTextInput.add($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.add($bind(this,this.window_onKeyDown))}this.__inputEnabled=true;this.__startCursorTimer()}}},__fromSymbol:function(e,t){this.__symbol=t;this.set_width(t.width);this.set_height(t.height);this.__offsetX=t.x;this.__offsetY=t.y;this.set_multiline(t.multiline);this.set_wordWrap(t.wordWrap);this.set_displayAsPassword(t.password);if(t.border){this.set_border(true);this.set_background(true)}this.set_selectable(t.selectable);if(t.input){this.set_type(1)}var i=new openfl_text_TextFormat;if(t.color!=null){i.color=t.color&16777215}i.size=Math.round(t.fontHeight/20);var s=e.symbols.h[t.fontID];if(s!=null){i.__ascent=s.ascent/20/1024;i.__descent=s.descent/20/1024}i.font=t.fontName;var a=false;var r=i.font;if(r==null){a=true}else{switch(r){case"":case"_sans":case"_serif":case"_typewriter":a=true;break;default:var n=0;var _=openfl_text_Font.enumerateFonts();while(n<_.length){var o=_[n];++n;if(o.name==i.font){a=true;break}}}}if(!a){var l=new RegExp("[^a-zA-Z]+","g".split("u").join(""));var h=0;var c=openfl_text_Font.enumerateFonts();while(hlime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)-1){return false}this.__updateLayout();var i=0;var s=this.__textEngine.layoutGroups;while(i=a.startIndex&&e<=a.endIndex){try{var r=a.offsetX;var n=0;var _=e-a.startIndex;while(n<_){var o=n++;r+=a.positions[o]}var l=a.positions[e-a.startIndex];t.setTo(r,a.offsetY,l,a.ascent+a.descent);return true}catch(e){haxe_CallStack.lastException=e}}}return false},__getCharIndexOnDifferentLine:function(e,t){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){return-1}if(t<0||t>this.__textEngine.numLines-1){return-1}var i=null;var s=null;var a=0;var r=this.__textEngine.layoutGroups;while(a=n.startIndex&&e<=n.endIndex){i=n.offsetX;var _=0;var o=e-n.startIndex;while(_this.__textEngine.textHeight){t=this.__textEngine.textHeight}var n=true;var _;var o;var l=0;var h=this.__textEngine.layoutGroups.get_length();while(l=_.offsetY&&t<=_.offsetY+_.height||!i&&o==null){if(e>=_.offsetX&&e<=_.offsetX+_.width||!i&&(o==null||o.lineIndex!=_.lineIndex)){return _}}}return null},__getPosition:function(e,t){var i=this.__getGroup(e,t);if(i==null){return lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var s=0;var a=0;var r=i.positions.length;while(a0&&this.get_mask().get_height()>0){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{var r=this.__worldTransform;var n=this.__textEngine;var _=n.background||n.border?n.bounds:n.textBounds;var o=this.__graphics;if(this.__dirty){this.__updateLayout();if(o.__bounds==null){o.__bounds=new openfl_geom_Rectangle}o.__bounds.copyFrom(_)}o.__update(e.__worldTransform);if(this.__dirty||o.__softwareDirty){var l=o.__width;var h=o.__height;if((n.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(n.text,""))&&!n.background&&!n.border&&!n.__hasFocus&&(n.type!=1||!n.selectable)||(n.width<=0||n.height<=0)&&n.autoSize!=2){this.__graphics.__canvas=null;this.__graphics.__context=null;this.__graphics.__bitmap=null;this.__graphics.__softwareDirty=false;this.__graphics.set___dirty(false);this.__dirty=false}else{if(this.__graphics.__canvas==null){this.__graphics.__canvas=window.document.createElement("canvas");this.__graphics.__context=this.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=o.__context;var c=o.__renderTransform;if(e.__isDOM){var u=e.pixelRatio;o.__canvas.width=l*u|0;o.__canvas.height=h*u|0;o.__canvas.style.width=l+"px";o.__canvas.style.height=h+"px";var f=openfl_geom_Matrix.__pool.get();f.copyFrom(c);f.scale(u,u);e.setTransform(f,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(f)}else{o.__canvas.width=l;o.__canvas.height=h;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty)}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect==null){openfl__$internal_renderer_canvas_CanvasTextField.clearRect=typeof navigator!=="undefined"&&typeof navigator["isCocoonJS"]!=="undefined"}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect){openfl__$internal_renderer_canvas_CanvasTextField.context.clearRect(0,0,o.__canvas.width,o.__canvas.height)}if(n.text!=null&&n.text!=""||n.__hasFocus){var p=n.text;if(!e.__allowSmoothing||n.antiAliasType==0&&n.sharpness==400){o.__context.imageSmoothingEnabled=false}else{o.__context.imageSmoothingEnabled=true}if(n.border||n.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,_.width-1,_.height-1);if(n.background){var d=StringTools.hex(n.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+d;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var g=StringTools.hex(n.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+g;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var m=-this.get_scrollH();var v=0;var b=0;var y=this.get_scrollV()-1;while(bthis.get_scrollV()+n.bottomScrollV-2){break}var T="#"+StringTools.hex(C.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(C.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=T;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(p,C.startIndex,C.endIndex),C.offsetX+m-_.x,C.offsetY+C.ascent+v-_.y);if(this.__caretIndex>-1&&n.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&C.startIndex<=this.__caretIndex&&C.endIndex>=this.__caretIndex){w=0;var M=0;var S=this.__caretIndex-C.startIndex;while(M=this.__caretIndex||C.startIndex<=this.__selectionIndex&&C.endIndex>=this.__selectionIndex||C.startIndex>this.__caretIndex&&C.endIndexthis.__selectionIndex&&C.endIndexI){I=C.startIndex}if(C.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(n.text)){O=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(n.text)-1);O.x+=O.width+2}else{O=this.getCharBoundaries(D)}if(F!=null&&O!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(F.x+m,F.y+v,O.x-F.x,C.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(p,I,D),m+F.x,C.offsetY+C.ascent+v)}}}if(C.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=T;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var G=C.offsetX+m-_.x;var j=Math.floor(C.offsetY+v+C.ascent-_.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(G,j);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(G+C.width,j);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(n.border||n.background){if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,_.width-1,_.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,_.width,_.height)}if(n.background){var H=StringTools.hex(n.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+H;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var U=StringTools.hex(n.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+U;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&n.selectable&&this.__showCursor){var N=-this.get_scrollH();var W=0;var V=0;var z=this.get_scrollV()-1;while(V0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var K=e.context;e.setTransform(this.__renderTransform,K);var Z=this.opaqueBackground;K.fillStyle="rgb("+(Z>>>16&255)+","+(Z>>>8&255)+","+(Z&255)+")";K.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var Q=e.__getAlpha(this.__worldAlpha);if(!(Q<=0)){var ee=this.__graphics;if(ee!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(ee,e);var te=ee.__width;var ie=ee.__height;var se=ee.__canvas;if(se!=null&&ee.__visible&&te>=1&&ie>=1){var ae=ee.__worldTransform;var re=e.context;var ne=this.__scrollRect;var _e=this.__worldScale9Grid;if(ne==null||ne.width>0&&ne.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);re.globalAlpha=Q;if(_e!=null&&ae.b==0&&ae.c==0){re.setTransform(1,0,0,1,ae.tx,ae.ty);var oe=ee.__bounds;var le=ee.__renderTransform.a;var he=ee.__renderTransform.d;var ce=ae.a;var ue=ae.d;var fe=Math.round(_e.x*le);var pe=Math.round(_e.y*he);var de=Math.round((oe.get_right()-_e.get_right())*le);var ge=Math.round((oe.get_bottom()-_e.get_bottom())*he);var me=Math.round(_e.width*le);var ve=Math.round(_e.height*he);var be=Math.round(_e.x*ce);var ye=Math.round(_e.y*ue);var xe=Math.round((oe.get_right()-_e.get_right())*ce);var we=Math.round((oe.get_bottom()-_e.get_bottom())*ue);var ke=Math.round(te*ce)-be-xe;var Pe=Math.round(ie*ue)-ye-we;e.applySmoothing(re,false);if(me!=0&&ve!=0){re.drawImage(se,0,0,fe,pe,0,0,be,ye);re.drawImage(se,fe,0,me,pe,be,0,ke,ye);re.drawImage(se,fe+me,0,de,pe,be+ke,0,xe,ye);re.drawImage(se,0,pe,fe,ve,0,ye,be,Pe);re.drawImage(se,fe,pe,me,ve,be,ye,ke,Pe);re.drawImage(se,fe+me,pe,de,ve,be+ke,ye,xe,Pe);re.drawImage(se,0,pe+ve,fe,ge,0,ye+Pe,be,we);re.drawImage(se,fe,pe+ve,me,ge,be,ye+Pe,ke,we);re.drawImage(se,fe+me,pe+ve,de,ge,be+ke,ye+Pe,xe,we)}else if(me==0&&ve!=0){var Ce=be+ke+xe;re.drawImage(se,0,0,te,pe,0,0,Ce,ye);re.drawImage(se,0,pe,te,ve,0,ye,Ce,Pe);re.drawImage(se,0,pe+ve,te,ge,0,ye+Pe,Ce,we)}else if(ve==0&&me!=0){var Te=ye+Pe+we;re.drawImage(se,0,0,fe,ie,0,0,be,Te);re.drawImage(se,fe,0,me,ie,be,0,ke,Te);re.drawImage(se,fe+me,0,de,ie,be+ke,0,xe,Te)}}else{e.setTransform(ae,re);if(e.__isDOM){var Me=1/e.pixelRatio;re.scale(Me,Me)}re.drawImage(se,0,0,te,ie)}e.__popMaskObject(this)}}}}}}}}}if(q){e.context.imageSmoothingEnabled=true}}}},__renderDOM:function(e){this.__domRender=true;this.__updateCacheBitmap(e,this.__forceCachedBitmapUpdate);this.__forceCachedBitmapUpdate=false;this.__domRender=false;if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{if(this.__renderedOnCanvasWhileOnDOM){this.__renderedOnCanvasWhileOnDOM=false;if(this.__isHTML&&this.__rawHtmlText!=null){this.__updateText(this.__rawHtmlText);this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}var i=this;var s=i.__textEngine;if(i.stage!=null&&i.__worldVisible&&i.__renderable){if(i.__dirty||i.__renderTransformChanged||i.__div==null){if(s.text!=""||s.background||s.border||s.type==1){if(i.__div==null){i.__div=window.document.createElement("div");e.__initializeElement(i,i.__div);i.__style.setProperty("outline","none",null);i.__div.addEventListener("input",function(e){e.preventDefault();if(i.get_htmlText()!=i.__div.innerHTML){i.set_htmlText(i.__div.innerHTML);var t=i.__displayAsPassword;i.__dirty=false}},true)}if(!s.wordWrap){i.__style.setProperty("white-space","nowrap",null)}else{i.__style.setProperty("word-wrap","break-word",null)}i.__style.setProperty("overflow","hidden",null);if(s.selectable){i.__style.setProperty("cursor","text",null);i.__style.setProperty("-webkit-user-select","text",null);i.__style.setProperty("-moz-user-select","text",null);i.__style.setProperty("-ms-user-select","text",null);i.__style.setProperty("-o-user-select","text",null)}else{i.__style.setProperty("cursor","inherit",null)}var a=i.__div;a.contentEditable=s.type==1;var r=i.__style;if(s.background){r.setProperty("background-color","#"+StringTools.hex(s.backgroundColor&16777215,6),null)}else{r.removeProperty("background-color")}var n=s.width;var _=s.height;var o=1;var l=i.__textFormat.size;var h=l;var c=i.__renderTransform;if(c.a!=1||c.d!=1){if(c.a==c.d){o=c.a;c.a=c.d=1}else if(c.a>c.d){o=c.a;c.d/=c.a;c.a=1}else{o=c.d;c.a/=c.d;c.d=1}h*=o;n=Math.ceil(n*o);_=Math.ceil(_*o)}i.__textFormat.size=h;var u=s.text;var f=0;if(!i.__isHTML){u=StringTools.htmlEscape(u)}else{var p=u;while(openfl__$internal_renderer_dom_DOMTextField.__regexFont.match(p)){var d=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matched(0);var g="";if(openfl__$internal_renderer_dom_DOMTextField.__regexFace.match(d)){g+="font-family:'"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexFace)+"';"}if(openfl__$internal_renderer_dom_DOMTextField.__regexColor.match(d)){g+="color:#"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexColor)+";"}if(openfl__$internal_renderer_dom_DOMTextField.__regexSize.match(d)){var m=openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexSize);var v=HxOverrides.cca(m,0);var b;f=parseFloat(m)*o;if(v==43||v==45){b=h+f}else{b=f}g+="font-size:"+b+"px;"}u=StringTools.replace(u,d,"");p=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matchedRight()}u=u.replace(openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont.r,"")}u=StringTools.replace(u,"

");i.__div.innerHTML=w;var k=new RegExp("\n","g".split("u").join(""));var P=i.__div.innerHTML.replace(k,"
");i.__div.innerHTML=P;var C=new RegExp("\r","g".split("u").join(""));var T=i.__div.innerHTML.replace(C,"
");i.__div.innerHTML=T;r.setProperty("font",openfl__$internal_text_TextEngine.getFont(i.__textFormat),null);i.__textFormat.size=l;i.__textFormat.leading=y;r.setProperty("top","3px",null);if(s.border){r.setProperty("border","solid 1px #"+StringTools.hex(s.borderColor&16777215,6),null);i.__renderTransform.translate(-1,-1);i.__renderTransformChanged=true;i.__transformDirty=true}else if(r.border!=""){r.removeProperty("border");i.__renderTransformChanged=true}r.setProperty("color","#"+StringTools.hex(i.__textFormat.color&16777215,6),null);r.setProperty("width",n+"px",null);r.setProperty("height",_+"px",null);var M=i.__textFormat.align;switch(M){case 0:r.setProperty("text-align","center",null);break;case 4:r.setProperty("text-align","right",null);break;default:r.setProperty("text-align","left",null)}i.__dirty=false}else if(i.__div!=null){e.element.removeChild(i.__div);i.__div=null}}if(i.__div!=null){var S=e.__roundPixels;e.__roundPixels=true;e.__updateClip(i);e.__applyStyle(i,true,true,true);e.__roundPixels=S}}else{openfl__$internal_renderer_dom_DOMTextField.clear(i,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMTextField.clear(this,e)},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else{openfl__$internal_renderer_context3D_Context3DTextField.render(this,e);if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!(!this.__renderable||this.__worldAlpha<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var t=e.__context3D;var i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DTextField.renderMask(this,e);openfl_display_InteractiveObject.prototype.__renderGLMask.call(this,e)},__replaceSelectedText:function(e,t){if(t==null){t=true}if(e==null){e=""}if(e==""&&this.__selectionIndex==this.__caretIndex){return}var i=this.__caretIndexthis.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(i==s&&this.__textEngine.maxChars>0&&lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)==this.__textEngine.maxChars){return}if(i>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){i=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(s>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){s=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(slime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){r=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}this.setSelection(r,r);this.__updateScrollH()},__replaceText:function(e,t,i,s){if(tlime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)||i==null){return}if(s){i=this.__textEngine.restrictText(i);if(this.__textEngine.maxChars>0){var a=t-e;var r=this.__textEngine.maxChars-lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)+a;if(r<=0){i=""}else if(rlime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){t=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var n=i.length-(t-e);var _=0;var o;while(_=t){o.end+=n;++_}else if(o.start>=e&&o.end<=t){if(_>0){this.__textEngine.textFormatRanges.splice(_,1)}else{o.start=0;o.end=e+i.length;++_}n-=o.end-o.start}else if(o.start>e&&o.start<=t){o.start+=n;++_}else{++_}}this.__updateScrollH();this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__shouldCacheHardware:function(e){if(e==true){return true}else{return false}},__startCursorTimer:function(){this.__cursorTimer=haxe_Timer.delay($bind(this,this.__startCursorTimer),600);this.__showCursor=!this.__showCursor;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__startTextInput:function(){if(this.__caretIndex<0){this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text);this.__selectionIndex=this.__caretIndex}var e=openfl_display_DisplayObject.__supportDOM?this.__renderedOnCanvasWhileOnDOM:true;if(e){this.__enableInput()}},__stopCursorTimer:function(){if(this.__cursorTimer!=null){this.__cursorTimer.stop();this.__cursorTimer=null}if(this.__showCursor){this.__showCursor=false;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__stopTextInput:function(){var e=openfl_display_DisplayObject.__supportDOM?this.__renderedOnCanvasWhileOnDOM:true;if(e){this.__disableInput()}},__updateCacheBitmap:function(e,t){if(this.__filters==null&&e.__type=="opengl"&&this.__cacheBitmap==null&&!this.__domRender){return false}if(openfl_display_InteractiveObject.prototype.__updateCacheBitmap.call(this,e,t||this.__dirty)){if(this.__cacheBitmap!=null){this.__cacheBitmap.__renderTransform.tx-=this.__offsetX;this.__cacheBitmap.__renderTransform.ty-=this.__offsetY}return true}return false},__updateLayout:function(){if(this.__layoutDirty){var e=this.__textEngine.width;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=e){var t=this.__textEngine.autoSize;switch(t){case 0:var i=this;i.set_x(i.get_x()+(e-this.__textEngine.width)/2);break;case 3:var s=this;s.set_x(s.get_x()+(e-this.__textEngine.width));break;default:}}this.__textEngine.getBounds()}this.__layoutDirty=false}},__updateScrollH:function(){if(!this.get_multiline()&&this.get_type()==1){this.__layoutDirty=true;this.__updateLayout();var e=this.__textEngine.textWidth-this.__textEngine.width+4;if(e>0){if(this.__caretIndex>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.get_text())){this.set_scrollH(Math.ceil(e))}else{var t=openfl_geom_Rectangle.__pool.get();this.__getCharBoundaries(this.__caretIndex,t);if(t.xthis.get_scrollH()+this.__textEngine.width){this.set_scrollH(Math.ceil(t.x-this.__textEngine.width-2))}openfl_geom_Rectangle.__pool.release(t)}}else{this.set_scrollH(0)}}},__updateText:function(e){if(openfl_display_DisplayObject.__supportDOM&&this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=this.__text!=e}this.__textEngine.set_text(e);this.__text=this.__textEngine.text;if(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)1){this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1)}var t=this.__textEngine.textFormatRanges.get(0);t.format=this.__textFormat;t.start=0;if(this.__renderedOnCanvasWhileOnDOM){t.end=e.length;this.__updateText(e)}else{t.end=this.__rawHtmlText.length;this.__updateText(this.__rawHtmlText)}}else{this.__updateText(e)}return e},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(e){if(e!=this.__textEngine.multiline){this.__dirty=true;this.__layoutDirty=true;this.__updateText(this.__text);this.__updateScrollH();if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.multiline=e},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(e){this.__updateLayout();if(e>this.__textEngine.maxScrollH){e=this.__textEngine.maxScrollH}if(e<0){e=0}if(e!=this.__textEngine.scrollH){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.dispatchEvent(new openfl_events_Event("scroll"))}return this.__textEngine.scrollH=e},get_scrollV:function(){return this.__textEngine.scrollV},set_scrollV:function(e){this.__updateLayout();if(e>this.__textEngine.maxScrollV){e=this.__textEngine.maxScrollV}if(e<1){e=1}if(e!=this.__textEngine.scrollV){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.dispatchEvent(new openfl_events_Event("scroll"))}return this.__textEngine.scrollV=e},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(e){if(e!=this.__textEngine.selectable&&this.get_type()==1){if(this.stage!=null&&this.stage.get_focus()==this){this.__startTextInput()}else if(!e){this.__stopTextInput()}}return this.__textEngine.selectable=e},set_sharpness:function(e){if(e!=this.__textEngine.sharpness){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.sharpness=e},get_tabEnabled:function(){if(this.__tabEnabled==null){return this.__textEngine.type==1}else{return this.__tabEnabled}},get_text:function(){return this.__text},set_text:function(e){if(this.__isHTML||this.__text!=e){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}else{return e}if(this.__textEngine.textFormatRanges.get_length()>1){this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1)}var t=e;var i=this.__textEngine.textFormatRanges.get(0);i.format=this.__textFormat;i.start=0;i.end=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(t);this.__isHTML=false;this.__updateText(e);return e},set_textColor:function(e){if(e!=this.__textFormat.color){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}var t=0;var i=this.__textEngine.textFormatRanges;while(t=0){this.__updateLayout();var t=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());if(t!=this.__caretIndex){this.__caretIndex=t;if(openfl_display_DisplayObject.__supportDOM){if(this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=true}}else{this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}}},stage_onMouseUp:function(e){if(this.stage==null){return}this.stage.removeEventListener("mouseMove",$bind(this,this.stage_onMouseMove));this.stage.removeEventListener("mouseUp",$bind(this,this.stage_onMouseUp));if(this.stage.get_focus()==this){this.__getWorldTransform();this.__updateLayout();var t=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var i;var s;i=Math.min(this.__selectionIndex,t)|0;s=Math.max(this.__selectionIndex,t)|0;this.__selectionIndex=i;this.__caretIndex=s;if(this.__inputEnabled){this.this_onFocusIn(null);this.__stopCursorTimer();this.__startCursorTimer();if(openfl_display_DisplayObject.__supportDOM&&this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=true}}}},this_onAddedToStage:function(e){this.this_onFocusIn(null)},this_onFocusIn:function(e){if(this.get_type()==1&&this.stage!=null&&this.stage.get_focus()==this){this.__startTextInput()}},this_onFocusOut:function(e){this.__stopCursorTimer();if(e.relatedObject==null||!js_Boot.__instanceof(e.relatedObject,openfl_text_TextField)){this.__stopTextInput()}else{if(this.stage!=null){this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown))}this.__inputEnabled=false}if(this.__selectionIndex!=this.__caretIndex){this.__selectionIndex=this.__caretIndex;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},this_onKeyDown:function(e){if(this.get_selectable()&&this.get_type()!=1&&e.keyCode==67&&(e.commandKey||e.ctrlKey)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex))}}},this_onMouseDown:function(e){if(!this.get_selectable()&&this.get_type()!=1){return}this.__updateLayout();this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());this.__selectionIndex=this.__caretIndex;if(!openfl_display_DisplayObject.__supportDOM){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}this.stage.addEventListener("mouseMove",$bind(this,this.stage_onMouseMove));this.stage.addEventListener("mouseUp",$bind(this,this.stage_onMouseUp))},this_onMouseWheel:function(e){var t=this;t.set_scrollV(t.get_scrollV()-e.delta)},window_onKeyDown:function(e,t){switch(e){case 8:if(this.__selectionIndex==this.__caretIndex&&this.__caretIndex>0){this.__selectionIndex=this.__caretIndex-1}if(this.__selectionIndex!=this.__caretIndex){this.replaceSelectedText("");this.__selectionIndex=this.__caretIndex;this.dispatchEvent(new openfl_events_Event("change",true))}break;case 97:if(this.get_selectable()){if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text);this.__selectionIndex=0}}break;case 99:if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex))}}break;case 120:if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex));this.replaceSelectedText("");this.dispatchEvent(new openfl_events_Event("change",true))}}break;case 127:if(this.__selectionIndex==this.__caretIndex&&this.__caretIndex=48&&e<=57){return e-48+48}if(e>=65&&e<=90){return e-65+97}}else{switch(e){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(e>=65&&e<=90){return e-65+65}}if(e>=96&&e<=105){return e-96+48}switch(e){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};var openfl_ui_Mouse=function(){};$hxClasses["openfl.ui.Mouse"]=openfl_ui_Mouse;openfl_ui_Mouse.__name__=["openfl","ui","Mouse"];openfl_ui_Mouse.__properties__={set_cursor:"set_cursor"};openfl_ui_Mouse.hide=function(){openfl_ui_Mouse.__hidden=true;var e=0;var t=lime_app_Application.current.__windows;while(e","g");var c=new EReg("([\\w\\.\\-\\+]+)","gi");var u=new EReg("^\\w{3}","ig");var f=new EReg("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?","gi");var p=new EReg("\\[.*\\]","ig");var d=new EReg("^\\b[A-Za-z]{1,3}","ig");var g=new EReg("\\d+","");var m=new EReg("(\\.[xyzw]{1,4})","");var v=new EReg("[A-Za-z]{1,3}","ig");var b=new EReg("(\\.[xyzw]{1,1})","");var y=new EReg("\\+\\d{1,3}","ig");var x=0;while(x=3){lime_utils_Log.warn("warning: bad line "+x+": "+_[x],{fileName:"AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}++x;continue}if(this.debugEnabled){lime_utils_Log.info(M,{fileName:"AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(M==null){if(w.length>=3){lime_utils_Log.warn("warning: bad line "+x+": "+_[x],{fileName:"AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}++x;continue}w=HxOverrides.substr(w,w.indexOf(M.name)+M.name.length,null);if((M.flags&256)!=0&&i<2){this.error="error: opcode requires version 2.";break}if((M.flags&64)!=0&&n){this.error="error: opcode is only allowed in vertex programs.";break}if((M.flags&32)!=0&&!n){this.error="error: opcode is only allowed in fragment programs.";break}if(this.verbose){lime_utils_Log.info("emit opcode="+Std.string(M),{fileName:"AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.agalcode.writeUnsignedInt(M.emitCode);++o;if(o>4096){this.error="error: too many opcodes. maximum is "+4096+".";break}var $=this.match(w,f);if($.length!=M.numRegister){this.error="error: wrong number of operands. found "+$.length+" but expected "+M.numRegister+".";break}var E=false;var B=160;var L=$.length;var R=0;var A=L;while(R0){$[I]=StringTools.replace($[I],F[0],"0");if(this.verbose){lime_utils_Log.info("IS REL",{fileName:"AGALMiniAssembler.hx",lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}D=true}var O=this.match($[I],d);if(O.length==0){this.error="error: could not parse operand "+I+" ("+$[I]+").";E=true;break}var G=openfl_utils_AGALMiniAssembler.REGMAP;var j=O[0];var H=__map_reserved[j]!=null?G.getReserved(j):G.h[j];if(this.debugEnabled){lime_utils_Log.info(H,{fileName:"AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(H==null){this.error="error: could not find register name for operand "+I+" ("+$[I]+").";E=true;break}if(n){if((H.flags&32)==0){this.error="error: register operand "+I+" ("+$[I]+") only allowed in vertex programs.";E=true;break}if(D){this.error="error: register operand "+I+" ("+$[I]+") relative adressing not allowed in fragment programs.";E=true;break}}else if((H.flags&64)==0){this.error="error: register operand "+I+" ("+$[I]+") only allowed in fragment programs.";E=true;break}var U=$[I].indexOf(H.name)+H.name.length;$[I]=HxOverrides.substr($[I],U,null);var N=D?this.match(F[0],g):this.match($[I],g);var W=0;if(N.length>0){W=Std.parseInt(N[0])}if(_$UInt_UInt_$Impl_$.gt(W,H.range)){this.error="error: register operand "+I+" ("+$[I]+") index exceeds limit of "+Std.string(_$UInt_UInt_$Impl_$.toFloat(H.range+1))+".";E=true;break}var V=0;var z=this.match($[I],m);var X=I==0&&(M.flags&128)==0;var Y=I==2&&(M.flags&8)!=0;var q=0;var J=0;var K=0;if(X&&D){this.error="error: relative can not be destination";E=true;break}if(z.length>0){V=0;var Z=0;var Q=z[0].length;var ee=1;while(ee0){K=Std.parseInt(ne[0])}if(K<0||K>255){this.error="error: index offset "+K+" out of bounds. [0..255]";E=true;break}if(this.verbose){lime_utils_Log.info("RELATIVE: type="+q+"=="+te[0]+" sel="+Std.string(_$UInt_UInt_$Impl_$.toFloat(J))+"=="+re[0]+" idx="+Std.string(_$UInt_UInt_$Impl_$.toFloat(W))+" offset="+K,{fileName:"AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}}if(this.verbose){lime_utils_Log.info(" emit argcode="+Std.string(H)+"["+Std.string(_$UInt_UInt_$Impl_$.toFloat(W))+"]["+V+"]",{fileName:"AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(X){this.agalcode.writeShort(W);this.agalcode.writeByte(V);this.agalcode.writeByte(H.emitCode);B-=32}else if(Y){if(this.verbose){lime_utils_Log.info(" emit sampler",{fileName:"AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}var _e=5;var oe=C==null?0:C.length;var le=0;var he=0;var ce=oe;while(he","gi");openfl__$internal_formats_html_HTMLParser.__regexBlockIndent=new EReg("blockindent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexColor=new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexEntities=[new EReg(""","g"),new EReg("'","g"),new EReg("&","g"),new EReg("<","g"),new EReg(">","g"),new EReg(" ","g")];openfl__$internal_formats_html_HTMLParser.__regexFace=new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexHTMLTag=new EReg("<.*?>","g");openfl__$internal_formats_html_HTMLParser.__regexHref=new EReg("href=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexIndent=new EReg(" indent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexLeading=new EReg("leading=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexLeftMargin=new EReg("leftmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexRightMargin=new EReg("rightmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexTabStops=new EReg("tabstops=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_swf_SWFLite.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{resolveClass:{SuppressWarnings:["checkstyle:Dynamic"]},resolveEnum:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_formats_swf_SWFLite.instances=new haxe_ds_StringMap;openfl__$internal_formats_swf_SWFLiteLibrary.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_DrawCommandBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_DrawCommandBuffer.empty=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_DrawCommandReader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_SamplerState.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_ShaderBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_canvas_CanvasGraphics.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_canvas_CanvasVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DBitmap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_BitmapData.__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"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_BitmapData.VERTEX_BUFFER_STRIDE=14;openfl_display_BitmapData.__tempVector=new lime_math_Vector2;openfl_geom_Rectangle.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Rectangle},function(e){e.setTo(0,0,0,0)});openfl_geom_Matrix.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_geom_Matrix.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Matrix},function(e){e.identity()});openfl_geom_ColorTransform.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_ColorTransform},function(e){e.__identity()});openfl__$internal_renderer_context3D_Context3DGraphics.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform=new openfl_geom_ColorTransform(1,1,1,1,0,0,0,0);openfl_display_Shader.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_context3D_Context3DMaskShader.opaqueBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_context3D_Context3DShape.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DState.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue=[0,0];openfl__$internal_renderer_dom_DOMBitmap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMDisplayObject.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMShape.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMTextField.__regexColor=new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");openfl__$internal_renderer_dom_DOMTextField.__regexFace=new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_renderer_dom_DOMTextField.__regexFont=new EReg("]+)>","gi");openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont=new EReg("","gi");openfl__$internal_renderer_dom_DOMTextField.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_renderer_dom_DOMVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_text_TextEngine.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_text_TextLayoutGroup.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_utils_TouchData.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_utils_TouchData.__pool=new lime_utils_ObjectPool(function(){return new openfl__$internal_utils_TouchData},function(e){e.reset()});openfl_display_Application.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_DisplayObjectRenderer.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_CanvasRenderer.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_DOMRenderer.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_Loader.__meta__={fields:{BitmapData_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_LoaderInfo.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_LoaderInfo.__rootURL=typeof window!="undefined"?window.document.URL:"";openfl_display_OpenGLRenderer.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_OpenGLRenderer.__alphaValue=[1];openfl_display_OpenGLRenderer.__colorMultipliersValue=[0,0,0,0];openfl_display_OpenGLRenderer.__colorOffsetsValue=[0,0,0,0];openfl_display_OpenGLRenderer.__emptyColorValue=[0,0,0,0];openfl_display_OpenGLRenderer.__hasColorTransformValue=[false];openfl_display_OpenGLRenderer.__scissorRectangle=new openfl_geom_Rectangle;openfl_display_OpenGLRenderer.__textureSizeValue=[0,0];openfl_display_Preloader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_DefaultPreloader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_ShaderInput.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_display_ShaderParameter.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_display_Stage.__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"]}}};openfl_display_Window.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display3D_Context3D.__glDepthStencil=-1;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=-1;openfl_display3D_Context3D.__glMaxViewportDims=-1;openfl_display3D_Context3D.__glTextureMaxAnisotropy=-1;openfl_display3D_Uniform.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display3D_UniformMap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display3D_textures_TextureBase.__meta__={fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display3D_textures_Texture.__lowMemoryMode=false;openfl_events__$EventDispatcher_DispatchIterator.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_events__$EventDispatcher_Listener.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_events_KeyboardEvent.KEY_DOWN="keyDown";openfl_events_KeyboardEvent.KEY_UP="keyUp";openfl_events_MouseEvent.__pool=new lime_utils_ObjectPool(null,null,20);openfl_events_MouseEvent.CLICK="click";openfl_events_MouseEvent.DOUBLE_CLICK="doubleClick";openfl_events_MouseEvent.MIDDLE_CLICK="middleClick";openfl_events_MouseEvent.MIDDLE_MOUSE_DOWN="middleMouseDown";openfl_events_MouseEvent.MIDDLE_MOUSE_UP="middleMouseUp";openfl_events_MouseEvent.MOUSE_DOWN="mouseDown";openfl_events_MouseEvent.MOUSE_MOVE="mouseMove";openfl_events_MouseEvent.MOUSE_OUT="mouseOut";openfl_events_MouseEvent.MOUSE_OVER="mouseOver";openfl_events_MouseEvent.MOUSE_UP="mouseUp";openfl_events_MouseEvent.MOUSE_WHEEL="mouseWheel";openfl_events_MouseEvent.RELEASE_OUTSIDE="releaseOutside";openfl_events_MouseEvent.RIGHT_CLICK="rightClick";openfl_events_MouseEvent.RIGHT_MOUSE_DOWN="rightMouseDown";openfl_events_MouseEvent.RIGHT_MOUSE_UP="rightMouseUp";openfl_events_MouseEvent.ROLL_OUT="rollOut";openfl_events_MouseEvent.ROLL_OVER="rollOver";openfl_events_TouchEvent.TOUCH_BEGIN="touchBegin";openfl_events_TouchEvent.TOUCH_END="touchEnd";openfl_events_TouchEvent.TOUCH_MOVE="touchMove";openfl_events_TouchEvent.TOUCH_OUT="touchOut";openfl_events_TouchEvent.TOUCH_OVER="touchOver";openfl_events_TouchEvent.TOUCH_ROLL_OUT="touchRollOut";openfl_events_TouchEvent.TOUCH_ROLL_OVER="touchRollOver";openfl_events_TouchEvent.TOUCH_TAP="touchTap";openfl_filters_BlurFilter.__blurShader=new openfl_filters__$BlurFilter_BlurShader;openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_filters_ColorMatrixFilter.__colorMatrixShader=new openfl_filters__$ColorMatrixFilter_ColorMatrixShader;openfl_filters_GlowFilter.__glowShader=new openfl_filters__$GlowFilter_GlowShader;openfl_geom_Point.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Point},function(e){e.setTo(0,0)});openfl_media_SoundTransform.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_media_SoundMixer.__soundChannels=[];openfl_media_SoundMixer.__soundTransform=new openfl_media_SoundTransform;openfl_net_SharedObject.defaultObjectEncoding=10;openfl_net_URLRequestDefaults.followRedirects=true;openfl_net_URLRequestDefaults.idleTimeout=0;openfl_net_URLRequestDefaults.manageCookies=false;openfl_system_ApplicationDomain.currentDomain=new openfl_system_ApplicationDomain(null);openfl_text_Font.__fontByName=new haxe_ds_StringMap;openfl_text_Font.__registeredFonts=[];openfl_text_TextField.__missingFontWarning=new haxe_ds_StringMap;openfl_text_TextFormat.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_ui_GameInput.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_ui_GameInput.numDevices=0;openfl_ui_GameInput.__deviceList=[];openfl_ui_GameInput.__instances=[];openfl_ui_GameInput.__devices=new haxe_ds_ObjectMap;openfl_ui_Mouse.__cursor="auto";openfl_utils_AGALMiniAssembler.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};openfl_utils_AGALMiniAssembler.OPMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.REGMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.SAMPLEMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.initialized=false;openfl_utils__$AGALMiniAssembler_OpCode.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils__$AGALMiniAssembler_Register.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils__$AGALMiniAssembler_Sampler.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils_Assets.cache=new openfl_utils_AssetCache;openfl_utils_ByteArrayData.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils_ByteArrayData.defaultObjectEncoding=10;openfl_utils__$Object_Object_$Impl_$.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};haxe_lang_Iterator.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};haxe_lang_Iterable.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};trcharts_NumberFormat.DEFAULT_NUM_DECIMALS=2;trcharts_charts_ScatterLine.STEP_HORIZONTAL=1;trcharts_charts_ScatterLine.STEP_VERTICAL=2;trcharts_string_DateUtils.dateConsts={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};xeditor_objects_TrVideoPlayerObject.YoutubeType="youtube";xeditor_utils_TRcssUtil.css_colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};xeditor_type_TrButton_$Prop.button_circle={normal:{border_radius:240,border_width:4,box_shadow:{dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_box_shadow("inset 0 1px 1px rgba(255,255,255,.5)")),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_box_shadow("0 1px 2px rgba(0,0,0,.2)"))}},hover:{},active:{}};xeditor_type_TrButton_$Prop.button_primary={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#00A1CB").color,border_color:xeditor_utils_TRcssUtil.color_cal("#007998").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#00b5e5,#008db2"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(0,40,50,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("##00A1CB").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#00c9fe,#008db2")},active:{background:xeditor_utils_TRcssUtil.color_cal("#1495b7").color,color:xeditor_utils_TRcssUtil.color_cal("#005065").color}};xeditor_type_TrButton_$Prop.button_action={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#7db500").color,border_color:xeditor_utils_TRcssUtil.color_cal("#5a8200").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#8fcf00,#6b9c00"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(19,28,0,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#7db500").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#a0e800,#6b9c00")},active:{background:xeditor_utils_TRcssUtil.color_cal("#76a312").color,color:xeditor_utils_TRcssUtil.color_cal("#374f00").color}};xeditor_type_TrButton_$Prop.button_highlight={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#F18D05").color,border_color:xeditor_utils_TRcssUtil.color_cal("#bf7004").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#fa9915,#d87e04"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(91,53,2,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#F18D05").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#fba42e,#d87e04")},active:{background:xeditor_utils_TRcssUtil.color_cal("#d8891e").color,color:xeditor_utils_TRcssUtil.color_cal("#8d5303").color}};xeditor_type_TrButton_$Prop.button_caution={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#E54028").color,border_color:xeditor_utils_TRcssUtil.color_cal("#c22d18").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#e8543f,#d9331a"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(103,24,13,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#E54028").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#eb6855,#d9331a")},active:{background:xeditor_utils_TRcssUtil.color_cal("#cd5240").color,color:xeditor_utils_TRcssUtil.color_cal("#952312").color}};xeditor_type_TrButton_$Prop.button_royal={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#87318C").color,border_color:xeditor_utils_TRcssUtil.color_cal("#632466").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#99389f,#752a79"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(26,9,27,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#87318C").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#ab3eb2,#752a79")},active:{background:xeditor_utils_TRcssUtil.color_cal("#764479").color,color:xeditor_utils_TRcssUtil.color_cal("#3e1740").color}};xeditor_utils_TRUID._lastUID=0;ApplicationMain.main()})(typeof exports!="undefined"?exports:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)};$hx_exports.lime=$hx_exports.lime||{};$hx_exports.lime.$scripts=$hx_exports.lime.$scripts||{};$hx_exports.lime.$scripts["flipbookMobile"]=$hx_script;$hx_exports.lime.embed=function(e){var t={};$hx_exports.lime.$scripts[e](t,$global);for(var i in t)$hx_exports[i]=$hx_exports[i]||t[i];t.lime.embed.apply(t.lime,arguments);return t}})(typeof exports!="undefined"?exports:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);!function(){"use strict";var e=function(){this.init()};e.prototype={init:function(){var e=this||y;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||y;if(e=parseFloat(e),t.ctx||c(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,y.ctx.currentTime);for(var i=0;i=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,c()),e},codecs:function(e){return(this||y)._codecs[e.replace(/^x-/,"")]},_setup:function(){var t=this||y;if(t.state=t.ctx?t.ctx.state||"suspended":"suspended",t._autoSuspend(),!t.usingWebAudio)if("undefined"!=typeof Audio)try{var e=new Audio;void 0===e.oncanplaythrough&&(t._canPlayEvent="canplay")}catch(e){t.noAudio=!0}else t.noAudio=!0;try{var e=new Audio;e.muted&&(t.noAudio=!0)}catch(t){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||y,e=null;try{e="undefined"!=typeof Audio?new Audio:null}catch(e){return t}if(!e||"function"!=typeof e.canPlayType)return t;var i=e.canPlayType("audio/mpeg;").replace(/^no$/,""),s=t._navigator&&t._navigator.userAgent.match(/OPR\/([0-6].)/g),a=s&&parseInt(s[0].split("/")[1],10)<33;return t._codecs={mp3:!(a||!i&&!e.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!i,opus:!!e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!e.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!e.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(e.canPlayType("audio/x-mp4;")||e.canPlayType("audio/mp4;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(e.canPlayType("audio/x-flac;")||e.canPlayType("audio/flac;")).replace(/^no$/,"")},t},_unlockAudio:function(){var _=this||y,e=/iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome|Safari/i.test(_._navigator&&_._navigator.userAgent);if(!_._audioUnlocked&&_.ctx&&e){_._audioUnlocked=!1,_.autoUnlock=!1,_._mobileUnloaded||44100===_.ctx.sampleRate||(_._mobileUnloaded=!0,_.unload()),_._scratchBuffer=_.ctx.createBuffer(1,1,22050);var o=function(e){for(var t=0;t<_.html5PoolSize;t++){var i=new Audio;i._unlocked=!0,_._releaseHtml5Audio(i)}for(var t=0;t<_._howls.length;t++)if(!_._howls[t]._webAudio)for(var s=_._howls[t]._getSoundIds(),a=0;a0?n._seek:s._sprite[t][0]/1e3),l=Math.max(0,(s._sprite[t][0]+s._sprite[t][1])/1e3-o),h=1e3*l/Math.abs(n._rate),c=s._sprite[t][0]/1e3,u=(s._sprite[t][0]+s._sprite[t][1])/1e3,f=!(!n._loop&&!s._sprite[t][2]);n._sprite=t,n._ended=!1;var p=function(){n._paused=!1,n._seek=o,n._start=c,n._stop=u,n._loop=f};if(o>=u)return void s._ended(n);var d=n._node;if(s._webAudio){var g=function(){s._playLock=!1,p(),s._refreshBuffer(n);var e=n._muted||s._muted?0:n._volume;d.gain.setValueAtTime(e,y.ctx.currentTime),n._playStart=y.ctx.currentTime,void 0===d.bufferSource.start?n._loop?d.bufferSource.noteGrainOn(0,o,86400):d.bufferSource.noteGrainOn(0,o,l):n._loop?d.bufferSource.start(0,o,86400):d.bufferSource.start(0,o,l),h!==1/0&&(s._endTimers[n._id]=setTimeout(s._ended.bind(s,n),h)),i||setTimeout(function(){s._emit("play",n._id),s._loadQueue()},0)};"running"===y.state?g():(s._playLock=!0,s.once("resume",g),s._clearTimer(n._id))}else{var m=function(){d.currentTime=o,d.muted=n._muted||s._muted||y._muted||d.muted,d.volume=n._volume*y.volume(),d.playbackRate=n._rate;try{var e=d.play();if(e&&"undefined"!=typeof Promise&&(e instanceof Promise||"function"==typeof e.then)?(s._playLock=!0,p(),e.then(function(){s._playLock=!1,d._unlocked=!0,i||(s._emit("play",n._id),s._loadQueue())}).catch(function(){s._playLock=!1,s._emit("playerror",n._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."),n._ended=!0,n._paused=!0})):i||(s._playLock=!1,p(),s._emit("play",n._id),s._loadQueue()),d.playbackRate=n._rate,d.paused)return void s._emit("playerror",n._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"!==t||n._loop?s._endTimers[n._id]=setTimeout(s._ended.bind(s,n),h):(s._endTimers[n._id]=function(){s._ended(n),d.removeEventListener("ended",s._endTimers[n._id],!1)},d.addEventListener("ended",s._endTimers[n._id],!1))}catch(e){s._emit("playerror",n._id,e)}},v=window&&window.ejecta||!d.readyState&&y._navigator.isCocoonJS;if(d.readyState>=3||v)m();else{s._playLock=!0;var b=function(){m(),d.removeEventListener(y._canPlayEvent,b,!1)};d.addEventListener(y._canPlayEvent,b,!1),s._clearTimer(n._id)}}return n._id},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var i=t._getSoundIds(e),s=0;s=0?t=parseInt(s[0],10):e=parseFloat(s[0])}else s.length>=2&&(e=parseFloat(s[0]),t=parseInt(s[1],10));var a;if(!(void 0!==e&&e>=0&&e<=1))return a=t?i._soundById(t):i._sounds[0],a?a._volume:0;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"volume",action:function(){i.volume.apply(i,s)}}),i;void 0===t&&(i._volume=e),t=i._getSoundIds(t);for(var r=0;r0?a/l:a),c=Date.now();t._fadeTo=s,t._interval=setInterval(function(){var e=(Date.now()-c)/a;c=Date.now(),_+=o*e,_=Math.max(0,_),_=Math.min(1,_),_=Math.round(100*_)/100,n._webAudio?t._volume=_:n.volume(_,t._id,!0),r&&(n._volume=_),(si&&_>=s)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,n.volume(s,t._id),n._emit("fade",t._id))},h)},_stopFade:function(e){var t=this,i=t._soundById(e);return i&&i._interval&&(t._webAudio&&i._node.gain.cancelScheduledValues(y.ctx.currentTime),clearInterval(i._interval),i._interval=null,t.volume(i._fadeTo,e),i._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,i,s=this,a=arguments;if(0===a.length)return s._loop;if(1===a.length){if("boolean"!=typeof a[0])return!!(i=s._soundById(parseInt(a[0],10)))&&i._loop;e=a[0],s._loop=e}else 2===a.length&&(e=a[0],t=parseInt(a[1],10));for(var r=s._getSoundIds(t),n=0;n=0?t=parseInt(s[0],10):e=parseFloat(s[0])}else 2===s.length&&(e=parseFloat(s[0]),t=parseInt(s[1],10));var n;if("number"!=typeof e)return n=i._soundById(t),n?n._rate:i._rate;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"rate",action:function(){i.rate.apply(i,s)}}),i;void 0===t&&(i._rate=e),t=i._getSoundIds(t);for(var _=0;_=0?t=parseInt(s[0],10):i._sounds.length&&(t=i._sounds[0]._id,e=parseFloat(s[0]))}else 2===s.length&&(e=parseFloat(s[0]),t=parseInt(s[1],10));if(void 0===t)return i;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"seek",action:function(){i.seek.apply(i,s)}}),i;var n=i._soundById(t);if(n){if(!("number"==typeof e&&e>=0)){if(i._webAudio){var _=i.playing(t)?y.ctx.currentTime-n._playStart:0,o=n._rateSeek?n._rateSeek-n._seek:0;return n._seek+(o+_*Math.abs(n._rate))}return n._node.currentTime}var l=i.playing(t);l&&i.pause(t,!0),n._seek=e,n._ended=!1,i._clearTimer(t),i._webAudio||!n._node||isNaN(n._node.duration)||(n._node.currentTime=e);var h=function(){i._emit("seek",t),l&&i.play(t,!0)};if(l&&!i._webAudio){var c=function(){i._playLock?setTimeout(c,0):h()};setTimeout(c,0)}else h()}return i},playing:function(e){var t=this;if("number"==typeof e){var i=t._soundById(e);return!!i&&!i._paused}for(var s=0;s=0&&y._howls.splice(s,1);var a=!0;for(i=0;i=0){a=!1;break}return n&&a&&delete n[e._src],y.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,i,s){var a=this,r=a["_on"+e];return"function"==typeof t&&r.push(s?{id:i,fn:t,once:s}:{id:i,fn:t}),a},off:function(e,t,i){var s=this,a=s["_on"+e],r=0;if("number"==typeof t&&(i=t,t=null),t||i)for(r=0;r=0;r--)a[r].id&&a[r].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,i)}.bind(s,a[r].fn),0),a[r].once&&s.off(e,a[r].fn,a[r].id));return s._loadQueue(e),s},_loadQueue:function(e){var t=this;if(t._queue.length>0){var i=t._queue[0];i.event===e&&(t._queue.shift(),t._loadQueue()),e||i.action()}return t},_ended:function(e){var t=this,i=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;s--){if(i<=t)return;e._sounds[s]._ended&&(e._webAudio&&e._sounds[s]._node&&e._sounds[s]._node.disconnect(0),e._sounds.splice(s,1),i--)}}},_getSoundIds:function(e){var t=this;if(void 0===e){for(var i=[],s=0;s=0;if(y._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),i))try{e.bufferSource.buffer=y._scratchBuffer}catch(e){}return e.bufferSource=null,t}};var r=function(e){this._parent=e,this.init()};r.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++y._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,i=y._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),e._node.gain.setValueAtTime(i,y.ctx.currentTime),e._node.paused=!0,e._node.connect(y.masterGain)):(e._node=y._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(y._canPlayEvent,e._loadFn,!1),e._node.src=t._src,e._node.preload="auto",e._node.volume=i*y.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++y._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(y._canPlayEvent,e._loadFn,!1)}};var n={},_=function(t){var e=t._src;if(n[e])return t._duration=n[e].duration,void h(t);if(/^data:[^;]+;base64,/.test(e)){for(var i=atob(e.split(",")[1]),s=new Uint8Array(i.length),a=0;a0?(n[t._src]=e,h(t,e)):i()};"undefined"!=typeof Promise&&1===y.ctx.decodeAudioData.length?y.ctx.decodeAudioData(e).then(s).catch(i):y.ctx.decodeAudioData(e,s,i)},h=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},c=function(){if(y.usingWebAudio){try{"undefined"!=typeof AudioContext?y.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?y.ctx=new webkitAudioContext:y.usingWebAudio=!1}catch(e){y.usingWebAudio=!1}y.ctx||(y.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(y._navigator&&y._navigator.platform),t=y._navigator&&y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),i=t?parseInt(t[1],10):null;if(e&&i&&i<9){var s=/safari/.test(y._navigator&&y._navigator.userAgent.toLowerCase());(y._navigator&&y._navigator.standalone&&!s||y._navigator&&!y._navigator.standalone&&!s)&&(y.usingWebAudio=!1)}y.usingWebAudio&&(y.masterGain=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),y.masterGain.gain.setValueAtTime(y._muted?0:1,y.ctx.currentTime),y.masterGain.connect(y.ctx.destination)),y._setup()}};"function"==typeof define&&define.amd&&define([],function(){return{Howler:y,Howl:t}}),"undefined"!=typeof exports&&(exports.Howler=y,exports.Howl=t),"undefined"!=typeof window?(window.HowlerGlobal=e,window.Howler=y,window.Howl=t,window.Sound=r):"undefined"!=typeof global&&(global.HowlerGlobal=e,global.Howler=y,global.Howl=t,global.Sound=r)}();!function(){"use strict";HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var i=t._howls.length-1;i>=0;i--)t._howls[i].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,i){var s=this;return s.ctx&&s.ctx.listener?(t="number"!=typeof t?s._pos[1]:t,i="number"!=typeof i?s._pos[2]:i,"number"!=typeof e?s._pos:(s._pos=[e,t,i],void 0!==s.ctx.listener.positionX?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]),s)):s},HowlerGlobal.prototype.orientation=function(e,t,i,s,a,r){var n=this;if(!n.ctx||!n.ctx.listener)return n;var _=n._orientation;return t="number"!=typeof t?_[1]:t,i="number"!=typeof i?_[2]:i,s="number"!=typeof s?_[3]:s,a="number"!=typeof a?_[4]:a,r="number"!=typeof r?_[5]:r,"number"!=typeof e?_:(n._orientation=[e,t,i,s,a,r],void 0!==n.ctx.listener.forwardX?(n.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),n.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),n.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),n.ctx.listener.upX.setTargetAtTime(e,Howler.ctx.currentTime,.1),n.ctx.listener.upY.setTargetAtTime(t,Howler.ctx.currentTime,.1),n.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):n.ctx.listener.setOrientation(e,t,i,s,a,r),n)},Howl.prototype.init=function(i){return function(e){var t=this;return t._orientation=e.orientation||[1,0,0],t._stereo=e.stereo||null,t._pos=e.pos||null,t._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},t._onstereo=e.onstereo?[{fn:e.onstereo}]:[],t._onpos=e.onpos?[{fn:e.onpos}]:[],t._onorientation=e.onorientation?[{fn:e.onorientation}]:[],i.call(this,e)}}(Howl.prototype.init),Howl.prototype.stereo=function(e,t){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"stereo",action:function(){i.stereo(e,t)}}),i;var s=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===t){if("number"!=typeof e)return i._stereo;i._stereo=e,i._pos=[e,0,0]}for(var a=i._getSoundIds(t),r=0;r0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var i=_.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==d)throw new Error(h[i]);if(t.header&&_.deflateSetHeader(this.strm,t.header),t.dictionary){var s;if(s="string"==typeof t.dictionary?l.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=_.deflateSetDictionary(this.strm,s),i!==d)throw new Error(h[i]);this._dict_set=!0}}function s(e,t){var i=new a(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,s(e,t)}function n(e,t){return t=t||{},t.gzip=!0,s(e,t)}var _=e("./zlib/deflate"),o=e("./utils/common"),l=e("./utils/strings"),h=e("./zlib/messages"),c=e("./zlib/zstream"),u=Object.prototype.toString,f=0,p=4,d=0,g=1,m=2,v=-1,b=0,y=8;a.prototype.push=function(e,t){var i,s,a=this.strm,r=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:t===!0?p:f,"string"==typeof e?a.input=l.string2buf(e):"[object ArrayBuffer]"===u.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(r),a.next_out=0,a.avail_out=r),i=_.deflate(a,s),i!==g&&i!==d)return this.onEnd(i),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||s!==p&&s!==m)||("string"===this.options.to?this.onData(l.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&i!==g);return s===p?(i=_.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===d):s!==m||(this.onEnd(d),a.avail_out=0,!0)},a.prototype.onData=function(e){this.chunks.push(e)},a.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Deflate=a,i.deflate=s,i.deflateRaw=r,i.gzip=n},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(e,t,i){"use strict";function s(e){if(!(this instanceof s))return new s(e);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var i=u.inflateInit2(this.strm,t.windowBits);if(i!==d.Z_OK)throw new Error(n[i]);this.header=new o,u.inflateGetHeader(this.strm,this.header)}function a(e,t){var i=new s(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,a(e,t)}var u=e("./zlib/inflate"),f=e("./utils/common"),p=e("./utils/strings"),d=e("./zlib/constants"),n=e("./zlib/messages"),_=e("./zlib/zstream"),o=e("./zlib/gzheader"),g=Object.prototype.toString;s.prototype.push=function(e,t){var i,s,a,r,n,_,o=this.strm,l=this.options.chunkSize,h=this.options.dictionary,c=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?d.Z_FINISH:d.Z_NO_FLUSH,"string"==typeof e?o.input=p.binstring2buf(e):"[object ArrayBuffer]"===g.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new f.Buf8(l),o.next_out=0,o.avail_out=l),i=u.inflate(o,d.Z_NO_FLUSH),i===d.Z_NEED_DICT&&h&&(_="string"==typeof h?p.string2buf(h):"[object ArrayBuffer]"===g.call(h)?new Uint8Array(h):h,i=u.inflateSetDictionary(this.strm,_)),i===d.Z_BUF_ERROR&&c===!0&&(i=d.Z_OK,c=!1),i!==d.Z_STREAM_END&&i!==d.Z_OK)return this.onEnd(i),this.ended=!0,!1;o.next_out&&(0!==o.avail_out&&i!==d.Z_STREAM_END&&(0!==o.avail_in||s!==d.Z_FINISH&&s!==d.Z_SYNC_FLUSH)||("string"===this.options.to?(a=p.utf8border(o.output,o.next_out),r=o.next_out-a,n=p.buf2string(o.output,a),o.next_out=r,o.avail_out=l-r,r&&f.arraySet(o.output,o.output,a,r,0),this.onData(n)):this.onData(f.shrinkBuf(o.output,o.next_out)))),0===o.avail_in&&0===o.avail_out&&(c=!0)}while((o.avail_in>0||0===o.avail_out)&&i!==d.Z_STREAM_END);return i===d.Z_STREAM_END&&(s=d.Z_FINISH),s===d.Z_FINISH?(i=u.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===d.Z_OK):s!==d.Z_SYNC_FLUSH||(this.onEnd(d.Z_OK),o.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){e===d.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=s,i.inflate=a,i.inflateRaw=r,i.ungzip=a},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(e,t,i){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,s,a){if(t.subarray&&e.subarray)return void e.set(t.subarray(i,i+s),a);for(var r=0;r=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;h[254]=h[254]=1,i.string2buf=function(e){var t,i,s,a,r,n=e.length,_=0;for(a=0;a>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},i.buf2binstring=function(e){return o(e,e.length)},i.binstring2buf=function(e){for(var t=new l.Buf8(e.length),i=0,s=t.length;i4)_[s++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;r>1&&i1?_[s++]=65533:a<65536?_[s++]=a:(a-=65536,_[s++]=55296|a>>10&1023,_[s++]=56320|1023&a)}return o(_,s)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return i<0?t:0===i?t:i+h[e[i]]>t?i:t}},{"./common":3}],5:[function(e,t,i){"use strict";function s(e,t,i,s){for(var a=65535&e|0,r=e>>>16&65535|0,n=0;0!==i;){n=i>2e3?2e3:i,i-=n;do{a=a+t[s++]|0,r=r+a|0}while(--n);a%=65521,r%=65521}return a|r<<16|0}t.exports=s},{}],6:[function(e,t,i){"use strict";t.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(e,t,i){"use strict";function s(){for(var e,t=[],i=0;i<256;i++){e=i;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,s){var a=_,r=s+i;e^=-1;for(var n=s;n>>8^a[255&(e^t[n])];return e^-1}var _=s();t.exports=a},{}],8:[function(e,t,i){"use strict";function l(e,t){return e.msg=A[t],t}function h(e){return(e<<1)-(e>4?9:0)}function c(e){for(var t=e.length;--t>=0;)e[t]=0}function u(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(E.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))}function _(e,t){B._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,u(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function o(e,t,i,s){var a=e.avail_in;return a>s&&(a=s),0===a?0:(e.avail_in-=a,E.arraySet(t,e.input,e.next_in,a,i),1===e.state.wrap?e.adler=L(e.adler,t,a,i):2===e.state.wrap&&(e.adler=R(e.adler,t,a,i)),e.next_in+=a,e.total_in+=a,a)}function r(e,t){var i,s,a=e.max_chain_length,r=e.strstart,n=e.prev_length,_=e.nice_match,o=e.strstart>e.w_size-ce?e.strstart-(e.w_size-ce):0,l=e.window,h=e.w_mask,c=e.prev,u=e.strstart+he,f=l[r+n-1],p=l[r+n];e.prev_length>=e.good_match&&(a>>=2),_>e.lookahead&&(_=e.lookahead);do{if(i=t,l[i+n]===p&&l[i+n-1]===f&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&rn){if(e.match_start=t,n=s,s>=_)break;f=l[r+n-1],p=l[r+n]}}}while((t=c[t&h])>o&&0!==--a);return n<=e.lookahead?n:e.lookahead}function d(e){var t,i,s,a,r,n=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-ce)){E.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,i=e.hash_size,t=i;do{s=e.head[--t],e.head[t]=s>=n?s-n:0}while(--i);i=n,t=i;do{s=e.prev[--t],e.prev[t]=s>=n?s-n:0}while(--i);a+=n}if(0===e.strm.avail_in)break;if(i=o(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=le)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(d(e),0===e.lookahead&&t===I)return ye;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var s=e.block_start+i;if((0===e.strstart||e.strstart>=s)&&(e.lookahead=e.strstart-s,e.strstart=s,_(e,!1),0===e.strm.avail_out))return ye;if(e.strstart-e.block_start>=e.w_size-ce&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.strstart>e.block_start&&(_(e,!1),0===e.strm.avail_out)?ye:ye}function a(e,t){for(var i,s;;){if(e.lookahead=le&&(e.ins_h=(e.ins_h<=le)if(s=B._tr_tally(e,e.strstart-e.match_start,e.match_length-le),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=le){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=le&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=le-1)),e.prev_length>=le&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-le,s=B._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-le),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<=le&&e.strstart>0&&(a=e.strstart-1,s=n[a],s===n[++a]&&s===n[++a]&&s===n[++a])){r=e.strstart+he;do{}while(s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=le?(i=B._tr_tally(e,1,e.match_length-le),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function m(e,t){for(var i;;){if(0===e.lookahead&&(d(e),0===e.lookahead)){if(t===I)return ye;break}if(e.match_length=0,i=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function v(e,t,i,s,a){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=s,this.func=a}function b(e){e.window_size=2*e.w_size,c(e.head),e.max_lazy_match=$[e.level].max_lazy,e.good_match=$[e.level].good_length,e.nice_match=$[e.level].nice_length,e.max_chain_length=$[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=le-1,e.match_available=0,e.ins_h=0}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*_e),this.dyn_dtree=new E.Buf16(2*(2*re+1)),this.bl_tree=new E.Buf16(2*(2*ne+1)),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(oe+1),this.heap=new E.Buf16(2*ae+1),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ae+1),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=K,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fe:ve,e.adler=2===t.wrap?0:1,t.last_flush=I,B._tr_init(t),j):l(e,U)}function w(e){var t=x(e);return t===j&&b(e.state),t}function k(e,t){return e&&e.state?2!==e.state.wrap?U:(e.state.gzhead=t,j):U}function P(e,t,i,s,a,r){if(!e)return U;var n=1;if(t===V&&(t=6),s<0?(n=0,s=-s):s>15&&(n=2,s-=16),a<1||a>Q||i!==Z||s<8||s>15||t<0||t>9||r<0||r>q)return l(e,U);8===s&&(s=9);var _=new y;return e.state=_,_.strm=e,_.wrap=n,_.gzhead=null,_.w_bits=s,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=a+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+le-1)/le),_.window=new E.Buf8(2*_.w_size),_.head=new E.Buf16(_.hash_size),_.prev=new E.Buf16(_.w_size),_.lit_bufsize=1<G||t<0)return e?l(e,U):U;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===be&&t!==O)return l(e,0===e.avail_out?W:U);if(s.strm=e,i=s.last_flush,s.last_flush=t,s.status===fe)if(2===s.wrap)e.adler=0,f(s,31),f(s,139),f(s,8),s.gzhead?(f(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),f(s,255&s.gzhead.time),f(s,s.gzhead.time>>8&255),f(s,s.gzhead.time>>16&255),f(s,s.gzhead.time>>24&255),f(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),f(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(f(s,255&s.gzhead.extra.length),f(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=R(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=pe):(f(s,0),f(s,0),f(s,0),f(s,0),f(s,0),f(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),f(s,Pe),s.status=ve);else{var n=Z+(s.w_bits-8<<4)<<8,_=-1;_=s.strategy>=X||s.level<2?0:s.level<6?1:6===s.level?2:3,n|=_<<6,0!==s.strstart&&(n|=ue),n+=31-n%31,s.status=ve,p(s,n),0!==s.strstart&&(p(s,e.adler>>>16),p(s,65535&e.adler)),e.adler=1}if(s.status===pe)if(s.gzhead.extra){for(a=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending!==s.pending_buf_size));)f(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=de)}else s.status=de;if(s.status===de)if(s.gzhead.name){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending===s.pending_buf_size)){r=1;break}r=s.gzindexa&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),0===r&&(s.gzindex=0,s.status=ge)}else s.status=ge;if(s.status===ge)if(s.gzhead.comment){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending===s.pending_buf_size)){r=1;break}r=s.gzindexa&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),0===r&&(s.status=me)}else s.status=me;if(s.status===me&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&u(e),s.pending+2<=s.pending_buf_size&&(f(s,255&e.adler),f(s,e.adler>>8&255),e.adler=0,s.status=ve)):s.status=ve),0!==s.pending){if(u(e),0===e.avail_out)return s.last_flush=-1,j}else if(0===e.avail_in&&h(t)<=h(i)&&t!==O)return l(e,W);if(s.status===be&&0!==e.avail_in)return l(e,W);if(0!==e.avail_in||0!==s.lookahead||t!==I&&s.status!==be){var o=s.strategy===X?m(s,t):s.strategy===Y?g(s,t):$[s.level].func(s,t);if(o!==we&&o!==ke||(s.status=be),o===ye||o===we)return 0===e.avail_out&&(s.last_flush=-1),j;if(o===xe&&(t===D?B._tr_align(s):t!==G&&(B._tr_stored_block(s,0,0,!1),t===F&&(c(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),u(e),0===e.avail_out))return s.last_flush=-1,j}return t!==O?j:s.wrap<=0?H:(2===s.wrap?(f(s,255&e.adler),f(s,e.adler>>8&255),f(s,e.adler>>16&255),f(s,e.adler>>24&255),f(s,255&e.total_in),f(s,e.total_in>>8&255),f(s,e.total_in>>16&255),f(s,e.total_in>>24&255)):(p(s,e.adler>>>16),p(s,65535&e.adler)),u(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?j:H)}function M(e){var t;return e&&e.state?(t=e.state.status,t!==fe&&t!==pe&&t!==de&&t!==ge&&t!==me&&t!==ve&&t!==be?l(e,U):(e.state=null,t===ve?l(e,N):j)):U}function S(e,t){var i,s,a,r,n,_,o,l,h=t.length;if(!e||!e.state)return U;if(i=e.state,r=i.wrap,2===r||1===r&&i.status!==fe||i.lookahead)return U;for(1===r&&(e.adler=L(e.adler,t,h,0)),i.wrap=0,h>=i.w_size&&(0===r&&(c(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new E.Buf8(i.w_size),E.arraySet(l,t,h-i.w_size,i.w_size,0),t=l,h=i.w_size),n=e.avail_in,_=e.next_in,o=e.input,e.avail_in=h,e.next_in=0,e.input=t,d(i);i.lookahead>=le;){s=i.strstart,a=i.lookahead-(le-1);do{i.ins_h=(i.ins_h<>>24,f>>>=y,p-=y,y=b>>>16&255,0===y)T[r++]=65535&b;else{if(!(16&y)){if(0===(64&y)){b=d[(65535&b)+(f&(1<>>=y,p-=y),p<15&&(f+=C[s++]<>>24,f>>>=y,p-=y,y=b>>>16&255,!(16&y)){if(0===(64&y)){b=g[(65535&b)+(f&(1<o){e.msg="invalid distance too far back",i.mode=M;break e}if(f>>>=y,p-=y,y=r-n,w>y){if(y=w-y,y>h&&i.sane){e.msg="invalid distance too far back",i.mode=M;break e}if(k=0,P=u,0===c){if(k+=l-y,y2;)T[r++]=P[k++],T[r++]=P[k++],T[r++]=P[k++],x-=3;x&&(T[r++]=P[k++],x>1&&(T[r++]=P[k++]))}else{k=r-w;do{T[r++]=T[k++],T[r++]=T[k++],T[r++]=T[k++],x-=3}while(x>2);x&&(T[r++]=T[k++],x>1&&(T[r++]=T[k++]))}break}}break}}while(s>3,s-=x,p-=x<<3,f&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new L.Buf16(320),this.work=new L.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=K,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new L.Buf32(d),t.distcode=t.distdyn=new L.Buf32(g),t.sane=1,t.back=-1,N):z}function r(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,s(e)):z}function n(e,t){var i,s;return e&&e.state?(s=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?z:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=i,s.wbits=t,r(e))):z}function _(e,t){var i,s;return e?(s=new a,e.state=s,s.window=null,i=n(e,t),i!==N&&(e.state=null),i):z}function o(e){return _(e,v)}function E(e){if(b){var t;for(f=new L.Buf32(512),p=new L.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(D(O,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;D(G,e.lens,0,32,p,0,e.work,{bits:5}),b=!1}e.lencode=f,e.lenbits=9,e.distcode=p,e.distbits=5}function B(e,t,i,s){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(L.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>s&&(a=s),L.arraySet(r.window,t,i-s,a,r.wnext),s-=a,s?(L.arraySet(r.window,t,i-s,s,0),r.wnext=s,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=A(i.check,M,2,0),l=0,h=0,i.mode=Z;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=Te;break}if((15&l)!==J){e.msg="unknown compression method",i.mode=Te;break}if(l>>>=4,h-=4,w=(15&l)+8,0===i.wbits)i.wbits=w;else if(w>i.wbits){e.msg="invalid window size",i.mode=Te;break}i.dmax=1<>8&1),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0,i.mode=Q;case Q:for(;h<32;){if(0===_)break e;_--,l+=s[r++]<>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,i.check=A(i.check,M,4,0)),l=0,h=0,i.mode=ee;case ee:for(;h<16;){if(0===_)break e;_--,l+=s[r++]<>8),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0,i.mode=te;case te:if(1024&i.flags){for(;h<16;){if(0===_)break e;_--,l+=s[r++]<>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0}else i.head&&(i.head.extra=null);i.mode=ie;case ie:if(1024&i.flags&&(f=i.length,f>_&&(f=_),f&&(i.head&&(w=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),L.arraySet(i.head.extra,s,r,f,w)),512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,i.length-=f),i.length))break e;i.length=0,i.mode=se;case se:if(2048&i.flags){if(0===_)break e;f=0;do{w=s[r+f++],i.head&&w&&i.length<65536&&(i.head.name+=String.fromCharCode(w))}while(w&&f<_);if(512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,w)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=ae;case ae:if(4096&i.flags){if(0===_)break e;f=0;do{w=s[r+f++],i.head&&w&&i.length<65536&&(i.head.comment+=String.fromCharCode(w))}while(w&&f<_);if(512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,w)break e}else i.head&&(i.head.comment=null);i.mode=re;case re:if(512&i.flags){for(;h<16;){if(0===_)break e;_--,l+=s[r++]<>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=oe;break;case ne:for(;h<32;){if(0===_)break e;_--,l+=s[r++]<>>=7&h,h-=7&h,i.mode=ke;break}for(;h<3;){if(0===_)break e;_--,l+=s[r++]<>>=1,h-=1,3&l){case 0:i.mode=he;break;case 1:if(E(i),i.mode=ge,t===U){l>>>=2,h-=2;break e}break;case 2:i.mode=fe;break;case 3:e.msg="invalid block type",i.mode=Te}l>>>=2,h-=2;break;case he:for(l>>>=7&h,h-=7&h;h<32;){if(0===_)break e;_--,l+=s[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=Te;break}if(i.length=65535&l,l=0,h=0,i.mode=ce,t===U)break e;case ce:i.mode=ue;case ue:if(f=i.length){if(f>_&&(f=_),f>o&&(f=o),0===f)break e;L.arraySet(a,s,r,f,n),_-=f,r+=f,o-=f,n+=f,i.length-=f;break}i.mode=oe;break;case fe:for(;h<14;){if(0===_)break e;_--,l+=s[r++]<>>=5,h-=5,i.ndist=(31&l)+1,l>>>=5,h-=5,i.ncode=(15&l)+4,l>>>=4,h-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Te;break}i.have=0,i.mode=pe;case pe:for(;i.have>>=3,h-=3}for(;i.have<19;)i.lens[S[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,P={bits:i.lenbits},k=D(F,i.lens,0,19,i.lencode,0,i.work,P),i.lenbits=P.bits,k){e.msg="invalid code lengths set",i.mode=Te;break}i.have=0,i.mode=de;case de:for(;i.have>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<>>=g,h-=g,i.lens[i.have++]=v;else{if(16===v){for(C=g+2;h>>=g,h-=g,0===i.have){e.msg="invalid bit length repeat",i.mode=Te;break}w=i.lens[i.have-1],f=3+(3&l),l>>>=2,h-=2}else if(17===v){for(C=g+3;h>>=g,h-=g,w=0,f=3+(7&l),l>>>=3,h-=3}else{for(C=g+7;h>>=g,h-=g,w=0,f=11+(127&l),l>>>=7,h-=7}if(i.have+f>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Te;break}for(;f--;)i.lens[i.have++]=w}}if(i.mode===Te)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Te;break}if(i.lenbits=9,P={bits:i.lenbits},k=D(O,i.lens,0,i.nlen,i.lencode,0,i.work,P),i.lenbits=P.bits,k){e.msg="invalid literal/lengths set",i.mode=Te;break}if(i.distbits=6,i.distcode=i.distdyn,P={bits:i.distbits},k=D(G,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,P),i.distbits=P.bits,k){e.msg="invalid distances set",i.mode=Te;break}if(i.mode=ge,t===U)break e;case ge:i.mode=me;case me:if(_>=6&&o>=258){e.next_out=n,e.avail_out=o,e.next_in=r,e.avail_in=_,i.hold=l,i.bits=h,I(e,u),n=e.next_out,a=e.output,o=e.avail_out,r=e.next_in,s=e.input,_=e.avail_in,l=i.hold,h=i.bits,i.mode===oe&&(i.back=-1);break}for(i.back=0;T=i.lencode[l&(1<>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<>b)],g=T>>>24,m=T>>>16&255,v=65535&T,!(b+g<=h);){if(0===_)break e;_--,l+=s[r++]<>>=b,h-=b,i.back+=b}if(l>>>=g,h-=g,i.back+=g,i.length=v,0===m){i.mode=we;break}if(32&m){i.back=-1,i.mode=oe;break}if(64&m){e.msg="invalid literal/length code",i.mode=Te;break}i.extra=15&m,i.mode=ve;case ve:if(i.extra){for(C=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=be;case be:for(;T=i.distcode[l&(1<>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<>b)],g=T>>>24,m=T>>>16&255,v=65535&T,!(b+g<=h);){if(0===_)break e;_--,l+=s[r++]<>>=b,h-=b,i.back+=b}if(l>>>=g,h-=g,i.back+=g,64&m){e.msg="invalid distance code",i.mode=Te;break}i.offset=v,i.extra=15&m,i.mode=ye;case ye:if(i.extra){for(C=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Te;break}i.mode=xe;case xe:if(0===o)break e;if(f=u-o,i.offset>f){if(f=i.offset-f,f>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Te;break}f>i.wnext?(f-=i.wnext,p=i.wsize-f):p=i.wnext-f,f>i.length&&(f=i.length),d=i.window}else d=a,p=n-i.offset,f=i.length;f>o&&(f=o),o-=f,i.length-=f;do{a[n++]=d[p++]}while(--f);0===i.length&&(i.mode=me);break;case we:if(0===o)break e;a[n++]=i.length,o--,i.mode=me;break;case ke:if(i.wrap){for(;h<32;){if(0===_)break e;_--,l|=s[r++]<=1&&0===E[x];x--);if(w>x&&(w=x),0===x)return a[r++]=20971520,a[r++]=20971520,_.bits=1,0;for(y=1;y0&&(e===G||1!==x))return-1;for(B[1]=0,v=1;vF||e===H&&T>O)return 1;for(var A=0;;){A++,p=v-P,n[b]f?(d=L[R+n[b]],g=S[$+n[b]]):(d=96,g=0),o=1<>P)+l]=p<<24|d<<16|g|0}while(0!==l);for(o=1<>=1;if(0!==o?(M&=o-1,M+=o):M=0,b++,0===--E[v]){if(v===x)break;v=t[i+n[b]]}if(v>w&&(M&c)!==h){for(0===P&&(P=w),u+=y,k=v-P,C=1<F||e===H&&T>O)return 1;h=M&c,a[h]=w<<24|k<<16|u-r|0}}return 0!==M&&(a[u+M]=v-P<<24|64<<16|0),_.bits=w,0}},{"../utils/common":3}],13:[function(e,t,i){"use strict";t.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(e,t,i){"use strict";function s(e){for(var t=e.length;--t>=0;)e[t]=0}function n(e,t,i,s,a){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=s,this.max_length=a,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?oe[e]:oe[256+(e>>>7)]}function r(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function h(e,t,i){e.bi_valid>q-i?(e.bi_buf|=t<>q-e.bi_valid,e.bi_valid+=i-q):(e.bi_buf|=t<>>=1,i<<=1}while(--t>0);return i>>>1}function _(e){16===e.bi_valid?(r(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function u(e,t){var i,s,a,r,n,_,o=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,u=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,d=0;for(r=0;r<=Y;r++)e.bl_count[r]=0;for(o[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;ip&&(r=p,d++),o[2*s+1]=r,s>l||(e.bl_count[r]++,n=0,s>=f&&(n=u[s-f]),_=o[2*s],e.opt_len+=_*(r+n),c&&(e.static_len+=_*(h[2*s+1]+n)));if(0!==d){do{for(r=p-1;0===e.bl_count[r];)r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[p]--,d-=2}while(d>0);for(r=p;0!==r;r--)for(s=e.bl_count[r];0!==s;)a=e.heap[--i],a>l||(o[2*a+1]!==r&&(e.opt_len+=(r-o[2*a+1])*o[2*a],o[2*a+1]=r),s--)}}function f(e,t,i){var s,a,r=new Array(Y+1),n=0;for(s=1;s<=Y;s++)r[s]=n=n+i[s-1]<<1;for(a=0;a<=t;a++){var _=e[2*a+1];0!==_&&(e[2*a]=l(r[_]++,_))}}function p(){var e,t,i,s,a,r=new Array(Y+1);for(i=0,s=0;s>=7;s8?r(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function m(e,t,i,s){g(e),s&&(r(e,i),r(e,~i)),L.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}function v(e,t,i,s){var a=2*t,r=2*i;return e[a]>1;i>=1;i--)b(e,r,i);a=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],b(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,r[2*a]=r[2*i]+r[2*s],e.depth[a]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,r[2*i+1]=r[2*s+1]=a,e.heap[1]=a++,b(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],u(e,t),f(r,l,e.bl_count)}function w(e,t,i){var s,a,r=-1,n=t[1],_=0,o=7,l=4;for(0===n&&(o=138,l=3),t[2*(i+1)+1]=65535,s=0;s<=i;s++)a=n,n=t[2*(s+1)+1],++_=3&&0===e.bl_tree[2*ae[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function C(e,t,i,s){var a;for(h(e,t-257,5),h(e,i-1,5),h(e,s-4,4),a=0;a>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return A;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return I;for(t=32;t0?(e.strm.data_type===D&&(e.strm.data_type=T(e)),x(e,e.l_desc),x(e,e.d_desc),n=P(e),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=i+5,i+4<=a&&t!==-1?S(e,t,i,s):e.strategy===R||r===a?(h(e,(O<<1)+(s?1:0),3),y(e,ne,_e)):(h(e,(G<<1)+(s?1:0),3),C(e,e.l_desc.max_code+1,e.d_desc.max_code+1,n+1),y(e,e.dyn_ltree,e.dyn_dtree)),d(e),s&&g(e)}function B(e,t,i){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(le[i]+N+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var L=e("../utils/common"),R=4,A=0,I=1,D=2,F=0,O=1,G=2,j=3,H=258,U=29,N=256,W=N+1+U,V=30,z=19,X=2*W+1,Y=15,q=16,J=7,K=256,Z=16,Q=17,ee=18,te=[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],ie=[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],se=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=512,ne=new Array(2*(W+2));s(ne);var _e=new Array(2*V);s(_e);var oe=new Array(re);s(oe);var le=new Array(H-j+1);s(le);var he=new Array(U);s(he);var ce=new Array(V);s(ce);var ue,fe,pe,de=!1;i._tr_init=M,i._tr_stored_block=S,i._tr_flush_block=E,i._tr_tally=B,i._tr_align=$},{"../utils/common":3}],15:[function(e,t,i){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=s},{}],"/":[function(e,t,i){"use strict";var s=e("./lib/utils/common").assign,a=e("./lib/deflate"),r=e("./lib/inflate"),n=e("./lib/zlib/constants"),_={};s(_,a,r,n),t.exports=_},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var saveAs=saveAs||function(l){"use strict";if(typeof l==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var e=l.document,h=function(){return l.URL||l.webkitURL||l},c=e.createElementNS("http://www.w3.org/1999/xhtml","a"),u="download"in c,f=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},p=/constructor/i.test(l.HTMLElement)||l.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent),r=function(e){(l.setImmediate||l.setTimeout)(function(){throw e},0)},g="application/octet-stream",i=1e3*40,m=function(e){var t=function(){if(typeof e==="string"){h().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,i)},v=function(e,t,i){t=[].concat(t);var s=t.length;while(s--){var a=e["on"+t[s]];if(typeof a==="function"){try{a.call(e,i||e)}catch(e){r(e)}}}},b=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},s=function(t,e,i){if(!i){t=b(t)}var s=this,a=t.type,r=a===g,n,_=function(){v(s,"writestart progress write writeend".split(" "))},o=function(){if((d||r&&p)&&l.FileReader){var i=new FileReader;i.onloadend=function(){var e=d?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");var t=l.open(e,"_blank");if(!t)l.location.href=e;e=undefined;s.readyState=s.DONE;_()};i.readAsDataURL(t);s.readyState=s.INIT;return}if(!n){n=h().createObjectURL(t)}if(r){l.location.href=n}else{var e=l.open(n,"_blank");if(!e){l.location.href=n}}s.readyState=s.DONE;_();m(n)};s.readyState=s.INIT;if(u){n=h().createObjectURL(t);setTimeout(function(){c.href=n;c.download=e;f(c);_();m(n);s.readyState=s.DONE});return}o()},t=s.prototype,a=function(e,t,i){return new s(e,t||e.name||"download",i)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,i){t=t||e.name||"download";if(!i){e=b(e)}return navigator.msSaveOrOpenBlob(e,t)}}t.abort=function(){};t.readyState=t.INIT=0;t.WRITING=1;t.DONE=2;t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null;return a}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})}