(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={addRenderer:null,addWindow:null,registerModule:null,setPreloader:null,__class__:lime_app_IModule};var lime_app_Module=function(){this.onExit=new lime_app__$Event_$Int_$Void;this.__renderers=[];this.__windows=[]};$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,__application:null,__preloader:null,__renderers:null,__windows:null,addRenderer:function(e){var t=$bind(this,this.render);var i=e;var s=function(){t(i)};e.onRender.add(s);var a=$bind(this,this.onRenderContextLost);var r=e;var n=function(){a(r)};e.onContextLost.add(n);var _=$bind(this,this.onRenderContextRestored);var o=e;var l=function(e){_(o,e)};e.onContextRestored.add(l);this.__renderers.push(e)},addWindow:function(e){var t=$bind(this,this.onWindowActivate);var i=e;var s=function(){t(i)};e.onActivate.add(s);var a=$bind(this,this.__onWindowClose);var r=e;var n=function(){a(r)};e.onClose.add(n,false,-1e4);var _=$bind(this,this.onWindowCreate);var o=e;var l=function(){_(o)};e.onCreate.add(l);var h=$bind(this,this.onWindowDeactivate);var c=e;var u=function(){h(c)};e.onDeactivate.add(u);var f=$bind(this,this.onWindowDropFile);var p=e;var d=function(e){f(p,e)};e.onDropFile.add(d);var g=$bind(this,this.onWindowEnter);var m=e;var v=function(){g(m)};e.onEnter.add(v);var b=$bind(this,this.onWindowExpose);var y=e;var x=function(){b(y)};e.onExpose.add(x);var P=$bind(this,this.onWindowFocusIn);var k=e;var w=function(){P(k)};e.onFocusIn.add(w);var T=$bind(this,this.onWindowFocusOut);var C=e;var S=function(){T(C)};e.onFocusOut.add(S);var M=$bind(this,this.onWindowFullscreen);var $=e;var E=function(){M($)};e.onFullscreen.add(E);var B=$bind(this,this.onKeyDown);var I=e;var L=function(e,t){B(I,e,t)};e.onKeyDown.add(L);var R=$bind(this,this.onKeyUp);var D=e;var F=function(e,t){R(D,e,t)};e.onKeyUp.add(F);var A=$bind(this,this.onWindowLeave);var O=e;var j=function(){A(O)};e.onLeave.add(j);var H=$bind(this,this.onWindowMinimize);var G=e;var U=function(){H(G)};e.onMinimize.add(U);var N=$bind(this,this.onMouseDown);var W=e;var V=function(e,t,i){N(W,e,t,i)};e.onMouseDown.add(V);var z=$bind(this,this.onMouseMove);var X=e;var Y=function(e,t){z(X,e,t)};e.onMouseMove.add(Y);var K=$bind(this,this.onMouseMoveRelative);var q=e;var J=function(e,t){K(q,e,t)};e.onMouseMoveRelative.add(J);var Z=$bind(this,this.onMouseUp);var Q=e;var ee=function(e,t,i){Z(Q,e,t,i)};e.onMouseUp.add(ee);var te=$bind(this,this.onMouseWheel);var ie=e;var se=function(e,t){te(ie,e,t)};e.onMouseWheel.add(se);var ae=$bind(this,this.onWindowMove);var re=e;var ne=function(e,t){ae(re,e,t)};e.onMove.add(ne);var _e=$bind(this,this.onWindowResize);var oe=e;var le=function(e,t){_e(oe,e,t)};e.onResize.add(le);var he=$bind(this,this.onWindowRestore);var ce=e;var ue=function(){he(ce)};e.onRestore.add(ue);var fe=$bind(this,this.onTextEdit);var pe=e;var de=function(e,t,i){fe(pe,e,t,i)};e.onTextEdit.add(de);var ge=$bind(this,this.onTextInput);var me=e;var ve=function(e){ge(me,e)};e.onTextInput.add(ve);if(e.id>-1){this.onWindowCreate(e)}this.__windows.push(e)},registerModule:function(e){this.__application=e;e.onExit.add($bind(this,this.onModuleExit),false,0);e.onUpdate.add($bind(this,this.update));var t=lime_ui_Gamepad.devices.iterator();while(t.hasNext()){var i=t.next();this.__onGamepadConnect(i)}lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));var s=lime_ui_Joystick.devices.iterator();while(s.hasNext()){var a=s.next();this.__onJoystickConnect(a)}lime_ui_Joystick.onConnect.add($bind(this,this.__onJoystickConnect));lime_ui_Touch.onCancel.add($bind(this,this.onTouchCancel));lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd))},removeRenderer:function(e){if(e!=null&&this.__renderers.indexOf(e)>-1){HxOverrides.remove(this.__renderers,e)}},setPreloader:function(e){if(this.__preloader!=null){this.__preloader.onProgress.remove($bind(this,this.onPreloadProgress));this.__preloader.onComplete.remove($bind(this,this.onPreloadComplete))}this.__preloader=e;if(e==null||e.complete){this.onPreloadComplete()}else{e.onProgress.add($bind(this,this.onPreloadProgress));e.onComplete.add($bind(this,this.onPreloadComplete))}},onGamepadAxisMove:function(e,t,i){},onGamepadButtonDown:function(e,t){},onGamepadButtonUp:function(e,t){},onGamepadConnect:function(e){},onGamepadDisconnect:function(e){},onJoystickAxisMove:function(e,t,i){},onJoystickButtonDown:function(e,t){},onJoystickButtonUp:function(e,t){},onJoystickConnect:function(e){},onJoystickDisconnect:function(e){},onJoystickHatMove:function(e,t,i){},onJoystickTrackballMove:function(e,t,i,s){},onKeyDown:function(e,t,i){},onKeyUp:function(e,t,i){},onModuleExit:function(e){},onMouseDown:function(e,t,i,s){},onMouseMove:function(e,t,i){},onMouseMoveRelative:function(e,t,i){},onMouseUp:function(e,t,i,s){},onMouseWheel:function(e,t,i){},onPreloadComplete:function(){},onPreloadProgress:function(e,t){},onRenderContextLost:function(e){},onRenderContextRestored:function(e,t){},onTextEdit:function(e,t,i,s){},onTextInput:function(e,t){},onTouchCancel:function(e){},onTouchEnd:function(e){},onTouchMove:function(e){},onTouchStart:function(e){},onWindowActivate:function(e){},onWindowClose:function(e){},onWindowCreate:function(e){},onWindowDeactivate:function(e){},onWindowDropFile:function(e,t){},onWindowEnter:function(e){},onWindowExpose:function(e){},onWindowFocusIn:function(e){},onWindowFocusOut:function(e){},onWindowFullscreen:function(e){},onWindowLeave:function(e){},onWindowMove:function(e,t,i){},onWindowMinimize:function(e){},onWindowResize:function(e,t,i){},onWindowRestore:function(e){},render:function(e){},update:function(e){},__onGamepadConnect:function(e){this.onGamepadConnect(e);var i=$bind(this,this.onGamepadAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onGamepadButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.onGamepadButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__onJoystickConnect:function(e){this.onJoystickConnect(e);var i=$bind(this,this.onJoystickAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onJoystickButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.onJoystickButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onJoystickDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u);var f=$bind(this,this.onJoystickHatMove);var p=e;var d=function(e,t){f(p,e,t)};e.onHatMove.add(d);var g=$bind(this,this.onJoystickTrackballMove);var m=e;var v=function(e,t,i){g(m,e,t,i)};e.onTrackballMove.add(v)},__onWindowClose:function(e){this.onWindowClose(e);HxOverrides.remove(this.__windows,e)},__class__:lime_app_Module};var lime__$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._backend.html5.HTML5Application"]=lime__$backend_html5_HTML5Application;lime__$backend_html5_HTML5Application.__name__=["lime","_backend","html5","HTML5Application"];lime__$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 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;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 45:return 1073741897;case 46:return 127;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 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 144:return 1073741907;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39}return e},create:function(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;this.parent.onUpdate.dispatch(this.deltaTime|0);if(this.parent.__renderers[0]!=null&&this.parent.__renderers[0].context!=null){this.parent.__renderers[0].render();this.parent.__renderers[0].onRender.dispatch();if(!this.parent.__renderers[0].onRender.canceled){this.parent.__renderers[0].flip()}}if(this.framePeriod<0){this.nextUpdate=this.currentUpdate;this.nextUpdate=this.currentUpdate}else{this.nextUpdate=this.currentUpdate+this.framePeriod}this.lastUpdate=this.currentUpdate}window.requestAnimationFrame($bind(this,this.handleApplicationEvent))},handleKeyEvent:function(e){if(this.parent.__windows[0]!=null){var t=this.convertKeyCode(e.keyCode!=null?e.keyCode:e.which);var i=(e.shiftKey?3:0)|(e.ctrlKey?192:0)|(e.altKey?768:0)|(e.metaKey?3072:0);if(e.type=="keydown"){this.parent.__windows[0].onKeyDown.dispatch(t,i);if(this.parent.__windows[0].onKeyDown.canceled){e.preventDefault()}}else{this.parent.__windows[0].onKeyUp.dispatch(t,i);if(this.parent.__windows[0].onKeyUp.canceled){e.preventDefault()}}}},handleSensorEvent:function(e){this.accelerometer.onUpdate.dispatch(e.accelerationIncludingGravity.x,e.accelerationIncludingGravity.y,e.accelerationIncludingGravity.z)},handleWindowEvent:function(e){if(this.parent.__windows[0]!=null){var t=e.type;switch(t){case"beforeunload":if(!e.defaultPrevented){this.parent.__windows[0].onClose.dispatch();if(this.parent.__windows[0]!=null&&this.parent.__windows[0].onClose.canceled){e.preventDefault()}}break;case"blur":this.parent.__windows[0].onFocusOut.dispatch();this.parent.__windows[0].onDeactivate.dispatch();break;case"focus":this.parent.__windows[0].onFocusIn.dispatch();this.parent.__windows[0].onActivate.dispatch();break;case"resize":this.parent.__windows[0].backend.handleResizeEvent(e);break}}},setFrameRate:function(e){if(e>=60){this.framePeriod=-1}else if(e>0){this.framePeriod=1e3/e}else{this.framePeriod=1e3}return e},updateGameDevices:function(){var e=lime_ui_Joystick.__getDeviceData();if(e==null){return}var t;var i;var s;var a;var r;var n=0;var _=e.length;while(n<_){var o=n++;t=o;a=e[t];if(a==null){continue}if(!this.gameDeviceCache.h.hasOwnProperty(t)){r=new lime__$backend_html5_GameDeviceData;r.id=t;r.connected=a.connected;var l=0;var h=a.buttons.length;while(l0){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=0;var i=this.__renderers;while(t0){var a=0;var r=this.__windows;while(a0){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,!this.__worldColorTransform.__isDefault());if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!(!t.__renderable||t.__worldAlpha<=0)){var i=e.context;if(t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime_graphics_utils_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=t.__worldAlpha;var s=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=false;i.msImageSmoothingEnabled=false;i.imageSmoothingEnabled=false}if(s==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),s.x,s.y,s.width,s.height)}if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=true;i.msImageSmoothingEnabled=true;i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}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 a=e.context;e.setTransform(this.__renderTransform,a);var r=this.opaqueBackground;a.fillStyle="rgb("+(r>>>16&255)+","+(r>>>8&255)+","+(r&255)+")";a.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!(!this.__renderable||this.__worldAlpha<=0)){var n=this.__graphics;if(n!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(n,e);var _=n.__bounds;var o=n.__width;var l=n.__height;if(n.__canvas!=null){var h=e.context;var c=this.__scrollRect;if(o>0&&l>0&&(c==null||c.width>0&&c.height>0)){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);h.globalAlpha=this.__worldAlpha;e.setTransform(n.__worldTransform,h);if(e.__isDOM){var u=1/e.pixelRatio;h.scale(u,u)}h.drawImage(n.__canvas,0,0,o,l);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,!this.__worldColorTransform.__isDefault());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.__dirty||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[1]){case 0:var i=e;i.setShader(this.__worldShader);this.__customRenderEvent.type="renderOpenGL";break;case 1:this.__customRenderEvent.type="renderCanvas";break;case 2:if(this.stage!=null&&this.__worldVisible){this.__customRenderEvent.type="renderDOM"}else{this.__customRenderEvent.type="clearDOM"}break;case 4:this.__customRenderEvent.type="renderCairo";break;default:return}e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);this.dispatchEvent(this.__customRenderEvent);e.__popMaskObject(this);if(e.__type==lime_graphics_RendererType.OPENGL){var s=e;s.setViewport()}}},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_opengl_GLBitmap.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.__gl;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.__context.clearColor((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1);t.__context.clear(t.COLOR_BUFFER_BIT);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_opengl_GLShape.render(this,e)}}}this.__renderEvent(e)},__renderGLMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_opengl_GLShape.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_opengl_GLGraphics.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.__blendMode}else{this.__worldBlendMode=this.__blendMode}if(this.__shader==null){this.__worldShader=i.__shader}else{this.__worldShader=this.__shader}}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()}}}if(t&&this.get_mask()!=null){this.get_mask().__update(e,true)}},__updateCacheBitmap:function(e,t){if(this.__isCacheBitmapRender){return false}if(this.get_cacheAsBitmap()||e.__type!=lime_graphics_RendererType.OPENGL&&!this.__worldColorTransform.__isDefault()){var i=null;var s=null;this.__update(false,true);var a=this.__cacheBitmap==null||this.__renderDirty&&(t||this.__children!=null&&this.__children.length>0||this.__graphics!=null&&this.__graphics.__dirty)||this.opaqueBackground!=this.__cacheBitmapBackground||!this.__cacheBitmapColorTransform.__equals(this.__worldColorTransform);var r=a||!this.__cacheBitmap.__worldTransform.equals(this.__worldTransform);var n=this.__filters!=null;if(n&&!a){var _=0;var o=this.__filters;while(_0){d=Math.ceil(s.x)}else{d=Math.floor(s.x)}if(s.y>0){g=Math.ceil(s.y)}else{g=Math.floor(s.y)}if(this.__cacheBitmapData!=null){if(f>this.__cacheBitmapData.width||p>this.__cacheBitmapData.height){c=Math.ceil(Math.max(f*1.25,this.__cacheBitmapData.width));u=Math.ceil(Math.max(p*1.25,this.__cacheBitmapData.height));a=true}else{c=this.__cacheBitmapData.width;u=this.__cacheBitmapData.height}}else{c=f;u=p}}if(a){r=true;this.__cacheBitmapBackground=this.opaqueBackground;if(f>=.5&&p>=.5){var m=this.opaqueBackground!=null&&(c!=f||u!=p);var v=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;var b=m?0:v;var y=e.__type==lime_graphics_RendererType.OPENGL;if(this.__cacheBitmapData==null||c>this.__cacheBitmapData.width||u>this.__cacheBitmapData.height){this.__cacheBitmapData=new openfl_display_BitmapData(c,u,true,b);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,b,y)}if(m){s.setTo(0,0,f,p);this.__cacheBitmapData.__fillRect(s,v,y)}}else{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(r||a){this.__cacheBitmap.__worldTransform.copyFrom(this.__worldTransform);if(h==this.__renderTransform){this.__cacheBitmap.__renderTransform.identity();this.__cacheBitmap.__renderTransform.tx=this.__renderTransform.tx+d;this.__cacheBitmap.__renderTransform.ty=this.__renderTransform.ty+g}else{this.__cacheBitmap.__renderTransform.copyFrom(this.__cacheBitmapMatrix);this.__cacheBitmap.__renderTransform.invert();this.__cacheBitmap.__renderTransform.concat(this.__renderTransform);this.__cacheBitmap.__renderTransform.tx+=d;this.__cacheBitmap.__renderTransform.ty+=g}}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.__scrollRect=this.__scrollRect;this.__cacheBitmap.set_mask(this.__mask);if(a){var x=e.__type;if(x==lime_graphics_RendererType.OPENGL){if(this.__shouldCacheHardware(null)==false){x=lime_graphics_RendererType.CANVAS}}if(this.__cacheBitmapRenderer==null||x!=this.__cacheBitmapRenderer.__type){if(x==lime_graphics_RendererType.OPENGL){this.__cacheBitmapRenderer=new openfl_display_OpenGLRenderer(js_Boot.__cast(e,openfl_display_OpenGLRenderer).__gl,this.__cacheBitmapData)}else{if(this.__cacheBitmapData.image==null){var P=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;this.__cacheBitmapData=new openfl_display_BitmapData(c,u,true,P);this.__cacheBitmap.__bitmapData=this.__cacheBitmapData}lime_graphics_utils_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}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-=d;this.__cacheBitmapRenderer.__worldTransform.ty-=g;this.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(this.__worldColorTransform);this.__cacheBitmapRenderer.__worldColorTransform.__invert();this.__isCacheBitmapRender=true;if(this.__cacheBitmapRenderer.__type==lime_graphics_RendererType.OPENGL){var k=e;var w=this.__cacheBitmapRenderer;var T=k.__blendMode;k.__suspendClipAndMask();w.__copyShader(k);this.__cacheBitmapData.__setUVRect(w.__gl,0,0,f,p);w.__setRenderTarget(this.__cacheBitmapData);if(this.__cacheBitmapData.image!=null){this.__cacheBitmapData.__textureVersion=this.__cacheBitmapData.image.version+1}this.__cacheBitmapData.__drawGL(this,w);if(n){var C=true;var S=false;var M=0;var $=this.__filters;while(M<$.length){var E=$[M];++M;if(E.__preserveObject){S=true}}var B=this.__cacheBitmapData;var I=null;var L=null;if(this.__cacheBitmapData2==null||c>this.__cacheBitmapData2.width||u>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(c,u,true,0)}else if(this.__cacheBitmapData2.image!=null){this.__cacheBitmapData2.__textureVersion=this.__cacheBitmapData2.image.version+1}this.__cacheBitmapData2.__setUVRect(w.__gl,0,0,f,p);I=this.__cacheBitmapData2;if(S){if(this.__cacheBitmapData3==null||c>this.__cacheBitmapData3.width||u>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(c,u,true,0)}else if(this.__cacheBitmapData3.image!=null){this.__cacheBitmapData3.__textureVersion=this.__cacheBitmapData3.image.version+1}this.__cacheBitmapData3.__setUVRect(w.__gl,0,0,f,p);L=this.__cacheBitmapData3}w.__setBlendMode(10);w.__worldAlpha=1;w.__worldTransform.identity();w.__worldColorTransform.__identity();var R;var D;var F=0;var A=this.__filters;while(Fthis.__cacheBitmapData2.width||u>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(c,u,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0)}Y=this.__cacheBitmapData2}else{Y=X}if(N){if(this.__cacheBitmapData3==null||this.__cacheBitmapData3.image==null||c>this.__cacheBitmapData3.width||u>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(c,u,true,0)}else{this.__cacheBitmapData3.fillRect(this.__cacheBitmapData3.rect,0)}K=this.__cacheBitmapData3}var q=openfl_geom_Rectangle.__pool.get();q.setTo(0,0,f,p);if(this.__tempPoint==null){this.__tempPoint=new openfl_geom_Point}var J=this.__tempPoint;var Z;var Q;var ee=0;var te=this.__filters;while(ee1){e=1}if(e!=this.__alpha){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(!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}else{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},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},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",get_transform:"get_transform",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",set_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)},get_tabEnabled:function(){if(this.__tabEnabled==true){return true}else{return false}},set_tabEnabled:function(e){return this.__tabEnabled=e},__class__:openfl_display_InteractiveObject,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var openfl_display_DisplayObjectContainer=function(){openfl_display_InteractiveObject.call(this);this.mouseChildren=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,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=new openfl_events_Event("added",true);r.target=e;e.__dispatchWithCapture(r);if(a){var n=new openfl_events_Event("addedToStage",false,false);e.__dispatchWithCapture(n);e.__dispatchChildren(n)}}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)}},__dispatchChildren:function(e){if(this.__children!=null){var t=0;var i=this.__children;while(t=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{while(--h>=0)this.__children[h].__hitTest(e,t,i,s,false,this.__children[h])}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){if(!this.__renderable||this.__worldAlpha<=0||this.get_mask()!=null&&(this.get_mask().get_width()<=0||this.get_mask().get_height()<=0)){return}openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,e);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){return}e.__pushMaskObject(this);if(e.__stage!=null){var t=0;var i=this.__children;while(t0){e.__pushMaskObject(this);if(e.__stage!=null){var t=0;var i=this.__children;while(t0){e.__popMaskObject(this)}},__renderGLMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_opengl_GLShape.renderMask(this,e)}var t=0;var i=this.__children;while(t=0&&e").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){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_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 ffcrypt_FfcryptMain=function(e,t){this.ffcrpt=null;openfl_display_Sprite.call(this);this.format=new openfl_text_TextFormat;this.format.font="Verdana";this.format.color=0;this.format.size=15;this.format.align=3;this.lableStatus=new openfl_text_TextField;this.lableStatus.set_defaultTextFormat(this.format);this.lableStatus.set_multiline(false);this.lableStatus.set_selectable(false);this.lableStatus.set_backgroundColor(0);this.lableStatus.set_text("");this.lableStatus.set_autoSize(1);this.addChild(this.lableStatus);this.onComFun=t;this.ffcrpt=new ffcrypt_samples_TSBookBinParse(null,null,$bind(this,this.onLoadProgress),$bind(this,this.onIoError),$bind(this,this.onSecurityError));this.ffcrpt.startLoad(e,$bind(this,this.onBookBinParseOver))};$hxClasses["ffcrypt.FfcryptMain"]=ffcrypt_FfcryptMain;ffcrypt_FfcryptMain.__name__=["ffcrypt","FfcryptMain"];ffcrypt_FfcryptMain.__super__=openfl_display_Sprite;ffcrypt_FfcryptMain.prototype=$extend(openfl_display_Sprite.prototype,{ffcrpt:null,lableStatus:null,format:null,onComFun:null,onLoadProgress:function(e){var t=0;try{if(e!=null){t=e.progress*100}else{t=0}this.lableStatus.set_text(t==null?"null":""+t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){return}else throw e}},onIoError:function(e){this.lableStatus.set_textColor(16711680);this.lableStatus.set_text("failure, io error")},onSecurityError:function(e){this.lableStatus.set_textColor(16711680);this.lableStatus.set_text("failure, security error")},onBookBinParseOver:function(e){var t=this;if(e==null){return}if(this.ffcrpt!=e){return}var i=function(){t.lableStatus.set_textColor(16711680);t.lableStatus.set_text("loading book.bin... : failure, format error")};if(e.xmlString==null||e.xmlString.length<=0){i();return}this.onComFun(e.xmlString)},__class__:ffcrypt_FfcryptMain});var ffcrypt_FfcryptMainJs=function(e,t){this.ffParse=null;this.onComplete=null;if(e!=null&&e.length>0){if(t!=null){this.onComplete=t}this.ffParse=new ffcrypt_codes_FFBookBinParse(ffcrypt_FfcryptMainJs.BinTestKey);this.loadXmlJsFun(e)}};$hxClasses["ffcrypt.FfcryptMainJs"]=ffcrypt_FfcryptMainJs;ffcrypt_FfcryptMainJs.__name__=["ffcrypt","FfcryptMainJs"];ffcrypt_FfcryptMainJs.prototype={onComplete:null,ffParse:null,loadXmlJsFun:function(e){var _=this;var o=null;var t=function(){if(o!=null){if(o.readyState==4){if(_.onComplete!=null){if(o.response!=null){var e=new Uint8Array(o.response);var t=new openfl_utils_ByteArrayData(e.length);var i=t;var s=0;var a=e.length;while(si.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 C=v-1;while(C>=0){b=m[C>0?C-1:v-1];P=(b>>>5^y<<2)+(y>>>3^b<<4)^(T^y)+(l[C&3^k]^b);var S=m;var M=C;S[M]-=P;y=S[M];--C}T-=x}var $=[];var E=m.length;var B;var I;var L;var R;var D=0;var F=E;while(D>8;L=(m[A]&16711680)>>16;R=(m[A]&-16777216)>>24;if(R<0){R+=256}$[A*4]=B;$[A*4+1]=I;$[A*4+2]=L;$[A*4+3]=R}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){openfl_display_Sprite.call(this);this.init(e,t)};$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,background:null,toolBar:null,isConfigEncryption:null,isSupportNative:null,register:null,init:function(e,t){this.appWidth=e;this.appHeight=t;this.isConfigEncryption=true;this.isSupportNative=true;this.initConfig()},loadXmlJsFun:function(e){var t=this;var i=null;var s=function(){if(i!=null){if(i.readyState==4){t.loadConfig(i.responseText);var e=i.status==200}}};var a=function(e){i=null;if(window.XMLHttpRequest){i=new XMLHttpRequest}else if(window.ActiveXObject){i=new ActiveXObject("Microsoft.XMLHTTP")}if(i!=null){i.onreadystatechange=s;i.open("GET",e,true);i.send(null)}};a(e)},initConfig:function(){var t=this;if(this.isConfigEncryption){if(this.isSupportNative){this.ffcrptMainJs=new ffcrypt_FfcryptMainJs(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN,$bind(this,this.loadConfig))}else{this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN,$bind(this,this.loadConfig));this.addChild(this.ffcrptMain)}}else if(this.isSupportNative){this.loadXmlJsFun(flipbookMM_config_Resource.FLIPBOOKXML_PATH)}else{var e=function(e){t.loadConfig(e.target.data);t.appLoader.destroyMe();t.appLoader=null};this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PATH,e)}},loadConfig:function(e){this.ffcrptMainJs=null;var t=new flipbookMM_config_ConfigInit(Xml.parse(e));this.isMobileDevice();this.initOtherParameter();this.loadBackground();this.loadBook();this.loadToolBar();this.loadRegisterInfo()},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)},loadBook:function(){var e=this;var t=flipbookMM_config_ConfigSetting.getInstance();var i;var s=t.get(flipbookMM_config_ConfigKey.DefaultBookStyle);if(s=="Flip"){i=1}else if(s=="Slide"){i=0}else if(s=="Flip:Hardcover"){i=1;t.set(flipbookMM_config_ConfigKey.IsHardCoverStyle,"Enable")}else if(s=="Slide:Double page"){i=2}else if(s=="Flip:3D"){i=3}else{i=1}t=null;if(i==3){var a=window.document.createElement("script");a.src="./three.js";a.onload=function(){e.initBook(3)};var r=window.document.getElementsByTagName("script")[0];r.parentNode.insertBefore(a,r)}else{this.initBook(i)}},initBook:function(e){var t=flipbookMM_config_ConfigSetting.getInstance();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=function(){var e={versions:function(){var e=navigator.userAgent,t=navigator.appVersion;return{trident:e.indexOf("Trident")>-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}};var t=flipbookMM_config_ConfigSetting.getInstance();if(e()){t.set(flipbookMM_config_ConfigKey.JS_mobile,"true")}else{t.set(flipbookMM_config_ConfigKey.JS_mobile,"false")}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");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=2;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 _=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);_.setPageDefault();_.pageStyle.gotoPage(t)});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,this,function(e){_.setPageDefault();_.pageStyle.gotoNextPage()});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,this,function(e){_.setPageDefault();_.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(_.pageStyle!=null){_.pageStyle.setMuteMode(false)}}else if(t=="off"){if(_.pageStyle!=null){_.pageStyle.setMuteMode(true)}}}});e=null;if(this.isMobile){this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE,function(e){_.isSlide=true;_.pageStyle.gotoNextPage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE,function(e){_.isSlide=true;_.pageStyle.gotoPrePage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){if(_.pageStyle.get_scaleY()!=_.pageDefScale){_.isDrag=true;_.currentPosition.x=_.lastPosition.x+e.get_touchSlidePoint().x;_.currentPosition.y=_.lastPosition.y+e.get_touchSlidePoint().y;_.pageStyle.set_x(_.currentPosition.x);_.pageStyle.set_y(_.currentPosition.y)}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END,function(e){if(_.pageStyle.get_scaleY()!=_.pageDefScale){_.currentPosition.x=_.lastPosition.x+e.get_touchSlidePoint().x;_.currentPosition.y=_.lastPosition.y+e.get_touchSlidePoint().y;_.pageStyle.set_x(_.currentPosition.x);_.pageStyle.set_y(_.currentPosition.y);_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM,function(e){if(_.isZooming==false){_.cofeX=_.pageStyle.getZoomCenterCoefX();_.cofeY=_.pageStyle.getZoomCenterCoefY()}_.isZooming=true;_.pageStyle.updateStyleStatus(true);var t=_.pageStyle.get_width();var i=_.pageStyle.get_height();var s=_.lastScale;var a=e.get_touchScale();_.currentScale=s*a;if(_.currentScale>_.maxZoomScale){_.currentScale=_.maxZoomScale}if(_.pageStyle.get_scaleY()==_.currentScale){return}_.pageStyle.set_scaleX(_.currentScale);_.pageStyle.set_scaleY(_.currentScale);var r=_.pageStyle.get_width();var n=_.pageStyle.get_height();_.pageStyle.set_x(_.pageStyle.get_x()+(t-r)/_.pageStyle.getZoomCoefX(_.cofeX));_.pageStyle.set_y(_.pageStyle.get_y()+(i-n)/_.pageStyle.getZoomCoefY(_.cofeY));_.lastPosition.x=_.pageStyle.get_x();_.lastPosition.y=_.pageStyle.get_y()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END,function(e){var t=_.lastScale;var i=e.get_touchScale();_.currentScale=t*i;if(_.currentScale>_.maxZoomScale){_.currentScale=_.maxZoomScale}if(_.pageStyle.get_scaleX()<1){_.pageStyle.updateSvgContentSta(false);motion_Actuate.tween(_.pageStyle,.5,{x:_.pageDefPosiX,y:_.pageDefPosiY,scaleX:_.pageDefScale,scaleY:_.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){_.currentPosition.x=_.pageStyle.get_x();_.currentPosition.y=_.pageStyle.get_y();_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y;_.currentScale=_.pageStyle.get_scaleY();_.lastScale=_.currentScale;_.pageStyle.updateStyleStatus(false)})}else{_.pageStyle.updateSvgContentSta(true);_.pageStyle.set_scaleX(_.currentScale);_.pageStyle.set_scaleY(_.currentScale);_.lastScale=_.currentScale}})}else{this.pageStyle.addEventListener("mouseDown",function(e){if(_.pageStyle.get_scaleY()!=_.pageDefScale){_.isDrag=true;_.pageStyle.startDrag();_.currentPosition.x=_.pageStyle.get_x();_.currentPosition.y=_.pageStyle.get_y();_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y}});this.pageStyle.addEventListener("mouseUp",function(e){if(_.pageStyle.get_scaleY()!=_.pageDefScale){_.pageStyle.stopDrag();_.currentPosition.x=_.pageStyle.get_x();_.currentPosition.y=_.pageStyle.get_y();_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y}})}this.addEventListener("click",function(e){var t=e.stageX;_.doubleStatus++;if(_.doubleStatus==1){haxe_Timer.delay(function(){if(_.doubleStatus==1){if(_.isMobile&&!_.isZooming&&!_.isSlide&&!_.isDrag){if(t<_.LrNavigateWidth*window.devicePixelRatio){_.setPageDefault();_.pageStyle.gotoPrePage()}else if(t>_.bookBoxWidth-_.LrNavigateWidth*window.devicePixelRatio){_.setPageDefault();_.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(_,null,null)));e=null}}}_.isSlide=false;_.isZooming=false;_.isDrag=false;_.doubleStatus=0},300)}else if(_.doubleStatus>=2){_.doubleStatus=0;_.isSlide=false;_.isZooming=false;_.isDrag=false;if(_.pageStyle.isPlaying){return}if(_.pageStyle.get_scaleY()!=_.pageDefScale){_.pageStyle.updateSvgContentSta(false);motion_Actuate.tween(_.pageStyle,.3,{x:_.pageDefPosiX,y:_.pageDefPosiY,scaleX:_.pageDefScale,scaleY:_.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){_.currentPosition.x=_.pageStyle.get_x();_.currentPosition.y=_.pageStyle.get_y();_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y;_.currentScale=_.pageStyle.get_scaleY();_.lastScale=_.currentScale;_.pageStyle.updateStyleStatus(false)})}else{var i=_.doubleDefScale;var s=_.pageStyle.get_x()+_.pageStyle.get_width()*(_.pageStyle.get_scaleX()-i)/_.pageStyle.getZoomCoefX(.5);var a=_.pageStyle.get_y()+_.pageStyle.get_height()*(_.pageStyle.get_scaleY()-i)/_.pageStyle.getZoomCoefY(.5);_.pageStyle.updateStyleStatus(true);motion_Actuate.tween(_.pageStyle,.3,{x:s,y:a,scaleX:i,scaleY:i}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){_.currentPosition.x=_.pageStyle.get_x();_.currentPosition.y=_.pageStyle.get_y();_.lastPosition.x=_.currentPosition.x;_.lastPosition.y=_.currentPosition.y;_.currentScale=_.pageStyle.get_scaleY();_.lastScale=_.currentScale;_.pageStyle.updateSvgContentSta(true)})}}_.pageStyle.playBKMusic()});this.addEventListener("mouseWheel",function(e){if(e.delta>0){_.pageStyle.gotoNextPage()}else{_.pageStyle.gotoPrePage()}})},setPageDefault:function(){if(this.pageStyle!=null&&this.pageStyle.get_scaleY()!=this.pageDefScale){this.pageStyle.updateSvgContentSta(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)}},__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.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,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();this.layerList.h[s].resize(this.layerWidth,this.layerHeight)}},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,true);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,false);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,false);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.onCom))}else if(this.imgUrl.length>0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.imgUrl,$bind(this,this.onCom))}else{return}_=null;this.pageLayerShell.addChild(this.pageContent)};$hxClasses["flipbookMM.bookBox.PageLayer"]=flipbookMM_bookBox_PageLayer;flipbookMM_bookBox_PageLayer.__name__=["flipbookMM","bookBox","PageLayer"];flipbookMM_bookBox_PageLayer.__super__=openfl_display_Sprite;flipbookMM_bookBox_PageLayer.prototype=$extend(openfl_display_Sprite.prototype,{pageLayerWidth:null,pageLayerHeight:null,pageOrginalW:null,pageOrginalH:null,pageRealW:null,pageRealH:null,pageIndex:null,loadOkFlag:null,layerCor:null,isMirror:null,back:null,pageLine:null,svgScaleContent:null,svgContent:null,pageContent:null,object:null,pageLink:null,highlightText:null,gray:null,loading:null,pageLayerShell:null,svgTxtUrl:null,svgPngUrl:null,imgUrl:null,onCom:function(e){if(this.loadOkFlag==false){if(this.loading!=null){this.removeChild(this.loading);this.loading.destroyMe();this.loading=null}this.pageRealW=this.pageContent.get_width();this.pageRealH=this.pageContent.get_height();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,16776960);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.pageContent.get_width())/2);this.pageContent.set_y((this.pageOrginalH-this.pageContent.get_height())/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(t=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 P=x++;var k=this.tarPageIndex-1+P;if(k<0){k=0}this.pageList[P]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[P]);if(P==0){this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}else{this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}}var w=0;while(w<3){var T=w++;this.containLayer.setChildIndex(this.pageList[T],2-T)}var C=0;while(C<3){var S=C++;if(this.isDisplayEmbedObject){if(S==1){this.pageList[S].changeObjectStatus(true)}else{this.pageList[S].changeObjectStatus(false)}}else{this.pageList[S].changeObjectStatus(false)}if(this.isHighlightText){if(S==1){this.pageList[S].addHighlightText()}}else{this.pageList[S].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);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 P=(c-1)*u/2;var k=0;var w=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);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 P=x++;var k=this.tarPageIndex-1+P;if(k<0){k=0}this.pageList[P]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[P]);if(P==0){this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}else{this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}}var w=0;while(w<3){var T=w++;this.containLayer.setChildIndex(this.pageList[T],2-T)}var C=0;while(C<3){var S=C++;if(this.isDisplayEmbedObject){if(S==1){this.pageList[S].changeObjectStatus(true)}else{this.pageList[S].changeObjectStatus(false)}}else{this.pageList[S].changeObjectStatus(false)}if(this.isHighlightText){if(S==1){this.pageList[S].addHighlightText()}}else{this.pageList[S].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}}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},__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(o0){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.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)}},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;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.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.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.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&&d.length>0){var b=window.document.createElement("img");b.src=d;b.className="imgStyle";m.appendChild(b);v.style.position="absolute";v.style.left="0px";v.style.top="0px";v.src=g;v.className="imgStyle";v.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)}};m.appendChild(v)}else{v.src=p;v.className="imgStyle";v.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)}};m.appendChild(v)}_.appendChild(m)}},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.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=45+"px";this.searchBtn.style.marginBottom="-8px";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=[]};$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,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);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};var t="./files/texts/text"+d+".xml";v=new base_baseLoad_LoadData(t,e)},__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){var a=this;openfl_display_Sprite.call(this);this.pageW=e;this.pageH=t;this.isFinished=false;this.clickFlag=0;var r=flipbookMM_bookBox_PagesConfigGet.getInstance();var n=r.thumbPageList[i-1];r=null;if(s==null){this.loader=new base_baseLoad_LoadImg(n,$bind(this,this.onCom))}else{this.loader=new base_baseLoad_LoadImg(n,s)}this.addChild(this.loader);this.pageT=new base_baseSprite_TextSprite(i==null?"null":""+i);this.loader.addEventListener("mouseDown",function(e){a.clickFlag=1});this.loader.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.loader.addEventListener("mouseOut",function(e){a.clickFlag=0})};$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,pageW:null,pageH:null,realW:null,realH:null,isFinished:null,pageT:null,clickFlag:null,onCom: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>>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 P=0;while(P=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 P=this.Interp(o,n,.375);var k=this.Interp(l,_,.375);var w=(g+v)*.5;var T=(m+b)*.5;var C=(h+u)*.5;var S=(c+f)*.5;var M=(y+P)*.5;var $=(x+k)*.5;e.curveTo(g,m,w,T);e.curveTo(v,b,C,S);e.curveTo(y,x,M,$);e.curveTo(P,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 P=(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,P));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 P=t.matrix;var k;var w;var T;var C;var S;var M;if(P!=null){k=P.a*this.rx;w=P.c*this.ry;T=P.a*v+P.c*b+P.tx;C=P.b*this.rx;S=P.d*this.ry;M=P.b*v+P.d*b+P.ty}else{k=this.rx;w=0;T=v+P.tx;C=0;S=this.ry;M=b+P.ty}var $=Math.abs(x)*Math.sqrt(k*k+w*w+C*C+S*S);$*=5;var E=Math.round($);if(E>1){x/=E;var B=1;var I=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 P=e.exists("ry")?parseFloat(e.get("ry")):0;if(x==0||P==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+P));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-P));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-P));o.segments.push(new format_svg_DrawSegment(m,v+P))}}else if(a){var k=e.exists("cx")?parseFloat(e.get("cx")):0;var w=e.exists("cy")?parseFloat(e.get("cy")):0;var T=r&&e.exists("r")?parseFloat(e.get("r")):0;var C=r?T:e.exists("rx")?parseFloat(e.get("rx")):0;var S=C*.7071067811865476;var M=C*.41421356237309503;var $=r?T:e.exists("ry")?parseFloat(e.get("ry")):0;var E=$*.7071067811865476;var B=$*.41421356237309503;o.segments.push(new format_svg_MoveSegment(k+C,w));o.segments.push(new format_svg_QuadraticSegment(k+C,w+B,k+S,w+E));o.segments.push(new format_svg_QuadraticSegment(k+M,w+$,k,w+$));o.segments.push(new format_svg_QuadraticSegment(k-M,w+$,k-S,w+E));o.segments.push(new format_svg_QuadraticSegment(k-C,w+B,k-C,w));o.segments.push(new format_svg_QuadraticSegment(k-C,w-B,k-S,w-E));o.segments.push(new format_svg_QuadraticSegment(k-M,w-$,k,w-$));o.segments.push(new format_svg_QuadraticSegment(k+M,w-$,k+S,w-E));o.segments.push(new format_svg_QuadraticSegment(k+C,w-B,k+C,w))}else{var I=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 L=0;var R=this.mPathParser.parse(I,this.mConvertCubics);while(L=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){M[b++]=C[f];f=w[f]}v=C[f]&255;if(r>=s){break}M[b++]=v;w[r]=c;C[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 P=Reflect.field(x,"__id__");Reflect.deleteField(x,"__id__");this.serialize(x);x["__id__"]=P;this.serialize(b.h[x.__id__])}this.buf.b+="h";break;case haxe_ds_StringMap:this.buf.b+="b";var k=e;var w=k.keys();while(w.hasNext()){var T=w.next();this.serializeString(T);this.serialize(__map_reserved[T]!=null?k.getReserved(T):k.h[T])}this.buf.b+="h";break;case haxe_io_Bytes:var C=e;this.buf.b+="s";this.buf.b+=Std.string(Math.ceil(C.length*8/6));this.buf.b+=":";var S=0;var M=C.length-2;var $=haxe_Serializer.BASE64_CODES;if($==null){var E=haxe_Serializer.BASE64.length;var B=new Array(E);$=B;var I=0;var L=haxe_Serializer.BASE64.length;while(I>2]);this.buf.b+=String.fromCharCode($[(D<<4|F>>4)&63]);this.buf.b+=String.fromCharCode($[(F<<2|A>>6)&63]);this.buf.b+=String.fromCharCode($[A&63])}if(S==M){var O=C.b[S++];var j=C.b[S++];this.buf.b+=String.fromCharCode($[O>>2]);this.buf.b+=String.fromCharCode($[(O<<4|j>>4)&63]);this.buf.b+=String.fromCharCode($[j<<2&63])}else if(S==M+1){var H=C.b[S++];this.buf.b+=String.fromCharCode($[H>>2]);this.buf.b+=String.fromCharCode($[H<<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 G=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(G));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 P=Type.createEmptyInstance(x);this.cache.push(P);this.unserializeObject(P);return P;case 100:return this.readFloat();case 102:return false;case 105:return this.readDigits();case 106:var k=this.unserialize();var w=this.resolver.resolveEnum(k);if(w==null){throw new js__$Boot_HaxeError("Enum not found "+k)}this.pos++;var T=this.readDigits();var C=w.__constructs__.slice()[T];if(C==null){throw new js__$Boot_HaxeError("Unknown enum index "+k+"@"+T)}var S=this.unserializeEnum(w,C);this.cache.push(S);return S;case 107:return NaN;case 108:var M=new List;this.cache.push(M);var $=this.buf;while(this.buf.charCodeAt(this.pos)!=104)M.add(this.unserialize());this.pos++;return M;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 I=this.buf;var L=this.buf.charCodeAt(this.pos++);while(L==58){var R=this.readDigits();var D=this.unserialize();B.h[R]=D;L=this.buf.charCodeAt(this.pos++)}if(L!=104){throw new js__$Boot_HaxeError("Invalid IntMap format")}return B;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length){throw new js__$Boot_HaxeError("Invalid reference")}return this.cache[F];case 115:var A=this.readDigits();var O=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos>2)*3+(G>=2?G-1:0);var N=H+(A-G);var W=new haxe_io_Bytes(new ArrayBuffer(U));var V=0;while(H>4)&255;var Y=j[O.charCodeAt(H++)];W.b[V++]=(X<<4|Y>>2)&255;var K=j[O.charCodeAt(H++)];W.b[V++]=(Y<<6|K)&255}if(G>=2){var q=j[O.charCodeAt(H++)];var J=j[O.charCodeAt(H++)];W.b[V++]=(q<<2|J>>4)&255;if(G==3){var Z=j[O.charCodeAt(H++)];W.b[V++]=(J<<4|Z>>2)&255}}this.pos+=A;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);t.push(128|s&63)}else if(s<=65535){t.push(224|s>>12);t.push(128|s>>6&63);t.push(128|s&63)}else{t.push(240|s>>18);t.push(128|s>>12&63);t.push(128|s>>6&63);t.push(128|s&63)}}return new haxe_io_Bytes(new Uint8Array(t).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.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){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var i="";var s=this.b;var a=String.fromCharCode;var r=e;var n=e+t;while(r>10)+55232);i+=a(c&1023|56320)}}return i},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_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 P=i-o;u.b+=P==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,P);var k=Xml.createPCData(u.b);u=new StringBuf;s.addChild(k);++l;r=0;n=2}else if(c==38){var w=i-o;u.b+=w==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,w);r=18;f=13;o=i+1}break;case 14:if(c==63&&e.charCodeAt(i+1)==62){++i;var T=HxOverrides.substr(e,o+1,i-o-2);s.addChild(Xml.createProcessingInstruction(T));++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 C=Xml.createCData(HxOverrides.substr(e,o,i-o));s.addChild(C);++l;i+=2;r=1}break;case 18:if(c==59){var S=HxOverrides.substr(e,o,i-o);if(S.charCodeAt(0)==35){var M=S.charCodeAt(1)==120?Std.parseInt("0"+HxOverrides.substr(S,1,S.length-1)):Std.parseInt(HxOverrides.substr(S,1,S.length-1));u.b+=String.fromCharCode(M)}else{var $=haxe_xml_Parser.escapes;if(!(__map_reserved[S]!=null?$.existsReserved(S):$.h.hasOwnProperty(S))){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: "+S,e,i))}u.b+=Std.string("&"+S+";")}else{var E=haxe_xml_Parser.escapes;var B=__map_reserved[S]!=null?E.getReserved(S):E.h[S];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 I=i-o;u.b+=I==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,I);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 L=i-o;u.b+=L==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,L);s.addChild(Xml.createPCData(u.b));++l}return i}if(!t&&r==18&&f==13){u.b+="&";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}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 P=haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL[x];if(P==-1){throw new js__$Boot_HaxeError("Invalid data")}this.len=haxe_zip_InflateImpl.LEN_BASE_VAL_TBL[x]+this.getBits(P);var k=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);P=haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL[k];if(P==-1){throw new js__$Boot_HaxeError("Invalid data")}this.dist=haxe_zip_InflateImpl.DIST_BASE_VAL_TBL[k]+this.getBits(P);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 w=this.len0;case 4:var C=this.window.checksum();if(C==null){this.state=haxe_zip__$InflateImpl_State.Done;return true}var S=haxe_crypto_Adler32.read(this.input);if(!C.equals(S)){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 M=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){p.push(g)}}}f.sort($bind(this,this.__sortDepths));var m;var v;var b;var y;var x;var P=0;var k=f.length;while(PC.depth&&v<=C.clipDepth){y.set_mask(C.displayObject);x=true;break}}if(p.length>0&&!x&&y.get_mask()!=null){y.set_mask(null)}}var S;var M=f.length;var $=this.__children.length;while(M<$){S=this.__children[M];var E=0;var B=this.__activeInstances;while(E1){this.play()}this.__enterFrame(0);var _g6=0;var _g12=Type.getInstanceFields(js_Boot.getClass(this));while(_g6<_g12.length){var field=_g12[_g6];++_g6;var _g22=0;var _g31=this.__children;while(_g22<_g31.length){var child=_g31[_g22];++_g22;if(child.get_name()==field){this[field]=child}}}},__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.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,__buffer:null,__bufferContext:null,__bufferData:null,__dirty:null,__height:null,__stream:null,__texture:null,__textureTime: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)},__getBuffer:function(e){if(this.__buffer==null||this.__bufferContext!=e){var t=1;var i=1;var s=new Float32Array(20);this.__bufferData=s;this.__bufferData[0]=this.get_width();this.__bufferData[1]=this.get_height();this.__bufferData[3]=t;this.__bufferData[4]=i;this.__bufferData[6]=this.get_height();this.__bufferData[9]=i;this.__bufferData[10]=this.get_width();this.__bufferData[13]=t;this.__bufferContext=e;this.__buffer=e.__context.createBuffer();e.__context.bindBuffer(e.ARRAY_BUFFER,this.__buffer);var a=e.ARRAY_BUFFER;var r=this.__bufferData.byteLength;var n=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__bufferData);var _=e.STATIC_DRAW;e.__context.bufferData(a,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(n,r),_)}else{e.__context.bindBuffer(e.ARRAY_BUFFER,this.__buffer)}return this.__buffer},__getTexture:function(e){if(this.__stream==null||this.__stream.__video==null){return null}if(this.__texture==null){this.__texture=e.__context.createTexture();e.__context.bindTexture(e.TEXTURE_2D,this.__texture);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);this.__textureTime=-1}if(!this.__stream.__closed&&this.__stream.__video.currentTime!=this.__textureTime){var t=e.RGBA;var i=e.RGBA;e.__context.bindTexture(e.TEXTURE_2D,this.__texture);e.texImage2DWEBGL(e.TEXTURE_2D,0,t,i,e.UNSIGNED_BYTE,this.__stream.__video);this.__textureTime=this.__stream.__video.currentTime}return this.__texture},__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_opengl_GLVideo.render(this,e);this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_opengl_GLVideo.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()},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.__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")},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;return this.position},__class__:lime__$backend_html5_HTML5AudioSource};var lime__$backend_html5_HTML5GLRenderContext=function(e){this.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;this.FRAMEBUFFER_COMPLETE=36053;this.COLOR_ATTACHMENT0=36064;this.DEPTH_STENCIL=34041;this.FRAMEBUFFER=36160;this.COMPILE_STATUS=35713;this.CLAMP_TO_EDGE=33071;this.REPEAT=10497;this.TEXTURE0=33984;this.TEXTURE_2D=3553;this.TEXTURE_WRAP_T=10243;this.TEXTURE_WRAP_S=10242;this.TEXTURE_MIN_FILTER=10241;this.TEXTURE_MAG_FILTER=10240;this.LINEAR_MIPMAP_LINEAR=9987;this.NEAREST_MIPMAP_LINEAR=9986;this.LINEAR_MIPMAP_NEAREST=9985;this.NEAREST_MIPMAP_NEAREST=9984;this.LINEAR=9729;this.NEAREST=9728;this.VERSION=7938;this.RENDERER=7937;this.VENDOR=7936;this.DECR=7683;this.INCR=7682;this.KEEP=7680;this.EQUAL=514;this.SHADING_LANGUAGE_VERSION=35724;this.LINK_STATUS=35714;this.VERTEX_SHADER=35633;this.FRAGMENT_SHADER=35632;this.RGBA=6408;this.ALPHA=6406;this.FLOAT=5126;this.INT=5124;this.UNSIGNED_BYTE=5121;this.MAX_VIEWPORT_DIMS=3386;this.MAX_TEXTURE_SIZE=3379;this.SCISSOR_TEST=3089;this.STENCIL_TEST=2960;this.BLEND=3042;this.CULL_FACE=2884;this.BACK=1029;this.FRONT=1028;this.DYNAMIC_DRAW=35048;this.STATIC_DRAW=35044;this.ARRAY_BUFFER=34962;this.FUNC_REVERSE_SUBTRACT=32779;this.FUNC_ADD=32774;this.ONE_MINUS_DST_COLOR=775;this.DST_COLOR=774;this.ONE_MINUS_DST_ALPHA=773;this.DST_ALPHA=772;this.ONE_MINUS_SRC_ALPHA=771;this.SRC_ALPHA=770;this.ONE_MINUS_SRC_COLOR=769;this.SRC_COLOR=768;this.ONE=1;this.ZERO=0;this.TRIANGLE_STRIP=5;this.TRIANGLES=4;this.COLOR_BUFFER_BIT=16384;this.STENCIL_BUFFER_BIT=1024;this.__context=e;this.version=1;this.type=lime_graphics_opengl_GLContextType.WEBGL;if(e!=null){var t=e;if(Object.prototype.hasOwnProperty.call(t,"rawgl")){t=Reflect.field(e,"rawgl")}if(Object.prototype.hasOwnProperty.call(window,"WebGL2RenderingContext")&&js_Boot.__instanceof(t,WebGL2RenderingContext)){this.version=2}}};$hxClasses["lime._backend.html5.HTML5GLRenderContext"]=lime__$backend_html5_HTML5GLRenderContext;lime__$backend_html5_HTML5GLRenderContext.__name__=["lime","_backend","html5","HTML5GLRenderContext"];lime__$backend_html5_HTML5GLRenderContext.prototype={STENCIL_BUFFER_BIT:null,COLOR_BUFFER_BIT:null,TRIANGLES:null,TRIANGLE_STRIP:null,ZERO:null,ONE:null,SRC_COLOR:null,ONE_MINUS_SRC_COLOR:null,SRC_ALPHA:null,ONE_MINUS_SRC_ALPHA:null,DST_ALPHA:null,ONE_MINUS_DST_ALPHA:null,DST_COLOR:null,ONE_MINUS_DST_COLOR:null,FUNC_ADD:null,FUNC_REVERSE_SUBTRACT:null,ARRAY_BUFFER:null,STATIC_DRAW:null,DYNAMIC_DRAW:null,FRONT:null,BACK:null,CULL_FACE:null,BLEND:null,STENCIL_TEST:null,SCISSOR_TEST:null,MAX_TEXTURE_SIZE:null,MAX_VIEWPORT_DIMS:null,UNSIGNED_BYTE:null,INT:null,FLOAT:null,ALPHA:null,RGBA:null,FRAGMENT_SHADER:null,VERTEX_SHADER:null,LINK_STATUS:null,SHADING_LANGUAGE_VERSION:null,EQUAL:null,KEEP:null,INCR:null,DECR:null,VENDOR:null,RENDERER:null,VERSION:null,NEAREST:null,LINEAR:null,NEAREST_MIPMAP_NEAREST:null,LINEAR_MIPMAP_NEAREST:null,NEAREST_MIPMAP_LINEAR:null,LINEAR_MIPMAP_LINEAR:null,TEXTURE_MAG_FILTER:null,TEXTURE_MIN_FILTER:null,TEXTURE_WRAP_S:null,TEXTURE_WRAP_T:null,TEXTURE_2D:null,TEXTURE0:null,REPEAT:null,CLAMP_TO_EDGE:null,COMPILE_STATUS:null,FRAMEBUFFER:null,DEPTH_STENCIL:null,COLOR_ATTACHMENT0:null,FRAMEBUFFER_COMPLETE:null,UNPACK_PREMULTIPLY_ALPHA_WEBGL:null,type:null,version:null,__context:null,__contextLost:null,bufferDataWEBGL:function(e,t,i,s,a){if(s!=null){this.__context.bufferData(e,t,i,s,a)}else{this.__context.bufferData(e,t,i)}},texImage2DWEBGL:function(e,t,i,s,a,r,n,_,o,l){if(l!=null){this.__context.texImage2D(e,t,i,s,a,r,n,_,o,l)}else if(n!=null){this.__context.texImage2D(e,t,i,s,a,r,n,_,o)}else{this.__context.texImage2D(e,t,i,s,a,r)}},__class__:lime__$backend_html5_HTML5GLRenderContext};var lime__$backend_html5_HTML5HTTPRequest=function(){this.validStatus0=new EReg("Tizen","gi").match(window.navigator.userAgent)};$hxClasses["lime._backend.html5.HTML5HTTPRequest"]=lime__$backend_html5_HTML5HTTPRequest;lime__$backend_html5_HTML5HTTPRequest.__name__=["lime","_backend","html5","HTML5HTTPRequest"];lime__$backend_html5_HTML5HTTPRequest.loadImage=function(e){var t=new lime_app_Promise;if(lime__$backend_html5_HTML5HTTPRequest.activeRequests0){lime__$backend_html5_HTML5HTTPRequest.activeRequests++;var e=lime__$backend_html5_HTML5HTTPRequest.requestQueue.pop();var t=e.type;switch(t){case"BINARY":e.instance.__loadData(e.uri,e.promise);break;case"IMAGE":lime__$backend_html5_HTML5HTTPRequest.__loadImage(e.uri,e.promise);break;case"TEXT":e.instance.__loadText(e.uri,e.promise);break;default:lime__$backend_html5_HTML5HTTPRequest.activeRequests--}}};lime__$backend_html5_HTML5HTTPRequest.__fixHostname=function(e){if(e==null){return""}else{return e}};lime__$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__$backend_html5_HTML5HTTPRequest.__fixProtocol=function(e){if(e==null||e==""){return"http:"}else{return e}};lime__$backend_html5_HTML5HTTPRequest.__isSameOrigin=function(e){if(lime__$backend_html5_HTML5HTTPRequest.originElement==null){lime__$backend_html5_HTML5HTTPRequest.originElement=window.document.createElement("a");lime__$backend_html5_HTML5HTTPRequest.originHostname=lime__$backend_html5_HTML5HTTPRequest.__fixHostname(window.location.hostname);lime__$backend_html5_HTML5HTTPRequest.originProtocol=lime__$backend_html5_HTML5HTTPRequest.__fixProtocol(window.location.protocol);lime__$backend_html5_HTML5HTTPRequest.originPort=lime__$backend_html5_HTML5HTTPRequest.__fixPort(window.location.port,lime__$backend_html5_HTML5HTTPRequest.originProtocol)}var t=lime__$backend_html5_HTML5HTTPRequest.originElement;t.href=e;if(t.hostname==""){t.href=t.href}var i=lime__$backend_html5_HTML5HTTPRequest.__fixHostname(t.hostname);var s=lime__$backend_html5_HTML5HTTPRequest.__fixProtocol(t.protocol);var a=lime__$backend_html5_HTML5HTTPRequest.__fixPort(t.port,s);var r=i==""||i==lime__$backend_html5_HTML5HTTPRequest.originHostname;var n=a==""||a==lime__$backend_html5_HTML5HTTPRequest.originPort;if(s!="file:"&&r){return n}else{return false}};lime__$backend_html5_HTML5HTTPRequest.__loadImage=function(e,i){var s=new Image;if(!lime__$backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){s.crossOrigin="Anonymous"}if(lime__$backend_html5_HTML5HTTPRequest.supportsImageProgress==null){lime__$backend_html5_HTML5HTTPRequest.supportsImageProgress="onprogress"in s}if(lime__$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__$backend_html5_HTML5HTTPRequest.activeRequests--;lime__$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__$backend_html5_HTML5HTTPRequest.activeRequests--;lime__$backend_html5_HTML5HTTPRequest.processQueue();i.error(e.detail)},false);s.src=e}else{var a=new XMLHttpRequest;a.onload=function(e){lime__$backend_html5_HTML5HTTPRequest.activeRequests--;lime__$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__$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__$backend_html5_HTML5HTTPRequest.activeRequests--;lime__$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__$backend_html5_HTML5HTTPRequest.activeRequests--;lime__$backend_html5_HTML5HTTPRequest.processQueue()};this.binary=false;this.load(e,s,a)},__class__:lime__$backend_html5_HTML5HTTPRequest};var lime__$backend_html5_HTML5Mouse=function(){};$hxClasses["lime._backend.html5.HTML5Mouse"]=lime__$backend_html5_HTML5Mouse;lime__$backend_html5_HTML5Mouse.__name__=["lime","_backend","html5","HTML5Mouse"];lime__$backend_html5_HTML5Mouse.hide=function(){if(!lime__$backend_html5_HTML5Mouse.__hidden){lime__$backend_html5_HTML5Mouse.__hidden=true;var e=0;var t=lime_app_Application.current.__windows;while(e0;var o={alpha:r||n>16,antialias:_,depth:Object.prototype.hasOwnProperty.call(this.parent.window.config,"depthBuffer")?this.parent.window.config.depthBuffer:true,premultipliedAlpha:true,stencil:Object.prototype.hasOwnProperty.call(this.parent.window.config,"stencilBuffer")&&this.parent.window.config.stencilBuffer,preserveDrawingBuffer:false};var l=["webgl","experimental-webgl"];if(a){l.unshift("webgl2")}var h=0;while(h0){this.parent.onTextInput.dispatch(t)}lime__$backend_html5_HTML5Window.textInput.value=lime__$backend_html5_HTML5Window.dummyCharacter}},handleMouseEvent:function(e){var t=0;var i=0;if(e.type!="wheel"){if(this.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.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.element){window.addEventListener("mouseup",$bind(this,this.handleMouseEvent))}this.parent.onMouseDown.dispatch(t,i,e.button);if(this.parent.onMouseDown.canceled){e.preventDefault()}break;case"mouseenter":if(e.target==this.element){this.parent.onEnter.dispatch();if(this.parent.onEnter.canceled){e.preventDefault()}}break;case"mouseleave":if(e.target==this.element){this.parent.onLeave.dispatch();if(this.parent.onLeave.canceled){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.preventDefault()}}break;case"mouseup":window.removeEventListener("mouseup",$bind(this,this.handleMouseEvent));if(e.currentTarget==this.element){e.stopPropagation()}this.parent.onMouseUp.dispatch(t,i,e.button);if(this.parent.onMouseUp.canceled){e.preventDefault()}break;default:}this.cacheMouseX=t;this.cacheMouseY=i}else{this.parent.onMouseWheel.dispatch(e.deltaX,-e.deltaY);if(this.parent.onMouseWheel.canceled){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.enableTextEvents){this.parent.onTextInput.dispatch(t)}e.preventDefault()}},handleResizeEvent:function(e){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(e){e.preventDefault();var t=null;if(this.element!=null){if(this.canvas!=null){t=this.canvas.getBoundingClientRect()}else if(this.div!=null){t=this.div.getBoundingClientRect()}else{t=this.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(l0){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:335,className:"lime.app.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:349,className:"lime.app.Preloader",methodName:"updateProgress"})}this.start()}},__class__:lime_app_Preloader};var lime_app_Promise=function(){this.future=new lime_app_Future};$hxClasses["lime.app.Promise"]=lime_app_Promise;lime_app_Promise.__name__=["lime","app","Promise"];lime_app_Promise.prototype={future:null,complete:function(e){if(!this.future.isError){this.future.isComplete=true;this.future.value=e;if(this.future.__completeListeners!=null){var t=0;var i=this.future.__completeListeners;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)},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)},__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)},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)},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(){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)},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,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(s0&&a>0){var _=this.type;switch(_[1]){case 0:this.buffer=new lime_graphics_ImageBuffer(null,s,a);lime_graphics_utils_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;t.__fromBytes(e);return t};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;t.__fromFile(e);return t};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__$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__$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_graphics_utils_ImageCanvasUtil.convertToCanvas(this)}else{lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.colorTransform(this,e,t);break;case 1:lime_graphics_utils_ImageCanvasUtil.convertToData(this);lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.copyChannel(this,e,t,i,s,a);break;case 1:lime_graphics_utils_ImageCanvasUtil.convertToData(this);lime_graphics_utils_ImageCanvasUtil.convertToData(e);lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.getPixel32(this,e,t,i);case 1:lime_graphics_utils_ImageCanvasUtil.convertToData(this);return lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.setPixel32(this,e,t,i,s);break;case 1:lime_graphics_utils_ImageCanvasUtil.convertToData(this);lime_graphics_utils_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}this.__fromBase64(lime_graphics_Image.__base64Encode(e),i,t)},__fromFile:function(e,t,i){var s=this;var a=new Image;if(!lime__$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},__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_graphics_utils_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_graphics_utils_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_graphics_utils_ImageCanvasUtil.convertToData(this);lime_graphics_utils_ImageDataUtil.multiplyAlpha(this);break;default:}}else if(!e&&this.buffer.premultiplied){var i=this.type;if(i[1]==1){lime_graphics_utils_ImageCanvasUtil.convertToData(this);lime_graphics_utils_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){lime_graphics_utils_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*4},__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=$hxClasses["lime.graphics.RenderContext"]={__ename__:["lime","graphics","RenderContext"],__constructs__:["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM","NONE"]};lime_graphics_RenderContext.OPENGL=function(e){var t=["OPENGL",0,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.CANVAS=function(e){var t=["CANVAS",1,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.DOM=function(e){var t=["DOM",2,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.FLASH=function(e){var t=["FLASH",3,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.CAIRO=function(e){var t=["CAIRO",4,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.CONSOLE=function(e){var t=["CONSOLE",5,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.CUSTOM=function(e){var t=["CUSTOM",6,e];t.__enum__=lime_graphics_RenderContext;t.toString=$estr;return t};lime_graphics_RenderContext.NONE=["NONE",7];lime_graphics_RenderContext.NONE.toString=$estr;lime_graphics_RenderContext.NONE.__enum__=lime_graphics_RenderContext;var lime_graphics_Renderer=function(e){this.onRender=new lime_app__$Event_$Void_$Void;this.onContextRestored=new lime_app__$Event_$lime_$graphics_$RenderContext_$Void;this.onContextLost=new lime_app__$Event_$Void_$Void;this.window=e;this.backend=new lime__$backend_html5_HTML5Renderer(this);this.window.renderer=this};$hxClasses["lime.graphics.Renderer"]=lime_graphics_Renderer;lime_graphics_Renderer.__name__=["lime","graphics","Renderer"];lime_graphics_Renderer.prototype={context:null,onContextLost:null,onContextRestored:null,onRender:null,type:null,window:null,backend:null,create:function(){this.backend.create()},flip:function(){this.backend.flip()},render:function(){this.backend.render()},__class__:lime_graphics_Renderer};var lime_graphics_RendererType=$hxClasses["lime.graphics.RendererType"]={__ename__:["lime","graphics","RendererType"],__constructs__:["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM"]};lime_graphics_RendererType.OPENGL=["OPENGL",0];lime_graphics_RendererType.OPENGL.toString=$estr;lime_graphics_RendererType.OPENGL.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.CANVAS=["CANVAS",1];lime_graphics_RendererType.CANVAS.toString=$estr;lime_graphics_RendererType.CANVAS.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.DOM=["DOM",2];lime_graphics_RendererType.DOM.toString=$estr;lime_graphics_RendererType.DOM.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.FLASH=["FLASH",3];lime_graphics_RendererType.FLASH.toString=$estr;lime_graphics_RendererType.FLASH.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.CAIRO=["CAIRO",4];lime_graphics_RendererType.CAIRO.toString=$estr;lime_graphics_RendererType.CAIRO.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.CONSOLE=["CONSOLE",5];lime_graphics_RendererType.CONSOLE.toString=$estr;lime_graphics_RendererType.CONSOLE.__enum__=lime_graphics_RendererType;lime_graphics_RendererType.CUSTOM=["CUSTOM",6];lime_graphics_RendererType.CUSTOM.toString=$estr;lime_graphics_RendererType.CUSTOM.__enum__=lime_graphics_RendererType;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_GLContextType=$hxClasses["lime.graphics.opengl.GLContextType"]={__ename__:["lime","graphics","opengl","GLContextType"],__constructs__:["OPENGL","GLES","WEBGL"]};lime_graphics_opengl_GLContextType.OPENGL=["OPENGL",0];lime_graphics_opengl_GLContextType.OPENGL.toString=$estr;lime_graphics_opengl_GLContextType.OPENGL.__enum__=lime_graphics_opengl_GLContextType;lime_graphics_opengl_GLContextType.GLES=["GLES",1];lime_graphics_opengl_GLContextType.GLES.toString=$estr;lime_graphics_opengl_GLContextType.GLES.__enum__=lime_graphics_opengl_GLContextType;lime_graphics_opengl_GLContextType.WEBGL=["WEBGL",2];lime_graphics_opengl_GLContextType.WEBGL.toString=$estr;lime_graphics_opengl_GLContextType.WEBGL.__enum__=lime_graphics_opengl_GLContextType;var lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$={};$hxClasses["lime.graphics.opengl._WebGLContext.WebGLContext_Impl_"]=lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$;lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.__name__=["lime","graphics","opengl","_WebGLContext","WebGLContext_Impl_"];lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData=function(e,t,i,s){e.bufferDataWEBGL(t,i,s,null,null)};lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texImage2D=function(e,t,i,s,a,r,n,_,o,l){e.texImage2DWEBGL(t,i,s,a,r,n,_,o,l,null)};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_graphics_utils_ImageCanvasUtil=function(){};$hxClasses["lime.graphics.utils.ImageCanvasUtil"]=lime_graphics_utils_ImageCanvasUtil;lime_graphics_utils_ImageCanvasUtil.__name__=["lime","graphics","utils","ImageCanvasUtil"];lime_graphics_utils_ImageCanvasUtil.colorTransform=function(e,t,i){lime_graphics_utils_ImageCanvasUtil.convertToData(e);lime_graphics_utils_ImageDataUtil.colorTransform(e,t,i)};lime_graphics_utils_ImageCanvasUtil.convertToCanvas=function(e,t){if(t==null){t=false}var i=e.buffer;if(i.__srcImage!=null){if(i.__srcCanvas==null){lime_graphics_utils_ImageCanvasUtil.createCanvas(e,i.__srcImage.width,i.__srcImage.height);i.__srcContext.drawImage(i.__srcImage,0,0)}i.__srcImage=null}else if(i.__srcCanvas==null&&i.data!=null){e.set_transparent(true);lime_graphics_utils_ImageCanvasUtil.createCanvas(e,i.width,i.height);lime_graphics_utils_ImageCanvasUtil.createImageData(e);i.__srcContext.putImageData(i.__srcImageData,0,0)}else if(e.type==lime_graphics_ImageType.DATA&&i.__srcImageData!=null&&e.dirty){i.__srcContext.putImageData(i.__srcImageData,0,0);e.dirty=false}if(t){i.data=null;i.__srcImageData=null}else if(i.data==null&&i.__srcImageData!=null){i.data=i.__srcImageData.data}e.type=lime_graphics_ImageType.CANVAS};lime_graphics_utils_ImageCanvasUtil.convertToData=function(e,t){if(t==null){t=false}var i=e.buffer;if(i.__srcImage!=null){lime_graphics_utils_ImageCanvasUtil.convertToCanvas(e)}if(i.__srcCanvas!=null&&i.data==null){lime_graphics_utils_ImageCanvasUtil.createImageData(e);if(e.type==lime_graphics_ImageType.CANVAS){e.dirty=false}}else if(e.type==lime_graphics_ImageType.CANVAS&&i.__srcCanvas!=null&&e.dirty){if(i.__srcImageData==null){lime_graphics_utils_ImageCanvasUtil.createImageData(e)}else{i.__srcImageData=i.__srcContext.getImageData(0,0,i.width,i.height);var s=i.__srcImageData.data.buffer;var a;if(s!=null){a=new Uint8Array(s)}else{a=null}i.data=a}e.dirty=false}if(t){e.buffer.__srcCanvas=null;e.buffer.__srcContext=null}e.type=lime_graphics_ImageType.DATA};lime_graphics_utils_ImageCanvasUtil.copyChannel=function(e,t,i,s,a,r){lime_graphics_utils_ImageCanvasUtil.convertToData(t);lime_graphics_utils_ImageCanvasUtil.convertToData(e);lime_graphics_utils_ImageDataUtil.copyChannel(e,t,i,s,a,r)};lime_graphics_utils_ImageCanvasUtil.copyPixels=function(e,t,i,s,a,r,n){if(n==null){n=false}if(s==null||s.x>=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_graphics_utils_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_graphics_utils_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_graphics_utils_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")}s.__srcContext.mozImageSmoothingEnabled=false;s.__srcContext.msImageSmoothingEnabled=false;s.__srcContext.imageSmoothingEnabled=false}};lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.fillRect=function(e,t,i,s){lime_graphics_utils_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_graphics_utils_ImageCanvasUtil.getPixel32=function(e,t,i,s){lime_graphics_utils_ImageCanvasUtil.convertToData(e);return lime_graphics_utils_ImageDataUtil.getPixel32(e,t,i,s)};lime_graphics_utils_ImageCanvasUtil.setPixel32=function(e,t,i,s,a){lime_graphics_utils_ImageCanvasUtil.convertToData(e);lime_graphics_utils_ImageDataUtil.setPixel32(e,t,i,s,a)};lime_graphics_utils_ImageCanvasUtil.sync=function(e,t){if(e==null){return}if(e.type==lime_graphics_ImageType.CANVAS){lime_graphics_utils_ImageCanvasUtil.convertToCanvas(e,t)}else{lime_graphics_utils_ImageCanvasUtil.convertToData(e,t)}};var lime_graphics_utils_ImageDataUtil=function(){};$hxClasses["lime.graphics.utils.ImageDataUtil"]=lime_graphics_utils_ImageDataUtil;lime_graphics_utils_ImageDataUtil.__name__=["lime","graphics","utils","ImageDataUtil"];lime_graphics_utils_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_graphics_utils__$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_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[f&255];f=((f>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((f>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((f>>>8&255)*lime_math_color__$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_graphics_utils_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_graphics_utils__$ImageDataUtil_ImageDataView(t,i);var c=new lime_graphics_utils__$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 P=c.height;while(x>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.unmult=255/(b&255);b=(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[b&255];b=((b>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((b>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((b>>>8&255)*lime_math_color__$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_graphics_utils_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_graphics_utils__$ImageDataUtil_ImageDataView(t,i);var h=new lime_math_Rectangle(s.x,s.y,l.width,l.height);var c=new lime_graphics_utils__$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 P=t.buffer.premultiplied;var k=e.buffer.premultiplied;var w=t.buffer.bitsPerPixel/8|0;var T=e.buffer.bitsPerPixel/8|0;var C=a!=null&&a.get_transparent();var S=n||C&&!e.get_transparent();if(!C){if(S){var M=0;var $=c.height;while(M<$){var E=M++;p=l.byteOffset+l.stride*E;d=c.byteOffset+c.stride*E;var B=0;var I=c.width;while(B>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math_color__$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 R=lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>24&255)*g+(x>>>24&255)*m*v)/b)];x=(R&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|x&255&255;var D=lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>16&255)*g+(x>>>16&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(D&255)<<16|(x>>>8&255&255)<<8|x&255&255;var F=lime_math_color__$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|(F&255)<<8|x&255&255;var A=lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(b*255)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|A&255}if(k){if((x&255)==0){if(x!=0){x=0}}else if((x&255)!=255){lime_math_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math_color__$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&&P==k&&w==T){var O=0;var j=c.height;while(O>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math_color__$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 K;var q;var J=new lime_graphics_utils__$ImageDataUtil_ImageDataView(a,new lime_math_Rectangle(r.x,r.y,a.width,a.height));J.offset(l.x,l.y);c.clip(s.x|0,s.y|0,J.width,J.height);if(S){var Z=0;var Q=c.height;while(Z>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math_color__$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_color__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|x&255&255}}switch(Y){case 0:q=(X[K]&255)<<24|(X[K+1]&255)<<16|(X[K+2]&255)<<8|X[K+3]&255;break;case 1:q=(X[K+1]&255)<<24|(X[K+2]&255)<<16|(X[K+3]&255)<<8|X[K]&255;break;case 2:q=(X[K+2]&255)<<24|(X[K+1]&255)<<16|(X[K]&255)<<8|X[K+3]&255;break}g=(q&255)/255*((y&255)/255);if(g>0){m=(x&255)/255;v=1-g;b=g+m*v;var ae=lime_math_color__$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_color__$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_color__$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_color__$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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math_color__$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;K+=4}}}else{var oe=0;var le=c.height;while(oe>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(Y){case 0:q=(X[K]&255)<<24|(X[K+1]&255)<<16|(X[K+2]&255)<<8|X[K+3]&255;break;case 1:q=(X[K+1]&255)<<24|(X[K+2]&255)<<16|(X[K+3]&255)<<8|X[K]&255;break;case 2:q=(X[K+2]&255)<<24|(X[K+1]&255)<<16|(X[K]&255)<<8|X[K+3]&255;break}var pe=Math.round((y&255)*((q&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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math_color__$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;K+=4}}}}}e.dirty=true;e.version++};lime_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[a&255];a=((a>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|a&255&255}}var p=new lime_graphics_utils__$ImageDataUtil_ImageDataView(e,t);var d;var g=0;var m=p.height;while(g>>24&255;c[P+1]=a>>>16&255;c[P+2]=a>>>8&255;c[P+3]=a&255;break;case 1:c[P]=a&255;c[P+1]=a>>>24&255;c[P+2]=a>>>16&255;c[P+3]=a>>>8&255;break;case 2:c[P]=a>>>8&255;c[P+1]=a>>>16&255;c[P+2]=a>>>24&255;c[P+3]=a&255;break}}}e.dirty=true;e.version++};lime_graphics_utils_ImageDataUtil.gaussianBlur=function(e,t,i,s,a,r,n,_){if(_==null){_=1}if(n==null){n=1}if(r==null){r=4}if(a==null){a=4}var o;if(e.buffer.premultiplied||t.buffer.premultiplied){o=function(e,t){var i=e|0;if(i<0){return 0}else if(i>255){return 255}else{return i}}}else{o=function(e,t){var i=e/t*255|0;if(i<0){return 0}else if(i>255){return 255}else{return i}}}var l=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(o=I.width||D>=I.height?-1:4*(D*(I.width|0)+R);var A=F>=0?_$UInt_UInt_$Impl_$.toFloat(f[F+3])*_|0:0;if(A<0){A=0}else if(A>255){A=255}else{A=A}f[L]=F>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[F]),A):0;f[L+1]=F>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[F+1]),A):0;f[L+2]=F>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[F+2]),A):0;f[L+3]=A;++E}++B}}else{B=g-1;while(B>=0){E=d-1;while(E>=0){var O=t.get_rect();var j=4*(B*(e.get_rect().width|0)+E);var H=E-(s.x|0);var G=B-(s.y|0);var U=H<0||G<0||H>=O.width||G>=O.height?-1:4*(G*(O.width|0)+H);var N=U>=0?_$UInt_UInt_$Impl_$.toFloat(f[U+3])*_|0:0;if(N<0){N=0}else if(N>255){N=255}else{N=N}f[j]=U>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[U]),N):0;f[j+1]=U>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[U+1]),N):0;f[j+2]=U>=0?o(_$UInt_UInt_$Impl_$.toFloat(f[U+2]),N):0;f[j+3]=N;--E}--B}}e.dirty=true;e.version++;t.dirty=true;t.version++;if(f==e.get_data()){return e}return t};lime_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.unmult=255/(a&255);a=(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math_color__$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_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math_color__$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_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[r&255];r=((r>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((r>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((r>>>8&255)*lime_math_color__$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_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math_color__$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++};var lime_graphics_utils__$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.graphics.utils._ImageDataUtil.ImageDataView"]=lime_graphics_utils__$ImageDataUtil_ImageDataView;lime_graphics_utils__$ImageDataUtil_ImageDataView.__name__=["lime","graphics","utils","_ImageDataUtil","ImageDataView"];lime_graphics_utils__$ImageDataUtil_ImageDataView.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,clip:function(e,t,i,s){this.rect.__contract(e,t,i,s);this.__update()},offset:function(e,t){if(e<0){this.rect.x+=e;if(this.rect.x<0){this.rect.x=0}}else{this.rect.x+=e;this.rect.width-=e}if(t<0){this.rect.y+=t;if(this.rect.y<0){this.rect.y=0}}else{this.rect.y+=t;this.rect.height-=t}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_graphics_utils__$ImageDataUtil_ImageDataView};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 P=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,1);var k=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,5);var w=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,9);var T=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,13);var C=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,2);var S=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,6);var M=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 I=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,11);var L=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,15);e[0]=i*v+n*b+h*y+p*x;e[1]=i*P+n*k+h*w+p*T;e[2]=i*C+n*S+h*M+p*$;e[3]=i*E+n*B+h*I+p*L;e[4]=s*v+_*b+c*y+d*x;e[5]=s*P+_*k+c*w+d*T;e[6]=s*C+_*S+c*M+d*$;e[7]=s*E+_*B+c*I+d*L;e[8]=a*v+o*b+u*y+g*x;e[9]=a*P+o*k+u*w+g*T;e[10]=a*C+o*S+u*M+g*$;e[11]=a*E+o*B+u*I+g*L;e[12]=r*v+l*b+f*y+m*x;e[13]=r*P+l*k+f*w+m*T;e[14]=r*C+l*S+f*M+m*$;e[15]=r*E+l*B+f*I+m*L};lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho=function(e,t,i,s,a,r){var n=1/(t-e);var _=1/(s-i);var o=1/(r-a);var l=[2*n,0,0,0,0,2*_,0,0,0,0,-2*o,0,-(e+t)*n,-(i+s)*_,-(a+r)*o,1];var h;if(l!=null){h=new Float32Array(l)}else{h=null}return lime_math__$Matrix4_Matrix4_$Impl_$._new(h)};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_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,offset:function(e,t){this.x+=e;this.y+=t},setTo:function(e,t,i,s){this.x=e;this.y=t;this.width=i;this.height=s},__contract:function(e,t,i,s){if(this.width==0&&this.height==0){return}if(this.xe+i){this.width=e+i-this.x}if(this.get_bottom()>t+s){this.height=t+s-this.y}},__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_math_color__$RGBA_RGBA_$Impl_$={};$hxClasses["lime.math.color._RGBA.RGBA_Impl_"]=lime_math_color__$RGBA_RGBA_$Impl_$;lime_math_color__$RGBA_RGBA_$Impl_$.__name__=["lime","math","color","_RGBA","RGBA_Impl_"];var lime_media_ALAudioContext=function(){};$hxClasses["lime.media.ALAudioContext"]=lime_media_ALAudioContext;lime_media_ALAudioContext.__name__=["lime","media","ALAudioContext"];var lime_media_ALCAudioContext=function(){};$hxClasses["lime.media.ALCAudioContext"]=lime_media_ALCAudioContext;lime_media_ALCAudioContext.__name__=["lime","media","ALCAudioContext"];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 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 250:case 251:return"audio/mp3";default:}break;default:}}lime_utils_Log.error("Unsupported sound format",{fileName:"AudioBuffer.hx",lineNumber:493,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=$hxClasses["lime.media.AudioContext"]={__ename__:["lime","media","AudioContext"],__constructs__:["OPENAL","HTML5","WEB","FLASH","CUSTOM"]};lime_media_AudioContext.OPENAL=function(e,t){var i=["OPENAL",0,e,t];i.__enum__=lime_media_AudioContext;i.toString=$estr;return i};lime_media_AudioContext.HTML5=function(e){var t=["HTML5",1,e];t.__enum__=lime_media_AudioContext;t.toString=$estr;return t};lime_media_AudioContext.WEB=function(e){var t=["WEB",2,e];t.__enum__=lime_media_AudioContext;t.toString=$estr;return t};lime_media_AudioContext.FLASH=function(e){var t=["FLASH",3,e];t.__enum__=lime_media_AudioContext;t.toString=$estr;return t};lime_media_AudioContext.CUSTOM=function(e){var t=["CUSTOM",4,e];t.__enum__=lime_media_AudioContext;t.toString=$estr;return t};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){try{window.AudioContext=window.AudioContext||window.webkitAudioContext;lime_media_AudioManager.context=lime_media_AudioContext.WEB(new AudioContext)}catch(e){haxe_CallStack.lastException=e;lime_media_AudioManager.context=lime_media_AudioContext.HTML5(new lime_media_HTML5AudioContext)}}else{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__$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_FlashAudioContext=function(){};$hxClasses["lime.media.FlashAudioContext"]=lime_media_FlashAudioContext;lime_media_FlashAudioContext.__name__=["lime","media","FlashAudioContext"];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_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__$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.get_text=function(){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.__windows[0];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||lime_system_System.__applicationConfig==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}var _=lime_system_System.__applicationConfig;var o=__map_reserved[e]!=null?_.getReserved(e):_.h[e];var l={};lime_system_System.__copyMissingFields(l,o);if(a!=null){l.windows=[];if(a instanceof Array&&a.__enum__==null){l.windows=a}else{l.windows[0]=a}var h=0;var c=l.windows.length;while(h-1){a.background=Std.parseInt(f)}else{a.background=Std.parseInt("0x"+f)}}}}if(Reflect.field(l.windows[0],"rootPath")){l.rootPath=Reflect.field(l.windows[0],"rootPath");Reflect.deleteField(l.windows[0],"rootPath")}l.windows[0].element=n;l.windows[0].width=i;l.windows[0].height=s;var p=lime_system_System.__applicationEntryPoint;(__map_reserved[e]!=null?p.getReserved(e):p.h[e])(l)}};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.__copyMissingFields=function(e,t){if(t==null||e==null){return}var i=0;var s=Reflect.fields(t);while(i=0&&e.indexOf(" chrome/")<0;if(!a&&(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:516,className:"lime.text.Font",methodName:"__loadFromName"});s.complete(i)})}else{var r=lime_text_Font.__measureFontNode("'"+t+"', sans-serif");var n=lime_text_Font.__measureFontNode("'"+t+"', serif");var _=r.offsetWidth;var o=n.offsetWidth;var l=-1;var h=3e3;var c=50;var u=0;var f;var p;var d=function(){u+=1;if(r.offsetWidth==_){f=n.offsetWidth!=o}else{f=true}p=u*c>=h;if(f||p){window.clearInterval(l);r.parentNode.removeChild(r);n.parentNode.removeChild(n);r=null;n=null;if(p){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:552,className:"lime.text.Font",methodName:"__loadFromName"})}s.complete(i)}};l=window.setInterval(d,c)}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_text_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_text_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(yx){return 1}}if(_0}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_Mouse=function(){};$hxClasses["lime.ui.Mouse"]=lime_ui_Mouse;lime_ui_Mouse.__name__=["lime","ui","Mouse"];lime_ui_Mouse.__properties__={set_cursor:"set_cursor"};lime_ui_Mouse.hide=function(){lime__$backend_html5_HTML5Mouse.hide()};lime_ui_Mouse.show=function(){lime__$backend_html5_HTML5Mouse.show()};lime_ui_Mouse.set_cursor=function(e){return lime__$backend_html5_HTML5Mouse.set_cursor(e)};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_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){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.onMove=new lime_app__$Event_$Float_$Float_$Void;this.onMouseWheel=new lime_app__$Event_$Float_$Float_$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_$Int_$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.onCreate=new lime_app__$Event_$Void_$Void;this.onClose=new lime_app__$Event_$Void_$Void;this.onActivate=new lime_app__$Event_$Void_$Void;this.config=e;this.__width=0;this.__height=0;this.__fullscreen=false;this.__scale=1;this.__x=0;this.__y=0;this.__title="";this.id=-1;if(e!=null){if(Object.prototype.hasOwnProperty.call(e,"width")){this.__width=e.width}if(Object.prototype.hasOwnProperty.call(e,"height")){this.__height=e.height}if(Object.prototype.hasOwnProperty.call(e,"x")){this.__x=e.x}if(Object.prototype.hasOwnProperty.call(e,"y")){this.__y=e.y}if(Object.prototype.hasOwnProperty.call(e,"borderless")){this.__borderless=e.borderless}if(Object.prototype.hasOwnProperty.call(e,"resizable")){this.__resizable=e.resizable}if(Object.prototype.hasOwnProperty.call(e,"title")){this.__title=e.title}}this.backend=new lime__$backend_html5_HTML5Window(this)};$hxClasses["lime.ui.Window"]=lime_ui_Window;lime_ui_Window.__name__=["lime","ui","Window"];lime_ui_Window.prototype={application:null,config:null,id:null,onActivate:null,onClose:null,onCreate: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,onResize:null,onRestore:null,onTextEdit:null,onTextInput:null,renderer:null,stage:null,backend:null,__borderless:null,__fullscreen:null,__height:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,close:function(){this.backend.close()},create:function(e){this.application=e;if(this.config==null){this.config={}}this.backend.create(e);if(this.renderer!=null){this.renderer.create()}},resize:function(e,t){this.backend.resize(e,t);this.__width=e;this.__height=t},get_display:function(){return this.backend.getDisplay()},set_fullscreen:function(e){return this.__fullscreen=this.backend.setFullscreen(e)},set_height:function(e){this.resize(this.__width,e);return this.__height},set_width:function(e){this.resize(e,this.__height);return this.__width},__class__:lime_ui_Window,__properties__:{get_display:"get_display",set_width:"set_width",set_height:"set_height",set_fullscreen:"set_fullscreen"}};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=392798};$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:140,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:452,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:698,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-1){e+="&"+lime_utils_Assets.cache.version}else{e+="?"+lime_utils_Assets.cache.version}return e},__fromManifest:function(e){var t=e.version>=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:883,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}else{lime_utils_Log.warn('Could not load "'+e+'"',{fileName:"AssetLibrary.hx",lineNumber:887,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:160,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:166,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(_),{fileName:"Assets.hx",lineNumber:172,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"}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.__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__$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__$DataPointer_DataPointer_$Impl_$={};$hxClasses["lime.utils._DataPointer.DataPointer_Impl_"]=lime_utils__$DataPointer_DataPointer_$Impl_$;lime_utils__$DataPointer_DataPointer_$Impl_$.__name__=["lime","utils","_DataPointer","DataPointer_Impl_"];lime_utils__$DataPointer_DataPointer_$Impl_$._new=function(e){var t=e;return t};lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt=function(e){return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(null,null,e))};lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView=function(e){return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(e))};lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView=function(e,t){var i=e;if(!i)return null;var s=i.type;switch(s[1]){case 0:if(t==null){t=i.buffer.byteLength}var a=i.buffer;var r=i.offset;var n;if(a!=null){if(t==null){n=new Uint8Array(a,r)}else{n=new Uint8Array(a,r,t)}}else{n=null}return n;case 1:if(t==null){t=i.bufferView.byteLength}if(i.offset==0&&t==i.bufferView.byteLength){return i.bufferView}else{var _=i.bufferView.buffer;var o=i.bufferView.byteOffset+i.offset;var l;if(_!=null){if(t==null){l=new Uint8Array(_,o)}else{l=new Uint8Array(_,o,t)}}else{l=null}return l}break;default:return null}};lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array=function(e,t){var i=e;if(!i)return null;var s=i.type;switch(s[1]){case 0:if(t==null){t=i.buffer.byteLength}var a=i.buffer;var r=i.offset;var n=t/4|0;var _;if(a!=null){if(n==null){_=new Float32Array(a,r)}else{_=new Float32Array(a,r,n)}}else{_=null}return _;case 1:if(t==null){t=i.bufferView.byteLength}if(i.offset==0&&t==i.bufferView.byteLength&&i.bufferView.constructor==Float32Array){return i.bufferView}else{if(t>i.bufferView.byteLength){t=i.bufferView.byteLength}var o=i.bufferView.buffer;var l=i.bufferView.byteOffset+i.offset;var h=t/4|0;var c;if(o!=null){if(h==null){c=new Float32Array(o,l)}else{c=new Float32Array(o,l,h)}}else{c=null}return c}break;default:return null}};lime_utils__$DataPointer_DataPointer_$Impl_$.toValue=function(e){var t=e;if(!t)return 0;if(typeof t==="number")return t;var i=t.type;if(i[1]==2){return t.offset}else{return 0}};var lime_utils_DataPointerObject=function(e,t,i){if(i==null){i=0}if(e!=null){this.bufferView=e;this.type=lime_utils_DataPointerObjectType.BUFFER_VIEW}else if(t!=null){this.buffer=t;this.type=lime_utils_DataPointerObjectType.BUFFER}else{this.type=lime_utils_DataPointerObjectType.VALUE}this.offset=i};$hxClasses["lime.utils.DataPointerObject"]=lime_utils_DataPointerObject;lime_utils_DataPointerObject.__name__=["lime","utils","DataPointerObject"];lime_utils_DataPointerObject.prototype={buffer:null,bufferView:null,offset:null,type:null,__class__:lime_utils_DataPointerObject};var lime_utils_DataPointerObjectType=$hxClasses["lime.utils.DataPointerObjectType"]={__ename__:["lime","utils","DataPointerObjectType"],__constructs__:["BUFFER","BUFFER_VIEW","VALUE"]};lime_utils_DataPointerObjectType.BUFFER=["BUFFER",0];lime_utils_DataPointerObjectType.BUFFER.toString=$estr;lime_utils_DataPointerObjectType.BUFFER.__enum__=lime_utils_DataPointerObjectType;lime_utils_DataPointerObjectType.BUFFER_VIEW=["BUFFER_VIEW",1];lime_utils_DataPointerObjectType.BUFFER_VIEW.toString=$estr;lime_utils_DataPointerObjectType.BUFFER_VIEW.__enum__=lime_utils_DataPointerObjectType;lime_utils_DataPointerObjectType.VALUE=["VALUE",2];lime_utils_DataPointerObjectType.VALUE.toString=$estr;lime_utils_DataPointerObjectType.VALUE.__enum__=lime_utils_DataPointerObjectType;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: "+e;if(lime_utils_Log.throwErrors){throw new js__$Boot_HaxeError(i)}else{console.error(i)}}};lime_utils_Log.verbose=function(e,t){if(lime_utils_Log.level>=5){console.log("["+t.className+"] "+e)}};lime_utils_Log.warn=function(e,t){if(lime_utils_Log.level>=2){console.warn("["+t.className+"] WARNING: "+e)}};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,get:null,push:null,__class__:openfl__$Vector_IVector,__properties__:{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]}},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},__class__:openfl__$Vector_BoolVector,__properties__:{get_length:"get_length"}};var openfl__$Vector_FloatVector=function(e,t,i,s){if(s==null){s=false}if(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a0){this.set_length(e)}this.fixed=t==true};$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,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]}},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},__class__:openfl__$Vector_FunctionVector,__properties__:{get_length:"get_length"}};var openfl__$Vector_IntVector=function(e,t,i){if(i==null){i=[]}this.__array=i;if(e!=null&&e>0){this.set_length(e)}this.fixed=t==true};$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]},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},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(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a0){this.set_length(e)}this.fixed=t==true};$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_TouchData=function(){this.rollOutStack=[]};$hxClasses["openfl._internal.TouchData"]=openfl__$internal_TouchData;openfl__$internal_TouchData.__name__=["openfl","_internal","TouchData"];openfl__$internal_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_TouchData};var openfl__$internal_renderer_DrawCommandBuffer=function(){if(openfl__$internal_renderer_DrawCommandBuffer.empty==null){this.types=[];this.b=[];this.i=[];this.f=[];this.o=[];this.ff=[];this.ii=[];this.copyOnWrite=true}else{this.clear()}};$hxClasses["openfl._internal.renderer.DrawCommandBuffer"]=openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_DrawCommandBuffer.__name__=["openfl","_internal","renderer","DrawCommandBuffer"];openfl__$internal_renderer_DrawCommandBuffer.prototype={types:null,b:null,copyOnWrite:null,f:null,ff:null,i:null,ii:null,o:null,append:function(e){if(this.get_length()==0){this.types=e.types;this.b=e.b;this.i=e.i;this.f=e.f;this.o=e.o;this.ff=e.ff;this.ii=e.ii;this.copyOnWrite=e.copyOnWrite=true;return e}var t=new openfl__$internal_renderer_DrawCommandReader(e);var i=0;var s=e.types;while(i>>16;x=(v&65280)>>>8;P=v&255;k=s[C]/255;if(k<0){k=0}if(k>1){k=1}o.addColorStop(k,"rgba("+y+", "+x+", "+P+", "+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*openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;var l=-a+a*openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;var h=-r+r*openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;var c=-r+r*openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;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;w=(U.buffer.i[U.iPos]&65280)>>>8;T=U.buffer.i[U.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle="rgba("+k+", "+w+", "+T+", "+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:case 21: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:case 21:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var Y=c;var K=Y;var q=K.buffer.o[K.oPos];if(q.inputCount>0){openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=q.inputs[0];openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,q.inputWrap[0]!=0,q.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 J=c.prev;switch(J[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:case 21: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:case 21: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:case 21: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:case 21: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;P=f+d/2;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(u,P);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(u,P-v,x-m,f,x,f);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x+m,f,b,P-v,b,P);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(b,P+v,x+m,y,x,y);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x-m,y,u,P+v,u,P);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:case 21: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.bitmapFill!=null?openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.rect:null;var Pe=openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__renderTransform;var ke=openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__owner.__worldAlpha;var we;var Te;openfl__$internal_renderer_canvas_CanvasGraphics.context.save();var Ce=0;var Se=ve;while(Ce=0&&B>=0&&$<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width&&E<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height){C=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,M,$-B,E-M,Be.buffer.f[Be.fPos]-i,Be.buffer.f[Be.fPos+1]-s,Be.buffer.f[Be.fPos+2],Be.buffer.f[Be.fPos+3])}}}if(!C){h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(Be.buffer.f[Be.fPos]-i,Be.buffer.f[Be.fPos+1]-s,Be.buffer.f[Be.fPos+2],Be.buffer.f[Be.fPos+3])}break;case 10:var Oe=c.prev;switch(Oe[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:case 21:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var je=c;var He=je;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(He.buffer.f[He.fPos]-i,He.buffer.f[He.fPos+1]-s,He.buffer.f[He.fPos+2],He.buffer.f[He.fPos+3],He.buffer.f[He.fPos+4],He.buffer.o[He.oPos]);break;case 12:var Ge=c.prev;switch(Ge[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:case 21:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var Ue=c;var Ne=Ue;var We=Ne.buffer.o[Ne.oPos];var Ve=Ne.buffer.o[Ne.oPos+1];var ze=Ne.buffer.o[Ne.oPos+2];var Xe=null;var Ye=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill==null;if(Ye&&ze!=null){throw"__break__"}if(!Ye){if(ze==null){ze=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);var Ke=0;var qe=We.get_length()/2|0;while(Ke1){Xe=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{Xe=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 tt=0;var it=Ve.get_length();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 Pt;var kt;var wt;var Tt;var Ct;var St;var Mt;var $t;var Et;while(tt0?Ht.buffer.o[Ht.oPos]:1;var Gt=Ht.buffer.o[Ht.oPos+3]==null?"round":openfl_display__$JointStyle_JointStyle_$Impl_$.toString(Ht.buffer.o[Ht.oPos+3]).toLowerCase();openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin=Gt;var Ut;if(Ht.buffer.o[Ht.oPos+2]==null){Ut="round"}else{var Nt=Ht.buffer.o[Ht.oPos+2];if(Nt==0){Ut="butt"}else{Ut=openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(Ht.buffer.o[Ht.oPos+2]).toLowerCase()}}openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap=Ut;openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit=Ht.buffer.f[Ht.fPos+1];if(Ht.buffer.f[Ht.fPos]==1){var Wt=StringTools.hex(Ht.buffer.i[Ht.iPos]&16777215,6);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="#"+Wt}else{k=(Ht.buffer.i[Ht.iPos]&16711680)>>>16;w=(Ht.buffer.i[Ht.iPos]&65280)>>>8;T=Ht.buffer.i[Ht.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="rgba("+k+", "+w+", "+T+", "+Ht.buffer.f[Ht.fPos]+")"}openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=true}break;case 17:var Vt=c.prev;switch(Vt[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:case 21:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var zt=c;var Xt=zt;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(Xt.buffer.f[Xt.fPos]-i,Xt.buffer.f[Xt.fPos+1]-s);a=Xt.buffer.f[Xt.fPos];r=Xt.buffer.f[Xt.fPos+1];if(a==_&&r==o){n=true}break;case 18:var Yt=c.prev;switch(Yt[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:case 21:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Kt=c;var qt=Kt;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 20:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";break;case 21: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:case 21:break;default:}c.prev=F}}}catch(e){if(e!="__break__")throw e}if(I!=null){openfl_geom_Point.__pool.release(I)}if(L!=null){openfl_geom_Point.__pool.release(L)}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.__dirty){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.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;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.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(v0&&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);return i};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.__textureID;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,__buffer:null,__bufferContext:null,__bufferData:null,__framebuffer:null,__framebufferContext:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__surface:null,__texture:null,__textureContext:null,__textureVersion:null,__uvRect:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__textureWidth:null,__textureHeight: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.__buffer=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){if(this.__textureContext==null){this.__textureContext=lime_graphics_opengl_GL.context}if(i!=null){o.__combine(i)}var l=new openfl_display_OpenGLRenderer(this.__textureContext,this);l.__allowSmoothing=r;l.__setBlendMode(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_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);var d=new openfl_display_CanvasRenderer(this.image.buffer.__srcContext);d.__allowSmoothing=r;d.__setBlendMode(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)},getBuffer:function(e){if(this.__buffer==null||this.__bufferContext!=e){this.__uvRect=new openfl_geom_Rectangle(0,0,this.width,this.height);var t=1;var i=1;var s=new Float32Array(56);this.__bufferData=s;this.__bufferData[0]=this.width;this.__bufferData[1]=this.height;this.__bufferData[3]=t;this.__bufferData[4]=i;this.__bufferData[15]=this.height;this.__bufferData[18]=i;this.__bufferData[28]=this.width;this.__bufferData[31]=t;this.__bufferContext=e;this.__buffer=e.__context.createBuffer();e.__context.bindBuffer(e.ARRAY_BUFFER,this.__buffer);lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData(e,e.ARRAY_BUFFER,this.__bufferData,e.STATIC_DRAW)}else{e.__context.bindBuffer(e.ARRAY_BUFFER,this.__buffer)}return this.__buffer},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){this.__textureContext=e;this.__texture=e.__context.createTexture();e.__context.bindTexture(e.TEXTURE_2D,this.__texture);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);this.__textureVersion=-1}lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);if(this.image!=null&&this.image.version>this.__textureVersion){var t;var i;if(this.__surface!=null){lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush(this.__surface)}if(this.image.buffer.bitsPerPixel==1){t=e.ALPHA;i=e.ALPHA}else{if(openfl_display_BitmapData.__supportsBGRA==null){openfl_display_BitmapData.__textureInternalFormat=e.RGBA;var s=null;if(s!=null){openfl_display_BitmapData.__supportsBGRA=true;openfl_display_BitmapData.__textureFormat=s.BGRA_EXT;if(e.type==lime_graphics_opengl_GLContextType.GLES){openfl_display_BitmapData.__textureInternalFormat=s.BGRA_EXT}}else{openfl_display_BitmapData.__supportsBGRA=false;openfl_display_BitmapData.__textureFormat=e.RGBA}}t=openfl_display_BitmapData.__textureInternalFormat;i=openfl_display_BitmapData.__textureFormat}e.__context.bindTexture(e.TEXTURE_2D,this.__texture);var a=this.image;if(a.type!=lime_graphics_ImageType.DATA&&!a.get_premultiplied()){e.__context.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}else if(!a.get_premultiplied()&&a.get_transparent()){e.__context.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}var r=false;if(!openfl_display_BitmapData.__supportsBGRA&&a.get_format()!=0){a=a.clone();r=true;a.set_format(0)}if(a.type==lime_graphics_ImageType.DATA){var n=e.TEXTURE_2D;var _=a.buffer.width;var o=a.buffer.height;var l=e.UNSIGNED_BYTE;var h=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(a.get_data());e.__context.texImage2D(n,0,t,_,o,0,i,l,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(h))}else{lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texImage2D(e,e.TEXTURE_2D,0,t,i,e.UNSIGNED_BYTE,a.get_src())}e.__context.bindTexture(e.TEXTURE_2D,null);this.__textureVersion=this.image.version;this.__textureWidth=a.buffer.width;this.__textureHeight=a.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_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);lime_graphics_utils_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,(a>>>8&255)/255,(a&255)/255,(a>>>24&255)/255);s.__context.clear(s.COLOR_BUFFER_BIT);if(r){s.__context.disable(s.SCISSOR_TEST)}s.__context.bindFramebuffer(s.FRAMEBUFFER,null)}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.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)},__getFramebuffer:function(e){if(this.__framebuffer==null||this.__framebufferContext!=e){this.getTexture(e);this.__framebufferContext=e;this.__framebuffer=e.__context.createFramebuffer();e.__context.bindFramebuffer(e.FRAMEBUFFER,this.__framebuffer);e.__context.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.__texture,0);var t=e.__context.checkFramebufferStatus(e.FRAMEBUFFER)!=e.FRAMEBUFFER_COMPLETE}return this.__framebuffer},__renderCanvas:function(e){if(!this.readable){return}if(this.image.type==lime_graphics_ImageType.DATA){lime_graphics_utils_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.__gl;e.__setBlendMode(10);var i=e.__defaultDisplayShader;e.setShader(i);e.applyBitmapData(this,e.__allowSmoothing&&e.__upscaled);e.applyMatrix(e.__getMatrix(this.__worldTransform));e.applyAlpha(this.__worldAlpha);e.applyColorTransform(this.__worldColorTransform);e.updateShader();var s=t.ARRAY_BUFFER;var a=this.getBuffer(t);t.__context.bindBuffer(s,a);if(i.__position!=null){var r=i.__position.index;var n=t.FLOAT;var _=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);t.__context.vertexAttribPointer(r,3,n,false,20,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(_))}if(i.__textureCoord!=null){var o=i.__textureCoord.index;var l=t.FLOAT;var h=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12);t.__context.vertexAttribPointer(o,2,l,false,20,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(h))}t.__context.drawArrays(t.TRIANGLE_STRIP,0,4);e.__clearShader()},__setUVRect:function(e,t,i,s,a){var r=this.getBuffer(e);if(r!=null&&(s!=this.__uvRect.width||a!=this.__uvRect.height||t!=this.__uvRect.x||i!=this.__uvRect.y)){if(this.__uvRect==null){this.__uvRect=new openfl_geom_Rectangle}this.__uvRect.setTo(t,i,s,a);var n=t/this.__textureWidth;var _=i/this.__textureHeight;var o=s/this.__textureWidth;var l=a/this.__textureHeight;this.__bufferData[0]=s;this.__bufferData[1]=a;this.__bufferData[3]=n+o;this.__bufferData[4]=_+l;this.__bufferData[15]=a;this.__bufferData[17]=n;this.__bufferData[18]=_+l;this.__bufferData[28]=s;this.__bufferData[31]=n+o;this.__bufferData[32]=_;this.__bufferData[45]=n;this.__bufferData[46]=_;lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData(e,e.ARRAY_BUFFER,this.__bufferData,e.STATIC_DRAW)}},__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__$internal_renderer_opengl_GLGraphics=function(){};$hxClasses["openfl._internal.renderer.opengl.GLGraphics"]=openfl__$internal_renderer_opengl_GLGraphics;openfl__$internal_renderer_opengl_GLGraphics.__name__=["openfl","_internal","renderer","opengl","GLGraphics"];openfl__$internal_renderer_opengl_GLGraphics.buildBuffer=function(e,t){var i=0;var s=0;var a=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var r=t.__gl;var n=openfl_geom_Rectangle.__pool.get();var _=openfl_geom_Matrix.__pool.get();var o=null;var l=0;var h=e.__commands.types;while(l=$*6){S=true;M=true}else if(T.get_length()>=$*4){S=true}else if(T.get_length()>=$*2){M=true}}var E=4;var B=E*6;var I=$*B;openfl__$internal_renderer_opengl_GLGraphics.resizeBuffer(e,s+$*B);var L=s;var R=1;var D;var F;var A;var O;var j;var H;var G;var U;var N;var W;var V;var z;var X;var Y;var K;var q;var J;var Z;var Q;var ee;var te=e.__bufferData;A=o.width;O=o.height;var ie=o.rect;var se=0;var ae=$;while(se=pe*3;var ve=me?4:2;var be=me?3:2;var ye=ve+2;var xe=s;openfl__$internal_renderer_opengl_GLGraphics.resizeBuffer(e,s+de*ye);var Pe=e.__bufferData;var ke;var we;var Te;var Ce=0;var Se=de;while(Ce=1&&r>=1){var n=false;if(e.__dirty||e.__bufferData==null){openfl__$internal_renderer_opengl_GLGraphics.buildBuffer(e,t);n=true}var _=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var o=t.__gl;var l=openfl_geom_Matrix.__pool.get();var h=null;var c=null;var u=true;var f=false;var p=null;var d=0;var g=0;var m=0;var v=0;var b=e.__commands.types;while(v>>16&255;openfl__$internal_renderer_opengl_GLGraphics.tempColorTransform.greenOffset=te>>>8&255;openfl__$internal_renderer_opengl_GLGraphics.tempColorTransform.blueOffset=te&255;openfl__$internal_renderer_opengl_GLGraphics.tempColorTransform.__combine(e.__owner.__worldColorTransform);l.identity();l.scale(Q,ee);l.tx=J;l.ty=Z;l.concat(e.__owner.__renderTransform);var ie=t.__initGraphicsShader(null);t.setShader(ie);t.applyMatrix(t.__getMatrix(l));t.applyBitmapData(openfl__$internal_renderer_opengl_GLGraphics.blankBitmapData,t.__allowSmoothing,true);t.applyAlpha((te>>>24&255)/255*e.__owner.__worldAlpha);t.applyColorTransform(openfl__$internal_renderer_opengl_GLGraphics.tempColorTransform);t.updateShader();var se=o.ARRAY_BUFFER;var ae=openfl__$internal_renderer_opengl_GLGraphics.blankBitmapData.getBuffer(o);o.__context.bindBuffer(se,ae);if(ie.__position!=null){var re=ie.__position.index;var ne=o.FLOAT;var _e=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);o.__context.vertexAttribPointer(re,3,ne,false,56,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(_e))}if(ie.__textureCoord!=null){var oe=ie.__textureCoord.index;var le=o.FLOAT;var he=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12);o.__context.vertexAttribPointer(oe,2,le,false,56,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(he))}o.__context.drawArrays(o.TRIANGLE_STRIP,0,4);t.__clearShader()}break;case 12:var ce=_.prev;switch(ce[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:case 21:break;default:}_.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var ue=_;var fe=ue;var pe=fe.buffer.o[fe.oPos];var de=fe.buffer.o[fe.oPos+1];var ge=fe.buffer.o[fe.oPos+2];var me=fe.buffer.o[fe.oPos+3];var ve=de!=null;var be=Math.floor(pe.get_length()/2);var ye=ve?de.get_length():be;var xe=ge!=null;var Pe=xe&&ge.get_length()>=be*3;var ke=Pe?4:2;var we=Pe?3:2;var Te=ke+2;var Ce=t.__getMatrix(e.__owner.__renderTransform);var Se;if(h!=null){Se=t.__initShaderBuffer(h);t.__setShaderBuffer(h);t.applyMatrix(Ce);t.applyBitmapData(c,false,false);t.applyAlpha(1);t.applyColorTransform(null);t.__updateShaderBuffer()}else{Se=t.__initGraphicsShader(null);t.setShader(Se);t.applyMatrix(Ce);t.applyBitmapData(c,t.__allowSmoothing&&f,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform);t.updateShader()}if(e.__buffer==null||e.__bufferContext!=o){e.__bufferContext=o;e.__buffer=o.__context.createBuffer()}o.__context.bindBuffer(o.ARRAY_BUFFER,e.__buffer);if(n){lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData(o,o.ARRAY_BUFFER,e.__bufferData,o.DYNAMIC_DRAW);n=false}if(Se.__position!=null){var Me=Se.__position.index;var $e=o.FLOAT;var Ee=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(m*4);o.__context.vertexAttribPointer(Me,ke,$e,false,Te*4,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(Ee))}if(Se.__textureCoord!=null){var Be=Se.__textureCoord.index;var Ie=o.FLOAT;var Le=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt((m+ke)*4);o.__context.vertexAttribPointer(Be,2,Ie,false,Te*4,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(Le))}switch(me){case 0:o.__context.enable(o.CULL_FACE);o.__context.cullFace(o.BACK);break;case 2:o.__context.enable(o.CULL_FACE);o.__context.cullFace(o.FRONT);break;default:}o.__context.drawArrays(o.TRIANGLES,0,ye);m+=Te*ye;if(me!=1){o.__context.disable(o.CULL_FACE);o.__context.cullFace(o.BACK)}t.__clearShader();break;case 13:c=null;p=null;h=null;var Re=_.prev;switch(Re[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:case 21:break;default:}_.prev=y;break;case 18:var De=_.prev;switch(De[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:case 21:break;default:}_.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Fe=_;var Ae=Fe;d=Ae.buffer.f[Ae.fPos];g=Ae.buffer.f[Ae.fPos+1];break;default:var Oe=_.prev;switch(Oe[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:case 21:break;default:}_.prev=y}}openfl_geom_Matrix.__pool.release(l)}e.set___dirty(false)}};openfl__$internal_renderer_opengl_GLGraphics.renderMask=function(e,t){openfl__$internal_renderer_opengl_GLGraphics.render(e,t)};openfl__$internal_renderer_opengl_GLGraphics.resizeBuffer=function(e,t){if(e.__bufferData==null){var i;if(t!=null){i=new Float32Array(t)}else{i=null}e.__bufferData=i}else if(t>e.__bufferData.length){var s;if(t!=null){s=new Float32Array(t)}else{s=null}var a=s;a.set(e.__bufferData);e.__bufferData=a}e.__bufferLength=t};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,gl:null,__alpha:null,__bitmap:null,__colorMultiplier:null,__colorOffset: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(_.name,"openfl_")){this.gl.__context.bindAttribLocation(a,0,_.name);break}}this.gl.__context.attachShader(a,i);this.gl.__context.attachShader(a,s);this.gl.__context.linkProgram(a);if(this.gl.__context.getProgramParameter(a,this.gl.LINK_STATUS)==0){var o="Unable to initialize the shader program";o+="\n"+this.gl.__context.getProgramInfoLog(a);lime_utils_Log.error(o,{fileName:"Shader.hx",lineNumber:213,className:"openfl.display.Shader",methodName:"__createGLProgram"})}return a},__disable:function(){if(this.glProgram!=null){this.__disableGL()}},__disableGL:function(){var e=0;var t=this.__paramBool;while(e0){this.gl.__context.enable(this.gl.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.glProgram==null||this.__glSourceDirty)){this.__initGL()}},__initGL:function(){if(this.__glSourceDirty||this.__paramBool==null){this.__glSourceDirty=false;this.glProgram=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.gl!=null&&this.glProgram==null){var e="#ifdef GL_ES\n\t\t\t\tprecision "+(this.precisionHint==1?"mediump":"lowp")+" float;\n\t\t\t\t#endif\n\t\t\t\t";var t=e+this.get_glVertexSource();var i=e+this.get_glFragmentSource();var s=t+i;var a=openfl_display_Shader.__glPrograms;if(__map_reserved[s]!=null?a.existsReserved(s):a.h.hasOwnProperty(s)){var r=openfl_display_Shader.__glPrograms;this.glProgram=__map_reserved[s]!=null?r.getReserved(s):r.h[s]}else{this.glProgram=this.__createGLProgram(t,i);var n=this.glProgram;var _=openfl_display_Shader.__glPrograms;if(__map_reserved[s]!=null){_.setReserved(s,n)}else{_.h[s]=n}}if(this.glProgram!=null){var o=0;var l=this.__inputBitmapData;while(o0){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.glProgram!=null){this.__updateGL()}},__updateFromBuffer:function(e){if(this.glProgram!=null){this.__updateGLFromBuffer(e)}},__updateGL:function(){var e=0;var t=0;var i=this.__inputBitmapData;while(t0){if(e.paramDataBuffer==null){e.paramDataBuffer=this.gl.__context.createBuffer()}this.gl.__context.bindBuffer(this.gl.ARRAY_BUFFER,e.paramDataBuffer);lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData(this.gl,this.gl.ARRAY_BUFFER,e.paramData,this.gl.DYNAMIC_DRAW)}else{this.gl.__context.bindBuffer(this.gl.ARRAY_BUFFER,null)}var h=0;var c=0;var u=0;var f=e.paramBoolCount;var p=e.paramFloatCount;var d=e.paramData;var g;var m;var v;var b;var y=null;var x=null;var P=null;var k=0;var w=e.paramCount;while(ke.get_scrollV()+a.bottomScrollV-2){break}if(T.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=.5;var C=T.offsetX+d-r.x;var S=T.offsetY+x+g+T.ascent-r.y;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(C,S);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(C+T.width,S);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(T.format);var M=StringTools.hex(T.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+M;if(P){x=T.format.size*.185}if(e.__filters!=null){if(js_Boot.__instanceof(e.__filters[0],openfl_filters_GlowFilter)){var $=e.__filters[0];var E=openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha;var B=$.get_alpha();openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha=E*B;var I=StringTools.hex($.get_color()&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+I;var L=$.get_blurX();var R=$.get_blurY();openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=Math.max(L,R);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,T.startIndex,T.endIndex),T.offsetX+d-r.x,T.offsetY+x+g-r.y);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=null;openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha=E}}openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,T.startIndex,T.endIndex),T.offsetX+d-r.x,T.offsetY+x+g-r.y);if(e.__caretIndex>-1&&a.selectable){if(e.__selectionIndex==e.__caretIndex){if(e.__showCursor&&T.startIndex<=e.__caretIndex&&T.endIndex>=e.__caretIndex){y=0;var D=0;var F=e.__caretIndex-T.startIndex;while(D=e.__caretIndex||T.startIndex<=e.__selectionIndex&&T.endIndex>=e.__selectionIndex||T.startIndex>e.__caretIndex&&T.endIndexe.__selectionIndex&&T.endIndexN){N=T.startIndex}if(T.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)){z=e.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)-1);z.x+=z.width+2}else{z=e.getCharBoundaries(W)}if(V!=null&&z!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(V.x+d,V.y+g,z.x-V.x,T.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,N,W),d+V.x,T.offsetY+x+g)}}}}}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 X=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+X;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 Y=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+Y;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(e.__caretIndex>-1&&a.selectable&&e.__showCursor){var K=-e.get_scrollH();var q=0;var J=0;var Z=e.get_scrollV()-1;while(J>24&255)/255);break;case 3:var x=b[5];var P=b[4];var k=b[3];var w=b[2];i.curveTo(w*o+n,k*o+_,P*o+n,x*o+_);break;case 4:i.endFill();break;case 5:var T=b[9];var C=b[8];var S=b[7];var M=b[6];var $=b[5];var E=b[4];var B=b[3];var I=b[2];if(I!=null){i.lineStyle(I,B,E,$,M,S,C,T)}else{i.lineStyle()}break;case 6:var L=b[3];var R=b[2];i.lineTo(R*o+n,L*o+_);break;case 7:var D=b[3];var F=b[2];i.moveTo(F*o+n,D*o+_);break;default:}}n+=f.advances[g]*.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_text_HTMLParser=function(){};$hxClasses["openfl._internal.text.HTMLParser"]=openfl__$internal_text_HTMLParser;openfl__$internal_text_HTMLParser.__name__=["openfl","_internal","text","HTMLParser"];openfl__$internal_text_HTMLParser.parse=function(e,t,i){e=e.replace(openfl__$internal_text_HTMLParser.__regexBreakTag.r,"\n");e=e.replace(openfl__$internal_text_HTMLParser.__regexEntities[0].r,'"');e=e.replace(openfl__$internal_text_HTMLParser.__regexEntities[1].r,"'");e=e.replace(openfl__$internal_text_HTMLParser.__regexEntities[2].r,"&");e=e.replace(openfl__$internal_text_HTMLParser.__regexEntities[5].r," ");var s=e.split("<");if(s.length==1){e=e.replace(openfl__$internal_text_HTMLParser.__regexHTMLTag.r,"");if(i.get_length()>1){i.splice(1,i.get_length()-1)}e=e.replace(openfl__$internal_text_HTMLParser.__regexEntities[3].r,"<");e=e.replace(openfl__$internal_text_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_text_HTMLParser.__regexEntities[3].r,"<");r=r.replace(openfl__$internal_text_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_text_HTMLParser.__regexHref.match(p)){y.url=openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexHref)}break;case"b":y.bold=true;break;case"em":case"i":y.italic=true;break;case"font":if(openfl__$internal_text_HTMLParser.__regexFace.match(p)){y.font=openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexFace)}if(openfl__$internal_text_HTMLParser.__regexColor.match(p)){y.color=Std.parseInt("0x"+openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexColor))}if(openfl__$internal_text_HTMLParser.__regexSize.match(p)){var P=openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexSize);var k=HxOverrides.cca(P,0);if(k==43||k==45){var w=l.length>=2?l[l.length-2]:t;y.size=w.size+Std.parseInt(P)}else{y.size=Std.parseInt(P)}}break;case"p":if(i.get_length()>0&&!u){e+="\n"}if(openfl__$internal_text_HTMLParser.__regexAlign.match(p)){var T=openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexAlign).toLowerCase();y.align=openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString(T)}break;case"textformat":if(openfl__$internal_text_HTMLParser.__regexBlockIndent.match(p)){y.blockIndent=Std.parseInt(openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexBlockIndent))}if(openfl__$internal_text_HTMLParser.__regexIndent.match(p)){y.indent=Std.parseInt(openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexIndent))}if(openfl__$internal_text_HTMLParser.__regexLeading.match(p)){y.leading=Std.parseInt(openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexLeading))}if(openfl__$internal_text_HTMLParser.__regexLeftMargin.match(p)){y.leftMargin=Std.parseInt(openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexLeftMargin))}if(openfl__$internal_text_HTMLParser.__regexRightMargin.match(p)){y.rightMargin=Std.parseInt(openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexRightMargin))}if(openfl__$internal_text_HTMLParser.__regexTabStops.match(p)){var C=openfl__$internal_text_HTMLParser.__getAttributeMatch(openfl__$internal_text_HTMLParser.__regexTabStops).split(" ");var S=[];var M=0;while(M-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.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}this.textBounds.setTo(Math.max(t-2,0),Math.max(i-2,0),this.textWidth+4,this.textHeight+4)},getLineBreakIndex:function(e){if(e==null){e=0}var t=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"
",e);var i=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\n",e);var s=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\r",e);if(i==-1&&t==-1){return s}if(s==-1&&t==-1){return i}if(s==-1&&i==-1){return t}if(i==-1){return Math.min(t,s)|0}if(s==-1){return Math.min(t,i)|0}if(t==-1){return Math.min(i,s)|0}return Math.min(Math.min(i,s),t)|0},getLineMeasurements:function(){this.lineAscents.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);this.lineHeights.set_length(0);this.lineWidths.set_length(0);var e=0;var t=0;var i=null;var s=0;var a=0;var r=0;this.textWidth=0;this.textHeight=0;this.numLines=1;this.bottomScrollV=0;this.maxScrollH=0;var n=0;var _=this.layoutGroups;while(n<_.get_length()){var o=_.get(n);++n;while(o.lineIndex>this.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;if(l.__ascent!=null){h=l.size*l.__ascent;c=l.size*l.__descent}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 p=this.autoSize;switch(p){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 e=this;this.layoutGroups.set_length(0);if(this.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(this.text,"")){return}var t=-1;var i=null;var s=null;var a=openfl_text_TextField.__defaultTextFormat.clone();var r=0;var n=0;var _=0;var o=0;var l=null;var h=null;var c=0;var u=0;var f=0;var p=-2;var d=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text," ");var g=this.getLineBreakIndex();var m=2;var v=2;var b=0;var y=0;var x=null;if(tf){f=u}if(n>_){_=n}x=i.format;var P;var k=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)+1;while(b-1&&(d==-1||g=g){if(b<=g){if(this.wordWrap&&p<=b&&this.width>=4){var w=lime_text__$UTF8String_UTF8String_$Impl_$.substring(e.text,b,g);var T=openfl__$internal_text_TextEngine.__context.measureText(w).width;while(m+T>e.width-2){var C=1;while(b+Ce.width-2){--C;break}++C}if(C==0&&T>e.width-4){C=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e.text)}if(C==0){m=2;v+=l.height;++y;break}else{var M=b+C;if(l==null||l.startIndex!=l.endIndex){l=new openfl__$internal_text_TextLayoutGroup(i.format,b,M);e.layoutGroups.push(l)}else{l.format=i.format;l.startIndex=b;l.endIndex=M}var $=e.text;var E=b+C;var B=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var I=0;var L;var R=b;var D=E;while(R_){_=n}if(u>f){f=u}var X=0;var Y=e.layoutGroups;while(Xy){break}K.ascent=_;K.height=f}v+=f;_=0;f=0;++y;m=2;b+=C;var q=e.text;var J=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var Z=0;var Q;var ee=b;var te=g;while(eef){f=u}if(n>_){_=n}x=i.format}if(g>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)-1){v-=f}if(n>_){_=n}if(u>f){f=u}var $e=0;var Ee=e.layoutGroups;while($ey){break}Be.ascent=_;Be.height=f}v+=f;_=0;f=0;++y;m=2;b=g+1;g=this.getLineBreakIndex(b)}else if(i.end>=d&&d>-1&&b-1&&gi.end){Ie=i.end}var Le=this.text;var Re=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var De=0;var Fe;var Ae=b;var Oe=Ie;while(Ae0&&b==p){++b;var Ke=h.shift();c-=Ke;m+=Ke}if(h.length>0&&Ie==d+1){--Ie;var qe=h.pop();c-=qe}}if(this.wordWrap){if(m+c>this.width-2){P=true;if(h.length>0&&Ie==d+1){var Je=h[h.length-1];var Ze=Je;if(m+c-Ze<=this.width-2){P=false}}}}if(P){if(x.align!=2&&(l!=null||this.layoutGroups.get_length()>0)){var Qe=l;if(Qe==null){Qe=this.layoutGroups.get(this.layoutGroups.get_length()-1)}Qe.width-=Qe.positions[Qe.positions.length-1];Qe.endIndex--}var et=this.layoutGroups.get_length()-1;var tt=0;while(true){l=this.layoutGroups.get(et);if(et>0&&l.startIndex>p){++tt}else{break}--et}if(b==p+1){if(n>_){_=n}if(u>f){f=u}var it=0;var st=e.layoutGroups;while(ity){break}at.ascent=_;at.height=f}v+=f;_=0;f=0;++y;m=2}m=2;if(tt>0){var rt=this.layoutGroups.get(this.layoutGroups.get_length()-tt).offsetX;var nt=this.layoutGroups.get_length()-tt;var _t=this.layoutGroups.get_length();while(nt<_t){var ot=nt++;l=this.layoutGroups.get(ot);l.offsetX-=rt;l.offsetY=v;l.lineIndex=y;m+=l.width}}if(this.width>=4){var lt=lime_text__$UTF8String_UTF8String_$Impl_$.substring(e.text,b,Ie);var ht=openfl__$internal_text_TextEngine.__context.measureText(lt).width;while(m+ht>e.width-2){var ct=1;while(b+cte.width-2){--ct;break}++ct}if(ct==0&&ht>e.width-4){ct=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e.text)}if(ct==0){m=2;v+=l.height;++y;break}else{var ft=b+ct;if(l==null||l.startIndex!=l.endIndex){l=new openfl__$internal_text_TextLayoutGroup(i.format,b,ft);e.layoutGroups.push(l)}else{l.format=i.format;l.startIndex=b;l.endIndex=ft}var pt=e.text;var dt=b+ct;var gt=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var mt=0;var vt;var bt=b;var yt=dt;while(bt_){_=n}if(u>f){f=u}var It=0;var Lt=e.layoutGroups;while(Ity){break}Rt.ascent=_;Rt.height=f}v+=f;_=0;f=0;++y;m=2;b+=ct;var Dt=e.text;var Ft=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var At=0;var Ot;var jt=b;var Ht=Ie;while(jtf){f=u}if(n>_){_=n}}else{if(g==p){l.endIndex=g;if(g-l.startIndex-l.positions.length<0){l.positions.push(0)}b=g+1}p=d;d=Jt}if(g>-1&&g<=b&&(d>g||d==-1)||b>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)||d>i.end){break}}}else{if(b>i.end){break}else if(b=4){var Zt=i.end;var Qt=lime_text__$UTF8String_UTF8String_$Impl_$.substring(e.text,b,Zt);var ei=openfl__$internal_text_TextEngine.__context.measureText(Qt).width;while(m+ei>e.width-2){var ti=1;while(b+tie.width-2){--ti;break}++ti}if(ti==0&&ei>e.width-4){ti=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e.text)}if(ti==0){m=2;v+=l.height;++y;break}else{var si=b+ti;if(l==null||l.startIndex!=l.endIndex){l=new openfl__$internal_text_TextLayoutGroup(i.format,b,si);e.layoutGroups.push(l)}else{l.format=i.format;l.startIndex=b;l.endIndex=si}var ai=e.text;var ri=b+ti;var ni=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var _i=0;var oi;var li=b;var hi=ri;while(li_){_=n}if(u>f){f=u}var Pi=0;var ki=e.layoutGroups;while(Piy){break}wi.ascent=_;wi.height=f}v+=f;_=0;f=0;++y;m=2;b+=ti;var Ti=e.text;var Ci=[];if(e.__useIntAdvances==null){e.__useIntAdvances=new EReg("Trident/7.0","").match(window.navigator.userAgent)}if(e.__useIntAdvances){var Si=0;var Mi;var $i=b;var Ei=Zt;while($if){f=u}if(n>_){_=n}if(b==i.end){if(n>_){_=n}if(u>f){f=u}var ks=0;var ws=e.layoutGroups;while(ksy){break}Ts.ascent=_;Ts.height=f}v+=f;_=0;f=0;++y;m=2;++b;break}}},restrictText:function(e){if(e==null){return e}if(this.__restrictRegexp!=null){e=this.__restrictRegexp.split(e).join("")}return e},setTextAlignment:function(){var e=-1;var t=0;var i=this.width-4;var s;var a;var r=false;var n=0;var _=this.layoutGroups.get_length();while(n<_){var o=n++;s=this.layoutGroups.get(o);if(s.lineIndex!=e){e=s.lineIndex;var l=s.format.align;switch(l){case 0:if(this.lineWidths.get(e)1){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_timeline_Frame=function(){};$hxClasses["openfl._internal.timeline.Frame"]=openfl__$internal_timeline_Frame;openfl__$internal_timeline_Frame.__name__=["openfl","_internal","timeline","Frame"];openfl__$internal_timeline_Frame.prototype={label:null,objects:null,script:null,scriptSource:null,__class__:openfl__$internal_timeline_Frame};var openfl__$internal_timeline_FrameObject=function(){};$hxClasses["openfl._internal.timeline.FrameObject"]=openfl__$internal_timeline_FrameObject;openfl__$internal_timeline_FrameObject.__name__=["openfl","_internal","timeline","FrameObject"];openfl__$internal_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_timeline_FrameObject};var openfl__$internal_timeline_FrameObjectType=$hxClasses["openfl._internal.timeline.FrameObjectType"]={__ename__:["openfl","_internal","timeline","FrameObjectType"],__constructs__:["CREATE","UPDATE","DESTROY"]};openfl__$internal_timeline_FrameObjectType.CREATE=["CREATE",0];openfl__$internal_timeline_FrameObjectType.CREATE.toString=$estr;openfl__$internal_timeline_FrameObjectType.CREATE.__enum__=openfl__$internal_timeline_FrameObjectType;openfl__$internal_timeline_FrameObjectType.UPDATE=["UPDATE",1];openfl__$internal_timeline_FrameObjectType.UPDATE.toString=$estr;openfl__$internal_timeline_FrameObjectType.UPDATE.__enum__=openfl__$internal_timeline_FrameObjectType;openfl__$internal_timeline_FrameObjectType.DESTROY=["DESTROY",2];openfl__$internal_timeline_FrameObjectType.DESTROY.toString=$estr;openfl__$internal_timeline_FrameObjectType.DESTROY.__enum__=openfl__$internal_timeline_FrameObjectType;var openfl_display_Application=function(){lime_app_Application.call(this);if(openfl__$internal_Lib.application==null){openfl__$internal_Lib.application=this}};$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,{create:function(e){this.config=e;this.backend.create(e);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;if(e!=null){if(Object.prototype.hasOwnProperty.call(e,"fps")){this.backend.setFrameRate(e.fps)}if(Object.prototype.hasOwnProperty.call(e,"windows")){var t=0;var i=e.windows;while(t0&&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){if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}this.__updateCacheBitmap(e,!this.__worldColorTransform.__isDefault());if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!(!t.__renderable||t.__worldAlpha<=0)){var i=e.context;if(t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime_graphics_utils_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=t.__worldAlpha;var s=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=false;i.msImageSmoothingEnabled=false;i.imageSmoothingEnabled=false}if(s==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),s.x,s.y,s.width,s.height)}if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=true;i.msImageSmoothingEnabled=true;i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else if(!(!this.__renderable||this.__worldAlpha<=0)){var a=e.context;if(this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this,false);lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.__bitmapData.image);a.globalAlpha=this.__worldAlpha;var r=this.__scrollRect;e.setTransform(this.__renderTransform,a);if(!e.__allowSmoothing||!this.smoothing){a.mozImageSmoothingEnabled=false;a.msImageSmoothingEnabled=false;a.imageSmoothingEnabled=false}if(r==null){a.drawImage(this.__bitmapData.image.get_src(),0,0,this.__bitmapData.image.width,this.__bitmapData.image.height)}else{a.drawImage(this.__bitmapData.image.get_src(),r.x,r.y,r.width,r.height)}if(!e.__allowSmoothing||!this.smoothing){a.mozImageSmoothingEnabled=true;a.msImageSmoothingEnabled=true;a.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,!this.__worldColorTransform.__isDefault());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.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){if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_opengl_GLBitmap.render(this.__cacheBitmap,e)}else{openfl__$internal_renderer_opengl_GLBitmap.render(this,e)}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_opengl_GLBitmap.renderMask(this,e)},__updateCacheBitmap:function(e,t){if(this.__filters==null&&e.__type==lime_graphics_RendererType.OPENGL&&this.__cacheBitmap==null){return false}return openfl_display_DisplayObject.prototype.__updateCacheBitmap.call(this,e,t)},get_bitmapData:function(){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){if(e!=this.__bitmapData.height){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.set_scaleY(e/this.__bitmapData.height)}return e}return 0},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){if(e!=this.__bitmapData.width){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.set_scaleX(e/this.__bitmapData.width)}return e}return 0},__class__:openfl_display_Bitmap,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{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,__roundPixels:null,__stage:null,__tempColorTransform:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__popMaskObject:function(e,t){if(t==null){t=true}},__pushMaskObject:function(e,t){if(t==null){t=true}},__render:function(e){},__renderStage3D: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=lime_graphics_RendererType.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.mozImageSmoothingEnabled=t;e.msImageSmoothingEnabled=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)},__renderStage3D:function(e){var t=0;var i=e.stage3Ds;while(t0){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)},__renderStage3D:function(e){var t=0;var i=e.stage3Ds;while(t 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\t\t\t\n\t\t}\n\t\t\t\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\t\t\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\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tif (openfl_HasColorTransform) {\n\t\t\t\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\t\t\t\n\t\t}\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\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.__shaderBufferPool=new lime_utils_ObjectPool(function(){return new openfl__$internal_renderer_ShaderBuffer});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.moveTo(0,0)};$hxClasses["openfl.display.Graphics"]=openfl_display_Graphics;openfl_display_Graphics.__name__=["openfl","display","Graphics"];openfl_display_Graphics.prototype={__bounds:null,__buffer:null,__bufferContext:null,__bufferData:null,__bufferLength:null,__commands:null,__dirty:null,__height:null,__positionX:null,__positionY:null,__renderTransform:null,__shaderBufferPool:null,__strokePadding:null,__transformDirty:null,__usedShaderBuffers: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.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()}}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\t\t\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\t\t\n\t\tif (color.a == 0.0) {\n\t\t\t\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\n\t\t} else if (openfl_HasColorTransform) {\n\t\t\t\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\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] = openfl_ColorMultiplierv.w;\n\t\t\t\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\t\t\t\n\t\t\tif (color.a > 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\t\t\t\n\t\t}\n\t\t\t\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\t\t\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\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tif (openfl_HasColorTransform) {\n\t\t\t\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\t\t\t\n\t\t}\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\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){this.content=new openfl_display_Bitmap(e);this.contentLoaderInfo.content=this.content;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.bytesLoaded1){this.__gl.__context.stencilOp(this.__gl.KEEP,this.__gl.KEEP,this.__gl.DECR);this.__gl.__context.stencilFunc(this.__gl.EQUAL,this.__stencilReference,255);this.__gl.__context.colorMask(false,false,false,false);var e=this.__maskObjects.pop();e.__renderGLMask(this);this.__stencilReference--;this.__gl.__context.stencilOp(this.__gl.KEEP,this.__gl.KEEP,this.__gl.KEEP);this.__gl.__context.stencilFunc(this.__gl.EQUAL,this.__stencilReference,255);this.__gl.__context.colorMask(true,true,true,true)}else{this.__stencilReference=0;this.__gl.__context.disable(this.__gl.STENCIL_TEST)}},__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.__scissorRect(this.__clipRects[this.__numClipRects-1])}else{this.__scissorRect()}}},__pushMask:function(e){if(this.__stencilReference==0){this.__gl.__context.enable(this.__gl.STENCIL_TEST);this.__gl.__context.stencilMask(255);this.__gl.__context.clear(this.__gl.STENCIL_BUFFER_BIT)}this.__gl.__context.stencilOp(this.__gl.KEEP,this.__gl.KEEP,this.__gl.INCR);this.__gl.__context.stencilFunc(this.__gl.EQUAL,this.__stencilReference,255);this.__gl.__context.colorMask(false,false,false,false);e.__renderGLMask(this);this.__maskObjects.push(e);this.__stencilReference++;this.__gl.__context.stencilOp(this.__gl.KEEP,this.__gl.KEEP,this.__gl.KEEP);this.__gl.__context.stencilFunc(this.__gl.EQUAL,this.__stencilReference,255);this.__gl.__context.colorMask(true,true,true,true)},__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=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){if(this.__defaultRenderTarget==null){this.__gl.__context.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1;e.__renderGL(this);if(this.__offsetX>0||this.__offsetY>0){this.__gl.__context.clearColor(0,0,0,1);this.__gl.__context.enable(this.__gl.SCISSOR_TEST);if(this.__offsetX>0){this.__gl.__context.scissor(0,0,this.__offsetX,this.__height);this.__gl.__context.clear(this.__gl.COLOR_BUFFER_BIT);this.__gl.__context.scissor(this.__offsetX+this.__displayWidth,0,this.__width,this.__height);this.__gl.__context.clear(this.__gl.COLOR_BUFFER_BIT)}if(this.__offsetY>0){this.__gl.__context.scissor(0,0,this.__width,this.__offsetY);this.__gl.__context.clear(this.__gl.COLOR_BUFFER_BIT);this.__gl.__context.scissor(0,this.__offsetY+this.__displayHeight,this.__width,this.__height);this.__gl.__context.clear(this.__gl.COLOR_BUFFER_BIT)}this.__gl.__context.disable(this.__gl.SCISSOR_TEST)}}else{this.__gl.__context.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);var t=e.__mask;var i=e.__scrollRect;e.__mask=null;e.__scrollRect=null;e.__renderGL(this);e.__mask=t;e.__scrollRect=i}},__renderFilterPass:function(e,t,i){if(i==null){i=true}if(e==null||t==null){return}if(this.__defaultRenderTarget==null){return}var s=this.__gl;var a=this.__gl.FRAMEBUFFER;var r=this.__defaultRenderTarget.__getFramebuffer(this.__gl);s.__context.bindFramebuffer(a,r);if(i){this.__gl.__context.clearColor(0,0,0,0);this.__gl.__context.clear(this.__gl.COLOR_BUFFER_BIT)}var n=this.__initShader(t);this.setShader(n);this.applyAlpha(1);this.applyBitmapData(e,false);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(e.__renderTransform));this.updateShader();var _=this.__gl;var o=this.__gl.ARRAY_BUFFER;var l=e.getBuffer(this.__gl);_.__context.bindBuffer(o,l);if(n.__position!=null){var h=this.__gl;var c=n.__position.index;var u=this.__gl.FLOAT;var f=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);h.__context.vertexAttribPointer(c,3,u,false,56,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(f))}if(n.__textureCoord!=null){var p=this.__gl;var d=n.__textureCoord.index;var g=this.__gl.FLOAT;var m=lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12);p.__context.vertexAttribPointer(d,2,g,false,56,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(m))}this.__gl.__context.drawArrays(this.__gl.TRIANGLE_STRIP,0,4);this.__gl.__context.bindFramebuffer(this.__gl.FRAMEBUFFER,null);this.__clearShader()},__renderStage3D:function(e){var t=0;var i=e.stage3Ds;while(t0){this.__gl.__context.enable(this.__gl.STENCIL_TEST);this.__gl.__context.stencilMask(255);this.__gl.__context.clear(this.__gl.STENCIL_BUFFER_BIT)}var e=0;var t=this.__numClipRects;while(e0){this.__gl.__context.disable(this.__gl.STENCIL_TEST)}if(this.__numClipRects>0){this.__scissorRect()}},__updateShaderBuffer:function(){if(this.__currentShader!=null&&this.__currentShaderBuffer!=null){this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer)}},__class__:openfl_display_OpenGLRenderer});var openfl_display_Preloader=function(e){lime_app_Preloader.call(this);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.__super__=lime_app_Preloader;openfl_display_Preloader.prototype=$extend(lime_app_Preloader.prototype,{display:null,ready:null,start:function(){if(this.simulateProgress){return}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{lime_app_Preloader.prototype.start.call(this)}},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&&!this.simulateProgress){lime_app_Preloader.prototype.start.call(this)}},__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.config;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.config.height;if(e>0){return e}else{return openfl_Lib.get_current().stage.stageHeight}},getWidth:function(){var e=openfl_Lib.get_current().stage.window.config.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,__updateGL:function(e,t,i,s,a,r){var n=i!=null?i:this.input;var _=s!=null?s:this.filter;var o=a!=null?a:this.mipFilter;var l=r!=null?r:this.wrap;if(n!=null){var h=n;e.__context.activeTexture(e.TEXTURE0+t);var c=e.TEXTURE_2D;var u=h.getTexture(e);e.__context.bindTexture(c,u);var f=_==4;switch(o){case 0:e.__context.generateMipmap(e.TEXTURE_2D);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,f?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_LINEAR);break;case 1:e.__context.generateMipmap(e.TEXTURE_2D);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,f?e.LINEAR_MIPMAP_NEAREST:e.NEAREST_MIPMAP_NEAREST);break;default:e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,f?e.LINEAR:e.NEAREST)}e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,f?e.LINEAR:e.NEAREST);var p=l==2||l==3;var d=l==2||l==1;e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,p?e.REPEAT:e.CLAMP_TO_EDGE);e.__context.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,d?e.REPEAT:e.CLAMP_TO_EDGE)}else{e.__context.activeTexture(e.TEXTURE0+t);e.__context.bindTexture(e.TEXTURE_2D,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,__isBool:null,__isFloat:null,__isInt:null,__isUniform:null,__length:null,__uniformMatrix:null,__useArray:null,__disableGL:function(e){if(!this.__isUniform){var t=0;var i=this.__arrayLength;while(t=this.__length){var n=this.type;switch(n){case 0:e.__context.uniform1i(this.index,s[0]?1:0);break;case 1:e.__context.uniform2i(this.index,s[0]?1:0,s[1]?1:0);break;case 2:e.__context.uniform3i(this.index,s[0]?1:0,s[1]?1:0,s[2]?1:0);break;case 3:e.__context.uniform4i(this.index,s[0]?1:0,s[1]?1:0,s[2]?1:0,s[3]?1:0);break;case 4:e.__context.uniform1f(this.index,a[0]);break;case 5:e.__context.uniform2f(this.index,a[0],a[1]);break;case 6:e.__context.uniform3f(this.index,a[0],a[1],a[2]);break;case 7:e.__context.uniform4f(this.index,a[0],a[1],a[2],a[3]);break;case 8:e.__context.uniform1i(this.index,r[0]);break;case 9:e.__context.uniform2i(this.index,r[0],r[1]);break;case 10:e.__context.uniform3i(this.index,r[0],r[1],r[2]);break;case 11:e.__context.uniform4i(this.index,r[0],r[1],r[2],r[3]);break;case 12:var _=0;while(_<4){var o=_++;this.__uniformMatrix[o]=a[o]}var l=this.index;var h=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix2fv(l,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(h,16));break;case 16:var c=0;while(c<9){var u=c++;this.__uniformMatrix[u]=a[u]}var f=this.index;var p=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix3fv(f,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(p,36));break;case 20:var d=0;while(d<16){var g=d++;this.__uniformMatrix[g]=a[g]}var m=this.index;var v=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix4fv(m,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,64));break;default:}}else{var b=this.type;switch(b){case 1:case 9:e.__context.uniform2i(this.index,0,0);break;case 3:case 11:e.__context.uniform4i(this.index,0,0,0,0);break;case 4:e.__context.uniform1f(this.index,0);break;case 5:e.__context.uniform2f(this.index,0,0);break;case 6:e.__context.uniform3f(this.index,0,0,0);break;case 7:e.__context.uniform4f(this.index,0,0,0,0);break;case 0:case 8:e.__context.uniform1i(this.index,0);break;case 2:case 10:e.__context.uniform3i(this.index,0,0,0);break;case 12:var y=0;while(y<4){var x=y++;this.__uniformMatrix[x]=0}var P=this.index;var k=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix2fv(P,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(k,16));break;case 16:var w=0;while(w<9){var T=w++;this.__uniformMatrix[T]=0}var C=this.index;var S=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix3fv(C,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(S,36));break;case 20:var M=0;while(M<16){var $=M++;this.__uniformMatrix[$]=0}var E=this.index;var B=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix4fv(E,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(B,64));break;default:}}}else if(!this.__useArray&&(i==null||i.length==this.__length)){var I=0;var L=this.__arrayLength;while(I=this.__length){var a=this.type;switch(a){case 1:case 9:e.__context.uniform2i(this.index,t[i]|0,t[i+1]|0);break;case 3:case 11:e.__context.uniform4i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0,t[i+3]|0);break;case 4:e.__context.uniform1f(this.index,t[i]);break;case 5:e.__context.uniform2f(this.index,t[i],t[i+1]);break;case 6:e.__context.uniform3f(this.index,t[i],t[i+1],t[i+2]);break;case 7:e.__context.uniform4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 8:e.__context.uniform1i(this.index,t[i]|0);break;case 2:case 10:e.__context.uniform3i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0);break;case 12:var r=0;while(r<4){var n=r++;this.__uniformMatrix[n]=t[i+n]}var _=this.index;var o=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix2fv(_,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(o,16));break;case 16:var l=0;while(l<9){var h=l++;this.__uniformMatrix[h]=t[i+h]}var c=this.index;var u=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix3fv(c,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(u,36));break;case 20:var f=0;while(f<16){var p=f++;this.__uniformMatrix[p]=t[i+p]}var d=this.index;var g=lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix);e.__context.uniformMatrix4fv(d,false,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(g,64));break;default:}}}else if(!StringTools.startsWith(this.name,"openfl_")&&(s==0||s==this.__length)){var m=0;var v=this.__arrayLength;while(m0){var y=this.type;switch(y){case 1:case 5:case 9:e.__context.vertexAttrib2f(this.index,t[i],t[i+1]);break;case 3:case 7:case 11:e.__context.vertexAttrib4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 4:case 8:e.__context.vertexAttrib1f(this.index,t[i]);break;case 2:case 6:case 10:e.__context.vertexAttrib3f(this.index,t[i],t[i+1],t[i+2]);break;case 12:var x=0;while(x<2){var P=x++;e.__context.vertexAttrib2f(this.index+P,t[i+P*2],t[i+P*2+1])}break;case 16:var k=0;while(k<3){var w=k++;e.__context.vertexAttrib3f(this.index+w,t[i+w*3],t[i+w*3+1],t[i+w*3+2])}break;case 20:var T=0;while(T<4){var C=T++;e.__context.vertexAttrib4f(this.index+C,t[i+C*4],t[i+C*4+1],t[i+C*4+2],t[i+C*4+3])}break;default:}}else{var S=this.type;switch(S){case 1:case 5:case 9:e.__context.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:e.__context.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:e.__context.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:e.__context.vertexAttrib3f(this.index,0,0,0);break;case 12:var M=0;while(M<2){var $=M++;e.__context.vertexAttrib2f(this.index+$,0,0)}break;case 16:var E=0;while(E<3){var B=E++;e.__context.vertexAttrib3f(this.index+B,0,0,0)}break;case 20:var I=0;while(I<4){var L=I++;e.__context.vertexAttrib4f(this.index+L,0,0,0,0)}break;default:}}}else{var R=e.FLOAT;if(this.__isBool){R=e.INT}else if(this.__isInt){R=e.INT}var D=0;var F=this.__arrayLength;while(D0){var O=0;var j=this.__arrayLength;while(O1&&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){this.set___currentState(this.get_downState())},__this_onMouseOut:function(e){this.__ignoreEvent=false;if(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.set___currentState(this.get_overState())}},__this_onMouseUp:function(e){this.__ignoreEvent=false;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.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.application=e.application;this.window=e;this.set_color(t);this.set_name(null);this.__contentsScaleFactor=e.__scale;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.__renderDirty=true;this.__wasFullscreen=e.__fullscreen;this.stage3Ds=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);this.stage3Ds.push(new openfl_display_Stage3D);this.__resize();this.stage=this;this.align=6;this.allowsFullScreen=false;this.allowsFullScreenInteractive=false;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;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,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,__deltaTime:null,__displayMatrix:null,__displayState:null,__dragBounds:null,__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender: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,__primaryTouch:null,__quality:null,__renderer:null,__rendering:null,__rollOutStack:null,__scaleMode:null,__stack:null,__touchData:null,__transparent:null,__wasDirty:null,__wasFullscreen:null,addRenderer:function(e){if(this.window==null||this.window.renderer!=e){return}var t=$bind(this,this.render);var i=e;var s=function(){t(i)};e.onRender.add(s);var a=$bind(this,this.onRenderContextLost);var r=e;var n=function(){a(r)};e.onContextLost.add(n);var _=$bind(this,this.onRenderContextRestored);var o=e;var l=function(e){_(o,e)};e.onContextRestored.add(l)},addWindow:function(e){if(this.window!=e){return}var t=$bind(this,this.onWindowActivate);var i=e;var s=function(){t(i)};e.onActivate.add(s);var a=$bind(this,this.onWindowClose);var r=e;var n=function(){a(r)};e.onClose.add(n,false,-9e3);var _=$bind(this,this.onWindowCreate);var o=e;var l=function(){_(o)};e.onCreate.add(l);var h=$bind(this,this.onWindowDeactivate);var c=e;var u=function(){h(c)};e.onDeactivate.add(u);var f=$bind(this,this.onWindowDropFile);var p=e;var d=function(e){f(p,e)};e.onDropFile.add(d);var g=$bind(this,this.onWindowEnter);var m=e;var v=function(){g(m)};e.onEnter.add(v);var b=$bind(this,this.onWindowExpose);var y=e;var x=function(){b(y)};e.onExpose.add(x);var P=$bind(this,this.onWindowFocusIn);var k=e;var w=function(){P(k)};e.onFocusIn.add(w);var T=$bind(this,this.onWindowFocusOut);var C=e;var S=function(){T(C)};e.onFocusOut.add(S);var M=$bind(this,this.onWindowFullscreen);var $=e;var E=function(){M($)};e.onFullscreen.add(E);var B=$bind(this,this.onKeyDown);var I=e;var L=function(e,t){B(I,e,t)};e.onKeyDown.add(L);var R=$bind(this,this.onKeyUp);var D=e;var F=function(e,t){R(D,e,t)};e.onKeyUp.add(F);var A=$bind(this,this.onWindowLeave);var O=e;var j=function(){A(O)};e.onLeave.add(j);var H=$bind(this,this.onWindowMinimize);var G=e;var U=function(){H(G)};e.onMinimize.add(U);var N=$bind(this,this.onMouseDown);var W=e;var V=function(e,t,i){N(W,e,t,i)};e.onMouseDown.add(V);var z=$bind(this,this.onMouseMove);var X=e;var Y=function(e,t){z(X,e,t)};e.onMouseMove.add(Y);var K=$bind(this,this.onMouseMoveRelative);var q=e;var J=function(e,t){K(q,e,t)};e.onMouseMoveRelative.add(J);var Z=$bind(this,this.onMouseUp);var Q=e;var ee=function(e,t,i){Z(Q,e,t,i)};e.onMouseUp.add(ee);var te=$bind(this,this.onMouseWheel);var ie=e;var se=function(e,t){te(ie,e,t)};e.onMouseWheel.add(se);var ae=$bind(this,this.onWindowMove);var re=e;var ne=function(e,t){ae(re,e,t)};e.onMove.add(ne);var _e=$bind(this,this.onWindowResize);var oe=e;var le=function(e,t){_e(oe,e,t)};e.onResize.add(le);var he=$bind(this,this.onWindowRestore);var ce=e;var ue=function(){he(ce)};e.onRestore.add(ue);var fe=$bind(this,this.onTextEdit);var pe=e;var de=function(e,t,i){fe(pe,e,t,i)};e.onTextEdit.add(de);var ge=$bind(this,this.onTextInput);var me=e;var ve=function(e){ge(me,e)};e.onTextInput.add(ve);if(e.id>-1){this.onWindowCreate(e)}},registerModule:function(e){e.onExit.add($bind(this,this.onModuleExit),false,0);e.onUpdate.add($bind(this,this.update));var t=lime_ui_Gamepad.devices.iterator();while(t.hasNext()){var i=t.next();this.__onGamepadConnect(i)}lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd))},setPreloader:function(e){},localToGlobal:function(e){return e.clone()},onGamepadAxisMove: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)}},onGamepadButtonDown: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)}},onGamepadButtonUp: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)}},onGamepadConnect: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)}},onGamepadDisconnect: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)}},onKeyDown:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyDown",t,i)},onKeyUp:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyUp",t,i)},onModuleExit:function(e){if(this.window!=null){this.__broadcastEvent(new openfl_events_Event("deactivate"))}},onMouseDown:function(e,t,i,s){if(this.window==null||this.window!=e){return}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)},onMouseMove:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onMouse("mouseMove",t*e.__scale|0,i*e.__scale|0,0)},onMouseMoveRelative:function(e,t,i){},onMouseUp:function(e,t,i,s){if(this.window==null||this.window!=e){return}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()}},onMouseWheel:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onMouseWheel(t*e.__scale|0,i*e.__scale|0)},onRenderContextLost:function(e){this.__renderer=null},onRenderContextRestored:function(e,t){this.__createRenderer()},onTextEdit:function(e,t,i,s){},onTextInput:function(e,t){if(this.window==null||this.window!=e){return}var i=[];if(this.__focus==null){this.__getInteractive(i)}else{this.__focus.__getInteractive(i)}var s=new openfl_events_TextEvent("textInput",true,false,t);if(i.length>0){i.reverse();this.__dispatchStack(s,i)}else{this.__dispatchEvent(s)}},onTouchMove:function(e){this.__onTouch("touchMove",e)},onTouchEnd:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},onTouchStart:function(e){if(this.__primaryTouch==null){this.__primaryTouch=e}this.__onTouch("touchBegin",e)},onWindowActivate:function(e){if(this.window==null||this.window!=e){return}},onWindowClose:function(e){if(this.window==e){this.window=null}this.__primaryTouch=null;this.__broadcastEvent(new openfl_events_Event("deactivate"))},onWindowCreate:function(e){if(this.window==null||this.window!=e){return}if(e.renderer!=null){this.__createRenderer()}},onWindowDeactivate:function(e){if(this.window==null||this.window!=e){return}},onWindowDropFile:function(e,t){},onWindowEnter:function(e){},onWindowExpose:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true},onWindowFocusIn:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true;this.__broadcastEvent(new openfl_events_Event("activate"));this.set_focus(this.__cacheFocus)},onWindowFocusOut:function(e){if(this.window==null||this.window!=e){return}this.__primaryTouch=null;this.__broadcastEvent(new openfl_events_Event("deactivate"));var t=this.get_focus();this.set_focus(null);this.__cacheFocus=t},onWindowFullscreen: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,false,true))}},onWindowLeave:function(e){if(this.window==null||this.window!=e||openfl_events_MouseEvent.__buttonDown){return}this.__dispatchEvent(new openfl_events_Event("mouseLeave"))},onWindowMinimize:function(e){if(this.window==null||this.window!=e){return}},onWindowMove:function(e,t,i){},onWindowResize: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,true,true))}},onWindowRestore:function(e){if(this.window==null||this.window!=e){return}},render:function(e){if(e.window==null||e.window!=this.window){return}if(this.__rendering){return}this.__rendering=true;if(this.__renderer!=null&&(openfl_display_Stage3D.__active||this.stage3Ds.get(0).__contextRequested)){this.__renderer.__clear();this.__renderer.__renderStage3D(this);this.__renderDirty=true}this.__broadcastEvent(new openfl_events_Event("enterFrame"));this.__broadcastEvent(new openfl_events_Event("frameConstructed"));this.__broadcastEvent(new openfl_events_Event("exitFrame"));if(this.__invalidated){this.__invalidated=false;this.__broadcastEvent(new openfl_events_Event("render"))}this.__renderable=true;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;this.__update(false,true);if(this.__renderer!=null&&(this.__renderDirty||this.__forceRender)){if(!openfl_display_Stage3D.__active){this.__renderer.__clear()}if(this.__renderer.__type==lime_graphics_RendererType.CAIRO){var t=e.context;if(t[1]==4){var i=t[2]}}this.__renderer.__render(this)}else{e.onRender.cancel()}this.__rendering=false},update:function(e){this.__deltaTime=e},__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(n=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){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()}}}},__onGamepadConnect:function(e){this.onGamepadConnect(e);var i=$bind(this,this.onGamepadAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onGamepadButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.onGamepadButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__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()){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.__mouseX<0||this.__mouseY<0||this.__mouseX>this.stageWidth||this.__mouseY>this.stageHeight){this.__dispatchEvent(openfl_events_MouseEvent.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new openfl_geom_Point(this.__mouseX,this.__mouseY),this))}else if(this.__mouseDownLeft==l){h="click"}this.__mouseDownLeft=null}break;case"rightMouseDown":this.__mouseDownRight=l;break;case"rightMouseUp":if(this.__mouseDownRight==l){h="rightClick"}this.__mouseDownRight=null;break;default:}var c=openfl_geom_Point.__pool.get();this.__dispatchStack(openfl_events_MouseEvent.__create(e,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,c),l),o);if(h!=null){this.__dispatchStack(openfl_events_MouseEvent.__create(h,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,c),l),o);if(e=="mouseUp"&&js_Boot.__cast(l,openfl_display_InteractiveObject).doubleClickEnabled){var u=openfl_Lib.getTimer();if(u-this.__lastClickTime<500){this.__dispatchStack(openfl_events_MouseEvent.__create("doubleClick",s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,c),l),o);this.__lastClickTime=0}else{this.__lastClickTime=u}}}if(openfl_ui_Mouse.__cursor=="auto"){var f=null;if(this.__mouseDownLeft!=null){f=this.__mouseDownLeft.__getCursor()}else{var p=0;while(p>>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=e}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},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},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",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(){openfl_events_EventDispatcher.call(this);this.__x=0;this.__y=0;this.visible=true};$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,__contextRequested:null,__stage:null,__x:null,__y:null,__canvas:null,__renderContext:null,__style:null,__webgl:null,__createContext:function(e,t){this.__stage=e;if(t.__type==lime_graphics_RendererType.OPENGL){this.context3D=new openfl_display3D_Context3D(this,t);this.__dispatchCreate()}else if(t.__type==lime_graphics_RendererType.DOM){this.__canvas=window.document.createElement("canvas");this.__canvas.width=e.stageWidth;this.__canvas.height=e.stageHeight;var i=e.window;var s=Object.prototype.hasOwnProperty.call(i.config,"background")&&i.config.background==null;var a=Object.prototype.hasOwnProperty.call(i.config,"colorDepth")?i.config.colorDepth:16;var r=Object.prototype.hasOwnProperty.call(i.config,"antialiasing")&&i.config.antialiasing>0;var n={alpha:s||a>16,antialias:r,depth:Object.prototype.hasOwnProperty.call(i.config,"depthBuffer")?i.config.depthBuffer:true,premultipliedAlpha:true,stencil:Object.prototype.hasOwnProperty.call(i.config,"stencilBuffer")&&i.config.stencilBuffer,preserveDrawingBuffer:false};this.__webgl=js_html__$CanvasElement_CanvasUtil.getContextWebGL(this.__canvas,n);if(this.__webgl!=null){this.__renderContext=new lime__$backend_html5_HTML5GLRenderContext(this.__webgl);lime_graphics_opengl_GL.context=this.__renderContext;this.context3D=new openfl_display3D_Context3D(this,t);var _=t;_.element.appendChild(this.__canvas);this.__style=this.__canvas.style;this.__style.setProperty("position","absolute",null);this.__style.setProperty("top","0",null);this.__style.setProperty("left","0",null);this.__style.setProperty(_.__transformOriginProperty,"0 0 0",null);this.__style.setProperty("z-index","-1",null);this.__dispatchCreate()}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"))}},__renderCanvas:function(e,t){if(!this.visible){return}if(this.__contextRequested){this.__dispatchError();this.__contextRequested=false}},__renderDOM:function(e,t){if(!this.visible){return}if(this.__contextRequested&&this.context3D==null){this.__createContext(e,t)}if(this.context3D!=null){lime_graphics_opengl_GL.context=this.__renderContext;this.__resetContext3DStates()}},__renderGL:function(e,t){if(!this.visible){return}if(this.__contextRequested&&this.context3D==null){this.__createContext(e,t)}if(this.context3D!=null){this.__resetContext3DStates();if(this.context3D!=null){t.__setBlendMode(null);if(t.__currentShader!=null){t.setShader(null);if(this.context3D.__program!=null){this.context3D.__program.__use()}}}if(openfl__$internal_stage3D_GLUtils.debug){t.gl.__context.getError()}}},__resize:function(e,t){if(this.__canvas!=null){this.__canvas.width=e;this.__canvas.height=t}},__resetContext3DStates:function(){this.context3D.__updateBlendFactors();this.context3D.__updateBackbufferViewport()},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){lime_ui_Window.call(this,e)};$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,{create:function(e){lime_ui_Window.prototype.create.call(this,e);this.stage=new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(this.config,"background")?this.config.background:16777215);if(Object.prototype.hasOwnProperty.call(this.config,"parameters")){try{this.stage.get_loaderInfo().parameters=this.config.parameters}catch(e){haxe_CallStack.lastException=e}}if(Object.prototype.hasOwnProperty.call(this.config,"resizable")&&!this.config.resizable){this.stage.__setLogicalSize(this.config.width,this.config.height)}e.addModule(this.stage)},__class__:openfl_display_Window});var openfl_display3D_Context3D=function(e,t){this.driverInfo="OpenGL (Direct blitting)";this.backBufferWidth=0;this.backBufferHeight=0;openfl_events_EventDispatcher.call(this);this.__stage3D=e;this.__renderer=t;openfl__$internal_stage3D_opengl_GLContext3D.create(this)};$hxClasses["openfl.display3D.Context3D"]=openfl_display3D_Context3D;openfl_display3D_Context3D.__name__=["openfl","display3D","Context3D"];openfl_display3D_Context3D.__super__=openfl_events_EventDispatcher;openfl_display3D_Context3D.prototype=$extend(openfl_events_EventDispatcher.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,__backBufferAntiAlias:null,__backBufferEnableDepthAndStencil:null,__backBufferWantsBestResolution:null,__fragmentConstants:null,__frameCount:null,__maxAnisotropyTexture2D:null,__positionScale:null,__program:null,__renderer:null,__renderToTexture:null,__rttDepthAndStencil:null,__samplerDirty:null,__samplerTextures:null,__samplerStates:null,__stage3D:null,__stencilCompareMode:null,__stencilRef:null,__stencilReadMask:null,__supportsAnisotropicFiltering:null,__supportsPackedDepthStencil:null,__vertexConstants:null,__updateBackbufferViewport:function(){openfl__$internal_stage3D_opengl_GLContext3D.__updateBackbufferViewportTEMP(this)},__updateBlendFactors:function(){openfl__$internal_stage3D_opengl_GLContext3D.__updateBlendFactorsTEMP(this)},__class__:openfl_display3D_Context3D});var openfl_display3D_Program3D=function(){};$hxClasses["openfl.display3D.Program3D"]=openfl_display3D_Program3D;openfl_display3D_Program3D.__name__=["openfl","display3D","Program3D"];openfl_display3D_Program3D.prototype={__alphaSamplerUniforms:null,__context:null,__fragmentUniformMap:null,__programID:null,__samplerUniforms:null,__vertexUniformMap:null,__use:function(){openfl__$internal_stage3D_opengl_GLProgram3D["use"](this,this.__context.__renderer)},__class__:openfl_display3D_Program3D};var openfl_display3D_Uniform=function(){};$hxClasses["openfl.display3D.Uniform"]=openfl_display3D_Uniform;openfl_display3D_Uniform.__name__=["openfl","display3D","Uniform"];openfl_display3D_Uniform.prototype={location:null,regIndex:null,regCount:null,__class__:openfl_display3D_Uniform};var openfl_display3D_UniformMap=function(){};$hxClasses["openfl.display3D.UniformMap"]=openfl_display3D_UniformMap;openfl_display3D_UniformMap.__name__=["openfl","display3D","UniformMap"];openfl_display3D_UniformMap.prototype={__allDirty:null,__anyDirty:null,markAllDirty:function(){this.__allDirty=true;this.__anyDirty=true},__class__:openfl_display3D_UniformMap};var openfl_display3D_textures_TextureBase=function(){};$hxClasses["openfl.display3D.textures.TextureBase"]=openfl_display3D_textures_TextureBase;openfl_display3D_textures_TextureBase.__name__=["openfl","display3D","textures","TextureBase"];openfl_display3D_textures_TextureBase.__super__=openfl_events_EventDispatcher;openfl_display3D_textures_TextureBase.prototype=$extend(openfl_events_EventDispatcher.prototype,{__height:null,__textureContext:null,__textureID:null,__width:null,__class__:openfl_display3D_textures_TextureBase});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(){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.list=e;this.index=e.length};$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(){if(this.index0){functionName+=".bind("+thisArg+")"}}var fn;try{fn=eval(functionName)}catch(e){haxe_CallStack.lastException=e;return null}if(ValueType.TFunction!=Type["typeof"](fn)){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};$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,__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\t\t\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\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\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\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_graphics_utils_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\t\t\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\t\n\t\t\tif (color.a == 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a, color.a);\n\t\t\t\t\n\t\t\t}\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\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\t\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_graphics_utils_ImageCanvasUtil.convertToData(a);lime_graphics_utils_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_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>8&255)*lime_math_color__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|g&255&255}}if((g&255)==0){m=0}else{var C=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=(C&255)<<24|(m>>>16&255&255)<<16|(m>>>8&255&255)<<8|m&255&255;var S=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|(S&255)<<16|(m>>>8&255&255)<<8|m&255&255;var M=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|(M&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_color__$RGBA_RGBA_$Impl_$.a16=lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[m&255];m=((m>>>24&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((m>>>16&255)*lime_math_color__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((m>>>8&255)*lime_math_color__$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_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>>24&255;var r=this.__color>>16&255;var n=this.__color>>8&255;var _=this.__color&255;t.colorTransform(t.rect,new openfl_geom_ColorTransform(0,0,0,1,r,n,_,a));s.x+=this.__offsetX;s.y+=this.__offsetY;var o=lime_graphics_utils_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);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;t.colorTransform(t.rect,new openfl_geom_ColorTransform(0,0,0,1,a,r,n,this.__alpha*255));var _=lime_graphics_utils_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);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();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(){};$hxClasses["openfl.geom.Matrix3D"]=openfl_geom_Matrix3D;openfl_geom_Matrix3D.__name__=["openfl","geom","Matrix3D"];openfl_geom_Matrix3D.prototype={__class__:openfl_geom_Matrix3D};var openfl_geom_Point=function(e,t){if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t};$hxClasses["openfl.geom.Point"]=openfl_geom_Point;openfl_geom_Point.__name__=["openfl","geom","Point"];openfl_geom_Point.distance=function(e,t){var i=e.x-t.x;var s=e.y-t.y;return Math.sqrt(i*i+s*s)};openfl_geom_Point.interpolate=function(e,t,i){return new openfl_geom_Point(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))};openfl_geom_Point.polar=function(e,t){return new openfl_geom_Point(e*Math.cos(t),e*Math.sin(t))};openfl_geom_Point.prototype={x:null,y:null,clone:function(){return new openfl_geom_Point(this.x,this.y)},copyFrom:function(e){this.x=e.x;this.y=e.y},setTo:function(e,t){this.x=e;this.y=t},__toLimeVector2:function(){if(openfl_geom_Point.__limeVector2==null){openfl_geom_Point.__limeVector2=new lime_math_Vector2}var e=openfl_geom_Point.__limeVector2;e.x=this.x;e.y=this.y;return openfl_geom_Point.__limeVector2},__class__:openfl_geom_Point};var openfl_geom_Transform=function(e){this.__colorTransform=new openfl_geom_ColorTransform;this.concatenatedColorTransform=new openfl_geom_ColorTransform;this.pixelBounds=new openfl_geom_Rectangle;this.__displayObject=e;this.__hasMatrix=true};$hxClasses["openfl.geom.Transform"]=openfl_geom_Transform;openfl_geom_Transform.__name__=["openfl","geom","Transform"];openfl_geom_Transform.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(e){if(!this.__colorTransform.__equals(e)){this.__colorTransform.__copyFrom(e);var t=this.__displayObject;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}return this.__colorTransform},set_matrix:function(e){if(e==null){this.__hasMatrix=false;return null}this.__hasMatrix=true;this.__hasMatrix3D=false;if(this.__displayObject!=null){this.__setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty)}return e},__setTransform:function(e,t,i,s,a,r){if(this.__displayObject!=null){var n=0;var _=0;if(t==0){n=e}else{n=Math.sqrt(e*e+t*t)}if(i==0){_=e}else{_=Math.sqrt(i*i+s*s)}this.__displayObject.__scaleX=n;this.__displayObject.__scaleY=_;var o=180/Math.PI*Math.atan2(s,i)-90;if(o!=this.__displayObject.__rotation){this.__displayObject.__rotation=o;var l=o*(Math.PI/180);this.__displayObject.__rotationSine=Math.sin(l);this.__displayObject.__rotationCosine=Math.cos(l)}this.__displayObject.__transform.a=e;this.__displayObject.__transform.b=t;this.__displayObject.__transform.c=i;this.__displayObject.__transform.d=s;this.__displayObject.__transform.tx=a;this.__displayObject.__transform.ty=r;this.__displayObject.__setTransformDirty()}},__class__:openfl_geom_Transform,__properties__:{set_matrix:"set_matrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var openfl_geom_Vector3D=function(){};$hxClasses["openfl.geom.Vector3D"]=openfl_geom_Vector3D;openfl_geom_Vector3D.__name__=["openfl","geom","Vector3D"];openfl_geom_Vector3D.prototype={__class__:openfl_geom_Vector3D};var openfl_media_ID3Info=function(){};$hxClasses["openfl.media.ID3Info"]=openfl_media_ID3Info;openfl_media_ID3Info.__name__=["openfl","media","ID3Info"];openfl_media_ID3Info.prototype={__class__:openfl_media_ID3Info};var openfl_media_Sound=function(e,t){openfl_events_EventDispatcher.call(this,this);this.bytesLoaded=0;this.bytesTotal=0;this.isBuffering=false;this.url=null;if(e!=null){this.load(e,t)}};$hxClasses["openfl.media.Sound"]=openfl_media_Sound;openfl_media_Sound.__name__=["openfl","media","Sound"];openfl_media_Sound.__super__=openfl_events_EventDispatcher;openfl_media_Sound.prototype=$extend(openfl_events_EventDispatcher.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__buffer:null,close:function(){if(this.__buffer!=null){this.__buffer.dispose();this.__buffer=null}},load:function(e,t){var i=this;this.url=e.url;var s=lime_utils_Assets.getLibrary("default");var a;if(s!=null){var r=this.url;var n=s.cachedAudioBuffers;if(__map_reserved[r]!=null){a=n.existsReserved(r)}else{a=n.h.hasOwnProperty(r)}}else{a=false}if(a){var _=this.url;var o=s.cachedAudioBuffers;this.AudioBuffer_onURLLoad(__map_reserved[_]!=null?o.getReserved(_):o.h[_])}else{lime_media_AudioBuffer.loadFromFile(this.url).onComplete($bind(this,this.AudioBuffer_onURLLoad)).onError(function(e){i.AudioBuffer_onURLLoad(null)})}},play:function(e,t,i){if(t==null){t=0}if(e==null){e=0}if(this.__buffer==null||openfl_media_SoundMixer.__soundChannels.length>=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.__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(t==null){t=window.location.href}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=new openfl_net_SharedObject;l.data={};l.__localPath=t;l.__name=e;var h=null;try{var c=js_Browser.getLocalStorage();if(c!=null){h=c.getItem(t+":"+e)}}catch(e){haxe_CallStack.lastException=e}if(h!=null&&h!=""){try{var u=new haxe_Unserializer(h);u.setResolver({resolveEnum:Type.resolveEnum,resolveClass:openfl_net_SharedObject.__resolveClass});l.data=u.unserialize()}catch(e){haxe_CallStack.lastException=e}}var f=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[_]!=null){f.setReserved(_,l)}else{f.h[_]=l}}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?openfl_net_URLRequestDefaults.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))};$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);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.setEnableTextEvents(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.setEnableTextEvents(true);if(!this.__inputEnabled){this.stage.window.backend.setEnableTextEvents(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,!this.__worldColorTransform.__isDefault());if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!(!t.__renderable||t.__worldAlpha<=0)){var i=e.context;if(t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime_graphics_utils_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=t.__worldAlpha;var s=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=false;i.msImageSmoothingEnabled=false;i.imageSmoothingEnabled=false}if(s==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),s.x,s.y,s.width,s.height)}if(!e.__allowSmoothing||!t.smoothing){i.mozImageSmoothingEnabled=true;i.msImageSmoothingEnabled=true;i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{var a=this.__worldTransform;var r=this.__textEngine;var n=r.background||r.border?r.bounds:r.textBounds;var _=this.__graphics;if(this.__dirty){this.__updateLayout();if(_.__bounds==null){_.__bounds=new openfl_geom_Rectangle}_.__bounds.copyFrom(n)}_.__update(e.__worldTransform);if(this.__dirty||_.__dirty){var o=_.__width;var l=_.__height;if((r.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(r.text,""))&&!r.background&&!r.border&&!r.__hasFocus&&(r.type!=1||!r.selectable)||(r.width<=0||r.height<=0)&&r.autoSize!=2){this.__graphics.__canvas=null;this.__graphics.__context=null;this.__graphics.__bitmap=null;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=_.__context;var h=_.__renderTransform;if(e.__isDOM){var c=e.pixelRatio;_.__canvas.width=o*c|0;_.__canvas.height=l*c|0;_.__canvas.style.width=o+"px";_.__canvas.style.height=l+"px";var u=openfl_geom_Matrix.__pool.get();u.copyFrom(h);u.scale(c,c);e.setTransform(u,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(u)}else{_.__canvas.width=o;_.__canvas.height=l;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(h.a,h.b,h.c,h.d,h.tx,h.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,_.__canvas.width,_.__canvas.height)}if(r.text!=null&&r.text!=""||r.__hasFocus){var f=r.text;if(!e.__allowSmoothing||r.antiAliasType==0&&r.sharpness==400){_.__context.mozImageSmoothingEnabled=false;_.__context.msImageSmoothingEnabled=false;_.__context.imageSmoothingEnabled=false}else{_.__context.mozImageSmoothingEnabled=true;_.__context.msImageSmoothingEnabled=true;_.__context.imageSmoothingEnabled=true}if(r.border||r.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,n.width-1,n.height-1);if(r.background){var p=StringTools.hex(r.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+p;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(r.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var d=StringTools.hex(r.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+d;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="top";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var g=-this.get_scrollH();var m=0;var v=0;var b=this.get_scrollV()-1;while(vthis.get_scrollV()+r.bottomScrollV-2){break}if(C.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=.5;var S=C.offsetX+g-n.x;var M=C.offsetY+P+m+C.ascent-n.y;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(S,M);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(S+C.width,M);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(C.format);var $=StringTools.hex(C.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+$;if(k){P=C.format.size*.185}if(this.__filters!=null){if(js_Boot.__instanceof(this.__filters[0],openfl_filters_GlowFilter)){var E=this.__filters[0];var B=openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha;var I=E.get_alpha();openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha=B*I;var L=StringTools.hex(E.get_color()&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+L;var R=E.get_blurX();var D=E.get_blurY();openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=Math.max(R,D);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(f,C.startIndex,C.endIndex),C.offsetX+g-n.x,C.offsetY+P+m-n.y);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=null;openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha=B}}openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(f,C.startIndex,C.endIndex),C.offsetX+g-n.x,C.offsetY+P+m-n.y);if(this.__caretIndex>-1&&r.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&C.startIndex<=this.__caretIndex&&C.endIndex>=this.__caretIndex){x=0;var F=0;var A=this.__caretIndex-C.startIndex;while(F=this.__caretIndex||C.startIndex<=this.__selectionIndex&&C.endIndex>=this.__selectionIndex||C.startIndex>this.__caretIndex&&C.endIndexthis.__selectionIndex&&C.endIndexW){W=C.startIndex}if(C.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(r.text)){X=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(r.text)-1);X.x+=X.width+2}else{X=this.getCharBoundaries(V)}if(z!=null&&X!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(z.x+g,z.y+m,X.x-z.x,C.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(f,W,V),g+z.x,C.offsetY+P+m)}}}}}else{if(r.border||r.background){if(r.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,n.width-1,n.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,n.width,n.height)}if(r.background){var Y=StringTools.hex(r.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+Y;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(r.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var K=StringTools.hex(r.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+K;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&r.selectable&&this.__showCursor){var q=-this.get_scrollH();var J=0;var Z=0;var Q=this.get_scrollV()-1;while(Z0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var se=e.context;e.setTransform(this.__renderTransform,se);var ae=this.opaqueBackground;se.fillStyle="rgb("+(ae>>>16&255)+","+(ae>>>8&255)+","+(ae&255)+")";se.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!(!this.__renderable||this.__worldAlpha<=0)){var re=this.__graphics;if(re!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(re,e);var ne=re.__bounds;var _e=re.__width;var oe=re.__height;if(re.__canvas!=null){var le=e.context;var he=this.__scrollRect;if(_e>0&&oe>0&&(he==null||he.width>0&&he.height>0)){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);le.globalAlpha=this.__worldAlpha;e.setTransform(re.__worldTransform,le);if(e.__isDOM){var ce=1/e.pixelRatio;le.scale(ce,ce)}le.drawImage(re.__canvas,0,0,_e,oe);e.__popMaskObject(this)}}}}}}}if(ie){e.context.mozImageSmoothingEnabled=true;e.context.msImageSmoothingEnabled=true;e.context.imageSmoothingEnabled=true}}}},__renderDOM:function(e){this.__domRender=true;this.__updateCacheBitmap(e,this.__forceCachedBitmapUpdate||!this.__worldColorTransform.__isDefault());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)}i.__div.contentEditable=s.type==1;var a=i.__style;if(s.background){a.setProperty("background-color","#"+StringTools.hex(s.backgroundColor&16777215,6),null)}else{a.removeProperty("background-color")}var r=s.width;var n=s.height;var _=1;var o=i.__textFormat.size;var l=o;var h=i.__renderTransform;if(h.a!=1||h.d!=1){if(h.a==h.d){_=h.a;h.a=h.d=1}else if(h.a>h.d){_=h.a;h.d/=h.a;h.a=1}else{_=h.d;h.a/=h.d;h.d=1}l*=_;r=Math.ceil(r*_);n=Math.ceil(n*_)}i.__textFormat.size=l;var c=s.text;var u=0;if(!i.__isHTML){c=StringTools.htmlEscape(c)}else{var f=c;while(openfl__$internal_renderer_dom_DOMTextField.__regexFont.match(f)){var p=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matched(0);var d="";if(openfl__$internal_renderer_dom_DOMTextField.__regexFace.match(p)){d+="font-family:'"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexFace)+"';"}if(openfl__$internal_renderer_dom_DOMTextField.__regexColor.match(p)){d+="color:#"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexColor)+";"}if(openfl__$internal_renderer_dom_DOMTextField.__regexSize.match(p)){var g=openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexSize);var m=HxOverrides.cca(g,0);var v;u=parseFloat(g)*_;if(m==43||m==45){v=l+u}else{v=u}d+="font-size:"+v+"px;"}c=StringTools.replace(c,p,"");f=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matchedRight()}c=c.replace(openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont.r,"")}c=StringTools.replace(c,"

");i.__div.innerHTML=x;var P=new RegExp("\n","g".split("u").join(""));var k=i.__div.innerHTML.replace(P,"
");i.__div.innerHTML=k;var w=new RegExp("\r","g".split("u").join(""));var T=i.__div.innerHTML.replace(w,"
");i.__div.innerHTML=T;a.setProperty("font",openfl__$internal_text_TextEngine.getFont(i.__textFormat),null);i.__textFormat.size=o;i.__textFormat.leading=b;a.setProperty("top","3px",null);if(s.border){a.setProperty("border","solid 1px #"+StringTools.hex(s.borderColor&16777215,6),null);i.__renderTransform.translate(-1,-1);i.__renderTransformChanged=true;i.__transformDirty=true}else if(a.border!=""){a.removeProperty("border");i.__renderTransformChanged=true}a.setProperty("color","#"+StringTools.hex(i.__textFormat.color&16777215,6),null);a.setProperty("width",r+"px",null);a.setProperty("height",n+"px",null);var C=i.__textFormat.align;switch(C){case 0:a.setProperty("text-align","center",null);break;case 4:a.setProperty("text-align","right",null);break;default:a.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_opengl_GLBitmap.render(this.__cacheBitmap,e)}else{openfl__$internal_renderer_opengl_GLTextField.render(this,e,this.__worldTransform);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.__gl;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.__context.clearColor((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1);t.__context.clear(t.COLOR_BUFFER_BIT);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_opengl_GLShape.render(this,e)}}}}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_opengl_GLTextField.render(this,e,this.__worldTransform);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==lime_graphics_RendererType.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;var t=this.__textEngine.height;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=e){var i=this.__textEngine.autoSize;switch(i){case 0:var s=this;s.set_x(s.get_x()+(e-this.__textEngine.width)/2);break;case 3:var a=this;a.set_x(a.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},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.__worldTransform;var i=this.get_x();var s=this.get_y();var a=t.a*t.d-t.b*t.c;var r=a==0?-t.tx:1/a*(t.c*(t.ty-s)+t.d*(i-t.tx));var n=this.__worldTransform;var _=this.get_x();var o=this.get_y();var l=n.a*n.d-n.b*n.c;var h=l==0?-n.ty:1/l*(n.a*(o-n.ty)+n.b*(n.tx-_));var c=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var u;var f;u=Math.min(this.__selectionIndex,c)|0;f=Math.max(this.__selectionIndex,c)|0;this.__selectionIndex=u;this.__caretIndex=f;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))},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.hide=function(){lime_ui_Mouse.hide()};openfl_ui_Mouse.show=function(){lime_ui_Mouse.show()};var openfl_utils_IAssetCache=function(){};$hxClasses["openfl.utils.IAssetCache"]=openfl_utils_IAssetCache;openfl_utils_IAssetCache.__name__=["openfl","utils","IAssetCache"];openfl_utils_IAssetCache.prototype={get_enabled:null,getBitmapData:null,hasBitmapData:null,removeBitmapData:null,setBitmapData:null,__class__:openfl_utils_IAssetCache,__properties__:{get_enabled:"get_enabled"}};var openfl_utils_AssetCache=function(){this.__enabled=true;this.bitmapData=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.sound=new haxe_ds_StringMap};$hxClasses["openfl.utils.AssetCache"]=openfl_utils_AssetCache;openfl_utils_AssetCache.__name__=["openfl","utils","AssetCache"];openfl_utils_AssetCache.__interfaces__=[openfl_utils_IAssetCache];openfl_utils_AssetCache.prototype={bitmapData:null,font:null,sound:null,__enabled:null,getBitmapData:function(e){var t=this.bitmapData;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},hasBitmapData:function(e){var t=this.bitmapData;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},removeBitmapData:function(e){lime_utils_Assets.cache.image.remove(e);return this.bitmapData.remove(e)},setBitmapData:function(e,t){var i=this.bitmapData;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}},get_enabled:function(){return this.__enabled},__class__:openfl_utils_AssetCache,__properties__:{get_enabled:"get_enabled"}};var openfl_utils_Assets=function(){};$hxClasses["openfl.utils.Assets"]=openfl_utils_Assets;openfl_utils_Assets.__name__=["openfl","utils","Assets"];openfl_utils_Assets.exists=function(e,t){return lime_utils_Assets.exists(e,t)};openfl_utils_Assets.getBitmapData=function(e,t){if(t==null){t=true}if(t&&openfl_utils_Assets.cache.get_enabled()&&openfl_utils_Assets.cache.hasBitmapData(e)){var i=openfl_utils_Assets.cache.getBitmapData(e);if(openfl_utils_Assets.isValidBitmapData(i)){return i}}var s=lime_utils_Assets.getImage(e,false);if(s!=null){var a=openfl_display_BitmapData.fromImage(s);if(t&&openfl_utils_Assets.cache.get_enabled()){openfl_utils_Assets.cache.setBitmapData(e,a)}return a}return null};openfl_utils_Assets.hasLibrary=function(e){return lime_utils_Assets.hasLibrary(e)};openfl_utils_Assets.isValidBitmapData=function(e){return e!=null&&e.image!=null};openfl_utils_Assets.registerLibrary=function(e,t){lime_utils_Assets.registerLibrary(e,t)};openfl_utils_Assets.unloadLibrary=function(e){lime_utils_Assets.unloadLibrary(e)};var openfl_utils__$ByteArray_ByteArray_$Impl_$={};$hxClasses["openfl.utils._ByteArray.ByteArray_Impl_"]=openfl_utils__$ByteArray_ByteArray_$Impl_$;openfl_utils__$ByteArray_ByteArray_$Impl_$.__name__=["openfl","utils","_ByteArray","ByteArray_Impl_"];openfl_utils__$ByteArray_ByteArray_$Impl_$.__properties__={get_length:"get_length"};openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes=function(e){if(e==null){return null}if(js_Boot.__instanceof(e,openfl_utils_ByteArrayData)){return e}else{return openfl_utils_ByteArrayData.fromBytes(e)}};openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes=function(e){return e};openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length=function(e){if(e==null){return 0}else{return e.length}};var openfl_utils_IDataOutput=function(){};$hxClasses["openfl.utils.IDataOutput"]=openfl_utils_IDataOutput;openfl_utils_IDataOutput.__name__=["openfl","utils","IDataOutput"];openfl_utils_IDataOutput.prototype={__class__:openfl_utils_IDataOutput};var openfl_utils_IDataInput=function(){};$hxClasses["openfl.utils.IDataInput"]=openfl_utils_IDataInput;openfl_utils_IDataInput.__name__=["openfl","utils","IDataInput"];openfl_utils_IDataInput.prototype={__class__:openfl_utils_IDataInput};var openfl_utils_ByteArrayData=function(e){if(e==null){e=0}var t=new haxe_io_Bytes(new ArrayBuffer(e));haxe_io_Bytes.call(this,t.b.buffer);this.__length=e;if(openfl_utils_ByteArrayData.__defaultEndian==null){if(lime_system_System.get_endianness()==lime_system_Endian.LITTLE_ENDIAN){openfl_utils_ByteArrayData.__defaultEndian=1}else{openfl_utils_ByteArrayData.__defaultEndian=0}}this.__endian=openfl_utils_ByteArrayData.__defaultEndian;this.position=0};$hxClasses["openfl.utils.ByteArrayData"]=openfl_utils_ByteArrayData;openfl_utils_ByteArrayData.__name__=["openfl","utils","ByteArrayData"];openfl_utils_ByteArrayData.__interfaces__=[openfl_utils_IDataOutput,openfl_utils_IDataInput];openfl_utils_ByteArrayData.fromBytes=function(e){var t=new openfl_utils_ByteArrayData;t.__fromBytes(e);return t};openfl_utils_ByteArrayData.__super__=haxe_io_Bytes;openfl_utils_ByteArrayData.prototype=$extend(haxe_io_Bytes.prototype,{position:null,__endian:null,__length:null,readBytes:function(e,t,i){if(i==null){i=0}if(t==null){t=0}if(i==0){i=this.length-this.position}if(this.position+i>this.length){throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}if(e.lengththis.length){throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}this.position+=e;return this.getString(this.position-e,e)},writeByte:function(e){this.__resize(this.position+1);this.b[this.position++]=e&255&255},writeBytes:function(e,t,i){if(i==null){i=0}if(t==null){t=0}if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)==0){return}if(i==0){i=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)-t}this.__resize(this.position+i);this.blit(this.position,e,t,i);this.position=this.position+i},writeUTFBytes:function(e){var t=haxe_io_Bytes.ofString(e);this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(haxe_io_Bytes.ofString(e)))},__fromBytes:function(e){this.b=e.b;this.__length=e.length;this.data=e.data;this.length=e.length},__resize:function(e){if(e>this.__length){var t=new haxe_io_Bytes(new ArrayBuffer((e+1)*3>>1));if(this.__length>0){var i=this.length;this.length=this.__length;t.blit(0,this,0,this.__length);this.length=i}this.b=t.b;this.__length=t.length;this.data=t.data}if(this.length0&&this.currentCount>=this.__repeatCount){this.stop();this.dispatchEvent(new openfl_events_TimerEvent("timer"));this.dispatchEvent(new openfl_events_TimerEvent("timerComplete"))}else{this.dispatchEvent(new openfl_events_TimerEvent("timer"))}},__class__:openfl_utils_Timer,__properties__:{set_delay:"set_delay"}});var trcharts_ErrorMsg=function(e){openfl_display_Sprite.call(this);var t=new openfl_text_TextField;t.set_text(e);t.set_selectable(false);var i=new openfl_text_TextFormat;i.color=0;i.font="Courier";i.size=10;i.align=3;t.setTextFormat(i);t.set_autoSize(1);t.set_border(true);t.set_x(5);t.set_y(5);this.addChild(t)};$hxClasses["trcharts.ErrorMsg"]=trcharts_ErrorMsg;trcharts_ErrorMsg.__name__=["trcharts","ErrorMsg"];trcharts_ErrorMsg.__super__=openfl_display_Sprite;trcharts_ErrorMsg.prototype=$extend(openfl_display_Sprite.prototype,{__class__:trcharts_ErrorMsg});var trcharts_JsonErrorMsg=function(e,t){var i="Open Flash Chart\n\n";i+="JSON Parse Error ["+t.message+"]\n";var s=e.indexOf("\n",t.errorID);var a=HxOverrides.substr(e,0,s);var r=a.split("\n");i+="Error at character "+t.errorID+", line "+r.length+":\n\n";var n=3;while(n>0){if(r.length-n>-1){i+=Std.string(r.length-n)+": "+r[r.length-n]}--n}trcharts_ErrorMsg.call(this,i)};$hxClasses["trcharts.JsonErrorMsg"]=trcharts_JsonErrorMsg;trcharts_JsonErrorMsg.__name__=["trcharts","JsonErrorMsg"];trcharts_JsonErrorMsg.__super__=trcharts_ErrorMsg;trcharts_JsonErrorMsg.prototype=$extend(trcharts_ErrorMsg.prototype,{__class__:trcharts_JsonErrorMsg});var trcharts_JsonInspector=function(){};$hxClasses["trcharts.JsonInspector"]=trcharts_JsonInspector;trcharts_JsonInspector.__name__=["trcharts","JsonInspector"];trcharts_JsonInspector.has_pie_chart=function(e){var t=Reflect.field(e,"elements");var i=0;while(i-1){if(o%3==0&&r.length>0){r=","+r;o=0}++o;r=HxOverrides.substr(_,l,1)+r;--l}if(n[1]!=null){if(i){n[1]+="0000000000000000"}r+="."+Std.string(n[1].substr(0,t))}else if(i&&t>0){n[1]="0000000000000000";r+="."+Std.string(n[1].substr(0,t))}if(e<0){r="-"+r}if(a){r=StringTools.replace(r,",","")}if(s){r=trcharts_NumberUtils.toDecimalSeperatorComma(r)}return r};trcharts_NumberUtils.toDecimalSeperatorComma=function(e){e=StringTools.replace(e,".","|");e=StringTools.replace(e,",",".");e=StringTools.replace(e,"|",",");return e};var trcharts_Object_$helper=function(){};$hxClasses["trcharts.Object_helper"]=trcharts_Object_$helper;trcharts_Object_$helper.__name__=["trcharts","Object_helper"];trcharts_Object_$helper.merge=function(e,t){var i=Reflect.fields(t);var s=0;while(sthis.x_range.max;var i=this.x_range.count();i+=t&&this.x_range.offset?-2:0;var s=this.width_()/i;var a=e-this.x_range.min;var r=0;if(this.x_offset){r=Math.abs(s/2)}return this.left_()+r+a*s},get_x_from_pos:function(e){var t=this.x_range.min>this.x_range.max;var i=this.x_range.count();i+=t&&this.x_range.offset?-2:0;var s=Math.abs(this.width_()/i);var a=0;if(this.x_offset){a=s/2}return this.left_()+a+e*s},get_x_tick_pos:function(e){return this.get_x_from_pos(e)-this.tick_offset},set_bar_groups:function(e){this.bar_groups=e},__class__:trcharts_ScreenCoords});var trcharts_ScreenCoordsRadar=function(e,t,i,s){this.TO_RADIANS=Math.PI/180;trcharts_ScreenCoordsBase.call(this,e,t,i,s);this.radius=Math.min(this.width,this.height)/2};$hxClasses["trcharts.ScreenCoordsRadar"]=trcharts_ScreenCoordsRadar;trcharts_ScreenCoordsRadar.__name__=["trcharts","ScreenCoordsRadar"];trcharts_ScreenCoordsRadar.__super__=trcharts_ScreenCoordsBase;trcharts_ScreenCoordsRadar.prototype=$extend(trcharts_ScreenCoordsBase.prototype,{TO_RADIANS:null,range:null,angles:null,angle:null,radius:null,set_range:function(e){this.range=e},get_max:function(){return this.range.max},set_angles:function(e){this.angles=e;this.angle=360/e},get_angles:function(){return this.angles},get_radius:function(){return this.radius},reduce_radius:function(){this.radius--},get_pos:function(e,t){var i=(e-90)*this.TO_RADIANS;var s=this.get_radius()*t;var a=new openfl_geom_Point(s*Math.cos(i),s*Math.sin(i));return a},get_get_x_from_pos_and_y_from_val:function(e,t,i){if(i==null){i=false}var s=this.get_pos(this.angle*e,t/this.range.count());s.x+=this.get_center_x();s.y+=this.get_center_y();return s},get_y_from_val:function(e,t){if(t==null){t=false}var i=this.get_pos(0,e/this.range.count());i.y+=this.get_center_y();return i.y},__class__:trcharts_ScreenCoordsRadar});var trcharts_TRChartsBase=function(e,t){this._g=new trcharts_global_Global;openfl_display_Sprite.call(this);this._realWidth=e;this._realHeight=t};$hxClasses["trcharts.TRChartsBase"]=trcharts_TRChartsBase;trcharts_TRChartsBase.__name__=["trcharts","TRChartsBase"];trcharts_TRChartsBase.__super__=openfl_display_Sprite;trcharts_TRChartsBase.prototype=$extend(openfl_display_Sprite.prototype,{_realWidth:null,_realHeight:null,_g:null,get_realWidth:function(){return this._realWidth},get_realHeight:function(){return this._realHeight},__class__:trcharts_TRChartsBase,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{get_realHeight:"get_realHeight",get_realWidth:"get_realWidth"})});var trcharts_TRCharts=function(e,t){this.title=null;this.VERSION="2 TRCharts";trcharts_TRChartsBase.call(this,e,t);this.VERSION="new TRCharts3";this.title=null;this._main()};$hxClasses["trcharts.TRCharts"]=trcharts_TRCharts;trcharts_TRCharts.__name__=["trcharts","TRCharts"];trcharts_TRCharts.__super__=trcharts_TRChartsBase;trcharts_TRCharts.prototype=$extend(trcharts_TRChartsBase.prototype,{VERSION:null,title:null,x_axis:null,radar_axis:null,x_legend:null,y_axis:null,y_axis_right:null,y_legend:null,y_legend_2:null,keys:null,obs:null,sc:null,tooltip:null,background:null,menu:null,ok:null,URL:null,_main:function(){this.ok=false;this.set_the_stage()},reload:function(e){this.load_external_file(e)},load_external_file:function(e){var t=this;this.URL=e;var i=new base_baseLoad_LoadDataStringJs(e,function(e){t.parse_json(e)})},set_the_stage:function(){this.addEventListener("rollOut",$bind(this,this.mouseOut));this.addEventListener("mouseOver",$bind(this,this.mouseMove))},mouseMove:function(e){if(this.tooltip==null){return}var t=this.tooltip.get_tip_style();switch(t){case 0:this.mouse_move_closest(e);break;case 1:this.mouse_move_proximity(js_Boot.__cast(e,openfl_events_MouseEvent));break;case 2:this.mouse_move_follow(js_Boot.__cast(e,openfl_events_MouseEvent));break}},mouse_move_follow:function(e){if(js_Boot.__instanceof(e.target,trcharts_charts_series_Has_$tooltip)){this.tooltip.draw(js_Boot.__cast(e.target,trcharts_charts_series_Has_$tooltip))}else{this.tooltip.hide()}},mouse_move_proximity:function(e){var t=this.obs.mouse_move_proximity(this.get_mouseX(),this.get_mouseY());this.tooltip.closest(t)},mouse_move_closest:function(e){var t=this.obs.closest_2(this.get_mouseX(),this.get_mouseY());this.tooltip.closest(t)},resize_pie:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();this.sc=new trcharts_ScreenCoords(this.title.get_height(),0,this._realWidth,this._realHeight,null,null,null,0,0,false);this.obs.resize(this.sc);return this.sc},resize_radar:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();this.keys.resize(0,this.title.get_height());var e=this.title.get_height()+this.keys.get_height();var t=new trcharts_ScreenCoordsRadar(e,0,this._realWidth,this.get_realHeight());t.set_range(this.radar_axis.get_range());t.set_angles(this.obs.get_max_x()-this.obs.get_min_x()+1);this.radar_axis.resize(t);this.obs.resize(t);return t},resize:function(){if(!this.ok){return}var e;if(this.radar_axis!=null){e=this.resize_radar()}else if(this.obs.has_pie()){e=this.resize_pie()}else{e=this.resize_chart()}if(this.menu!=null){this.menu.resize()}e=null},resize_chart:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();var e=this.y_legend.get_width()+this.y_axis.get_width();this.keys.resize(e,this.title.get_height());var t=this.title.get_height()+this.keys.get_height();var i=this._realHeight;i-=this.x_legend.get_height()+this.x_axis.get_height();var s=this._realWidth;s-=this.y_legend_2.get_width();s-=this.y_axis_right.get_width();this.sc=new trcharts_ScreenCoords(t,e,s,i,this.y_axis.get_range(),this.y_axis_right.get_range(),this.x_axis.get_range(),this.x_axis.first_label_width(),this.x_axis.last_label_width(),false);this.sc.set_bar_groups(this.obs.groups);this.x_axis.resize(this.sc,this._realHeight-(this.x_legend.get_height()+this.x_axis.labels.get_height()));this.y_axis.resize(this.y_legend.get_width(),this.sc);this.y_axis_right.resize(0,this.sc);this.x_legend.resize(this.sc);this.y_legend.resize();this.y_legend_2.resize();this.obs.resize(this.sc);this.dispatchEvent(new openfl_events_Event("on-show"));return this.sc},mouseOut:function(e){if(this.tooltip!=null){this.tooltip.hide()}if(this.obs!=null){this.obs.mouse_out()}},parse_json:function(t){var e=null;var i=false;try{e=JSON.parse(t);i=true}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){this.addChild(new trcharts_JsonErrorMsg(t,e))}else throw e}if(i){this.build_chart(e);e=null}t=""},build_chart:function(e){if(this.obs!=null){this.die()}trcharts_NumberFormat.getInstance(e);trcharts_NumberFormat.getInstanceY2(e);this.tooltip=new trcharts_Tooltip(e.tooltip);var t=this._g;t.set_tooltip_string(this.tooltip.tip_text);this.background=new trcharts_elements_Background(e,this);this.title=new trcharts_elements_labels_Title(e.title,this);this.addChild(this.background);if(trcharts_JsonInspector.is_radar(e)){this.obs=trcharts_charts_Factory.MakeChart(e,this);this.radar_axis=new trcharts_elements_axis_RadarAxis(e.radar_axis);this.keys=new trcharts_elements_labels_Keys(this.obs);this.addChild(this.radar_axis);this.addChild(this.keys)}else if(!trcharts_JsonInspector.has_pie_chart(e)){this.build_chart_background(e)}else{this.obs=trcharts_charts_Factory.MakeChart(e,this);this.tooltip.set_tip_style(2)}this.addChild(this.title);var i=0;var s=this.obs.sets;while(i0)this.removeChildAt(0);if(this.hasEventListener("mouseMove")){this.removeEventListener("mouseMove",$bind(this,this.mouseMove))}},__class__:trcharts_TRCharts});var trcharts_Tooltip=function(e){openfl_display_Sprite.call(this);this.mouseEnabled=false;this.tip_showing=false;this.style={shadow:true,rounded:6,stroke:2,colour:"#808080",background:"#f0f0f0",title:"color: #0000F0; font-weight: bold; font-size: 12;",body:"color: #000000; font-weight: normal; font-size: 12;",mouse:0,text:"_default"};if(e){this.style=trcharts_Object_$helper.merge(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.style.background=trcharts_string_Utils.get_colour(this.style.background);this.style.title=new trcharts_string_Css(this.style.title);this.style.body=new trcharts_string_Css(this.style.body);this.tip_style=this.style.mouse;this.tip_text=this.style.text;this.cached_elements=[];if(this.style.shadow==1){var t=new openfl_filters_DropShadowFilter;t.set_blurX(4);t.set_blurY(4);t.set_distance(4);t.set_angle(45);t.set_quality(2);t.set_alpha(.5);this.set_filters([t])}};$hxClasses["trcharts.Tooltip"]=trcharts_Tooltip;trcharts_Tooltip.__name__=["trcharts","Tooltip"];trcharts_Tooltip.__super__=openfl_display_Sprite;trcharts_Tooltip.prototype=$extend(openfl_display_Sprite.prototype,{style:null,tip_style:null,cached_elements:null,tip_showing:null,tip_text:null,make_tip:function(e){this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0);var t=0;var i=5;var s=0;while(s");var a=5;var r=0;if(s.length>1){var n=this.make_title(s.shift());n.mouseEnabled=false;n.set_selectable(false);n.set_x(t);n.set_y(a);a+=n.get_height();r=n.get_width();this.addChild(n)}var _=this.make_body(s.join("\n"));_.mouseEnabled=false;_.set_selectable(false);_.set_x(t);_.set_y(a);r=Math.max(r,_.get_width());this.addChild(_);a+=_.get_height();return{width:r,height:a}},make_title:function(e){var t=new openfl_text_TextField;t.mouseEnabled=false;t.set_selectable(false);t.set_htmlText(e);var i=new openfl_text_TextFormat;i.color=this.style.title.color;i.font="Verdana";i.bold=this.style.title.font_weight=="bold";i.size=this.style.title.font_size;t.setTextFormat(i);t.set_autoSize(1);return t},make_body:function(e){var t=new openfl_text_TextField;t.mouseEnabled=false;t.set_selectable(false);t.set_htmlText(e);var i=new openfl_text_TextFormat;i.color=this.style.body.color;i.font="Verdana";i.bold=this.style.body.font_weight=="bold";i.size=this.style.body.font_size;i.align=3;t.setTextFormat(i);t.set_autoSize(1);return t},get_pos:function(e){var t=e.get_tip_pos();var i=t.x+this.get_width()+16>this.stage.stageWidth?this.stage.stageWidth-this.get_width()-16:t.x;var s=t.y;s-=4;s-=this.get_height()+10;if(s<0){s=0}return new openfl_geom_Point(i,s)},show_tip:function(e){motion_Actuate.stop(this);var t=this.get_pos(e);if(this.style.mouse==0){this.set_visible(true);this.set_alpha(1);this.set_x(t.x);this.set_y(t.y)}else{this.tip_showing=true;this.set_alpha(0);this.set_visible(true);this.set_x(t.x);this.set_y(t.y);motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Expo.get_easeOut())}},draw:function(e){if(this.cached_elements[0]==e){if(!this.tip_showing){this.show_tip(e)}}else{this.untip();this.cached_elements=[e];this.make_tip([e]);this.show_tip(e)}},closest:function(e){if(e.length==0){return}if(this.is_cached(e)){return}this.untip();this.cached_elements=e;this.tip();this.make_tip(e);var t=this.get_pos(e[0]);this.set_visible(true);motion_Actuate.tween(this,1,{x:t.x}).ease(motion_easing_Expo.get_easeOut());motion_Actuate.tween(this,1,{y:t.y}).ease(motion_easing_Expo.get_easeOut())},is_cached:function(e){if(this.cached_elements.length==0){return false}var t=0;while(t0)this.removeChildAt(0);this.style=null;this.cached_elements=null},__class__:trcharts_Tooltip});var trcharts_charts_Base=function(e){openfl_display_Sprite.call(this);this._trcharts=e};$hxClasses["trcharts.charts.Base"]=trcharts_charts_Base;trcharts_charts_Base.__name__=["trcharts","charts","Base"];trcharts_charts_Base.__super__=openfl_display_Sprite;trcharts_charts_Base.prototype=$extend(openfl_display_Sprite.prototype,{key:null,font_size:null,colour:null,line_width:null,circle_size:null,values:null,_trcharts:null,get_element:function(e,t){return null},add_values:function(){var e=0;var t=0;var i=this.values;while(t#x_label#",alpha:.6,"on-click":false,axis:"left"});this.props=new trcharts_Properties(e,s);this.on_show=this.get_on_show(Reflect.field(e,"on-show"));this.colour=this.props.get_colour("colour");this.key=this.props.get("text");this.font_size=this.props.get("font-size");this.props.set("tip",this.props.get("tip").replace("#key#",this.key));this.group=t;this.values=this.props.get("values");this.add_values()};$hxClasses["trcharts.charts.BarBase"]=trcharts_charts_BarBase;trcharts_charts_BarBase.__name__=["trcharts","charts","BarBase"];trcharts_charts_BarBase.__super__=trcharts_charts_Base;trcharts_charts_BarBase.prototype=$extend(trcharts_charts_Base.prototype,{group:null,props:null,on_show:null,get_on_show:function(e){var t=new trcharts_Properties({type:"none",cascade:3,delay:0});return new trcharts_Properties(e,t)},get_element_helper_prop:function(e){var t=new trcharts_Properties({colour:this.props.get("colour"),tip:this.props.get("tip"),alpha:this.props.get("alpha"),"on-click":this.props.get("on-click"),axis:this.props.get("axis"),"on-show":this.on_show});var i;if(typeof e=="number"){i=new trcharts_Properties({top:e},t)}else{i=new trcharts_Properties(e,t)}return i},__class__:trcharts_charts_BarBase});var trcharts_charts_Bar=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Bar"]=trcharts_charts_Bar;trcharts_charts_Bar.__name__=["trcharts","charts","Bar"];trcharts_charts_Bar.__super__=trcharts_charts_BarBase;trcharts_charts_Bar.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Bar(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_Bar});var trcharts_charts_Bar3D=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Bar3D"]=trcharts_charts_Bar3D;trcharts_charts_Bar3D.__name__=["trcharts","charts","Bar3D"];trcharts_charts_Bar3D.__super__=trcharts_charts_BarBase;trcharts_charts_Bar3D.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Bar3D(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_Bar3D});var trcharts_charts_BarCylinder=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarCylinder"]=trcharts_charts_BarCylinder;trcharts_charts_BarCylinder.__name__=["trcharts","charts","BarCylinder"];trcharts_charts_BarCylinder.__super__=trcharts_charts_BarBase;trcharts_charts_BarCylinder.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Cylinder(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarCylinder});var trcharts_charts_BarCylinderOutline=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarCylinderOutline"]=trcharts_charts_BarCylinderOutline;trcharts_charts_BarCylinderOutline.__name__=["trcharts","charts","BarCylinderOutline"];trcharts_charts_BarCylinderOutline.__super__=trcharts_charts_BarBase;trcharts_charts_BarCylinderOutline.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_CylinderOutline(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarCylinderOutline});var trcharts_charts_BarDome=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarDome"]=trcharts_charts_BarDome;trcharts_charts_BarDome.__name__=["trcharts","charts","BarDome"];trcharts_charts_BarDome.__super__=trcharts_charts_BarBase;trcharts_charts_BarDome.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Dome(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarDome});var trcharts_charts_BarFade=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarFade"]=trcharts_charts_BarFade;trcharts_charts_BarFade.__name__=["trcharts","charts","BarFade"];trcharts_charts_BarFade.__super__=trcharts_charts_BarBase;trcharts_charts_BarFade.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_PointBarFade(e,t,this.colour,this.group)},__class__:trcharts_charts_BarFade});var trcharts_charts_BarGlass=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarGlass"]=trcharts_charts_BarGlass;trcharts_charts_BarGlass.__name__=["trcharts","charts","BarGlass"];trcharts_charts_BarGlass.__super__=trcharts_charts_BarBase;trcharts_charts_BarGlass.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Glass(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarGlass});var trcharts_charts_BarOutline=function(e,t,i){this.style={"outline-colour":"#000000"};trcharts_Object_$helper.merge_2(e,this.style);trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarOutline"]=trcharts_charts_BarOutline;trcharts_charts_BarOutline.__name__=["trcharts","charts","BarOutline"];trcharts_charts_BarOutline.__super__=trcharts_charts_BarBase;trcharts_charts_BarOutline.prototype=$extend(trcharts_charts_BarBase.prototype,{style:null,get_element:function(e,t){var i=new trcharts_Properties({"outline-colour":Reflect.field(this.style,"outline-colour")});var s=this.get_element_helper_prop(t);s.set_parent(i);return new trcharts_charts_series_bars_Outline(e,s,this.group)},__class__:trcharts_charts_BarOutline});var trcharts_charts_BarPlastic=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarPlastic"]=trcharts_charts_BarPlastic;trcharts_charts_BarPlastic.__name__=["trcharts","charts","BarPlastic"];trcharts_charts_BarPlastic.__super__=trcharts_charts_BarBase;trcharts_charts_BarPlastic.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Plastic(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarPlastic});var trcharts_charts_BarPlasticFlat=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarPlasticFlat"]=trcharts_charts_BarPlasticFlat;trcharts_charts_BarPlasticFlat.__name__=["trcharts","charts","BarPlasticFlat"];trcharts_charts_BarPlasticFlat.__super__=trcharts_charts_BarBase;trcharts_charts_BarPlasticFlat.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_PlasticFlat(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarPlasticFlat});var trcharts_charts_BarRound=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRound"]=trcharts_charts_BarRound;trcharts_charts_BarRound.__name__=["trcharts","charts","BarRound"];trcharts_charts_BarRound.__super__=trcharts_charts_BarBase;trcharts_charts_BarRound.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Round(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRound});var trcharts_charts_BarRound3D=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRound3D"]=trcharts_charts_BarRound3D;trcharts_charts_BarRound3D.__name__=["trcharts","charts","BarRound3D"];trcharts_charts_BarRound3D.__super__=trcharts_charts_BarBase;trcharts_charts_BarRound3D.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Round3D(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRound3D});var trcharts_charts_BarRoundGlass=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRoundGlass"]=trcharts_charts_BarRoundGlass;trcharts_charts_BarRoundGlass.__name__=["trcharts","charts","BarRoundGlass"];trcharts_charts_BarRoundGlass.__super__=trcharts_charts_BarBase;trcharts_charts_BarRoundGlass.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_RoundGlass(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRoundGlass});var trcharts_charts_BarSketch=function(e,t,i){this.style={"outline-colour":"#000000",offset:6};trcharts_Object_$helper.merge_2(e,this.style);trcharts_charts_BarBase.call(this,this.style,t,i)};$hxClasses["trcharts.charts.BarSketch"]=trcharts_charts_BarSketch;trcharts_charts_BarSketch.__name__=["trcharts","charts","BarSketch"];trcharts_charts_BarSketch.__super__=trcharts_charts_BarBase;trcharts_charts_BarSketch.prototype=$extend(trcharts_charts_BarBase.prototype,{style:null,get_element:function(e,t){var i=new trcharts_Properties({"outline-colour":Reflect.field(this.style,"outline-colour"),offset:this.style.offset});var s=this.get_element_helper_prop(t);s.set_parent(i);return new trcharts_charts_series_bars_Sketch(e,s,this.group)},__class__:trcharts_charts_BarSketch});var trcharts_charts_BarStack=function(e,t,i,s){trcharts_charts_BarBase.call(this,{},0,s);var a=new trcharts_Properties({values:[],keys:[],colours:["#FF0000","#00FF00"],text:"","font-size":12,tip:"#x_label# : #val#
Total: #total#",alpha:.6,"on-click":false,axis:"left"});this.props=new trcharts_Properties(e,a);this.on_show=this.get_on_show(Reflect.field(e,"on-show"));this.group=i;this.values=e.values;this.add_values()};$hxClasses["trcharts.charts.BarStack"]=trcharts_charts_BarStack;trcharts_charts_BarStack.__name__=["trcharts","charts","BarStack"];trcharts_charts_BarStack.__super__=trcharts_charts_BarBase;trcharts_charts_BarStack.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){var i=new trcharts_Properties({colours:this.props.get("colours"),tip:this.props.get("tip"),alpha:this.props.get("alpha"),"on-click":this.props.get("on-click"),axis:this.props.get("axis"),"on-show":this.on_show,values:t});return new trcharts_charts_series_bars_StackCollection(e,i,this.group)},__class__:trcharts_charts_BarStack});var trcharts_charts_Candle=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Candle"]=trcharts_charts_Candle;trcharts_charts_Candle.__name__=["trcharts","charts","Candle"];trcharts_charts_Candle.__super__=trcharts_charts_BarBase;trcharts_charts_Candle.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){var i=this.get_element_helper_prop(t);if(this.props.has("negative-colour")){i.set("negative-colour",this.props.get("negative-colour"))}return new trcharts_charts_series_bars_ECandle(e,i,this.group)},__class__:trcharts_charts_Candle});var trcharts_charts_Factory=function(){};$hxClasses["trcharts.charts.Factory"]=trcharts_charts_Factory;trcharts_charts_Factory.__name__=["trcharts","charts","Factory"];trcharts_charts_Factory.MakeChart=function(e,t){var i=new trcharts_charts_ObjectCollection;var s=0;var a="";var r=1;var n=Reflect.field(e,"elements");var _=0;while(_0&&js_Boot.__instanceof(this.sets[0],trcharts_charts_Pie)){return true}else{return false}},die:function(){var e=0;var t=this.sets;while(e=0){var f=this.props.get("tip").replace("#total#",trcharts_NumberUtils.formatNumber(this.total_value));f=StringTools.replace(f,"#percent#",trcharts_NumberUtils.formatNumber(c/this.total_value*100)+"%");this.addChild(this.add_slice(s,i,u,h,f,Std.string(this.colours[s%this.colours.length])))}++s;i+=u}},add_slice:function(e,t,i,s,a,r){var n=new trcharts_Properties({colour:r,tip:a,start:t,angle:i},this.props);var _={};if(typeof s=="number"){_.value=s}else{_=s}var o=new trcharts_Properties(_,n);if(!o.has("label")){o.set("label",o.get("value").toString())}return new trcharts_charts_series_pies_PieSliceContainer(e,o)},__class__:trcharts_charts_Pie});var trcharts_charts_series_Has_$tooltip=function(){};$hxClasses["trcharts.charts.series.Has_tooltip"]=trcharts_charts_series_Has_$tooltip;trcharts_charts_series_Has_$tooltip.__name__=["trcharts","charts","series","Has_tooltip"];trcharts_charts_series_Has_$tooltip.prototype={get_tooltip:null,get_tip_pos:null,__class__:trcharts_charts_series_Has_$tooltip};var trcharts_charts_series_Element=function(){this.set_cacheAsBitmap(true);this.right_axis=false;openfl_display_Sprite.call(this)};$hxClasses["trcharts.charts.series.Element"]=trcharts_charts_series_Element;trcharts_charts_series_Element.__name__=["trcharts","charts","series","Element"];trcharts_charts_series_Element.__interfaces__=[trcharts_charts_series_Has_$tooltip];trcharts_charts_series_Element.__super__=openfl_display_Sprite;trcharts_charts_series_Element.prototype=$extend(openfl_display_Sprite.prototype,{_x:null,_y:null,index:null,tooltip:null,link:null,is_tip:null,line_mask:null,right_axis:null,get_x:function(){return openfl_display_Sprite.prototype.get_x.call(this)},attach_events:function(){this.addEventListener("mouseOver",$bind(this,this.mouseOver),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut),false,0,true)},mouseOver:function(e){this.pulse()},pulse:function(){motion_Actuate.tween(this,.5,{alpha:.5}).ease(motion_easing_Elastic.get_easeOut());motion_Actuate.tween(this,1,{alpha:1}).delay(.4).onComplete($bind(this,this.pulse)).ease(motion_easing_Elastic.get_easeOut())},mouseOut:function(e){motion_Actuate.stop(this);motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Elastic.get_easeOut())},set_on_click:function(e){this.link=e;this.set_buttonMode(true);this.useHandCursor=true;this.addEventListener("mouseUp",$bind(this,this.mouseUp),false,0,true)},mouseUp:function(e){if(this.link.substring(0,6)!="trace:"){if(this.link.substring(0,5)=="http:"){this.browse_url(this.link)}else if(this.link.substring(0,6)=="https:"){this.browse_url(this.link)}else{openfl_external_ExternalInterface.call(this.link,this.index)}}},browse_url:function(e){var t=new openfl_net_URLRequest(this.link);try{openfl_Lib.getURL(t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,haxe_io_Error)){}else throw e}},get_tip_pos:function(){return{x:this.get_x(),y:this.get_y()}},get_tooltip:function(){return this.tooltip},__class__:trcharts_charts_series_Element});var trcharts_charts_series_bars_Base=function(e,t,i){trcharts_charts_series_Element.call(this);this.index=e;this.parse_value(t);this.colour=t.get_colour("colour");this.tooltip=this.replace_magic_values(t.get("tip"));this.group=i;this.set_visible(true);this.on_show_animate=true;this.on_show=t.get("on-show");this.mouse_out_alpha=t.get("alpha");this.set_alpha(this.mouse_out_alpha);this.addEventListener("mouseOver",$bind(this,this.mouseOver));this.addEventListener("mouseOut",$bind(this,this.mouseOut));if(t.has("on-click")){if(t.get("on-click")!=false){this.set_on_click(t.get("on-click"))}}if(t.has("axis")){if(t.get("axis")=="right"){this.right_axis=true}}};$hxClasses["trcharts.charts.series.bars.Base"]=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Base.__name__=["trcharts","charts","series","bars","Base"];trcharts_charts_series_bars_Base.__super__=trcharts_charts_series_Element;trcharts_charts_series_bars_Base.prototype=$extend(trcharts_charts_series_Element.prototype,{tip_pos:null,colour:null,group:null,top:null,bottom:null,mouse_out_alpha:null,on_show_animate:null,on_show:null,parse_value:function(e){if(!e.has("bottom")){e.set("bottom",0)}this.top=e.get("top");this.bottom=e.get("bottom")},replace_magic_values:function(e){e=StringTools.replace(e,"#top#",trcharts_NumberUtils.formatNumber(this.top));e=StringTools.replace(e,"#bottom#",trcharts_NumberUtils.formatNumber(this.bottom));e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.top-this.bottom));return e},mouseOver:function(e){this.is_tip=true;motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Elastic.get_easeOut())},mouseOut:function(e){this.is_tip=false;motion_Actuate.tween(this,1,{alpha:this.mouse_out_alpha}).ease(motion_easing_Elastic.get_easeOut())},get_tip_pos:function(){return{x:this.tip_pos.x,y:this.tip_pos.y}},__class__:trcharts_charts_series_bars_Base});var trcharts_charts_PointBarFade=function(e,t,i,s){var a=new trcharts_Properties(t);trcharts_charts_series_bars_Base.call(this,e,a,s)};$hxClasses["trcharts.charts.PointBarFade"]=trcharts_charts_PointBarFade;trcharts_charts_PointBarFade.__name__=["trcharts","charts","PointBarFade"];trcharts_charts_PointBarFade.__super__=trcharts_charts_series_bars_Base;trcharts_charts_PointBarFade.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_PointBarFade});var trcharts_charts_ScatterBase=function(e,t){trcharts_charts_Base.call(this,t);var i=new trcharts_Properties({colour:"#3030d0",text:"","font-size":12,tip:"#val#",axis:"left"});this.props=new trcharts_Properties(e,i);this.dot_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.props.get("colour"),this.props.get("axis"));var s=new trcharts_Properties({type:"explode",cascade:0,delay:.3});this.on_show=new trcharts_Properties(Reflect.field(e,"on-show"),s)};$hxClasses["trcharts.charts.ScatterBase"]=trcharts_charts_ScatterBase;trcharts_charts_ScatterBase.__name__=["trcharts","charts","ScatterBase"];trcharts_charts_ScatterBase.__super__=trcharts_charts_Base;trcharts_charts_ScatterBase.prototype=$extend(trcharts_charts_Base.prototype,{props:null,style:null,on_show:null,dot_style:null,default_style:null,get_element:function(e,t){var i={width:this.style.width,colour:this.style.colour,tip:this.style.tip,"dot-size":10};trcharts_Object_$helper.merge_2(Reflect.field(this.style,"dot-style"),i);trcharts_Object_$helper.merge_2(t,i);if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}var s=new trcharts_Properties(t,this.dot_style);s.set("on-show",this.on_show);return trcharts_charts_series_dots_Dot_$factory.make(e,s)},__class__:trcharts_charts_ScatterBase});var trcharts_charts_Scatter=function(e,t){trcharts_charts_ScatterBase.call(this,e,t);this.style={values:[],width:2,colour:"#3030d0",text:"","font-size":12,tip:"[#x#,#y#] #size#",axis:"left"};var i=Reflect.field(e,"dot-style");trcharts_Object_$helper.merge_2(e,this.style);this.default_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.style.colour,this.style.axis);this.line_width=this.style.width;this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.key=this.style.text;this.font_size=Reflect.field(this.style,"font-size");this.circle_size=Reflect.field(this.style,"dot-size");this.values=this.style.values;this.add_values()};$hxClasses["trcharts.charts.Scatter"]=trcharts_charts_Scatter;trcharts_charts_Scatter.__name__=["trcharts","charts","Scatter"];trcharts_charts_Scatter.__super__=trcharts_charts_ScatterBase;trcharts_charts_Scatter.prototype=$extend(trcharts_charts_ScatterBase.prototype,{__class__:trcharts_charts_Scatter});var trcharts_charts_ScatterLine=function(e,t){this.stepgraph=0;trcharts_charts_ScatterBase.call(this,e,t);this.set_blendMode(7);this.style={values:[],width:2,colour:"#3030d0",text:"","font-size":12,stepgraph:0,axis:"left"};var i=Reflect.field(e,"dot-style");trcharts_Object_$helper.merge_2(e,this.style);this.default_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.style.colour,this.style.axis);this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.line_width=this.style.width;this.colour=this.style.colour;this.key=this.style.text;this.font_size=Reflect.field(this.style,"font-size");var s=Reflect.field(this.style,"stepgraph");switch(s){case"horizontal":this.stepgraph=trcharts_charts_ScatterLine.STEP_HORIZONTAL;break;case"vertical":this.stepgraph=trcharts_charts_ScatterLine.STEP_VERTICAL;break}this.values=this.style.values;this.add_values()};$hxClasses["trcharts.charts.ScatterLine"]=trcharts_charts_ScatterLine;trcharts_charts_ScatterLine.__name__=["trcharts","charts","ScatterLine"];trcharts_charts_ScatterLine.__super__=trcharts_charts_ScatterBase;trcharts_charts_ScatterLine.prototype=$extend(trcharts_charts_ScatterBase.prototype,{stepgraph:null,__class__:trcharts_charts_ScatterLine});var trcharts_charts_Shape=function(e,t){trcharts_charts_Base.call(this,t);this.style={points:[],colour:"#808080",alpha:.5};trcharts_Object_$helper.merge_2(e,this.style);this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);var i=e.values;var s=0;while(s>16;var s=(t&65280)>>8;var a=t&255;var r=2;i+=i/r;if(i>255){i=255}s+=s/r;if(s>255){s=255}a+=a/r;if(a>255){a=255}return i<<16|s<<8|a};trcharts_charts_series_bars_Bar3D.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Bar3D.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Bar3D});var trcharts_charts_series_bars_Cylinder=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Cylinder"]=trcharts_charts_series_bars_Cylinder;trcharts_charts_series_bars_Cylinder.__name__=["trcharts","charts","series","bars","Cylinder"];trcharts_charts_series_bars_Cylinder.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Cylinder.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Cylinder});var trcharts_charts_series_bars_CylinderOutline=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.CylinderOutline"]=trcharts_charts_series_bars_CylinderOutline;trcharts_charts_series_bars_CylinderOutline.__name__=["trcharts","charts","series","bars","CylinderOutline"];trcharts_charts_series_bars_CylinderOutline.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_CylinderOutline.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_CylinderOutline});var trcharts_charts_series_bars_Dome=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Dome"]=trcharts_charts_series_bars_Dome;trcharts_charts_series_bars_Dome.__name__=["trcharts","charts","series","bars","Dome"];trcharts_charts_series_bars_Dome.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Dome.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Dome});var trcharts_charts_series_bars_ECandle=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);if(t.has("negative-colour")){this.negative_colour=t.get_colour("negative-colour")}else{this.negative_colour=this.colour}};$hxClasses["trcharts.charts.series.bars.ECandle"]=trcharts_charts_series_bars_ECandle;trcharts_charts_series_bars_ECandle.__name__=["trcharts","charts","series","bars","ECandle"];trcharts_charts_series_bars_ECandle.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_ECandle.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{high:null,low:null,negative_colour:null,parse_value:function(e){trcharts_charts_series_bars_Base.prototype.parse_value.call(this,e);this.high=e.get("high");this.low=e.get("low")},replace_magic_values:function(e){return e},__class__:trcharts_charts_series_bars_ECandle});var trcharts_charts_series_bars_Glass=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Glass"]=trcharts_charts_series_bars_Glass;trcharts_charts_series_bars_Glass.__name__=["trcharts","charts","series","bars","Glass"];trcharts_charts_series_bars_Glass.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Glass.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Glass});var trcharts_charts_series_bars_Horizontal=function(e,t,i){trcharts_charts_series_Element.call(this);this.index=e;this.left=t.left?t.left:0;this.right=t.right?t.right:0;this.colour=t.colour;this.group=i;this.set_visible(true);this.set_alpha(.5);this.tooltip=this.replace_magic_values(t.tip);this.addEventListener("mouseOver",$bind(this,this.mouseOver));this.addEventListener("mouseOut",$bind(this,this.mouseOut))};$hxClasses["trcharts.charts.series.bars.Horizontal"]=trcharts_charts_series_bars_Horizontal;trcharts_charts_series_bars_Horizontal.__name__=["trcharts","charts","series","bars","Horizontal"];trcharts_charts_series_bars_Horizontal.__super__=trcharts_charts_series_Element;trcharts_charts_series_bars_Horizontal.prototype=$extend(trcharts_charts_series_Element.prototype,{right:null,left:null,colour:null,group:null,replace_magic_values:function(e){e=StringTools.replace(e,"#right#",trcharts_NumberUtils.formatNumber(this.right));e=StringTools.replace(e,"#left#",trcharts_NumberUtils.formatNumber(this.left));e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.right-this.left));return e},mouseOver:function(e){motion_Actuate.tween(this,1,{alpha:0})},mouseOut:function(e){motion_Actuate.tween(this,.5,{alpha:.5}).ease(motion_easing_Elastic.get_easeOut())},get_tip_pos:function(){return{x:this.get_x()+this.get_width()-20,y:this.get_y()}},__class__:trcharts_charts_series_bars_Horizontal});var trcharts_charts_series_bars_Outline=function(e,t,i){this.outline=0;trcharts_charts_series_bars_Base.call(this,e,t,i);this.outline=t.get_colour("outline-colour")};$hxClasses["trcharts.charts.series.bars.Outline"]=trcharts_charts_series_bars_Outline;trcharts_charts_series_bars_Outline.__name__=["trcharts","charts","series","bars","Outline"];trcharts_charts_series_bars_Outline.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Outline.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{outline:null,__class__:trcharts_charts_series_bars_Outline});var trcharts_charts_series_bars_Plastic=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Plastic"]=trcharts_charts_series_bars_Plastic;trcharts_charts_series_bars_Plastic.__name__=["trcharts","charts","series","bars","Plastic"];trcharts_charts_series_bars_Plastic.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Plastic.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Plastic});var trcharts_charts_series_bars_PlasticFlat=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.PlasticFlat"]=trcharts_charts_series_bars_PlasticFlat;trcharts_charts_series_bars_PlasticFlat.__name__=["trcharts","charts","series","bars","PlasticFlat"];trcharts_charts_series_bars_PlasticFlat.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_PlasticFlat.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_PlasticFlat});var trcharts_charts_series_bars_Round=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Round"]=trcharts_charts_series_bars_Round;trcharts_charts_series_bars_Round.__name__=["trcharts","charts","series","bars","Round"];trcharts_charts_series_bars_Round.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Round.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Round});var trcharts_charts_series_bars_Round3D=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Round3D"]=trcharts_charts_series_bars_Round3D;trcharts_charts_series_bars_Round3D.__name__=["trcharts","charts","series","bars","Round3D"];trcharts_charts_series_bars_Round3D.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Round3D.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Round3D});var trcharts_charts_series_bars_RoundGlass=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.RoundGlass"]=trcharts_charts_series_bars_RoundGlass;trcharts_charts_series_bars_RoundGlass.__name__=["trcharts","charts","series","bars","RoundGlass"];trcharts_charts_series_bars_RoundGlass.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_RoundGlass.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_RoundGlass});var trcharts_charts_series_bars_Sketch=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);this.outline=t.get_colour("outline-colour");this.offset=t.get("offset")};$hxClasses["trcharts.charts.series.bars.Sketch"]=trcharts_charts_series_bars_Sketch;trcharts_charts_series_bars_Sketch.__name__=["trcharts","charts","series","bars","Sketch"];trcharts_charts_series_bars_Sketch.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Sketch.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{outline:null,offset:null,__class__:trcharts_charts_series_bars_Sketch});var trcharts_charts_series_bars_Stack=function(e,t,i){this.total=t.get("total");trcharts_charts_series_bars_Base.call(this,e,t,i)};$hxClasses["trcharts.charts.series.bars.Stack"]=trcharts_charts_series_bars_Stack;trcharts_charts_series_bars_Stack.__name__=["trcharts","charts","series","bars","Stack"];trcharts_charts_series_bars_Stack.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Stack.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{total:null,replace_magic_values:function(e){e=trcharts_charts_series_bars_Base.prototype.replace_magic_values.call(this,e);e=StringTools.replace(e,"#total#",trcharts_NumberUtils.formatNumber(this.total));return e},__class__:trcharts_charts_series_bars_Stack});var trcharts_charts_series_bars_StackCollection=function(e,t,i){trcharts_charts_series_Element.call(this);this.tooltip=t.get("tip");this.index=e;var s;this.vals=js_Boot.__cast(t.get("values"),Array);this.total=0;var a=0;var r=this.vals;while(a0){var a=t.get("halo-size")+this.radius;var r=new openfl_display_Sprite;r.get_graphics().lineStyle(0,0,0);r.get_graphics().beginFill(0,1);this.drawAnchor(r.get_graphics(),a,t.get("sides"),this.get_rotation());r.set_blendMode(4);r.get_graphics().endFill();this.line_mask=r}};$hxClasses["trcharts.charts.series.dots.Anchor"]=trcharts_charts_series_dots_Anchor;trcharts_charts_series_dots_Anchor.__name__=["trcharts","charts","series","dots","Anchor"];trcharts_charts_series_dots_Anchor.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Anchor.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{drawAnchor:function(e,t,i,s){if(i<3){i=3}if(i>360){i=360}var a=360/i;var r=0;while(r<=i){var n=-90+s+r%i*a;var _=this.calcXOnCircle(t,n);var o=this.calcYOnCircle(t,n);if(r==0){e.moveTo(_,o)}else{e.lineTo(_,o)}++r}},__class__:trcharts_charts_series_dots_Anchor});var trcharts_charts_series_dots_Bow=function(e,t){var i=trcharts_string_Utils.get_colour(t.get("colour"));trcharts_charts_series_dots_PointDotBase.call(this,e,t);this.tooltip=this.replace_magic_values(t.get("tip"));this.attach_events();var s;if(t.get("hollow")){if(t.get("background-colour")!=null){s=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{s=i}this.get_graphics().beginFill(s,t.get("background-alpha"))}else{this.get_graphics().beginFill(i,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),i,t.get("alpha"));this.draw(this.get_graphics(),this.radius,t.get("rotation"));if(t.get("halo-size")>0){var a=new openfl_display_Sprite;a.get_graphics().lineStyle(0,0,0);a.get_graphics().beginFill(0,1);this.draw(a.get_graphics(),t.get("halo-size")+this.radius,t.get("rotation"));a.set_blendMode(4);a.get_graphics().endFill();this.line_mask=a}};$hxClasses["trcharts.charts.series.dots.Bow"]=trcharts_charts_series_dots_Bow;trcharts_charts_series_dots_Bow.__name__=["trcharts","charts","series","dots","Bow"];trcharts_charts_series_dots_Bow.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Bow.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{draw:function(e,t,i){var s=60;e.moveTo(0,0);var a=-90+i+s;var r=this.calcXOnCircle(t,a);var n=this.calcYOnCircle(t,a);e.lineTo(r,n);a+=s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);e.lineTo(r,n);a=-90+i-s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);a-=s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);e.lineTo(r,n)},__class__:trcharts_charts_series_dots_Bow});var trcharts_charts_series_dots_DefaultDotProperties=function(e,t,i){var s=new trcharts_Properties({axis:i,type:"dot","dot-size":5,"halo-size":2,colour:t,tip:"#val#",alpha:1,rotation:0,sides:3,width:1});trcharts_Properties.call(this,e,s)};$hxClasses["trcharts.charts.series.dots.DefaultDotProperties"]=trcharts_charts_series_dots_DefaultDotProperties;trcharts_charts_series_dots_DefaultDotProperties.__name__=["trcharts","charts","series","dots","DefaultDotProperties"];trcharts_charts_series_dots_DefaultDotProperties.__super__=trcharts_Properties;trcharts_charts_series_dots_DefaultDotProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_charts_series_dots_DefaultDotProperties});var trcharts_charts_series_dots_Dot_$factory=function(){};$hxClasses["trcharts.charts.series.dots.Dot_factory"]=trcharts_charts_series_dots_Dot_$factory;trcharts_charts_series_dots_Dot_$factory.__name__=["trcharts","charts","series","dots","Dot_factory"];trcharts_charts_series_dots_Dot_$factory.make=function(e,t){var i=t.get("type");switch(i){case"anchor":return new trcharts_charts_series_dots_Anchor(e,t);case"bow":return new trcharts_charts_series_dots_Bow(e,t);case"dot":return new trcharts_charts_series_dots_Point(e,t);case"hollow-dot":return new trcharts_charts_series_dots_Hollow(e,t);case"solid-dot":return new trcharts_charts_series_dots_PointDot(e,t);case"star":return new trcharts_charts_series_dots_Star(e,t);default:return new trcharts_charts_series_dots_Point(e,t)}};var trcharts_charts_series_dots_Hollow=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().drawCircle(0,0,t.get("dot-size")-t.get("width"));this.get_graphics().endFill();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(0,0);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().endFill();var s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);this.line_mask=s;this.attach_events()};$hxClasses["trcharts.charts.series.dots.Hollow"]=trcharts_charts_series_dots_Hollow;trcharts_charts_series_dots_Hollow.__name__=["trcharts","charts","series","dots","Hollow"];trcharts_charts_series_dots_Hollow.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Hollow.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{__class__:trcharts_charts_series_dots_Hollow});var trcharts_charts_series_dots_Point=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.set_visible(false);this.attach_events();var s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);s.set_visible(false);this.line_mask=s};$hxClasses["trcharts.charts.series.dots.Point"]=trcharts_charts_series_dots_Point;trcharts_charts_series_dots_Point.__name__=["trcharts","charts","series","dots","Point"];trcharts_charts_series_dots_Point.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Point.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{__class__:trcharts_charts_series_dots_Point});var trcharts_charts_series_dots_PointDot=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().endFill();var s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);this.line_mask=s;this.attach_events()};$hxClasses["trcharts.charts.series.dots.PointDot"]=trcharts_charts_series_dots_PointDot;trcharts_charts_series_dots_PointDot.__name__=["trcharts","charts","series","dots","PointDot"];trcharts_charts_series_dots_PointDot.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_PointDot.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{__class__:trcharts_charts_series_dots_PointDot});var trcharts_charts_series_dots_Star=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var i=trcharts_string_Utils.get_colour(t.get("colour"));this.tooltip=this.replace_magic_values(t.get("tip"));this.attach_events();if(t.get("hollow")){var s;if(t.has("background-colour")){s=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{s=i}this.get_graphics().beginFill(s,t.get("background-alpha"))}else{this.get_graphics().beginFill(i,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),i,t.get("alpha"));this.drawStar_2(this.get_graphics(),this.radius,t.get("rotation"));if(t.get("halo-size")>0){var a=new openfl_display_Sprite;a.get_graphics().lineStyle(0,0,0);a.get_graphics().beginFill(0,1);this.drawStar_2(a.get_graphics(),t.get("halo-size")+this.radius,t.get("rotation"));a.set_blendMode(4);a.get_graphics().endFill();this.line_mask=a}};$hxClasses["trcharts.charts.series.dots.Star"]=trcharts_charts_series_dots_Star;trcharts_charts_series_dots_Star.__name__=["trcharts","charts","series","dots","Star"];trcharts_charts_series_dots_Star.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Star.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{drawStar_2:function(e,t,i){var s=36;var a=-90+i;var r=0;while(r<11){var n=r++;var _=n%2==0?t:t/2;var o=this.calcXOnCircle(_,a);var l=this.calcYOnCircle(_,a);if(n==0){e.moveTo(o,l)}else{e.lineTo(o,l)}a+=s}},__class__:trcharts_charts_series_dots_Star});var trcharts_charts_series_pies_DefaultPieProperties=function(e){var t=new trcharts_Properties({alpha:.5,"start-angle":90,"label-colour":null,"font-size":10,"gradient-fill":false,stroke:1,colours:["#900000","#009000"],animate:[{type:"fade-in"}],tip:"#val# of #total#","no-labels":false,"on-click":null});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.charts.series.pies.DefaultPieProperties"]=trcharts_charts_series_pies_DefaultPieProperties;trcharts_charts_series_pies_DefaultPieProperties.__name__=["trcharts","charts","series","pies","DefaultPieProperties"];trcharts_charts_series_pies_DefaultPieProperties.__super__=trcharts_Properties;trcharts_charts_series_pies_DefaultPieProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_charts_series_pies_DefaultPieProperties});var trcharts_charts_series_pies_PieLabel=function(e){openfl_text_TextField.call(this);this.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(e.label));var t=new openfl_text_TextFormat;t.color=trcharts_string_Utils.get_colour(Reflect.field(e,"colour"));t.font="Verdana";t.size=Reflect.field(e,"font-size");this.setTextFormat(t);this.set_autoSize(1);this.mouseEnabled=false;this.set_selectable(false)};$hxClasses["trcharts.charts.series.pies.PieLabel"]=trcharts_charts_series_pies_PieLabel;trcharts_charts_series_pies_PieLabel.__name__=["trcharts","charts","series","pies","PieLabel"];trcharts_charts_series_pies_PieLabel.__interfaces__=[trcharts_charts_series_Has_$tooltip];trcharts_charts_series_pies_PieLabel.__super__=openfl_text_TextField;trcharts_charts_series_pies_PieLabel.prototype=$extend(openfl_text_TextField.prototype,{get_tooltip:function(){return js_Boot.__cast(this.parent,trcharts_charts_series_Has_$tooltip).get_tooltip()},get_tip_pos:function(){return js_Boot.__cast(this.parent,trcharts_charts_series_Has_$tooltip).get_tip_pos()},__class__:trcharts_charts_series_pies_PieLabel});var trcharts_charts_series_pies_PieSlice=function(e,t){trcharts_charts_series_Element.call(this);this.colour=t.get_colour("colour");this.slice_angle=t.get("angle");this.border_width=1;this.angle=t.get("start");this.animate=t.get("animate");this.nolabels=t.get("no-labels");this.value=t.get("value");this.gradientFill=t.get("gradient-fill");this.index=e;this.rawToolTip=t.get("tip");this.label=this.replace_magic_values(t.get("label"));this.tooltip=this.replace_magic_values(t.get("tip"));if(t.has("on-click")){this.set_on_click(t.get("on-click"))}this.finished_animating=false};$hxClasses["trcharts.charts.series.pies.PieSlice"]=trcharts_charts_series_pies_PieSlice;trcharts_charts_series_pies_PieSlice.__name__=["trcharts","charts","series","pies","PieSlice"];trcharts_charts_series_pies_PieSlice.__super__=trcharts_charts_series_Element;trcharts_charts_series_pies_PieSlice.prototype=$extend(trcharts_charts_series_Element.prototype,{colour:null,slice_angle:null,border_width:null,angle:null,nolabels:null,animate:null,finished_animating:null,value:null,gradientFill:null,label:null,pieRadius:null,rawToolTip:null,get_tip_pos:function(){var e=this.localToGlobal(new openfl_geom_Point(this.get_mouseX(),this.get_mouseY()));return{x:e.x,y:e.y}},replace_magic_values:function(e){e=StringTools.replace(e,"#label#",this.label);e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.value));e=StringTools.replace(e,"#radius#",trcharts_NumberUtils.formatNumber(this.pieRadius));return e},get_tooltip:function(){this.tooltip=this.replace_magic_values(this.rawToolTip);return this.tooltip},__class__:trcharts_charts_series_pies_PieSlice});var trcharts_charts_series_pies_PieSliceContainer=function(e,t){this.animationOffset=30;trcharts_charts_series_Element.call(this);this.pieSlice=new trcharts_charts_series_pies_PieSlice(e,t);this.addChild(this.pieSlice);var i=t.get("label");this.set_alpha(this.original_alpha=t.get("alpha"));if(!t.has("label-colour")){t.set("label-colour",t.get("colour"))}var s=t.get("no-labels")?"":t.get("label");this.pieLabel=new trcharts_charts_series_pies_PieLabel({label:s,colour:t.get("label-colour"),"font-size":t.get("font-size"),"on-click":t.get("on-click")});this.addChild(this.pieLabel);this.attach_events__(t);this.animating=false};$hxClasses["trcharts.charts.series.pies.PieSliceContainer"]=trcharts_charts_series_pies_PieSliceContainer;trcharts_charts_series_pies_PieSliceContainer.__name__=["trcharts","charts","series","pies","PieSliceContainer"];trcharts_charts_series_pies_PieSliceContainer.__super__=trcharts_charts_series_Element;trcharts_charts_series_pies_PieSliceContainer.prototype=$extend(trcharts_charts_series_Element.prototype,{animating:null,pieSlice:null,pieLabel:null,animationOffset:null,saveX:null,saveY:null,moveToX:null,moveToY:null,original_alpha:null,get_tooltip:function(){return this.pieSlice.get_tooltip()},get_tip_pos:function(){var e=this.localToGlobal(new openfl_geom_Point(this.get_mouseX(),this.get_mouseY()));return{x:e.x,y:e.y}},attach_events__:function(e){var t=e.get("animate");if(!(t instanceof Array&&t.__enum__==null)){if(t==null||t){t=[{type:"bounce",distance:5}]}else{t=[]}}var i=js_Boot.__cast(t,Array);this.addEventListener("mouseOver",$bind(this,this.mouseOver_first),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut_first),false,0,true);var s=0;while(s90){this.yAdj=-r}if(e>180){this.yAdj=-r-n}if(e>270){this.yAdj=-n}this.set_rotation(e);var _=this.getBounds(i);this.leftOverhang=Math.abs(_.x+this.xAdj);this.rightOverhang=Math.abs(_.x+_.width+this.xAdj)},__class__:trcharts_elements_axis_AxisLabel});var trcharts_elements_axis_RadarAxis=function(e){openfl_display_Sprite.call(this);this.style={stroke:2,colour:"#784016","grid-colour":"#F5E1AA",min:0,max:null,steps:1};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(this.style,"grid-colour"));this.labels=new trcharts_elements_axis_RadarAxisLabels(e.labels);this.addChild(this.labels);this.spoke_labels=new trcharts_elements_axis_RadarSpokeLabels(Reflect.field(e,"spoke-labels"));this.addChild(this.spoke_labels)};$hxClasses["trcharts.elements.axis.RadarAxis"]=trcharts_elements_axis_RadarAxis;trcharts_elements_axis_RadarAxis.__name__=["trcharts","elements","axis","RadarAxis"];trcharts_elements_axis_RadarAxis.__super__=openfl_display_Sprite;trcharts_elements_axis_RadarAxis.prototype=$extend(openfl_display_Sprite.prototype,{style:null,colour:null,grid_colour:null,labels:null,spoke_labels:null,get_range:function(){return new trcharts_Range(this.style.min,this.style.max,this.style.steps,false)},resize:function(e){this.set_x(0);this.set_y(0);this.get_graphics().clear();this.spoke_labels.resize(e);var t=e.get_angles();this.draw_grid(e,t);this.draw_axis(e,t);this.labels.resize(e)},draw_axis:function(e,t){this.get_graphics().lineStyle(this.style.stroke,this.colour,1,true);var i=0;while(i0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarAxis});var trcharts_elements_axis_RadarAxisLabels=function(e){openfl_display_Sprite.call(this);this.style={colour:"#784016",steps:1};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.labels=[];var t;var i=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var s=this.style.labels;var a=0;while(a0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarAxisLabels});var trcharts_elements_axis_RadarSpokeLabels=function(e){openfl_display_Sprite.call(this);this.style={colour:"#784016"};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.labels=[];var t;var i=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var s=this.style.labels;var a=0;while(a");var a=s.join("\n");t.set_text(a);t.set_selectable(false);var r=new openfl_text_TextFormat;r.color=e.colour;r.font="Verdana";r.size=e.size;r.align=4;t.setTextFormat(r);t.set_autoSize(1);t.set_visible(true);return t},resize:function(e){var t;var i=0;var s;while(true){s=false;this.resize_2(e);i=0;while(ie.bottom||t.get_x()+t.get_width()>e.right){s=true}++i}e.reduce_radius();if(!(s&&e.get_radius()>10)){break}}},resize_2:function(e){var t;var i;var s=e.get_center_x();t=0;while(ts){i.set_x(a.x)}else{i.set_x(a.x-i.get_width())}if(t==0){i.set_y(a.y-i.get_height());i.set_x(a.x)}else{i.set_y(a.y)}++t}},die:function(){this.style=null;this.labels=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarSpokeLabels});var trcharts_elements_axis_XAxis=function(e,t,i){openfl_display_Sprite.call(this);this.style={stroke:2,"tick-height":3,colour:"#784016",offset:true,"grid-colour":"#F5E1AA","grid-visible":true,"3d":0,steps:1,min:0,max:null};if(e!=null){trcharts_Object_$helper.merge_2(e.x_axis,this.style)}this.calcSteps();this.stroke=this.style.stroke;this.tick_height=Reflect.field(this.style,"tick-height");this.colour=this.style.colour;this.offset=this.style.offset;this.grid_visible=Reflect.field(this.style,"grid-visible");this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(this.style,"grid-colour"));if(Reflect.field(this.style,"3d")>0){this.three_d=true;this.three_d_height=Std.parseInt(Reflect.field(this.style,"3d"))}else{this.three_d=false}if(e){if(e.x_label_style!=null){if(e.x_label_style.alt_axis_step!=null){this.alt_axis_step=e.x_label_style.alt_axis_step}if(e.x_label_style.alt_axis_colour!=null){this.alt_axis_colour=trcharts_string_Utils.get_colour(e.x_label_style.alt_axis_colour)}}}this.labels=new trcharts_elements_axis_XAxisLabels(e);this.addChild(this.labels);if(!this.range_set()){if(this.labels.need_labels){this.set_range(t,i)}else if(this.labels.count()>i){this.set_range(0,this.labels.count())}else{this.set_range(t,i)}}else{this.labels.auto_label(this.get_range(),this.get_steps())}this.make_user_ticks()};$hxClasses["trcharts.elements.axis.XAxis"]=trcharts_elements_axis_XAxis;trcharts_elements_axis_XAxis.__name__=["trcharts","elements","axis","XAxis"];trcharts_elements_axis_XAxis.__super__=openfl_display_Sprite;trcharts_elements_axis_XAxis.prototype=$extend(openfl_display_Sprite.prototype,{steps:null,alt_axis_colour:null,alt_axis_step:null,three_d:null,three_d_height:null,stroke:null,tick_height:null,colour:null,offset:null,grid_colour:null,grid_visible:null,user_ticks:null,user_labels:null,labels:null,style:null,make_user_ticks:function(){if(this.style.labels!=null&&this.style.labels.labels!=null&&(this.style.labels.labels instanceof Array&&this.style.labels.labels.__enum__==null)&&this.style.labels.labels.length>0){this.user_labels=[];var e=this.style.labels.labels;var t=0;while(t=this.style.max;this.steps=this.style.steps!=null&&this.style.steps!=0?this.style.steps:1;if(Math.abs(e)/this.steps>250){this.steps=e/250}this.steps=t?-Math.abs(this.steps):Math.abs(this.steps)}},range_set:function(){return this.style.max!=null},set_range:function(e,t){this.style.min=e;this.style.max=t;this.calcSteps();this.labels.auto_label(this.get_range(),this.get_steps())},get_range:function(){return new trcharts_Range(this.style.min,this.style.max,this.steps,this.offset)},get_steps:function(){return this.steps},resize:function(e,t){this.get_graphics().clear();if(this.user_ticks){var i=0;var s=this.user_labels;while(i=this.style.max;var _=this.style.max;var o=this.style.min;while(n?o>=_:o<=_){if(this.alt_axis_step>1&&o%this.alt_axis_step==0){this.get_graphics().beginFill(this.alt_axis_colour,1)}else{this.get_graphics().beginFill(this.grid_colour,1)}var l=e.get_x_from_val(o);this.get_graphics().drawRect(l,e.top,1,e.height);this.get_graphics().endFill();o+=this.steps}}if(this.three_d){this.three_d_axis(e)}else{this.two_d_axis(e)}this.labels.resize(e,t)},three_d_axis:function(e){var t=this.three_d_height;var i=12;var s=t+i;var a=e.width/this.style.max;this.get_graphics().lineStyle(0,0,0);var r=1;if(this.user_ticks){var n=0;var _=this.user_labels;while(n<_.length){var o=_[n];++n;var l=e.get_x_from_val(o.x);this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(l,e.bottom+s,r,this.tick_height);this.get_graphics().endFill()}}else{var h=0;while(h0)this.removeChildAt(0);if(this.labels!=null){this.labels.die()}this.labels=null},__class__:trcharts_elements_axis_XAxis});var trcharts_elements_axis_XAxisLabels=function(e){openfl_display_Sprite.call(this);this.need_labels=true;this.style={rotate:0,visible:null,labels:null,text:"#val#",steps:null,size:10,align:"auto",colour:"#000000","visible-steps":null};this.axis_labels=[];if(e.x_axis!=null&&e.x_axis.labels!=null){trcharts_Object_$helper.merge_2(e.x_axis.labels,this.style)}this.userSpecifiedVisible=this.style.visible;if(this.style.visible==null){this.style.visible=true}if(typeof this.style.rotate=="string"){if(this.style.rotate=="vertical"){this.style.rotate=270}else if(this.style.rotate=="diagonal"){this.style.rotate=-45}}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){this.need_labels=false;if(this.style.steps==null){this.style.steps=1}var t=0;var i=0;var s=Reflect.field(this.style,"visible-steps")==null?this.style.steps:Reflect.field(this.style,"visible-steps");var a=this.style.labels;var r=0;while(r=e.max;var s=1;if(this.style.steps!=null){s=this.style.steps}if(Math.abs(e.count()/s)>250){s=e.count()/250}if(i){s=-Math.abs(s)}else{s=Math.abs(s)}var a=Reflect.field(this.style,"visible-steps")==null?t:Reflect.field(this.style,"visible-steps");var r={};trcharts_Object_$helper.merge_2(this.style,r);var n=0;var _=e.min;while(i?_>=e.max:_<=e.max){r.x=_;if(this.userSpecifiedVisible==null){r.visible=n%a==0;++n}else{r.visible=this.userSpecifiedVisible}this.add(null,r);_+=s}}},add:function(e,t){var i={colour:t.colour,text:t.text,rotate:t.rotate,size:t.size,align:t.align,visible:t.visible,x:t.x};if(typeof e=="string"){i.text=js_Boot.__cast(e,String)}else{trcharts_Object_$helper.merge_2(e,i)}if(i.x!=null){i.text=this.replace_magic_values(i.text,i.x)}var s=Reflect.field(i,"text");var a=s.split("
");s+="\n";i["text"]=s;this.axis_labels[i.x]=i.text;if(i.visible){if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}var r=this.make_label(i);this.addChild(r)}},make_label:function(e){var t=new trcharts_elements_axis_AxisLabel;t.set_x(0);t.set_y(0);t.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(e.text));t.set_selectable(false);var i=new openfl_text_TextFormat;i.color=e.colour;if(e.rotate!=0){i.font="spArial";t.set_embedFonts(true)}else{i.font="Verdana"}i.size=e.size;i.align=3;t.setTextFormat(i);t.set_autoSize(1);t.rotate_and_align(e.rotate,e.align,this);t.set_visible(e.visible);if(e.x!=null){t.xVal=e.x}return t},count:function(){return this.axis_labels.length-1},get_height:function(){var e=0;var t=0;while(t0){return(new trcharts_elements_axis_AxisLabel).rightOverhang*2}else{return 0}},first_label_width:function(){if(this.get_numChildren()>0){this.getChildAt(0);return(new trcharts_elements_axis_AxisLabel).leftOverhang*2}else{return 0}},die:function(){this.axis_labels=null;this.style=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},replace_magic_values:function(e,t){e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(t));e=trcharts_string_DateUtils.replace_magic_values(e,t);return e},__class__:trcharts_elements_axis_XAxisLabels});var trcharts_elements_axis_YAxisBase=function(){openfl_display_Sprite.call(this)};$hxClasses["trcharts.elements.axis.YAxisBase"]=trcharts_elements_axis_YAxisBase;trcharts_elements_axis_YAxisBase.__name__=["trcharts","elements","axis","YAxisBase"];trcharts_elements_axis_YAxisBase.__super__=openfl_display_Sprite;trcharts_elements_axis_YAxisBase.prototype=$extend(openfl_display_Sprite.prototype,{stroke:null,tick_length:null,colour:null,grid_colour:null,style:null,labels:null,user_labels:null,user_ticks:null,init:function(e){},_init:function(e,t,i){this.style=i;if(Reflect.field(e,t)){trcharts_Object_$helper.merge_2(Reflect.field(e,t),this.style)}this.colour=trcharts_string_Utils.get_colour(i.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(i,"grid-colour"));this.stroke=i.stroke;this.tick_length=Reflect.field(i,"tick-length");if(this.style.max==null){this.style.max=this.labels.y_max}var s=Math.min(this.style.min,this.style.max);var a=Math.max(this.style.min,this.style.max);this.style.steps=this.get_steps(s,a,this.stage.stageHeight);if(this.labels.i_need_labels){this.labels.make_labels(s,a,this.style.steps)}if(this.style.labels!=null&&this.style.labels.labels!=null&&(this.style.labels.labels instanceof Array&&this.style.labels.labels.__enum__==null)&&this.style.labels.labels.length>0){this.user_labels=[];var r=this.style.labels.labels;var n=0;while(n0)this.removeChildAt(0)},get_steps:function(e,t,i){if(this.style.steps==0){this.style.steps=1}if(this.style.steps<0){this.style.steps*=-1}var s=(t-e)/this.style.steps;if(s>i/2){return(t-e)/5}return this.style.steps},resize:function(e,t){},resize_helper:function(e,t,i){var s=0;var a;var r;var n;var _=Math.min(this.style.min,this.style.max);var o=Math.max(this.style.min,this.style.max);if(!i){this.labels.resize(e,t)}else{this.labels.resize(t.right+this.stroke+this.tick_length,t)}if(!this.style.visible){return}this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);if(Reflect.field(this.style,"grid-visible")){this.draw_grid_lines(this.style.steps,_,o,i,t)}var l;if(!i){l=t.left-this.stroke}else{l=t.right}this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(l|0,t.top,this.stroke,t.height);this.get_graphics().endFill();var h;if(this.user_ticks){var c=0;var u=this.user_labels;while(c250){break}l+=s}this.add_labels(r)},make_label:function(e){e.colour=trcharts_string_Utils.get_colour(e.colour);var t=new trcharts_elements_axis_YTextField;t.set_text(this.replace_magic_values(e.val,e.pos));t.set_selectable(false);var i=new openfl_text_TextFormat;i.color=e.colour;i.font=e.rotate=="vertical"?"spArial":"Verdana";i.size=e.size;t.setTextFormat(i);t.set_autoSize(3);if(e.rotate=="vertical"){t.set_rotation(270);t.set_embedFonts(true);t.set_antiAliasType(0)}return t},resize:function(e,t){},get_width:function(){var e=0;var t=0;while(t0)this.removeChildAt(0)},replace_magic_values:function(e,t){e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(t));return e},__class__:trcharts_elements_axis_YAxisLabelsBase});var trcharts_elements_axis_YAxisLabelsLeft=function(e){trcharts_elements_axis_YAxisLabelsBase.call(this,e,"y_axis");this.lblText="#val#";this.i_need_labels=true};$hxClasses["trcharts.elements.axis.YAxisLabelsLeft"]=trcharts_elements_axis_YAxisLabelsLeft;trcharts_elements_axis_YAxisLabelsLeft.__name__=["trcharts","elements","axis","YAxisLabelsLeft"];trcharts_elements_axis_YAxisLabelsLeft.__super__=trcharts_elements_axis_YAxisLabelsBase;trcharts_elements_axis_YAxisLabelsLeft.prototype=$extend(trcharts_elements_axis_YAxisLabelsBase.prototype,{resize:function(e,t){var i=this.get_width();var s;var a;s=0;while(s-1){this.style.show_labels=false}}else{a=Reflect.field(e,t+"_label_style").split(",");if(a.length>0){this.style.size=a[0]}if(a.length>1){this.style.colour=trcharts_string_Utils.get_colour(a[1])}}};$hxClasses["trcharts.elements.axis.YLabelStyle"]=trcharts_elements_axis_YLabelStyle;trcharts_elements_axis_YLabelStyle.__name__=["trcharts","elements","axis","YLabelStyle"];trcharts_elements_axis_YLabelStyle.prototype={style:null,__class__:trcharts_elements_axis_YLabelStyle};var trcharts_elements_axis_YTextField=function(){openfl_text_TextField.call(this);this.y_val=0};$hxClasses["trcharts.elements.axis.YTextField"]=trcharts_elements_axis_YTextField;trcharts_elements_axis_YTextField.__name__=["trcharts","elements","axis","YTextField"];trcharts_elements_axis_YTextField.__super__=openfl_text_TextField;trcharts_elements_axis_YTextField.prototype=$extend(openfl_text_TextField.prototype,{y_val:null,__class__:trcharts_elements_axis_YTextField});var trcharts_elements_labels_BaseLabel=function(e){openfl_display_Sprite.call(this);this._trcharts=e};$hxClasses["trcharts.elements.labels.BaseLabel"]=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_BaseLabel.__name__=["trcharts","elements","labels","BaseLabel"];trcharts_elements_labels_BaseLabel.__super__=openfl_display_Sprite;trcharts_elements_labels_BaseLabel.prototype=$extend(openfl_display_Sprite.prototype,{text:null,css:null,style:null,_trcharts:null,build:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);this.text=e;t.set_selectable(false);t.set_htmlText(this.text);var i=new openfl_text_TextFormat;i.color=this.css.color;i.font="Verdana";i.bold=this.css.font_weight=="bold";i.size=this.css.font_size|0;t.setTextFormat(i);t.set_autoSize(1);t.set_y(this.css.padding_top+this.css.margin_top);t.set_x(this.css.padding_left+this.css.margin_left);if(this.css.background_colour_set){this.get_graphics().beginFill(this.css.background_colour,1);this.get_graphics().drawRect(0,0,this.css.padding_left+t.get_width()+this.css.padding_right,this.css.padding_top+t.get_height()+this.css.padding_bottom);this.get_graphics().endFill()}this.addChild(t)},get_width:function(){return this.getChildAt(0).get_width()},die:function(){this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_BaseLabel});var trcharts_elements_labels_Keys=function(e){this.count=0;this._height=0;openfl_display_Sprite.call(this);this.colours=[];var t=0;var i=0;var s=e.sets;while(ithis.stage.stageWidth){s=0;a+=this.getChildAt(r).get_height();i+=this.getChildAt(r).get_height()}this.draw_line(s,a,this.getChildAt(r).get_height(),this.colours[r]);s+=12;this.getChildAt(r).set_x(s);this.getChildAt(r).set_y(a);s+=n+10;++r}i+=this.getChildAt(0).get_height();this._height=i},get_height:function(){return this._height},die:function(){this.colours=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_Keys});var trcharts_elements_labels_Title=function(e,t){trcharts_elements_labels_BaseLabel.call(this,t);if(!e){return}this.style="font-size: 12px";trcharts_Object_$helper.merge_2(e,this);this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.Title"]=trcharts_elements_labels_Title;trcharts_elements_labels_Title.__name__=["trcharts","elements","labels","Title"];trcharts_elements_labels_Title.__super__=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_Title.prototype=$extend(trcharts_elements_labels_BaseLabel.prototype,{resize:function(){if(this.text==null){return}this.getChildAt(0).set_width(this._trcharts.get_realWidth());var e=this.css.text_align;switch(e){case"center":break;case"left":this.set_x(this.css.margin_left);break;case"right":this.set_x(this._trcharts.get_realWidth()-(this.get_width()+this.css.margin_right));break;default:this.set_x(this._trcharts.get_realWidth()/2-this.get_width()/2)}this.set_y(this.css.margin_top)},get_height:function(){if(this.text==null){return 0}else{return this.css.padding_top+this.css.margin_top+this.getChildAt(0).get_height()+this.css.padding_bottom+this.css.margin_bottom}},__class__:trcharts_elements_labels_Title});var trcharts_elements_labels_XLegend=function(e,t){trcharts_elements_labels_BaseLabel.call(this,t);if(!e){return}trcharts_Object_$helper.merge_2(e,this);this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.XLegend"]=trcharts_elements_labels_XLegend;trcharts_elements_labels_XLegend.__name__=["trcharts","elements","labels","XLegend"];trcharts_elements_labels_XLegend.__super__=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_XLegend.prototype=$extend(trcharts_elements_labels_BaseLabel.prototype,{resize:function(e){if(this.text==null){return}this.set_x(e.left+(e.width/2-this.get_width()/2));this.getChildAt(0).set_y(0)},get_height:function(){return 0},__class__:trcharts_elements_labels_XLegend});var trcharts_elements_labels_YLegendBase=function(e,t){openfl_display_Sprite.call(this);if(Reflect.field(e,t+"_legend")==null){return}if(Reflect.field(e,t+"_legend")){trcharts_Object_$helper.merge_2(Reflect.field(e,t+"_legend"),this)}this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.YLegendBase"]=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendBase.__name__=["trcharts","elements","labels","YLegendBase"];trcharts_elements_labels_YLegendBase.__super__=openfl_display_Sprite;trcharts_elements_labels_YLegendBase.prototype=$extend(openfl_display_Sprite.prototype,{text:null,style:null,css:null,build:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);t.set_selectable(false);var i=new openfl_text_TextFormat;i.color=this.css.color;i.font="spArial";i.size=this.css.font_size|0;i.align=0;t.set_htmlText(e);t.setTextFormat(i);t.set_autoSize(1);t.set_embedFonts(true);t.set_rotation(270);t.set_height(t.get_textHeight());t.set_antiAliasType(0);t.set_autoSize(1);this.addChild(t)},resize:function(){if(this.text==null){return}},get_width:function(){if(this.get_numChildren()==0){return 0}else{return this.getChildAt(0).get_width()}},die:function(){while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_YLegendBase});var trcharts_elements_labels_YLegendLeft=function(e){trcharts_elements_labels_YLegendBase.call(this,e,"y")};$hxClasses["trcharts.elements.labels.YLegendLeft"]=trcharts_elements_labels_YLegendLeft;trcharts_elements_labels_YLegendLeft.__name__=["trcharts","elements","labels","YLegendLeft"];trcharts_elements_labels_YLegendLeft.__super__=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendLeft.prototype=$extend(trcharts_elements_labels_YLegendBase.prototype,{resize:function(){if(this.get_numChildren()==0){return}this.set_y(this.stage.stageHeight/2+this.getChildAt(0).get_height()/2);this.set_x(0)},__class__:trcharts_elements_labels_YLegendLeft});var trcharts_elements_labels_YLegendRight=function(e){trcharts_elements_labels_YLegendBase.call(this,e,"y2")};$hxClasses["trcharts.elements.labels.YLegendRight"]=trcharts_elements_labels_YLegendRight;trcharts_elements_labels_YLegendRight.__name__=["trcharts","elements","labels","YLegendRight"];trcharts_elements_labels_YLegendRight.__super__=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendRight.prototype=$extend(trcharts_elements_labels_YLegendBase.prototype,{resize:function(){if(this.get_numChildren()==0){return}this.set_y(this.stage.stageHeight/2+this.getChildAt(0).get_height()/2);this.set_x(this.stage.stageWidth-this.getChildAt(0).get_width())},__class__:trcharts_elements_labels_YLegendRight});var trcharts_elements_menu_MenuItem=function(e,t){openfl_display_Sprite.call(this);this.props=t;this.set_buttonMode(true);this.useHandCursor=true;this.chartId=e;this.set_alpha(.5);var i=this.add_elements();this.draw_bg(i+10);this.addEventListener("click",$bind(this,this.mouseClickHandler));this.addEventListener("mouseDown",$bind(this,this.mouseDownHandler));this.addEventListener("mouseOver",$bind(this,this.mouseOverHandler));this.addEventListener("mouseOut",$bind(this,this.mouseOutHandler))};$hxClasses["trcharts.elements.menu.MenuItem"]=trcharts_elements_menu_MenuItem;trcharts_elements_menu_MenuItem.__name__=["trcharts","elements","menu","MenuItem"];trcharts_elements_menu_MenuItem.__super__=openfl_display_Sprite;trcharts_elements_menu_MenuItem.prototype=$extend(openfl_display_Sprite.prototype,{chartId:null,props:null,add_elements:function(){var e=this.add_text(this.props.get("text"),5);return e},draw_bg:function(e){this.get_graphics().beginFill(trcharts_string_Utils.get_colour(this.props.get("background-colour")));this.get_graphics().drawRoundRect(0,0,e,20,5,5);this.get_graphics().endFill()},add_text:function(e,t){var i=new openfl_text_TextField;i.set_x(t);i.set_y(0);i.set_selectable(false);i.set_htmlText(e);var s=new openfl_text_TextFormat;s.color=trcharts_string_Utils.get_colour(this.props.get("text-colour"));s.font="Verdana";s.size=10;s.underline=true;i.setTextFormat(s);i.set_autoSize(1);i.mouseEnabled=false;i.set_selectable(false);this.addChild(i);return i.get_width()},mouseClickHandler:function(e){this.set_alpha(0);openfl_external_ExternalInterface.call(this.props.get("javascript-function"),this.chartId);this.set_alpha(1)},mouseOverHandler:function(e){this.set_alpha(1);var t=new openfl_filters_GlowFilter;t.set_color(trcharts_string_Utils.get_colour(this.props.get("glow-colour")));t.set_alpha(.8);t.set_blurX(4);t.set_blurY(4);t.set_inner(false);var i=[];i.push(t);this.set_filters(i)},mouseDownHandler:function(e){this.set_alpha(1)},mouseOutHandler:function(e){this.set_alpha(.5);this.set_filters([])},__class__:trcharts_elements_menu_MenuItem});var trcharts_elements_menu_CameraIcon=function(e,t){trcharts_elements_menu_MenuItem.call(this,e,t)};$hxClasses["trcharts.elements.menu.CameraIcon"]=trcharts_elements_menu_CameraIcon;trcharts_elements_menu_CameraIcon.__name__=["trcharts","elements","menu","CameraIcon"];trcharts_elements_menu_CameraIcon.__super__=trcharts_elements_menu_MenuItem;trcharts_elements_menu_CameraIcon.prototype=$extend(trcharts_elements_menu_MenuItem.prototype,{add_elements:function(){this.draw_camera();var e=this.add_text(this.props.get("text"),35);return e+30},draw_camera:function(){var e=new openfl_display_Sprite;e.get_graphics().beginFill(5263440);e.get_graphics().drawRoundRect(2,4,26,14,2,2);e.get_graphics().drawRect(20,1,5,3);e.get_graphics().endFill();e.get_graphics().beginFill(2105376);e.get_graphics().drawCircle(9,11,4.5);e.get_graphics().endFill();this.addChild(e)},__class__:trcharts_elements_menu_CameraIcon});var trcharts_elements_menu_DefaultCameraIconProperties=function(e){var t=new trcharts_Properties({colour:"#0000E0",text:"Save chart","javascript-function":"save_image","background-colour":"#ffffff","glow-colour":"#148DCF","text-colour":"#0000ff"});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.elements.menu.DefaultCameraIconProperties"]=trcharts_elements_menu_DefaultCameraIconProperties;trcharts_elements_menu_DefaultCameraIconProperties.__name__=["trcharts","elements","menu","DefaultCameraIconProperties"];trcharts_elements_menu_DefaultCameraIconProperties.__super__=trcharts_Properties;trcharts_elements_menu_DefaultCameraIconProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_elements_menu_DefaultCameraIconProperties});var trcharts_elements_menu_DefaultMenuProperties=function(e){var t=new trcharts_Properties({colour:"#E0E0E0","outline-colour":"#707070","camera-text":"Save chart"});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.elements.menu.DefaultMenuProperties"]=trcharts_elements_menu_DefaultMenuProperties;trcharts_elements_menu_DefaultMenuProperties.__name__=["trcharts","elements","menu","DefaultMenuProperties"];trcharts_elements_menu_DefaultMenuProperties.__super__=trcharts_Properties;trcharts_elements_menu_DefaultMenuProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_elements_menu_DefaultMenuProperties});var trcharts_elements_menu_Menu=function(e,t){openfl_display_Sprite.call(this);this.props=new trcharts_elements_menu_DefaultMenuProperties(t);this.original_alpha=.4;this.set_alpha(1);var i=5;var s=0;this.first_showing=true;var a=t.values;var r=0;while(r=0){a=e.indexOf("#",s+1)+1;r=HxOverrides.substr(r,6,r.length-7);_=trcharts_string_DateUtils.formatDate(i,n);e=StringTools.replace(e,r,_);s=e.indexOf("#date:")}s=e.indexOf("#gmdate:");while(s>=0){a=e.indexOf("#",s+1)+1;r=HxOverrides.substr(e,s,a-s);n=HxOverrides.substr(r,8,r.length-9);_=trcharts_string_DateUtils.formatUTCDate(i,n);e=StringTools.replace(e,r,_);s=e.indexOf("#gmdate:")}return e};trcharts_string_DateUtils.formatDate=function(e,t){var i="";var s=0;try{while(s12?e.getHours()-12:e.getHours();throw"__break__";break;case"h":break;case"i":i+=(e.getMinutes()<10?"0":"")+e.getMinutes();throw"__break__";break;case"j":i+=e.getDate();break;case"l":i+=trcharts_string_DateUtils.dateConsts.longDays[e.getDay()];break;case"m":i+=(e.getMonth()<9?"0":"")+(e.getMonth()+1);throw"__break__";break;case"n":i+=e.getMonth()+1;throw"__break__";break;case"r":i+=HxOverrides.dateStr(e);throw"__break__";break;case"s":i+=(e.getSeconds()<10?"0":"")+e.getSeconds();throw"__break__";break;case"w":i+=e.getDay();break;case"y":i+=HxOverrides.substr(""+e.getFullYear(),2,null);throw"__break__";break;default:i+=a}++s}}catch(e){if(e!="__break__")throw e}return i};trcharts_string_DateUtils.formatUTCDate=function(e,t){var i="not supper has remove!";return i};var trcharts_string_Utils=function(){};$hxClasses["trcharts.string.Utils"]=trcharts_string_Utils;trcharts_string_Utils.__name__=["trcharts","string","Utils"];trcharts_string_Utils.get_colour=function(e){if(e.length>2){if(HxOverrides.substr(e,0,2)=="0x"){return Std.parseInt(e)}if(HxOverrides.substr(e,0,1)=="#"){return Std.parseInt("0x"+HxOverrides.substr(e,1,e.length))}if(e.length==6){return Std.parseInt("0x"+e)}}if(e.length>0){return Std.parseInt(e)}else{return 0}};var xeditor_objects_XEditoriObject=function(){openfl_display_Sprite.call(this);this._uid=Std.string(xeditor_utils_TRUID.getUID())};$hxClasses["xeditor.objects.XEditoriObject"]=xeditor_objects_XEditoriObject;xeditor_objects_XEditoriObject.__name__=["xeditor","objects","XEditoriObject"];xeditor_objects_XEditoriObject.__super__=openfl_display_Sprite;xeditor_objects_XEditoriObject.prototype=$extend(openfl_display_Sprite.prototype,{_uid:null,set_uid:function(e){this._uid=e;return e},get_uid:function(){return this._uid},__class__:xeditor_objects_XEditoriObject,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{set_uid:"set_uid",get_uid:"get_uid"})});var xeditor_objects_TrObject=function(e,t){this.mySound=window.document.createElement("audio");this._actionType=null;xeditor_objects_XEditoriObject.call(this);this._realWidth=e;this._realHeight=t};$hxClasses["xeditor.objects.TrObject"]=xeditor_objects_TrObject;xeditor_objects_TrObject.__name__=["xeditor","objects","TrObject"];xeditor_objects_TrObject.__super__=xeditor_objects_XEditoriObject;xeditor_objects_TrObject.prototype=$extend(xeditor_objects_XEditoriObject.prototype,{_container:null,_realWidth:null,_realHeight:null,_actionType:null,mySound:null,get_realWidth:function(){return this._realWidth},set_realWidth:function(e){this._realWidth=e;this.render();return this._realWidth},get_realHeight:function(){return this._realHeight},set_realHeight:function(e){this._realHeight=e;this.render();return this._realHeight},render:function(){},set_actionType:function(e){if(this._actionType!=null){var t=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(t,"linkurl")){this.removeEventListener("click",$bind(this,this.invoketype_MouseClick))}else{var i=this._actionType.get_invoketype();switch(i){case"mouseDown":this.removeEventListener("mouseDown",$bind(this,this.invoketype_MouseClick));break;case"mouseOut":this.removeEventListener("rollOut",$bind(this,this.invoketype_MouseOut));break;case"mouseOver":this.removeEventListener("rollOver",$bind(this,this.invoketype_MouseOver));break;case"mouseUp":this.removeEventListener("mouseUp",$bind(this,this.invoketype_onMouseUP));break}}}this._actionType=e;if(this._actionType!=null){var s=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(s,"linkurl")){this.addEventListener("click",$bind(this,this.invoketype_MouseClick))}else{var a=this._actionType.get_invoketype();switch(a){case"mouseDown":this.addEventListener("mouseDown",$bind(this,this.invoketype_MouseClick));break;case"mouseOut":this.addEventListener("rollOut",$bind(this,this.invoketype_MouseOut));break;case"mouseOver":this.addEventListener("rollOver",$bind(this,this.invoketype_MouseOver));break;case"mouseUp":this.addEventListener("mouseUp",$bind(this,this.invoketype_onMouseUP));break}}}return this._actionType},invoketype_MouseOut:function(e){this.call_action();e.stopPropagation()},invoketype_MouseOver:function(e){this.call_action();e.stopPropagation()},invoketype_MouseClick:function(e){this.call_action();e.stopPropagation()},invoketype_onMouseUP:function(e){this.call_action();e.stopPropagation()},call_action:function(){if(this._actionType==null||this._actionType.get_params()==null){return}var e=this._actionType.get_actiontype();switch(e){case"callJS":var t=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(t,"jsfun")){this.action_callJS(this._actionType.get_params().jsfun)}break;case"gotoPage":var i=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(i,"pageindex")){this.action_gotoPage(this._actionType.get_params().pageindex)}break;case"openLink":var s=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(s,"linkurl")){this.action_openLink(this._actionType.get_params().linkurl)}break;case"playAudio":var a=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(a,"audiourl")){this.action_playAudio(this._actionType.get_params().audiourl)}break}},action_gotoPage:function(e){if(xeditor_objects_TrObject._fn_gotoPage!=null){xeditor_objects_TrObject._fn_gotoPage(e)}},action_openLink:function(e){openfl_Lib.getURL(new openfl_net_URLRequest(e),"_blank")},action_callJS:function(e){openfl_external_ExternalInterface.call(e)},action_playAudio:function(e){if(null==this.mySound){return}this.mySound.src=e;this.mySound.load();this.mySound.play()},ff_active:function(){},ff_deactive:function(){},ff_active_BK_music:function(){},ff_deactive_BK_music:function(){},__class__:xeditor_objects_TrObject,__properties__:$extend(xeditor_objects_XEditoriObject.prototype.__properties__,{set_actionType:"set_actionType",set_realHeight:"set_realHeight",get_realHeight:"get_realHeight",set_realWidth:"set_realWidth",get_realWidth:"get_realWidth"})});var xeditor_objects_TrObjectEx=function(e,t){this._orgbounds=new openfl_geom_Rectangle;xeditor_objects_TrObject.call(this,e,t);this._realWidth=e;this._realHeight=t};$hxClasses["xeditor.objects.TrObjectEx"]=xeditor_objects_TrObjectEx;xeditor_objects_TrObjectEx.__name__=["xeditor","objects","TrObjectEx"];xeditor_objects_TrObjectEx.__super__=xeditor_objects_TrObject;xeditor_objects_TrObjectEx.prototype=$extend(xeditor_objects_TrObject.prototype,{_orgbounds:null,__class__:xeditor_objects_TrObjectEx});var xeditor_objects_AudioPlayerObject=function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=2263244}if(i==null){i=14}this._player=null;xeditor_objects_TrObjectEx.call(this,e,t);this._container=new openfl_display_Sprite;this._container.set_name("audioplayer_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this._player=new xeditor_objects_FFAudioPlayerJS(e,t,i,s,a);this._container.addChild(this._player);this._realHeight=this._player.get_realHeight();this._parameters=this._player.get_params();this.render()};$hxClasses["xeditor.objects.AudioPlayerObject"]=xeditor_objects_AudioPlayerObject;xeditor_objects_AudioPlayerObject.__name__=["xeditor","objects","AudioPlayerObject"];xeditor_objects_AudioPlayerObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_AudioPlayerObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_parameters:null,_player:null,set_params:function(e){var t={};if(this._player!=null){this._parameters=this._player.get_params();this._container.removeChild(this._player);this._player=null}var i=0;var s=Reflect.fields(e);while(ie.get_bottom()){if(t.x<=i){return xeditor_objects__$CalloutObject_ControlLocal.bottom_left}else{return xeditor_objects__$CalloutObject_ControlLocal.bottom_right}}else if(t.x<=i){if(t.y<=s){return xeditor_objects__$CalloutObject_ControlLocal.left_top}else{return xeditor_objects__$CalloutObject_ControlLocal.left_bottom}}else if(t.y<=s){return xeditor_objects__$CalloutObject_ControlLocal.right_top}else{return xeditor_objects__$CalloutObject_ControlLocal.right_bottom}},getObjectBounds:function(){var e=this._container.localToGlobal(this._topcornerPoint);var t=this.globalToLocal(e);var i=this._container.localToGlobal(this._bottomcornerPoint);var s=this.globalToLocal(i);var a=new openfl_geom_Rectangle(t.x,t.y,s.x-t.x,s.y-t.y);return a},render:function(){this._container.get_graphics().clear();if(this._params.strokeColor!=-1){if(this._type=="round_rectangle"||this._type=="rectangle"){this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha,false,2,2,1)}else{this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha)}}if(this._params.fillColor!=-1){this._container.get_graphics().beginFill(this._params.fillColor,this._params.fillAlpha)}var e=new openfl_geom_Rectangle(this._topcornerPoint.x,this._topcornerPoint.y,this._bottomcornerPoint.x-this._topcornerPoint.x,this._bottomcornerPoint.y-this._topcornerPoint.y);if(this._type=="oval"){this.drawOvalCallout(this._container.get_graphics(),e,this._controlPoint)}else if(this._type=="round_rectangle"){this.drawRoundRectCallout(this._container.get_graphics(),e,this._controlPoint)}else if(this._type=="rectangle"){this.drawRectCallout(this._container.get_graphics(),e,this._controlPoint)}if(this._params.fillColor!=-1){this._container.get_graphics().endFill()}},cal_twopoint_angle:function(e,t){var i=t.x-e.x;var s=t.y-e.y;var a=Math.atan2(s,i);a=(a>0?a:2*Math.PI+a)*360/(2*Math.PI);return a},drawRectCallout:function(e,t,i){var s=new openfl_geom_Point;var a=new openfl_geom_Point;var r=this.get_controlAt(t,i);e.moveTo(t.x,t.y);if(r==xeditor_objects__$CalloutObject_ControlLocal.top_lef||r==xeditor_objects__$CalloutObject_ControlLocal.top_right){if(r==xeditor_objects__$CalloutObject_ControlLocal.top_lef){a.x=t.x+t.width/2-.2*(t.width/2);s.x=a.x-.45*(t.width/2)}else{s.x=t.x+t.width/2+.2*(t.width/2);a.x=s.x+.45*(t.width/2)}e.lineTo(s.x,t.get_top());e.lineTo(i.x,i.y);e.lineTo(a.x,t.get_top());e.lineTo(t.x+t.width,t.y)}else{e.lineTo(t.x+t.width,t.y)}if(r==xeditor_objects__$CalloutObject_ControlLocal.right_top||r==xeditor_objects__$CalloutObject_ControlLocal.right_bottom){if(r==xeditor_objects__$CalloutObject_ControlLocal.right_top){a.y=t.get_top()+t.height/2-.2*(t.height/2);s.y=a.y-.45*(t.height/2)}else{s.y=t.get_top()+t.height/2+.2*(t.height/2);a.y=s.y+.45*(t.height/2)}e.lineTo(t.get_right(),s.y);e.lineTo(i.x,i.y);e.lineTo(t.get_right(),a.y);e.lineTo(t.get_right(),t.get_bottom())}else{e.lineTo(t.get_right(),t.get_bottom())}if(r==xeditor_objects__$CalloutObject_ControlLocal.bottom_left||r==xeditor_objects__$CalloutObject_ControlLocal.bottom_right){if(r==xeditor_objects__$CalloutObject_ControlLocal.bottom_left){s.x=t.x+t.width/2-.2*(t.width/2);a.x=s.x-.45*(t.width/2)}else{a.x=t.x+t.width/2+.2*(t.width/2);s.x=a.x+.45*(t.width/2)}e.lineTo(s.x,t.get_bottom());e.lineTo(i.x,i.y);e.lineTo(a.x,t.get_bottom());e.lineTo(t.x,t.get_bottom())}else{e.lineTo(t.x,t.get_bottom())}if(r==xeditor_objects__$CalloutObject_ControlLocal.left_top||r==xeditor_objects__$CalloutObject_ControlLocal.left_bottom){if(r==xeditor_objects__$CalloutObject_ControlLocal.left_top){s.y=t.get_top()+t.height/2-.2*(t.height/2);a.y=s.y-.45*(t.height/2)}else{a.y=t.get_top()+t.height/2+.2*(t.height/2);s.y=a.y+.45*(t.height/2)}e.lineTo(t.get_left(),s.y);e.lineTo(i.x,i.y);e.lineTo(t.get_left(),a.y);e.lineTo(t.get_left(),t.get_top())}else{e.lineTo(t.get_left(),t.get_top())}},drawRoundRectCallout:function(e,t,i){var s=t.width<=t.height?.15*t.width:.15*t.height;var a=new openfl_geom_Point;var r=new openfl_geom_Point;var n=this.get_controlAt(t,i);e.moveTo(t.x+s,t.y);if(n==xeditor_objects__$CalloutObject_ControlLocal.top_lef||n==xeditor_objects__$CalloutObject_ControlLocal.top_right){if(n==xeditor_objects__$CalloutObject_ControlLocal.top_lef){r.x=t.x+t.width/2-.2*(t.width/2);a.x=r.x-.45*(t.width/2)}else{a.x=t.x+t.width/2+.2*(t.width/2);r.x=a.x+.45*(t.width/2)}e.lineTo(a.x,t.get_top());e.lineTo(i.x,i.y);e.lineTo(r.x,t.get_top());e.lineTo(t.x+t.width-s,t.get_top())}else{e.lineTo(t.x+t.width-s,t.y)}e.curveTo(t.x+t.width,t.y,t.x+t.width,t.y+s);if(n==xeditor_objects__$CalloutObject_ControlLocal.right_top||n==xeditor_objects__$CalloutObject_ControlLocal.right_bottom){if(n==xeditor_objects__$CalloutObject_ControlLocal.right_top){r.y=t.get_top()+t.height/2-.2*(t.height/2);a.y=r.y-.45*(t.height/2)}else{a.y=t.get_top()+t.height/2+.2*(t.height/2);r.y=a.y+.45*(t.height/2)}e.lineTo(t.get_right(),a.y);e.lineTo(i.x,i.y);e.lineTo(t.get_right(),r.y);e.lineTo(t.get_right(),t.get_bottom()-s)}else{e.lineTo(t.get_right(),t.get_bottom()-s)}e.curveTo(t.x+t.width,t.y+t.height,t.x+t.width-s,t.y+t.height);if(n==xeditor_objects__$CalloutObject_ControlLocal.bottom_left||n==xeditor_objects__$CalloutObject_ControlLocal.bottom_right){if(n==xeditor_objects__$CalloutObject_ControlLocal.bottom_left){a.x=t.x+t.width/2-.2*(t.width/2);r.x=a.x-.45*(t.width/2)}else{r.x=t.x+t.width/2+.2*(t.width/2);a.x=r.x+.45*(t.width/2)}e.lineTo(a.x,t.get_bottom());e.lineTo(i.x,i.y);e.lineTo(r.x,t.get_bottom());e.lineTo(t.x+s,t.get_bottom())}else{e.lineTo(t.x+s,t.get_bottom())}e.curveTo(t.x,t.y+t.height,t.x,t.y+t.height-s);if(n==xeditor_objects__$CalloutObject_ControlLocal.left_top||n==xeditor_objects__$CalloutObject_ControlLocal.left_bottom){if(n==xeditor_objects__$CalloutObject_ControlLocal.left_top){a.y=t.get_top()+t.height/2-.2*(t.height/2);r.y=a.y-.45*(t.height/2)}else{r.y=t.get_top()+t.height/2+.2*(t.height/2);a.y=r.y+.45*(t.height/2)}e.lineTo(t.get_left(),a.y);e.lineTo(i.x,i.y);e.lineTo(t.get_left(),r.y);e.lineTo(t.get_left(),t.get_top()+s)}else{e.lineTo(t.get_left(),t.get_top()+s)}e.curveTo(t.x,t.y,t.x+s,t.y)},drawOvalCallout:function(e,t,i){var s;var a;var r;var n;var _;var o=20;var l;var h;var c;var u;var f;var p;var d;var g=new openfl_geom_Point;var m=new openfl_geom_Point;var v=t.width;var b=t.height;l=v/2;h=b/2;c=l/Math.cos(xeditor_utils_Conversions.radians(.5*o));u=h/Math.cos(xeditor_utils_Conversions.radians(.5*o));d=new openfl_geom_Point(t.x+v/2,t.y+b/2);var y=this.cal_twopoint_angle(d,i)|0;y-=10;y=Math.ceil(y/20)*20;if(y>=360){y=0}e.moveTo(d.x+l,d.y);s=o/2|0;var x=0;while(s<361){f=xeditor_utils_Conversions.radians(s);p=xeditor_utils_Conversions.radians(s+o/2);a=c*Math.cos(f);r=u*Math.sin(f);n=l*Math.cos(p);_=h*Math.sin(p);if(s>=y&&s0){this.re_pos();this._textStartTM.set_text(xeditor_utils_TRUtil.formatTime(this.getCurrentTime()))}},onEnded:function(){this._sound.currentTime=0;if(this._sound_loop){this._sound.play()}else{this._sound.pause();this._isPlaying=false;this.onPlayerPlaybackFinished()}},onWaiting:function(){this._isWaiting=true},get_params:function(){return{url:this._mediaSource,fontsize:this._fontsize,bkColor:this._bkColor,autoStart:this._autoStart,autoRewind:this._autoRewind,isflat:this._isflat,songname:this._songName,duration:this._mediaDuration}},set_params:function(e){if(Object.prototype.hasOwnProperty.call(e,"fontsize")){this._fontsize=Reflect.field(e,"fontsize");this.cal_em();this._realHeight=2.8*this._em;this._pauseButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);this._playButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);this._spinButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);if(!this.bIsIpad){this._volButton.set_size(.56*this._realHeight|0,.56*this._realHeight|0)}this._playlistformat.size=this._fontsize*1.2|0;this._textFieldPlaylist.setTextFormat(this._playlistformat);this._tmformat.size=this._fontsize*.8|0;this._textStartTM.setTextFormat(this._tmformat);this._textEndTM.setTextFormat(this._tmformat);this._trackball.set_size(.934*this._em|0,.934*this._em|0)}this._bkColor=Object.prototype.hasOwnProperty.call(e,"bkColor")?Reflect.field(e,"bkColor"):this._bkColor;this._autoStart=Object.prototype.hasOwnProperty.call(e,"autoStart")?Reflect.field(e,"autoStart"):this._autoStart;this._autoRewind=Object.prototype.hasOwnProperty.call(e,"autoRewind")?Reflect.field(e,"autoRewind"):this._autoRewind;this._isflat=Object.prototype.hasOwnProperty.call(e,"isflat")?Reflect.field(e,"isflat"):this._isflat;this._songName=Object.prototype.hasOwnProperty.call(e,"songname")?Reflect.field(e,"songname"):this._songName;this._textFieldPlaylist.set_text(this._songName);this.render();this.re_pos();if(Object.prototype.hasOwnProperty.call(e,"url")){this._mediaSource=Reflect.field(e,"url")}if(Object.prototype.hasOwnProperty.call(e,"duration")){this._mediaDuration=Reflect.field(e,"duration");this._textEndTM.set_text(xeditor_utils_TRUtil.formatTime(this._mediaDuration))}return null},onTrackBallMouseClick:function(e){if(!this._mediaLoaded){return}this._isSeeking=true;e.stopPropagation();this.addEventListener("mouseUp",$bind(this,this.onTrackBallMouseUp));this.addEventListener("mouseMove",$bind(this,this.onTrackBallMouseMove))},onTrackBallMouseUp:function(e){var t=this.get_mouseX()-this._trackball.get_width()*.5;if(tthis._trackRect.x+this._trackRect.width-this._trackball.get_width()){this.seek(this.getDuration())}else{var i=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());var s=i*this.getDuration();this.seek(s)}this._isSeeking=false;e.stopPropagation();this.removeEventListener("mouseUp",$bind(this,this.onTrackBallMouseUp));this.removeEventListener("mouseMove",$bind(this,this.onTrackBallMouseMove))},onTrackBallMouseMove:function(e){e.stopPropagation();if(!this._mediaLoaded){return}var t=this.get_mouseX()-this._trackball.get_width()*.5;if(tthis._trackRect.x+this._trackRect.width-this._trackball.get_width()){return}this._trackball.set_x(t);var i=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());this._textStartTM.set_text(xeditor_utils_TRUtil.formatTime(this.getDuration()*i))},onCanplay:function(){this._isWaiting=false;if(this._firstLoad){this._sound.play();this._isPlaying=true;this._firstLoad=false;this._mediaLoaded=true;this._mediaDuration=this.getDuration()}this.onPlayerMediaInitialized()},load:function(e){if(null==this._sound){return}this.stopAndClose();this._mediaSource=e;this._stopped=false;this._mediaLoaded=false;this._firstLoad=true;this._startTime=0;this.onPlayerBuffering();this._sound.src=e;this._sound.load()},seek:function(e){if(null!=this._sound){this._sound.currentTime=e;this._saveTime=e}return e},isPlaying:function(){return this._isPlaying},togglePlay:function(){if(this._mediaLoaded){if(this._mediaLoaded){if(this._isPlaying){this._sound.pause();this._saveTime=this.getCurrentTime()}else{this.seek(this._saveTime);this._sound.play()}}else if(this._stopped){this.load(this._mediaSource)}this._isPlaying=!this._isPlaying;this.onPlayerPlayPause();return this._isPlaying}else if(this._mediaSource!=""){this.load(this._mediaSource);this.onPlayerBuffering();return true}this.onPlayerPlayPause();return false},stopAndClose:function(){if(this._mediaLoaded){this._mediaLoaded=false;this._isPlaying=false;this._stopped=true;this._startTime=0;this._sound.pause()}},setVolume:function(e){if(e>0){if(e>1){e=1}this._soundMuted=false;this._volume=e}else{this._soundMuted=true;this._volume=0}if(null!=this._sound){this._sound.volume=this._volume}},getDuration:function(){if(null!=this._sound){var e=this._sound.duration;if(isNaN(e)||e==null){return 0}else{return e}}return 0},getCurrentTime:function(){var e=0;if(null!=this._sound){e=this._sound.currentTime}else{e=0}return e},onPlayerBuffering:function(){this._spinButton.start()},onPlayerPlaybackFinished:function(){this.onPlayerPlayPause()},onPlayerPlayPause:function(){this._playButton.set_visible(!this.isPlaying());this._pauseButton.set_visible(this.isPlaying());this._spinButton.Stop()},onPlayerMediaInitialized:function(){this._textEndTM.set_text(xeditor_utils_TRUtil.formatTime(this.getDuration()));this.onPlayerPlayPause()},cal_em:function(){var e=new openfl_text_TextFormat("Arial",this._fontsize|0);var t=xeditor_utils_TRUtil.measureString("Abc",e);this._em=t.height},re_pos_trackball:function(e){this._trackball.set_x(this._trackRect.x+e*(this._trackRect.width-this._trackball.get_width()));this._trackball.set_y(this._trackRect.y)},re_pos:function(){this._playButton.set_x(this._playButton.set_y(.32499999999999996*this._realHeight*.5));this._spinButton.set_x(this._pauseButton.set_x(this._playButton.get_x()));this._spinButton.set_y(this._pauseButton.set_y(this._playButton.get_y()));if(!this.bIsIpad){this._volButton.set_x(this._realWidth-this._realHeight+.43999999999999995*this._realHeight*.5);this._volButton.set_y(.43999999999999995*this._realHeight*.5)}var e=new openfl_geom_Rectangle(this._realHeight+.2*this._em,0,this._realWidth-this._realHeight-(this._realHeight+.2*this._em));this._textFieldPlaylist.set_x(e.x+(e.width-this._textFieldPlaylist.get_width())*.5);this._textFieldPlaylist.set_y(0);var t=new openfl_geom_Rectangle(e.x,this._realHeight/2+(this._realHeight/2-.65*this._em)*.5,e.width,0);this._textStartTM.set_x(t.x);this._textStartTM.set_y(t.y);this._textEndTM.set_x(t.x+t.width-this._textEndTM.get_width());this._textEndTM.set_y(t.y);var i=new openfl_geom_Rectangle(t.x+this._textStartTM.get_width()+.8*this._em,t.y,t.width-(this._textStartTM.get_width()+this._textEndTM.get_width()+1.6*this._em),0);this._track.set_x(i.x);this._track.set_y(i.y+.15*this._em);this._track.set_size(i.width,.65*this._em);this._trackRect=i;if(this.getDuration()<=0){this.re_pos_trackball(0)}else{this.re_pos_trackball(this.getCurrentTime()/this.getDuration())}},render:function(){this._container.get_graphics().clear();this._container.get_graphics().lineStyle();var e=[xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(0,0,0),xeditor_utils_TRUtil.rgb(0,0,0)];var t=[.125,.125,.15,.1,.1];var i=[12,114,127,127,242];var s=new openfl_geom_Matrix;this._container.get_graphics().beginFill(this._bkColor,1);this._container.get_graphics().drawRoundRect(0,0,this._realWidth,this._realHeight,4);if(!this._isflat){s.createGradientBox(this._realWidth-2,this._realHeight,90*Math.PI/180,0,0);this._container.get_graphics().beginGradientFill(0,e,t,i,s);this._container.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}this._container.get_graphics();this._container.get_graphics().lineStyle(1,xeditor_utils_TRUtil.rgb(0,0,0),.0980392);this._container.get_graphics().moveTo(this._realHeight,0);this._container.get_graphics().lineTo(this._realHeight,this._realHeight);this._container.get_graphics().moveTo(this._realWidth-this._realHeight,0);this._container.get_graphics().lineTo(this._realWidth-this._realHeight,this._realHeight)},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},setPlay:function(){if(this.isPlaying()!=true){this.togglePlay()}},setPause:function(){if(this.isPlaying()==true){this.togglePlay()}},__class__:xeditor_objects_FFAudioPlayerJS,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{get_realHeight:"get_realHeight",set_params:"set_params",get_params:"get_params"})});var xeditor_objects_ImageObject=function(e,t,i){this._contentType="image";this._gif=null;this._imgContainer=new openfl_display_Sprite;this._imgLoader=new openfl_display_Loader;this._alpha=1;this._strokeColor=xeditor_utils_TRUtil.rgb(26,147,31);this._strokeWidth=3;this._hasborder=false;xeditor_objects_TrObjectEx.call(this,e,t);this._container=new openfl_display_Sprite;this._container.set_name("image_container");this.addChild(this._container);this.set_params_i(i);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._container.addChild(this._imgContainer)};$hxClasses["xeditor.objects.ImageObject"]=xeditor_objects_ImageObject;xeditor_objects_ImageObject.__name__=["xeditor","objects","ImageObject"];xeditor_objects_ImageObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_ImageObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_url:null,_hasborder:null,_strokeWidth:null,_strokeColor:null,_alpha:null,_tmpBitmap:null,_imgLoader:null,_imgContainer:null,_gif:null,_contentType:null,load_gif:function(e){var o=this;var t=new openfl_net_URLLoader;t.dataFormat=0;var i=new openfl_net_URLRequest(e);t.addEventListener("complete",function(e){var t=js_Boot.__cast(e.target,openfl_net_URLLoader).data;var i=new haxe_io_BytesBuffer;var s=0;var a=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(t);while(s0){this._imgContainer.removeChildAt(0)}this._imgLoader.unload();this._gif.stop();this._gif=null}var i=Reflect.field(e,"url");if(i.length>0){var s=i;var a=s.lastIndexOf(".");var r=a>0?HxOverrides.substr(s,a+1,null).toLowerCase():"";if(r.indexOf("?")!=-1){r=r.split("?")[0]}if(r=="gif"){this._contentType="gif";this.load_gif(i)}else{this._contentType="image";this.load_image(i)}}else{var n=openfl_utils_Assets.getBitmapData("img/imgdefault.png");this._tmpBitmap=new openfl_display_Bitmap(n);this._imgContainer.addChild(this._tmpBitmap)}this._url=Reflect.field(e,"url")}this._hasborder=Object.prototype.hasOwnProperty.call(e,"hasborder")?Reflect.field(e,"hasborder"):this._hasborder;this._strokeWidth=Object.prototype.hasOwnProperty.call(e,"strokeWidth")?Reflect.field(e,"strokeWidth"):this._strokeWidth;this._strokeColor=Object.prototype.hasOwnProperty.call(e,"strokeColor")?Reflect.field(e,"strokeColor"):this._strokeColor;this._alpha=Object.prototype.hasOwnProperty.call(e,"alpha")?Reflect.field(e,"alpha"):this._alpha;if(t){this.render()}this._container.set_alpha(this._alpha);return null},render:function(){if(this._imgContainer.get_width()>0&&this._imgContainer.get_height()>0){this._imgContainer.set_scaleX(this._realWidth/(this._imgContainer.get_width()/this._imgContainer.get_scaleX()));this._imgContainer.set_scaleY(this._realHeight/(this._imgContainer.get_height()/this._imgContainer.get_scaleY()))}var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);var t=e.width<=e.height?e.width/2:e.height/2;if(this._hasborder){this._container.get_graphics().clear();this._container.get_graphics().lineStyle(this._strokeWidth,this._strokeColor,1,false,2,2,1);this._container.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_ImageObject});var xeditor_objects_LineObject=function(e,t,i){this._endPoint=new openfl_geom_Point;this._startPoint=new openfl_geom_Point;this.LINE_SEGMENT_LENGTH_BASE=4;this.THETA=45;xeditor_objects_TrObjectEx.call(this,e.realWidth,e.realHeight);if(t!=null){this._startPoint=t}if(i!=null){this._endPoint=i}this._lineDefinition=e;this._dotSpacing=2*this._lineDefinition.strokeSize;this._r=this._lineDefinition.strokeSize*.5;this._d=this._r/Math.cos(xeditor_utils_Conversions.radians(.5*this.THETA));this._container=new openfl_display_Sprite;this._container.set_name("line_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.LineObject"]=xeditor_objects_LineObject;xeditor_objects_LineObject.__name__=["xeditor","objects","LineObject"];xeditor_objects_LineObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_LineObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_lineDefinition:null,THETA:null,LINE_SEGMENT_LENGTH_BASE:null,_r:null,_d:null,_dotSpacing:null,_startPoint:null,_endPoint:null,apply:function(e,t,i){var s=js_Boot.__cast(e,openfl_display_Sprite);s.get_graphics().clear();var a=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));var r=Math.atan2(i.y-t.y,i.x-t.x);var n;if(i!=null){s.get_graphics().moveTo(t.x,t.y);if(this._lineDefinition.type=="solid"){s.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha);s.get_graphics().lineTo(i.x,i.y)}else if(this._lineDefinition.type=="dashed"){s.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha,false,2,2,1);var _=this.LINE_SEGMENT_LENGTH_BASE*this._lineDefinition.strokeSize|0;var o=this.LINE_SEGMENT_LENGTH_BASE*this._lineDefinition.strokeSize|0;var l=Math.floor(a/(_+o));var h=new openfl_geom_Point;var c=new openfl_geom_Point;n=0;while(n<=l){h.x=t.x+Math.cos(r)*(n*(_+o));h.y=t.y+Math.sin(r)*(n*(_+o));c.x=t.x+Math.cos(r)*((n+1)*(_+o)-o);c.y=t.y+Math.sin(r)*((n+1)*(_+o)-o);if(n==l){var u=Math.sqrt(Math.pow(i.x-h.x,2)+Math.pow(i.y-h.y,2));if(u<=_){c.x=i.x;c.y=i.y}}s.get_graphics().moveTo(h.x,h.y);s.get_graphics().lineTo(c.x,c.y);++n}}else if(this._lineDefinition.type=="dotted"){s.get_graphics().lineStyle(0,16711680,0);s.get_graphics().beginFill(this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha);var f;var p;var d;var g;var m;var v;var b;var y=new openfl_geom_Point;n=0;while(n<=a){y.x=t.x+Math.cos(r)*n;y.y=t.y+Math.sin(r)*n;s.get_graphics().moveTo(y.x+this._r,y.y);f=this.THETA/2|0;while(f<361){v=xeditor_utils_Conversions.radians(f);b=xeditor_utils_Conversions.radians(f+this.THETA/2);p=this._d*Math.cos(v);d=this._d*Math.sin(v);g=this._r*Math.cos(b);m=this._r*Math.sin(b);s.get_graphics().curveTo(y.x+p,y.y+d,y.x+g,y.y+m);f=f+this.THETA|0}n+=this._dotSpacing|0}s.get_graphics().endFill()}}},render:function(){this._container.get_graphics().clear();this.apply(this._container,this._startPoint,this._endPoint)},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_LineObject});var xeditor_objects_LinkObject=function(e,t,i){this._params={};this._status="normal";xeditor_objects_TrObjectEx.call(this,e,t);this._params=Reflect.copy(i);this._container=new openfl_display_Sprite;this._container.set_name("hyperlink_container");this.addChild(this._container);this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUP));this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._orgbounds=this._container.getBounds(this)};$hxClasses["xeditor.objects.LinkObject"]=xeditor_objects_LinkObject;xeditor_objects_LinkObject.__name__=["xeditor","objects","LinkObject"];xeditor_objects_LinkObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_LinkObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_status:null,_params:null,render:function(){var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);this._container.get_graphics().clear();if(this._status=="normal"){this._container.get_graphics().beginFill(this._params.normalColor,this._params.normalApha);this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._status=="hover"){this._container.get_graphics().beginFill(this._params.overColor,this._params.overAhpa);if(this._params.overBorder){this._container.get_graphics().lineStyle(5,this._params.overBorderColor,100,false,2,2,1)}this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._status=="down"){this._container.get_graphics().beginFill(this._params.downColor,this._params.downAhpa);if(this._params.overBorder){this._container.get_graphics().lineStyle(5,this._params.overBorderColor,100,false,2,2,1)}this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}this._container.get_graphics().endFill()},onMouseUP:function(e){this._status="normal";this.render()},onMouseClick:function(e){this._status="down";this.render()},onMouseOver:function(e){this._status="hover";this.render()},onMouseOut:function(e){this._status="normal";this.render()},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_LinkObject});var xeditor_objects_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["xeditor.objects.PlayMusicJS"]=xeditor_objects_PlayMusicJS;xeditor_objects_PlayMusicJS.__name__=["xeditor","objects","PlayMusicJS"];xeditor_objects_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)}},destroyMe:function(){this.changeStatus(false);flipbookMM_global_GetDivJs.getInstance().music.removeChild(this.snd);this.snd.onended=null;this.snd=null},__class__:xeditor_objects_PlayMusicJS};var xeditor_objects_Shape2Object=function(e,t,i){xeditor_objects_TrObjectEx.call(this,e,t);this._params=i;this._container=new openfl_display_Sprite;this._container.set_name("shape2_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.Shape2Object"]=xeditor_objects_Shape2Object;xeditor_objects_Shape2Object.__name__=["xeditor","objects","Shape2Object"];xeditor_objects_Shape2Object.__super__=xeditor_objects_TrObjectEx;xeditor_objects_Shape2Object.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_params:null,render:function(){this._container.get_graphics().clear();var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);var t=e.width<=e.height?e.width/2:e.height/2;if(this._params.strokeColor!=-1){if(this._params.type=="rectangle"||this._params.type=="square"||this._params.type=="triangle"||this._params.type=="right-triangle"||this._params.type=="diamond"||this._params.type=="pentagon"){this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha,false,2,2,1)}else{this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha)}}if(this._params.fillColor!=-1){this._container.get_graphics().beginFill(this._params.fillColor,this._params.fillAlpha)}if(this._params.type=="rectangle"){this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._params.type=="round_rectangle"){var i=Object.prototype.hasOwnProperty.call(this._params,"radius_RoundRect")?Reflect.field(this._params,"radius_RoundRect"):e.width*.2;this._container.get_graphics().drawRoundRect(e.x,e.y,e.width,e.height,i)}else if(this._params.type=="oval"){this._container.get_graphics().drawEllipse(e.x,e.y,e.width,e.height)}else if(this._params.type=="right-triangle"){xeditor_utils_DrawingShapes.drawRightTriangle(this._container.get_graphics(),e)}else if(this._params.type=="triangle"){xeditor_utils_DrawingShapes.drawTriangle(this._container.get_graphics(),e)}else if(this._params.type=="diamond"){xeditor_utils_DrawingShapes.drawPolygon2Ex_inRect(this._container.get_graphics(),4,e,0)}else if(this._params.type=="pentagon"){xeditor_utils_DrawingShapes.drawPolygon2Ex_inRect(this._container.get_graphics(),5,e,0)}else if(this._params.type=="five-star"){xeditor_utils_DrawingShapes.drawStarEx_inRect(this._container.get_graphics(),5,e,t*Math.sin(.1*Math.PI)/Math.sin(.7*Math.PI),18)}if(this._params.fillColor!=-1){this._container.get_graphics().endFill()}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_Shape2Object});var xeditor_objects_StepObject=function(e,t,i,s,a,r,n){if(n==null){n=.001}xeditor_objects_TrObjectEx.call(this,t,i);this._stepType=e;this._title=s;this._bkgrColor=a;this._titleColor=r;this._fontsize=n;this._container=new openfl_display_Sprite;this._container.set_name("step_container");this.addChild(this._container);if(n<.1){var _=this._stepType;switch(_){case"circle":n=this.cal_font_size(this._realWidth,this._realHeight);break;case"circle-pointer":n=this.cal_font_size(this._realWidth*.7,this._realHeight);break;case"square":n=this.cal_font_size(this._realWidth,this._realHeight);break;case"square-pointer":n=this.cal_font_size(this._realWidth,this._realHeight);break}this._fontsize=n}var o=new openfl_text_TextFormat("Arial",n|0,this._titleColor,true);this._textField=new openfl_text_TextField;this._textField.set_autoSize(1);this._textField.set_defaultTextFormat(o);this._textField.set_text(this._title);this._textField.set_selectable(false);this._container.addChild(this._textField);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.StepObject"]=xeditor_objects_StepObject;xeditor_objects_StepObject.__name__=["xeditor","objects","StepObject"];xeditor_objects_StepObject.createDropShadowFilter=function(e){var t=new openfl_filters_DropShadowFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),Std.parseInt(e[7]),e[8]=="true",e[9]=="true",e[10]=="true");return t};xeditor_objects_StepObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_StepObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_stepType:null,_title:null,_bkgrColor:null,_titleColor:null,_fontsize:null,_textField:null,measureString:function(e,t){var i=new openfl_text_TextField;i.set_defaultTextFormat(t);i.set_text(e);return new openfl_geom_Rectangle(0,0,i.get_textWidth(),i.get_textHeight())},cal_font_size:function(e,t){var i;if(e>t){i=.75*t}else{i=.75*e}var s=new openfl_text_TextFormat("Arial",i|0,this._titleColor,true);var a=this.measureString(this._title,s);var r=1;if(a.width>e){r=a.width/e}if(a.height>t){if(a.height/t>r){r=a.height/t}}i/=r;while(true){var n=new openfl_text_TextFormat("Arial",i|0,this._titleColor,true);var _=this.measureString(this._title,n);if(_.width>.9*e||_.height>.9*t){--i}else{break}}return i},draw_title:function(e,t,i,s,a){var r=js_Boot.__cast(e,openfl_display_Sprite);var n=r.get_graphics();var _=new openfl_text_TextFormat("Arial",this._fontsize|0,this._titleColor,true);this._textField.set_autoSize(1);this._textField.set_defaultTextFormat(_);this._textField.set_text(this._title);this._textField.set_x((s-this._textField.get_width())*.5);this._textField.set_y((a-this._textField.get_height())*.5)},drawRoundRectComplex:function(e,t,i,s,a,r,n,_,o){var l=t+s;var h=i+a;var c=s=l?l:o;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);this.drawRoundRectComplex(_,t,i,s,a,h*2,h*2,h*2,h*2);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_square_pointer:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/42;var l=a/42;_.lineStyle(1,0,1);_.beginFill(this._bkgrColor,1);_.moveTo(13*o,l);_.lineTo(39*o,l);_.curveTo(40*o,l,41*o,3*l);_.lineTo(41*o,29*l);_.curveTo(41*o,35*l,27*o,41*l);_.lineTo(13*o,41*l);_.curveTo(7*o,41*l,o,29*l);_.lineTo(o,15*l);_.curveTo(o,8*l,13*o,l);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/42;var l=a/42;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);_.drawEllipse(t,i,s,a);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle_Pointer:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/64;var l=a/42;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);_.moveTo(63*o,21*l);_.curveTo(63*o,21*l,21*o,41*l);_.curveTo(5*o,41*l,o,21*l);_.curveTo(o,10*l,21*o,l);_.curveTo(20*o,l,63*o,21*l);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},render:function(){this._container.get_graphics().clear();var e=this._stepType;switch(e){case"circle":this.draw_Circle(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break;case"circle-pointer":this.draw_Circle_Pointer(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth*.7,this._realHeight);break;case"square":this.draw_square(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break;case"square-pointer":this.draw_square_pointer(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_StepObject});var xeditor_objects_TextObject=function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=0}if(i==null){i=-1}if(t==null){t=-1}xeditor_objects_TrObject.call(this,s,a);this._textFormat=e;this._backgroundColor=t;this._borderColor=i;this._bg=new openfl_display_Sprite;this._bg.set_alpha(0);this.addChild(this._bg);this._textfield=new openfl_text_TextField;this._textfield.set_name("text_label");this._textfield.set_antiAliasType(0);this._textfield.set_autoSize(1);this._textfield.set_multiline(true);this._textfield.set_wordWrap(true);this._textfield.set_defaultTextFormat(e);this._textfield.set_type(1);this._textfield.set_selectable(false);this._textfield.set_background(t!=-1);this._textfield.set_backgroundColor(t!=-1?t:16777215);this._textfield.set_border(i!=-1);this._textfield.set_borderColor(i!=-1?i:16777215);if(this._realWidth>0){this._textfield.set_width(this._realWidth)}this.addChild(this._textfield);this._textfield.addEventListener("change",$bind(this,this.updateBackground),false,0,true);this.addEventListener("addedToStage",$bind(this,this.init));this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.updateBackground(null)};$hxClasses["xeditor.objects.TextObject"]=xeditor_objects_TextObject;xeditor_objects_TextObject.__name__=["xeditor","objects","TextObject"];xeditor_objects_TextObject.__super__=xeditor_objects_TrObject;xeditor_objects_TextObject.prototype=$extend(xeditor_objects_TrObject.prototype,{_textfield:null,_textFormat:null,_bg:null,_backgroundColor:null,_borderColor:null,set_htmltext:function(e){this._textfield.set_htmlText(e);this.updateBackground(null);return this._textfield.get_htmlText()},init:function(e){this.removeEventListener("addedToStage",$bind(this,this.init))},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},updateBackground:function(e){this._bg.get_graphics().clear();this._bg.get_graphics().beginFill(16777215,1);this._bg.get_graphics().drawRect(0,0,this._textfield.get_width(),this._textfield.get_height())},__class__:xeditor_objects_TextObject,__properties__:$extend(xeditor_objects_TrObject.prototype.__properties__,{set_htmltext:"set_htmltext"})});var xeditor_objects_TrButtonObject=function(e,t,i,s,a,r,n){if(n==null){n=""}if(r==null){r="normal"}if(a==null){a=14}if(s==null){s="Arial"}this._props=[];this._draw_type="roundrect";this._status="normal";this._text="";xeditor_objects_TrObjectEx.call(this,t,i);this._container=new openfl_display_Sprite;this._container.set_name("button_container");this.addChild(this._container);this._realWidth=t;this._realHeight=i;this._fontname=s;this._fontsize=a;this._font_weight=r;this._text=n;this.pre_init();this.change_button_type(e);this.init();this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.TrButtonObject"]=xeditor_objects_TrButtonObject;xeditor_objects_TrButtonObject.__name__=["xeditor","objects","TrButtonObject"];xeditor_objects_TrButtonObject.createBlurFilter=function(e){var t=new openfl_filters_BlurFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]));return t};xeditor_objects_TrButtonObject.createDropShadowFilter=function(e){var t=new openfl_filters_DropShadowFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),Std.parseInt(e[7]),e[8]=="true",e[9]=="true",e[10]=="true");return t};xeditor_objects_TrButtonObject.convert_box_shadow=function(e,t,i,s,a,r){var n=new openfl_geom_Point(0,0);var _=new openfl_geom_Point(s,a);var o=xeditor_utils_TRUtil.cal_twopoint_angle(n,_);var l=Std.string(openfl_geom_Point.distance(n,_));var h=Std.string(_$UInt_UInt_$Impl_$.toFloat(t));return[l,o==null?"null":""+o,h,i==null?"null":""+i,r==null?"null":""+r,r==null?"null":""+r,"1","1",e?"true":"false","false","false"]};xeditor_objects_TrButtonObject.convert_box_shadow_byObject=function(e){return xeditor_objects_TrButtonObject.convert_box_shadow(e.inner,e.color,e.alpha,e.offset_x,e.offset_y,e.blur_radius)};xeditor_objects_TrButtonObject.convert_text_shadow=function(e,t,i,s,a){if(a==null){a=1}var r=new openfl_geom_Point(0,0);var n=new openfl_geom_Point(t,i);var _=xeditor_utils_TRUtil.cal_twopoint_angle(r,n);var o=Std.string(openfl_geom_Point.distance(r,n));var l=Std.string(_$UInt_UInt_$Impl_$.toFloat(e));return[o,_==null?"null":""+_,l,a==null?"null":""+a,Std.string(Math.abs(Math.cos(_)*s)),Std.string(Math.abs(Math.sin(_)*s)),"1","1","false","false","false"]};xeditor_objects_TrButtonObject.convert_text_shadow_byObject=function(e){return xeditor_objects_TrButtonObject.convert_text_shadow(e.color,e.offset_x,e.offset_y,e.blur_radius,e.alpha)};xeditor_objects_TrButtonObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_TrButtonObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_fontname:null,_fontsize:null,_font_weight:null,_text:null,_textField:null,_tf_normal:null,_tf_hover:null,_tf_active:null,_status:null,_button_type:null,_draw_type:null,_props:null,get_prop_field:function(e,t){var i=this._props.length;if(t=="normal"){var s=i;while(s>0){if(Object.prototype.hasOwnProperty.call(this._props[s-1].normal,e)){return Reflect.field(this._props[s-1].normal,e)}--s}}else{var a=i;while(a>0){var r=t=="hover"?this._props[a-1].hover:this._props[a-1].active;if(Object.prototype.hasOwnProperty.call(r,e)){return Reflect.field(r,e)}--a}a=i;while(a>0){if(Object.prototype.hasOwnProperty.call(this._props[a-1].normal,e)){return Reflect.field(this._props[a-1].normal,e)}--a}}return null},register_prop:function(e,t,i){this._props.push({normal:e,hover:t,active:i})},pre_init:function(){var e=xeditor_utils_TRUtil.rgb(102,102,102);var t=xeditor_utils_TRUtil.rgb(238,238,238);var i={dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow(true,xeditor_utils_TRUtil.rgb(255,255,255),.5,0,1,0),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow(false,xeditor_utils_TRUtil.rgb(0,0,0),.15,0,1,2)};var s=xeditor_objects_TrButtonObject.convert_text_shadow(xeditor_utils_TRUtil.rgb(255,255,255),0,1,1);var a={color:e,border_width:1,border_color:13948116,border_radius:3,background_color:t,background:{angle:90,color1:16514043,color2:14803425,alpha1:1,alpha2:1,ratio1:0,ratio2:255},box_shadow:i,text_shadow:s};var r={color:xeditor_utils_TRUtil.rgb(102,102,102),background_color:xeditor_utils_TRUtil.rgb(238,238,238),background:{angle:90,color1:16777215,color2:14474460,alpha1:1,alpha2:1,ratio1:0,ratio2:255}};var n={dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow(true,xeditor_utils_TRUtil.rgb(0,0,0),.3,0,1,3),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow(false,xeditor_utils_TRUtil.rgb(255,255,255),.4,0,1,0)};var _=xeditor_objects_TrButtonObject.convert_text_shadow(xeditor_utils_TRUtil.rgb(255,255,255),0,1,0,.4);var o={color:12303291,background_color:15658734,background:{angle:90,color1:16514043,color2:14803425,alpha1:1,alpha2:1,ratio1:0,ratio2:255},box_shadow:n,text_shadow:_};this.register_prop(a,r,o)},create_textformat:function(e,t,i){this._tf_normal=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","normal"));this._tf_normal.bold=i=="bold";this._tf_hover=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","hover"));this._tf_hover.bold=i=="bold";this._tf_active=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","active"));this._tf_active.bold=i=="bold";this._fontname=e;this._fontsize=t;this._font_weight=i},init:function(){this.create_textformat(this._fontname,this._fontsize,this._font_weight);this._textField=new openfl_text_TextField;this._textField.set_defaultTextFormat(this._tf_normal);this._textField.set_autoSize(1);this._textField.set_text(this._text);this._textField.set_selectable(false);this._container.addChild(this._textField);this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver));this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUP))},change_button_type:function(e,t){if(t==null){t=false}if(t){var i=this._props.length;while(i>1){this._props.pop();--i}}this._button_type=e;this._draw_type="roundrect";switch(e){case"wol_circle_action":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_action.normal,xeditor_type_TrButton_$Prop.button_action.hover,xeditor_type_TrButton_$Prop.button_action.active);break;case"wol_circle_caution":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_caution.normal,xeditor_type_TrButton_$Prop.button_caution.hover,xeditor_type_TrButton_$Prop.button_caution.active);break;case"wol_circle_default":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);break;case"wol_circle_highlight":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_highlight.normal,xeditor_type_TrButton_$Prop.button_highlight.hover,xeditor_type_TrButton_$Prop.button_highlight.active);break;case"wol_circle_primary":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_primary.normal,xeditor_type_TrButton_$Prop.button_primary.hover,xeditor_type_TrButton_$Prop.button_primary.active);break;case"wol_circle_royal":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_royal.normal,xeditor_type_TrButton_$Prop.button_royal.hover,xeditor_type_TrButton_$Prop.button_royal.active);break;case"wol_rounded_action":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_action.normal,xeditor_type_TrButton_$Prop.button_action.hover,xeditor_type_TrButton_$Prop.button_action.active);break;case"wol_rounded_caution":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_caution.normal,xeditor_type_TrButton_$Prop.button_caution.hover,xeditor_type_TrButton_$Prop.button_caution.active);break;case"wol_rounded_default":this.register_prop({border_radius:3},{},{});break;case"wol_rounded_highlight":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_highlight.normal,xeditor_type_TrButton_$Prop.button_highlight.hover,xeditor_type_TrButton_$Prop.button_highlight.active);break;case"wol_rounded_primary":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_primary.normal,xeditor_type_TrButton_$Prop.button_primary.hover,xeditor_type_TrButton_$Prop.button_primary.active);break;case"wol_rounded_royal":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_royal.normal,xeditor_type_TrButton_$Prop.button_royal.hover,xeditor_type_TrButton_$Prop.button_royal.active);break}},onMouseUP:function(e){this._status="normal";this.render();e.stopPropagation()},onMouseClick:function(e){this._status="active";this.render();e.stopPropagation()},onMouseOver:function(e){this._status="hover";this.render();e.stopPropagation()},onMouseOut:function(e){this._status="normal";this.render();e.stopPropagation()},re_pos:function(){this._textField.set_x((this._realWidth-this._textField.get_width())*.5);this._textField.set_y((this._realHeight-this._textField.get_height())*.5)},drawRoundRectComplex:function(e,t,i,s,a,r,n,_,o){var l=t+s;var h=i+a;var c=s0){this.createYoutubeDivs();this.loadYoutubeJs()}if(base_baseUtils_MapUtil.strLength(this.vimeoList)>0){this.createVimeoDivs();this.loadVimeoJs()}},loadYoutubeJs:function(){var t=this;var e=window.document.createElement("script");e.id="youtube_iframe_api";e.src="https://www.youtube.com/iframe_api";var i=window.document.getElementsByTagName("script")[0];i.parentNode.insertBefore(e,i);e.onload=function(){var e=$bind(t,t.youtubeStart);window.onYouTubeIframeAPIReady=e}},createYoutubeDivs:function(){this.youtubeVideoList=new haxe_ds_StringMap;var e=this.youtubeList.keys();while(e.hasNext()){var t=e.next();var i=new xeditor_objects_YoutubeVideoJs(100,100,t);var s=this.youtubeVideoList;if(__map_reserved[t]!=null){s.setReserved(t,i)}else{s.h[t]=i}}},youtubeStart:function(){var e=this.youtubeVideoList.keys();while(e.hasNext()){var t=e.next();var i=this.youtubeVideoList;var s=__map_reserved[t]!=null?i.getReserved(t):i.h[t];var a=this.youtubeList;s.load(t,__map_reserved[t]!=null?a.getReserved(t):a.h[t])}},getYoutubeVideo:function(e){var t=this.youtubeVideoList;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},loadVimeoJs:function(){var e=this;var t=window.document.createElement("script");t.src="https://player.vimeo.com/api/player.js";var i=window.document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i);t.onload=function(){e.vimeoStart()}},vimeoStart:function(){var e=this.vimeoVideoList.keys();while(e.hasNext()){var t=e.next();var i=this.vimeoVideoList;var s=__map_reserved[t]!=null?i.getReserved(t):i.h[t];var a=this.vimeoList;s.load(t,__map_reserved[t]!=null?a.getReserved(t):a.h[t])}},createVimeoDivs:function(){this.vimeoVideoList=new haxe_ds_StringMap;var e=this.vimeoList.keys();while(e.hasNext()){var t=e.next();var i=new xeditor_objects_VimeoPlayerJs(100,100,t);var s=this.vimeoVideoList;if(__map_reserved[t]!=null){s.setReserved(t,i)}else{s.h[t]=i}}},getVimeoVide:function(e){var t=this.vimeoVideoList;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},__class__:xeditor_objects_VideoHtmlManage};var xeditor_objects_VimeoPlayerJs=function(e,t,i){this.video=null;this.player=null;var a=this;xeditor_objects_TrObjectEx.call(this,e,t);this.vid=i;this.isReady=false;this.isloop=false;this.isAutoPlay=false;this.istrigger=false;this.video=window.document.createElement("iframe");this.video.id=this.vid;this.video.style.left=0+"px";this.video.style.top=0+"px";this.video.style.position="absolute";this.video.style.display="none";this.video.style.setProperty("frameborder","0");this.video.frameBorder="0";this.video.allowFullscreen=true;flipbookMM_global_GetDivJs.getInstance().vimeo.appendChild(this.video);this.lastPositon=this.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));this.addEventListener("enterFrame",function(e){if(a.video.style.display=="block"){var t=a.get_x();var i=a.get_y();var s=a.localToGlobal(new openfl_geom_Point(t,i));if(a.lastPositon.x!=s.x||a.lastPositon.y!=s.y){a.updateVideo(true);a.lastPositon.x=s.x;a.lastPositon.y=s.y}}})};$hxClasses["xeditor.objects.VimeoPlayerJs"]=xeditor_objects_VimeoPlayerJs;xeditor_objects_VimeoPlayerJs.__name__=["xeditor","objects","VimeoPlayerJs"];xeditor_objects_VimeoPlayerJs.__super__=xeditor_objects_TrObjectEx;xeditor_objects_VimeoPlayerJs.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{player:null,video:null,isReady:null,istrigger:null,vid:null,isloop:null,isAutoPlay:null,lastPositon:null,render:function(){this.get_graphics().clear();this.get_graphics().beginFill(0,.01);this.get_graphics().drawRect(0,0,this.get_realWidth(),this.get_realHeight());this.get_graphics().endFill()},setInitPara:function(e,t,i,s){this.set_realWidth(e);this.set_realHeight(t);if(i=="false"){this.isloop=false}else{this.isloop=true}if(s=="false"){this.isAutoPlay=false}else{this.isAutoPlay=true}this.render()},load:function(e,t){var i=this;this.video.src="https://player.vimeo.com/video/"+t;this.player=new Vimeo.Player(e);this.player.on("play",function(){window.console.log("played the handstick video!")});this.player.ready().then(function(){i.isReady=true;i.play()});this.player.on("ended",function(){if(i.isloop){i.play()}})},triggerPlay:function(){this.istrigger=true;this.play()},triggerPause:function(){this.istrigger=false;this.pause()},play:function(){if(this.istrigger){this.updateVideo(true)}if(this.isReady&&this.isAutoPlay&&this.istrigger){this.player.play()}},pause:function(){this.updateVideo(false);if(this.isReady){this.player.pause()}},updateVideo:function(e){if(e){var t=this.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));if(this.isReady){var i=this.get_width()*this.getScaleX(this)/window.devicePixelRatio;this.video.style.width=i+"px";var s=this.get_height()*this.getScaleY(this)/window.devicePixelRatio;this.video.style.height=s+"px"}else{this.video.style.width=2+"px";this.video.style.height=2+"px"}this.video.style.left=(t.x|0)/window.devicePixelRatio+"px";this.video.style.top=(t.y|0)/window.devicePixelRatio+"px";this.video.style.display="block";this.video.style.position="absolute"}else{this.video.style.display="none"}},getScaleX:function(e){if(e!=null){if(e.parent!=null){return e.get_scaleX()*this.getScaleX(e.parent)}else{return e.get_scaleX()}}else{return 0}},getScaleY:function(e){if(e!=null){if(e.parent!=null){return e.get_scaleY()*this.getScaleY(e.parent)}else{return e.get_scaleY()}}else{return 0}},__class__:xeditor_objects_VimeoPlayerJs});var xeditor_objects_VimeoVideoPlayerObject=function(e,t,i){this._parameters={};xeditor_objects_TrObjectEx.call(this,e,t);this.init_parameters();this.set_parameters(i)};$hxClasses["xeditor.objects.VimeoVideoPlayerObject"]=xeditor_objects_VimeoVideoPlayerObject;xeditor_objects_VimeoVideoPlayerObject.__name__=["xeditor","objects","VimeoVideoPlayerObject"];xeditor_objects_VimeoVideoPlayerObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_VimeoVideoPlayerObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{vimeo:null,_parameters:null,set_uid:function(e){xeditor_objects_TrObjectEx.prototype.set_uid.call(this,e);this.vimeo=null;if(this._parameters.url!=null){this.vimeo=xeditor_objects_VideoHtmlManage.getInstance().getVimeoVide(this.get_uid());this.vimeo.setInitPara(this.get_realWidth(),this.get_realHeight(),this._parameters.loop,this._parameters.autostart);this.addChild(this.vimeo)}return this.get_uid()},init_parameters:function(){this._parameters.url="";this._parameters.autostart="false";this._parameters.id="";this._parameters.loop="false"},set_parameters:function(e){var t=0;var i=Reflect.fields(e);while(t0?a:2*Math.PI+a)*360/(2*Math.PI);return a};xeditor_utils_TRUtil.measureString=function(e,t){var i=new openfl_text_TextField;i.set_defaultTextFormat(t);i.set_text(e);return new openfl_geom_Rectangle(0,0,i.get_textWidth(),i.get_textHeight())};xeditor_utils_TRUtil.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};var xeditor_type_TrButton_$Prop=function(){};$hxClasses["xeditor.type.TrButton_Prop"]=xeditor_type_TrButton_$Prop;xeditor_type_TrButton_$Prop.__name__=["xeditor","type","TrButton_Prop"];var xeditor_utils_Conversions=function(){};$hxClasses["xeditor.utils.Conversions"]=xeditor_utils_Conversions;xeditor_utils_Conversions.__name__=["xeditor","utils","Conversions"];xeditor_utils_Conversions.radians=function(e){return e*Math.PI/180};var xeditor_utils_DrawingShapes=function(){};$hxClasses["xeditor.utils.DrawingShapes"]=xeditor_utils_DrawingShapes;xeditor_utils_DrawingShapes.__name__=["xeditor","utils","DrawingShapes"];xeditor_utils_DrawingShapes.drawRightTriangle=function(e,t){var i=new openfl_geom_Point(t.x,t.y);var s=new openfl_geom_Point(t.x,t.get_bottom());var a=new openfl_geom_Point(t.get_right(),t.get_bottom());e.moveTo(i.x,i.y);e.lineTo(s.x,s.y);e.lineTo(a.x,a.y);e.lineTo(i.x,i.y)};xeditor_utils_DrawingShapes.drawTriangle=function(e,t){var i=new openfl_geom_Point(t.x,t.get_bottom());var s=new openfl_geom_Point(t.get_right(),t.get_bottom());var a=new openfl_geom_Point(t.x+t.width/2,t.y);e.moveTo(i.x,i.y);e.lineTo(s.x,s.y);e.lineTo(a.x,a.y);e.lineTo(i.x,i.y)};xeditor_utils_DrawingShapes.drawStarEx_inRect=function(e,t,i,s,a){if(a==null){a=0}if(i.width<=0||i.height<=0){return}var r=i.x+i.width/2;var n=i.y+i.height/2;var _=i.width<=i.height?i.width/2:i.height/2;var o=i.width<=i.height?1:i.width/i.height;var l=i.height<=i.width?1:i.height/i.width;xeditor_utils_DrawingShapes.drawStarEx(e,r,n,t,s,_,a,o,l)};xeditor_utils_DrawingShapes.drawStarEx=function(e,t,i,s,a,r,n,_,o){if(o==null){o=1}if(_==null){_=1}if(n==null){n=0}var l=t;var h=i;i=0;t=i;if(_$UInt_UInt_$Impl_$.gte(2,s)){return}if(_$UInt_UInt_$Impl_$.gt(s,2)){var c;var u;var f;var p;var d;var g;c=Math.PI*2/_$UInt_UInt_$Impl_$.toFloat(s);u=c/2;f=n/180*Math.PI;e.moveTo((t+Math.cos(f)*r)*_+l,(i-Math.sin(f)*r)*o+h);var m=1;var v=s+1;while(m")}else{i.h["gt"]=">"}if(__map_reserved["amp"]!=null){i.setReserved("amp","&")}else{i.h["amp"]="&"}if(__map_reserved["quot"]!=null){i.setReserved("quot",'"')}else{i.h["quot"]='"'}if(__map_reserved["apos"]!=null){i.setReserved("apos","'")}else{i.h["apos"]="'"}t=i;return t}(this);haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];haxe_zip_InflateImpl.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];haxe_zip_InflateImpl.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];haxe_zip_InflateImpl.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];openfl_display_MovieClip.__useParentFPS=false;jaris_events_PlayerEvents.ASPECT_RATIO="onAspectRatio";jaris_events_PlayerEvents.MOUSE_SHOW="onMouseShow";jaris_events_PlayerEvents.MOUSE_HIDE="onMouseHide";jaris_events_PlayerEvents.FULLSCREEN="onFullscreen";jaris_events_PlayerEvents.VOLUME_UP="onVolumeUp";jaris_events_PlayerEvents.VOLUME_DOWN="onVolumeDown";jaris_events_PlayerEvents.VOLUME_CHANGE="onVolumeChange";jaris_events_PlayerEvents.MUTE="onMute";jaris_events_PlayerEvents.PLAY_PAUSE="onPlayPause";jaris_events_PlayerEvents.SEEK="onSeek";jaris_events_PlayerEvents.TIME="onTimeUpdate";jaris_events_PlayerEvents.PROGRESS="onProgress";jaris_events_PlayerEvents.BUFFERING="onBuffering";jaris_events_PlayerEvents.NOT_BUFFERING="onNotBuffering";jaris_events_PlayerEvents.CONNECTION_FAILED="onConnectionFailed";jaris_events_PlayerEvents.CONNECTION_SUCCESS="onConnectionSuccess";jaris_events_PlayerEvents.MEDIA_INITIALIZED="onDataInitialized";jaris_events_PlayerEvents.PLAYBACK_FINISHED="onPlaybackFinished";jaris_events_PlayerEvents.STOP_CLOSE="onStopAndClose";jaris_events_PlayerEvents.RESIZE="onResize";jaris_events_PlayerEvents.ERROR="onError";jaris_player_InputType.AUDIO="audio";jaris_player_InputType.VIDEO="video";jaris_player_StreamType.FILE="file";jaris_player_StreamType.PSEUDOSTREAM="http";jaris_player_StreamType.RTMP="rtmp";jaris_player_StreamType.YOUTUBE="youtube";js_Boot.__toStr={}.toString;js_html_compat_Float32Array.BYTES_PER_ELEMENT=4;js_html_compat_Uint8Array.BYTES_PER_ELEMENT=1;lime__$backend_html5_HTML5HTTPRequest.activeRequests=0;lime__$backend_html5_HTML5HTTPRequest.requestLimit=4;lime__$backend_html5_HTML5HTTPRequest.requestQueue=new List;lime__$backend_html5_HTML5Window.dummyCharacter="";lime__$backend_html5_HTML5Window.windowID=0;lime_graphics_Image.__base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";lime_math__$Matrix4_Matrix4_$Impl_$.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];lime_system_Clipboard.onUpdate=new lime_app__$Event_$Void_$Void;lime_system_Sensor.sensorByID=new haxe_ds_IntMap;lime_system_Sensor.sensors=[];lime_ui_Gamepad.devices=new haxe_ds_IntMap;lime_ui_Gamepad.onConnect=new lime_app__$Event_$lime_$ui_$Gamepad_$Void;lime_ui_Joystick.devices=new haxe_ds_IntMap;lime_ui_Joystick.onConnect=new lime_app__$Event_$lime_$ui_$Joystick_$Void;lime_ui_Touch.onCancel=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onEnd=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onMove=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onStart=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_utils_Assets.cache=new lime_utils_AssetCache;lime_utils_Assets.onChange=new lime_app__$Event_$Void_$Void;lime_utils_Assets.libraries=new haxe_ds_StringMap;lime_utils_Assets.libraryPaths=new haxe_ds_StringMap;lime_utils_Log.throwErrors=true;motion_actuators_SimpleActuator.actuators=[];motion_actuators_SimpleActuator.actuatorsLength=0;motion_actuators_SimpleActuator.addedEvent=false;motion_Actuate.defaultActuator=motion_actuators_SimpleActuator;motion_Actuate.defaultEase=motion_easing_Expo.get_easeOut();motion_Actuate.targetLibraries=new haxe_ds_ObjectMap;openfl__$internal_TouchData.__pool=new lime_utils_ObjectPool(function(){return new openfl__$internal_TouchData},function(e){e.reset()});openfl__$internal_renderer_DrawCommandBuffer.empty=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasGraphics.SIN45=.7071067811865476;openfl__$internal_renderer_canvas_CanvasGraphics.TAN22=.41421356237309503;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_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_display_BitmapData.__bufferStride=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.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Matrix},function(e){e.identity()});openfl__$internal_renderer_opengl_GLGraphics.blankBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_opengl_GLGraphics.tempColorTransform=new openfl_geom_ColorTransform(0,0,0,1,0,0,0,0);openfl_display_Shader.__glPrograms=new haxe_ds_StringMap;openfl__$internal_renderer_opengl_GLMaskShader.opaqueBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_opengl_GLVideo.__textureSizeValue=[0,0];openfl__$internal_stage3D_GLUtils.debug=false;openfl__$internal_swf_SWFLite.instances=new haxe_ds_StringMap;openfl__$internal_text_HTMLParser.__regexAlign=new EReg("align=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexBreakTag=new EReg("","gi");openfl__$internal_text_HTMLParser.__regexBlockIndent=new EReg("blockindent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexColor=new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");openfl__$internal_text_HTMLParser.__regexEntities=[new EReg(""","g"),new EReg("'","g"),new EReg("&","g"),new EReg("<","g"),new EReg(">","g"),new EReg(" ","g")];openfl__$internal_text_HTMLParser.__regexFace=new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexHTMLTag=new EReg("<.*?>","g");openfl__$internal_text_HTMLParser.__regexHref=new EReg("href=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexIndent=new EReg(" indent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexLeading=new EReg("leading=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexLeftMargin=new EReg("leftmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexRightMargin=new EReg("rightmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_text_HTMLParser.__regexTabStops=new EReg("tabstops=(\"([^\"]+)\"|'([^']+)')","i");openfl_display_LoaderInfo.__rootURL=typeof window!="undefined"?window.document.URL:"";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.__textureSizeValue=[0,0];openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT=0;openfl_display3D_Context3D.DEPTH_STENCIL=0;openfl_display3D_Context3D.__stateCache=new openfl__$internal_stage3D_Context3DStateCache;openfl_events_KeyboardEvent.KEY_DOWN="keyDown";openfl_events_KeyboardEvent.KEY_UP="keyUp";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=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_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_ui_GameInput.numDevices=0;openfl_ui_GameInput.__deviceList=[];openfl_ui_GameInput.__devices=new haxe_ds_ObjectMap;openfl_ui_GameInput.__instances=[];openfl_ui_Mouse.__cursor="auto";openfl_utils_Assets.cache=new openfl_utils_AssetCache;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);