var egret;(function(b){var e=function(){function b(){this._hashCode=b.hashCount++}Object.defineProperty(b.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0});b.hashCount=1;return b}();b.HashObject=e;e.prototype.__class__="egret.HashObject"})(egret||(egret={}));var __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(b){function a(c){void 0===c&&(c=300);b.call(this);this.objectPool=[];this._length=0;1>c&&(c=1);this.autoDisposeTime=c;this.frameCount=0}__extends(a,b);a.prototype._checkFrame=function(){this.frameCount--;0>=this.frameCount&&this.dispose()};Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.push=function(c){var h=this.objectPool;-1==h.indexOf(c)&&(h.push(c),this._length++,0==this.frameCount&&(this.frameCount= this.autoDisposeTime,a._callBackList.push(this)))};a.prototype.pop=function(){if(0==this._length)return null;this._length--;return this.objectPool.pop()};a.prototype.dispose=function(){0=this._maxDeltaTime){a=(this._preDrawCount-1).toString();var c=Math.ceil(this._logicPerformanceCost).toString()+","+Math.ceil(this._updateTransformPerformanceCost).toString()+","+Math.ceil(this._renderPerformanceCost).toString()+ ","+Math.ceil(b.MainContext.instance.rendererContext.renderCost).toString();this._txt.text="draw:"+a+"\ncost:"+c+"\nFPS:"+Math.floor(1E3*this._tick/this._totalDeltaTime).toString();this._tick=this._totalDeltaTime=0}this._preDrawCount=0};d.prototype.onDrawImage=function(){this._preDrawCount++};return d}();b.Profiler=e;e.prototype.__class__="egret.Profiler"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.apply(this,arguments);this._timeScale=1;this._paused=!1;this.callBackList=[]}__extends(a,d);a.prototype.run=function(){b.__START_TIME=(new Date).getTime();b.MainContext.instance.deviceContext.executeMainLoop(this.update,this)};a.prototype.update=function(c){var a=this.callBackList.concat(),f=a.length;c*=this._timeScale;c*=this._timeScale;for(var b=0;bthis.delay&&(this.lastTime=c,this._currentCount++,b.TimerEvent.dispatchTimerEvent(this,b.TimerEvent.TIMER),0=this.repeatCount&&(this.stop(),b.TimerEvent.dispatchTimerEvent(this,b.TimerEvent.TIMER_COMPLETE)))}; return a}(b.EventDispatcher);b.Timer=e;e.prototype.__class__="egret.Timer"})(egret||(egret={})); (function(b){function e(b){b=b.prototype?b.prototype:b.__proto__;if(b.hasOwnProperty("__class__"))return b.__class__;var a=b.constructor.toString(),c=a.indexOf("("),a=a.substring(9,c);Object.defineProperty(b,"__class__",{value:a,enumerable:!1,writable:!0});return a}b.getQualifiedClassName=e;b.getQualifiedSuperclassName=function(b){b=b.prototype?b.prototype:b.__proto__;if(b.hasOwnProperty("__superclass__"))return b.__superclass__;var a=Object.getPrototypeOf(b);if(null==a)return null;a=e(a.constructor); if(!a)return null;Object.defineProperty(b,"__superclass__",{value:a,enumerable:!1,writable:!0});return a}})(egret||(egret={}));(function(b){var e={};b.getDefinitionByName=function(b){if(!b)return null;var a=e[b];if(a)return a;for(var c=b.split("."),h=c.length,a=__global,f=0;f=f.delay&&(f.listener.apply(f.thisObject,f.params),delete d[a])}}var d={},a=0;b.setTimeout=function(c,h,f){for(var l=[],m=3;mb)b=0;16777215b.length;)b="0"+b;return"#"+b}})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(c,a,b,l,e,g){void 0===c&&(c=1);void 0===a&&(a=0);void 0===b&&(b=0);void 0===l&&(l=1);void 0===e&&(e=0);void 0===g&&(g=0);d.call(this);this.a=c;this.b=a;this.c=b;this.d=l;this.tx=e;this.ty=g}__extends(a,d);a.prototype.prepend=function(c,a,b,l,d,e){var k=this.tx;if(1!=c||0!=a||0!=b||1!=l){var n=this.a,p=this.c;this.a=n*c+this.b*b;this.b=n*a+this.b*l;this.c=p*c+this.d*b;this.d=p*a+this.d*l}this.tx=k*c+this.ty*b+d;this.ty=k*a+this.ty*l+e;return this};a.prototype.append= function(c,a,b,l,d,e){var k=this.a,n=this.b,p=this.c,q=this.d;if(1!=c||0!=a||0!=b||1!=l)this.a=c*k+a*p,this.b=c*n+a*q,this.c=b*k+l*p,this.d=b*n+l*q;this.tx=d*k+e*p+this.tx;this.ty=d*n+e*q+this.ty;return this};a.prototype.prependTransform=function(c,h,b,l,d,e,k,n,p){if(d%360){var q=d*a.DEG_TO_RAD;d=Math.cos(q);q=Math.sin(q)}else d=1,q=0;if(n||p)this.tx-=n,this.ty-=p;e||k?(e*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.prepend(d*b,q*b,-q*l,d*l,0,0),this.prepend(Math.cos(k),Math.sin(k),-Math.sin(e),Math.cos(e), c,h)):this.prepend(d*b,q*b,-q*l,d*l,c,h);return this};a.prototype.appendTransform=function(c,h,b,d,e,g,k,n,p){if(e%360){var q=e*a.DEG_TO_RAD;e=Math.cos(q);q=Math.sin(q)}else e=1,q=0;g||k?(g*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.append(Math.cos(k),Math.sin(k),-Math.sin(g),Math.cos(g),c,h),this.append(e*b,q*b,-q*d,e*d,0,0)):this.append(e*b,q*b,-q*d,e*d,c,h);if(n||p)this.tx-=n*this.a+p*this.c,this.ty-=n*this.b+p*this.d;return this};a.prototype.rotate=function(c){var a=Math.cos(c);c=Math.sin(c);var b=this.a, d=this.c,e=this.tx;this.a=b*a-this.b*c;this.b=b*c+this.b*a;this.c=d*a-this.d*c;this.d=d*c+this.d*a;this.tx=e*a-this.ty*c;this.ty=e*c+this.ty*a;return this};a.prototype.skew=function(c,h){c*=a.DEG_TO_RAD;h*=a.DEG_TO_RAD;this.append(Math.cos(h),Math.sin(h),-Math.sin(c),Math.cos(c),0,0);return this};a.prototype.scale=function(c,a){this.a*=c;this.d*=a;this.c*=c;this.b*=a;this.tx*=c;this.ty*=a;return this};a.prototype.translate=function(c,a){this.tx+=c;this.ty+=a;return this};a.prototype.identity=function(){this.a= this.d=1;this.b=this.c=this.tx=this.ty=0;return this};a.prototype.identityMatrix=function(c){this.a=c.a;this.b=c.b;this.c=c.c;this.d=c.d;this.tx=c.tx;this.ty=c.ty;return this};a.prototype.invert=function(){var c=this.a,a=this.b,b=this.c,d=this.d,e=this.tx,g=c*d-a*b;this.a=d/g;this.b=-a/g;this.c=-b/g;this.d=c/g;this.tx=(b*this.ty-d*e)/g;this.ty=-(c*this.ty-a*e)/g;return this};a.transformCoords=function(c,a,f){var d=b.Point.identity;d.x=c.a*a+c.c*f+c.tx;d.y=c.d*f+c.b*a+c.ty;return d};a.prototype.toArray= function(c){this.array||(this.array=new Float32Array(9));c?(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};a.identity=new a;a.DEG_TO_RAD=Math.PI/180;return a}(b.HashObject);b.Matrix=e;e.prototype.__class__= "egret.Matrix"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(b){function a(c,a){void 0===c&&(c=0);void 0===a&&(a=0);b.call(this);this.x=c;this.y=a}__extends(a,b);a.prototype.clone=function(){return new a(this.x,this.y)};a.prototype.equals=function(c){return this.x==c.x&&this.y==c.y};a.distance=function(c,a){return Math.sqrt((c.x-a.x)*(c.x-a.x)+(c.y-a.y)*(c.y-a.y))};a.identity=new a(0,0);return a}(b.HashObject);b.Point=e;e.prototype.__class__="egret.Point"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(b){function a(c,a,f,l){void 0===c&&(c=0);void 0===a&&(a=0);void 0===f&&(f=0);void 0===l&&(l=0);b.call(this);this.x=c;this.y=a;this.width=f;this.height=l}__extends(a,b);Object.defineProperty(a.prototype,"right",{get:function(){return this.x+this.width},set:function(c){this.width=c-this.x},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bottom",{get:function(){return this.y+this.height},set:function(c){this.height=c-this.y},enumerable:!0,configurable:!0}); a.prototype.initialize=function(c,a,b,d){this.x=c;this.y=a;this.width=b;this.height=d;return this};a.prototype.contains=function(c,a){return this.x<=c&&this.x+this.width>=c&&this.y<=a&&this.y+this.height>=a};a.prototype.intersects=function(c){var a=c.right,b=c.bottom,d=this.right,e=this.bottom;return this.contains(c.x,c.y)||this.contains(c.x,b)||this.contains(a,c.y)||this.contains(a,b)||c.contains(this.x,this.y)||c.contains(this.x,e)||c.contains(d,this.y)||c.contains(d,e)?!0:!1};a.prototype.clone= function(){return new a(this.x,this.y,this.width,this.height)};a.prototype.containsPoint=function(c){return this.xc.x&&this.yc.y?!0:!1};a.identity=new a(0,0,0,0);return a}(b.HashObject);b.Rectangle=e;e.prototype.__class__="egret.Rectangle"})(egret||(egret={})); (function(b){var e=function(){function d(){}d.fatal=function(a,c){void 0===c&&(c=null);b.Logger.traceToConsole("Fatal",a,c);throw Error(b.Logger.getTraceCode("Fatal",a,c));};d.info=function(a,c){void 0===c&&(c=null);b.Logger.traceToConsole("Info",a,c)};d.warning=function(a,c){void 0===c&&(c=null);b.Logger.traceToConsole("Warning",a,c)};d.traceToConsole=function(a,c,h){console.log(b.Logger.getTraceCode(a,c,h))};d.getTraceCode=function(a,c,h){return"["+a+"]"+c+":"+(null==h?"":h)};return d}();b.Logger= e;e.prototype.__class__="egret.Logger"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this);this._isSupportDOMParser=this._xmlDict=this._parser=null;this._xmlDict={};window.DOMParser?(this._isSupportDOMParser=!0,this._parser=new DOMParser):this._isSupportDOMParser=!1}__extends(a,d);a.getInstance=function(){a._instance||(a._instance=new a);return a._instance};a.prototype.parserXML=function(c){for(var a=0;"\n"==c.charAt(a)||"\t"==c.charAt(a)||"\r"==c.charAt(a)||" "==c.charAt(a);)a++;0!=a&&(c=c.substring(a,c.length));this._isSupportDOMParser? a=this._parser.parseFromString(c,"text/xml"):(a=new ActiveXObject("Microsoft.XMLDOM"),a.async="false",a.loadXML(c));null==a&&b.Logger.info("xml not found!");return a};a._instance=null;return a}(b.HashObject);b.SAXParser=e;e.prototype.__class__="egret.SAXParser"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(c){function h(){c.call(this);this._designHeight=this._designWidth=0;this._scaleY=this._scaleX=1;this._stageHeight=this._stageWidth=this._offSetY=0}__extends(h,c);h.getInstance=function(){null==h.instance&&(a.initialize(),h.instance=new h);return h.instance};h.prototype.setDesignSize=function(c,a,h){this._designWidth=c;this._designHeight=a;h&&(b.Logger.warning("\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"), this._setResolutionPolicy(h))};h.prototype._setResolutionPolicy=function(c){this._resolutionPolicy=c;c.init(this);c._apply(this,this._designWidth,this._designHeight)};h.prototype.getScaleX=function(){return this._scaleX};h.prototype.getScaleY=function(){return this._scaleY};h.prototype.getOffSetY=function(){return this._offSetY};h.canvas_name="egretCanvas";h.canvas_div_name="gameDiv";return h}(b.HashObject);b.StageDelegate=e;e.prototype.__class__="egret.StageDelegate";var d=function(){function c(a, h){this._containerStrategy=a;this._contentStrategy=h}c.prototype.init=function(c){this._containerStrategy.init(c);this._contentStrategy.init(c)};c.prototype._apply=function(c,a,h){this._containerStrategy._apply(c,a,h);this._contentStrategy._apply(c,a,h)};return c}();b.ResolutionPolicy=d;d.prototype.__class__="egret.ResolutionPolicy";var a=function(){function a(){}a.initialize=function(){a.EQUAL_TO_FRAME=new c};a.prototype.init=function(c){};a.prototype._apply=function(c,a,h){};a.prototype._setupContainer= function(){var c=document.body,a;c&&(a=c.style)&&(a.paddingTop=a.paddingTop||"0px",a.paddingRight=a.paddingRight||"0px",a.paddingBottom=a.paddingBottom||"0px",a.paddingLeft=a.paddingLeft||"0px",a.borderTop=a.borderTop||"0px",a.borderRight=a.borderRight||"0px",a.borderBottom=a.borderBottom||"0px",a.borderLeft=a.borderLeft||"0px",a.marginTop=a.marginTop||"0px",a.marginRight=a.marginRight||"0px",a.marginBottom=a.marginBottom||"0px",a.marginLeft=a.marginLeft||"0px")};return a}();b.ContainerStrategy=a; a.prototype.__class__="egret.ContainerStrategy";var c=function(c){function a(){c.apply(this,arguments)}__extends(a,c);a.prototype._apply=function(c){this._setupContainer()};return a}(a);b.EqualToFrame=c;c.prototype.__class__="egret.EqualToFrame";d=function(){function c(){}c.prototype.init=function(c){};c.prototype._apply=function(c,a,h){};c.prototype.setEgretSize=function(c,a,h,f,d,p){void 0===p&&(p=0);b.StageDelegate.getInstance()._stageWidth=Math.round(c);b.StageDelegate.getInstance()._stageHeight= Math.round(a);c=document.getElementById(e.canvas_div_name);c.style.width=h+"px";c.style.height=f+"px";c.style.top=p+"px"};c.prototype._getClientWidth=function(){return document.documentElement.clientWidth};c.prototype._getClientHeight=function(){return document.documentElement.clientHeight};return c}();b.ContentStrategy=d;d.prototype.__class__="egret.ContentStrategy";var h=function(c){function a(h){void 0===h&&(h=0);c.call(this);this.minWidth=h}__extends(a,c);a.prototype._apply=function(c,a,h){a= this._getClientWidth();var b=this._getClientHeight(),f=b/h,d=a/f,l=1;0!=this.minWidth&&(l=Math.min(1,d/this.minWidth));this.setEgretSize(d/l,h,a,b*l);c._scaleX=f*l;c._scaleY=f*l};return a}(d);b.FixedHeight=h;h.prototype.__class__="egret.FixedHeight";h=function(c){function a(h){void 0===h&&(h=0);c.call(this);this.minHeight=h}__extends(a,c);a.prototype._apply=function(c,a,h){h=this._getClientWidth();var b=this._getClientHeight(),f=h/a,d=b/f,l=1;0!=this.minHeight&&(l=Math.min(1,d/this.minHeight));this.setEgretSize(a, d/l,h*l,b,h*(1-l)/2);c._scaleX=f*l;c._scaleY=f*l};return a}(d);b.FixedWidth=h;h.prototype.__class__="egret.FixedWidth";h=function(c){function a(h,b){c.call(this);this.width=h;this.height=b}__extends(a,c);a.prototype._apply=function(c,a,h){h=this.width;var b=this.height,f=h/a;this.setEgretSize(a,b/f,h,b);c._scaleX=f;c._scaleY=f};return a}(d);b.FixedSize=h;h.prototype.__class__="egret.FixedSize";h=function(c){function a(){c.call(this)}__extends(a,c);a.prototype._apply=function(c,a,h){this.setEgretSize(a, h,a,h,Math.floor((a-a)/2));c._scaleX=1;c._scaleY=1};return a}(d);b.NoScale=h;h.prototype.__class__="egret.NoScale";h=function(c){function a(){c.call(this)}__extends(a,c);a.prototype._apply=function(c,a,h){var b=this._getClientWidth(),f=this._getClientHeight(),d=b,l=f,e=d/a=a.x+a.width||e.y+e.height+d<=a.y||e.y+d>=a.y+a.height?!0:!1};a.prototype.getDrawAreaList=function(){var c;0==this._drawAreaList.length?(this._defaultDrawAreaList||(this._defaultDrawAreaList=[new b.Rectangle(0,0,b.MainContext.instance.stage.stageWidth,b.MainContext.instance.stage.stageHeight)],b.MainContext.instance.stage.addEventListener(b.Event.RESIZE, this.onResize,this)),c=this._defaultDrawAreaList):c=this._drawAreaList;return c};a.prototype.onResize=function(){b.MainContext.instance.stage.removeEventListener(b.Event.RESIZE,this.onResize,this);this._defaultDrawAreaList=null};return a}(b.HashObject);b.RenderFilter=e;e.prototype.__class__="egret.RenderFilter"})(egret||(egret={})); (function(b){var e=function(){function d(){}d.mapClass=function(a,c,h){void 0===h&&(h="");a=this.getKey(a)+"#"+h;this.mapClassDic[a]=c};d.getKey=function(a){return"string"==typeof a?a:b.getQualifiedClassName(a)};d.mapValue=function(a,c,h){void 0===h&&(h="");a=this.getKey(a)+"#"+h;this.mapValueDic[a]=c};d.hasMapRule=function(a,c){void 0===c&&(c="");var h=this.getKey(a)+"#"+c;return this.mapValueDic[h]||this.mapClassDic[h]?!0:!1};d.getInstance=function(a,c){void 0===c&&(c="");var h=this.getKey(a)+"#"+ c;if(this.mapValueDic[h])return this.mapValueDic[h];var b=this.mapClassDic[h];if(b)return b=new b,this.mapValueDic[h]=b,delete this.mapClassDic[h],b;throw Error("\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:"+h+"\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");};d.mapClassDic={};d.mapValueDic={};return d}();b.Injector=e;e.prototype.__class__="egret.Injector"})(egret|| (egret={}));(function(b){var e=function(){function b(){}b.NORMAL="normal";b.ADD="add";return b}();b.BlendMode=e;e.prototype.__class__="egret.BlendMode"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this);this.__hack_local_matrix=null;this._sizeDirty=this._normalDirty=!0;this._parent=this._texture_to_render=null;this._y=this._x=0;this._scaleY=this._scaleX=1;this._anchorY=this._anchorX=this._anchorOffsetY=this._anchorOffsetX=0;this._visible=!0;this._rotation=0;this._alpha=1;this._skewY=this._skewX=0;this._touchEnabled=!1;this._scrollRect=this.blendMode=null;this._hasHeightSet=this._hasWidthSet=!1;this._worldBounds=this.mask=null;this.worldAlpha= 1;this._rectH=this._rectW=0;this._stage=null;this._cacheDirty=this._cacheAsBitmap=!1;this._colorTransform=null;this._worldTransform=new b.Matrix;this._worldBounds=new b.Rectangle(0,0,0,0);this._cacheBounds=new b.Rectangle(0,0,0,0)}__extends(a,d);a.prototype._setDirty=function(){this._normalDirty=!0};a.prototype.getDirty=function(){return this._normalDirty||this._sizeDirty};a.prototype._setParentSizeDirty=function(){var c=this._parent;!c||c._hasWidthSet||c._hasHeightSet||c._setSizeDirty()};a.prototype._setSizeDirty= function(){this._sizeDirty||(this._sizeDirty=!0,this._setDirty(),this._setCacheDirty(),this._setParentSizeDirty())};a.prototype._clearDirty=function(){this._normalDirty=!1};a.prototype._clearSizeDirty=function(){this._sizeDirty=!1};Object.defineProperty(a.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});a.prototype._parentChanged=function(c){this._parent=c};Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(c){this._setX(c)},enumerable:!0, configurable:!0});a.prototype._setX=function(c){b.NumberUtils.isNumber(c)&&this._x!=c&&(this._x=c,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(c){this._setY(c)},enumerable:!0,configurable:!0});a.prototype._setY=function(c){b.NumberUtils.isNumber(c)&&this._y!=c&&(this._y=c,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"scaleX",{get:function(){return this._scaleX},set:function(c){b.NumberUtils.isNumber(c)&& this._scaleX!=c&&(this._scaleX=c,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scaleY",{get:function(){return this._scaleY},set:function(c){b.NumberUtils.isNumber(c)&&this._scaleY!=c&&(this._scaleY=c,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetX",{get:function(){return this._anchorOffsetX},set:function(c){b.NumberUtils.isNumber(c)&&this._anchorOffsetX!= c&&(this._anchorOffsetX=c,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetY",{get:function(){return this._anchorOffsetY},set:function(c){b.NumberUtils.isNumber(c)&&this._anchorOffsetY!=c&&(this._anchorOffsetY=c,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorX",{get:function(){return this._anchorX},set:function(c){this._setAnchorX(c)},enumerable:!0,configurable:!0}); a.prototype._setAnchorX=function(c){b.NumberUtils.isNumber(c)&&this._anchorX!=c&&(this._anchorX=c,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"anchorY",{get:function(){return this._anchorY},set:function(c){this._setAnchorY(c)},enumerable:!0,configurable:!0});a.prototype._setAnchorY=function(c){b.NumberUtils.isNumber(c)&&this._anchorY!=c&&(this._anchorY=c,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"visible",{get:function(){return this._visible}, set:function(c){this._setVisible(c)},enumerable:!0,configurable:!0});a.prototype._setVisible=function(c){this._visible!=c&&(this._visible=c,this._setSizeDirty())};Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation},set:function(c){b.NumberUtils.isNumber(c)&&this._rotation!=c&&(this._rotation=c,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"alpha",{get:function(){return this._alpha},set:function(c){b.NumberUtils.isNumber(c)&& this._alpha!=c&&(this._alpha=c,this._setDirty(),this._setCacheDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewX",{get:function(){return this._skewX},set:function(c){b.NumberUtils.isNumber(c)&&this._skewX!=c&&(this._skewX=c,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewY",{get:function(){return this._skewY},set:function(c){b.NumberUtils.isNumber(c)&&this._skewY!=c&&(this._skewY=c,this._setSizeDirty())},enumerable:!0,configurable:!0}); Object.defineProperty(a.prototype,"touchEnabled",{get:function(){return this._touchEnabled},set:function(c){this._setTouchEnabled(c)},enumerable:!0,configurable:!0});a.prototype._setTouchEnabled=function(c){this._touchEnabled=c};Object.defineProperty(a.prototype,"scrollRect",{get:function(){return this._scrollRect},set:function(c){this._setScrollRect(c)},enumerable:!0,configurable:!0});a.prototype._setScrollRect=function(c){this._scrollRect=c;this._setSizeDirty()};Object.defineProperty(a.prototype, "measuredWidth",{get:function(){return this._measureBounds().width},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"measuredHeight",{get:function(){return this._measureBounds().height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitWidth",{get:function(){return this._explicitWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitHeight",{get:function(){return this._explicitHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "width",{get:function(){return this._getSize(b.Rectangle.identity).width},set:function(c){this._setWidth(c)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._getSize(b.Rectangle.identity).height},set:function(c){this._setHeight(c)},enumerable:!0,configurable:!0});a.prototype._setWidth=function(c){this._setSizeDirty();this._setCacheDirty();this._explicitWidth=c;this._hasWidthSet=b.NumberUtils.isNumber(c)};a.prototype._setHeight=function(c){this._setSizeDirty(); this._setCacheDirty();this._explicitHeight=c;this._hasHeightSet=b.NumberUtils.isNumber(c)};a.prototype._draw=function(c){if(this._visible&&!this.drawCacheTexture(c)){this._colorTransform&&c.setGlobalColorTransform(this._colorTransform.matrix);c.setAlpha(this.worldAlpha,this.blendMode);c.setTransform(this._worldTransform);var a=this.mask||this._scrollRect;a&&c.pushMask(a);this._render(c);a&&c.popMask();this._colorTransform&&c.setGlobalColorTransform(null)}this.destroyCacheBounds()};a.prototype.drawCacheTexture= function(c){if(!1==this._cacheAsBitmap)return!1;if(this._cacheDirty||null==this._texture_to_render||Math.round(this.width)!=Math.round(this._texture_to_render._sourceWidth)||Math.round(this.height)!=Math.round(this._texture_to_render._sourceHeight))this._cacheDirty=!this._makeBitmapCache();if(null==this._texture_to_render)return!1;var a=this._texture_to_render,f=a._offsetX,d=a._offsetY,e=a._textureWidth,a=a._textureHeight;this._updateTransform();c.setAlpha(this.worldAlpha,this.blendMode);c.setTransform(this._worldTransform); var g=b.MainContext.instance.rendererContext.texture_scale_factor;b.RenderFilter.getInstance().drawImage(c,this,0,0,e*g,a*g,f,d,e,a);return!0};a.prototype._updateTransform=function(){this._calculateWorldTransform()};a.prototype._calculateWorldTransform=function(){var c=this._worldTransform,a=this._parent;c.identityMatrix(a._worldTransform);this._getMatrix(c);var b=this._scrollRect;b&&c.append(1,0,0,1,-b.x,-b.y);this.worldAlpha=a.worldAlpha*this._alpha};a.prototype._render=function(c){};a.prototype.getBounds= function(c,a){void 0===a&&(a=!0);var f=this._measureBounds(),d=this._hasWidthSet?this._explicitWidth:f.width,e=this._hasHeightSet?this._explicitHeight:f.height;this._rectW=f.width;this._rectH=f.height;this._clearSizeDirty();var g=f.x,f=f.y,k=0,n=0;a&&(0!=this._anchorX||0!=this._anchorY?(k=d*this._anchorX,n=e*this._anchorY):(k=this._anchorOffsetX,n=this._anchorOffsetY));this._cacheBounds.initialize(g-k,f-n,d,e);d=this._cacheBounds;c||(c=new b.Rectangle);return c.initialize(d.x,d.y,d.width,d.height)}; a.prototype.destroyCacheBounds=function(){this._cacheBounds.x=0;this._cacheBounds.y=0;this._cacheBounds.width=0;this._cacheBounds.height=0};a.prototype._getConcatenatedMatrix=function(){for(var c=a.identityMatrixForGetConcatenated.identity(),h=this;null!=h;){if(0!=h._anchorX||0!=h._anchorY){var f=h._getSize(b.Rectangle.identity);c.prependTransform(h._x,h._y,h._scaleX,h._scaleY,h._rotation,h._skewX,h._skewY,f.width*h._anchorX,f.height*h._anchorY)}else c.prependTransform(h._x,h._y,h._scaleX,h._scaleY, h._rotation,h._skewX,h._skewY,h._anchorOffsetX,h._anchorOffsetY);h=h._parent}return c};a.prototype.localToGlobal=function(c,a,f){void 0===c&&(c=0);void 0===a&&(a=0);var d=this._getConcatenatedMatrix();d.append(1,0,0,1,c,a);f||(f=new b.Point);f.x=d.tx;f.y=d.ty;return f};a.prototype.globalToLocal=function(c,a,f){void 0===c&&(c=0);void 0===a&&(a=0);var d=this._getConcatenatedMatrix();d.invert();d.append(1,0,0,1,c,a);f||(f=new b.Point);f.x=d.tx;f.y=d.ty;return f};a.prototype.hitTest=function(c,a,f){void 0=== f&&(f=!1);if(!this._visible||!f&&!this._touchEnabled)return null;f=this._getSize(b.Rectangle.identity);return 0<=c&&cthis._scrollRect.x&&a>this._scrollRect.y&&cs&&(s=b);(b=k+n+p)s&&(s=b);(b=n+p)s&&(s=b);(d=e+q)u&&(u=d);(d=e+g+q)u&&(u=d);(d=g+q)u&&(u=d);return c.initialize(r,t,s-r,u-t)};Object.defineProperty(a.prototype,"colorTransform",{get:function(){return this._colorTransform},set:function(c){this._colorTransform= c},enumerable:!0,configurable:!0});a.identityMatrixForGetConcatenated=new b.Matrix;a._enterFrameCallBackList=[];a._renderCallBackList=[];return a}(b.EventDispatcher);b.DisplayObject=e;e.prototype.__class__="egret.DisplayObject";e=function(){function b(){this.matrix=null}b.prototype.updateColor=function(a,c,h,b,d,e,g,k){};return b}();b.ColorTransform=e;e.prototype.__class__="egret.ColorTransform"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this);this._touchChildren=!0;this._children=[]}__extends(a,d);Object.defineProperty(a.prototype,"touchChildren",{get:function(){return this._touchChildren},set:function(c){this._touchChildren=c},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!0,configurable:!0});a.prototype.setChildIndex=function(c,a){this.doSetChildIndex(c,a)};a.prototype.doSetChildIndex=function(c, a){var f=this._children.indexOf(c);0>f&&b.Logger.fatal("child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185");this._children.splice(f,1);0>a||this._children.length<=a?this._children.push(c):this._children.splice(a,0,c)};a.prototype.addChild=function(c){var a=this._children.length;c._parent==this&&a--;return this._doAddChild(c,a)};a.prototype.addChildAt=function(c,a){return this._doAddChild(c,a)};a.prototype._doAddChild=function(c,h,f){void 0===f&&(f=!0);if(c==this)return c;if(0>h||h>this._children.length)return b.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4"), c;var d=c._parent;if(d==this)return this.doSetChildIndex(c,h),c;d&&(h=d._children.indexOf(c),0<=h&&d._doRemoveChild(h));this._children.splice(h,0,c);c._parentChanged(this);f&&c.dispatchEventWith(b.Event.ADDED,!0);if(this._stage)for(c._onAddToStage(),h=a.__EVENT__ADD_TO_STAGE_LIST;0a||0==g)a=r;if(qd||0==g)d=k}}return b.Rectangle.identity.initialize(c,f,a-c,d-f)};a.prototype.hitTest=function(c,a,f){void 0===f&&(f=!1);var e;if(!this._visible)return null;if(this._scrollRect){if(cthis._scrollRect.x+this._scrollRect.width||a>this._scrollRect.y+this._scrollRect.height)return null}else if(this.mask&&(this.mask.x>c||c>this.mask.x+this.mask.width||this.mask.y> a||a>this.mask.y+this.mask.height))return null;for(var m=this._children,g=this._touchChildren,k=m.length-1;0<=k;k--){var n=m[k],p=n._getMatrix(),q=n._scrollRect;q&&p.append(1,0,0,1,-q.x,-q.y);p.invert();p=b.Matrix.transformCoords(p,c,a);if(n=n.hitTest(p.x,p.y,!0)){if(!g)return this;if(n._touchEnabled&&g)return n;e=this}}return e?e:this._texture_to_render||this.graphics?d.prototype.hitTest.call(this,c,a,f):null};a.prototype._onAddToStage=function(){d.prototype._onAddToStage.call(this);for(var c=this._children.length, a=0;aa||a>this.getMaxScrollTop():0>b||b>this.getMaxScrollLeft()};a.prototype._validatePosition=function(c,a){void 0===c&&(c=!1);void 0===a&&(a=!1);if(c){var b=this.height,d=this._getContentHeight();this._scrollTop=Math.max(this._scrollTop,(0-b)/2);this._scrollTop=Math.min(this._scrollTop,d>b?d-b/2:d/2)}a&&(b=this.width,d=this._getContentWidth(),this._scrollLeft=Math.max(this._scrollLeft,(0-b)/2),this._scrollLeft=Math.min(this._scrollLeft,d>b?d-b/2:d/2))};a.prototype._setWidth=function(c){this._explicitWidth!= c&&(d.prototype._setWidth.call(this,c),this._updateContentPosition())};a.prototype._setHeight=function(c){this._explicitHeight!=c&&(d.prototype._setHeight.call(this,c),this._updateContentPosition())};a.prototype._updateContentPosition=function(){var c=this.getBounds(b.Rectangle.identity);this.scrollRect=new b.Rectangle(this._scrollLeft,this._scrollTop,c.width,c.height);this.dispatchEvent(new b.Event(b.Event.CHANGE))};a.prototype._checkScrollPolicy=function(){var c=this.__checkScrollPolicy(this._horizontalScrollPolicy, this._getContentWidth(),this.width);this._hCanScroll=c;var a=this.__checkScrollPolicy(this._verticalScrollPolicy,this._getContentHeight(),this.height);this._vCanScroll=a;return c||a};a.prototype.__checkScrollPolicy=function(c,a,b){return"on"==c?!0:"off"==c?!1:a>b};a.prototype._addEvents=function(){this.addEventListener(b.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.addEventListener(b.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.addEventListener(b.TouchEvent.TOUCH_END,this._onTouchEndCapture, this,!0)};a.prototype._removeEvents=function(){this.removeEventListener(b.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.removeEventListener(b.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.removeEventListener(b.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)};a.prototype._onTouchBegin=function(c){c._isDefaultPrevented||(b.Tween.removeTweens(this),this.stage.addEventListener(b.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this.stage.addEventListener(b.TouchEvent.TOUCH_END, this._onTouchEnd,this),this.stage.addEventListener(b.TouchEvent.LEAVE_STAGE,this._onTouchEnd,this),this.addEventListener(b.Event.ENTER_FRAME,this._onEnterFrame,this),this._logTouchEvent(c),c.preventDefault())};a.prototype._onTouchBeginCapture=function(c){var h=this._checkScrollPolicy();if(h){for(var f=c.target;f!=this;){if(f instanceof a&&(h=f._checkScrollPolicy()))return;f=f.parent}c.stopPropagation();this.delayTouchBeginEvent=this.cloneTouchEvent(c);this.touchBeginTimer||(this.touchBeginTimer=new b.Timer(100, 1),this.touchBeginTimer.addEventListener(b.TimerEvent.TIMER_COMPLETE,this._onTouchBeginTimer,this));this.touchBeginTimer.start();this._onTouchBegin(c)}};a.prototype._onTouchEndCapture=function(c){this.delayTouchBeginEvent&&this._onTouchBeginTimer()};a.prototype._onTouchBeginTimer=function(){this.touchBeginTimer.stop();var c=this.delayTouchBeginEvent;this.delayTouchBeginEvent=null;this.dispatchPropagationEvent(c)};a.prototype.dispatchPropagationEvent=function(c){for(var a=[],b=c._target;b;)a.push(b), b=b.parent;for(var d=this._content,e=1;;e+=2){b=a[e];if(!b||b===d)break;a.unshift(b)}this._dispatchPropagationEvent(c,a)};a.prototype._dispatchPropagationEvent=function(c,a,b){for(var d=a.length,e=0;ec-this._lastTouchTime&&this._calcVelocitys(this._lastTouchEvent)};a.prototype._logTouchEvent=function(c){this._lastTouchPosition.x=c.stageX;this._lastTouchPosition.y=c.stageY;this._lastTouchEvent=this.cloneTouchEvent(c);this._lastTouchTime=b.getTimer()};a.prototype._getPointChange=function(c){return{x:!1=== this._hCanScroll?0:this._lastTouchPosition.x-c.stageX,y:!1===this._vCanScroll?0:this._lastTouchPosition.y-c.stageY}};a.prototype._calcVelocitys=function(c){var a=b.getTimer();if(0==this._lastTouchTime)this._lastTouchTime=a;else{var f=this._getPointChange(c),a=a-this._lastTouchTime;f.x/=a;f.y/=a;this._velocitys.push(f);5g||g>b)for(g= a;Infinity!=Math.abs(c)&&0.02g||g>b?0.998*c*0.95:0.998*c,e++;else e=500*-Math.log(0.02/d);return{position:Math.min(b+50,Math.max(g,-50)),duration:e}};a.prototype.cloneTouchEvent=function(c){var a=new b.TouchEvent(c._type,c._bubbles,c.cancelable);a.touchPointID=c.touchPointID;a._stageX=c._stageX;a._stageY=c._stageY;a.ctrlKey=c.ctrlKey;a.altKey=c.altKey;a.shiftKey=c.shiftKey;a.touchDown=c.touchDown;a._isDefaultPrevented=!1;a._target=c._target;return a};a.prototype.throwNotSupportedError= function(){throw Error("\u6b64\u65b9\u6cd5\u5728ScrollView\u5185\u4e0d\u53ef\u7528!");};a.prototype.addChild=function(c){this.throwNotSupportedError();return null};a.prototype.addChildAt=function(c,a){this.throwNotSupportedError();return null};a.prototype.removeChild=function(c){this.throwNotSupportedError();return null};a.prototype.removeChildAt=function(c){this.throwNotSupportedError();return null};a.prototype.setChildIndex=function(c,a){this.throwNotSupportedError()};a.prototype.swapChildren=function(c, a){this.throwNotSupportedError()};a.prototype.swapChildrenAt=function(c,a){this.throwNotSupportedError()};a.weight=[1,1.33,1.66,2,2.33];return a}(b.DisplayObjectContainer);b.ScrollView=e;e.prototype.__class__="egret.ScrollView"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(c,a,f){void 0===a&&(a=NaN);void 0===f&&(f=NaN);d.call(this,c);this.content=c;this.width=NaN==a?this._getContentWidth():a;this.height=NaN==f?this._getContentHeight():f;b.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView")}__extends(a,d);Object.defineProperty(a.prototype,"scrollXEnabled",{get:function(){return"off"!=this.horizontalScrollPolicy},set:function(c){b.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView"); this.horizontalScrollPolicy=c?"auto":"off"},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scrollYEnabled",{get:function(){return"off"!=this.verticalScrollPolicy},set:function(c){b.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView");this.verticalScrollPolicy=c?"auto":"off"},enumerable:!0,configurable:!0});return a}(b.ScrollView);b.Scroller=e;e.prototype.__class__="egret.Scroller"})(egret||(egret={})); (function(b){var e=function(){function b(){}b.REPEAT="repeat";b.SCALE="scale";return b}();b.BitmapFillMode=e;e.prototype.__class__="egret.BitmapFillMode"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(c){d.call(this);this.debug=!1;this.debugColor=16711680;this.scale9Grid=null;this.fillMode="scale";c&&(this._texture=c,this._setSizeDirty())}__extends(a,d);Object.defineProperty(a.prototype,"texture",{get:function(){return this._texture},set:function(c){c!=this._texture&&(this._setSizeDirty(),this._texture=c)},enumerable:!0,configurable:!0});a.prototype._render=function(c){var b=this._texture;b?(this._texture_to_render=b,a._drawBitmap(c,this._hasWidthSet?this._explicitWidth: b._textureWidth,this._hasHeightSet?this._explicitHeight:b._textureHeight,this)):this._texture_to_render=null};a._drawBitmap=function(c,b,f,d){var e=d._texture_to_render;if(e){var g=e._textureWidth,k=e._textureHeight;if("scale"==d.fillMode){var n=d.scale9Grid||e.scale9Grid;if(n&&g-n.widtha&&(a=k+g._textureHeight)}}this._textChanged=!1;return b.Rectangle.identity.initialize(0,0, c,a)};a.prototype._measureBounds=function(){return this._renderText(!0)};return a}(b.DisplayObjectContainer);b.BitmapText=e;e.prototype.__class__="egret.BitmapText"})(egret||(egret={})); (function(b){var e=function(){function b(){this._lastY=this._lastX=this._maxY=this._maxX=this._minY=this._minX=0;this.commandQueue=[]}b.prototype.beginFill=function(a,c){};b.prototype._setStyle=function(a){};b.prototype.drawRect=function(a,c,b,f){this.checkRect(a,c,b,f)};b.prototype.drawCircle=function(a,c,b){this.checkRect(a-b,c-b,2*b,2*b)};b.prototype.drawRoundRect=function(a,c,b,f,d,e){this.checkRect(a,c,b,f)};b.prototype.drawEllipse=function(a,c,b,f){this.checkRect(a-b,c-f,2*b,2*f)};b.prototype.lineStyle= function(a,c,b,f,d,e,g,k){};b.prototype.lineTo=function(a,c){this.checkPoint(a,c)};b.prototype.curveTo=function(a,c,b,f){this.checkPoint(a,c);this.checkPoint(b,f)};b.prototype.moveTo=function(a,c){this.checkPoint(a,c)};b.prototype.clear=function(){this._maxY=this._maxX=this._minY=this._minX=0};b.prototype.endFill=function(){};b.prototype._draw=function(a){};b.prototype.checkRect=function(a,c,b,f){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,c);this._maxX=Math.max(this._maxX,a+ b);this._maxY=Math.max(this._maxY,c+f)};b.prototype.checkPoint=function(a,c){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,c);this._maxX=Math.max(this._maxX,a);this._maxY=Math.max(this._maxY,c);this._lastX=a;this._lastY=c};return b}();b.Graphics=e;e.prototype.__class__="egret.Graphics";(function(){return function(b,a,c){this.method=b;this.thisObject=a;this.args=c}})().prototype.__class__="egret.Command"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this)}__extends(a,d);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new b.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(c){this._graphics&&this._graphics._draw(c)};return a}(b.DisplayObject);b.Shape=e;e.prototype.__class__="egret.Shape"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this)}__extends(a,d);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new b.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(c){this._graphics&&this._graphics._draw(c);d.prototype._render.call(this,c)};return a}(b.DisplayObjectContainer);b.Sprite=e;e.prototype.__class__="egret.Sprite"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this);this._inputEnabled=!1;this._text=this._type="";this._displayAsPassword=!1;this._fontFamily=a.default_fontFamily;this._size=30;this._textColorString="#FFFFFF";this._textColor=16777215;this._strokeColorString="#000000";this._stroke=this._strokeColor=0;this._textAlign="left";this._verticalAlign="top";this._maxChars=0;this._scrollV=-1;this._numLines=this._lineSpacing=this._maxScrollV=0;this._isFlow=this._multiline=!1;this._textArr=[];this._isArrayChanged= !1;this._textMaxHeight=this._textMaxWidth=0;this._linesArr=[]}__extends(a,d);a.prototype.isInput=function(){return this._type==b.TextFieldType.INPUT};a.prototype._setTouchEnabled=function(c){d.prototype._setTouchEnabled.call(this,c);this.isInput()&&(this._inputEnabled=!0)};Object.defineProperty(a.prototype,"type",{get:function(){return this._type},set:function(c){this._setType(c)},enumerable:!0,configurable:!0});a.prototype._setType=function(c){this._type!=c&&(this._type=c,this._type==b.TextFieldType.INPUT? (this._hasWidthSet||this._setWidth(100),this._hasHeightSet||this._setHeight(30),null==this._inputUtils&&(this._inputUtils=new b.InputController),this._inputUtils.init(this),this._setDirty(),this._stage&&this._inputUtils._addStageText()):this._inputUtils&&(this._inputUtils._removeStageText(),this._inputUtils=null))};Object.defineProperty(a.prototype,"text",{get:function(){return this._getText()},set:function(c){this._setText(c)},enumerable:!0,configurable:!0});a.prototype._getText=function(){return this._type== b.TextFieldType.INPUT?this._inputUtils._getText():this._text};a.prototype._setSizeDirty=function(){d.prototype._setSizeDirty.call(this);this._isArrayChanged=!0};a.prototype._setTextDirty=function(){this._setSizeDirty()};a.prototype._setBaseText=function(c){null==c&&(c="");this._isFlow=!1;if(this._text!=c||this._displayAsPassword)this._setTextDirty(),this._text=c,c="",c=this._displayAsPassword?this.changeToPassText(this._text):this._text,this.setMiddleStyle([{text:c}])};a.prototype._setText=function(c){null== c&&(c="");this._setBaseText(c);this._inputUtils&&this._inputUtils._setText(this._text)};Object.defineProperty(a.prototype,"displayAsPassword",{get:function(){return this._displayAsPassword},set:function(c){this._setDisplayAsPassword(c)},enumerable:!0,configurable:!0});a.prototype._setDisplayAsPassword=function(c){this._displayAsPassword!=c&&(this._displayAsPassword=c,this._setText(this._text))};Object.defineProperty(a.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(c){this._setFontFamily(c)}, enumerable:!0,configurable:!0});a.prototype._setFontFamily=function(c){this._fontFamily!=c&&(this._setTextDirty(),this._fontFamily=c)};Object.defineProperty(a.prototype,"size",{get:function(){return this._size},set:function(c){this._setSize(c)},enumerable:!0,configurable:!0});a.prototype._setSize=function(c){this._size!=c&&(this._setTextDirty(),this._size=c)};Object.defineProperty(a.prototype,"italic",{get:function(){return this._italic},set:function(c){this._setItalic(c)},enumerable:!0,configurable:!0}); a.prototype._setItalic=function(c){this._italic!=c&&(this._setTextDirty(),this._italic=c)};Object.defineProperty(a.prototype,"bold",{get:function(){return this._bold},set:function(c){this._setBold(c)},enumerable:!0,configurable:!0});a.prototype._setBold=function(c){this._bold!=c&&(this._setTextDirty(),this._bold=c)};Object.defineProperty(a.prototype,"textColor",{get:function(){return this._textColor},set:function(c){this._setTextColor(c)},enumerable:!0,configurable:!0});a.prototype._setTextColor= function(c){this._textColor!=c&&(this._setTextDirty(),this._textColor=c,this._textColorString=b.toColorString(c))};Object.defineProperty(a.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(c){this._setStrokeColor(c)},enumerable:!0,configurable:!0});a.prototype._setStrokeColor=function(c){this._strokeColor!=c&&(this._setTextDirty(),this._strokeColor=c,this._strokeColorString=b.toColorString(c))};Object.defineProperty(a.prototype,"stroke",{get:function(){return this._stroke}, set:function(c){this._setStroke(c)},enumerable:!0,configurable:!0});a.prototype._setStroke=function(c){this._stroke!=c&&(this._setTextDirty(),this._stroke=c)};Object.defineProperty(a.prototype,"textAlign",{get:function(){return this._textAlign},set:function(c){this._setTextAlign(c)},enumerable:!0,configurable:!0});a.prototype._setTextAlign=function(c){this._textAlign!=c&&(this._setTextDirty(),this._textAlign=c)};Object.defineProperty(a.prototype,"verticalAlign",{get:function(){return this._verticalAlign}, set:function(c){this._setVerticalAlign(c)},enumerable:!0,configurable:!0});a.prototype._setVerticalAlign=function(c){this._verticalAlign!=c&&(this._setTextDirty(),this._verticalAlign=c)};Object.defineProperty(a.prototype,"maxChars",{get:function(){return this._maxChars},set:function(c){this._setMaxChars(c)},enumerable:!0,configurable:!0});a.prototype._setMaxChars=function(c){this._maxChars!=c&&(this._maxChars=c)};Object.defineProperty(a.prototype,"scrollV",{set:function(c){this._scrollV=c;this._setDirty()}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"maxScrollV",{get:function(){return this._maxScrollV},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"selectionBeginIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"selectionEndIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"caretIndex",{get:function(){return 0},enumerable:!0,configurable:!0});a.prototype._setSelection= function(c,a){};Object.defineProperty(a.prototype,"lineSpacing",{get:function(){return this._lineSpacing},set:function(c){this._setLineSpacing(c)},enumerable:!0,configurable:!0});a.prototype._setLineSpacing=function(c){this._lineSpacing!=c&&(this._setTextDirty(),this._lineSpacing=c)};a.prototype._getLineHeight=function(){return this._lineSpacing+this._size};Object.defineProperty(a.prototype,"numLines",{get:function(){return this._numLines},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "multiline",{get:function(){return this._multiline},set:function(c){this._setMultiline(c)},enumerable:!0,configurable:!0});a.prototype._setMultiline=function(c){this._multiline=c;this._setDirty()};a.prototype.setFocus=function(){b.Logger.warning("TextField.setFocus \u6ca1\u6709\u5b9e\u73b0")};a.prototype._onRemoveFromStage=function(){d.prototype._onRemoveFromStage.call(this);this._type==b.TextFieldType.INPUT&&this._inputUtils._removeStageText()};a.prototype._onAddToStage=function(){d.prototype._onAddToStage.call(this); this._type==b.TextFieldType.INPUT&&this._inputUtils._addStageText()};a.prototype._updateBaseTransform=function(){d.prototype._updateTransform.call(this)};a.prototype._updateTransform=function(){this._type==b.TextFieldType.INPUT?this._normalDirty?(this._clearDirty(),this._inputUtils._updateProperties()):this._inputUtils._updateTransform():this._updateBaseTransform()};a.prototype._render=function(c){this.drawText(c);this._clearDirty()};a.prototype._measureBounds=function(){return this.measureText()}; Object.defineProperty(a.prototype,"textFlow",{set:function(c){this._isFlow=!0;for(var a="",b=0;bthis._explicitWidth)break;u+=s;d+=s}0this._explicitHeight&& (g=Math.max(this._scrollV-1,0),g=Math.min(this._numLines-1,g));e=Math.round(e);d=0;this._textAlign==b.HorizontalAlign.CENTER?d=0.5:this._textAlign==b.HorizontalAlign.RIGHT&&(d=1);for(k=0;gthis._explicitHeight)break;for(var k=Math.round((f-n.width)*d),q=0;qf?(this.addToResultArr(a.substring(c)),c=b):(this.addToResultArr(a.substring(c,f)),c=a.indexOf(">",f),"/"==a.charAt(f+1)?this.stackArray.pop():this.addToArray(a.substring(f+1,c)),c+=1)}return this.resutlArr};b.prototype.addToResultArr=function(a){if(""!=a){var c=[];c.push(["<","<"]);c.push([">",">"]);c.push(["&", "&"]);c.push([""",'"']);c.push(["';","'"]);for(var b=0;bthis.maxlength){a=a+255&-256;var b=new ArrayBuffer(a),f=new Uint8Array(this.arraybytes,0,this.length);(new Uint8Array(b,0,this.length)).set(f);this.arraybytes=b;this.maxlength=a}};a.prototype.writeByte=function(a){this.ensureWriteableSpace(1);(new Int8Array(this.arraybytes))[this.position++]=~~a;this.position>this.length&&(this.length=this.position)};a.prototype.readByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+ this.position+", Length="+this.length;return(new Int8Array(this.arraybytes))[this.position++]};a.prototype.readBytes=function(a,b,f){void 0===b&&(b=0);void 0===f&&(f=0);null==f&&(f=a.length);a.ensureWriteableSpace(b+f);var d=new Int8Array(a.arraybytes),e=new Int8Array(this.arraybytes);d.set(e.subarray(this.position,this.position+f),b);this.position+=f;f+b>a.length&&(a.length+=f+b-a.length)};a.prototype.writeUnsignedByte=function(a){this.ensureWriteableSpace(1);(new Uint8Array(this.arraybytes))[this.position++]= ~~a&255;this.position>this.length&&(this.length=this.position)};a.prototype.readUnsignedByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;return(new Uint8Array(this.arraybytes))[this.position++]};a.prototype.writeUnsignedShort=function(a){this.ensureWriteableSpace(2);if(0==(this.position&1)){var b=new Uint16Array(this.arraybytes);b[this.position>>1]=~~a&65535}else b=new Uint16Array(this.unalignedarraybytestemp,0,1),b[0]= ~~a&65535,a=new Uint8Array(this.arraybytes,this.position,2),b=new Uint8Array(this.unalignedarraybytestemp,0,2),a.set(b);this.position+=2;this.position>this.length&&(this.length=this.position)};a.prototype.readUTFBytes=function(a){var b="";a=this.position+a;for(var f=new DataView(this.arraybytes);this.positiond){if(0==d)break;b+=String.fromCharCode(d)}else if(224>d)b+=String.fromCharCode((d&63)<<6|f.getUint8(this.position++)&127);else if(240>d)var e=f.getUint8(this.position++), b=b+String.fromCharCode((d&31)<<12|(e&127)<<6|f.getUint8(this.position++)&127);else var e=f.getUint8(this.position++),g=f.getUint8(this.position++),b=b+String.fromCharCode((d&15)<<18|(e&127)<<12|g<<6&127|f.getUint8(this.position++)&127)}return b};a.prototype.readInt=function(){var a=(new DataView(this.arraybytes)).getInt32(this.position,this.isLittleEndian);this.position+=4;return a};a.prototype.readShort=function(){var a=(new DataView(this.arraybytes)).getInt16(this.position,this.isLittleEndian); this.position+=2;return a};a.prototype.readDouble=function(){var a=(new DataView(this.arraybytes)).getFloat64(this.position,this.isLittleEndian);this.position+=8;return a};a.prototype.readUnsignedShort=function(){if(this.position>this.length+2)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&1)){var a=new Uint16Array(this.arraybytes),b=this.position>>1;this.position+=2;return a[b]}a=new Uint16Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes, this.position,2);(new Uint8Array(this.unalignedarraybytestemp,0,2)).set(b);this.position+=2;return a[0]};a.prototype.writeUnsignedInt=function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var b=new Uint32Array(this.arraybytes);b[this.position>>2]=~~a&4294967295}else b=new Uint32Array(this.unalignedarraybytestemp,0,1),b[0]=~~a&4294967295,a=new Uint8Array(this.arraybytes,this.position,4),b=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(b);this.position+=4;this.position>this.length&& (this.length=this.position)};a.prototype.readUnsignedInt=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&3)){var a=new Uint32Array(this.arraybytes),b=this.position>>2;this.position+=4;return a[b]}a=new Uint32Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(b);this.position+=4;return a[0]};a.prototype.writeFloat= function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var b=new Float32Array(this.arraybytes);b[this.position>>2]=a}else b=new Float32Array(this.unalignedarraybytestemp,0,1),b[0]=a,a=new Uint8Array(this.arraybytes,this.position,4),b=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(b);this.position+=4;this.position>this.length&&(this.length=this.position)};a.prototype.readFloat=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+ this.length;if(0==(this.position&3)){var a=new Float32Array(this.arraybytes),b=this.position>>2;this.position+=4;return a[b]}a=new Float32Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(b);this.position+=4;return a[0]};a.DEFAULT_ENDIAN=e.BIG_ENDIAN;return a}();b.ByteArray=d;d.prototype.__class__="egret.ByteArray"})(egret||(egret={})); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(a,b,f){d.call(this);this._target=null;this.loop=this.ignoreGlobalPause=this._useTicks=!1;this._actions=this._steps=this.pluginData=null;this.paused=!1;this.duration=0;this._prevPos=-1;this.position=null;this._stepPosition=this._prevPosition=0;this.passive=!1;this.initialize(a,b,f)}__extends(a,d);a.get=function(c,b,f,d){void 0===b&&(b=null);void 0===f&&(f=null);void 0===d&&(d=!1);d&&a.removeTweens(c);return new a(c,b,f)};a.removeTweens=function(c){if(c.tween_count){for(var b= a._tweens,f=b.length-1;0<=f;f--)b[f]._target==c&&(b[f].paused=!0,b.splice(f,1));c.tween_count=0}};a.pauseTweens=function(a){if(a.tween_count)for(var d=b.Tween._tweens,f=d.length-1;0<=f;f--)d[f]._target==a&&(d[f].paused=!0)};a.resumeTweens=function(a){if(a.tween_count)for(var d=b.Tween._tweens,f=d.length-1;0<=f;f--)d[f]._target==a&&(d[f].paused=!1)};a.tick=function(c,b){void 0===b&&(b=!1);for(var f=a._tweens.concat(),d=f.length-1;0<=d;d--){var e=f[d];b&&!e.ignoreGlobalPause||e.paused||e.tick(e._useTicks? 1:c)}};a._register=function(c,d){var f=c._target,e=a._tweens;if(d)f&&(f.tween_count=f.tween_count?f.tween_count+1:1),e.push(c),a._inited||(b.Ticker.getInstance().register(a.tick,null),a._inited=!0);else for(f&&f.tween_count--,f=e.length;f--;)if(e[f]==c){e.splice(f,1);break}};a.removeAllTweens=function(){for(var c=a._tweens,b=0,f=c.length;ba&&(a=0);var f=a,d=!1;f>=this.duration&&(this.loop?f%=this.duration:(f=this.duration,d=!0));if(f==this._prevPos)return d; var e=this._prevPos;this.position=this._prevPos=f;this._prevPosition=a;if(this._target)if(d)this._updateTargetProps(null,1);else if(0f);g++);g=this._steps[g-1];this._updateTargetProps(g,(this._stepPosition=f-g.t)/g.d)}0!=b&&0b&&(d=b,e=a,g=k,k=n=-1);for(;(g+=n)!=k;){b=this._actions[g];var p=b.t;(p==e||p>d&&p=a)return this;var d=this._cloneProps(this._curQueueProps);return this._addStep({d:a,p0:d,p1:d,v:b})};a.prototype.to=function(a,b,d){void 0===d&&(d=void 0);if(isNaN(b)||0>b)b=0;return this._addStep({d:b||0,p0:this._cloneProps(this._curQueueProps),e:d,p1:this._cloneProps(this._appendQueueProps(a))})};a.prototype.call=function(a,b,d){void 0===b&&(b=void 0); void 0===d&&(d=void 0);return this._addAction({f:a,p:d?d:[],o:b?b:this._target})};a.prototype.set=function(a,b){void 0===b&&(b=null);return this._addAction({f:this._set,o:this,p:[a,b?b:this._target]})};a.prototype.play=function(a){a||(a=this);return this.call(a.setPaused,a,[!1])};a.prototype.pause=function(a){a||(a=this);return this.call(a.setPaused,a,[!0])};a.prototype.tick=function(a){this.paused||this.setPosition(this._prevPosition+a)};a.NONE=0;a.LOOP=1;a.REVERSE=2;a._tweens=[];a.IGNORE={};a._plugins= {};a._inited=!1;return a}(b.EventDispatcher);b.Tween=e;e.prototype.__class__="egret.Tween"})(egret||(egret={})); (function(b){var e=function(){function d(){b.Logger.fatal("Ease\u4e0d\u80fd\u88ab\u5b9e\u4f8b\u5316")}d.get=function(a){-1>a&&(a=-1);1a?c*(c*-a+1+a):c*((2-c)*a+(1-a))}};d.getPowIn=function(a){return function(c){return Math.pow(c,a)}};d.getPowOut=function(a){return function(c){return 1-Math.pow(1-c,a)}};d.getPowInOut=function(a){return function(c){return 1>(c*=2)?0.5*Math.pow(c,a):1-0.5*Math.abs(Math.pow(2-c,a))}};d.sineIn=function(a){return 1-Math.cos(a* Math.PI/2)};d.sineOut=function(a){return Math.sin(a*Math.PI/2)};d.sineInOut=function(a){return-0.5*(Math.cos(Math.PI*a)-1)};d.getBackIn=function(a){return function(c){return c*c*((a+1)*c-a)}};d.getBackOut=function(a){return function(c){return--c*c*((a+1)*c+a)+1}};d.getBackInOut=function(a){a*=1.525;return function(c){return 1>(c*=2)?0.5*c*c*((a+1)*c-a):0.5*((c-=2)*c*((a+1)*c+a)+2)}};d.circIn=function(a){return-(Math.sqrt(1-a*a)-1)};d.circOut=function(a){return Math.sqrt(1- --a*a)};d.circInOut=function(a){return 1> (a*=2)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)};d.bounceIn=function(a){return 1-d.bounceOut(1-a)};d.bounceOut=function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375};d.bounceInOut=function(a){return 0.5>a?0.5*d.bounceIn(2*a):0.5*d.bounceOut(2*a-1)+0.5};d.getElasticIn=function(a,c){var b=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=c/b*Math.asin(1/a);return-(a*Math.pow(2,10* (d-=1))*Math.sin((d-e)*b/c))}};d.getElasticOut=function(a,c){var b=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=c/b*Math.asin(1/a);return a*Math.pow(2,-10*d)*Math.sin((d-e)*b/c)+1}};d.getElasticInOut=function(a,c){var b=2*Math.PI;return function(d){var e=c/b*Math.asin(1/a);return 1>(d*=2)?-0.5*a*Math.pow(2,10*(d-=1))*Math.sin((d-e)*b/c):a*Math.pow(2,-10*(d-=1))*Math.sin((d-e)*b/c)*0.5+1}};d.quadIn=d.getPowIn(2);d.quadOut=d.getPowOut(2);d.quadInOut=d.getPowInOut(2);d.cubicIn=d.getPowIn(3); d.cubicOut=d.getPowOut(3);d.cubicInOut=d.getPowInOut(3);d.quartIn=d.getPowIn(4);d.quartOut=d.getPowOut(4);d.quartInOut=d.getPowInOut(4);d.quintIn=d.getPowIn(5);d.quintOut=d.getPowOut(5);d.quintInOut=d.getPowInOut(5);d.backIn=d.getBackIn(1.7);d.backOut=d.getBackOut(1.7);d.backInOut=d.getBackInOut(1.7);d.elasticIn=d.getElasticIn(1,0.3);d.elasticOut=d.getElasticOut(1,0.3);d.elasticInOut=d.getElasticInOut(1,0.3*1.5);return d}();b.Ease=e;e.prototype.__class__="egret.Ease"})(egret||(egret={})); (function(b){var e=function(){function b(){this.type=b.EFFECT}b.prototype.play=function(a){void 0===a&&(a=!1);var c=this.audio;c&&(isNaN(c.duration)||(c.currentTime=0),c.loop=a,c.play())};b.prototype.pause=function(){var a=this.audio;a&&a.pause()};b.prototype.load=function(){var a=this.audio;a&&a.load()};b.prototype.addEventListener=function(a,c){this.audio&&this.audio.addEventListener(a,c,!1)};b.prototype.removeEventListener=function(a,c){this.audio&&this.audio.removeEventListener(a,c,!1)};b.prototype.setVolume= function(a){var c=this.audio;c&&(c.volume=a)};b.prototype.getVolume=function(){return this.audio?this.audio.volume:0};b.prototype.preload=function(a){this.type=a};b.prototype._setAudio=function(a){this.audio=a};b.MUSIC="music";b.EFFECT="effect";return b}();b.Sound=e;e.prototype.__class__="egret.Sound"})(egret||(egret={})); (function(b){var e=function(){function b(){}b.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};return b}();b.NumberUtils=e;e.prototype.__class__="egret.NumberUtils"})(egret||(egret={})); Function.prototype.bind||(Function.prototype.bind=function(b){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),d=this,a=function(){},c=function(){return d.apply(this instanceof a&&b?this:b,e.concat(Array.prototype.slice.call(arguments)))};a.prototype=this.prototype;c.prototype=new a;return c}); var __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d},RES; (function(b){var e=function(b){function a(a,e,f){void 0===e&&(e=!1);void 0===f&&(f=!1);b.call(this,a,e,f);this.itemsTotal=this.itemsLoaded=0}__extends(a,b);a.dispatchResourceEvent=function(c,b,d,e,m,g){void 0===d&&(d="");void 0===e&&(e=null);void 0===m&&(m=0);void 0===g&&(g=0);var k=egret.Event._getPropertyData(a);k.groupName=d;k.resItem=e;k.itemsLoaded=m;k.itemsTotal=g;egret.Event._dispatchByTarget(a,c,b,k)};a.ITEM_LOAD_ERROR="itemLoadError";a.CONFIG_COMPLETE="configComplete";a.GROUP_PROGRESS="groupProgress"; a.GROUP_COMPLETE="groupComplete";return a}(egret.Event);b.ResourceEvent=e;e.prototype.__class__="RES.ResourceEvent"})(RES||(RES={})); (function(b){var e=function(){function b(a,c,d){this._loaded=!1;this.name=a;this.url=c;this.type=d}Object.defineProperty(b.prototype,"loaded",{get:function(){return this.data?this.data.loaded:this._loaded},set:function(a){this.data&&(this.data.loaded=a);this._loaded=a},enumerable:!0,configurable:!0});b.prototype.toString=function(){return'[ResourceItem name="'+this.name+'" url="'+this.url+'" type="'+this.type+'"]'};b.TYPE_XML="xml";b.TYPE_IMAGE="image";b.TYPE_BIN="bin";b.TYPE_TEXT="text";b.TYPE_JSON= "json";b.TYPE_SHEET="sheet";b.TYPE_FONT="font";b.TYPE_SOUND="sound";return b}();b.ResourceItem=e;e.prototype.__class__="RES.ResourceItem"})(RES||(RES={})); (function(b){var e=function(){function d(){this.keyMap={};this.groupDic={};b.configInstance=this}d.prototype.getGroupByName=function(a){var c=[];if(!this.groupDic[a])return c;a=this.groupDic[a];for(var b=a.length,d=0;d=b&&(this.queueIndex=0);d=this.itemListDic[a[this.queueIndex]];if(0a&&(a=1);this.resLoader.thread=a};c.GROUP_CONFIG="RES__CONFIG";return c}(egret.EventDispatcher);e.prototype.__class__="RES.Resource";var d=new e})(RES||(RES={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(c){void 0===c&&(c=60);d.call(this);this.frameRate=c;this._time=0;this._isActivate=!0;60==c&&(a.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame,a.cancelAnimationFrame=window.cancelAnimationFrame||window.msCancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.oCancelAnimationFrame||window.cancelRequestAnimationFrame|| window.msCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame);a.requestAnimationFrame||(a.requestAnimationFrame=function(a){return window.setTimeout(a,1E3/c)});a.cancelAnimationFrame||(a.cancelAnimationFrame=function(a){return window.clearTimeout(a)});a.instance=this;this.registerListener()}__extends(a,d);a.prototype.enterFrame=function(){var c=a.instance,d=a._thisObject,e=a._callback,l=b.getTimer(),m=l- c._time;c._requestAnimationId=a.requestAnimationFrame.call(window,a.prototype.enterFrame);e.call(d,m);c._time=l};a.prototype.executeMainLoop=function(c,b){a._callback=c;a._thisObject=b;this.enterFrame()};a.prototype.reset=function(){var c=a.instance;c._requestAnimationId&&(c._time=b.getTimer(),a.cancelAnimationFrame.call(window,c._requestAnimationId),c.enterFrame())};a.prototype.registerListener=function(){var c=this,d=function(){c._isActivate&&(c._isActivate=!1,b.MainContext.instance.stage.dispatchEvent(new b.Event(b.Event.DEACTIVATE)))}, e=function(){c._isActivate||(c._isActivate=!0,a.instance.reset(),b.MainContext.instance.stage.dispatchEvent(new b.Event(b.Event.ACTIVATE)))},l=function(){document[m]?d():e()};window.addEventListener("focus",e,!1);window.addEventListener("blur",d,!1);var m,g;"undefined"!==typeof document.hidden?(m="hidden",g="visibilitychange"):"undefined"!==typeof document.mozHidden?(m="mozHidden",g="mozvisibilitychange"):"undefined"!==typeof document.msHidden?(m="msHidden",g="msvisibilitychange"):"undefined"!==typeof document.webkitHidden? (m="webkitHidden",g="webkitvisibilitychange"):"undefined"!==typeof document.oHidden&&(m="oHidden",g="ovisibilitychange");"onpageshow"in window&&"onpagehide"in window&&(window.addEventListener("pageshow",e,!1),window.addEventListener("pagehide",d,!1));m&&g&&document.addEventListener(g,l,!1)};return a}(b.DeviceContext);b.HTML5DeviceContext=e;e.prototype.__class__="egret.HTML5DeviceContext"})(egret||(egret={}));var egret_html5_localStorage; (function(b){b.getItem=function(b){return window.localStorage.getItem(b)};b.setItem=function(b,d){try{return window.localStorage.setItem(b,d),!0}catch(a){return console.log("egret_html5_localStorage.setItem\u4fdd\u5b58\u5931\u8d25,key="+b+"&value="+d),!1}};b.removeItem=function(b){window.localStorage.removeItem(b)};b.clear=function(){window.localStorage.clear()};b.init=function(){for(var e in b)egret.localStorage[e]=b[e]}})(egret_html5_localStorage||(egret_html5_localStorage={}));egret_html5_localStorage.init(); __extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(a){d.call(this);this.globalAlpha=1;this.canvas=a||this.createCanvas();this.canvasContext=this.canvas.getContext("2d");this._cacheCanvas=document.createElement("canvas");this._cacheCanvas.width=this.canvas.width;this._cacheCanvas.height=this.canvas.height;this._cacheCanvasContext=this._cacheCanvas.getContext("2d");this._cacheCanvasContext.imageSmoothingEnabled=b.RendererContext.imageSmoothingEnabled;this._cacheCanvasContext.webkitImageSmoothingEnabled=b.RendererContext.imageSmoothingEnabled; this._cacheCanvasContext.mozImageSmoothingEnabled=b.RendererContext.imageSmoothingEnabled;this._cacheCanvasContext.msImageSmoothingEnabled=b.RendererContext.imageSmoothingEnabled;this.onResize();var e=this.canvasContext.setTransform,f=this;this._cacheCanvasContext.setTransform=function(a,c,b,d,n,p){f._matrixA=a;f._matrixB=c;f._matrixC=b;f._matrixD=d;f._matrixTx=n;f._matrixTy=p;e.call(f._cacheCanvasContext,a,c,b,d,n,p)};this._matrixA=1;this._matrixC=this._matrixB=0;this._matrixD=1;this._transformTy= this._transformTx=this._matrixTy=this._matrixTx=0;this.initBlendMode()}__extends(a,d);a.prototype.createCanvas=function(){var a=b.Browser.getInstance().$("#egretCanvas");if(!a){var d=document.getElementById(b.StageDelegate.canvas_div_name),a=b.Browser.getInstance().$new("canvas");a.id="egretCanvas";d.appendChild(a)}b.MainContext.instance.stage.addEventListener(b.Event.RESIZE,this.onResize,this);return a};a.prototype.onResize=function(){if(this.canvas){var a=document.getElementById(b.StageDelegate.canvas_div_name); this.canvas.width=b.MainContext.instance.stage.stageWidth;this.canvas.height=b.MainContext.instance.stage.stageHeight;this.canvas.style.width=a.style.width;this.canvas.style.height=a.style.height;this._cacheCanvas.width=this.canvas.width;this._cacheCanvas.height=this.canvas.height}};a.prototype.clearScreen=function(){for(var a=b.RenderFilter.getInstance().getDrawAreaList(),d=0,e=a.length;d>16)+","+((b&65280)>>8)+","+(b&255)+","+a+")";this.fillStyleColor=c;this.commandQueue.push(new e(this._setStyle,this,[c]))};b.drawRect=function(b,a,c,h){this.commandQueue.push(new e(function(a,b,c,d){var e=this.renderContext;this.canvasContext.beginPath();this.canvasContext.rect(e._transformTx+a,e._transformTy+b,c,d);this.canvasContext.closePath()},this,[b,a,c,h]));this._fill()};b.drawCircle=function(b,a,c){this.commandQueue.push(new e(function(a, b,c){var d=this.renderContext;this.canvasContext.beginPath();this.canvasContext.arc(d._transformTx+a,d._transformTy+b,c,0,2*Math.PI);this.canvasContext.closePath()},this,[b,a,c]));this._fill()};b.drawRoundRect=function(b,a,c,h,f,l){this.commandQueue.push(new e(function(a,b,c,d,e,f){var h=this.renderContext;a=h._transformTx+a;b=h._transformTy+b;e/=2;f=f?f/2:e;c=a+c;d=b+d;h=d-f;this.canvasContext.beginPath();this.canvasContext.moveTo(c,h);this.canvasContext.quadraticCurveTo(c,d,c-e,d);this.canvasContext.lineTo(a+ e,d);this.canvasContext.quadraticCurveTo(a,d,a,d-f);this.canvasContext.lineTo(a,b+f);this.canvasContext.quadraticCurveTo(a,b,a+e,b);this.canvasContext.lineTo(c-e,b);this.canvasContext.quadraticCurveTo(c,b,c,b+f);this.canvasContext.lineTo(c,h);this.canvasContext.closePath()},this,[b,a,c,h,f,l]));this._fill()};b.drawEllipse=function(b,a,c,h){this.commandQueue.push(new e(function(a,b,c,d){var e=this.renderContext;this.canvasContext.save();a=e._transformTx+a;b=e._transformTy+b;var e=c>d?c:d,h=c/e;d/= e;this.canvasContext.scale(h,d);this.canvasContext.beginPath();this.canvasContext.moveTo((a+c)/h,b/d);this.canvasContext.arc(a/h,b/d,e,0,2*Math.PI);this.canvasContext.closePath();this.canvasContext.restore();this.canvasContext.stroke()},this,[b,a,c,h]));this._fill()};b.lineStyle=function(b,a,c,h,f,l,m,g){void 0===b&&(b=NaN);void 0===a&&(a=0);void 0===c&&(c=1);void 0===h&&(h=!1);void 0===f&&(f="normal");void 0===l&&(l=null);void 0===m&&(m=null);void 0===g&&(g=3);this.strokeStyleColor&&(this.createEndLineCommand(), this.commandQueue.push(this.endLineCommand));this.strokeStyleColor=a="rgba("+(a>>16)+","+((a&65280)>>8)+","+(a&255)+","+c+")";this.commandQueue.push(new e(function(a,b){this.canvasContext.lineWidth=a;this.canvasContext.strokeStyle=b;this.canvasContext.beginPath()},this,[b,a]));"undefined"===typeof this.lineX&&(this.lineY=this.lineX=0);this.moveTo(this.lineX,this.lineY)};b.lineTo=function(b,a){this.commandQueue.push(new e(function(a,b){var d=this.renderContext;this.canvasContext.lineTo(d._transformTx+ a,d._transformTy+b)},this,[b,a]));this.lineX=b;this.lineY=a};b.curveTo=function(b,a,c,h){this.commandQueue.push(new e(function(a,b,c,d){var e=this.renderContext;this.canvasContext.quadraticCurveTo(e._transformTx+a,e._transformTy+b,e._transformTx+c,e._transformTy+d)},this,[b,a,c,h]));this.lineX=c;this.lineY=h};b.moveTo=function(b,a){this.commandQueue.push(new e(function(a,b){var d=this.renderContext;this.canvasContext.moveTo(d._transformTx+a,d._transformTy+b)},this,[b,a]))};b.clear=function(){this.lineY= this.lineX=this.commandQueue.length=0;this.fillStyleColor=this.strokeStyleColor=null};b.createEndFillCommand=function(){this.endFillCommand||(this.endFillCommand=new e(function(){this.canvasContext.fill();this.canvasContext.closePath()},this,null))};b.endFill=function(){null!=this.fillStyleColor&&this._fill();this.fillStyleColor=null};b._fill=function(){this.fillStyleColor&&(this.createEndFillCommand(),this.commandQueue.push(this.endFillCommand))};b.createEndLineCommand=function(){this.endLineCommand|| (this.endLineCommand=new e(function(){this.canvasContext.stroke();this.canvasContext.closePath()},this,null))};b._draw=function(b){var a=this.commandQueue.length;if(0!=a){this.renderContext=b;b=this.canvasContext=this.renderContext._cacheCanvasContext||this.renderContext.canvasContext;b.save();this.strokeStyleColor&&0=this.size-1)this._draw(),this.currentBaseTexture=a.webGLTexture;var r=this.worldTransform,s=r.a,t=r.b,u=r.c,v=r.d,x=r.tx,y=r.ty;0==g&&0==k||r.append(1,0,0,1,g,k);1==l/n&&1==m/p||r.append(n/l,0,0,p/m,0,0);g=r.a;k=r.b;n=r.c;p=r.d;q=r.tx;var w=r.ty;r.a=s;r.b=t;r.c=u;r.d=v;r.tx=x;r.ty=y;s=a._sourceWidth;t=a._sourceHeight;a=l;r=m;d/=s;e/=t;l/=s;m/=t;s=this.vertices;t=4*this.currentBatchSize* this.vertSize;u=this.worldAlpha;s[t++]=q;s[t++]=w;s[t++]=d;s[t++]=e;s[t++]=u;s[t++]=g*a+q;s[t++]=k*a+w;s[t++]=l+d;s[t++]=e;s[t++]=u;s[t++]=g*a+n*r+q;s[t++]=p*r+k*a+w;s[t++]=l+d;s[t++]=m+e;s[t++]=u;s[t++]=n*r+q;s[t++]=p*r+w;s[t++]=d;s[t++]=m+e;s[t++]=u;this.currentBatchSize++}};a.prototype._draw=function(){if(0!=this.currentBatchSize&&!this.contextLost){var a=b.getTimer();this.start();var d=this.gl;d.bindTexture(d.TEXTURE_2D,this.currentBaseTexture);var e=this.vertices.subarray(0,4*this.currentBatchSize* this.vertSize);d.bufferSubData(d.ARRAY_BUFFER,0,e);d.drawElements(d.TRIANGLES,6*this.currentBatchSize,d.UNSIGNED_SHORT,0);this.currentBatchSize=0;this.renderCost+=b.getTimer()-a;b.Profiler.getInstance().onDrawImage()}};a.prototype.setTransform=function(a){var b=this.worldTransform;b.a=a.a;b.b=a.b;b.c=a.c;b.d=a.d;b.tx=a.tx;b.ty=a.ty};a.prototype.setAlpha=function(a,b){this.worldAlpha=a;this.setBlendMode(b)};a.prototype.createWebGLTexture=function(a){if(!a.webGLTexture){var b=this.gl;a.webGLTexture= b.createTexture();b.bindTexture(b.TEXTURE_2D,a.webGLTexture);b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,a._bitmapData);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.bindTexture(b.TEXTURE_2D,null)}};a.prototype.pushMask=function(a){this._draw(); var b=this.gl;0==this.maskList.length&&(b.enable(b.STENCIL_TEST),b.stencilFunc(b.ALWAYS,1,1));var d=this.maskDataFreeList.pop();d?(d.x=a.x,d.y=a.y,d.w=a.width,d.h=a.height):d={x:a.x,y:a.y,w:a.width,h:a.height};this.maskList.push(d);b.colorMask(!1,!1,!1,!1);b.stencilOp(b.KEEP,b.KEEP,b.INCR);this.renderGraphics(d);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.NOTEQUAL,0,this.maskList.length);b.stencilOp(b.KEEP,b.KEEP,b.KEEP)};a.prototype.popMask=function(){this._draw();var a=this.gl,b=this.maskList.pop(); b&&(a.colorMask(!1,!1,!1,!1),a.stencilOp(a.KEEP,a.KEEP,a.DECR),this.renderGraphics(b),a.colorMask(!0,!0,!0,!0),a.stencilFunc(a.NOTEQUAL,0,this.maskList.length),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),this.maskDataFreeList.push(b));0==this.maskList.length&&a.disable(a.STENCIL_TEST)};a.prototype.setGlobalColorTransform=function(a){if(this.colorTransformMatrix!=a&&(this._draw(),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}};a.prototype.setupFont=function(a,b){var d=this.canvasContext,e=a.italic?"italic ":"normal ",e=e+(a.bold?"bold ":"normal "),e=e+(a.size+"px "+a.fontFamily);d.font=e;d.textAlign="left";d.textBaseline="middle"};a.prototype.measureText=function(a){return this.canvasContext.measureText(a).width};a.prototype.renderGraphics= function(a){var b=this.gl,d=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(d);b.blendFunc(b.ONE,b.ONE_MINUS_SRC_ALPHA);b.uniformMatrix3fv(d.translationMatrix,!1,this.worldTransform.toArray(!0));b.uniform2f(d.projectionVector,this.projectionX,-this.projectionY); b.uniform2f(d.offsetVector,0,0);b.uniform3fv(d.tintColor,[1,1,1]);b.uniform1f(d.alpha,this.worldAlpha);b.bindBuffer(b.ARRAY_BUFFER,this.graphicsBuffer);b.vertexAttribPointer(d.aVertexPosition,2,b.FLOAT,!1,24,0);b.vertexAttribPointer(d.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)};a.prototype.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)};a.prototype.buildRectangle=function(a){var b=a.x,d=a.y,e=a.w;a=a.h;var m=this.graphicsPoints,g=this.graphicsIndices,k=m.length/6;m.push(b,d);m.push(0,0,0,1);m.push(b+e,d); m.push(0,0,0,1);m.push(b,d+a);m.push(0,0,0,1);m.push(b+e,d+a);m.push(0,0,0,1);g.push(k,k,k+1,k+2,k+3,k+3)};return a}(b.RendererContext);b.WebGLRenderer=e;e.prototype.__class__="egret.WebGLRenderer"})(egret||(egret={})); (function(b){var e=function(){function b(){}b.compileProgram=function(a,c,e){e=b.compileFragmentShader(a,e);c=b.compileVertexShader(a,c);var f=a.createProgram();a.attachShader(f,c);a.attachShader(f,e);a.linkProgram(f);a.getProgramParameter(f,a.LINK_STATUS)||console.log("\u65e0\u6cd5\u521d\u59cb\u5316\u7740\u8272\u5668");return f};b.compileFragmentShader=function(a,c){return b._compileShader(a,c,a.FRAGMENT_SHADER)};b.compileVertexShader=function(a,c){return b._compileShader(a,c,a.VERTEX_SHADER)};b._compileShader= function(a,b,d){d=a.createShader(d);a.shaderSource(d,b);a.compileShader(d);return a.getShaderParameter(d,a.COMPILE_STATUS)?d:(console.log(a.getShaderInfoLog(d)),null)};b.checkCanUseWebGL=function(){if(void 0==b.canUseWebGL)try{var a=document.createElement("canvas");b.canUseWebGL=!!window.WebGLRenderingContext&&!(!a.getContext("webgl")&&!a.getContext("experimental-webgl"))}catch(c){b.canUseWebGL=!1}return b.canUseWebGL};return b}();b.WebGLUtils=e;e.prototype.__class__="egret.WebGLUtils"})(egret||(egret= {}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(){function b(a){this.maxAttibs=10;this.attribState=[];this.tempAttribState=[];for(var c=0;ca||0>d||a>e.stageWidth||d>e.stageHeight?!0:!1};a.prototype.dispatchLeaveStageEvent=function(){this.touchingIdentifiers.length=0;b.MainContext.instance.stage.dispatchEventWith(b.Event.LEAVE_STAGE)};a.prototype._onTouchBegin=function(a){var b=this.getLocation(this.rootDiv,a),d=-1;a.hasOwnProperty("identifier")&&(d=a.identifier);this.onTouchBegan(b.x,b.y,d)};a.prototype._onTouchMove=function(a){var b=this.getLocation(this.rootDiv,a),d=-1;a.hasOwnProperty("identifier")&& (d=a.identifier);this.onTouchMove(b.x,b.y,d)};a.prototype._onTouchEnd=function(a){var b=this.getLocation(this.rootDiv,a),d=-1;a.hasOwnProperty("identifier")&&(d=a.identifier);this.onTouchEnd(b.x,b.y,d)};a.prototype.getLocation=function(a,d){var e=document.documentElement,l=window,m,g;"function"===typeof a.getBoundingClientRect?(g=a.getBoundingClientRect(),m=g.left,g=g.top):g=m=0;m+=l.pageXOffset-e.clientLeft;g+=l.pageYOffset-e.clientTop;null!=d.pageX?(e=d.pageX,l=d.pageY):(m-=document.body.scrollLeft, g-=document.body.scrollTop,e=d.clientX,l=d.clientY);var k=b.Point.identity;k.x=(e-m)/b.StageDelegate.getInstance().getScaleX();k.y=(l-g)/b.StageDelegate.getInstance().getScaleY();return k};return a}(b.TouchContext);b.HTML5TouchContext=e;e.prototype.__class__="egret.HTML5TouchContext"})(egret||(egret={}));__extends=this.__extends||function(b,e){function d(){this.constructor=b}for(var a in e)e.hasOwnProperty(a)&&(b[a]=e[a]);d.prototype=e.prototype;b.prototype=new d}; (function(b){var e=function(d){function a(){d.call(this);this._hasListeners=!1;this._inputType="";this._isShow=!1;this.textValue="";this._height=this._width=0;this._styleInfoes={};var a=b.StageDelegate.getInstance().getScaleX(),e=b.StageDelegate.getInstance().getScaleY(),f=b.Browser.getInstance().$new("div");f.position.x=0;f.position.y=0;f.scale.x=a;f.scale.y=e;f.transforms();f.style[egret_dom.getTrans("transformOrigin")]="0% 0% 0px";this.div=f;e=b.MainContext.instance.stage;a=e.stageWidth;e=e.stageHeight; f=new b.Shape;f.width=a;f.height=e;f.touchEnabled=!0;this._shape=f;this.getStageDelegateDiv().appendChild(this.div)}__extends(a,d);a.prototype.getStageDelegateDiv=function(){var a=b.Browser.getInstance().$("#StageDelegateDiv");a||(a=b.Browser.getInstance().$new("div"),a.id="StageDelegateDiv",document.getElementById(b.StageDelegate.canvas_div_name).appendChild(a),a.transforms());return a};a.prototype._setMultiline=function(a){d.prototype._setMultiline.call(this,a);this.createInput()};a.prototype.callHandler= function(a){a.stopPropagation()};a.prototype._add=function(){this.div&&null==this.div.parentNode&&this.getStageDelegateDiv().appendChild(this.div)};a.prototype._remove=function(){this._shape&&this._shape.parent&&this._shape.parent.removeChild(this._shape);this.div&&this.div.parentNode&&this.div.parentNode.removeChild(this.div)};a.prototype._addListeners=function(){this.inputElement&&!this._hasListeners&&(this._hasListeners=!0,this.inputElement.addEventListener("mousedown",this.callHandler),this.inputElement.addEventListener("touchstart", this.callHandler),this.inputElement.addEventListener("MSPointerDown",this.callHandler))};a.prototype._removeListeners=function(){this.inputElement&&this._hasListeners&&(this._hasListeners=!1,this.inputElement.removeEventListener("mousedown",this.callHandler),this.inputElement.removeEventListener("touchstart",this.callHandler),this.inputElement.removeEventListener("MSPointerDown",this.callHandler))};a.prototype.createInput=function(){var a=this._multiline?"textarea":"input";this._inputType!=a&&(this._inputType= a,null!=this.inputElement&&(this._removeListeners(),this.div.removeChild(this.inputElement)),this._multiline?(a=document.createElement("textarea"),a.style.resize="none"):a=document.createElement("input"),a.type="text",this.inputElement=a,this.inputElement.value="",this.div.appendChild(a),this._addListeners(),this.setElementStyle("width","0px"),this.setElementStyle("border","none"),this.setElementStyle("margin","0"),this.setElementStyle("padding","0"),this.setElementStyle("outline","medium"),this.setElementStyle("verticalAlign", "top"),this.setElementStyle("wordBreak","break-all"),this.setElementStyle("overflow","hidden"))};a.prototype._open=function(a,b,d,e){};a.prototype._setScale=function(a,e){d.prototype._setScale.call(this,a,e);var f=b.StageDelegate.getInstance().getScaleX(),l=b.StageDelegate.getInstance().getScaleY();this.div.scale.x=f*a;this.div.scale.y=l*e;this.div.transforms()};a.prototype.changePosition=function(a,d){var e=b.StageDelegate.getInstance().getScaleX(),l=b.StageDelegate.getInstance().getScaleY();this.div.position.x= a*e;this.div.position.y=d*l;this.div.transforms()};a.prototype.setStyles=function(){this.setElementStyle("fontStyle",this._italic?"italic":"normal");this.setElementStyle("fontWeight",this._bold?"bold":"normal");this.setElementStyle("textAlign",this._textAlign);this.setElementStyle("fontSize",this._size+"px");this.setElementStyle("color","#000000");this.setElementStyle("width",this._width+"px");this.setElementStyle("height",this._height+"px");this.setElementStyle("border","1px solid red");this.setElementStyle("display", "block")};a.prototype._show=function(){0