starling-framework
Version:
A fast, productive library for 2D cross-platform development.
2 lines • 593 kB
JavaScript
/*! Starling Framework v2.5.1 | Simplified BSD (c) Gamua | gamua.com/starling */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("openfl/errors/ArgumentError"),require("openfl/errors/Error"),require("openfl/geom/Rectangle"),require("openfl/geom/Point"),require("openfl/geom/Matrix"),require("openfl/utils/ByteArray"),require("openfl/geom/Matrix3D"),require("openfl/geom/Vector3D"),require("openfl/errors/IllegalOperationError"),require("openfl/display/BitmapData"),require("openfl/Vector"),require("openfl/media/Sound"),require("openfl/Lib"),require("openfl/text/TextFormat"),require("openfl/system/Capabilities"),require("openfl/errors/RangeError"),require("openfl/display/Bitmap"),require("openfl/ui/Mouse"),require("openfl/net/URLRequest"),require("openfl/display/Shape"),require("openfl/text/TextField"),require("openfl/events/Event"),require("openfl/net/URLLoader"),require("openfl/display/Loader"),require("openfl/system/LoaderContext"),require("openfl/display/Stage"),require("openfl/events/MouseEvent"),require("openfl/events/TouchEvent"),require("openfl/display3D/Context3D"),require("openfl/text/Font"),require("openfl/system/System"),require("openfl/display3D/textures/Texture"),require("openfl/display3D/textures/RectangleTexture"),require("openfl/display3D/textures/VideoTexture"),require("openfl/utils/AGALMiniAssembler"),require("openfl/errors/EOFError"),require("openfl/display/DisplayObjectContainer"),require("openfl/ui/Multitouch"),require("openfl/display/Sprite")):"function"==typeof define&&define.amd?define(["openfl/errors/ArgumentError","openfl/errors/Error","openfl/geom/Rectangle","openfl/geom/Point","openfl/geom/Matrix","openfl/utils/ByteArray","openfl/geom/Matrix3D","openfl/geom/Vector3D","openfl/errors/IllegalOperationError","openfl/display/BitmapData","openfl/Vector","openfl/media/Sound","openfl/Lib","openfl/text/TextFormat","openfl/system/Capabilities","openfl/errors/RangeError","openfl/display/Bitmap","openfl/ui/Mouse","openfl/net/URLRequest","openfl/display/Shape","openfl/text/TextField","openfl/events/Event","openfl/net/URLLoader","openfl/display/Loader","openfl/system/LoaderContext","openfl/display/Stage","openfl/events/MouseEvent","openfl/events/TouchEvent","openfl/display3D/Context3D","openfl/text/Font","openfl/system/System","openfl/display3D/textures/Texture","openfl/display3D/textures/RectangleTexture","openfl/display3D/textures/VideoTexture","openfl/utils/AGALMiniAssembler","openfl/errors/EOFError","openfl/display/DisplayObjectContainer","openfl/ui/Multitouch","openfl/display/Sprite"],e):"object"==typeof exports?exports.starling=e(require("openfl/errors/ArgumentError"),require("openfl/errors/Error"),require("openfl/geom/Rectangle"),require("openfl/geom/Point"),require("openfl/geom/Matrix"),require("openfl/utils/ByteArray"),require("openfl/geom/Matrix3D"),require("openfl/geom/Vector3D"),require("openfl/errors/IllegalOperationError"),require("openfl/display/BitmapData"),require("openfl/Vector"),require("openfl/media/Sound"),require("openfl/Lib"),require("openfl/text/TextFormat"),require("openfl/system/Capabilities"),require("openfl/errors/RangeError"),require("openfl/display/Bitmap"),require("openfl/ui/Mouse"),require("openfl/net/URLRequest"),require("openfl/display/Shape"),require("openfl/text/TextField"),require("openfl/events/Event"),require("openfl/net/URLLoader"),require("openfl/display/Loader"),require("openfl/system/LoaderContext"),require("openfl/display/Stage"),require("openfl/events/MouseEvent"),require("openfl/events/TouchEvent"),require("openfl/display3D/Context3D"),require("openfl/text/Font"),require("openfl/system/System"),require("openfl/display3D/textures/Texture"),require("openfl/display3D/textures/RectangleTexture"),require("openfl/display3D/textures/VideoTexture"),require("openfl/utils/AGALMiniAssembler"),require("openfl/errors/EOFError"),require("openfl/display/DisplayObjectContainer"),require("openfl/ui/Multitouch"),require("openfl/display/Sprite")):t.starling=e(t.openfl.errors.ArgumentError,t.openfl.errors.Error,t.openfl.geom.Rectangle,t.openfl.geom.Point,t.openfl.geom.Matrix,t.openfl.utils.ByteArray,t.openfl.geom.Matrix3D,t.openfl.geom.Vector3D,t.openfl.errors.IllegalOperationError,t.openfl.display.BitmapData,t.openfl.Vector,t.openfl.media.Sound,t.openfl.Lib,t.openfl.text.TextFormat,t.openfl.system.Capabilities,t.openfl.errors.RangeError,t.openfl.display.Bitmap,t.openfl.ui.Mouse,t.openfl.net.URLRequest,t.openfl.display.Shape,t.openfl.text.TextField,t.openfl.events.Event,t.openfl.net.URLLoader,t.openfl.display.Loader,t.openfl.system.LoaderContext,t.openfl.display.Stage,t.openfl.events.MouseEvent,t.openfl.events.TouchEvent,t.openfl.display3D.Context3D,t.openfl.text.Font,t.openfl.system.System,t.openfl.display3D.textures.Texture,t.openfl.display3D.textures.RectangleTexture,t.openfl.display3D.textures.VideoTexture,t.openfl.utils.AGALMiniAssembler,t.openfl.errors.EOFError,t.openfl.display.DisplayObjectContainer,t.openfl.ui.Multitouch,t.openfl.display.Sprite)}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE_7__,__WEBPACK_EXTERNAL_MODULE_11__,__WEBPACK_EXTERNAL_MODULE_13__,__WEBPACK_EXTERNAL_MODULE_14__,__WEBPACK_EXTERNAL_MODULE_17__,__WEBPACK_EXTERNAL_MODULE_20__,__WEBPACK_EXTERNAL_MODULE_24__,__WEBPACK_EXTERNAL_MODULE_27__,__WEBPACK_EXTERNAL_MODULE_39__,__WEBPACK_EXTERNAL_MODULE_44__,__WEBPACK_EXTERNAL_MODULE_60__,__WEBPACK_EXTERNAL_MODULE_71__,__WEBPACK_EXTERNAL_MODULE_75__,__WEBPACK_EXTERNAL_MODULE_76__,__WEBPACK_EXTERNAL_MODULE_77__,__WEBPACK_EXTERNAL_MODULE_78__,__WEBPACK_EXTERNAL_MODULE_81__,__WEBPACK_EXTERNAL_MODULE_90__,__WEBPACK_EXTERNAL_MODULE_91__,__WEBPACK_EXTERNAL_MODULE_102__,__WEBPACK_EXTERNAL_MODULE_103__,__WEBPACK_EXTERNAL_MODULE_107__,__WEBPACK_EXTERNAL_MODULE_140__,__WEBPACK_EXTERNAL_MODULE_142__,__WEBPACK_EXTERNAL_MODULE_143__,__WEBPACK_EXTERNAL_MODULE_264__,__WEBPACK_EXTERNAL_MODULE_265__,__WEBPACK_EXTERNAL_MODULE_266__,__WEBPACK_EXTERNAL_MODULE_267__,__WEBPACK_EXTERNAL_MODULE_268__,__WEBPACK_EXTERNAL_MODULE_269__,__WEBPACK_EXTERNAL_MODULE_273__,__WEBPACK_EXTERNAL_MODULE_275__,__WEBPACK_EXTERNAL_MODULE_277__,__WEBPACK_EXTERNAL_MODULE_279__,__WEBPACK_EXTERNAL_MODULE_280__,__WEBPACK_EXTERNAL_MODULE_285__,__WEBPACK_EXTERNAL_MODULE_286__,__WEBPACK_EXTERNAL_MODULE_287__){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=256)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={Enum:{}}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){function n(){}n.prototype=t;var i=new n;for(var r in e)i[r]=e[r];return e.toString!==Object.prototype.toString&&(i.toString=e.toString),i}},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default,r=(n(2).default,n(3).default),s=function(t){Error.call(this),this.val=t,this.message=String(t),Error.captureStackTrace&&Error.captureStackTrace(this,s)};s.__name__=["js","_Boot","HaxeError"],s.__super__=Error,s.prototype=r(Error.prototype,{}),s.prototype.__class__=s.prototype.constructor=i["js._Boot.HaxeError"]=s,s.wrap=function(t){return t instanceof Error?t:new s(t)},e.default=s}).call(e,n(0))},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default;n(2).default;function r(){return n(8)}function s(){return n(15)}var a=function(){};a.__name__=["Std"],(a.prototype={}).__class__=a.prototype.constructor=i.Std=a,String.prototype.__class__=i.String=String,String.__name__=["String"],i.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=i.Date=Date,Date.__name__=["Date"];i.Int={__name__:["Int"]},i.Dynamic={__name__:["Dynamic"]};(i.Float=Number).__name__=["Float"],(i.Bool=Boolean).__ename__=["Bool"];i.Class={__name__:["Class"]},i.Void={__ename__:["Void"]};a.is=function(t,e){return r().default.__instanceof(t,e)},a.instance=function(t,e){return t instanceof e?t:null},a.string=function(t){return r().default.__string_rec(t,"")},a.int=function(t){return 0|t},a.parseInt=function(t){var e=parseInt(t,10);return 0!=e||120!=s().default.cca(t,1)&&88!=s().default.cca(t,1)||(e=parseInt(t)),isNaN(e)?null:e},a.parseFloat=function(t){return parseFloat(t)},a.random=function(t){return t<=0?0:Math.floor(Math.random()*t)},e.default=a}).call(e,n(0))},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default,r=n(2).default;function s(){return r(n(60))}var a=function(){};a.__name__=["openfl","_Vector","Vector_Impl_"],(a.prototype={}).__class__=a.prototype.constructor=i["openfl._Vector.Vector_Impl_"]=a,a._new=function(t,e,n){return null!=n?s().default.ofArray(n):new(s().default)(t,e)},a.concat=function(t,e){return s().default.ofArray(Array.prototype.concat.call(t,e))},a.copy=function(t){return s().default.ofArray(t)},a.get=function(t,e){return t[e]},a.indexOf=function(t,e,n){return null==n&&(n=0),Array.prototype.indexOf.call(t,e,n)},a.insertAt=function(t,e,n){(!t.fixed||e<t.length)&&Array.prototype.splice.call(t,e,0,n)},a.iterator=function(t){return new(n(261).default)(t)},a.join=function(t,e){return null==e&&(e=","),Array.prototype.join.call(t,e)},a.lastIndexOf=function(t,e,n){return null==n?Array.prototype.lastIndexOf.call(t,e):Array.prototype.lastIndexOf.call(t,e,n)},a.pop=function(t){return t.fixed?null:Array.prototype.pop.call(t)},a.push=function(t,e){return t.fixed?this.length:Array.prototype.push.call(t,e)},a.removeAt=function(t,e){return!t.fixed||e<t.length?Array.prototype.splice.call(t,e,1)[0]:null},a.reverse=function(t){return Array.prototype.reverse.call(t)},a.set=function(t,e,n){return!t.fixed||e<t.length?t[e]=n:n},a.shift=function(t){return t.fixed?null:Array.prototype.shift.call(t)},a.slice=function(t,e,n){return null==n&&(n=16777215),null==e&&(e=0),s().default.ofArray(Array.prototype.slice.call(t,e,n))},a.sort=function(t,e){Array.prototype.sort.call(t,e)},a.splice=function(t,e,n){return s().default.ofArray(Array.prototype.splice.call(t,e,n))},a.toString=function(t){return null!=t?n(5).default.string(t):null},a.unshift=function(t,e){t.fixed||Array.prototype.unshift.call(t,e)},a.ofArray=function(t){return s().default.ofArray(t)},a.convert=function(t){return t},a.get_fixed=function(t){return t.fixed},a.set_fixed=function(t,e){return t.fixed=e},a.get_length=function(t){return t.length},a.set_length=function(t,e){return t.length=e},e.default=a}).call(e,n(0))},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_7__},function(t,e,n){(function(t){var i="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this;i.Object.defineProperty(e,"__esModule",{value:!0});var r=n(1).default;n(2).default;function s(){return n(5)}var a=function(){};a.__name__=["js","Boot"],(a.prototype={}).__class__=a.prototype.constructor=r["js.Boot"]=a,a.__unhtml=function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">")},a.__trace=function(t,e){var n,i=null!=e?e.fileName+":"+e.lineNumber+": ":"";if(i+=a.__string_rec(t,""),null!=e&&null!=e.customParams)for(var r=0,s=e.customParams;r<s.length;){var o=s[r];++r,i+=","+a.__string_rec(o,"")}"undefined"!=typeof document&&null!=(n=document.getElementById("haxe:trace"))?n.innerHTML+=a.__unhtml(i)+"<br/>":"undefined"!=typeof console&&null!=console.log&&console.log(i)},a.__clear_trace=function(){var t=document.getElementById("haxe:trace");null!=t&&(t.innerHTML="")},a.isClass=function(t){return t.__name__},a.isEnum=function(t){return t.__ename__},a.getClass=function(t){if(t instanceof Array&&null==t.__enum__)return Array;var e=t.__class__;if(null!=e)return e;var n=a.__nativeClassName(t);return null!=n?a.__resolveNativeClass(n):null},a.__string_rec=function(t,e){if(null==t)return"null";if(e.length>=5)return"<...>";var n=typeof t;switch("function"==n&&(a.isClass(t)||a.isEnum(t))&&(n="object"),n){case"function":return"<function>";case"object":if(t instanceof Array){if(t.__enum__){if(2==t.length)return t[0];var i=t[0]+"(";e+="\t";for(var r=2,s=t.length;r<s;){var o=r++;i+=2!=o?","+a.__string_rec(t[o],e):a.__string_rec(t[o],e)}return i+")"}var u=t.length,l="[";e+="\t";for(var _=0,f=u;_<f;){var h=_++;l+=(h>0?",":"")+a.__string_rec(t[h],e)}return l+="]"}var c;try{c=t.toString}catch(t){return"???"}if(null!=c&&c!=Object.toString&&"function"==typeof c){var d=t.toString();if("[object Object]"!=d)return d}var g=null,p="{\n";e+="\t";var m=null!=t.hasOwnProperty;for(var g in t)m&&!t.hasOwnProperty(g)||"prototype"!=g&&"__class__"!=g&&"__super__"!=g&&"__interfaces__"!=g&&"__properties__"!=g&&(2!=p.length&&(p+=", \n"),p+=e+g+" : "+a.__string_rec(t[g],e));return p+="\n"+(e=e.substring(1))+"}";case"string":return t;default:return String(t)}},a.__interfLoop=function(t,e){if(null==t)return!1;if(t==e)return!0;var n=t.__interfaces__;if(null!=n)for(var i=0,r=n.length;i<r;){var s=n[i++];if(s==e||a.__interfLoop(s,e))return!0}return a.__interfLoop(t.__super__,e)},a.__instanceof=function(t,e){if(null==e)return!1;switch(e){case Array:return t instanceof Array&&null==t.__enum__;case r.Bool:return"boolean"==typeof t;case r.Dynamic:return!0;case r.Float:return"number"==typeof t;case r.Int:return"number"==typeof t&&(0|t)===t;case String:return"string"==typeof t;default:if(null==t)return!1;if("function"==typeof e){if(t instanceof e)return!0;if(a.__interfLoop(a.getClass(t),e))return!0}else if("object"==typeof e&&a.__isNativeObj(e)&&t instanceof e)return!0;return e==r.Class&&null!=t.__name__||(e==r.Enum&&null!=t.__ename__||t.__enum__==e)}},a.__cast=function(t,e){if(a.__instanceof(t,e))return t;throw new(n(4).default)("Cannot cast "+s().default.string(t)+" to "+s().default.string(e))},a.__nativeClassName=function(t){var e=a.__toStr.call(t).slice(8,-1);return"Object"==e||"Function"==e||"Math"==e||"JSON"==e?null:e},a.__isNativeObj=function(t){return null!=a.__nativeClassName(t)},a.__resolveNativeClass=function(t){return i[t]},a.__toStr={}.toString,e.default=a}).call(e,n(0))},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default,r=n(2).default,s=n(10).default,a=n(3).default;function o(){return n(21)}function u(){return n(6)}function l(){return r(n(75))}function _(){return n(5)}function f(){return n(4)}function h(){return r(n(11))}function c(){return n(28)}function d(){return n(26)}function g(){return n(29)}function p(){return r(n(77))}function m(){return n(49)}function x(){return n(8)}function v(){return r(n(264))}function y(){return n(16)}function w(){return n(34)}function b(){return r(n(7))}function T(){return r(n(286))}function D(){return r(n(13))}var A=function(t,e,i,a,h,c,d){if(null==c&&(c="auto"),null==h&&(h="auto"),o().default.call(this),null==e)throw new(f().default)(new(b().default)("Stage must not be null"));null==i&&(i=new(D().default)(0,0,e.stageWidth,e.stageHeight)),null==a&&(a=e.stage3Ds[0]),w().default.initialize(),u().default.push(A.sAll,this),this.makeCurrent(),this.__rootClass=t,this.__viewPort=i,this.__previousViewPort=new(D().default),this.__stage=new(n(70).default)(_().default.int(i.width),_().default.int(i.height),e.get_color()),this.__nativeOverlay=new(r(n(287)).default),this.__nativeStage=e,this.__nativeStage.addChild(this.__nativeOverlay),this.__touchProcessor=new(n(116).default)(this.__stage),this.__touchProcessor.set_discardSystemGestures(!w().default.get_isDesktop()),this.__juggler=new(n(121).default),this.__antiAliasing=0,this.__supportHighResolutions=!1,this.__painter=new(n(124).default)(a,d),this.__frameTimestamp=l().default.getTimer()/1e3,this.__frameID=1,this.__supportsCursor=r(n(90)).default.supportsCursor||0==p().default.get_os().indexOf("Windows"),this.__statsDisplayAlign={},this.setMultitouchEnabled("touchPoint"==T().default.inputMode,!0),this.__nativeOverlayBlocksTouches=!0,e.scaleMode="noScale",e.align="topLeft",e.addEventListener("enterFrame",s(this,this.onEnterFrame),!1,0,!0),e.addEventListener("keyDown",s(this,this.onKey),!1,0,!0),e.addEventListener("keyUp",s(this,this.onKey),!1,0,!0),e.addEventListener("resize",s(this,this.onResize),!1,0,!0),e.addEventListener("mouseLeave",s(this,this.onMouseLeave),!1,0,!0),e.addEventListener("activate",s(this,this.onActivate),!1,0,!0),a.addEventListener("context3DCreate",s(this,this.onContextCreated),!1,10,!0),a.addEventListener("error",s(this,this.onStage3DError),!1,10,!0);this.__painter.get_shareContext()?m().default.delay(s(this,this.initialize),1):this.__painter.requestContext3D(h,c)};A.__name__=["starling","core","Starling"],A.__super__=o().default,A.prototype=a(o().default.prototype,{dispose:function(){this.stop(!0),this.__nativeStage.removeEventListener("enterFrame",s(this,this.onEnterFrame),!1),this.__nativeStage.removeEventListener("keyDown",s(this,this.onKey),!1),this.__nativeStage.removeEventListener("keyUp",s(this,this.onKey),!1),this.__nativeStage.removeEventListener("resize",s(this,this.onResize),!1),this.__nativeStage.removeEventListener("mouseLeave",s(this,this.onMouseLeave),!1),this.__nativeStage.removeChild(this.__nativeOverlay),this.get_stage3D().removeEventListener("context3DCreate",s(this,this.onContextCreated),!1),this.get_stage3D().removeEventListener("context3DCreate",s(this,this.onContextRestored),!1),this.get_stage3D().removeEventListener("error",s(this,this.onStage3DError),!1);for(var t=0,e=this.getTouchEventTypes(this.__multitouchEnabled);t<e.length;){var n=e[t];++t,this.__nativeStage.removeEventListener(n,s(this,this.onTouch),!1)}null!=this.__touchProcessor&&this.__touchProcessor.dispose(),null!=this.__painter&&this.__painter.dispose(),null!=this.__stage&&this.__stage.dispose();var i=A.sAll,r=Array.prototype.indexOf.call(i,this,0);-1!=r&&u().default.removeAt(A.sAll,r),A.sCurrent==this&&(A.sCurrent=null)},initialize:function(){this.makeCurrent(),this.updateViewPort(!0),this.dispatchEventWith("context3DCreate",!1,this.get_context()),this.initializeRoot(),this.__frameTimestamp=l().default.getTimer()/1e3},initializeRoot:function(){if(null==this.__root&&null!=this.__rootClass){if(this.__root=n(19).default.createInstance(this.__rootClass,[]),null==this.__root||!_().default.is(this.__root,n(48).default))throw new(f().default)(new(h().default)("Invalid root class: "+_().default.string(this.__rootClass)));this.__stage.addChildAt(this.__root,0),this.dispatchEventWith("rootCreated",!1,this.__root)}},nextFrame:function(){var t=l().default.getTimer()/1e3,e=t-this.__frameTimestamp;this.__frameTimestamp=t,e>1&&(e=1),e<0&&(e=1/this.__nativeStage.get_frameRate()),this.advanceTime(e),this.render()},advanceTime:function(t){this.get_contextValid()&&(this.makeCurrent(),this.__touchProcessor.advanceTime(t),this.__stage.advanceTime(t),this.__juggler.advanceTime(t))},render:function(){if(this.get_contextValid()){this.makeCurrent(),this.updateViewPort();var t=this.__stage.get_requiresRedraw()||this.get_mustAlwaysRender();if(t){this.dispatchEventWith("render");var e=this.__painter.get_shareContext(),i=this.__viewPort.width/this.__stage.get_stageWidth(),r=this.__viewPort.height/this.__stage.get_stageHeight(),s=this.__stage.get_color();this.__painter.nextFrame(),this.__painter.set_pixelSize(1/this.get_contentScaleFactor()),this.__painter.get_state().setProjectionMatrix(this.__viewPort.x<0?-this.__viewPort.x/i:0,this.__viewPort.y<0?-this.__viewPort.y/r:0,this.__clippedViewPort.width/i,this.__clippedViewPort.height/r,this.__stage.get_stageWidth(),this.__stage.get_stageHeight(),this.__stage.get_cameraPosition()),e||this.__painter.clear(s,n(32).default.getAlpha(s)),this.__stage.render(this.__painter),this.__painter.finishFrame(),this.__painter.set_frameID(++this.__frameID),e||this.__painter.present()}null!=this.__statsDisplay&&(this.__statsDisplay.set_drawCount(this.__painter.get_drawCount()),t||this.__statsDisplay.markFrameAsSkipped())}},updateViewPort:function(t){if(null==t&&(t=!1),t||!c().default.compare(this.__viewPort,this.__previousViewPort)){this.__previousViewPort.setTo(this.__viewPort.x,this.__viewPort.y,this.__viewPort.width,this.__viewPort.height),this.updateClippedViewPort(),this.updateStatsDisplayPosition();var e=this.__supportHighResolutions?this.__nativeStage.get_contentsScaleFactor():1;this.__painter.configureBackBuffer(this.__clippedViewPort,e,this.__antiAliasing,!0,this.__supportBrowserZoom),this.setRequiresRedraw()}},updateClippedViewPort:function(){var t=d().default.getRectangle(0,0,this.__nativeStage.stageWidth,this.__nativeStage.stageHeight);this.__clippedViewPort=c().default.intersect(this.__viewPort,t,this.__clippedViewPort),this.__clippedViewPort.width<32&&(this.__clippedViewPort.width=32),this.__clippedViewPort.height<32&&(this.__clippedViewPort.height=32),d().default.putRectangle(t)},updateNativeOverlay:function(){this.__nativeOverlay.set_x(this.__viewPort.x),this.__nativeOverlay.set_y(this.__viewPort.y),this.__nativeOverlay.set_scaleX(this.__viewPort.width/this.__stage.get_stageWidth()),this.__nativeOverlay.set_scaleY(this.__viewPort.height/this.__stage.get_stageHeight())},stopWithFatalError:function(t){var e=new(r(n(102)).default);e.get_graphics().beginFill(0,.8),e.get_graphics().drawRect(0,0,this.__stage.get_stageWidth(),this.__stage.get_stageHeight()),e.get_graphics().endFill();var i=new(r(n(103)).default),s=new(r(n(76)).default)("_sans",14,16777215);s.align="center",i.set_defaultTextFormat(s),i.set_wordWrap(!0),i.set_width(.75*this.__stage.get_stageWidth()),i.set_autoSize("center"),i.set_text(t),i.set_x((this.__stage.get_stageWidth()-i.get_width())/2),i.set_y((this.__stage.get_stageHeight()-i.get_height())/2),i.set_background(!0),i.set_backgroundColor(5570560),this.updateNativeOverlay(),this.get_nativeOverlay().addChild(e),this.get_nativeOverlay().addChild(i),this.stop(!0),g().default.trace("[Starling]",{fileName:"Starling.hx",lineNumber:616,className:"starling.core.Starling",methodName:"stopWithFatalError",customParams:[t]}),this.dispatchEventWith("fatalError",!1,t)},makeCurrent:function(){A.sCurrent=this},start:function(){this.__started=this.__rendering=!0,this.__frameTimestamp=l().default.getTimer()/1e3},stop:function(t){null==t&&(t=!1),this.__started=!1,this.__rendering=!t},setRequiresRedraw:function(){this.__stage.setRequiresRedraw()},onStage3DError:function(t){if(3702==t.errorID){var e="Desktop"==p().default.playerType?"renderMode":"wmode";this.stopWithFatalError("Context3D not available! Possible reasons: wrong "+e+" or missing device support.")}else this.stopWithFatalError("Stage3D error: "+t.text)},onContextCreated:function(t){this.get_stage3D().removeEventListener("context3DCreate",s(this,this.onContextCreated)),this.get_stage3D().addEventListener("context3DCreate",s(this,this.onContextRestored),!1,10,!0),g().default.trace("[Starling] Context ready. Display Driver: "+this.get_context().driverInfo,{fileName:"Starling.hx",lineNumber:682,className:"starling.core.Starling",methodName:"onContextCreated"}),this.initialize()},onContextRestored:function(t){g().default.trace("[Starling] Context restored.",{fileName:"Starling.hx",lineNumber:688,className:"starling.core.Starling",methodName:"onContextRestored"}),this.updateViewPort(!0),this.dispatchEventWith("context3DCreate",!1,this.get_context())},onEnterFrame:function(t){this.__painter.get_shareContext()||(this.__started?this.nextFrame():this.__rendering&&this.render()),this.updateNativeOverlay()},onActivate:function(t){m().default.delay(s(this,this.setRequiresRedraw),100)},onKey:function(t){if(this.__started){var e=new(n(104).default)(t.type,t.charCode,t.keyCode,t.keyLocation,t.ctrlKey,t.altKey,t.shiftKey);this.makeCurrent(),this.__stage.dispatchEvent(e),e.isDefaultPrevented()&&t.preventDefault()}},onResize:function(t){var e=this,i=x().default.__cast(t.target,v().default).stageWidth,r=x().default.__cast(t.target,v().default).stageHeight,s=null,a=s=function(){e.makeCurrent(),e.removeEventListener("context3DCreate",s),e.__stage.dispatchEvent(new(n(105).default)("resize",i,r))};this.get_contextValid()?a():this.addEventListener("context3DCreate",a)},onBrowserZoomChange:function(t){},onMouseLeave:function(t){this.__touchProcessor.enqueueMouseLeftStage()},onTouch:function(t){if(this.__started){var e,i,s,a=null,o=1,u=1,l=1;if(_().default.is(t,r(n(265)).default)){var f=t;e=f.stageX,i=f.stageY,s=0,"mouseDown"==t.type?this.__leftMouseDown=!0:"mouseUp"==t.type&&(this.__leftMouseDown=!1)}else{var h=x().default.__cast(t,r(n(266)).default);if(this.__supportsCursor&&h.isPrimaryTouchPoint)return;e=h.stageX,i=h.stageY,s=h.touchPointID,o=h.pressure,u=h.sizeX,l=h.sizeY}switch(t.type){case"mouseDown":a="began";break;case"mouseMove":a=this.__leftMouseDown?"moved":"hover";break;case"mouseUp":a="ended";break;case"touchBegin":a="began";break;case"touchEnd":a="ended";break;case"touchMove":a="moved"}e=this.__stage.get_stageWidth()*(e-this.__viewPort.x)/this.__viewPort.width,i=this.__stage.get_stageHeight()*(i-this.__viewPort.y)/this.__viewPort.height,this.__touchProcessor.enqueue(s,a,e,i,o,u,l),"mouseUp"==t.type&&this.__supportsCursor&&this.__touchProcessor.enqueue(s,"hover",e,i)}},hitTestNativeOverlay:function(t,e){if(this.__nativeOverlay.get_numChildren()>0){var i=d().default.getPoint(),r=d().default.getMatrix(this.__nativeOverlay.get_scaleX(),0,0,this.__nativeOverlay.get_scaleY(),this.__nativeOverlay.get_x(),this.__nativeOverlay.get_y());n(18).default.transformCoords(r,t,e,i);var s=this.__nativeOverlay.hitTestPoint(i.x,i.y,!0);return d().default.putPoint(i),d().default.putMatrix(r),s}return!1},setMultitouchEnabled:function(t,e){if(null==e&&(e=!1),e||t!=this.__multitouchEnabled){for(var n=this.getTouchEventTypes(this.__multitouchEnabled),i=this.getTouchEventTypes(t),r=0;r<n.length;){var a=n[r];++r,this.__nativeStage.removeEventListener(a,s(this,this.onTouch))}for(var o=0;o<i.length;){var u=i[o];++o,this.__nativeStage.addEventListener(u,s(this,this.onTouch),!1,0,!0)}this.__touchProcessor.cancelTouches(),this.__multitouchEnabled=t}},getTouchEventTypes:function(t){var e=[];return t&&(e.push("touchBegin"),e.push("touchMove"),e.push("touchEnd")),t&&!this.__supportsCursor||(e.push("mouseDown"),e.push("mouseMove"),e.push("mouseUp")),e},get_mustAlwaysRender:function(){if(!y().default.hasField(this.__nativeStage,"context3D")||y().default.field(this.__nativeStage,"context3D")==this.get_context())return!0;if(!this.__skipUnchangedFrames||this.__painter.get_shareContext())return!0;if(w().default.get_isDesktop()&&"baselineConstrained"!=this.get_profile())return!1;var t=this.isNativeDisplayObjectEmpty(this.__nativeStage),e=!t||!this.__nativeStageEmpty;return this.__nativeStageEmpty=t,e},get_isStarted:function(){return this.__started},get_juggler:function(){return this.__juggler},get_painter:function(){return this.__painter},get_context:function(){return this.__painter.get_context()},get_simulateMultitouch:function(){return this.__touchProcessor.get_simulateMultitouch()},set_simulateMultitouch:function(t){return this.__touchProcessor.set_simulateMultitouch(t)},get_enableErrorChecking:function(){return this.__painter.get_enableErrorChecking()},set_enableErrorChecking:function(t){return this.__painter.set_enableErrorChecking(t)},get_antiAliasing:function(){return this.__antiAliasing},set_antiAliasing:function(t){return this.__antiAliasing!=t&&(this.__antiAliasing=t,this.get_contextValid()&&this.updateViewPort(!0)),t},get_viewPort:function(){return this.__viewPort},set_viewPort:function(t){return this.__viewPort.copyFrom(t),t},get_contentScaleFactor:function(){return this.__viewPort.width*this.__painter.get_backBufferScaleFactor()/this.__stage.get_stageWidth()},get_nativeOverlay:function(){return this.__nativeOverlay},get_nativeOverlayBlocksTouches:function(){return null!=this.__touchProcessor.get_occlusionTest()},set_nativeOverlayBlocksTouches:function(t){return t!=this.__nativeOverlayBlocksTouches&&this.__touchProcessor.set_occlusionTest(t?s(this,this.hitTestNativeOverlay):null),t},get_showStats:function(){return this.__showStats},set_showStats:function(t){if(this.__showStats=t,t){var e=y().default.hasField(this.__statsDisplayAlign,"horizontal")?this.__statsDisplayAlign.horizontal:null,n=y().default.hasField(this.__statsDisplayAlign,"vertical")?this.__statsDisplayAlign.vertical:null;this.showStatsAt(null!=e?e:"left",null!=n?n:"top")}else null!=this.__statsDisplay&&this.__statsDisplay.removeFromParent();return t},showStatsAt:function(t,e,i){null==i&&(i=1),null==e&&(e="top"),null==t&&(t="left");var r=this,s=null,a=s=function(){r.__showStats&&r.showStatsAt(t,e,i),r.removeEventListener("rootCreated",s)};this.__showStats=!0,this.__statsDisplayAlign.horizontal=t,this.__statsDisplayAlign.vertical=e,null==this.get_context()?this.addEventListener("rootCreated",a):(null==this.__statsDisplay&&(this.__statsDisplay=new(n(106).default),this.__statsDisplay.set_touchable(!1)),this.__stage.addChild(this.__statsDisplay),this.__statsDisplay.set_scaleX(this.__statsDisplay.set_scaleY(i)),this.updateClippedViewPort(),this.updateStatsDisplayPosition())},updateStatsDisplayPosition:function(){if(this.__showStats&&null!=this.__statsDisplay){var t=this.__statsDisplayAlign.horizontal,e=this.__statsDisplayAlign.vertical,n=this.__viewPort.width/this.__stage.get_stageWidth(),i=this.__viewPort.height/this.__stage.get_stageHeight(),r=d().default.getRectangle(this.__viewPort.x<0?-this.__viewPort.x/n:0,this.__viewPort.y<0?-this.__viewPort.y/i:0,this.__clippedViewPort.width/n,this.__clippedViewPort.height/i);if("left"==t)this.__statsDisplay.set_x(r.x);else if("right"==t)this.__statsDisplay.set_x(r.get_right()-this.__statsDisplay.get_width());else{if("center"!=t)throw new(f().default)(new(b().default)("Invalid horizontal alignment: "+t));this.__statsDisplay.set_x((r.get_right()-this.__statsDisplay.get_width())/2)}if("top"==e)this.__statsDisplay.set_y(r.y);else if("bottom"==e)this.__statsDisplay.set_y(r.get_bottom()-this.__statsDisplay.get_height());else{if("center"!=e)throw new(f().default)(new(b().default)("Invalid vertical alignment: "+e));this.__statsDisplay.set_y((r.get_bottom()-this.__statsDisplay.get_height())/2)}d().default.putRectangle(r)}},get_stage:function(){return this.__stage},get_stage3D:function(){return this.__painter.get_stage3D()},get_nativeStage:function(){return this.__nativeStage},get_root:function(){return this.__root},get_rootClass:function(){return this.__rootClass},set_rootClass:function(t){if(null!=this.__rootClass&&null!=this.__root)throw new(f().default)(new(h().default)("Root class may not change after root has been instantiated"));return null==this.__rootClass&&(this.__rootClass=t,null!=this.get_context()&&this.initializeRoot()),t},get_shareContext:function(){return this.__painter.get_shareContext()},set_shareContext:function(t){return t||this.__previousViewPort.setEmpty(),this.__painter.set_shareContext(t)},get_profile:function(){return this.__painter.get_profile()},get_supportHighResolutions:function(){return this.__supportHighResolutions},set_supportHighResolutions:function(t){return this.__supportHighResolutions!=t&&(this.__supportHighResolutions=t,this.get_contextValid()&&this.updateViewPort(!0)),t},get_supportBrowserZoom:function(){return this.__supportBrowserZoom},set_supportBrowserZoom:function(t){return this.__supportBrowserZoom!=t&&(this.__supportBrowserZoom=t),t},get_skipUnchangedFrames:function(){return this.__skipUnchangedFrames},set_skipUnchangedFrames:function(t){return this.__skipUnchangedFrames=t,this.__nativeStageEmpty=!1,t},get_touchProcessor:function(){return this.__touchProcessor},set_touchProcessor:function(t){if(null==t)throw new(f().default)(new(b().default)("TouchProcessor must not be null"));return t!=this.__touchProcessor&&(this.__touchProcessor.dispose(),this.__touchProcessor=t),t},get_discardSystemGestures:function(){return this.__touchProcessor.get_discardSystemGestures()},set_discardSystemGestures:function(t){return this.__touchProcessor.set_discardSystemGestures(t),t},get_frameID:function(){return this.__frameID},get_contextValid:function(){return this.__painter.get_contextValid()},isNativeDisplayObjectEmpty:function(t){if(null==t)return!0;if(_().default.is(t,r(n(285)).default)){for(var e=t,i=0,s=e.get_numChildren();i<s;){var a=i++;if(!this.isNativeDisplayObjectEmpty(e.getChildAt(a)))return!1}return!0}return!t.get_visible()}}),A.prototype.__class__=A.prototype.constructor=i["starling.core.Starling"]=A,Object.defineProperties(A.prototype,{touchEventTypes:{get:function(){return this.get_touchEventTypes()}},mustAlwaysRender:{get:function(){return this.get_mustAlwaysRender()}},isStarted:{get:function(){return this.get_isStarted()}},juggler:{get:function(){return this.get_juggler()}},context:{get:function(){return this.get_context()},set:function(t){return this.set_context(t)}},simulateMultitouch:{get:function(){return this.get_simulateMultitouch()},set:function(t){return this.set_simulateMultitouch(t)}},enableErrorChecking:{get:function(){return this.get_enableErrorChecking()},set:function(t){return this.set_enableErrorChecking(t)}},antiAliasing:{get:function(){return this.get_antiAliasing()},set:function(t){return this.set_antiAliasing(t)}},viewPort:{get:function(){return this.get_viewPort()},set:function(t){return this.set_viewPort(t)}},contentScaleFactor:{get:function(){return this.get_contentScaleFactor()}},nativeOverlay:{get:function(){return this.get_nativeOverlay()}},nativeOverlayBlocksTouches:{get:function(){return this.get_nativeOverlayBlocksTouches()},set:function(t){return this.set_nativeOverlayBlocksTouches(t)}},showStats:{get:function(){return this.get_showStats()},set:function(t){return this.set_showStats(t)}},stage:{get:function(){return this.get_stage()}},stage3D:{get:function(){return this.get_stage3D()}},nativeStage:{get:function(){return this.get_nativeStage()}},root:{get:function(){return this.get_root()}},rootClass:{get:function(){return this.get_rootClass()},set:function(t){return this.set_rootClass(t)}},shareContext:{get:function(){return this.get_shareContext()},set:function(t){return this.set_shareContext(t)}},profile:{get:function(){return this.get_profile()}},supportHighResolutions:{get:function(){return this.get_supportHighResolutions()},set:function(t){return this.set_supportHighResolutions(t)}},skipUnchangedFrames:{get:function(){return this.get_skipUnchangedFrames()},set:function(t){return this.set_skipUnchangedFrames(t)}},touchProcessor:{get:function(){return this.get_touchProcessor()},set:function(t){return this.set_touchProcessor(t)}},discardSystemGestures:{get:function(){return this.get_discardSystemGestures()},set:function(t){return this.set_discardSystemGestures(t)}},frameID:{get:function(){return this.get_frameID()}},contextValid:{get:function(){return this.get_contextValid()}}}),Object.defineProperties(A,{current:{get:function(){return A.get_current()}},all:{get:function(){return A.get_all()}},contentScaleFactor:{get:function(){return A.get_contentScaleFactor()}},multitouchEnabled:{get:function(){return A.get_multitouchEnabled()},set:function(t){return A.set_multitouchEnabled(t)}}}),A.get_current=function(){return A.sCurrent},A.get_all=function(){return A.sAll},A.get_multitouchEnabled=function(){for(var t="touchPoint"==T().default.inputMode,e=!1,n=0,i=A.sAll;n<i.length;){var r=i[n];++n,r.__multitouchEnabled!=t&&(e=!0)}return e&&g().default.trace("[Starling] Warning: multitouch settings are out of sync. Always set 'Starling.multitouchEnabled' instead of 'Multitouch.inputMode'.",{fileName:"Starling.hx",lineNumber:1296,className:"starling.core.Starling",methodName:"get_multitouchEnabled"}),t},A.set_multitouchEnabled=function(t){var e="touchPoint"==T().default.inputMode;T().default.inputMode=t?"touchPoint":"none";var n="touchPoint"==T().default.inputMode;if(e!=n)for(var i=0,r=A.sAll;i<r.length;){var s=r[i];++i,s.setMultitouchEnabled(n)}return t},A.VERSION=null,A.sAll=u().default._new(),e.default=A}).call(e,n(0))},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=0;e.default=function(t,e){var i,r;return null==e?null:(r=e._i=e._i||n++,null==t._c?t._c={}:i=t._c[r],null==i&&((i=function(){return i._m.apply(i._s,arguments)})._s=t,i._m=e,t._c[r]=i),i)}},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_11__},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default,r=n(2).default;function s(){return n(5)}var a=function(){};a.__name__=["starling","utils","MathUtil"],(a.prototype={}).__class__=a.prototype.constructor=i["starling.utils.MathUtil"]=a,a.intersectLineWithXYPlane=function(t,e,i){null==i&&(i=new(r(n(14)).default));var s=e.x-t.x,a=e.y-t.y,o=e.z-t.z,u=-t.z/o;return i.x=t.x+u*s,i.y=t.y+u*a,i},a.isPointInTriangle=function(t,e,n,i){var r=i.x-e.x,s=i.y-e.y,a=n.x-e.x,o=n.y-e.y,u=t.x-e.x,l=t.y-e.y,_=r*r+s*s,f=r*a+s*o,h=r*u+s*l,c=a*a+o*o,d=a*u+o*l,g=1/(_*c-f*f),p=(c*h-f*d)*g,m=(_*d-f*h)*g;return p>=0&&m>=0&&p+m<1},a.normalizeAngle=function(t){return(t%=a.TWO_PI)<-Math.PI&&(t+=a.TWO_PI),t>Math.PI&&(t-=a.TWO_PI),t},a.getNextPowerOfTwo=function(t){if(Math.round(t)==t&&t>0&&0==(s().default.int(t)&s().default.int(t-1)))return s().default.int(t);var e=1;for(t-=1e-9;e<t;)e<<=1;return e},a.isEquivalent=function(t,e,n){return null==n&&(n=1e-4),t-n<e&&t+n>e},a.max=function(t,e){return t>e?t:e},a.min=function(t,e){return t<e?t:e},a.clamp=function(t,e,n){return t<e?e:t>n?n:t},a.minValues=function(t){if(0==t.length)return 0;for(var e=t[0],n=1,i=t.length;n<i;){var r=n++;t[r]<e&&(e=t[r])}return e},a.deg2rad=function(t){return t/180*Math.PI},a.rad2deg=function(t){return t/Math.PI*180},a.toFixed=function(t,e){var n=t>0?1:-1,i=e<=0?1:10*e;return s().default.string(n*Math.round(t*i)/i)},a.TWO_PI=2*Math.PI,e.default=a}).call(e,n(0))},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_13__},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_14__},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default;n(2).default;var r=function(){};r.__name__=["HxOverrides"],(r.prototype={}).__class__=r.prototype.constructor=i.HxOverrides=r,r.dateStr=function(t){var e=t.getMonth()+1,n=t.getDate(),i=t.getHours(),r=t.getMinutes(),s=t.getSeconds();return t.getFullYear()+"-"+(e<10?"0"+e:""+e)+"-"+(n<10?"0"+n:""+n)+" "+(i<10?"0"+i:""+i)+":"+(r<10?"0"+r:""+r)+":"+(s<10?"0"+s:""+s)},r.strDate=function(t){switch(t.length){case 8:var e=t.split(":"),i=new Date;return i.setTime(0),i.setUTCHours(e[0]),i.setUTCMinutes(e[1]),i.setUTCSeconds(e[2]),i;case 10:var r=t.split("-");return new Date(r[0],r[1]-1,r[2],0,0,0);case 19:var s=t.split(" "),a=s[0].split("-"),o=s[1].split(":");return new Date(a[0],a[1]-1,a[2],o[0],o[1],o[2]);default:throw new(n(4).default)("Invalid date format : "+t)}},r.cca=function(t,e){var i=t.charCodeAt(e);return i!=i?n(259).default.get_undefined():i},r.substr=function(t,e,n){if(null==n)n=t.length;else if(n<0){if(0!=e)return"";n=t.length+n}return t.substr(e,n)},r.indexOf=function(t,e,n){var i=t.length;for(n<0&&(n+=i)<0&&(n=0);n<i;){if(t[n]===e)return n;++n}return-1},r.lastIndexOf=function(t,e,n){var i=t.length;for(n>=i?n=i-1:n<0&&(n+=i);n>=0;){if(t[n]===e)return n;--n}return-1},r.remove=function(t,e){var n=t.indexOf(e);return-1!=n&&(t.splice(n,1),!0)},r.iter=function(t){return{cur:0,arr:t,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}},e.default=r}).call(e,n(0))},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default;n(2).default;function r(){return n(8)}var s=function(){};s.__name__=["Reflect"],(s.prototype={}).__class__=s.prototype.constructor=i.Reflect=s,s.hasField=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.field=function(t,e){try{return t[e]}catch(t){return null}},s.setField=function(t,e,n){t[e]=n},s.getProperty=function(t,e){var n;return null==t?null:!!t.__properties__&&(n=t.__properties__["get_"+e])?t[n]():t[e]},s.setProperty=function(t,e,n){var i;!!t.__properties__&&(i=t.__properties__["set_"+e])?t[i](n):t[e]=n},s.callMethod=function(t,e,n){return e.apply(t,n)},s.fields=function(t){var e=[];if(null!=t){var n=Object.prototype.hasOwnProperty;for(var i in t)"__id__"!=i&&"hx__closures__"!=i&&n.call(t,i)&&e.push(i)}return e},s.isFunction=function(t){return"function"==typeof t&&!(r().default.isClass(t)||r().default.isEnum(t))},s.compare=function(t,e){return t==e?0:t>e?1:-1},s.compareMethods=function(t,e){return t==e||!(!s.isFunction(t)||!s.isFunction(e))&&(t.scope==e.scope&&t.method==e.method&&null!=t.method)},s.isObject=function(t){if(null==t)return!1;var e=typeof t;return"string"==e||"object"==e&&null==t.__enum__||"function"==e&&null!=(r().default.isClass(t)||r().default.isEnum(t))},s.isEnumValue=function(t){return null!=t&&null!=t.__enum__},s.deleteField=function(t,e){return!!s.hasField(t,e)&&(delete t[e],!0)},s.copy=function(t){for(var e={},n=0,i=s.fields(t);n<i.length;){var r=i[n];++n,s.setField(e,r,s.field(t,r))}return e},s.makeVarArgs=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t(e)}},e.default=s}).call(e,n(0))},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_17__},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default,r=n(2).default;function s(){return n(6)}function a(){return r(n(27))}function o(){return r(n(24))}function u(){return r(n(17))}function l(){return n(12)}var _=function(){};_.__name__=["starling","utils","MatrixUtil"],(_.prototype={}).__class__=_.prototype.constructor=i["starling.utils.MatrixUtil"]=_,_.convertTo3D=function(t,e){return null==e&&(e=new(o().default)),s().default.set(_.sRawData,0,t.a),s().default.set(_.sRawData,1,t.b),s().default.set(_.sRawData,4,t.c),s().default.set(_.sRawData,5,t.d),s().default.set(_.sRawData,12,t.tx),s().default.set(_.sRawData,13,t.ty),e.copyRawDataFrom(_.sRawData),e},_.convertTo2D=function(t,e){return null==e&&(e=new(u().default)),t.copyRawDataTo(_.sRawData2),e.a=_.sRawData2[0],e.b=_.sRawData2[1],e.c=_.sRawData2[4],e.d=_.sRawData2[5],e.tx=_.sRawData2[12],e.ty=_.sRawData2[13],e},_.isIdentity=function(t){return 1==t.a&&0==t.b&&0==t.c&&1==t.d&&0==t.tx&&0==t.ty},_.isIdentity3D=function(t){var e=_.sRawData2;return t.copyRawDataTo(e),1==e[0]&&0==e[1]&&0==e[2]&&0==e[3]&&0==e[4]&&1==e[5]&&0==e[6]&&0==e[7]&&0==e[8]&&0==e[9]&&1==e[10]&&0==e[11]&&0==e[12]&&0==e[13]&&0==e[14]&&1==e[15]},_.transformPoint=function(t,e,n){return _.transformCoords(t,e.x,e.y,n)},_.transformPoint3D=function(t,e,n){return _.transformCoords3D(t,e.x,e.y,e.z,n)},_.transformCoords=function(t,e,i,s){return null==s&&(s=new(r(n(14)).default)),s.x=t.a*e+t.c*i+t.tx,s.y=t.d*i+t.b*e+t.ty,s},_.transformCoords3D=function(t,e,n,i,r){return null==r&&(r=new(a().default)),t.copyRawDataTo(_.sRawData2),r.x=e*_.sRawData2[0]+n*_.sRawData2[4]+i*_.sRawData2[8]+_.sRawData2[12],r.y=e*_.sRawData2[1]+n*_.sRawData2[5]+i*_.sRawData2[9]+_.sRawData2[13],r.z=e*_.sRawData2[2]+n*_.sRawData2[6]+i*_.sRawData2[10]+_.sRawData2[14],r.w=e*_.sRawData2[3]+n*_.sRawData2[7]+i*_.sRawData2[11]+_.sRawData2[15],r},_.skew=function(t,e,n){var i=Math.sin(e),r=Math.cos(e),s=Math.sin(n),a=Math.cos(n);t.setTo(t.a*a-t.b*i,t.a*s+t.b*r,t.c*a-t.d*i,t.c*s+t.d*r,t.tx*a-t.ty*i,t.tx*s+t.ty*r)},_.prependMatrix=function(t,e){t.setTo(t.a*e.a+t.c*e.b,t.b*e.a+t.d*e.b,t.a*e.c+t.c*e.d,t.b*e.c+t.d*e.d,t.tx+t.a*e.tx+t.c*e.ty,t.ty+t.b*e.tx+t.d*e.ty)},_.prependTranslation=function(t,e,n){t.tx+=t.a*e+t.c*n,t.ty+=t.b*e+t.d*n},_.prependScale=function(t,e,n){t.setTo(t.a*e,t.b*e,t.c*n,t.d*n,t.tx,t.ty)},_.prependRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);t.setTo(t.a*i+t.c*n,t.b*i+t.d*n,t.c*i-t.a*n,t.d*i-t.b*n,t.tx,t.ty)},_.prependSkew=function(t,e,n){var i=Math.sin(e),r=Math.cos(e),s=Math.sin(n),a=Math.cos(n);t.setTo(t.a*a+t.c*s,t.b*a+t.d*s,t.c*r-t.a*i,t.d*r-t.b*i,t.tx,t.ty)},_.toString3D=function(t,e,n){return null==n&&(n=3),null==e&&(e=!0),e&&t.transpose(),t.copyRawDataTo(_.sRawData2),e&&t.transpose(),"[Matrix3D rawData=\n"+_.formatRawData(_.sRawData2,4,4,n)+"\n]"},_.toString=function(t,e){return null==e&&(e=3),s().default.set(_.sRawData2,0,t.a),s().default.set(_.sRawData2,1,t.c),s().default.set(_.sRawData2,2,t.tx),s().default.set(_.sRawData2,3,t.b),s().default.set(_.sRawData2,4,t.d),s().default.set(_.sRawData2,5,t.ty),"[Matrix rawData=\n"+_.formatRawData(_.sRawData2,3,2,e)+"\n]"},_.formatRawData=function(t,e,n,i,r){null==r&&(r=" ");for(var s,a,o=r,u=0,_=0,f=e*n;_<f;){var h=_++;(a=Math.abs(t[h]))>u&&(u=a)}for(var c=l().default.toFixed(u,i).length+1,d=0,g=n;d<g;){for(var p=d++,m=0,x=e;m<x;){var v=m++;for(a=t[e*p+v],s=l().default.toFixed(a,i);s.length<c;)s=" "+s;o+=s,v!=e-1&&(o+=", ")}p!=n-1&&(o+="\n"+r)}return o},_.snapToPixels=function(t,e){var n,i,r,s,a=1e-4,o=!1;t.b+a>0&&t.b-a<0&&t.c+a>0&&t.c-a<0?(n=t.a*t.a,s=t.d*t.d,o=n+a>1&&n-a<1&&s+a>1&&s-a<1):t.a+a>0&&t.a-a<0&&t.d+a>0&&t.d-a<0&&(i=t.b*t.b,r=t.c*t.c,o=i+a>1&&i-a<1&&r+a>1&&r-a<1),o&&(t.tx=Math.round(t.tx/e)*e,t.ty=Math.round(t.ty/e)*e)},_.createPerspectiveProjectionMatrix=function(t,e,n,i,r,a,u,l){null==a&&(a=0),null==r&&(r=0),null==l&&(l=new(o().default)),r<=0&&(r=n),a<=0&&(a=i),null==u&&(u=_.sPoint3D).setTo(r/2,a/2,r/Math.tan(.5)*.5);var f=Math.abs(u.z),h=u.x-r/2,c=u.y-a/2,d=20*f,g=r/n,p=a/i;s().default.set(_.sMatrixData,0,2*f/r),s().default.set(_.sMatrixData,5,-2*f/a),s().default.set(_.sMatrixData,10,d/(d-1)),s().default.set(_.sMatrixData,14,1*-d/(d-1)),s().default.set(_.sMatrixData,11,1);var m=_.sMatrixData;s().default.set(m,0,m[0]*g);var x=_.sMatrixData;return s().default.set(x,5,x[5]*p),s().default.set(_.sMatrixData,8,g-1-2*g*(t-h)/r),s().default.set(_.sMatrixData,9,1-p+2*p*(e-c)/a),l.copyRawDataFrom(_.sMatrixData),l.prependTranslation(-r/2-h,-a/2-c,f),l},_.createOrthographicProjectionMatrix=function(t,e,n,i,r){return null==r&&(r=new(u().default)),r.setTo(2/n,0,0,-2/i,-(2*t+n)/n,(2*e+i)/i),r},_.sRawData=s().default._new(null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),_.sRawData2=s().default._new(16,!0),_.sPoint3D=new(a().default),_.sMatrixData=s().default._new(null,null,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),e.default=_}).call(e,n(0))},function(t,e,n){(function(t){("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Object.defineProperty(e,"__esModule",{value:!0});var i=n(1).default;n(2).default;function r(){return n(8)}function s(){return n(4)}function a(){return n(16)}function o(){return n(15)}function u(){return n(262)}var l=function(){};l.__name__=["Type"],(l.prototype={}).__class__=l.prototype.constructor=i.Type=l,l.getClass=function(t){return null==t?null:r().default.getClass(t)},l.getEnum=function(t){return null==t?null:t.__enum__},l.getSuperClass=function(t){return t.__super__},l.getClassName=function(t){var e=t.__name__;return null==e?null:e.join(".")},l.getEnumName=function(t){return t.__ename__.join(".")},l.resolveClass=function(t){var e=i[t];return null!=e&&r().default.isClass(e)?e:null},l.resolveEnum=function(t){var e=i[t];return null!=e&&r().default.isEnum(e)?e:null},l.createInstance=function(t,e){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6]);case 8:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]);case 9:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]);case 10:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9]);case 11:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10]);case 12:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11]);case 13:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12]);case 14:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13]);default:throw new(s().default)("Too many arguments")}},l.createEmptyInstance=function(t){function e(){}return e.prototype=t.prototype,new e},l.createEnum=function(t,e,n){var i=a().default.field(t,e);if(null==i)throw new(s().default)("No such constructor "+e);if(a().default.isFunction(i)){if(null==n)throw new(s().default)("Constructor "+e+" need parameters");return a().default.callMethod(t,i,n)}if(null!=n&&0!=n.length)throw new(s().default)("Constructor "+e+" does not need parameters");return i},l.createEnumIndex=function(t,e,n){var i=t.__constructs__[e];if(null==i)throw new(s().default)(e+" is not a valid enum constructor index");return l.createEnum(t,i,n)},l.getInstanceFields=function(t){var e=[];for(var n in t.prototype)e.push(n);return o().default.remove(e,"__class__"),o().default.remove(e,"__properties__"),e},l.getClassFields=function(t){var e=a().default.fields(t);return o().default.remove(e,"__name__"),o().default.remove(e,"__interfaces__"),o().default.remove(e,"__properties__"),o().default.remove(e,"__super__"),o().default.remove(e,"__meta__"),o().default.remove(e,"prototype"),e},l.ge