/* SAT.js - Version 0.5.0 - Copyright 2012 - 2015 - Jim Riecken - released under the MIT License. https://github.com/jriecken/sat-js */ var egret; (function(c){c.egret_string_code={};c.egret_string_code[-1]="\u4e0d\u5b58\u5728\u7684stringId:{0}";c.egret_string_code[1E3]="Browser.isMobile\u63a5\u53e3\u53c2\u6570\u5df2\u7ecf\u53d8\u66f4\uff0c\u8bf7\u5c3d\u5feb\u8c03\u6574\u7528\u6cd5\u4e3a egret.MainContext.deviceType == egret.MainContext.DEVICE_MOBILE";c.egret_string_code[1001]="\u8be5\u65b9\u6cd5\u76ee\u524d\u4e0d\u5e94\u4f20\u5165 resolutionPolicy \u53c2\u6570\uff0c\u8bf7\u5728 docs/1.0_Final_ReleaseNote\u4e2d\u67e5\u770b\u5982\u4f55\u5347\u7ea7";c.egret_string_code[1002]= "egret.Ticker\u662f\u6846\u67b6\u5185\u90e8\u4f7f\u7528\u7684\u5355\u4f8b\uff0c\u4e0d\u5141\u8bb8\u5728\u5916\u90e8\u5b9e\u4f8b\u5316\uff0c\u8ba1\u65f6\u5668\u8bf7\u4f7f\u7528egret.Timer\u7c7b\uff01";c.egret_string_code[1003]="Ticker#setTimeout\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03,\u8bf7\u4f7f\u7528egret.setTimeout";c.egret_string_code[1004]="ExternalInterface\u8c03\u7528\u4e86js\u6ca1\u6709\u6ce8\u518c\u7684\u65b9\u6cd5: {0}";c.egret_string_code[1005]="\u8bbe\u7f6e\u4e86\u5df2\u7ecf\u5b58\u5728\u7684blendMode: {0}"; c.egret_string_code[1006]="child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185";c.egret_string_code[1007]="\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4";c.egret_string_code[1008]="child\u672a\u88abaddChild\u5230\u8be5parent";c.egret_string_code[1009]="\u8bbe\u7f6e\u4e86\u5df2\u7ecf\u5b58\u5728\u7684\u9002\u914d\u6a21\u5f0f:{0}";c.egret_string_code[1010]="addEventListener\u4fa6\u542c\u51fd\u6570\u4e0d\u80fd\u4e3a\u7a7a";c.egret_string_code[1011]='BitmapText\u627e\u4e0d\u5230\u6587\u5b57\u6240\u5bf9\u5e94\u7684\u7eb9\u7406:"{0}"'; c.egret_string_code[1012]="egret.BitmapTextSpriteSheet\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.BitmapFont\u4ee3\u66ff\u3002";c.egret_string_code[1013]="TextField.setFocus \u6ca1\u6709\u5b9e\u73b0";c.egret_string_code[1014]="Ease\u4e0d\u80fd\u88ab\u5b9e\u4f8b\u5316";c.egret_string_code[1015]="xml not found!";c.egret_string_code[1016]="{0}\u5df2\u7ecf\u5e9f\u5f03";c.egret_string_code[1017]="JSON\u6587\u4ef6\u683c\u5f0f\u4e0d\u6b63\u786e: {0}\ndata: {1}";c.egret_string_code[1018]="egret_html5_localStorage.setItem\u4fdd\u5b58\u5931\u8d25,key={0}&value={1}"; c.egret_string_code[1019]="\u7f51\u7edc\u5f02\u5e38:{0}";c.egret_string_code[1020]="\u65e0\u6cd5\u521d\u59cb\u5316\u7740\u8272\u5668";c.egret_string_code[1021]="\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301webgl";c.egret_string_code[1022]="{0} ArgumentError";c.egret_string_code[1023]="\u6b64\u65b9\u6cd5\u5728ScrollView\u5185\u4e0d\u53ef\u7528!";c.egret_string_code[1024]="\u4f7f\u7528\u4e86\u5c1a\u672a\u5b9e\u73b0\u7684ScaleMode";c.egret_string_code[1025]="\u9047\u5230\u6587\u4ef6\u5c3e";c.egret_string_code[1026]= "EncodingError! The code point {0} could not be encoded.";c.egret_string_code[1027]="DecodingError";c.egret_string_code[1028]="\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:{0}\u3002 \u8bf7\u5148\u5728\u9879\u76ee\u521d\u59cb\u5316\u91cc\u914d\u7f6e\u6307\u5b9a\u7684\u6ce8\u5165\u89c4\u5219\uff0c\u518d\u8c03\u7528\u5bf9\u5e94\u5355\u4f8b\u3002";c.egret_string_code[1029]="Function.prototype.bind - what is trying to be bound is not callable";c.egret_string_code[1030]="\u8be5API\u5df2\u5e9f\u5f03"; c.egret_string_code[1031]="setVolume\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528this.volume = value\u4ee3\u66ff";c.egret_string_code[1032]="getVolume\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528this.volume\u4ee3\u66ff";c.egret_string_code[2E3]="RES.createGroup()\u4f20\u5165\u4e86\u914d\u7f6e\u4e2d\u4e0d\u5b58\u5728\u7684\u952e\u503c: {0}";c.egret_string_code[2001]='RES\u52a0\u8f7d\u4e86\u4e0d\u5b58\u5728\u6216\u7a7a\u7684\u8d44\u6e90\u7ec4:"{0}"';c.egret_string_code[3E3]="\u4e3b\u9898\u914d\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25: {0}"; c.egret_string_code[3001]="\u627e\u4e0d\u5230\u4e3b\u9898\u4e2d\u6240\u914d\u7f6e\u7684\u76ae\u80a4\u7c7b\u540d: {0}";c.egret_string_code[3002]='\u7d22\u5f15:"{0}"\u8d85\u51fa\u96c6\u5408\u5143\u7d20\u7d22\u5f15\u8303\u56f4';c.egret_string_code[3003]="\u5728\u6b64\u7ec4\u4ef6\u4e2d\u4e0d\u53ef\u7528\uff0c\u82e5\u6b64\u7ec4\u4ef6\u4e3a\u5bb9\u5668\u7c7b\uff0c\u8bf7\u4f7f\u7528";c.egret_string_code[3004]="addChild(){0}addElement()\u4ee3\u66ff";c.egret_string_code[3005]="addChildAt(){0}addElementAt()\u4ee3\u66ff"; c.egret_string_code[3006]="removeChild(){0}removeElement()\u4ee3\u66ff";c.egret_string_code[3007]="removeChildAt(){0}removeElementAt()\u4ee3\u66ff";c.egret_string_code[3008]="setChildIndex(){0}setElementIndex()\u4ee3\u66ff";c.egret_string_code[3009]="swapChildren(){0}swapElements()\u4ee3\u66ff";c.egret_string_code[3010]="swapChildrenAt(){0}swapElementsAt()\u4ee3\u66ff";c.egret_string_code[3011]='\u7d22\u5f15:"{0}"\u8d85\u51fa\u53ef\u89c6\u5143\u7d20\u7d22\u5f15\u8303\u56f4';c.egret_string_code[3012]= "\u6b64\u65b9\u6cd5\u5728Scroller\u7ec4\u4ef6\u5185\u4e0d\u53ef\u7528!";c.egret_string_code[3013]="UIStage\u662fGUI\u6839\u5bb9\u5668\uff0c\u53ea\u80fd\u6709\u4e00\u4e2a\u6b64\u5b9e\u4f8b\u5728\u663e\u793a\u5217\u8868\u4e2d\uff01";c.egret_string_code[3014]="propNotPropOrStyle";c.egret_string_code[4E3]="An Bone cannot be added as a child to itself or one of its children (or children's children, etc.)";c.egret_string_code[4001]="Abstract class can not be instantiated!";c.egret_string_code[4002]="Unnamed data!"; c.egret_string_code[4003]="Nonsupport version!";c.egret_string_code[4004]="Abstract method needs to be implemented in subclass!";c.egret_string_code[3100]="\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301WebSocket";c.egret_string_code[3101]="\u8bf7\u5148\u8fde\u63a5WebSocket";c.egret_string_code[3102]="\u8bf7\u5148\u8bbe\u7f6etype\u4e3a\u4e8c\u8fdb\u5236\u7c7b\u578b"})(egret||(egret={})); (function(c){c.egret_string_code={};c.egret_string_code[-1]="\u4e0d\u5b58\u5728\u7684stringId:{0}";c.egret_string_code[1E3]="Browser.isMobile\u63a5\u53e3\u53c2\u6570\u5df2\u7ecf\u53d8\u66f4\uff0c\u8bf7\u5c3d\u5feb\u8c03\u6574\u7528\u6cd5\u4e3a egret.MainContext.deviceType == egret.MainContext.DEVICE_MOBILE";c.egret_string_code[1001]="\u8be5\u65b9\u6cd5\u76ee\u524d\u4e0d\u5e94\u4f20\u5165 resolutionPolicy \u53c2\u6570\uff0c\u8bf7\u5728 docs/1.0_Final_ReleaseNote\u4e2d\u67e5\u770b\u5982\u4f55\u5347\u7ea7"; c.egret_string_code[1002]="egret.Ticker\u662f\u6846\u67b6\u5185\u90e8\u4f7f\u7528\u7684\u5355\u4f8b\uff0c\u4e0d\u5141\u8bb8\u5728\u5916\u90e8\u5b9e\u4f8b\u5316\uff0c\u8ba1\u65f6\u5668\u8bf7\u4f7f\u7528egret.Timer\u7c7b\uff01";c.egret_string_code[1003]="Ticker#setTimeout\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03,\u8bf7\u4f7f\u7528egret.setTimeout";c.egret_string_code[1004]="ExternalInterface\u8c03\u7528\u4e86js\u6ca1\u6709\u6ce8\u518c\u7684\u65b9\u6cd5: {0}";c.egret_string_code[1005]="\u8bbe\u7f6e\u4e86\u5df2\u7ecf\u5b58\u5728\u7684blendMode: {0}"; c.egret_string_code[1006]="child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185";c.egret_string_code[1007]="\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4";c.egret_string_code[1008]="child\u672a\u88abaddChild\u5230\u8be5parent";c.egret_string_code[1009]="\u8bbe\u7f6e\u4e86\u5df2\u7ecf\u5b58\u5728\u7684\u9002\u914d\u6a21\u5f0f:{0}";c.egret_string_code[1010]="addEventListener\u4fa6\u542c\u51fd\u6570\u4e0d\u80fd\u4e3a\u7a7a";c.egret_string_code[1011]='BitmapText\u627e\u4e0d\u5230\u6587\u5b57\u6240\u5bf9\u5e94\u7684\u7eb9\u7406:"{0}"'; c.egret_string_code[1012]="egret.BitmapTextSpriteSheet\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.BitmapFont\u4ee3\u66ff\u3002";c.egret_string_code[1013]="TextField.setFocus \u6ca1\u6709\u5b9e\u73b0";c.egret_string_code[1014]="Ease\u4e0d\u80fd\u88ab\u5b9e\u4f8b\u5316";c.egret_string_code[1015]="xml not found!";c.egret_string_code[1016]="{0}\u5df2\u7ecf\u5e9f\u5f03";c.egret_string_code[1017]="JSON\u6587\u4ef6\u683c\u5f0f\u4e0d\u6b63\u786e: {0}\ndata: {1}";c.egret_string_code[1018]="egret_html5_localStorage.setItem\u4fdd\u5b58\u5931\u8d25,key={0}&value={1}"; c.egret_string_code[1019]="\u7f51\u7edc\u5f02\u5e38:{0}";c.egret_string_code[1020]="\u65e0\u6cd5\u521d\u59cb\u5316\u7740\u8272\u5668";c.egret_string_code[1021]="\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301webgl";c.egret_string_code[1022]="{0} ArgumentError";c.egret_string_code[1023]="\u6b64\u65b9\u6cd5\u5728ScrollView\u5185\u4e0d\u53ef\u7528!";c.egret_string_code[1024]="\u4f7f\u7528\u4e86\u5c1a\u672a\u5b9e\u73b0\u7684ScaleMode";c.egret_string_code[1025]="\u9047\u5230\u6587\u4ef6\u5c3e";c.egret_string_code[1026]= "EncodingError! The code point {0} could not be encoded.";c.egret_string_code[1027]="DecodingError";c.egret_string_code[1028]="\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:{0}\u3002 \u8bf7\u5148\u5728\u9879\u76ee\u521d\u59cb\u5316\u91cc\u914d\u7f6e\u6307\u5b9a\u7684\u6ce8\u5165\u89c4\u5219\uff0c\u518d\u8c03\u7528\u5bf9\u5e94\u5355\u4f8b\u3002";c.egret_string_code[1029]="Function.prototype.bind - what is trying to be bound is not callable";c.egret_string_code[1030]="\u8be5API\u5df2\u5e9f\u5f03"; c.egret_string_code[1031]="setVolume\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528this.volume = value\u4ee3\u66ff";c.egret_string_code[1032]="getVolume\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528this.volume\u4ee3\u66ff";c.egret_string_code[2E3]="RES.createGroup()\u4f20\u5165\u4e86\u914d\u7f6e\u4e2d\u4e0d\u5b58\u5728\u7684\u952e\u503c: {0}";c.egret_string_code[2001]='RES\u52a0\u8f7d\u4e86\u4e0d\u5b58\u5728\u6216\u7a7a\u7684\u8d44\u6e90\u7ec4:"{0}"';c.egret_string_code[3E3]="\u4e3b\u9898\u914d\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25: {0}"; c.egret_string_code[3001]="\u627e\u4e0d\u5230\u4e3b\u9898\u4e2d\u6240\u914d\u7f6e\u7684\u76ae\u80a4\u7c7b\u540d: {0}";c.egret_string_code[3002]='\u7d22\u5f15:"{0}"\u8d85\u51fa\u96c6\u5408\u5143\u7d20\u7d22\u5f15\u8303\u56f4';c.egret_string_code[3003]="\u5728\u6b64\u7ec4\u4ef6\u4e2d\u4e0d\u53ef\u7528\uff0c\u82e5\u6b64\u7ec4\u4ef6\u4e3a\u5bb9\u5668\u7c7b\uff0c\u8bf7\u4f7f\u7528";c.egret_string_code[3004]="addChild(){0}addElement()\u4ee3\u66ff";c.egret_string_code[3005]="addChildAt(){0}addElementAt()\u4ee3\u66ff"; c.egret_string_code[3006]="removeChild(){0}removeElement()\u4ee3\u66ff";c.egret_string_code[3007]="removeChildAt(){0}removeElementAt()\u4ee3\u66ff";c.egret_string_code[3008]="setChildIndex(){0}setElementIndex()\u4ee3\u66ff";c.egret_string_code[3009]="swapChildren(){0}swapElements()\u4ee3\u66ff";c.egret_string_code[3010]="swapChildrenAt(){0}swapElementsAt()\u4ee3\u66ff";c.egret_string_code[3011]='\u7d22\u5f15:"{0}"\u8d85\u51fa\u53ef\u89c6\u5143\u7d20\u7d22\u5f15\u8303\u56f4';c.egret_string_code[3012]= "\u6b64\u65b9\u6cd5\u5728Scroller\u7ec4\u4ef6\u5185\u4e0d\u53ef\u7528!";c.egret_string_code[3013]="UIStage\u662fGUI\u6839\u5bb9\u5668\uff0c\u53ea\u80fd\u6709\u4e00\u4e2a\u6b64\u5b9e\u4f8b\u5728\u663e\u793a\u5217\u8868\u4e2d\uff01";c.egret_string_code[3014]="propNotPropOrStyle";c.egret_string_code[4E3]="An Bone cannot be added as a child to itself or one of its children (or children's children, etc.)";c.egret_string_code[4001]="Abstract class can not be instantiated!";c.egret_string_code[4002]="Unnamed data!"; c.egret_string_code[4003]="Nonsupport version!";c.egret_string_code[4004]="Abstract method needs to be implemented in subclass!";c.egret_string_code[3100]="\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301WebSocket";c.egret_string_code[3101]="\u8bf7\u5148\u8fde\u63a5WebSocket";c.egret_string_code[3102]="\u8bf7\u5148\u8bbe\u7f6etype\u4e3a\u4e8c\u8fdb\u5236\u7c7b\u578b"})(egret||(egret={})); var __extends=this.__extends||function(c,f){function e(){this.constructor=c}for(var d in f)f.hasOwnProperty(d)&&(c[d]=f[d]);e.prototype=f.prototype;c.prototype=new e}; (function(c){function f(d){for(var b=[],a=1;aa&&(a=1);this.autoDisposeTime=a;this.frameCount=0}__extends(d,c);var b=d.prototype;b._checkFrame=function(){this.frameCount--;0>=this.frameCount&&this.dispose()};Object.defineProperty(b,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});b.push=function(a){var g=this.objectPool;-1==g.indexOf(a)&&(g.push(a),a.__recycle&&a.__recycle(),this._length++,0==this.frameCount&& (this.frameCount=this.autoDisposeTime,d._callBackList.push(this)))};b.pop=function(){if(0==this._length)return null;this._length--;return this.objectPool.pop()};b.dispose=function(){0= this._maxDeltaTime){b=this._preDrawCount.toString();var a=Math.ceil(this._logicPerformanceCost).toString()+","+Math.ceil(this._updateTransformPerformanceCost).toString()+","+Math.ceil(this._renderPerformanceCost).toString()+","+Math.ceil(c.MainContext.instance.rendererContext.renderCost).toString();this._txt.text="draw:"+b+"\ncost:"+a+"\nFPS:"+Math.floor(1E3*this._tick/this._totalDeltaTime).toString();this._tick=this._totalDeltaTime=0}this._preDrawCount=0;this._calculatePreDrawCount=!0};d.onDrawImage= function(){this._calculatePreDrawCount&&this._preDrawCount++};return e}();c.Profiler=f;f.prototype.__class__="egret.Profiler"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this._timeScale=1;this._paused=!1;this._callIndex=-1;this.callBackList=[];null!=d.instance&&c.$error(1002)}__extends(d,e);var b=d.prototype;b.run=function(){c.__START_TIME=(new Date).getTime();c.MainContext.instance.deviceContext.executeMainLoop(this.update,this)};b.update=function(a){if(!this._paused){a*=this._timeScale;this._callList=this.callBackList.concat();for(this._callIndex=0;this._callIndexthis.delay&&(this.lastTime=a,this._currentCount++,c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER),0=this.repeatCount&&(this.stop(),c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER_COMPLETE)))}; return d}(c.EventDispatcher);c.Timer=f;f.prototype.__class__="egret.Timer"})(egret||(egret={})); (function(c){function f(c){c=c.prototype?c.prototype:Object.getPrototypeOf(c);if(c.hasOwnProperty("__class__"))return c.__class__;var d=c.constructor.toString(),b=d.indexOf("("),d=d.substring(9,b);Object.defineProperty(c,"__class__",{value:d,enumerable:!1,writable:!0});return d}c.getQualifiedClassName=f;c.getQualifiedSuperclassName=function(c){c=c.prototype?c.prototype:Object.getPrototypeOf(c);if(c.hasOwnProperty("__superclass__"))return c.__superclass__;var d=Object.getPrototypeOf(c);if(null==d)return null; d=f(d.constructor);if(!d)return null;Object.defineProperty(c,"__superclass__",{value:d,enumerable:!1,writable:!0});return d}})(egret||(egret={}));(function(c){var f={};c.getDefinitionByName=function(c){if(!c)return null;var d=f[c];if(d)return d;for(var b=c.split("."),a=b.length,d=__global,g=0;g=g.delay&&(g.listener.apply(g.thisObject,g.params),delete e[a])}}var e={},d=0;c.setTimeout=function(b,a,g){for(var u=[],r=3;r=g.delay&&(g.delay=g.originDelay,g.listener.apply(g.thisObject,g.params))}}var e={},d=0;c.setInterval=function(b,a,g){for(var u=[],r=3;rc)c=0;16777215c.length;)c="0"+c;return"#"+c}})(egret||(egret={})); (function(c){var f=function(e){function d(a,g,b,c,d,k){void 0===a&&(a=1);void 0===g&&(g=0);void 0===b&&(b=0);void 0===c&&(c=1);void 0===d&&(d=0);void 0===k&&(k=0);e.call(this);this.a=a;this.b=g;this.c=b;this.d=c;this.tx=d;this.ty=k}__extends(d,e);var b=d.prototype;b.prepend=function(a,g,b,c,d,e){var f=this.tx;if(1!=a||0!=g||0!=b||1!=c){var l=this.a,m=this.c;this.a=l*a+this.b*b;this.b=l*g+this.b*c;this.c=m*a+this.d*b;this.d=m*g+this.d*c}this.tx=f*a+this.ty*b+d;this.ty=f*g+this.ty*c+e;return this}; b.append=function(a,g,b,c,d,e){var f=this.a,l=this.b,m=this.c,n=this.d;if(1!=a||0!=g||0!=b||1!=c)this.a=a*f+g*m,this.b=a*l+g*n,this.c=b*f+c*m,this.d=b*l+c*n;this.tx=d*f+e*m+this.tx;this.ty=d*l+e*n+this.ty;return this};b.prependTransform=function(a,g,b,d,e,k,f,l,m){if(e%360){var n=c.NumberUtils.cos(e);e=c.NumberUtils.sin(e)}else n=1,e=0;if(l||m)this.tx-=l,this.ty-=m;k||f?(this.prepend(n*b,e*b,-e*d,n*d,0,0),this.prepend(c.NumberUtils.cos(f),c.NumberUtils.sin(f),-c.NumberUtils.sin(k),c.NumberUtils.cos(k), a,g)):this.prepend(n*b,e*b,-e*d,n*d,a,g);return this};b.appendTransform=function(a,g,b,d,e,k,f,l,m){if(e%360){var n=c.NumberUtils.cos(e);e=c.NumberUtils.sin(e)}else n=1,e=0;k||f?(this.append(c.NumberUtils.cos(f),c.NumberUtils.sin(f),-c.NumberUtils.sin(k),c.NumberUtils.cos(k),a,g),this.append(n*b,e*b,-e*d,n*d,0,0)):this.append(n*b,e*b,-e*d,n*d,a,g);if(l||m)this.tx-=l*this.a+m*this.c,this.ty-=l*this.b+m*this.d;return this};b.rotate=function(a){var g=Math.cos(a);a=Math.sin(a);var b=this.a,c=this.c,d= this.tx;this.a=b*g-this.b*a;this.b=b*a+this.b*g;this.c=c*g-this.d*a;this.d=c*a+this.d*g;this.tx=d*g-this.ty*a;this.ty=d*a+this.ty*g;return this};b.skew=function(a,g){this.append(c.NumberUtils.cos(g),c.NumberUtils.sin(g),-c.NumberUtils.sin(a),c.NumberUtils.cos(a),0,0);return this};b.scale=function(a,g){this.a*=a;this.d*=g;this.c*=a;this.b*=g;this.tx*=a;this.ty*=g;return this};b.translate=function(a,g){this.tx+=a;this.ty+=g;return this};b.identity=function(){this.a=this.d=1;this.b=this.c=this.tx=this.ty= 0;return this};b.identityMatrix=function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty;return this};b.invert=function(){var a=this.a,g=this.b,b=this.c,c=this.d,d=this.tx,e=a*c-g*b;this.a=c/e;this.b=-g/e;this.c=-b/e;this.d=a/e;this.tx=(b*this.ty-c*d)/e;this.ty=-(a*this.ty-g*d)/e;return this};d.transformCoords=function(a,g,b){var d=c.Point.identity;d.x=a.a*g+a.c*b+a.tx;d.y=a.d*b+a.b*g+a.ty;return d};b.toArray=function(a){this.array||(this.array=new Float32Array(9));a?(this.array[0]= this.a,this.array[1]=this.b,this.array[2]=0,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=0,this.array[6]=this.tx,this.array[7]=this.ty):(this.array[0]=this.a,this.array[1]=this.b,this.array[2]=this.tx,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=this.ty,this.array[6]=0,this.array[7]=0);this.array[8]=1;return this.array};b.setTo=function(a,g,b,c,d,e){this.a=a;this.b=g;this.c=b;this.d=c;this.tx=d;this.ty=e};b.copyFrom=function(a){this.identityMatrix(a)};b.clone=function(){return new d(this.a, this.b,this.c,this.d,this.tx,this.ty)};b.concat=function(a){var g=this.a,b=this.b,c=this.c,d=this.d,e=this.tx,f=this.ty,l=a.a,m=a.b,n=a.c,p=a.d,t=g*l,s=0,x=0,z=d*p,w=e*l+a.tx;a=f*p+a.ty;if(0!=b||0!=c||0!=m||0!=n)t+=b*n,z+=c*m,s+=g*m+b*p,x+=c*l+d*n,w+=f*n,a+=e*m;this.a=t;this.b=s;this.c=x;this.d=z;this.tx=w;this.ty=a};b.deltaTransformPoint=function(a){return new c.Point(this.a*a.x+this.c*a.y,this.b*a.x+this.d*a.y)};b.transformPoint=function(a){return new c.Point(this.a*a.x+this.c*a.y+this.tx,this.b* a.x+this.d*a.y+this.ty)};b.toString=function(){return"(a="+this.a+", b="+this.b+", c="+this.c+", d="+this.d+", tx="+this.tx+", ty="+this.ty+")"};b.createBox=function(a,g,b,d,e){void 0===b&&(b=0);void 0===d&&(d=0);void 0===e&&(e=0);if(0!==b){b/=c.Matrix.DEG_TO_RAD;var k=c.NumberUtils.cos(b);b=c.NumberUtils.sin(b);this.a=k*a;this.b=b*g;this.c=-b*a;this.d=k*g}else this.a=a,this.c=this.b=0,this.d=g;this.tx=d;this.ty=e};b.createGradientBox=function(a,g,b,c,d){void 0===b&&(b=0);void 0===c&&(c=0);void 0=== d&&(d=0);this.createBox(a/1638.4,g/1638.4,b,c+a/2,d+g/2)};d.identity=new d;d.DEG_TO_RAD=Math.PI/180;return d}(c.HashObject);c.Matrix=f;f.prototype.__class__="egret.Matrix"})(egret||(egret={})); (function(c){var f=function(e){function d(a,g){void 0===a&&(a=0);void 0===g&&(g=0);e.call(this);this.x=a;this.y=g}__extends(d,e);var b=d.prototype;b.clone=function(){return new d(this.x,this.y)};b.equals=function(a){return this.x==a.x&&this.y==a.y};d.distance=function(a,g){return Math.sqrt((a.x-g.x)*(a.x-g.x)+(a.y-g.y)*(a.y-g.y))};b.setTo=function(a,g){this.x=a;this.y=g};b.copyFrom=function(a){this.x=a.x;this.y=a.y};Object.defineProperty(b,"length",{get:function(){return Math.sqrt(this.x*this.x+this.y* this.y)},enumerable:!0,configurable:!0});b.add=function(a){return new d(this.x+a.x,this.y+a.y)};d.interpolate=function(a,g,b){var c=1-b;return new d(a.x*b+g.x*c,a.y*b+g.y*c)};b.normalize=function(a){if(0!=this.x||0!=this.y)a/=this.length,this.x*=a,this.y*=a};b.offset=function(a,g){this.x+=a;this.y+=g};d.polar=function(a,g){return new d(a*c.NumberUtils.cos(g/c.Matrix.DEG_TO_RAD),a*c.NumberUtils.sin(g/c.Matrix.DEG_TO_RAD))};b.subtract=function(a){return new d(this.x-a.x,this.y-a.y)};b.toString=function(){return"(x="+ this.x+", y="+this.y+")"};d.identity=new d(0,0);return d}(c.HashObject);c.Point=f;f.prototype.__class__="egret.Point"})(egret||(egret={})); (function(c){var f=function(e){function d(a,g,b,c){void 0===a&&(a=0);void 0===g&&(g=0);void 0===b&&(b=0);void 0===c&&(c=0);e.call(this);this.x=a;this.y=g;this.width=b;this.height=c}__extends(d,e);var b=d.prototype;Object.defineProperty(b,"left",{get:function(){return this.x},set:function(a){this.width+=this.x-a;this.x=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"right",{get:function(){return this.x+this.width},set:function(a){this.width=a-this.x},enumerable:!0,configurable:!0});Object.defineProperty(b, "top",{get:function(){return this.y},set:function(a){this.height+=this.y-a;this.y=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"bottom",{get:function(){return this.y+this.height},set:function(a){this.height=a-this.y},enumerable:!0,configurable:!0});Object.defineProperty(b,"topLeft",{get:function(){return new c.Point(this.left,this.top)},set:function(a){this.top=a.y;this.left=a.x},enumerable:!0,configurable:!0});Object.defineProperty(b,"bottomRight",{get:function(){return new c.Point(this.right, this.bottom)},set:function(a){this.bottom=a.y;this.right=a.x},enumerable:!0,configurable:!0});b.initialize=function(a,g,b,c){this.x=a;this.y=g;this.width=b;this.height=c;return this};b.contains=function(a,g){return this.x<=a&&this.x+this.width>=a&&this.y<=g&&this.y+this.height>=g};b.intersects=function(a){return Math.max(this.x,a.x)<=Math.min(this.right,a.right)&&Math.max(this.y,a.y)<=Math.min(this.bottom,a.bottom)};b.setEmpty=function(){this.height=this.width=this.y=this.x=0};b.clone=function(){return new d(this.x, this.y,this.width,this.height)};b.containsPoint=function(a){return this.xa.x&&this.ya.y?!0:!1};b.setTo=function(a,g,b,c){this.initialize(a,g,b,c)};b.copyFrom=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};b.inflate=function(a,g){this.x-=a;this.width+=2*a;this.y-=g;this.height+=2*g};b.isEmpty=function(){return 0==this.width||0==this.height};b.containsRect=function(a){var g=a.x+a.width,b=a.y+a.height,c=this.x+this.width,d= this.y+this.height;return a.x>=this.x&&a.x=this.y&&a.ythis.x&&g<=c&&b>this.y&&b<=d};b.equals=function(a){return this===a?!0:this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height};b.inflatePoint=function(a){this.inflate(a.x,a.y)};b.intersection=function(a){var g=this.clone(),b=g.x,c=g.y,d=a.x,e=a.y,f=Math.max(b,d),b=Math.min(b+g.width,d+a.width);if(f<=b&&(d=Math.max(c,e),a=Math.min(c+g.height,e+a.height),d<=a))return g.setTo(f,d,b-f,a-d),g;g.setEmpty();return g};b.offset= function(a,g){this.x+=a;this.y+=g};b.offsetPoint=function(a){this.offset(a.x,a.y)};b.toString=function(){return"(x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"};b.union=function(a){var g=this.clone();if(a.isEmpty())return g;if(g.isEmpty())return g.copyFrom(a),g;var b=Math.min(g.x,a.x),c=Math.min(g.y,a.y);g.setTo(b,c,Math.max(g.right,a.right)-b,Math.max(g.bottom,a.bottom)-c);return g};d.identity=new d(0,0,0,0);return d}(c.HashObject);c.Rectangle=f;f.prototype.__class__= "egret.Rectangle"})(egret||(egret={})); (function(c){var f=function(c){function d(a,g,b,d,q,k,f,l){void 0===a&&(a=1);void 0===g&&(g=1);void 0===b&&(b=1);void 0===d&&(d=1);void 0===q&&(q=0);void 0===k&&(k=0);void 0===f&&(f=0);void 0===l&&(l=0);c.call(this);this._redMultiplier=a;this._greenMultiplier=g;this._blueMultiplier=b;this._alphaMultiplier=d;this._redOffset=q;this._greenOffset=k;this._blueOffset=f;this._alphaOffset=l}__extends(d,c);var b=d.prototype;Object.defineProperty(b,"alphaMultiplier",{get:function(){return this._alphaMultiplier},set:function(a){this._alphaMultiplier= a},enumerable:!0,configurable:!0});Object.defineProperty(b,"alphaOffset",{get:function(){return this._alphaOffset},set:function(a){this._alphaOffset=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"blueMultiplier",{get:function(){return this._blueMultiplier},set:function(a){this._blueMultiplier=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"blueOffset",{get:function(){return this._blueOffset},set:function(a){this._blueOffset=a},enumerable:!0,configurable:!0});Object.defineProperty(b, "greenMultiplier",{get:function(){return this._greenMultiplier},set:function(a){this._greenMultiplier=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"greenOffset",{get:function(){return this._greenOffset},set:function(a){this._greenOffset=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"redMultiplier",{get:function(){return this._redMultiplier},set:function(a){this._redMultiplier=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"redOffset",{get:function(){return this._redOffset}, set:function(a){this._redOffset=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"color",{get:function(){return this._redOffset<<16+this._greenOffset<<8+this._blueOffset},enumerable:!0,configurable:!0});b.identityColorTransform=function(a){this._alphaMultiplier=a._alphaMultiplier;this._alphaOffset=a._alphaOffset;this._redMultiplier=a._redMultiplier;this._redOffset=a._redOffset;this._greenMultiplier=a._greenMultiplier;this._greenOffset=a._greenOffset;this._blueMultiplier=a._blueMultiplier; this._blueOffset=a._blueOffset};b.concat=function(a){this._redMultiplier*=a._redMultiplier;this._greenMultiplier*=a._greenMultiplier;this._blueMultiplier*=a._blueMultiplier;this._alphaMultiplier*=a._alphaMultiplier;this._redOffset+=a._redOffset;this._greenOffset+=a._greenOffset;this._blueOffset+=a._blueOffset;this._alphaOffset+=a._alphaOffset};b.toString=function(){return"(redMultiplier="+this._redMultiplier+", greenMultiplier="+this._greenMultiplier+", blueMultiplier="+this._blueMultiplier+", alphaMultiplier="+ this._alphaMultiplier+", redOffset="+this._redOffset+", greenOffset="+this._greenOffset+", blueOffset="+this._blueOffset+", alphaOffset="+this._alphaOffset+")"};return d}(c.HashObject);c.ColorTransform=f;f.prototype.__class__="egret.ColorTransform"})(egret||(egret={})); (function(c){var f=function(e){function d(a){e.call(this);this._matrix=new c.Matrix;this._matrix2=new c.Matrix;this._colorTransform=new c.ColorTransform;this._colorTransform2=new c.ColorTransform;this._display=a}__extends(d,e);var b=d.prototype;Object.defineProperty(b,"matrix",{get:function(){this._matrix2.identityMatrix(this._matrix);return this._matrix2},set:function(a){this._setMatrix(a)},enumerable:!0,configurable:!0});b._setMatrix=function(a){this._display.__hack_local_matrix||(this._display.__hack_local_matrix= new c.Matrix);this._display.__hack_local_matrix.identityMatrix(a);this._matrix.identityMatrix(a)};Object.defineProperty(b,"colorTransform",{get:function(){this._colorTransform2.identityColorTransform(this._colorTransform);return this._colorTransform2},set:function(a){this._setColorTransform(a)},enumerable:!0,configurable:!0});b._setColorTransform=function(a){this._colorTransform.identityColorTransform(a)};return d}(c.HashObject);c.Transform=f;f.prototype.__class__="egret.Transform"})(egret||(egret= {})); (function(c){var f=function(e){function d(){e.call(this);this._isSupportDOMParser=this._xmlDict=this._parser=null;this._xmlDict={};window.DOMParser?(this._isSupportDOMParser=!0,this._parser=new DOMParser):this._isSupportDOMParser=!1}__extends(d,e);var b=d.prototype;d.getInstance=function(){d._instance||(d._instance=new d);return d._instance};b.parserXML=function(a){for(var g=0;"\n"==a.charAt(g)||"\t"==a.charAt(g)||"\r"==a.charAt(g)||" "==a.charAt(g);)g++;0!=g&&(a=a.substring(g,a.length));this._isSupportDOMParser?g= this._parser.parseFromString(a,"text/xml"):(g=new ActiveXObject("Microsoft.XMLDOM"),g.async="false",g.loadXML(a));null==g&&c.$warn(1015);return g};d._instance=null;return d}(c.HashObject);c.SAXParser=f;f.prototype.__class__="egret.SAXParser"})(egret||(egret={})); (function(c){var f=function(a){function b(){a.call(this);this._designHeight=this._designWidth=0;this._scaleY=this._scaleX=1;this._stageHeight=this._stageWidth=this._offSetY=0}__extends(b,a);var r=b.prototype;b.getInstance=function(){null==b.instance&&(d.initialize(),b.instance=new b);return b.instance};r.setDesignSize=function(a,g,b){this._designWidth=a;this._designHeight=g;b&&(c.$warn(1001),this._setResolutionPolicy(b))};r._setResolutionPolicy=function(a){this._resolutionPolicy=a;a.init(this);a._apply(this, this._designWidth,this._designHeight)};r.getScaleX=function(){return this._scaleX};r.getScaleY=function(){return this._scaleY};r.getOffSetY=function(){return this._offSetY};b.canvas_name="egretCanvas";b.egret_root_div="gameDiv";b.canvas_div_name="canvasDiv";return b}(c.HashObject);c.StageDelegate=f;f.prototype.__class__="egret.StageDelegate";var e=function(){function a(g,b){this._containerStrategy=g;this._contentStrategy=b}var b=a.prototype;b.init=function(a){this._containerStrategy.init(a);this._contentStrategy.init(a)}; b._apply=function(a,g,b){this._containerStrategy._apply(a,g,b);this._contentStrategy._apply(a,g,b)};return a}();c.ResolutionPolicy=e;e.prototype.__class__="egret.ResolutionPolicy";var d=function(){function a(){}var c=a.prototype;a.initialize=function(){a.EQUAL_TO_FRAME=new b};c.init=function(a){};c._apply=function(a,g,b){};c._setupContainer=function(){var a=document.body,g;a&&(g=a.style)&&(g.paddingTop=g.paddingTop||"0px",g.paddingRight=g.paddingRight||"0px",g.paddingBottom=g.paddingBottom||"0px", g.paddingLeft=g.paddingLeft||"0px",g.borderTop=g.borderTop||"0px",g.borderRight=g.borderRight||"0px",g.borderBottom=g.borderBottom||"0px",g.borderLeft=g.borderLeft||"0px",g.marginTop=g.marginTop||"0px",g.marginRight=g.marginRight||"0px",g.marginBottom=g.marginBottom||"0px",g.marginLeft=g.marginLeft||"0px")};return a}();c.ContainerStrategy=d;d.prototype.__class__="egret.ContainerStrategy";var b=function(a){function b(){a.apply(this,arguments)}__extends(b,a);b.prototype._apply=function(a){this._setupContainer()}; return b}(d);c.EqualToFrame=b;b.prototype.__class__="egret.EqualToFrame";e=function(){function a(){}var b=a.prototype;b.init=function(a){};b._apply=function(a,g,b){};b.setEgretSize=function(a,g,b,d,u,e){void 0===e&&(e=0);c.StageDelegate.getInstance()._stageWidth=Math.round(a);c.StageDelegate.getInstance()._stageHeight=Math.round(g);a=document.getElementById(f.canvas_div_name);g=document.getElementById(f.egret_root_div);a||(a=c.Browser.getInstance().$new("div"),a.id=f.canvas_div_name,g.appendChild(a)); a.style.width=b+"px";a.style.height=d+"px";g.style.width=b+"px";g.style.height=d+"px";g.style.top=e+"px"};b._getClientWidth=function(){return document.documentElement.clientWidth};b._getClientHeight=function(){return document.documentElement.clientHeight};return a}();c.ContentStrategy=e;e.prototype.__class__="egret.ContentStrategy";var a=function(a){function b(c){void 0===c&&(c=0);a.call(this);this.minWidth=NaN;this.minWidth=c}__extends(b,a);b.prototype._apply=function(a,g,b){g=this._getClientWidth(); var c=this._getClientHeight(),d=c/b,u=g/d,e=1;0!=this.minWidth&&(e=Math.min(1,u/this.minWidth));this.setEgretSize(u/e,b,g,c*e);a._scaleX=d*e;a._scaleY=d*e};return b}(e);c.FixedHeight=a;a.prototype.__class__="egret.FixedHeight";a=function(a){function b(c){void 0===c&&(c=0);a.call(this);this.minHeight=NaN;this.minHeight=c}__extends(b,a);b.prototype._apply=function(a,g,b){b=this._getClientWidth();var c=this._getClientHeight(),d=b/g,u=c/d,e=1;0!=this.minHeight&&(e=Math.min(1,u/this.minHeight));this.setEgretSize(g, u/e,b*e,c,b*(1-e)/2);a._scaleX=d*e;a._scaleY=d*e};return b}(e);c.FixedWidth=a;a.prototype.__class__="egret.FixedWidth";a=function(a){function b(c,d){a.call(this);this.width=c;this.height=d}__extends(b,a);b.prototype._apply=function(a,g,b){b=this.width;var c=this.height,d=b/g;this.setEgretSize(g,c/d,b,c);a._scaleX=d;a._scaleY=d};return b}(e);c.FixedSize=a;a.prototype.__class__="egret.FixedSize";a=function(a){function b(){a.call(this)}__extends(b,a);b.prototype._apply=function(a,g,b){this.setEgretSize(g, b,g,b,Math.floor((g-g)/2));a._scaleX=1;a._scaleY=1};return b}(e);c.NoScale=a;a.prototype.__class__="egret.NoScale";a=function(a){function b(){a.call(this)}__extends(b,a);b.prototype._apply=function(a,g,b){var c=this._getClientWidth(),d=this._getClientHeight(),u=c,e=d,f=u/g=g.x+g.width||d.y+d.height+c<=g.y||d.y+c>=g.y+g.height?!0:!1};b.getDrawAreaList=function(){var a;0==this._drawAreaList.length?(this._defaultDrawAreaList||(this._defaultDrawAreaList=[new c.Rectangle(0,0,c.MainContext.instance.stage.stageWidth,c.MainContext.instance.stage.stageHeight)],c.MainContext.instance.stage.addEventListener(c.Event.RESIZE, this.onResize,this)),a=this._defaultDrawAreaList):a=this._drawAreaList;return a};b.onResize=function(){c.MainContext.instance.stage.removeEventListener(c.Event.RESIZE,this.onResize,this);this._defaultDrawAreaList=null};d.identityRectangle=new c.Rectangle;return d}(c.HashObject);c.RenderFilter=f;f.prototype.__class__="egret.RenderFilter"})(egret||(egret={})); (function(c){var f=function(){function e(){}e.mapClass=function(c,b,a){void 0===a&&(a="");c=this.getKey(c)+"#"+a;this.mapClassDic[c]=b};e.getKey=function(d){return"string"==typeof d?d:c.getQualifiedClassName(d)};e.mapValue=function(c,b,a){void 0===a&&(a="");c=this.getKey(c)+"#"+a;this.mapValueDic[c]=b};e.hasMapRule=function(c,b){void 0===b&&(b="");var a=this.getKey(c)+"#"+b;return this.mapValueDic[a]||this.mapClassDic[a]?!0:!1};e.getInstance=function(d,b){void 0===b&&(b="");var a=this.getKey(d)+"#"+ b;if(this.mapValueDic[a])return this.mapValueDic[a];var g=this.mapClassDic[a];if(g)return g=new g,this.mapValueDic[a]=g,delete this.mapClassDic[a],g;c.$error(1028,a)};e.mapClassDic={};e.mapValueDic={};return e}();c.Injector=f;f.prototype.__class__="egret.Injector"})(egret||(egret={}));(function(c){var f=function(c){function d(){c.apply(this,arguments);this.type=null}__extends(d,c);return d}(c.HashObject);c.Filter=f;f.prototype.__class__="egret.Filter"})(egret||(egret={})); (function(c){var f=function(c){function d(b,a){c.call(this);this.blurX=b;this.blurY=a;this.type="blur"}__extends(d,c);return d}(c.Filter);c.BlurFilter=f;f.prototype.__class__="egret.BlurFilter"})(egret||(egret={})); (function(c){var f=function(c){function d(a){void 0===a&&(a=null);c.call(this);this._matrix=[];this._matrix2=[];this.type="colorTransform";this._setMatrix(a)}__extends(d,c);var b=d.prototype;Object.defineProperty(b,"matrix",{get:function(){for(var a=0;20>a;a++)this._matrix2[a]=this._matrix[a];return this._matrix2},set:function(a){this._setMatrix(a)},enumerable:!0,configurable:!0});b._setMatrix=function(a){for(var g=0;20>g;g++)this._matrix[g]=a&&a[g]||0};return d}(c.Filter);c.ColorMatrixFilter=f;f.prototype.__class__= "egret.ColorMatrixFilter"})(egret||(egret={})); (function(c){var f=function(c){function d(b,a,g,d,r,q,f,h){void 0===b&&(b=16711680);void 0===a&&(a=1);void 0===g&&(g=6);void 0===d&&(d=6);void 0===r&&(r=2);void 0===q&&(q=1);void 0===f&&(f=!1);void 0===h&&(h=!1);c.call(this);this.color=b;this.alpha=a;this.blurX=g;this.blurY=d;this.strength=r;this.quality=q;this.inner=f;this.knockout=h;this.type="glow";this._blue=b&255;this._green=(b&65280)>>8;this._red=b>>16}__extends(d,c);return d}(c.Filter);c.GlowFilter=f;f.prototype.__class__="egret.GlowFilter"})(egret|| (egret={}));(function(c){var f=function(c){function d(b,a,g,d,r,q,f,h,l,m,n){void 0===b&&(b=4);void 0===a&&(a=45);void 0===g&&(g=0);void 0===d&&(d=1);void 0===r&&(r=4);void 0===q&&(q=4);void 0===f&&(f=1);void 0===h&&(h=1);void 0===l&&(l=!1);void 0===m&&(m=!1);c.call(this,g,d,r,q,f,h,l,m);this.distance=b;this.angle=a}__extends(d,c);return d}(c.GlowFilter);c.DropShadowFilter=f;f.prototype.__class__="egret.DropShadowFilter"})(egret||(egret={})); (function(c){var f=function(){function c(){}c.NORMAL="normal";c.ADD="add";c.ERASE="erase";c.ERASE_REVERSE="eraseReverse";return c}();c.BlendMode=f;f.prototype.__class__="egret.BlendMode"})(egret||(egret={})); (function(c){var f=function(){function c(){this._name=null;this._explicitHeight=this._explicitWidth=NaN;this._y=this._x=0;this._scaleY=this._scaleX=1;this._rotation=this._anchorY=this._anchorX=this._anchorOffsetY=this._anchorOffsetX=0;this._alpha=1;this._skewY=this._skewX=0;this._blendMode=null;this._touchEnabled=c.defaultTouchEnabled;this._visible=!0;this._worldAlpha=1;this._scrollRect=null;this._cacheAsBitmap=!1;this._stage=this._parent=null;this._needDraw=!1;this._filters=null;this._hasHeightSet= this._hasWidthSet=!1;this._sizeDirty=this._normalDirty=!0;this._isContainer=!1}c.defaultTouchEnabled=!1;return c}();c.DisplayObjectProperties=f;f.prototype.__class__="egret.DisplayObjectProperties"})(egret||(egret={}));(function(c){var f=function(){return function(){this._hitTestPointTexture=null;this._rectH=this._rectW=0;this._cacheDirty=!1}}();c.DisplayObjectPrivateProperties=f;f.prototype.__class__="egret.DisplayObjectPrivateProperties"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this.renderTexture=this.mask=this._sizeChangeCallTarget=this._sizeChangeCallBack=this.__hack_local_matrix=this._worldBounds=this._texture_to_render=null;this._DO_Props_=new c.DisplayObjectProperties;this._DO_Privs_=new c.DisplayObjectPrivateProperties;this._worldTransform=new c.Matrix;this._worldBounds=new c.Rectangle(0,0,0,0);this._DO_Privs_._cacheBounds=new c.Rectangle(0,0,0,0)}__extends(d,e);var b=d.prototype;b._setDirty=function(){this._DO_Props_._normalDirty= !0};b.getDirty=function(){return this._DO_Props_._normalDirty||this._DO_Props_._sizeDirty};b._setParentSizeDirty=function(){var a=this._DO_Props_._parent;a&&(a._DO_Props_._hasWidthSet||a._DO_Props_._hasHeightSet?a._setCacheDirty():a._setSizeDirty())};b._setSizeDirty=function(){var a=this._DO_Props_;a._sizeDirty||(a._sizeDirty=!0,this._setDirty(),this._setCacheDirty(),this._setParentSizeDirty(),null!=this._sizeChangeCallBack&&(this._sizeChangeCallTarget==a._parent?this._sizeChangeCallBack.call(this._sizeChangeCallTarget): this._sizeChangeCallTarget=this._sizeChangeCallBack=null))};b._clearDirty=function(){this._DO_Props_._normalDirty=!1};b._clearSizeDirty=function(){this._DO_Props_._sizeDirty=!1};Object.defineProperty(b,"name",{get:function(){return this._DO_Props_._name},set:function(a){this._DO_Props_._name=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"parent",{get:function(){return this._DO_Props_._parent},enumerable:!0,configurable:!0});b._parentChanged=function(a){this._DO_Props_._parent=a};Object.defineProperty(b, "x",{get:function(){return this._DO_Props_._x},set:function(a){this._setX(a)},enumerable:!0,configurable:!0});b._setX=function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._x!=a&&(this._DO_Props_._x=a,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(b,"y",{get:function(){return this._DO_Props_._y},set:function(a){this._setY(a)},enumerable:!0,configurable:!0});b._setY=function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._y!=a&&(this._DO_Props_._y=a,this._setDirty(),this._setParentSizeDirty())}; Object.defineProperty(b,"scaleX",{get:function(){return this._DO_Props_._scaleX},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._scaleX!=a&&(this._DO_Props_._scaleX=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"scaleY",{get:function(){return this._DO_Props_._scaleY},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._scaleY!=a&&(this._DO_Props_._scaleY=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0}); Object.defineProperty(b,"anchorOffsetX",{get:function(){return this._DO_Props_._anchorOffsetX},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._anchorOffsetX!=a&&(this._DO_Props_._anchorOffsetX=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"anchorOffsetY",{get:function(){return this._DO_Props_._anchorOffsetY},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._anchorOffsetY!=a&&(this._DO_Props_._anchorOffsetY=a,this._setDirty(), this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"anchorX",{get:function(){return this._DO_Props_._anchorX},set:function(a){this._setAnchorX(a)},enumerable:!0,configurable:!0});b._setAnchorX=function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._anchorX!=a&&(this._DO_Props_._anchorX=a,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(b,"anchorY",{get:function(){return this._DO_Props_._anchorY},set:function(a){this._setAnchorY(a)},enumerable:!0, configurable:!0});b._setAnchorY=function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._anchorY!=a&&(this._DO_Props_._anchorY=a,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(b,"visible",{get:function(){return this._DO_Props_._visible},set:function(a){this._setVisible(a)},enumerable:!0,configurable:!0});b._setVisible=function(a){this._DO_Props_._visible!=a&&(this._DO_Props_._visible=a,this._setSizeDirty())};Object.defineProperty(b,"rotation",{get:function(){return this._DO_Props_._rotation}, set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._rotation!=a&&(this._DO_Props_._rotation=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"alpha",{get:function(){return this._DO_Props_._alpha},set:function(a){this._setAlpha(a)},enumerable:!0,configurable:!0});b._setAlpha=function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._alpha!=a&&(this._DO_Props_._alpha=a,this._setDirty(),this._setCacheDirty())};Object.defineProperty(b,"skewX", {get:function(){return this._DO_Props_._skewX},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._skewX!=a&&(this._DO_Props_._skewX=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"skewY",{get:function(){return this._DO_Props_._skewY},set:function(a){c.NumberUtils.isNumber(a)&&this._DO_Props_._skewY!=a&&(this._DO_Props_._skewY=a,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(b,"touchEnabled", {get:function(){return this._DO_Props_._touchEnabled},set:function(a){this._setTouchEnabled(a)},enumerable:!0,configurable:!0});b._setTouchEnabled=function(a){this._DO_Props_._touchEnabled=a};Object.defineProperty(b,"blendMode",{get:function(){return this._DO_Props_._blendMode},set:function(a){this._DO_Props_._blendMode=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"scrollRect",{get:function(){return this._DO_Props_._scrollRect},set:function(a){this._setScrollRect(a)},enumerable:!0,configurable:!0}); b._setScrollRect=function(a){this._DO_Props_._scrollRect=a;this._setSizeDirty()};Object.defineProperty(b,"measuredWidth",{get:function(){return this._measureBounds().width},enumerable:!0,configurable:!0});Object.defineProperty(b,"measuredHeight",{get:function(){return this._measureBounds().height},enumerable:!0,configurable:!0});Object.defineProperty(b,"explicitWidth",{get:function(){return this._DO_Props_._explicitWidth},enumerable:!0,configurable:!0});Object.defineProperty(b,"explicitHeight",{get:function(){return this._DO_Props_._explicitHeight}, enumerable:!0,configurable:!0});Object.defineProperty(b,"width",{get:function(){return this._getWidth()},set:function(a){this._setWidth(a)},enumerable:!0,configurable:!0});b._getWidth=function(){return this._getSize(c.Rectangle.identity).width};Object.defineProperty(b,"height",{get:function(){return this._getHeight()},set:function(a){this._setHeight(a)},enumerable:!0,configurable:!0});b._getHeight=function(){return this._getSize(c.Rectangle.identity).height};b._setWidth=function(a){this._setSizeDirty(); this._setCacheDirty();this._DO_Props_._explicitWidth=a;this._DO_Props_._hasWidthSet=c.NumberUtils.isNumber(a)};b._setHeight=function(a){this._setSizeDirty();this._setCacheDirty();this._DO_Props_._explicitHeight=a;this._DO_Props_._hasHeightSet=c.NumberUtils.isNumber(a)};Object.defineProperty(b,"worldAlpha",{get:function(){return this._DO_Props_._worldAlpha},set:function(a){this._DO_Props_._worldAlpha=a},enumerable:!0,configurable:!0});b._draw=function(a){if(this._DO_Props_._visible&&!this.drawCacheTexture(a)){var g= c.MainContext.__use_new_draw&&this._DO_Props_._isContainer;this._hasFilters()&&!g&&this._setGlobalFilters(a);a.setAlpha(this.worldAlpha,this.blendMode);a.setTransform(this._worldTransform);var b=this.mask||this._DO_Props_._scrollRect;b&&!g&&a.pushMask(b);this._render(a);b&&!g&&a.popMask();this._hasFilters()&&!g&&this._removeGlobalFilters(a)}this.destroyCacheBounds()};b._setGlobalFilters=function(a){var g;g=this._DO_Props_._filters?this._DO_Props_._filters.concat():[];if(this._transform){var b=this._transform._colorTransform, c=d.color;c[0]=b._redMultiplier;c[4]=b._redOffset;c[6]=b._greenMultiplier;c[9]=b._greenOffset;c[12]=b._blueMultiplier;c[14]=b._blueOffset;c[18]=b._alphaMultiplier;c[19]=b._alphaOffset;d.colorMatrixFilter._matrix=c;g.push(d.colorMatrixFilter)}a.setGlobalFilters(g)};b._removeGlobalFilters=function(a){a.setGlobalFilters(null)};b._hasFilters=function(){var a=this._DO_Props_._filters&&0d._scrollRect.x&&g>d._scrollRect.y&&at&&(t=b);(b=f+l+m)t&&(t=b);(b=l+m)< p?p=b:b>t&&(t=b);(c=d+n)x&&(x=c);(c=d+e+n)x&&(x=c);(c=e+n)x&&(x=c);return a.initialize(p,s,t-p,x-s)};Object.defineProperty(b,"filters",{get:function(){return this._DO_Props_._filters},set:function(a){this._DO_Props_._filters=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"transform",{get:function(){this._transform||(this._transform=new c.Transform(this));return this._transform},enumerable:!0,configurable:!0});d.color=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]; d.colorMatrixFilter=new c.ColorMatrixFilter;d.identityMatrixForGetConcatenated=new c.Matrix;d._enterFrameCallBackList=[];d._renderCallBackList=[];return d}(c.EventDispatcher);c.DisplayObject=f;f.prototype.__class__="egret.DisplayObject"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this._touchChildren=!0;this._children=[];this._DO_Props_._isContainer=!0}__extends(d,e);var b=d.prototype;Object.defineProperty(b,"touchChildren",{get:function(){return this._touchChildren},set:function(a){this._touchChildren=a},enumerable:!0,configurable:!0});Object.defineProperty(b,"numChildren",{get:function(){return this._children.length},enumerable:!0,configurable:!0});b.setChildIndex=function(a,g){this.doSetChildIndex(a,g)};b.doSetChildIndex= function(a,g){var b=this._children.indexOf(a);0>b&&c.$error(1006);this._children.splice(b,1);0>g||this._children.length<=g?this._children.push(a):this._children.splice(g,0,a)};b.addChild=function(a){var g=this._children.length;a.parent==this&&g--;return this._doAddChild(a,g)};b.addChildAt=function(a,g){return this._doAddChild(a,g)};b._doAddChild=function(a,g,b){void 0===b&&(b=!0);if(a==this)return a;if(0>g||g>this._children.length)return c.$error(1007),a;var e=a.parent;if(e==this)return this.doSetChildIndex(a, g),a;if(e){var q=e._children.indexOf(a);0<=q&&e._doRemoveChild(q)}this._children.splice(g,0,a);a._parentChanged(this);b&&a.dispatchEventWith(c.Event.ADDED,!0);if(this._DO_Props_._stage)for(a._onAddToStage(),g=d.__EVENT__ADD_TO_STAGE_LIST;0g||0==h)g=t;if(pd||0==h)d=l}}return c.Rectangle.identity.initialize(a,b,g-a,d-b)};b.hitTest=function(a,g,b){void 0===b&&(b=!1);var d;if(!this._DO_Props_._visible)return null;if(this._DO_Props_._scrollRect){if(athis._DO_Props_._scrollRect.x+this._DO_Props_._scrollRect.width|| g>this._DO_Props_._scrollRect.y+this._DO_Props_._scrollRect.height)return null}else if(this.mask&&(this.mask.x>a||a>this.mask.x+this.mask.width||this.mask.y>g||g>this.mask.y+this.mask.height))return null;for(var q=this._children,f=this._touchChildren,h=q.length-1;0<=h;h--){var l=q[h],m=l._getMatrix(),n=l.scrollRect;n&&m.append(1,0,0,1,-n.x,-n.y);m.invert();m=c.Matrix.transformCoords(m,a,g);if(l=l.hitTest(m.x,m.y,!0)){if(!f)return this;if(l._DO_Props_._touchEnabled&&f)return l;d=this}}return d?d:this._texture_to_render? e.prototype.hitTest.call(this,a,g,b):null};b._onAddToStage=function(){e.prototype._onAddToStage.call(this);for(var a=this._children.length,g=0;gg||g>this.getMaxScrollTop():0>b||b>this.getMaxScrollLeft()};b._validatePosition=function(a,g){void 0===a&&(a=!1);void 0===g&&(g=!1);if(a){var b=this.height,c=this._getContentHeight();this._ScrV_Props_._scrollTop=Math.max(this._ScrV_Props_._scrollTop,(0-b)/2);this._ScrV_Props_._scrollTop=Math.min(this._ScrV_Props_._scrollTop,c>b?c-b/2:b/2)}g&&(b=this.width,c=this._getContentWidth(),this._ScrV_Props_._scrollLeft= Math.max(this._ScrV_Props_._scrollLeft,(0-b)/2),this._ScrV_Props_._scrollLeft=Math.min(this._ScrV_Props_._scrollLeft,c>b?c-b/2:b/2))};b._setWidth=function(a){this._DO_Props_._explicitWidth!=a&&(e.prototype._setWidth.call(this,a),this._updateContentPosition())};b._setHeight=function(a){this._DO_Props_._explicitHeight!=a&&(e.prototype._setHeight.call(this,a),this._updateContentPosition())};b._updateContentPosition=function(){var a=this.getBounds(c.Rectangle.identity),g=a.height,a=a.width;this.scrollRect= new c.Rectangle(Math.round(this._ScrV_Props_._scrollLeft),Math.round(this._ScrV_Props_._scrollTop),a,g);this.dispatchEvent(new c.Event(c.Event.CHANGE))};b._checkScrollPolicy=function(){var a=this.__checkScrollPolicy(this._ScrV_Props_._horizontalScrollPolicy,this._getContentWidth(),this.width);this._ScrV_Props_._hCanScroll=a;var g=this.__checkScrollPolicy(this._ScrV_Props_._verticalScrollPolicy,this._getContentHeight(),this.height);this._ScrV_Props_._vCanScroll=g;return a||g};b.__checkScrollPolicy= function(a,g,b){return"on"==a?!0:"off"==a?!1:g>b};b._addEvents=function(){this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.addEventListener(c.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)};b._removeEvents=function(){this.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.removeEventListener(c.TouchEvent.TOUCH_END, this._onTouchEndCapture,this,!0)};b._onTouchBegin=function(a){!a._isDefaultPrevented&&this._checkScrollPolicy()&&(this._ScrV_Props_._touchStartPosition.x=a.stageX,this._ScrV_Props_._touchStartPosition.y=a.stageY,(this._ScrV_Props_._isHTweenPlaying||this._ScrV_Props_._isVTweenPlaying)&&this._onScrollFinished(),this.stage.addEventListener(c.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this.stage.addEventListener(c.TouchEvent.TOUCH_END,this._onTouchEnd,this),this.stage.addEventListener(c.TouchEvent.LEAVE_STAGE, this._onTouchEnd,this),this.addEventListener(c.Event.ENTER_FRAME,this._onEnterFrame,this),this._logTouchEvent(a),a.preventDefault())};b._onTouchBeginCapture=function(a){var g=this._checkScrollPolicy();if(g){for(var b=a.target;b!=this;){if("_checkScrollPolicy"in b&&(g=b._checkScrollPolicy()))return;b=b.parent}a.stopPropagation();this.delayTouchBeginEvent=this.cloneTouchEvent(a);this.touchBeginTimer||(this.touchBeginTimer=new c.Timer(100,1),this.touchBeginTimer.addEventListener(c.TimerEvent.TIMER_COMPLETE, this._onTouchBeginTimer,this));this.touchBeginTimer.start();this._onTouchBegin(a)}};b._onTouchEndCapture=function(a){this.delayTouchBeginEvent&&this._onTouchBeginTimer()};b._onTouchBeginTimer=function(){this.touchBeginTimer.stop();var a=this.delayTouchBeginEvent;this.delayTouchBeginEvent=null;this.stage&&this.dispatchPropagationEvent(a)};b.dispatchPropagationEvent=function(a){for(var g=[],b=a._target,c=0;b;)b==this&&(c=g.length),g.push(b),b=b.parent;b=g.slice(0,c);b=b.reverse();g=b.concat(g);this._dispatchPropagationEvent(a, g,c)};b._dispatchPropagationEvent=function(a,g,b){for(var c=g.length,d=0;da-this._ScrV_Props_._lastTouchTime&&this._calcVelocitys(this._ScrV_Props_._lastTouchEvent)};b._logTouchEvent=function(a){this._ScrV_Props_._lastTouchPosition.x= a.stageX;this._ScrV_Props_._lastTouchPosition.y=a.stageY;this._ScrV_Props_._lastTouchEvent=this.cloneTouchEvent(a);this._ScrV_Props_._lastTouchTime=c.getTimer()};b._getPointChange=function(a){return{x:!1===this._ScrV_Props_._hCanScroll?0:this._ScrV_Props_._lastTouchPosition.x-a.stageX,y:!1===this._ScrV_Props_._vCanScroll?0:this._ScrV_Props_._lastTouchPosition.y-a.stageY}};b._calcVelocitys=function(a){var g=c.getTimer();if(0==this._ScrV_Props_._lastTouchTime)this._ScrV_Props_._lastTouchTime=g;else{var b= this._getPointChange(a),g=g-this._ScrV_Props_._lastTouchTime;b.x/=g;b.y/=g;this._ScrV_Props_._velocitys.push(b);5=this.scrollSpeed&&(this.scrollSpeed=1);a=a/b*this.scrollSpeed;g=g/b*this.scrollSpeed;e=Math.abs(a);b=Math.abs(g);f= this.getMaxScrollLeft();c=this.getMaxScrollTop();a=0.02e||e>b)for(e=g;Infinity!=Math.abs(a)&&0.02e||e>b?0.998*a*0.95:0.998*a,d++;else d=500*-Math.log(0.02/c);return{position:Math.min(b+50,Math.max(e,-50)),duration:d}}; b.cloneTouchEvent=function(a){var g=new c.TouchEvent(a._type,a._bubbles,a.cancelable);g.touchPointID=a.touchPointID;g._stageX=a._stageX;g._stageY=a._stageY;g.ctrlKey=a.ctrlKey;g.altKey=a.altKey;g.shiftKey=a.shiftKey;g.touchDown=a.touchDown;g._isDefaultPrevented=!1;g._target=a._target;return g};b.throwNotSupportedError=function(){c.$error(1023)};b.addChild=function(a){this.throwNotSupportedError();return null};b.addChildAt=function(a,g){this.throwNotSupportedError();return null};b.removeChild=function(a){this.throwNotSupportedError(); return null};b.removeChildAt=function(a){this.throwNotSupportedError();return null};b.setChildIndex=function(a,g){this.throwNotSupportedError()};b.swapChildren=function(a,g){this.throwNotSupportedError()};b.swapChildrenAt=function(a,g){this.throwNotSupportedError()};b.hitTest=function(a,g,b){void 0===b&&(b=!1);var d=e.prototype.hitTest.call(this,a,g,b);return d?d:c.DisplayObject.prototype.hitTest.call(this,a,g,b)};d.weight=[1,1.33,1.66,2,2.33];return d}(c.DisplayObjectContainer);c.ScrollView=f;f.prototype.__class__= "egret.ScrollView"})(egret||(egret={}));(function(c){var f=function(){function c(){}c.REPEAT="repeat";c.SCALE="scale";return c}();c.BitmapFillMode=f;f.prototype.__class__="egret.BitmapFillMode"})(egret||(egret={})); (function(c){var f=function(e){function d(a){e.call(this);this.scale9Grid=this._texture=null;this.fillMode="scale";a&&(this._texture=a,this._setSizeDirty());this.needDraw=!0}__extends(d,e);var b=d.prototype;Object.defineProperty(b,"texture",{get:function(){return this._texture},set:function(a){a!=this._texture&&(this._setSizeDirty(),this._texture=a)},enumerable:!0,configurable:!0});b._render=function(a){var g=this._texture;g?(this._texture_to_render=g,d._drawBitmap(a,this._DO_Props_._hasWidthSet? this._DO_Props_._explicitWidth:g._textureWidth,this._DO_Props_._hasHeightSet?this._DO_Props_._explicitHeight:g._textureHeight,this)):this._texture_to_render=null};d._drawBitmap=function(a,g,b,c){var e=c._texture_to_render;if(e){var f=e._textureWidth,h=e._textureHeight;if("scale"==c.fillMode){var l=c.scale9Grid||e.scale9Grid;if(l&&f-l.widthh)break;for(var p=g[m],t=p.length,s=0,x=0;xl?(a.push(w.substring(0,B)),g.push(v),e+=v,b=Math.max(C,b),w=w.substring(B),y=w.length,B=0,C=F,v=G):(C+=F,v=Math.max(G,v))}x&&(x=!1);a.push(w);g.push(v);e+=v;b=Math.max(C,b)}this._textWidth=b;this._textHeight=e;this._textOffsetX=f;this._textOffsetY=k;return a};d.EMPTY_FACTOR=0.33;return d}(c.DisplayObject);c.BitmapText=f;f.prototype.__class__="egret.BitmapText"})(egret||(egret={})); (function(c){var f=function(){function c(){}c.LINEAR="linear";c.RADIAL="radial";return c}();c.GradientType=f;f.prototype.__class__="egret.GradientType"})(egret||(egret={})); (function(c){var f=function(){function d(){this.fillStyle=this.strokeStyle=this.commandQueue=this._renderContext=null;this._dirty=!1;this.lineY=this.lineX=0;this._firstCheck=!0;this._lastY=this._lastX=this._maxY=this._maxX=this._minY=this._minX=0;this.commandQueue=[]}var b=d.prototype;b.beginFill=function(a,g){void 0===g&&(g=1);this.fillStyle=this._parseColor(a,g);this._pushCommand(new e(this._setStyle,this,[this.fillStyle]))};b._parseColor=function(a,g){return"rgba("+(a>>16)+","+((a&65280)>>8)+","+ (a&255)+","+g+")"};b._setStyle=function(a){c.Graphics._currentFillStyle=a;this._renderContext.fillStyle=a;this._renderContext.beginPath()};b.beginGradientFill=function(a,g,b,c,d){void 0===d&&(d=null);this.fillStyle=a=this.getGradient(a,g,b,c,d);this._pushCommand(new e(this._setStyle,this,[a]))};b.getGradient=function(a,g,b,d,e){var f=c.MainContext.instance.rendererContext,h=new c.Matrix;e?(h.a=819.2*e.a,h.b=819.2*e.b,h.c=819.2*e.c,h.d=819.2*e.d,h.tx=e.tx,h.ty=e.ty):(h.a=100,h.d=100);a=a==c.GradientType.LINEAR? f.createLinearGradient(-1,0,1,0):f.createRadialGradient(0,0,0,0,0,1);e=g.length;for(f=0;fc?g:c;g/=d;c/=d;d/=2;this._renderContext.scale(g,c);this._renderContext.beginPath();this._renderContext.arc(a/g,b/c,d,0,2*Math.PI);this._renderContext.closePath();this._renderContext.scale(1/g,1/c)},this,[a,b,c,d]));this._checkRect(a,b,c,d)}; b.lineStyle=function(a,b,c,d,f,k,h,l){void 0===a&&(a=NaN);void 0===b&&(b=0);void 0===c&&(c=1);void 0===d&&(d=!1);void 0===f&&(f="normal");void 0===k&&(k=null);void 0===h&&(h=null);void 0===l&&(l=3);this.strokeStyle&&(this._createEndLineCommand(),this._pushCommand(this._endLineCommand));this.strokeStyle=this._parseColor(b,c);this._pushCommand(new e(function(a,b){this._renderContext.lineWidth=a;this._renderContext.strokeStyle=b;this._renderContext.beginPath()},this,[a,this.strokeStyle]));this.moveTo(this.lineX, this.lineY)};b.lineTo=function(a,b){this._pushCommand(new e(function(a,b){this._renderContext.lineTo(a,b)},this,[a,b]));this._checkPoint(this.lineX,this.lineY);this.lineX=a;this.lineY=b;this._checkPoint(a,b)};b.curveTo=function(a,b,c,d){this._pushCommand(new e(function(a,b,g,c){this._renderContext.quadraticCurveTo(a,b,g,c)},this,[a,b,c,d]));this._checkPoint(this.lineX,this.lineY);this.lineX=c;this.lineY=d;this._checkPoint(a,b);this._checkPoint(c,d)};b.cubicCurveTo=function(a,b,c,d,f,k){this._pushCommand(new e(function(a, b,g,c,d,u){this._renderContext.bezierCurveTo(a,b,g,c,d,u)},this,[a,b,c,d,f,k]));this._checkPoint(this.lineX,this.lineY);this.lineX=f;this.lineY=k;this._checkPoint(a,b);this._checkPoint(c,d);this._checkPoint(f,k)};b.moveTo=function(a,b){this._pushCommand(new e(function(a,b){this._renderContext.moveTo(a,b)},this,[a,b]));this.lineX=a;this.lineY=b};b.clear=function(){this.lineY=this.lineX=this.commandQueue.length=0;this.fillStyle=this.strokeStyle=null;this._maxY=this._maxX=this._minY=this._minX=0;this._dirty= this._firstCheck=!0};b.endFill=function(){null!=this.fillStyle&&(this._fill(),this.fillStyle=null)};b._beginDraw=function(a){};b._endDraw=function(a){};b._draw=function(a){var b=this.commandQueue.length;if(0!=b){this._beginDraw(a);for(var c=0;cb||0==k)b=p;if(ne||0==k)e=h}}if(this._graphics){f=this._graphics._measureBounds();m=f.x;n=f.y;p=f.width+f.x;h=f.height+f.y;if(mb||0==k)b=p;if(ne||0==k)e=h}return c.Rectangle.identity.initialize(a,d,b-a,e-d)};b.hitTest=function(a,b,d){void 0===d&&(d=!1);var r=e.prototype.hitTest.call(this,a,b,d);return r?r:this._graphics?c.DisplayObject.prototype.hitTest.call(this,a,b,d):null};return d}(c.DisplayObjectContainer);c.Sprite=f;f.prototype.__class__="egret.Sprite"})(egret||(egret={})); (function(c){var f=function(){function e(){}e._getStartLine=function(c){var b=e._getTextHeight(c),a=0;c._DO_Props_._hasHeightSet&&(!(bc._DO_Props_._explicitHeight&&(a=Math.max(c._TF_Props_._scrollV-1,0),a=Math.min(c._TF_Props_._numLines-1,a)),c._TF_Props_._multiline||(a=Math.max(c._TF_Props_._scrollV-1,0),a=Math.min(c._TF_Props_._numLines-1,a)));return a};e._getHalign=function(d){var b=d._getLinesArr(),a=0;d._TF_Props_._textAlign==c.HorizontalAlign.CENTER?a=0.5:d._TF_Props_._textAlign== c.HorizontalAlign.RIGHT&&(a=1);d._TF_Props_._type==c.TextFieldType.INPUT&&!d._TF_Props_._multiline&&1 r&&(f=e._getValign(c)*(c._DO_Props_._explicitHeight-r),0!=f&&(a-=f));f=0;for(r=e._getStartLine(c);r=a){u=r+1;break}else f+=k.height;if(f+c._TF_Props_._lineSpacing>a)return null;f+=c._TF_Props_._lineSpacing}if(0===u)return null;c=g[u-1];for(r=a=0;rg/2&&b++}return b};return e}();c.TextFieldUtils=f;f.prototype.__class__="egret.TextFieldUtils"})(egret||(egret={})); (function(c){var f=function(){return function(){this._text=this._type="";this._displayAsPassword=!1;this._fontFamily=c.TextField.default_fontFamily;this._size=30;this._bold=this._italic=!1;this._textColorString="#FFFFFF";this._textColor=16777215;this._strokeColorString="#000000";this._stroke=this._strokeColor=0;this._border=!1;this._borderColor=0;this._background=!1;this._backgroundColor=16777215;this._textAlign="left";this._verticalAlign="top";this._maxChars=this._textMaxHeight=this._textMaxWidth= 0;this._scrollV=-1;this._numLines=this._lineSpacing=0;this._wordWrap=this._multiline=!1}}();c.TextFieldProperties=f;f.prototype.__class__="egret.TextFieldProperties"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this._inputEnabled=!1;this._bgGraphics=this._inputUtils=null;this._isFlow=!1;this._textArr=[];this._isArrayChanged=!1;this._linesArr=[];this._isTyping=!1;this.needDraw=!0;this._TF_Props_=new c.TextFieldProperties}__extends(d,e);var b=d.prototype;b.isInput=function(){return this._TF_Props_._type==c.TextFieldType.INPUT};b._setTouchEnabled=function(a){e.prototype._setTouchEnabled.call(this,a);this.isInput()&&(this._inputEnabled=!0)};Object.defineProperty(b, "type",{get:function(){return this._TF_Props_._type},set:function(a){this._setType(a)},enumerable:!0,configurable:!0});b._setType=function(a){var b=this._TF_Props_;b._type!=a&&(b._type=a,b._type==c.TextFieldType.INPUT?(this._DO_Props_._hasWidthSet||this._setWidth(100),this._DO_Props_._hasHeightSet||this._setHeight(30),null==this._inputUtils&&(this._inputUtils=new c.InputController),this._inputUtils.init(this),this._setDirty(),this._DO_Props_._stage&&this._inputUtils._addStageText()):this._inputUtils&& (this._inputUtils._removeStageText(),this._inputUtils=null))};Object.defineProperty(b,"text",{get:function(){return this._getText()},set:function(a){this._setText(a)},enumerable:!0,configurable:!0});b._getText=function(){return this._TF_Props_._type==c.TextFieldType.INPUT?this._inputUtils._getText():this._TF_Props_._text};b._setSizeDirty=function(){e.prototype._setSizeDirty.call(this);this._isArrayChanged=!0};b._setTextDirty=function(){this._setSizeDirty()};b._setBaseText=function(a){null==a&&(a= "");var b=this._TF_Props_;this._isFlow=!1;b._text!=a&&(this._setTextDirty(),b._text=a,a="",a=b._displayAsPassword?this.changeToPassText(b._text):b._text,this.setMiddleStyle([{text:a}]))};b._setText=function(a){null==a&&(a="");this._setBaseText(a);this._inputUtils&&this._inputUtils._setText(this._TF_Props_._text)};Object.defineProperty(b,"displayAsPassword",{get:function(){return this._TF_Props_._displayAsPassword},set:function(a){this._setDisplayAsPassword(a)},enumerable:!0,configurable:!0});b._setDisplayAsPassword= function(a){var b=this._TF_Props_;b._displayAsPassword!=a&&(b._displayAsPassword=a,this._setTextDirty(),a="",a=b._displayAsPassword?this.changeToPassText(b._text):b._text,this.setMiddleStyle([{text:a}]))};Object.defineProperty(b,"fontFamily",{get:function(){return this._TF_Props_._fontFamily},set:function(a){this._setFontFamily(a)},enumerable:!0,configurable:!0});b._setFontFamily=function(a){this._TF_Props_._fontFamily!=a&&(this._setTextDirty(),this._TF_Props_._fontFamily=a)};Object.defineProperty(b, "size",{get:function(){return this._TF_Props_._size},set:function(a){this._setSize(a)},enumerable:!0,configurable:!0});b._setSize=function(a){this._TF_Props_._size!=a&&(this._setTextDirty(),this._TF_Props_._size=a)};Object.defineProperty(b,"italic",{get:function(){return this._TF_Props_._italic},set:function(a){this._setItalic(a)},enumerable:!0,configurable:!0});b._setItalic=function(a){this._TF_Props_._italic!=a&&(this._setTextDirty(),this._TF_Props_._italic=a)};Object.defineProperty(b,"bold",{get:function(){return this._TF_Props_._bold}, set:function(a){this._setBold(a)},enumerable:!0,configurable:!0});b._setBold=function(a){this._TF_Props_._bold!=a&&(this._setTextDirty(),this._TF_Props_._bold=a)};Object.defineProperty(b,"textColor",{get:function(){return this._TF_Props_._textColor},set:function(a){this._setTextColor(a)},enumerable:!0,configurable:!0});b._setTextColor=function(a){this._TF_Props_._textColor!=a&&(this._setTextDirty(),this._TF_Props_._textColor=a,this._TF_Props_._textColorString=c.toColorString(a))};Object.defineProperty(b, "strokeColor",{get:function(){return this._TF_Props_._strokeColor},set:function(a){this._setStrokeColor(a)},enumerable:!0,configurable:!0});b._setStrokeColor=function(a){this._TF_Props_._strokeColor!=a&&(this._setTextDirty(),this._TF_Props_._strokeColor=a,this._TF_Props_._strokeColorString=c.toColorString(a))};Object.defineProperty(b,"stroke",{get:function(){return this._TF_Props_._stroke},set:function(a){this._setStroke(a)},enumerable:!0,configurable:!0});b._setStroke=function(a){this._TF_Props_._stroke!= a&&(this._setTextDirty(),this._TF_Props_._stroke=a)};Object.defineProperty(b,"textAlign",{get:function(){return this._TF_Props_._textAlign},set:function(a){this._setTextAlign(a)},enumerable:!0,configurable:!0});b._setTextAlign=function(a){this._TF_Props_._textAlign!=a&&(this._setTextDirty(),this._TF_Props_._textAlign=a)};Object.defineProperty(b,"verticalAlign",{get:function(){return this._TF_Props_._verticalAlign},set:function(a){this._setVerticalAlign(a)},enumerable:!0,configurable:!0});b._setVerticalAlign= function(a){this._TF_Props_._verticalAlign!=a&&(this._setTextDirty(),this._TF_Props_._verticalAlign=a)};Object.defineProperty(b,"maxChars",{get:function(){return this._TF_Props_._maxChars},set:function(a){this._setMaxChars(a)},enumerable:!0,configurable:!0});b._setMaxChars=function(a){this._TF_Props_._maxChars!=a&&(this._TF_Props_._maxChars=a)};Object.defineProperty(b,"scrollV",{get:function(){return Math.min(Math.max(this._TF_Props_._scrollV,1),this.maxScrollV)},set:function(a){this._TF_Props_._scrollV= Math.max(a,1);this._setDirty()},enumerable:!0,configurable:!0});Object.defineProperty(b,"maxScrollV",{get:function(){this._getLinesArr();return Math.max(this._TF_Props_._numLines-c.TextFieldUtils._getScrollNum(this)+1,1)},enumerable:!0,configurable:!0});Object.defineProperty(b,"selectionBeginIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(b,"selectionEndIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(b,"caretIndex",{get:function(){return 0}, enumerable:!0,configurable:!0});b._setSelection=function(a,b){};Object.defineProperty(b,"lineSpacing",{get:function(){return this._TF_Props_._lineSpacing},set:function(a){this._setLineSpacing(a)},enumerable:!0,configurable:!0});b._setLineSpacing=function(a){this._TF_Props_._lineSpacing!=a&&(this._setTextDirty(),this._TF_Props_._lineSpacing=a)};b._getLineHeight=function(){return this._TF_Props_._lineSpacing+this._TF_Props_._size};Object.defineProperty(b,"numLines",{get:function(){return this._TF_Props_._numLines}, enumerable:!0,configurable:!0});Object.defineProperty(b,"multiline",{get:function(){return this._TF_Props_._multiline},set:function(a){this._setMultiline(a)},enumerable:!0,configurable:!0});b._setMultiline=function(a){this._TF_Props_._multiline=a;this._setDirty()};b._setWidth=function(a){e.prototype._setWidth.call(this,a);this.fillBackground()};b._setHeight=function(a){e.prototype._setHeight.call(this,a);this.fillBackground()};Object.defineProperty(b,"border",{get:function(){return this._TF_Props_._border}, set:function(a){this._TF_Props_._border=a;this.fillBackground()},enumerable:!0,configurable:!0});Object.defineProperty(b,"borderColor",{get:function(){return this._TF_Props_._borderColor},set:function(a){this._TF_Props_._borderColor=a;this.fillBackground()},enumerable:!0,configurable:!0});Object.defineProperty(b,"background",{get:function(){return this._TF_Props_._background},set:function(a){this._TF_Props_._background=a;this.fillBackground()},enumerable:!0,configurable:!0});Object.defineProperty(b, "backgroundColor",{get:function(){return this._TF_Props_._backgroundColor},set:function(a){this._TF_Props_._backgroundColor=a;this.fillBackground()},enumerable:!0,configurable:!0});b.fillBackground=function(){var a=this._bgGraphics,b=this._TF_Props_;a&&a.clear();if(b._background||b._border)null==a&&(a=this._bgGraphics=new c.Graphics),b._background&&a.beginFill(b._backgroundColor,1),b._border&&a.lineStyle(1,b._borderColor),a.drawRect(0,0,this._getWidth(),this._getHeight()),a.endFill()};b.setFocus= function(){c.$warn(1013)};b._onRemoveFromStage=function(){e.prototype._onRemoveFromStage.call(this);this._removeEvent();this._TF_Props_._type==c.TextFieldType.INPUT&&this._inputUtils._removeStageText()};b._onAddToStage=function(){e.prototype._onAddToStage.call(this);this._addEvent();this._TF_Props_._type==c.TextFieldType.INPUT&&this._inputUtils._addStageText()};b._updateBaseTransform=function(){this._getLinesArr();0==this._TF_Props_._textMaxWidth&&this._TF_Props_._type!=c.TextFieldType.INPUT||e.prototype._updateTransform.call(this)}; b._updateTransform=function(){this._TF_Props_._type==c.TextFieldType.INPUT?this._DO_Props_._normalDirty?this._inputUtils._updateProperties():this._inputUtils._updateTransform():this._updateBaseTransform()};b._draw=function(a){var b=this._TF_Props_;if(b._type==c.TextFieldType.INPUT){if(this._isTyping)return}else if(0==b._textMaxWidth)return;e.prototype._draw.call(this,a)};b._render=function(a){this._bgGraphics&&this._bgGraphics._draw(a);this.drawText(a);this._clearDirty()};b._measureBounds=function(){var a= this._TF_Props_;this._getLinesArr();return 0==a._textMaxWidth?c.Rectangle.identity.initialize(0,0,0,0):c.Rectangle.identity.initialize(0,0,a._textMaxWidth,c.TextFieldUtils._getTextHeight(this))};Object.defineProperty(b,"textFlow",{get:function(){return this._textArr},set:function(a){var b=this._TF_Props_;this._isFlow=!0;var c="";null==a&&(a=[]);for(var d=0;dthis._DO_Props_._explicitWidth&&0!=f+v)break;G+=B[v].length;C+=y;f+=y;k+=G}if(0f)var l=c.TextFieldUtils._getValign(this), k=k+l*(this._DO_Props_._explicitHeight-f);for(var k=Math.round(k),f=c.TextFieldUtils._getHalign(this),l=0,m=h,n=b._numLines;mthis._DO_Props_._explicitHeight)break}for(var l=Math.round((e-p.width)*f),s=0,x=p.elements.length;s"]);this._replaceArr.push([/&/g,"&"]);this._replaceArr.push([/"/g,'"']);this._replaceArr.push([/'/g,"'"])};d.replaceSpecial=function(b){for(var a=0;ac?(this.addToResultArr(b.substring(a)),a=g):(this.addToResultArr(b.substring(a,c)),a=b.indexOf(">",c),"/"==b.charAt(c+1)?this.stackArray.pop():this.addToArray(b.substring(c+1,a)),a+=1)}return this.resutlArr};d.addToResultArr=function(b){""!=b&&(b=this.replaceSpecial(b),0=c)){this.firstCharHeight=c;break}}}return this.firstCharHeight};b.parseConfig=function(a){a=a.split("\r\n").join("\n");a=a.split("\n");for(var b=this.getConfigByKey(a[3],"count"),c={},d=4;d<4+b;d++){var e=a[d],f=String.fromCharCode(this.getConfigByKey(e,"id")),h={};c[f]=h;h.x=this.getConfigByKey(e,"x");h.y=this.getConfigByKey(e,"y");h.w=this.getConfigByKey(e,"width");h.h=this.getConfigByKey(e,"height"); h.offX=this.getConfigByKey(e,"xoffset");h.offY=this.getConfigByKey(e,"yoffset")}return c};b.getConfigByKey=function(a,b){for(var c=a.split(" "),d=0,e=c.length;da)break;b=c}return b};b.play=function(a){void 0===a&&(a=0);this._isPlaying=!0;this.setPlayTimes(a);1b?b=1:b>this._totalFrames&&(b=this._totalFrames);b!==this._nextFrameNum&& (this._nextFrameNum=b,this._advanceFrame(),this._constructFrame(),this._handlePendingEvent())};b._advanceTime=function(a){var b=this._frameIntervalTime;a=this._passedTime+a;this._passedTime=a%b;b=a/b;if(!(1>b)){for(;1<=b;){b--;this._nextFrameNum++;if(this._nextFrameNum>this._totalFrames)if(-1==this._playTimes)this._eventPool.push(c.Event.LOOP_COMPLETE),this._nextFrameNum=1;else if(this._playTimes--,0a||1<=a)this._playTimes=0>a?-1:Math.floor(a)}; b.setIsStopped=function(a){this._isStopped!=a&&((this._isStopped=a)?(this._playTimes=0,c.Ticker.getInstance().unregister(this._advanceTime,this)):(this._playTimes=0==this._playTimes?1:this._playTimes,c.Ticker.getInstance().register(this._advanceTime,this)))};d.renderFilter=c.RenderFilter.getInstance();return d}(c.DisplayObject);c.MovieClip=f;f.prototype.__class__="egret.MovieClip"})(egret||(egret={})); (function(c){var f=function(c){function d(a,b){c.call(this);this._name=a;this._frame=b|0}__extends(d,c);var b=d.prototype;Object.defineProperty(b,"name",{get:function(){return this._name},enumerable:!0,configurable:!0});Object.defineProperty(b,"frame",{get:function(){return this._frame},enumerable:!0,configurable:!0});b.clone=function(){return new d(this._name,this._frame)};return d}(c.EventDispatcher);c.FrameLabel=f;f.prototype.__class__="egret.FrameLabel"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this._mcData=null;this.numFrames=1;this.frames=[];this.labels=null;this.frameRate=0;this.spriteSheet=this.textureData=null}__extends(d,e);var b=d.prototype;b._init=function(a,b,c){this.textureData=b;this.spriteSheet=c;this._setMCData(a)};b.getKeyFrameData=function(a){a=this.frames[a-1];a.frame&&(a=this.frames[a.frame-1]);return a};b.getTextureByFrame=function(a){a=this.getKeyFrameData(a);if(a.res){var b=this.getTextureByResName(a.res);b._offsetX= a.x|0;b._offsetY=a.y|0;return b}return null};b.getTextureByResName=function(a){var b=this.spriteSheet.getTexture(a);b||(b=this.textureData[a],b=this.spriteSheet.createTexture(a,b.x,b.y,b.w,b.h));return b};b._isDataValid=function(){return 0this.ua.indexOf("windows")&&(0<=this.ua.indexOf("iphone")|| 0<=this.ua.indexOf("ipad")||0<=this.ua.indexOf("ipod"))};b.getIOSVersion=function(){return this.ua.toLowerCase().match(/cpu [^\d]*\d.*like mac os x/)[0].match(/\d(_\d)*/)[0]};b.getUserAgent=function(){return this.ua};b.getTrans=function(a,b){void 0===b&&(b=!1);var c="";b?c=this.getHeader(a):(null==this.header&&(this.header=this.getHeader("transform")),c=this.header);return""==c?a:c+a.charAt(0).toUpperCase()+a.substring(1,a.length)};b.getHeader=function(a){var b=document.createElement("div").style; if(a in b)return"";a=a.charAt(0).toUpperCase()+a.substring(1,a.length);for(var c=["webkit","ms","Moz","O"],d=0;dthis.write_position?a:this.write_position)},enumerable:!0,configurable:!0});Object.defineProperty(b,"length",{get:function(){return this.write_position},set:function(a){this.validateBuffer(a,!0)},enumerable:!0,configurable:!0});Object.defineProperty(b,"bytesAvailable",{get:function(){return this.data.byteLength-this._position},enumerable:!0,configurable:!0});b.clear=function(){this._setArrayBuffer(new ArrayBuffer(this.BUFFER_EXT_SIZE))};b.readBoolean=function(){return this.validate(d.SIZE_OF_BOOLEAN)? 0!=this.data.getUint8(this.position++):null};b.readByte=function(){return this.validate(d.SIZE_OF_INT8)?this.data.getInt8(this.position++):null};b.readBytes=function(a,b,c){void 0===b&&(b=0);void 0===c&&(c=0);if(0==c)c=this.bytesAvailable;else if(!this.validate(c))return null;a?a.validateBuffer(c):a=new d(new ArrayBuffer(c));for(var e=0;eb||0>c)&&(c=0==c?a.length-b:Math.min(a.length-b,c),0this.write_position?a:this.write_position;a+=this._position;if(this.data.byteLengthb;){var d=a[b++];if(this.inRange(d,55296,57343))this.encoderError(d);else if(this.inRange(d,0,127))c.push(d);else{var e,f;this.inRange(d,128,2047)?(e=1,f=192):this.inRange(d,2048,65535)?(e=2,f=224):this.inRange(d,65536,1114111)&&(e= 3,f=240);for(c.push(this.div(d,Math.pow(64,e))+f);0b;){d=a[b++];if(d===this.EOF_byte)d=0!==f?this.decoderError(!1):this.EOF_code_point;else if(0===f)this.inRange(d,0,127)||(this.inRange(d,194,223)?(f=1,l=128,e=d-192):this.inRange(d,224,239)?(f=2,l=2048,e=d-224):this.inRange(d,240,244)?(f=3,l=65536,e=d-240):this.decoderError(!1),e*=Math.pow(64, f),d=null);else if(this.inRange(d,128,191))if(h+=1,e+=(d-128)*Math.pow(64,f-h),h!==f)d=null;else{var m=e,n=l,l=h=f=e=0;d=this.inRange(m,n,1114111)&&!this.inRange(m,55296,57343)?m:this.decoderError(!1,d)}else l=h=f=e=0,b--,d=this.decoderError(!1,d);null!==d&&d!==this.EOF_code_point&&(65535>=d?0>10&1023)),c+=String.fromCharCode(56320+(d&1023))))}return c};b.encoderError=function(a){c.$error(1026,a)};b.decoderError=function(a, b){a&&c.$error(1027);return b||65533};b.inRange=function(a,b,c){return b<=a&&a<=c};b.div=function(a,b){return Math.floor(a/b)};b.stringToCodePoints=function(a){for(var b=[],c=0,d=a.length;ca&&(a=0);var c=a,d=!1;c>=this.duration&&(this.loop?c%=this.duration:(c=this.duration,d=!0));if(c==this._prevPos)return d; var e=this._prevPos;this.position=this._prevPos=c;this._prevPosition=a;if(this._target)if(d)this._updateTargetProps(null,1);else if(0c);f++);f=this._steps[f-1];this._updateTargetProps(f,(this._stepPosition=c-f.t)/f.d)}0!=b&&0b&&(d=b,e=a,f=h,h=l=-1);for(;(f+=l)!=h;){b=this._actions[f];var m=b.t;(m==e||m>d&&m=a)return this;var c=this._cloneProps(this._curQueueProps);return this._addStep({d:a,p0:c,p1:c,v:b})};b.to=function(a,b,c){void 0===c&&(c=void 0);if(isNaN(b)||0>b)b=0;return this._addStep({d:b||0,p0:this._cloneProps(this._curQueueProps),e:c,p1:this._cloneProps(this._appendQueueProps(a))})};b.call=function(a,b,c){void 0===b&&(b=void 0);void 0===c&&(c=void 0);return this._addAction({f:a,p:c?c:[],o:b?b:this._target})};b.set=function(a,b){void 0===b&&(b=null); return this._addAction({f:this._set,o:this,p:[a,b?b:this._target]})};b.play=function(a){a||(a=this);return this.call(a.setPaused,a,[!1])};b.pause=function(a){a||(a=this);return this.call(a.setPaused,a,[!0])};b.tick=function(a){this.paused||this.setPosition(this._prevPosition+a)};d.NONE=0;d.LOOP=1;d.REVERSE=2;d._tweens=[];d.IGNORE={};d._plugins={};d._inited=!1;return d}(c.EventDispatcher);c.Tween=f;f.prototype.__class__="egret.Tween"})(egret||(egret={})); (function(c){var f=function(){function e(){c.$error(1014)}e.get=function(c){-1>c&&(c=-1);1c?b*(b*-c+1+c):b*((2-b)*c+(1-c))}};e.getPowIn=function(c){return function(b){return Math.pow(b,c)}};e.getPowOut=function(c){return function(b){return 1-Math.pow(1-b,c)}};e.getPowInOut=function(c){return function(b){return 1>(b*=2)?0.5*Math.pow(b,c):1-0.5*Math.abs(Math.pow(2-b,c))}};e.sineIn=function(c){return 1-Math.cos(c*Math.PI/2)};e.sineOut=function(c){return Math.sin(c* Math.PI/2)};e.sineInOut=function(c){return-0.5*(Math.cos(Math.PI*c)-1)};e.getBackIn=function(c){return function(b){return b*b*((c+1)*b-c)}};e.getBackOut=function(c){return function(b){return--b*b*((c+1)*b+c)+1}};e.getBackInOut=function(c){c*=1.525;return function(b){return 1>(b*=2)?0.5*b*b*((c+1)*b-c):0.5*((b-=2)*b*((c+1)*b+c)+2)}};e.circIn=function(c){return-(Math.sqrt(1-c*c)-1)};e.circOut=function(c){return Math.sqrt(1- --c*c)};e.circInOut=function(c){return 1>(c*=2)?-0.5*(Math.sqrt(1-c*c)-1):0.5* (Math.sqrt(1-(c-=2)*c)+1)};e.bounceIn=function(c){return 1-e.bounceOut(1-c)};e.bounceOut=function(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+0.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+0.9375:7.5625*(c-=2.625/2.75)*c+0.984375};e.bounceInOut=function(c){return 0.5>c?0.5*e.bounceIn(2*c):0.5*e.bounceOut(2*c-1)+0.5};e.getElasticIn=function(c,b){var a=2*Math.PI;return function(g){if(0==g||1==g)return g;var e=b/a*Math.asin(1/c);return-(c*Math.pow(2,10*(g-=1))*Math.sin((g-e)*a/b))}};e.getElasticOut= function(c,b){var a=2*Math.PI;return function(g){if(0==g||1==g)return g;var e=b/a*Math.asin(1/c);return c*Math.pow(2,-10*g)*Math.sin((g-e)*a/b)+1}};e.getElasticInOut=function(c,b){var a=2*Math.PI;return function(g){var e=b/a*Math.asin(1/c);return 1>(g*=2)?-0.5*c*Math.pow(2,10*(g-=1))*Math.sin((g-e)*a/b):c*Math.pow(2,-10*(g-=1))*Math.sin((g-e)*a/b)*0.5+1}};e.quadIn=e.getPowIn(2);e.quadOut=e.getPowOut(2);e.quadInOut=e.getPowInOut(2);e.cubicIn=e.getPowIn(3);e.cubicOut=e.getPowOut(3);e.cubicInOut=e.getPowInOut(3); e.quartIn=e.getPowIn(4);e.quartOut=e.getPowOut(4);e.quartInOut=e.getPowInOut(4);e.quintIn=e.getPowIn(5);e.quintOut=e.getPowOut(5);e.quintInOut=e.getPowInOut(5);e.backIn=e.getBackIn(1.7);e.backOut=e.getBackOut(1.7);e.backInOut=e.getBackInOut(1.7);e.elasticIn=e.getElasticIn(1,0.3);e.elasticOut=e.getElasticOut(1,0.3);e.elasticInOut=e.getElasticInOut(1,0.3*1.5);return e}();c.Ease=f;f.prototype.__class__="egret.Ease"})(egret||(egret={})); (function(c){var f=function(e){function d(){e.call(this);this.path="";this.audio=null;this.type=d.EFFECT;this._pauseTime=0;this._listeners=[]}__extends(d,e);var b=d.prototype;Object.defineProperty(b,"position",{get:function(){return this.audio?Math.floor(1E3*this.audio._getCurrentTime()):0},enumerable:!0,configurable:!0});b.play=function(a,b){void 0===a&&(a=!1);void 0===b&&(b=0);var c=this.audio;c&&(c._setCurrentTime(b/1E3),c._setLoop(a),c._play(this.type))};b.stop=function(){var a=this.audio;a&& (this._pauseTime=0,a._setCurrentTime(0),a._pause())};b.pause=function(){var a=this.audio;a&&(this._pauseTime=a._getCurrentTime(),a._pause())};b.resume=function(){var a=this.audio;a&&(a._setCurrentTime(this._pauseTime),this._pauseTime=0,a._play(this.type))};b.load=function(){var a=this.audio;a&&a._load()};b.addEventListener=function(a,b,d){e.prototype.addEventListener.call(this,a,b,d);var f=this;this.audio&&1==this._eventsMap[a].length&&(b=a==c.SoundEvent.SOUND_COMPLETE?function(a){c.Event._dispatchByTarget(c.SoundEvent, f,c.SoundEvent.SOUND_COMPLETE)}:function(a){c.Event._dispatchByTarget(c.Event,f,a.type)},this._listeners.push({type:a,func:b}),a=f.getVirtualType(a),this.audio._addEventListener(a,b,!1))};b.removeEventListener=function(a,b,c){e.prototype.removeEventListener.call(this,a,b,c);if(this.audio&&(!this._eventsMap||!this._eventsMap[a]||0==this._eventsMap[a].length))for(c=0;cc&&(c+=360);return 90>c?egret_sin_map[c]:180>c?egret_cos_map[c-90]:270>c?-egret_sin_map[c-180]:-egret_cos_map[c-270]};c.cos=function(d){var b=Math.floor(d),a=b+1,g=c.cosInt(b),f=c.cosInt(a);return(d-b)*f+(a-d)*g};c.cosInt=function(c){c%=360;0>c&&(c+=360);return 90>c?egret_cos_map[c]: 180>c?-egret_sin_map[c-90]:270>c?-egret_cos_map[c-180]:egret_sin_map[c-270]};return c}();c.NumberUtils=f;f.prototype.__class__="egret.NumberUtils"})(egret||(egret={}));for(var egret_sin_map={},egret_cos_map={},NumberUtils_i=0;90>=NumberUtils_i;NumberUtils_i++)egret_sin_map[NumberUtils_i]=Math.sin(NumberUtils_i*egret.Matrix.DEG_TO_RAD),egret_cos_map[NumberUtils_i]=Math.cos(NumberUtils_i*egret.Matrix.DEG_TO_RAD); Function.prototype.bind||(Function.prototype.bind=function(c){"function"!==typeof this&&egret.$error(1029);var f=Array.prototype.slice.call(arguments,1),e=this,d=function(){},b=function(){return e.apply(this instanceof d&&c?this:c,f.concat(Array.prototype.slice.call(arguments)))};d.prototype=this.prototype;b.prototype=new d;return b}); (function(c){var f=function(){function e(){this.downloadingSizeThisObject=this.downloadingSizeFunc=this.onErrorThisObject=this.onErrorFunc=this.onSuccessThisObject=this.onSuccessFunc=null}var d=e.prototype;e.create=function(){return e.promiseObjectList.length?e.promiseObjectList.pop():new c.PromiseObject};d.onSuccess=function(){for(var b=[],a=0;aa&&(m=a-h);l+k>b&&(k=b-l); 0n;n++)if("glow"==this.filters[0].type){this.useGlow(a,b,c,d,e,f,h,l,m);return}this._drawImage(a,b,c,d,e,f,h,l,m)}}};b._drawImage=function(a,b,c,d,e,f,h,l,m){this.createWebGLTexture(a);var n=a._bitmapData.webGLTexture[this.glID];if(n!==this.currentBaseTexture||this.currentBatchSize>=this.size-1)this._drawWebGL(), this.currentBaseTexture=n;var p=this.worldTransform,t=p.a,s=p.b,x=p.c,z=p.d,w=p.tx,y=p.ty;0==f&&0==h||p.append(1,0,0,1,f,h);1==d/l&&1==e/m||p.append(l/d,0,0,m/e,0,0);f=p.a;h=p.b;l=p.c;m=p.d;var n=p.tx,v=p.ty;p.a=t;p.b=s;p.c=x;p.d=z;p.tx=w;p.ty=y;t=a._sourceWidth;s=a._sourceHeight;a=d;p=e;b/=t;c/=s;d/=t;e/=s;t=this.vertices;s=4*this.currentBatchSize*this.vertSize;x=this.worldAlpha;t[s++]=n;t[s++]=v;t[s++]=b;t[s++]=c;t[s++]=x;t[s++]=f*a+n;t[s++]=h*a+v;t[s++]=d+b;t[s++]=c;t[s++]=x;t[s++]=f*a+l*p+n;t[s++]= m*p+h*a+v;t[s++]=d+b;t[s++]=e+c;t[s++]=x;t[s++]=l*p+n;t[s++]=m*p+v;t[s++]=b;t[s++]=e+c;t[s++]=x;this.currentBatchSize++};b.useGlow=function(a,b,e,f,q,k,h,l,m){var n=this.filters[0],p=n.distance||0,t=n.angle||0,s=0,x=0;0!=p&&0!=t&&(s=Math.ceil(p*c.NumberUtils.cos(t)),x=Math.ceil(p*c.NumberUtils.sin(t)));var p=n.quality,t=n.blurX/10,z=n.blurY/10,w=l+2*t+20+Math.abs(s),y=m+2*z+20+Math.abs(x);d.initWebGLCanvas();var v=c.RenderTexture.WebGLRenderer,C=c.RenderTexture.WebGLCanvas,A=c.RenderTexture.create(); A._bitmapData||A.init();A.setSize(w,y);A._sourceWidth=w;A._sourceHeight=y;var B=c.RenderTexture.create();B._bitmapData||B.init();B.setSize(w,y);B._sourceWidth=w;B._sourceHeight=y;v.clearScreen();v.filterType="colorTransform";v.setGlobalColorTransform([0,0,0,0,n._red,0,0,0,0,n._green,0,0,0,0,n._blue,0,0,0,0,255*n.alpha]);v.setAlpha(1,c.BlendMode.NORMAL);v.setTransform(new c.Matrix(1,0,0,1,0,0));v.drawImage(a,b,e,f,q,t+10,z+10,l,m);v._drawWebGL();v.filterType=null;A.canvasContext.clearRect(0,0,w,y); A.canvasContext.drawImage(C,0,0,w,y,0,0,w,y);v.clearScreen();v.setAlpha(1,c.BlendMode.NORMAL);v.setTransform(new c.Matrix(1,0,0,1,0,0));v.filterType="blur";v.setBlurData(t,0);c.Texture.deleteWebGLTexture(A);v.drawImage(A,t,z,w-2*t,y-2*z,t,z,w-2*t,y-2*z);v._drawWebGL();v.filterType=null;B.canvasContext.clearRect(0,0,w,y);B.canvasContext.drawImage(C,0,0,w,y,0,0,w,y);v.clearScreen();v.setAlpha(1,c.BlendMode.NORMAL);v.setTransform(new c.Matrix(1,0,0,1,0,0));v.filterType="blur";v.setBlurData(0,z);c.Texture.deleteWebGLTexture(B); v.drawImage(B,0,z,w,y-2*z,0,z+5,w,y-2*z);v._drawWebGL();v.filterType=null;A.canvasContext.clearRect(0,0,w,y);A.canvasContext.drawImage(C,0,0,w,y,0,0,w,y);v.clearScreen();v.setAlpha(1,c.BlendMode.NORMAL);v.setTransform(new c.Matrix(1,0,0,1,0,0));c.Texture.deleteWebGLTexture(A);for(n=0;nd&&(d=0);0>e&&(e=0);f.scissor(a,-b+c.MainContext.instance.stage.stageHeight-e,d,e)}; b.setGlobalColorTransform=function(a){if(this.colorTransformMatrix!=a&&(this._drawWebGL(),this.colorTransformMatrix=a)){a=a.concat();var b=this.shaderManager.colorTransformShader;b.uniforms.colorAdd.value.w=a.splice(19,1)[0]/255;b.uniforms.colorAdd.value.z=a.splice(14,1)[0]/255;b.uniforms.colorAdd.value.y=a.splice(9,1)[0]/255;b.uniforms.colorAdd.value.x=a.splice(4,1)[0]/255;b.uniforms.matrix.value=a}};b.setBlurData=function(a,b){var c=this.shaderManager.blurShader;c.uniforms.blur.value.x=a;c.uniforms.blur.value.y= b};b.setGlobalFilters=function(a){this._drawWebGL();this.setFilterProperties(a)};b.setFilterProperties=function(a){if((this.filters=a)&&a.length)for(var b=0;1>b;b++){var c=a[b];this.filterType=c.type;switch(c.type){case "blur":this.setBlurData(c.blurX,c.blurY);break;case "colorTransform":this.setGlobalColorTransform(c._matrix)}}else this.filterType=null};b.setupFont=function(a,b){void 0===b&&(b=null);this.canvasContext.setupFont(a,b)};b.measureText=function(a){return this.canvasContext.measureText(a)}; b.renderGraphics=function(a){this._drawWebGL();var b=this.gl,c=this.shaderManager.primitiveShader;this.graphicsPoints?(this.graphicsPoints.length=0,this.graphicsIndices.length=0):(this.graphicsPoints=[],this.graphicsIndices=[],this.graphicsBuffer=b.createBuffer(),this.graphicsIndexBuffer=b.createBuffer());this.updateGraphics(a);this.shaderManager.activateShader(c);b.blendFunc(b.ONE,b.ONE_MINUS_SRC_ALPHA);b.uniformMatrix3fv(c.translationMatrix,!1,this.worldTransform.toArray(!0));b.uniform2f(c.projectionVector, this.projectionX,-this.projectionY);b.uniform2f(c.offsetVector,0,0);b.uniform3fv(c.tintColor,[1,1,1]);b.uniform1f(c.alpha,this.worldAlpha);b.bindBuffer(b.ARRAY_BUFFER,this.graphicsBuffer);b.vertexAttribPointer(c.aVertexPosition,2,b.FLOAT,!1,24,0);b.vertexAttribPointer(c.colorAttribute,4,b.FLOAT,!1,24,8);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.graphicsIndexBuffer);b.drawElements(b.TRIANGLE_STRIP,this.graphicsIndices.length,b.UNSIGNED_SHORT,0);this.shaderManager.activateShader(this.shaderManager.defaultShader)}; b.updateGraphics=function(a){var b=this.gl;this.buildRectangle(a);b.bindBuffer(b.ARRAY_BUFFER,this.graphicsBuffer);b.bufferData(b.ARRAY_BUFFER,new Float32Array(this.graphicsPoints),b.STATIC_DRAW);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.graphicsIndexBuffer);b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.graphicsIndices),b.STATIC_DRAW)};b.buildRectangle=function(a){var b=a.x,c=a.y,d=a.w;a=a.h;var e=this.graphicsStyle.a,f=this.graphicsStyle.r*e,h=this.graphicsStyle.g*e,l=this.graphicsStyle.b* e,m=this.graphicsPoints,n=this.graphicsIndices,p=m.length/6;m.push(b,c);m.push(f,h,l,e);m.push(b+d,c);m.push(f,h,l,e);m.push(b,c+a);m.push(f,h,l,e);m.push(b+d,c+a);m.push(f,h,l,e);n.push(p,p,p+1,p+2,p+3,p+3)};b.setGraphicsStyle=function(a,b,c,d){this.graphicsStyle.r=a;this.graphicsStyle.g=b;this.graphicsStyle.b=c;this.graphicsStyle.a=d};d.glID=0;d.isInit=!1;return d}(c.RendererContext);c.WebGLRenderer=f;f.prototype.__class__="egret.WebGLRenderer"})(egret||(egret={}));var egret_webgl_graphics; (function(c){c.beginFill=function(c,d){void 0===d&&(d=1);this._pushCommand(new f(this._setStyle,this,[(c>>16)/255,((c&65280)>>8)/255,(c&255)/255,d]))};c.beginGradientFill=function(c,d,b,a,g){};c.drawRect=function(c,d,b,a){this._pushCommand(new f(function(a){this.renderContext.renderGraphics(a)},this,[{x:c,y:d,w:b,h:a}]));this._checkRect(c,d,b,a)};c.drawCircle=function(c,d,b){};c.drawRoundRect=function(c,d,b,a,g,f){};c.drawEllipse=function(c,d,b,a){};c.lineStyle=function(c,d,b,a,g,f,r,q){};c.lineTo= function(c,d){};c.curveTo=function(c,d,b,a){};c.cubicCurveTo=function(c,d,b,a,g,f){};c.moveTo=function(c,d){};c.clear=function(){this._maxY=this._maxX=this._minY=this._minX=this.commandQueue.length=0};c.endFill=function(){};c._pushCommand=function(c){this.commandQueue.push(c)};c._draw=function(c){var d=this.commandQueue.length;if(0!=d)for(this.renderContext=c,c=0;ca||0>b||a>d.stageWidth||b>d.stageHeight?!0:!1};b.dispatchLeaveStageEvent=function(){this.touchingIdentifiers.length=0;c.MainContext.instance.stage.dispatchEventWith(c.Event.LEAVE_STAGE)};b._onTouchBegin=function(a){var b= this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);this.onTouchBegan(b.x,b.y,c)};b._onTouchMove=function(a){var b=this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);this.onTouchMove(b.x,b.y,c)};b._onTouchEnd=function(a){var b=this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);this.onTouchEnd(b.x,b.y,c)};b.getLocation=function(a,b){var d=document.documentElement,e=window,f,k;"function"===typeof a.getBoundingClientRect? (k=a.getBoundingClientRect(),f=k.left,k=k.top):k=f=0;f+=e.pageXOffset-d.clientLeft;k+=e.pageYOffset-d.clientTop;null!=b.pageX?(d=b.pageX,e=b.pageY):(f-=document.body.scrollLeft,k-=document.body.scrollTop,d=b.clientX,e=b.clientY);var h=c.Point.identity;h.x=(d-f)/c.StageDelegate.getInstance().getScaleX();h.y=(e-k)/c.StageDelegate.getInstance().getScaleY();return h};return d}(c.TouchContext);c.HTML5TouchContext=f;f.prototype.__class__="egret.HTML5TouchContext"})(egret||(egret={})); (function(c){var f=function(d){function b(){d.call(this);this._isNeedShow=!1;this.inputDiv=this.inputElement=null;this._gscaleY=this._gscaleX=0;this._isNeesHide=!1;this.textValue="";this._styleInfoes={};e.getInstance()}__extends(b,d);var a=b.prototype;a._initElement=function(a,b,d,e){var f=c.StageDelegate.getInstance().getScaleX(),h=c.StageDelegate.getInstance().getScaleY();this.inputDiv.style.left=a*f+"px";this.inputDiv.style.top=b*h+"px";this._gscaleX=f*d;this._gscaleY=h*e};a._show=function(a,b, c,d){this._multiline=a;e.getInstance().isCurrentStageText(this)?this.inputElement.onblur=null:(this.inputElement=e.getInstance().getInputElement(this),this.inputDiv=e.getInstance()._inputDIV);this._isNeedShow=e.getInstance()._needShow=!0};a.onBlurHandler=function(){e.getInstance().clearInputElement();window.scrollTo(0,0)};a.executeShow=function(){this.inputElement.value=this._getText();null==this.inputElement.onblur&&(this.inputElement.onblur=this.onBlurHandler);this._resetStageText();0=e.decodeArr.length||e.isDecoding)){e.isDecoding=!0;var b=e.decodeArr.shift();e.ctx.decodeAudioData(b.buffer,function(a){b.self.audioBuffer=a;b.callback&&b.callback();e.isDecoding= !1;e.decodeAudios()})}};d._play=function(b){var a=this;this.bufferSource&&(this.bufferSource.onended=null,this.removeListeners(),this.bufferSource=null);b=this.context;var c=this.gain,d=b.createBufferSource();this.bufferSource=d;this.addListeners();d.buffer=this.audioBuffer;d.connect(c);c.connect(b.destination);d.onended=function(b){a.clear();a._onEndedCall&&a._onEndedCall.call(null,b);a._loop&&!a.paused&&a._play()};this.paused=!1;this._startTime=Date.now();this.gain.gain.value=this._volume;d.start(0, this._currentTime);this._currentTime=0};d.clear=function(){if(this.bufferSource){this.removeListeners();var b=this.bufferSource;b.stop?b.stop(0):b.noteOff(0);this.bufferSource.disconnect();this.bufferSource=null}};d.addListeners=function(){for(var b=0;bb.indexOf(this.getVirtualUrl(c))&& a.push({url:this.getVirtualUrl(c),size:this._versionInfo[c].s});return a};b.getVirtualUrl=function(a){return this._versionInfo[a]?"resource/"+this._versionInfo[a].v.substring(0,2)+"/"+this._versionInfo[a].v+"_"+this._versionInfo[a].s:a};b.loadAllChange=function(){};b.getLocalData=function(a){if(egret_native.readUpdateFileSync&&egret_native.readResourceFileSync){var b=egret_native.readUpdateFileSync(a);if(null!=b)return JSON.parse(b);b=egret_native.readResourceFileSync(a);return null!=b?JSON.parse(b): null}return this.getLocalDataByOld(a)};b.getLocalDataByOld=function(a){var b=null;egret_native.isRecordExists(a)?(a=egret_native.loadRecord(a),b=JSON.parse(a)):egret_native.isFileExists(a)&&(a=egret_native.readFileSync(a),b=JSON.parse(a));return b};return d}(c.EventDispatcher);c.NativeVersionController=f;f.prototype.__class__="egret.NativeVersionController"})(egret||(egret={}));var RES; (function(c){var f=function(c){function d(b,a,d){void 0===a&&(a=!1);void 0===d&&(d=!1);c.call(this,b,a,d);this.itemsTotal=this.itemsLoaded=0;this.groupName="";this.resItem=null}__extends(d,c);d.dispatchResourceEvent=function(b,a,c,e,f,q){void 0===c&&(c="");void 0===e&&(e=null);void 0===f&&(f=0);void 0===q&&(q=0);var k=egret.Event._getPropertyData(d);k.groupName=c;k.resItem=e;k.itemsLoaded=f;k.itemsTotal=q;egret.Event._dispatchByTarget(d,b,a,k)};d.ITEM_LOAD_ERROR="itemLoadError";d.CONFIG_COMPLETE= "configComplete";d.CONFIG_LOAD_ERROR="configLoadError";d.GROUP_PROGRESS="groupProgress";d.GROUP_COMPLETE="groupComplete";d.GROUP_LOAD_ERROR="groupLoadError";return d}(egret.Event);c.ResourceEvent=f;f.prototype.__class__="RES.ResourceEvent"})(RES||(RES={})); (function(c){var f=function(){function c(b,a,d){this.groupName="";this.data=null;this._loaded=!1;this.name=b;this.url=a;this.type=d}var d=c.prototype;Object.defineProperty(d,"loaded",{get:function(){return this.data?this.data.loaded:this._loaded},set:function(b){this.data&&(this.data.loaded=b);this._loaded=b},enumerable:!0,configurable:!0});d.toString=function(){return'[ResourceItem name="'+this.name+'" url="'+this.url+'" type="'+this.type+'"]'};c.TYPE_XML="xml";c.TYPE_IMAGE="image";c.TYPE_BIN="bin"; c.TYPE_TEXT="text";c.TYPE_JSON="json";c.TYPE_SHEET="sheet";c.TYPE_FONT="font";c.TYPE_SOUND="sound";return c}();c.ResourceItem=f;f.prototype.__class__="RES.ResourceItem"})(RES||(RES={})); (function(c){var f=function(){function e(){this.keyMap={};this.groupDic={};c.configInstance=this}var d=e.prototype;d.getGroupByName=function(b){var a=[];if(!this.groupDic[b])return a;b=this.groupDic[b];for(var c=b.length,d=0;d=b&&(this.queueIndex=0);c=this.itemListDic[a[this.queueIndex]];if(0this.maxRetryTimes)delete this.retryTimesDic[a.name],c.ResourceEvent.dispatchResourceEvent(this.resInstance,c.ResourceEvent.ITEM_LOAD_ERROR,b,a);else{this.retryTimesDic[a.name]= d+1;this.failedList.push(a);this.next();return}}if(b){this.numLoadedDic[b]++;var d=this.numLoadedDic[b],e=this.groupTotalDic[b];a.loaded||(this.groupErrorDic[b]=!0);c.ResourceEvent.dispatchResourceEvent(this.resInstance,c.ResourceEvent.GROUP_PROGRESS,b,a,d,e);d==e&&(a=this.groupErrorDic[b],this.removeGroupName(b),delete this.groupTotalDic[b],delete this.numLoadedDic[b],delete this.itemListDic[b],delete this.groupErrorDic[b],a?c.ResourceEvent.dispatchResourceEvent(this,c.ResourceEvent.GROUP_LOAD_ERROR, b):c.ResourceEvent.dispatchResourceEvent(this,c.ResourceEvent.GROUP_COMPLETE,b))}else this.callBack.call(this.resInstance,a);this.next()};b.removeGroupName=function(a){for(var b in this.priorityQueue){for(var c=this.priorityQueue[b],d=c.length,e=0,f=!1,d=c.length,h=0;ha&&(a=1);this.resLoader.thread=a};a.setMaxRetryTimes=function(a){a=Math.max(a,0);this.resLoader.maxRetryTimes=a};b.GROUP_CONFIG="RES__CONFIG";return b}(egret.EventDispatcher);f.prototype.__class__="RES.Resource";var e=new f})(RES||(RES={})); (function(c,f){"function"===typeof define&&define.amd?define(f):"object"===typeof exports?module.exports=f():c.SAT=f()})(this,function(){function c(a,b){this.x=a||0;this.y=b||0}function f(a,b){this.pos=a||new c;this.r=b||0}function e(a,b){this.pos=a||new c;this.angle=0;this.offset=new c;this.setPoints(b||[])}function d(a,b,d){this.pos=a||new c;this.w=b||0;this.h=d||0}function b(){this.b=this.a=null;this.overlapN=new c;this.overlapV=new c;this.clear()}function a(a,b,c){for(var d=Number.MAX_VALUE,e= -Number.MAX_VALUE,g=a.length,f=0;fe&&(e=h)}c[0]=d;c[1]=e}function g(b,c,d,e,g,f){var k=m.pop(),l=m.pop();b=h.pop().copy(c).sub(b);c=b.dot(g);a(d,g,k);a(e,g,l);l[0]+=c;l[1]+=c;if(k[0]>l[1]||l[0]>k[1])return h.push(b),m.push(k),m.push(l),!0;f&&(d=0,k[0]l[1]?(d=k[0]-l[1],f.aInB=!1):(d=k[1]-l[0],e=l[1]-k[0],d=dd&&f.overlapN.reverse()));h.push(b);m.push(k);m.push(l);return!1}function u(a,b){var c=a.len2(),d=b.dot(a);return 0>d?-1:d>c?1:0}function r(a,b,c){for(var d=h.pop().copy(b.pos).sub(a.pos),e=b.r,g=e*e,f=a.calcPoints,k=f.length,l=h.pop(),m=h.pop(),n=0;ng&&(c.aInB=!1);var D=u(l,m);if(-1===D){l.copy(a.edges[r]);p=h.pop().copy(d).sub(f[r]);D=u(l,p);if(1===D){D=m.len();if(D>e)return h.push(d), h.push(l),h.push(m),h.push(p),!1;c&&(c.bInA=!1,E=m.normalize(),q=e-D)}h.push(p)}else if(1===D){if(l.copy(a.edges[p]),m.copy(d).sub(f[p]),D=u(l,m),-1===D){D=m.len();if(D>e)return h.push(d),h.push(l),h.push(m),!1;c&&(c.bInA=!1,E=m.normalize(),q=e-D)}}else{p=l.perp().normalize();D=m.dot(p);r=Math.abs(D);if(0e)return h.push(d),h.push(p),h.push(m),!1;c&&(E=p,q=e-D,0<=D||q<2*e)&&(c.bInA=!1)}E&&c&&Math.abs(q)f&&(f=l.x);l.yh&&(h=l.y)}return(new d(this.pos.clone().add(new c(e,g)),f-e,h-g)).toPolygon()};k.Box=d;d.prototype.toPolygon=d.prototype.toPolygon=function(){var a=this.pos,b=this.w,d=this.h;return new e(new c(a.x,a.y),[new c,new c(b,0),new c(b, d),new c(0,d)])};k.Response=b;b.prototype.clear=b.prototype.clear=function(){this.bInA=this.aInB=!0;this.overlap=Number.MAX_VALUE;return this};for(var h=[],l=0;10>l;l++)h.push(new c);for(var m=[],l=0;5>l;l++)m.push([]);var n=new b,p=(new d(new c,1,1)).toPolygon();k.pointInCircle=function(a,b){var c=h.pop().copy(a).sub(b.pos),d=b.r*b.r,e=c.len2();h.push(c);return e<=d};k.pointInPolygon=function(a,b){p.pos.copy(a);n.clear();var c=q(p,b,n);c&&(c=n.aInB);return c};k.testCircleCircle=function(a,b,c){var d= h.pop().copy(b.pos).sub(a.pos),e=a.r+b.r,g=e*e,f=d.len2();if(f>g)return h.push(d),!1;c&&(g=Math.sqrt(f),c.a=a,c.b=b,c.overlap=e-g,c.overlapN.copy(d.normalize()),c.overlapV.copy(d).scale(c.overlap),c.aInB=a.r<=b.r&&g<=b.r-a.r,c.bInA=b.r<=a.r&&g<=a.r-b.r);h.push(d);return!0};k.testPolygonCircle=r;k.testCirclePolygon=function(a,b,c){if((a=r(b,a,c))&&c){b=c.a;var d=c.aInB;c.overlapN.reverse();c.overlapV.reverse();c.a=c.b;c.b=b;c.aInB=c.bInA;c.bInA=d}return a};k.testPolygonPolygon=q;return k}); var GameData=function(){function c(){}c.getLocalData=function(){var f=JSON.parse(egret.localStorage.getItem(this.storageKey));f&&(c.USER_DATA.money=f.money,c.USER_DATA.unlockedRoles=f.unlockedRoles)};c.setLocalData=function(){var f=JSON.stringify(c.USER_DATA);egret.localStorage.setItem(this.storageKey,f)};c.storageKey="runningMan";c.ROLES_DATA=[];c.USER_DATA={money:0,unlockedRoles:[]};c.RUNNING_MAN="lanlan";return c}();GameData.prototype.__class__="GameData"; var GameEvent=function(){function c(){}c.BEGIN="\u6e38\u620f\u5f00\u59cb";c.GAME_OVER="\u6e38\u620f\u7ed3\u675f";c.PAUSE="\u6e38\u620f\u6682\u505c";c.RESUME="\u6e38\u620f\u6062\u590d";c.RESTART="\u91cd\u65b0\u5f00\u59cb\u6e38\u620f";c.RETURN_TO_BEGIN="\u8fd4\u56de\u9996\u9875";c.LOSE_POWER="\u5931\u53bb\u80fd\u91cf";return c}();GameEvent.prototype.__class__="GameEvent";var GameUtil; (function(c){function f(c){return 180*c/Math.PI}c.addChildren=function(c,d){void 0===d&&(d=[]);for(var b=0,a=d.length;b=b&&a<=r&&f>=g};c.getRadian=function(c,d,b,a,g){void 0===b&&(b=!1);void 0===a&&(a=0);void 0===g&&(g=0);var u=0,u=Math.PI,r=Math.sqrt((c-a)*(c-a)+(d-g)*(d-g)),u=c>a?d>g?Math.asin((d-g)/r)+u/2:Math.asin((c-a)/r):d>g?Math.asin((a-c)/r)+u:Math.asin((g-d)/r)+3*u/2;return b?f(u):u};c.changeSize=function(c,d,b){b=b?b:d;c.scaleX=d;c.scaleY=b;c.width*=d;c.height*=b};c.getDistance=function(c,d,b,a){return Math.sqrt((c-b)*(c-b)+(d-a)*(d-a))}})(GameUtil||(GameUtil={}));var StageSize; (function(c){c.getStageW=function(){return window.stage_width};c.getStageH=function(){return window.stage_height}})(StageSize||(StageSize={})); var BeginPage=function(c){function f(){c.call(this);var e=new egret.Bitmap(RES.getRes("gameScene_json.bg_small")),d=new egret.Shape;d.graphics.beginFill(0,0.5);d.graphics.drawRect(0,0,StageSize.getStageW(),StageSize.getStageH());d.graphics.endFill();var b=new egret.Bitmap(RES.getRes("beginPage_json.title"));this.begin=new egret.Bitmap(RES.getRes("beginPage_json.btn-startGame-normal"));GameUtil.addChildren(this,[e,d,b,this.begin]);e.width=StageSize.getStageW();e.height=StageSize.getStageH();b.x=(StageSize.getStageW()- b.width)/2;b.y=100;this.begin.x=(StageSize.getStageW()-this.begin.width)/2;this.begin.y=StageSize.getStageH()/2;this.begin.touchEnabled=!0;this.begin.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.beginPress,this);this.begin.addEventListener(egret.TouchEvent.TOUCH_END,this.beginPress,this)}__extends(f,c);f.prototype.beginPress=function(c){"touchBegin"===c.type?this.begin.texture=RES.getRes("beginPage_json.btn-startGame-press"):(this.begin.texture=RES.getRes("beginPage_json.btn-startGame-normal"), this.dispatchEvent(new egret.Event(GameEvent.BEGIN)))};return f}(egret.DisplayObjectContainer);BeginPage.prototype.__class__="BeginPage";var Character; (function(c){var f=function(c){function b(a,b,e){void 0===b&&(b=0);void 0===e&&(e=0);c.call(this);this.isFront=!0;this.name=a;this.x=b;this.y=e;a=RES.getRes(this.name+"_json");b=RES.getRes(this.name+"_png");this.mcFactory=new egret.MovieClipDataFactory(a,b);this.role=new egret.MovieClip(this.mcFactory.generateMovieClipData(this.name));this.role.play(-1);GameUtil.changeSize(this.role,0.5);this.addChild(this.role);this.SATObj=(new SAT.Box(new SAT.Vector(this.x,this.y),this.role.width,this.role.height)).toPolygon().translate(-this.role.width/ 2,-this.role.height/2)}__extends(b,c);var a=b.prototype;a.turnFace=function(a){void 0===a&&(a=!0);this.isFront=a;this.role.movieClipData=a?this.mcFactory.generateMovieClipData(this.name):this.mcFactory.generateMovieClipData(this.name+"_back");this.role.play(-1)};a.stopRunning=function(){};a.resumeRunning=function(){};return b}(egret.DisplayObjectContainer);f.prototype.__class__="Character.character";var e=function(c){function b(a,b,e){void 0===b&&(b=0);void 0===e&&(e=0);c.call(this,a,b,e);this.powerLastTime= 5E3;this.isPowerState=!1}__extends(b,c);var a=b.prototype;a.getCaught=function(){this.stopRunning();var a=new egret.Bitmap(RES.getRes("gameScene_json."+this.name));a.anchorX=a.anchorY=0.5;a.scaleX=a.scaleY=0.5;return a};a.powerUp=function(){this.isPowerState=!0;this.power||(this.power=new egret.Bitmap(RES.getRes("gameScene_json.power")),this.power.anchorX=0.5,this.power.anchorY=1,this.power.scaleX=1.5,this.power.scaleY=1.5);this.addChildAt(this.power,0);this.power.x=this.role.x;this.power.y=this.role.y+ this.role.height/2;this.power.alpha=1;egret.Tween.get(this.power,{loop:!0}).to({scaleX:2,scaleY:2},200).to({scaleX:1.5,scaleY:1.5},200);this.powerTimer=new egret.Timer(100,this.powerLastTime/100);this.powerTimer.addEventListener(egret.TimerEvent.TIMER,this.removePower,this);this.powerTimer.start()};a.removePower=function(a){0.7this.roleIndex?(this.roleIndex++,this.leftBtn.touchEnabled=!0,this.leftBtn.alpha=1,6===this.roleIndex&&(this.rightBtn.touchEnabled=!1,this.rightBtn.alpha=0.5)):"left"===c&&0=c.prize)GameData.USER_DATA.money-=c.prize,this.userAccount.text=GameData.USER_DATA.money+"",GameData.USER_DATA.unlockedRoles.push(c.name),GameData.ROLES_DATA[this.roleIndex].unlocked=!0,GameData.setLocalData(),this.removeChild(this.rolesPrizeBorder),this.removeChild(this.rolesPrize),this.beginBtn.texture=RES.getRes("beginPage_json.btn-action-normal"),this.portrait.texture=RES.getRes("beginPage_json."+c.name);else{c= new egret.Sprite;c.graphics.beginFill(0,0.8);c.graphics.drawRect(0,0,StageSize.getStageW(),StageSize.getStageH());c.graphics.endFill();var b=new egret.TextField;b.text="\u91d1\u5e01\u4e0d\u8db3";b.size=100;b.fontFamily="Microsoft YaHei";b.x=(StageSize.getStageW()-b.width)/2;b.y=(StageSize.getStageH()-b.height)/2;c.addChild(b);this.addChild(c);egret.setTimeout(this.removeChild,this,500,c)}};return f}(egret.DisplayObjectContainer);UnlockPage.prototype.__class__="UnlockPage"; var Main=function(c){function f(){c.call(this);this.hasShownRule=!1;this.blackMenArr=[];this.huntingSpeed=1;this.juiceTime=0;this.buildings=[];this.score=0;this.coins=[];this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(f,c);var e=f.prototype;e.onAddToStage=function(){RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);RES.loadConfig("resource/resource.json",window.meiriq_game.resourceCDN+"resource/")};e.onConfigComplete=function(){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this);RES.loadGroup("resource")};e.onResourceLoadComplete=function(c){"resource"==c.groupName&&(RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),window.loading.finish(),window.meiriq_game.cb_finishload(), window.home=this.home,window.pause=this.pause,window.resume=this.resume,window.home_context=this,window.pause_context=this,window.resume_context=this,"android"===window.client&&(this.scaleY=this.scaleX=0.5),this.createBeginPage())};e.onResourceLoadError=function(c){console.warn("Group:"+c.groupName+" has failed to load");this.onResourceLoadComplete(c)};e.createBeginPage=function(){this.beginPage||(this.beginPage=new BeginPage);this.addChild(this.beginPage);this.beginPage.addEventListener(GameEvent.BEGIN, this.createUnlockPage,this)};e.createUnlockPage=function(){window.meiriq_game.cb_start()&&(this.beginPage.removeEventListener(GameEvent.BEGIN,this.createUnlockPage,this),this.removeChildren(),this.unlockPage?this.unlockPage.updateUserAccount():this.unlockPage=new UnlockPage,this.addChild(this.unlockPage),this.unlockPage.addEventListener(GameEvent.BEGIN,this.showRule,this))};e.showRule=function(){this.unlockPage.removeEventListener(GameEvent.BEGIN,this.showRule,this);this.removeChildren();if(this.hasShownRule)this.createGameScene(); else{this.hasShownRule=!0;var c=new Rules;this.addChild(c);c.addEventListener(GameEvent.BEGIN,this.createGameScene,this)}};e.createGameScene=function(){this.removeChildren();this.blackMenPool=new egret.Recycler;this.bg||(960>=StageSize.getStageH()?this.bg=new egret.Bitmap(RES.getRes("gameScene_json.bg_small")):this.bg=new egret.Bitmap(RES.getRes("gameScene_json.bg_big")),this.bg.width=3200,this.bg.height=5680,this.bg.anchorX=this.bg.anchorY=0.5);this.bg.x=StageSize.getStageW()/2;this.bg.y=StageSize.getStageH()/ 2;this.addChild(this.bg);this.rocker=new Rocker;this.runningMan=new Character.RunningMan(GameData.RUNNING_MAN,StageSize.getStageW()/2,StageSize.getStageH()/2);this.timer=new GameElem.Timer;this.pauseBtn=new GameElem.PauseBtn;this.pauseBtn.addEventListener(GameEvent.PAUSE,this.pauseTimer,this);this.pauseBtn.addEventListener(GameEvent.RESUME,this.resumeTimer,this);this.addEventListener(egret.Event.ENTER_FRAME,this.sceneMoving,this);GameUtil.addChildren(this,[this.rocker,this.runningMan,this.timer,this.pauseBtn]); this.addBuildings();this.createBlackMen(this.runningMan.x-200,this.runningMan.y-200);this.createBlackMen(this.runningMan.x+200,this.runningMan.y-200);this.createBlackMen(this.runningMan.x+200,this.runningMan.y+200);this.createBlackMen(this.runningMan.x+100,this.runningMan.y+300);this.createBlackMen(this.runningMan.x+100,this.runningMan.y-300);this.addEventListener(egret.Event.ENTER_FRAME,this.hunting,this);this.addEventListener(egret.Event.ENTER_FRAME,this.checkoutTimer,this)};e.sceneMoving=function(){var c= this.rocker.rockerRadian,b=this.rocker.rockerOffset,a=b/10*Math.sin(c),e=b/10*Math.cos(c),b=this.runningMan,f=this.buildings,r=this.coins;this.response?this.response.clear():this.response=new SAT.Response;c=c>=Math.PI/2&&c<=3*Math.PI/2;c!==b.isFront&&b.turnFace(c);this.buildingMove(a,e);a=0;for(c=f.length;ae/2-10&&k.xe-a.width/2){a.x-=c;for(var e=0,l=r.length;ek.width/2&&k.x+cf/2-10&&k.yf-a.height/2){a.y+=b;e=0;for(l=r.length;ek.height/2&&k.y-b=c[r].y; e!==c[r].isFront&&c[r].turnFace(e);c[r].xthis.score&&(this.score++,4>this.huntingSpeed&&(this.huntingSpeed*=1.3),5>this.coins.length&&(c=new GameElem.Coin(this.bg.x,this.bg.y),this.coins.push(c), this.addChild(c)),0===this.score%4&&(b=0.5c?(b="level1.png",GameData.USER_DATA.money++): 40>c?(b="level2.png",GameData.USER_DATA.money+=5):(b="level3.png",GameData.USER_DATA.money+=10);GameData.setLocalData();window.meiriq_game.cb_gameover(c,b)};e.addBuildings=function(){var c=this.buildings,b=SAT.Polygon,a=SAT.Vector,e=SAT.Box,f=StageSize.getStageW(),r=StageSize.getStageH(),q=f/2-1600,k=r/2-2840,h=new b(new a(q,k),[new a,new a(1450,0),new a(792,946),new a(0,683)]);c.push(h);h=new b(new a(f/2+25,r/2-2665),[new a,new a(138,105),new a(-65,358),new a(-194,250)]);c.push(h);h=(new e(new a(f/ 2+97,r/2-2840),410,100)).toPolygon();c.push(h);h=new b(new a(q+1445,k),[new a,new a(53,0),new a(50,188),new a(-46,188)]);c.push(h);h=new b(new a(q+1213,k+295),[new a,new a(53,0),new a(80,270),new a(-46,270)]);c.push(h);h=new b(new a(q+830,k+700),[new a,new a(53,0),new a(80,300),new a(-46,300)]);c.push(h);h=new b(new a(q+2350,k),[new a,new a(850,0),new a(850,1886),new a(-225,1534),new a(-369,1404),new a(-182,236)]);c.push(h);h=new b(new a(q+2370,k+1405),[new a,new a(243,136),new a(473,1401),new a(0, 1718),new a(-408,1511),new a(-197,330)]);c.push(h);h=new b(new a(q+2047,k),[new a,new a(126,119),new a(146,323),new a(60,432),new a(-98,320)]);c.push(h);h=new b(new a(q+1915,k+650),[new a,new a(171,293),new a(49,446),new a(94,293)]);c.push(h);h=new b(new a(q+2220,k+1572),[new a,new a(-17,755),new a(-242,693),new a(-89,95)]);c.push(h);h=new b(new a(q+2002,k+2824),[new a(115,85),new a(-13,247),new a(-105,165)]);c.push(h);h=new b(new a(q+2766,k+1819),[new a,new a(84,320),new a(0,344),new a(46,100)]); c.push(h);h=new b(new a(q+2956,k+1550),[new a,new a(179,298),new a(54,448),new a(-90,298)]);c.push(h);h=new b(new a(q,k+1190),[new a,new a(510,183),new a(510,3434),new a(0,4432)]);c.push(h);h=(new e(new a(q,k+748),60,500)).toPolygon();c.push(h);h=new b(new a(q+510,k+2584),[new a,new a(128,-160),new a(286,142),new a(128,313),new a(0,274)]);c.push(h);h=new b(new a(f/2-882,r/2+1602),[new a,new a(92,123),new a(-2,562),new a(-104,512)]);c.push(h);h=new b(new a(f/2-604,r/2+1406),[new a,new a(158,52),new a(84, 345),new a(-81,311)]);c.push(h);h=new b(new a(f/2,r/2+1434),[new a,new a(120,-94),new a(225,-19),new a(170,445),new a(77,514),new a(-7,439)]);c.push(h);h=new b(new a(f/2+733,r/2+602),[new a,new a(755,-173),new a(647,46),new a(-3,162)]);c.push(h);h=(new e(new a(f/2+616,r/2+1043),690,726)).toPolygon();c.push(h);h=(new e(new a(f/2+375,r/2+1935),190,300)).toPolygon();c.push(h);b=new b(new a(f/2-169,r/2+2840),[new a,new a(85,-432),new a(175,-507),new a(252,-452),new a(200,0)]);c.push(b);b=(new e(new a(q+ 1717,k+5537),268,143)).toPolygon();c.push(b);b=(new e(new a(q+2047,k+5218),746,462)).toPolygon();c.push(b);a=(new e(new a(q+2823,k+5527),377,153)).toPolygon();c.push(a)};return f}(egret.DisplayObjectContainer);Main.prototype.__class__="Main";