0){a.setTo(999999,999999,-999999,-999999);for(var f=0,_=u.length;f<_;f+=2){var c=u[f];var p=u[f+1];if(a.x>c)a.x=c;if(a.widthp)a.y=p;if(a.heighte.width){e.width=v}if(b>e.height){e.height=b}}}e.width-=e.x;e.height-=e.y;if(t.EgretFactory._isV5){if(this._bounds===null){this._bounds=new egret.Rectangle}this._bounds.copyFrom(e)}}else if(t.EgretFactory._isV5){if(this._bounds===null){this._bounds=new egret.Rectangle}e.copyFrom(this._bounds)}return e}return i.prototype.$measureContentBounds.call(this,e)};r.prototype.hasEvent=function(t){return this.hasDBEventListener(t)};r.prototype.addEvent=function(t,e,i){this.addDBEventListener(t,e,i)};r.prototype.removeEvent=function(t,e,i){this.removeDBEventListener(t,e,i)};r.prototype.advanceTimeBySelf=function(e){if(e){this._armature.clock=t.EgretFactory.factory.clock}else{this._armature.clock=null}};return r}(egret.DisplayObjectContainer);t.EgretArmatureDisplay=i;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.Event=r;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.ArmatureEvent=a;var n=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.AnimationEvent=n;var s=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.FrameEvent=s;var o=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.SoundEvent=o;var l=function(e){__extends(i,e);function i(i,r,a){if(a===void 0){a=1}var n=e.call(this)||this;console.warn("已废弃");n._onClear();t.ObjectDataParser.getInstance().parseTextureAtlasData(r,n,a);n.renderTexture=i;return n}i.toString=function(){return"[class dragonBones.EgretTextureAtlas]"};return i}(t.EgretTextureAtlasData);t.EgretTextureAtlas=l;var h=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(l);t.EgretSheetAtlas=h;var u=function(){function e(){}e.getInstance=function(){console.warn("已废弃");return t.EgretFactory.factory.soundEventManager};return e}();t.SoundEventManager=u;var f=function(){function t(){console.warn("已废弃")}return t}();t.AnimationCacheManager=f})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t.transformUpdateEnabled=false;t._armatureDisplay=null;t._renderDisplay=null;t._colorFilter=null;return t}i.toString=function(){return"[class dragonBones.EgretSlot]"};i.prototype.init=function(i,r,a,n){e.prototype.init.call(this,i,r,a,n);if(t.EgretFactory._isV5){this._updateTransform=this._updateTransformV5}else{this._updateTransform=this._updateTransformV4}};i.prototype._onClear=function(){e.prototype._onClear.call(this);this._armatureDisplay=null;this._renderDisplay=null;this._colorFilter=null};i.prototype._initDisplay=function(t){t};i.prototype._disposeDisplay=function(t){t};i.prototype._onUpdateDisplay=function(){this._armatureDisplay=this._armature.display;this._renderDisplay=this._display!==null?this._display:this._rawDisplay;if(t.EgretFactory._isV5){if(this._renderDisplay===this._rawDisplay&&!(this._renderDisplay.$renderNode instanceof egret.sys.BitmapNode)){this._renderDisplay.$renderNode=new egret.sys.BitmapNode}}if(this._armatureDisplay._batchEnabled){if(this._renderDisplay!==this._rawDisplay&&this._renderDisplay!==this._meshDisplay){this._armatureDisplay.disableBatch()}else{var e=this._renderDisplay.$renderNode;if(!e.matrix){e.matrix=new egret.Matrix}}}};i.prototype._addDisplay=function(){if(this._armatureDisplay._batchEnabled){this._armatureDisplay.$renderNode.addNode(this._renderDisplay.$renderNode)}else{this._armatureDisplay.addChild(this._renderDisplay)}};i.prototype._replaceDisplay=function(t){var e=t;if(this._armatureDisplay._batchEnabled){var i=this._armatureDisplay.$renderNode.drawData;i[i.indexOf(e.$renderNode)]=this._renderDisplay.$renderNode}else{this._armatureDisplay.addChild(this._renderDisplay);this._armatureDisplay.swapChildren(this._renderDisplay,e);this._armatureDisplay.removeChild(e)}};i.prototype._removeDisplay=function(){if(this._armatureDisplay._batchEnabled){var t=this._armatureDisplay.$renderNode.drawData;t.splice(t.indexOf(this._renderDisplay.$renderNode),1)}else{this._renderDisplay.parent.removeChild(this._renderDisplay)}};i.prototype._updateZOrder=function(){if(this._armatureDisplay._batchEnabled){var t=this._armatureDisplay.$renderNode.drawData;t[this._zOrder]=this._renderDisplay.$renderNode}else{var e=this._armatureDisplay.getChildIndex(this._renderDisplay);if(e===this._zOrder){return}this._armatureDisplay.addChildAt(this._renderDisplay,this._zOrder)}};i.prototype._updateVisible=function(){var t=this._parent.visible&&this._visible;if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.alpha=t?1:0}else{this._renderDisplay.visible=t}};i.prototype._updateBlendMode=function(){switch(this._blendMode){case 0:this._renderDisplay.blendMode=egret.BlendMode.NORMAL;break;case 1:this._renderDisplay.blendMode=egret.BlendMode.ADD;break;case 5:this._renderDisplay.blendMode=egret.BlendMode.ERASE;break;default:break}if(this._armatureDisplay._batchEnabled){var t=this._renderDisplay.$renderNode;t.blendMode=egret.sys.blendModeToNumber(this._renderDisplay.blendMode)}};i.prototype._updateColor=function(){if(this._colorTransform.redMultiplier!==1||this._colorTransform.greenMultiplier!==1||this._colorTransform.blueMultiplier!==1||this._colorTransform.redOffset!==0||this._colorTransform.greenOffset!==0||this._colorTransform.blueOffset!==0||this._colorTransform.alphaOffset!==0){if(this._colorFilter===null){this._colorFilter=new egret.ColorMatrixFilter}var t=this._colorFilter.matrix;t[0]=this._colorTransform.redMultiplier;t[6]=this._colorTransform.greenMultiplier;t[12]=this._colorTransform.blueMultiplier;t[18]=this._colorTransform.alphaMultiplier;t[4]=this._colorTransform.redOffset;t[9]=this._colorTransform.greenOffset;t[14]=this._colorTransform.blueOffset;t[19]=this._colorTransform.alphaOffset;this._colorFilter.matrix=t;if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.filter=this._colorFilter;e.alpha=1}var i=this._renderDisplay.filters;if(!i){i=[]}if(i.indexOf(this._colorFilter)<0){i.push(this._colorFilter)}this._renderDisplay.filters=i;this._renderDisplay.$setAlpha(1)}else{if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.filter=null;e.alpha=this._colorTransform.alphaMultiplier}this._renderDisplay.filters=null;this._renderDisplay.$setAlpha(this._colorTransform.alphaMultiplier)}};i.prototype._updateFrame=function(){var e=this._display===this._meshDisplay?this._meshData:null;var i=this._textureData;if(this._displayIndex>=0&&this._display!==null&&i!==null){if(this._armature.replacedTexture!==null&&this._rawDisplayDatas!==null&&this._rawDisplayDatas.indexOf(this._displayData)>=0){var r=i.parent;if(this._armature._replaceTextureAtlasData===null){r=t.BaseObject.borrowObject(t.EgretTextureAtlasData);r.copyFrom(i.parent);r.renderTexture=this._armature.replacedTexture;this._armature._replaceTextureAtlasData=r}else{r=this._armature._replaceTextureAtlasData}i=r.getTexture(i.name)}if(i.renderTexture!==null){if(e!==null){var a=e.parent.parent.parent;var n=a.intArray;var s=a.floatArray;var o=n[e.offset+0];var l=n[e.offset+1];var h=n[e.offset+2];if(h<0){h+=65536}var u=h+o*2;var f=this._renderDisplay;var _=f.$renderNode;_.uvs.length=o*2;_.vertices.length=o*2;_.indices.length=l*3;for(var c=0,p=o*2;c
0;var i=this._armature._armatureData.scale;var r=this._meshData;var a=r.weight;var n=this._renderDisplay;var s=n.$renderNode;if(a!==null){var o=r.parent.parent.parent;var l=o.intArray;var h=o.floatArray;var u=l[r.offset+0];var f=l[a.offset+1];if(f<0){f+=65536}for(var _=0,c=0,p=a.offset+2+a.bones.length,m=f,d=0;_=5.1;var n=new t.EgretArmatureDisplay;i._dragonBonesInstance=new t.DragonBones(n);i._dragonBonesInstance.clock.time=egret.getTimer()*.001;egret.startTick(i._clockHandler,i)}a._dragonBones=i._dragonBonesInstance;return a}i._clockHandler=function(t){t*=.001;var e=i._dragonBonesInstance.clock;var r=t-e.time;i._dragonBonesInstance.advanceTime(r);e.time=t;return false};Object.defineProperty(i,"factory",{get:function(){if(i._factory===null){i._factory=new i}return i._factory},enumerable:true,configurable:true});i.prototype._isSupportMesh=function(){if(egret.Capabilities.renderMode==="webgl"||egret.Capabilities.runtimeType===egret.RuntimeType.NATIVE){return true}console.warn("Canvas can not support mesh, please change renderMode to webgl.");return false};i.prototype._buildTextureAtlasData=function(e,i){if(e!==null){if(i instanceof egret.Texture){e.renderTexture=i}else{var r=new egret.Texture;r.bitmapData=new egret.BitmapData(i);e.disposeEnabled=true;e.renderTexture=r}}else{e=t.BaseObject.borrowObject(t.EgretTextureAtlasData)}return e};i.prototype._buildArmature=function(e){var i=t.BaseObject.borrowObject(t.Armature);var r=new t.EgretArmatureDisplay;i.init(e.armature,r,r,this._dragonBones);return i};i.prototype._buildSlot=function(e,i,r,a){e;a;var n=t.BaseObject.borrowObject(t.EgretSlot);n.init(i,r,new egret.Bitmap,new egret.Mesh);return n};i.prototype.buildArmatureDisplay=function(t,e,i,r){if(e===void 0){e=""}if(i===void 0){i=""}if(r===void 0){r=""}var a=this.buildArmature(t,e||"",i||"",r||"");if(a!==null){this._dragonBones.clock.add(a);return a.display}return null};i.prototype.getTextureDisplay=function(t,e){if(e===void 0){e=null}var i=this._getTextureData(e!==null?e:"",t);if(i!==null&&i.renderTexture!==null){var r=i.renderTexture;var a=new egret.Bitmap(r);a.width=r.textureWidth*i.parent.scale;a.height=r.textureHeight*i.parent.scale;return a}return null};Object.defineProperty(i.prototype,"soundEventManager",{get:function(){return this._dragonBones.eventManager},enumerable:true,configurable:true});Object.defineProperty(i,"clock",{get:function(){return i.factory.clock},enumerable:true,configurable:true});i.prototype.addSkeletonData=function(t,e){if(e===void 0){e=null}console.warn("已废弃");this.addDragonBonesData(t,e)};i.prototype.getSkeletonData=function(t){console.warn("已废弃");return this.getDragonBonesData(t)};i.prototype.removeSkeletonData=function(t){console.warn("已废弃");this.removeDragonBonesData(t)};i.prototype.addTextureAtlas=function(t,e){if(e===void 0){e=null}console.warn("已废弃");this.addTextureAtlasData(t,e)};i.prototype.getTextureAtlas=function(t){console.warn("已废弃");return this.getTextureAtlasData(t)};i.prototype.removeTextureAtlas=function(t){console.warn("已废弃");this.removeTextureAtlasData(t)};i.prototype.buildFastArmature=function(t,e,i){if(e===void 0){e=""}if(i===void 0){i=""}console.warn("已废弃");return this.buildArmature(t,e||"",i||"")};i.prototype.dispose=function(){console.warn("已废弃");this.clear()};i._isV5=false;i._dragonBonesInstance=null;i._factory=null;return i}(t.BaseFactory);t.EgretFactory=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=new egret.Rectangle;var i=new egret.Matrix;var r={};function a(t,e){for(var i=0,r=t.length;i=0){e.displayConfig=this._groupConfig.display[e.displayIndex];if(e.displayConfig.type===1){var a=e.displayConfig.name in e.childMovies?e.childMovies[e.displayConfig.name]:null;if(!a){a=u(e.displayConfig.name,this._groupConfig.name);if(a){e.childMovies[e.displayConfig.name]=a}}if(a){e.display=a;e.childMovie=a}else{e.display=e.rawDisplay;e.childMovie=null}}else{e.display=e.rawDisplay;e.childMovie=null}}else{e.displayConfig=null;e.display=e.rawDisplay;e.childMovie=null}if(e.display!==i){if(i){this.addChild(e.display);this.swapChildren(e.display,i);this.removeChild(i)}this._updateSlotBlendMode(e)}if(e.display===e.rawDisplay){if(e.displayConfig&&e.displayConfig.regionIndex!==null&&e.displayConfig.regionIndex!==undefined){if(!e.displayConfig.texture){var n=this._groupConfig.textures[e.displayConfig.textureIndex||0];var s=e.displayConfig.regionIndex*4;var o=this._groupConfig.rectangleArray[s];var l=this._groupConfig.rectangleArray[s+1];var h=this._groupConfig.rectangleArray[s+2];var f=this._groupConfig.rectangleArray[s+3];e.displayConfig.texture=new egret.Texture;if(t.EgretFactory._isV5){e.displayConfig.texture["$bitmapData"]=n["$bitmapData"]}else{e.displayConfig.texture._bitmapData=n._bitmapData}e.displayConfig.texture.$initData(o,l,Math.min(h,n.textureWidth-o),Math.min(f,n.textureHeight-l),0,0,Math.min(h,n.textureWidth-o),Math.min(f,n.textureHeight-l),n.textureWidth,n.textureHeight)}if(this._batchEnabled){var _=e.displayConfig.texture;var c=e.rawDisplay.$renderNode;egret.sys.RenderNode.prototype.cleanBeforeRender.call(e.rawDisplay.$renderNode);if(t.EgretFactory._isV5){c.image=_["$bitmapData"];c.drawImage(_.$bitmapX,_.$bitmapY,_.$bitmapWidth,_.$bitmapHeight,_.$offsetX,_.$offsetY,_.textureWidth,_.textureHeight);c.imageWidth=_._sourceWidth;c.imageHeight=_._sourceHeight}else{c.image=_._bitmapData;c.drawImage(_._bitmapX,_._bitmapY,_._bitmapWidth,_._bitmapHeight,_._offsetX,_._offsetY,_.textureWidth,_.textureHeight);c.imageWidth=_._sourceWidth;c.imageHeight=_._sourceHeight}}else{e.rawDisplay.visible=true;e.rawDisplay.$setBitmapData(e.displayConfig.texture)}}else{if(this._batchEnabled){e.rawDisplay.$renderNode.image=null}else{e.rawDisplay.visible=false;e.rawDisplay.$setBitmapData(null)}}}if(e.childMovie!==r){if(r){r.stop();this._childMovies.slice(this._childMovies.indexOf(r),1)}if(e.childMovie){if(this._childMovies.indexOf(e.childMovie)<0){this._childMovies.push(e.childMovie)}if(e.config.action){e.childMovie.play(e.config.action)}else{e.childMovie.play(e.childMovie._config.action)}}}};a.prototype._getSlot=function(t){for(var e=0,i=this._slots.length;e0&&(n>=a||n<=-a)){this._isCompleted=true;s=this._playTimes;if(n<0){n=0}else{n=r}}else{this._isCompleted=false;if(n<0){s=Math.floor(-n/r);n=r- -n%r}else{s=Math.floor(n/r);n%=r}if(this._playTimes>0&&s>this._playTimes){s=this._playTimes}}if(this._currentTime===n){return}var o=Math.floor(n*this._clipConfig.cacheTimeToFrameScale);if(this._cacheFrameIndex!==o){this._cacheFrameIndex=o;var l=this._groupConfig.displayFrameArray;var h=this._groupConfig.transformArray;var u=this._groupConfig.colorArray;var f=true;var c=false;var p=false;var m=this._cacheRectangle;this._cacheRectangle=this._clipConfig.cacheRectangles[this._cacheFrameIndex];if(this._batchEnabled&&!this._cacheRectangle){p=true;this._cacheRectangle=new egret.Rectangle;this._clipConfig.cacheRectangles[this._cacheFrameIndex]=this._cacheRectangle}for(var d=0,y=this._slots.length;d=this._clipArray.length){v=this._frameSize*(this._cacheFrameIndex-1)+d*2}var b=this._clipArray[v]*2;if(b>=0){var T=l[b];var D=l[b+1]*8;var A=this._clipArray[v+1]*6;var x=false;if(g.displayIndex!==T){g.displayIndex=T;x=true;this._updateSlotDisplay(g)}if(g.colorIndex!==D||x){g.colorIndex=D;if(g.colorIndex>=0){this._updateSlotColor(g,u[D]*.01,u[D+1]*.01,u[D+2]*.01,u[D+3]*.01,u[D+4],u[D+5],u[D+6],u[D+7])}else{this._updateSlotColor(g,1,1,1,1,0,0,0,0)}}c=true;if(g.transformIndex!==A){g.transformIndex=A;if(this._batchEnabled){var O=g.display.$renderNode.matrix;if(!O){O=g.display.$renderNode.matrix=new egret.Matrix}O.a=h[A];O.b=h[A+1];O.c=h[A+2];O.d=h[A+3];O.tx=h[A+4];O.ty=h[A+5]}else{i.a=h[A];i.b=h[A+1];i.c=h[A+2];i.d=h[A+3];i.tx=h[A+4];i.ty=h[A+5];g.display.$setMatrix(i)}}if(this._batchEnabled&&p&&g.displayConfig){var O=g.display.$renderNode.matrix;e.x=0;e.y=0;e.width=g.displayConfig.texture.textureWidth;e.height=g.displayConfig.texture.textureHeight;O.$transformBounds(e);if(f){f=false;this._cacheRectangle.x=e.x;this._cacheRectangle.width=e.x+e.width;this._cacheRectangle.y=e.y;this._cacheRectangle.height=e.y+e.height}else{this._cacheRectangle.x=Math.min(this._cacheRectangle.x,e.x);this._cacheRectangle.width=Math.max(this._cacheRectangle.width,e.x+e.width);this._cacheRectangle.y=Math.min(this._cacheRectangle.y,e.y);this._cacheRectangle.height=Math.max(this._cacheRectangle.height,e.y+e.height)}}}else if(g.displayIndex!==-1){g.displayIndex=-1;this._updateSlotDisplay(g)}}if(this._cacheRectangle){if(c&&p&&f&&m){this._cacheRectangle.x=m.x;this._cacheRectangle.y=m.y;this._cacheRectangle.width=m.width;this._cacheRectangle.height=m.height}this.$invalidateContentBounds()}}if(this._isCompleted){this._isPlaying=false}if(!this._isStarted){this._isStarted=true;if(this.hasEventListener(_.START)){var S=egret.Event.create(_,_.START);S.movie=this;S.clipName=this._clipConfig.name;S.name="";S.slotName="";this.dispatchEvent(S)}}this._isReversing=this._currentTime>n&&this._currentPlayTimes===s;this._currentTime=n;var E=this._clipConfig.frame?this._clipConfig.frame.length:0;if(E>0){var B=Math.floor(this._currentTime*this._config.frameRate);var M=this._groupConfig.frame[this._clipConfig.frame[B]];if(this._currentFrameConfig!==M){if(E>1){var w=this._currentFrameConfig;this._currentFrameConfig=M;if(!w){var P=Math.floor(this._currentTime*this._config.frameRate);w=this._groupConfig.frame[this._clipConfig.frame[P]];if(this._isReversing){}else{if(this._currentTime<=w.position||this._currentPlayTimes!==s){w=this._groupConfig.frame[w.prev]}}}if(this._isReversing){while(w!==M){this._onCrossFrame(w);w=this._groupConfig.frame[w.prev]}}else{while(w!==M){w=this._groupConfig.frame[w.next];this._onCrossFrame(w)}}}else{this._currentFrameConfig=M;if(this._currentFrameConfig){this._onCrossFrame(this._currentFrameConfig)}}}}if(this._currentPlayTimes!==s){this._currentPlayTimes=s;if(this.hasEventListener(_.LOOP_COMPLETE)){var C=egret.Event.create(_,_.LOOP_COMPLETE);C.movie=this;C.clipName=this._clipConfig.name;C.name="";C.slotName="";this.dispatchEvent(C);egret.Event.release(C)}if(this._isCompleted&&this.hasEventListener(_.COMPLETE)){var I=egret.Event.create(_,_.COMPLETE);I.movie=this;I.clipName=this._clipConfig.name;I.name="";I.slotName="";this.dispatchEvent(I);egret.Event.release(I)}}}this._isLockDispose=false;if(this._isDelayDispose){this.dispose()}};a.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}if(t){var i=null;for(var r=0,a=this._config.clip.length;r-1?e.addEventListener("DOMMouseScroll",v,{passive:!0}):e.addEventListener("mousewheel",v,{passive:!0})},a=function(){var e=document.getElementById("game");navigator.userAgent.toLowerCase().indexOf("firefox")>-1?e.removeEventListener("DOMMouseScroll",v,{passive:!0}):e.removeEventListener("mousewheel",v,{passive:!0})},v=function(t){var o=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail));s(e.MouseEvent.WHEEL,!0,0,o)},E=function(o,n){t&&!t.$stage&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),s(e.MouseEvent.ROLL_OUT,!1,o,n),t=null,a());var u=r.$hitTest(o,n);null!=u&&u!=r?t?u!=t&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),t.$getConcatenatedVisible()&&t.hitTestPoint(o,n)||(s(e.MouseEvent.ROLL_OUT,!1,o,n),a()),t=u,s(e.MouseEvent.ROLL_OVER,!1,o,n),s(e.MouseEvent.MOUSE_OVER,!0,o,n),i()):(t=u,s(e.MouseEvent.ROLL_OVER,!1,o,n),s(e.MouseEvent.MOUSE_OVER,!0,o,n),i()):t&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),s(e.MouseEvent.ROLL_OUT,!1,o,n),t=null,a())},l=NaN,O=NaN,c=egret.sys.TouchHandler.prototype.onTouchMove;egret.sys.TouchHandler.prototype.onTouchMove=function(t,n,s){if(l=t,O=n,c.call(this,t,n,s),u){var r=o.$hitTest(t,n);r||(r=o),egret.TouchEvent.dispatchTouchEvent(r,e.MouseEvent.MOUSE_MOVE,!0,!0,t,n,s,!0)}E(t,n)};var M=egret.sys.TouchHandler.prototype.onTouchBegin;egret.sys.TouchHandler.prototype.onTouchBegin=function(e,t,o){M.call(this,e,t,o),E(e,t)};var d=egret.sys.TouchHandler.prototype.onTouchEnd;egret.sys.TouchHandler.prototype.onTouchEnd=function(e,t,o){d.call(this,e,t,o),E(e,t)},r.addEventListener(egret.Event.ENTER_FRAME,function(){NaN!=l&&NaN!=O&&E(l,O)},null)},e.setButtonMode=function(e,t){e.buttonModeForMouse=t};var u=!1;e.setMouseMoveEnabled=function(e){u=e}}(mouse||(mouse={}));
//libs/commonlibs/app/app.min.js
function launchFullscreen(element) {
if(element.requestFullscreen) {
element.requestFullscreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if(element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
function hideLanding() {
if(document.getElementById("logo")) {
document.getElementById("logo").style.display = "none";
}
if(document.getElementById("loading")) {
document.getElementById("loading").style.display = "none";
}
if(document.getElementById("msg")) {
document.getElementById("msg").style.display = "none";
}
if(document.getElementById("poweredby")) {
document.getElementById("poweredby").style.display = "none";
}
if(document.getElementById("animation_container")) {
var animation_container = document.getElementById("animation_container");
while (animation_container.hasChildNodes()) {
animation_container.removeChild(animation_container.firstChild);
}
document.getElementById("animation_container").style.display = "none";
}
}
function isIOS13Safari() {
var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
var iosVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later:
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
if(iosVersion[0] == 13 && isSafari) {
return true;
}
}
}
function isOverIOS13Safari(){
var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
var iosVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later:
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
if(iosVersion[0] >= 13 && isSafari) {
return true;
}
}
}
function isIOS14(){
var iosVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later:
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
if(iosVersion[0] >= 14) {
return true;
}
}
}
function isIOS15Safari(){
var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
var iosVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later:
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
if(iosVersion[0] >= 15 && isSafari) {
return true;
}
}
}
function isIOSover18Safari() {
var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
var iosVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
let v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt((v[3] || '0'), 10)];
if (iosVersion[0] >= 18 && isSafari) {
return true;
}
}
}
function isAndroidChrome()
{
var ischrome = 0;
if (navigator.userAgent.toLowerCase().indexOf('chrome/') > -1)
{
ischrome = 1;
return true;
}
}
function isIOSChrome()
{
var is_ios_chrome = 0;
if (navigator.userAgent.toLowerCase().indexOf('crios/') > -1) // chrome for ios9
{
is_ios_chrome = 1;
return true;
}
}
function isFullScreen()
{
return (document.fullscreenElement || document.mozFullScreenElement ||
document.webkitFullscreenElement || document.msFullscreenElement);
}
function isSupportFullScreen()
{
var element = document.documentElement;
var requestMethod = element.requestFullscreen ||
element.webkitRequestFullscreen ||
element.mozRequestFullScreen ||
element.msRequestFullscreen;
if (requestMethod) {
return true;
}
return false;
}
/**
* detect IE
* returns version of IE or false, if browser is not Internet Explorer
*/
function detectIE() {
var ua = window.navigator.userAgent;
// Test values; Uncomment to check result …
// IE 10
// ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
// IE 11
// ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
// Edge 12 (Spartan)
// ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
// Edge 13
// ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');
if (trident > 0) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
}
var edge = ua.indexOf('Edge/');
if (edge > 0) {
// Edge (IE 12+) => return version number
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
}
// other browser
return false;
}
function detectFirefox() {
var f = navigator.userAgent.search("Firefox");
if (f > -1) {
return true;
}
return false;
}
//libs/commonlibs/apputil/apputil.min.js
var apputil = (function () {
function apputil() {
}
apputil.exitFullScreen = function(){
var element = document.getElementById("game");
if(element.exitFullscreen) {
element.exitFullscreen();
} else if(element.mozExitFullScreen) {
element.mozExitFullScreen();
} else if(element.webkitExitFullscreen) {
element.webkitExitFullscreen();
} else if(element.msExitFullscreen) {
element.msExitFullscreen();
} else if(document.cancelFullScreen) {
document.cancelFullScreen();
} else if(document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if(document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
};
apputil.isIOSSafari = function(){
var ua = window.navigator.userAgent;
// var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);
var iPhone = !!ua.match(/iPhone/i);
var webkit = !!ua.match(/WebKit/i);
var iPhoneSafari = iPhone && webkit && !ua.match(/CriOS/i);
return iPhoneSafari;
}
apputil.enterFullScreen = function(){
window.scrollTo(0,1);
var standalone = 1;
if (("standalone" in window.navigator) && !window.navigator.standalone)
{
standalone = 0;
}
var ischrome = 0;
if (navigator.userAgent.toLowerCase().indexOf('chrome/') > -1)
{
ischrome = 1;
}
var is_ios_chrome = 0;
if (navigator.userAgent.toLowerCase().indexOf('crios/') > -1) // chrome for ios9
{
is_ios_chrome = 1;
}
var element = document.getElementById ("game");
if (ischrome > 0)
{
if(element.requestFullscreen) {
element.requestFullscreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if(element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
};
return apputil;
})();
// function IPhone7Helper() {}
// IPhone7Helper.prototype.ResetScroll = function() {
// if (window.scrollY != 0)
// window.scrollTo(0, 0)
// }
// ;
// IPhone7Helper.prototype.ScrollHandler = function() {
// this.ResetScroll()
// }
// ;
// IPhone8Helper.prototype = Object.create(IPhone7Helper.prototype);
// IPhone8Helper.prototype.constructor = IPhone8Helper;
// function IPhone8Helper() {
// IPhone7Helper.call(this);
// this.root = null;
// this.canvas = null;
// this.isTouch = false;
// this.isTopPanel = false;
// this.isLandscape = false;
// this.resetScrollTimeout = null;
// this.clientHeight = 0;
// this.panelHiddenTime = -1;
// this.scaleRootMarginTop = -1
// }
// IPhone8Helper.prototype.GameStarted = function() {
// // var logoVisible = window["UHTLogoIsVisible"];
// // var loaderVisible = window["loaderIsVisible"] != undefined ? window["loaderIsVisible"] : true;
// // return !logoVisible && !loaderVisible
// var loaderVisible = window["loaderIsVisible"] != undefined ? window["loaderIsVisible"] : true;
// return !loaderVisible
// }
// ;
// IPhone8Helper.prototype.CreateElement = function(className, append) {
// var el = document.createElement("div");
// el.className = className;
// if (append)
// document.body.appendChild(el);
// return el
// }
// ;
// IPhone8Helper.prototype.InitElements = function() {
// var self = this;
// this.CreateElement("fullscreen-reserve", true);
// this.root = this.CreateElement("fullscreen-root-hidden", true);
// this.root.addEventListener("touchstart", function() {
// self.HandleTouchStart.apply(self, arguments)
// }, false);
// this.root.addEventListener("touchmove", function() {
// self.HandleTouchMove.apply(self, arguments)
// }, false);
// this.root.addEventListener("touchend", function() {
// self.HandleTouchEnd.apply(self, arguments)
// }, false);
// this.root.addEventListener("touchcancel", function() {
// self.HandleTouchEnd.apply(self, arguments)
// }, false);
// this.root.addEventListener("gesturestart", function() {
// self.PreventEvent.apply(self, arguments)
// }, false);
// this.root.addEventListener("gesturechange", function() {
// self.PreventEvent.apply(self, arguments)
// }, false);
// this.root.addEventListener("gestureend", function() {
// self.PreventEvent.apply(self, arguments)
// }, false);
// this.canvas = document.getElementsByTagName("canvas")[0]
// }
// ;
// IPhone8Helper.prototype.PreventEvent = function(e) {
// e.preventDefault()
// }
// ;
// IPhone8Helper.prototype.ResizeHandler = function(e) {
// var self = this;
// if (!this.GameStarted()) {
// setTimeout(function() {
// self.ResizeHandler()
// }, 100);
// return
// }
// if (this.root == null)
// this.InitElements();
// var wasLandscape = this.isLandscape;
// this.isLandscape = window.innerWidth > window.innerHeight;
// if (!this.isTouch)
// if (wasLandscape == this.isLandscape) {
// if (this.panelHiddenTime > 0)
// if (Date.now() - this.panelHiddenTime < 69) {
// setTimeout(function() {
// self.ResizeHandler(e)
// }, 500);
// return
// }
// } else
// this.ResetScroll();
// var screenHeight = this.isLandscape ? Math.min(screen.width, screen.height) : Math.max(screen.width, screen.height) - 60;
// this.clientHeight = this.GetClientHeight();
// var wasTopPanel = this.isTopPanel;
// this.isTopPanel = this.clientHeight < screenHeight;
// if (this.isTopPanel) {
// if (!wasTopPanel) {
// this.UpdateStyle(true);
// this.ResetScroll();
// this.UpdateScrollable(true);
// // UHTEventBroker.Trigger(UHTEventBroker.Type.Game, JSON.stringify({
// // common: "EVT_FULLSCREEN_OVERLAY_SHOWN",
// // args: null
// // }));
// this.panelHiddenTime = -1
// }
// } else {
// if (wasTopPanel) {
// this.UpdateStyle(false);
// // UHTEventBroker.Trigger(UHTEventBroker.Type.Game, JSON.stringify({
// // common: "EVT_FULLSCREEN_OVERLAY_HIDDEN",
// // args: null
// // }));
// this.panelHiddenTime = Date.now()
// }
// this.UpdateScrollable(false)
// }
// if (e !== undefined)
// setTimeout(function() {
// self.ResizeHandler()
// }, 500)
// }
// ;
// IPhone8Helper.prototype.UpdateStyle = function(visible) {
// var c = String(document.documentElement.className).replace("fullscreen-visible", "").split(" ");
// var cn = [];
// for (var i = 0; i < c.length; ++i)
// if (c[i] != "")
// cn.push(c[i]);
// if (visible)
// cn.push("fullscreen-visible");
// document.documentElement.className = cn.join(" ");
// this.root.className = visible ? "fullscreen-root-visible" : "fullscreen-root-hidden"
// }
// ;
// IPhone8Helper.prototype.UpdateScrollable = function(scrollable) {
// document.body.style.position = scrollable ? "static" : "fixed";
// this.canvas.style.position = scrollable ? "fixed" : "static"
// }
// ;
// IPhone8Helper.prototype.HandleTouchStart = function(event) {
// if (this.resetScrollTimeout != null) {
// clearTimeout(this.resetScrollTimeout);
// this.resetScrollTimeout = null
// }
// this.isTouch = true;
// this.UpdateScrollable(false)
// }
// ;
// IPhone8Helper.prototype.HandleTouchMove = function(event) {
// if (this.isTopPanel)
// this.ResizeHandler();
// if (this.isTopPanel && window.scrollY > 0)
// this.UpdateScrollable(true);
// else
// this.UpdateScrollable(false)
// }
// ;
// IPhone8Helper.prototype.HandleTouchEnd = function() {
// var self = this;
// this.isTouch = false;
// this.UpdateScrollable(false);
// this.resetScrollTimeout = setTimeout(function() {
// self.ResetScroll()
// }, 200)
// }
// ;
// IPhone8Helper.prototype.ScrollHandler = function() {
// if (this.clientHeight != this.GetClientHeight()) {
// var event = document.createEvent("HTMLEvents");
// event.initEvent("resize", true, true);
// window.dispatchEvent(event)
// }
// }
// ;
// IPhone8Helper.prototype.ResetScroll = function() {
// if (window.scrollY != 0)
// window.scrollTo(0, 0)
// }
// ;
// IPhone8Helper.prototype.GetClientHeight = function() {
// var height = window.innerHeight;
// if (!this.isTouch && this.resetScrollTimeout == null)
// if (window.scrollY > 0)
// height -= window.scrollY;
// return height
// }
// ;
// var FullScreenIPhoneHelper = {};
// FullScreenIPhoneHelper.Init = function() {
// // if (UHT_FRAME)
// // return;
// // var parser = new UAParser2;
// // var device = parser.getDevice();
// // var browser = parser.getBrowser();
// // if (!(device.model == "iPhone" && browser.name == "Mobile Safari"))
// // return;
// // var os = parser.getOS();
// // var version = _number.otoui(os.version);
// // if (version == 7) {
// // var h = new IPhone7Helper;
// // var onScroll = function() {
// // h.ScrollHandler.apply(h, arguments)
// // };
// // window.addEventListener("scroll", onScroll, false);
// // h.ScrollHandler()
// // } else
// {
// var h = new IPhone8Helper;
// var onScroll = function() {
// h.ScrollHandler.apply(h, arguments)
// };
// var onResize = function() {
// h.ResizeHandler.apply(h, arguments)
// };
// window.addEventListener("resize", onResize, false);
// window.addEventListener("scroll", onScroll, false);
// h.ResizeHandler();
// h.ScrollHandler();
// h.ResetScroll()
// }
// }
// ;
// (function() {
// var keyboardAllowed = typeof Element !== "undefined" && "ALLOW_KEYBOARD_INPUT"in Element;
// var fn = function() {
// var val;
// var valLength;
// var fnMap = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]];
// var i = 0;
// var l = fnMap.length;
// var ret = {};
// for (; i < l; i++) {
// val = fnMap[i];
// if (val && val[1]in document) {
// for (i = 0,
// valLength = val.length; i < valLength; i++)
// ret[fnMap[0][i]] = val[i];
// return ret
// }
// }
// return false
// }();
// var screenfull = {
// request: function(elem) {
// var request = fn.requestFullscreen;
// elem = elem || document.documentElement;
// if (/5\.1[\.\d]* Safari/.test(navigator.userAgent))
// elem[request]();
// else
// elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT)
// },
// exit: function() {
// document[fn.exitFullscreen]()
// },
// toggle: function(elem) {
// if (this.isFullscreen)
// this.exit();
// else
// this.request(elem)
// },
// raw: fn
// };
// if (!fn) {
// window.screenfull = false;
// return
// }
// Object.defineProperties(screenfull, {
// isFullscreen: {
// get: function() {
// return !!document[fn.fullscreenElement]
// }
// },
// element: {
// enumerable: true,
// get: function() {
// return document[fn.fullscreenElement]
// }
// },
// enabled: {
// enumerable: true,
// get: function() {
// return !!document[fn.fullscreenEnabled]
// }
// }
// });
// window.screenfull = screenfull
// }
// )();
// var FullScreenManager = {};
// FullScreenManager.overlay = null;
// FullScreenManager.reserve = null;
// FullScreenManager.RequestFullscreen = function() {
// if (!window.screenfull.isFullscreen)
// window.screenfull.request()
// }
// ;
// FullScreenManager.ExitFullscreen = function() {
// if (window.screenfull.isFullscreen)
// window.screenfull.exit()
// }
// ;
// FullScreenManager.IsFullscreen = function() {
// return window.screenfull.isFullscreen
// }
// ;
// FullScreenManager.Init = function() {
// // if (!UHT_DEVICE_TYPE.MOBILE)
// // return;
// var self = FullScreenManager;
// if (window.screenfull && window.screenfull.enabled)
// {
// window.addEventListener('load', function () {
// window.document.body.addEventListener('touchend', function(e){
// self.RequestFullscreen();
// }, false)
// });
// }
// // var inputMng = globalColliderInputManager;
// // if (inputMng == undefined) {
// // setTimeout(self.Init, 50);
// // return
// // }
// // if (window.screenfull && window.screenfull.enabled)
// // inputMng.addEventHandler(ColliderEvent.ButtonUp, new EventHandler(self,self.RequestFullscreen));
// FullScreenIPhoneHelper.Init()
// }
// ;
// FullScreenManager.OnLoad = function() {
// var self = FullScreenManager;
// self.Init();
// window.RequestFullscreen = self.RequestFullscreen;
// window.ExitFullscreen = self.ExitFullscreen;
// window.IsFullscreen = self.IsFullscreen
// }
// ;
// FullScreenManager.OnLoad();
// var NoSleep = {};
// NoSleep.os = null;
// NoSleep.uap = null;
// NoSleep.browserName = "";
// NoSleep.Android = function() {
// var srcWebM = document.createElement("source");
// srcWebM.src = "data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=";
// srcWebM.type = "video/webm";
// var srcMP4 = document.createElement("source");
// srcMP4.src = "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw==";
// srcMP4.type = "video/mp4";
// var video = document.createElement("video");
// video.setAttribute("loop", "");
// video.appendChild(srcWebM);
// video.appendChild(srcMP4);
// video.play();
// renderCanvas.removeEventListener("touchend", NoSleep.Android, false);
// NoSleep = null
// }
// ;
// NoSleep.IOS10 = function() {
// var video = document.createElement("video");
// video.setAttribute("playsinline", "");
// video.setAttribute("src", "data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=");
// video.addEventListener("timeupdate", function() {
// if (video.currentTime > .5)
// video.currentTime = Math.random()
// });
// video.play();
// document.removeEventListener("touchstart", NoSleep.IOS10, false);
// NoSleep = null
// }
// ;
// NoSleep.Init = function() {
// if (NoSleep.uap == null) {
// NoSleep.uap = new UAParser2;
// NoSleep.os = NoSleep.uap.getOS() || {
// name: "",
// version: "0"
// };
// NoSleep.browserName = NoSleep.uap.getBrowser().name
// }
// if (NoSleep.os.name == "Android" && NoSleep.uap.getBrowser().name == "Chrome") {
// if (renderCanvas == undefined) {
// setTimeout(NoSleep.Init, 100);
// return
// }
// renderCanvas.addEventListener("touchend", NoSleep.Android, false)
// } else if (NoSleep.os.name == "iOS" && ["Safari", "Chrome"].indexOf(NoSleep.browserName) != -1)
// if (parseFloat(NoSleep.os.version) >= 10)
// document.addEventListener("touchstart", NoSleep.IOS10, false)
// }
// ;
// NoSleep.Init();
//libs/commonlibs/webaudio/webaudio.min.js
var webaudio = (function () {
var audioCtx = null;
var soundclip = null;
var masterVolumn = 1;
var sources = [];
function webaudio() {
}
webaudio.isSupported = function ()
{
if('webkitAudioContext' in window || 'AudioContext' in window ) {
return true;
}
return false;
}
webaudio.stopAll = function ()
{
for (var i =0; i.998){var n=this._time;this.render(0,!0,!1),this._initted=!1,this.render(n,!0,!1)}else if(this._time>0){this._initted=!1,this._init();for(var a,o=1/(1-r),h=this._firstPT;h;)a=h.s+h.c,h.c*=o,h.s=a-h.c,h=h._next}return this},_.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var s,r,o,h,_,u,c,m,p=this._dirty?this.totalDuration():this._totalDuration,f=this._time,d=this._totalTime,g=this._cycle,v=this._duration,y=this._rawPrevTime;if(t>=p?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=v,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,r="onComplete"),0===v&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>y||y===n)&&y!==t&&(i=!0,y>n&&(r="onReverseComplete")),this._rawPrevTime=m=!e||t||y===t?t:n)):1e-7>t?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==d||0===v&&y>0&&y!==n)&&(r="onReverseComplete",s=this._reversed),0>t?(this._active=!1,0===v&&(this._initted||!this.vars.lazy||i)&&(y>=0&&(i=!0),this._rawPrevTime=m=!e||t||y===t?t:n)):this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(h=v+this._repeatDelay,this._cycle=this._totalTime/h>>0,0!==this._cycle&&this._cycle===this._totalTime/h&&this._cycle--,this._time=this._totalTime-this._cycle*h,this._yoyo&&0!==(1&this._cycle)&&(this._time=v-this._time),this._time>v?this._time=v:0>this._time&&(this._time=0)),this._easeType?(_=this._time/v,u=this._easeType,c=this._easePower,(1===u||3===u&&_>=.5)&&(_=1-_),3===u&&(_*=2),1===c?_*=_:2===c?_*=_*_:3===c?_*=_*_*_:4===c&&(_*=_*_*_*_),this.ratio=1===u?1-_:2===u?_:.5>this._time/v?_/2:1-_/2):this.ratio=this._ease.getRatio(this._time/v)),f===this._time&&!i&&g===this._cycle)return void(d!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l)));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=f,this._totalTime=d,this._rawPrevTime=y,this._cycle=g,a.lazyTweens.push(this),void(this._lazy=t);this._time&&!s?this.ratio=this._ease.getRatio(this._time/v):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==f&&t>=0&&(this._active=!0),0===d&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===v)&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||l))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._totalTime!==d||s)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l)),this._cycle!==g&&(e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||l)),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||l),0===v&&this._rawPrevTime===n&&m!==n&&(this._rawPrevTime=0))},r.to=function(t,e,i){return new r(t,e,i)},r.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(t,e,i)},r.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new r(t,e,s)},r.staggerTo=r.allTo=function(t,e,n,a,_,u,c){a=a||0;var m,p,f,d,g=n.delay||0,v=[],y=function(){n.onComplete&&n.onComplete.apply(n.onCompleteScope||this,arguments),_.apply(c||this,u||l)};for(h(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=s(t))),m=t.length,f=0;m>f;f++){p={};for(d in n)p[d]=n[d];p.delay=g,f===m-1&&_&&(p.onComplete=y),v[f]=new r(t[f],e,p),g+=a}return v},r.staggerFrom=r.allFrom=function(t,e,i,s,n,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,r.staggerTo(t,e,i,s,n,a,o)},r.staggerFromTo=r.allFromTo=function(t,e,i,s,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,r.staggerTo(t,e,s,n,a,o,h)},r.delayedCall=function(t,e,i,s,n){return new r(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:n,overwrite:0})},r.set=function(t,e){return new r(t,0,e)},r.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var u=function(t,e){for(var s=[],r=0,n=t._first;n;)n instanceof i?s[r++]=n:(e&&(s[r++]=n),s=s.concat(u(n,e)),r=s.length),n=n._next;return s},c=r.getAllTweens=function(e){return u(t._rootTimeline,e).concat(u(t._rootFramesTimeline,e))};r.killAll=function(t,i,s,r){null==i&&(i=!0),null==s&&(s=!0);var n,a,o,h=c(0!=r),_=h.length,l=i&&s&&r;for(o=0;_>o;o++)a=h[o],(l||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},r.killChildTweensOf=function(t,e){if(null!=t){var n,_,l,u,c,m=a.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=s(t)),h(t))for(u=t.length;--u>-1;)r.killChildTweensOf(t[u],e);else{n=[];for(l in m)for(_=m[l].target.parentNode;_;)_===t&&(n=n.concat(m[l].tweens)),_=_.parentNode;for(c=n.length,u=0;c>u;u++)e&&n[u].totalTime(n[u].totalDuration()),n[u]._enabled(!1,!1)}}};var m=function(t,i,s,r){i=i!==!1,s=s!==!1,r=r!==!1;for(var n,a,o=c(r),h=i&&s&&r,_=o.length;--_>-1;)a=o[_],(h||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&a.paused(t)};return r.pauseAll=function(t,e,i){m(!0,t,e,i)},r.resumeAll=function(t,e,i){m(!1,t,e,i)},r.globalTimeScale=function(e){var s=t._rootTimeline,r=i.ticker.time;return arguments.length?(e=e||n,s._startTime=r-(r-s._startTime)*s._timeScale/e,s=t._rootFramesTimeline,r=i.ticker.frame,s._startTime=r-(r-s._startTime)*s._timeScale/e,s._timeScale=t._rootTimeline._timeScale=e,e):s._timeScale},_.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},_.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},_.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},_.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},_.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},_.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},_.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},_.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},r},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,s,r=this.vars;for(s in r)i=r[s],o(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));o(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=n.isSelector,o=n.isArray,h=n.lazyTweens,_=n.lazyRender,l=[],u=_gsScope._gsDefine.globals,c=function(t){var e,i={};for(e in t)i[e]=t[e];return i},m=function(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||l)},p=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},f=s.prototype=new e;return s.version="1.13.1",f.constructor=s,f.kill()._gc=!1,f.to=function(t,e,s,r){var n=s.repeat&&u.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},f.from=function(t,e,s,r){return this.add((s.repeat&&u.TweenMax||i).from(t,e,s),r)},f.fromTo=function(t,e,s,r,n){var a=r.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},f.staggerTo=function(t,e,r,n,o,h,_,l){var u,m=new s({onComplete:h,onCompleteParams:_,onCompleteScope:l,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),a(t)&&(t=p(t)),n=n||0,u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),m.to(t[u],e,c(r),u*n);return this.add(m,o)},f.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},f.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},f.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},f.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},f.add=function(r,n,a,h){var _,l,u,c,m,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&o(r)){for(a=a||"normal",h=h||0,_=n,l=r.length,u=0;l>u;u++)o(c=r[u])&&(c=new s({tweens:c})),this.add(c,_),"string"!=typeof c&&"function"!=typeof c&&("sequence"===a?_=c._startTime+c.totalDuration()/c._timeScale:"start"===a&&(c._startTime-=c.delay())),_+=h;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;m._timeline;)p&&m._timeline.smoothChildTiming?m.totalTime(m._totalTime,!0):m._gc&&m._enabled(!0,!1),m=m._timeline;return this},f.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&o(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},f._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},f.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},f.insert=f.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},f.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},f.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},f.addPause=function(t,e,i,s){return this.call(m,["{self}",e,i,s],this,t)},f.removeLabel=function(t){return delete this._labels[t],this},f.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},f._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&o(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},f.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},f.stop=function(){return this.paused(!0)},f.gotoAndPlay=function(t,e){return this.play(t,e)},f.gotoAndStop=function(t,e){return this.pause(t,e)},f.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,u,c=this._dirty?this.totalDuration():this._totalDuration,m=this._time,p=this._startTime,f=this._timeScale,d=this._paused;if(t>=c?(this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(u=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=c+1e-4):1e-7>t?(this._totalTime=this._time=0,(0!==m||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t?(this._active=!1,this._rawPrevTime>=0&&this._first&&(u=!0),this._rawPrevTime=t):(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=0,this._initted||(u=!0))):this._totalTime=this._time=this._rawPrevTime=t,this._time!==m&&this._first||i||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==m&&t>0&&(this._active=!0),0===m&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||l)),this._time>=m)for(s=this._first;s&&(a=s._next,!this._paused||d);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||d);)(s._active||m>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||(h.length&&_(),this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l))),o&&(this._gc||(p===this._startTime||f!==this._timeScale)&&(0===this._time||c>=this.totalDuration())&&(n&&(h.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||l)))}},f._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},f.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},f.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},f._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},f.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},f._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},f.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},f.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},f._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},f.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},f.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},f.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},f.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var s=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},r=1e-10,n=[],a=e._internals,o=a.lazyTweens,h=a.lazyRender,_=new i(null,null,1,0),l=s.prototype=new t;return l.constructor=s,l.kill()._gc=!1,s.version="1.13.1",l.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},l.addCallback=function(t,i,s,r){return this.add(e.delayedCall(0,t,s,r),i)},l.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),s=i.length,r=this._parseTimeOrLabel(e);--s>-1;)i[s]._startTime===r&&i[s]._enabled(!1,!1);return this},l.tweenTo=function(t,i){i=i||{};var s,r,a,o={ease:_,overwrite:i.delay?2:1,useFrames:this.usesFrames(),immediateRender:!1};for(r in i)o[r]=i[r];return o.time=this._parseTimeOrLabel(t),s=Math.abs(Number(o.time)-this._time)/this._timeScale||.001,a=new e(this,s,o),o.onStart=function(){a.target.paused(!0),a.vars.time!==a.target.time()&&s===a.duration()&&a.duration(Math.abs(a.vars.time-a.target.time())/a.target._timeScale),i.onStart&&i.onStart.apply(i.onStartScope||a,i.onStartParams||n)},a},l.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],onCompleteScope:this},i.immediateRender=i.immediateRender!==!1;var s=this.tweenTo(e,i);return s.duration(Math.abs(s.vars.time-t)/this._timeScale||.001)},l.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,a,_,l,u,c,m=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,f=this._time,d=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,T=this._paused,w=this._cycle;if(t>=m?(this._locked||(this._totalTime=m,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(a=!0,l="onComplete",0===this._duration&&(0===t||0>y||y===r)&&y!==t&&this._first&&(u=!0,y>r&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,this._yoyo&&0!==(1&this._cycle)?this._time=t=0:(this._time=p,t=p+1e-4)):1e-7>t?(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==f||0===p&&y!==r&&(y>0||0>t&&y>=0)&&!this._locked)&&(l="onReverseComplete",a=this._reversed),0>t?(this._active=!1,y>=0&&this._first&&(u=!0),this._rawPrevTime=t):(this._rawPrevTime=p||!e||t||this._rawPrevTime===t?t:r,t=0,this._initted||(u=!0))):(0===p&&0>y&&(u=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(c=p+this._repeatDelay,this._cycle=this._totalTime/c>>0,0!==this._cycle&&this._cycle===this._totalTime/c&&this._cycle--,this._time=this._totalTime-this._cycle*c,this._yoyo&&0!==(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,t=p+1e-4):0>this._time?this._time=t=0:t=this._time))),this._cycle!==w&&!this._locked){var b=this._yoyo&&0!==(1&w),P=b===(this._yoyo&&0!==(1&this._cycle)),S=this._totalTime,R=this._cycle,C=this._rawPrevTime,k=this._time;if(this._totalTime=w*p,w>this._cycle?b=!b:this._totalTime+=p,this._time=f,this._rawPrevTime=0===p?y-1e-4:y,this._cycle=w,this._locked=!0,f=b?0:p,this.render(f,e,0===p),e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||n),P&&(f=b?p+1e-4:-1e-4,this.render(f,!0,!1)),this._locked=!1,this._paused&&!T)return;this._time=k,this._totalTime=S,this._cycle=R,this._rawPrevTime=C}if(!(this._time!==f&&this._first||i||u))return void(d!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n)));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==d&&t>0&&(this._active=!0),0===d&&this.vars.onStart&&0!==this._totalTime&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||n)),this._time>=f)for(s=this._first;s&&(_=s._next,!this._paused||T);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=_;else for(s=this._last;s&&(_=s._prev,!this._paused||T);)(s._active||f>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=_;this._onUpdate&&(e||(o.length&&h(),this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n))),l&&(this._locked||this._gc||(g===this._startTime||v!==this._timeScale)&&(0===this._time||m>=this.totalDuration())&&(a&&(o.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this.vars[l].apply(this.vars[l+"Scope"]||this,this.vars[l+"Params"]||n)))},l.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var s,r,n=[],a=this.getChildren(t,e,i),o=0,h=a.length;for(s=0;h>s;s++)r=a[s],r.isActive()&&(n[o++]=r);return n},l.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),s=i.length;for(e=0;s>e;e++)if(i[e].time>t)return i[e].name;return null},l.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(t>e[i].time)return e[i].name;return null},l.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},l.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},l.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},l.totalDuration=function(e){return arguments.length?-1===this._repeat?this:this.duration((e-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},l.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},l.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},l.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},l.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},l.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},s},!0),function(){var t=180/Math.PI,e=[],i=[],s=[],r={},n=function(t,e,i,s){this.a=t,this.b=e,this.c=i,this.d=s,this.da=s-t,this.ca=i-t,this.ba=e-t},a=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",o=function(t,e,i,s){var r={a:t},n={},a={},o={c:s},h=(t+e)/2,_=(e+i)/2,l=(i+s)/2,u=(h+_)/2,c=(_+l)/2,m=(c-u)/8;return r.b=h+(t-h)/4,n.b=u+m,r.c=n.a=(r.b+n.b)/2,n.c=a.a=(u+c)/2,a.b=c-m,o.b=l+(s-l)/4,a.c=o.a=(a.b+o.b)/2,[r,n,a,o]},h=function(t,r,n,a,h){var _,l,u,c,m,p,f,d,g,v,y,T,w,b=t.length-1,P=0,S=t[0].a;for(_=0;b>_;_++)m=t[P],l=m.a,u=m.d,c=t[P+1].d,h?(y=e[_],T=i[_],w=.25*(T+y)*r/(a?.5:s[_]||.5),p=u-(u-l)*(a?.5*r:0!==y?w/y:0),f=u+(c-u)*(a?.5*r:0!==T?w/T:0),d=u-(p+((f-p)*(3*y/(y+T)+.5)/4||0))):(p=u-.5*(u-l)*r,f=u+.5*(c-u)*r,d=u-(p+f)/2),p+=d,f+=d,m.c=g=p,m.b=0!==_?S:S=m.a+.6*(m.c-m.a),m.da=u-l,m.ca=g-l,m.ba=S-l,n?(v=o(l,S,g,u),t.splice(P,1,v[0],v[1],v[2],v[3]),P+=4):P++,S=f;m=t[P],m.b=S,m.c=S+.4*(m.d-S),m.da=m.d-m.a,m.ca=m.c-m.a,m.ba=S-m.a,n&&(v=o(m.a,S,m.c,m.d),t.splice(P,1,v[0],v[1],v[2],v[3]))},_=function(t,s,r,a){var o,h,_,l,u,c,m=[];if(a)for(t=[a].concat(t),h=t.length;--h>-1;)"string"==typeof(c=t[h][s])&&"="===c.charAt(1)&&(t[h][s]=a[s]+Number(c.charAt(0)+c.substr(2)));if(o=t.length-2,0>o)return m[0]=new n(t[0][s],0,0,t[-1>o?0:1][s]),m;for(h=0;o>h;h++)_=t[h][s],l=t[h+1][s],m[h]=new n(_,0,0,l),r&&(u=t[h+2][s],e[h]=(e[h]||0)+(l-_)*(l-_),i[h]=(i[h]||0)+(u-l)*(u-l));return m[h]=new n(t[h][s],0,0,t[h+1][s]),m},l=function(t,n,o,l,u,c){var m,p,f,d,g,v,y,T,w={},b=[],P=c||t[0];u="string"==typeof u?","+u+",":a,null==n&&(n=1);for(p in t[0])b.push(p);if(t.length>1){for(T=t[t.length-1],y=!0,m=b.length;--m>-1;)if(p=b[m],Math.abs(P[p]-T[p])>.05){y=!1;break}y&&(t=t.concat(),c&&t.unshift(c),t.push(t[1]),c=t[t.length-3])}for(e.length=i.length=s.length=0,m=b.length;--m>-1;)p=b[m],r[p]=-1!==u.indexOf(","+p+","),w[p]=_(t,p,r[p],c);for(m=e.length;--m>-1;)e[m]=Math.sqrt(e[m]),i[m]=Math.sqrt(i[m]);if(!l){for(m=b.length;--m>-1;)if(r[p])for(f=w[b[m]],v=f.length-1,d=0;v>d;d++)g=f[d+1].da/i[d]+f[d].da/e[d],s[d]=(s[d]||0)+g*g;for(m=s.length;--m>-1;)s[m]=Math.sqrt(s[m])}for(m=b.length,d=o?4:1;--m>-1;)p=b[m],f=w[p],h(f,n,o,l,r[p]),y&&(f.splice(0,d),f.splice(f.length-d,d));return w},u=function(t,e,i){e=e||"soft";var s,r,a,o,h,_,l,u,c,m,p,f={},d="cubic"===e?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||d+1>t.length)throw"invalid Bezier data";for(c in t[0])v.push(c);for(_=v.length;--_>-1;){for(c=v[_],f[c]=h=[],m=0,u=t.length,l=0;u>l;l++)s=null==i?t[l][c]:"string"==typeof(p=t[l][c])&&"="===p.charAt(1)?i[c]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&l>1&&u-1>l&&(h[m++]=(s+h[m-2])/2),h[m++]=s;for(u=m-d+1,m=0,l=0;u>l;l+=d)s=h[l],r=h[l+1],a=h[l+2],o=2===d?0:h[l+3],h[m++]=p=3===d?new n(s,r,a,o):new n(s,(2*r+s)/3,(2*r+a)/3,a);h.length=m}return f},c=function(t,e,i){for(var s,r,n,a,o,h,_,l,u,c,m,p=1/i,f=t.length;--f>-1;)for(c=t[f],n=c.a,a=c.d-n,o=c.c-n,h=c.b-n,s=r=0,l=1;i>=l;l++)_=p*l,u=1-_,s=r-(r=(_*_*a+3*u*(_*o+u*h))*_),m=f*i+l-1,e[m]=(e[m]||0)+s*s},m=function(t,e){e=e>>0||6;var i,s,r,n,a=[],o=[],h=0,_=0,l=e-1,u=[],m=[];for(i in t)c(t[i],a,e);for(r=a.length,s=0;r>s;s++)h+=Math.sqrt(a[s]),n=s%e,m[n]=h,n===l&&(_+=h,n=s/e>>0,u[n]=m,o[n]=_,h=0,m=[]);return{length:_,lengths:o,segments:u}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.3",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._round={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var s,r,n,a,o,h=e.values||[],_={},c=h[0],p=e.autoRotate||i.vars.orientToBezier;this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",p===!0?0:Number(p)||0]]:null;for(s in c)this._props.push(s);for(n=this._props.length;--n>-1;)s=this._props[n],this._overwriteProps.push(s),r=this._func[s]="function"==typeof t[s],_[s]=r?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]():parseFloat(t[s]),o||_[s]!==h[0][s]&&(o=_);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?l(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):u(h,e.type,_),this._segCount=this._beziers[s].length,this._timeRes){var f=m(this._beziers,this._timeRes);this._length=f.length,this._lengths=f.lengths,this._segments=f.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;--n>-1;){for(a=0;3>a;a++)s=p[n][a],this._func[s]="function"==typeof t[s]?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]:!1;s=p[n][2],this._initialRotations[n]=this._func[s]?this._func[s].call(this._target):this._target[s]}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,s,r,n,a,o,h,_,l,u,c=this._segCount,m=this._func,p=this._target,f=e!==this._startRatio;if(this._timeRes){if(l=this._lengths,u=this._curSeg,e*=this._length,r=this._li,e>this._l2&&c-1>r){for(_=c-1;_>r&&e>=(this._l2=l[++r]););this._l1=l[r-1],this._li=r,this._curSeg=u=this._segments[r],this._s2=u[this._s1=this._si=0]}else if(this._l1>e&&r>0){for(;r>0&&(this._l1=l[--r])>=e;);0===r&&this._l1>e?this._l1=0:r++,this._l2=l[r],this._li=r,this._curSeg=u=this._segments[r],this._s1=u[(this._si=u.length-1)-1]||0,this._s2=u[this._si]}if(i=r,e-=this._l1,r=this._si,e>this._s2&&u.length-1>r){for(_=u.length-1;_>r&&e>=(this._s2=u[++r]););this._s1=u[r-1],this._si=r}else if(this._s1>e&&r>0){for(;r>0&&(this._s1=u[--r])>=e;);0===r&&this._s1>e?this._s1=0:r++,this._s2=u[r],this._si=r}o=(r+(e-this._s1)/(this._s2-this._s1))*this._prec}else i=0>e?0:e>=1?c-1:c*e>>0,o=(e-i*(1/c))*c;for(s=1-o,r=this._props.length;--r>-1;)n=this._props[r],a=this._beziers[n][i],h=(o*o*a.da+3*s*(o*a.ca+s*a.ba))*o+a.a,this._round[n]&&(h=Math.round(h)),m[n]?p[n](h):p[n]=h;
if(this._autoRotate){var d,g,v,y,T,w,b,P=this._autoRotate;for(r=P.length;--r>-1;)n=P[r][2],w=P[r][3]||0,b=P[r][4]===!0?1:t,a=this._beziers[P[r][0]],d=this._beziers[P[r][1]],a&&d&&(a=a[i],d=d[i],g=a.a+(a.b-a.a)*o,y=a.b+(a.c-a.b)*o,g+=(y-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=d.a+(d.b-d.a)*o,T=d.b+(d.c-d.b)*o,v+=(T-v)*o,T+=(d.c+(d.d-d.c)*o-T)*o,h=f?Math.atan2(T-v,y-g)*b+w:this._initialRotations[r],m[n]?p[n](h):p[n]=h)}}}),f=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=o,p._autoCSS=!0,p.quadraticToCubic=function(t,e,i){return new n(t,(2*e+t)/3,(2*e+i)/3,i)},p._cssRegister=function(){var t=_gsScope._gsDefine.globals.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,s=e._setPluginRatio,r=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,n,a,o,h){e instanceof Array&&(e={values:e}),h=new p;var _,l,u,c=e.values,m=c.length-1,f=[],d={};if(0>m)return o;for(_=0;m>=_;_++)u=i(t,c[_],a,o,h,m!==_),f[_]=u.end;for(l in e)d[l]=e[l];return d.values=f,o=new r(t,"bezier",0,0,u.pt,2),o.data=u,o.plugin=h,o.setRatio=s,0===d.autoRotate&&(d.autoRotate=!0),!d.autoRotate||d.autoRotate instanceof Array||(_=d.autoRotate===!0?0:Number(d.autoRotate),d.autoRotate=null!=u.end.left?[["left","top","rotation",_,!1]]:null!=u.end.x?[["x","y","rotation",_,!1]]:!1),d.autoRotate&&(a._transform||a._enableTransforms(!1),u.autoRotate=a._target._gsTransform),h._onInitTween(u.proxy,d,a._tween),o}})}},f._roundProps=function(t,e){for(var i=this._overwriteProps,s=i.length;--s>-1;)(t[i[s]]||t.bezier||t.bezierThrough)&&(this._round[i[s]]=e)},f._kill=function(t){var e,i,s=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=s.length;--i>-1;)s[i]===e&&s.splice(i,1);return this._super._kill.call(this,t)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=t.prototype;e._onInitAllProps=function(){for(var t,e,i,s=this._tween,r=s.vars.roundProps instanceof Array?s.vars.roundProps:s.vars.roundProps.split(","),n=r.length,a={},o=s._propLookup.roundProps;--n>-1;)a[r[n]]=1;for(n=r.length;--n>-1;)for(t=r[n],e=s._firstPT;e;)i=e._next,e.pg?e.t._roundProps(a,!0):e.n===t&&(this._add(e.t,t,e.s,e.c),i&&(i._prev=e._prev),e._prev?e._prev._next=i:s._firstPT===e&&(s._firstPT=i),e._next=e._prev=null,s._propLookup[t]=o),e=i;return!1},e._add=function(t,e,i,s){this._addTween(t,e,i,i+s,e,!0),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.3.3",init:function(t,e){var i,s,r;if("function"!=typeof t.setAttribute)return!1;this._target=t,this._proxy={},this._start={},this._end={};for(i in e)this._start[i]=this._proxy[i]=s=t.getAttribute(i),r=this._addTween(this._proxy,i,parseFloat(s),e[i],i),this._end[i]=r?r.s+r.c:e[i],this._overwriteProps.push(i);return!0},set:function(t){this._super.setRatio.call(this,t);for(var e,i=this._overwriteProps,s=i.length,r=1===t?this._end:t?this._proxy:this._start;--s>-1;)e=i[s],this._target.setAttribute(e,r[e]+"")}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.2.1",API:2,init:function(t,e){"object"!=typeof e&&(e={rotation:e}),this.finals={};var i,s,r,n,a,o,h=e.useRadians===!0?2*Math.PI:360,_=1e-6;for(i in e)"useRadians"!==i&&(o=(e[i]+"").split("_"),s=o[0],r=parseFloat("function"!=typeof t[i]?t[i]:t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]()),n=this.finals[i]="string"==typeof s&&"="===s.charAt(1)?r+parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)):Number(s)||0,a=n-r,o.length&&(s=o.join("_"),-1!==s.indexOf("short")&&(a%=h,a!==a%(h/2)&&(a=0>a?a+h:a-h)),-1!==s.indexOf("_cw")&&0>a?a=(a+9999999999*h)%h-(0|a/h)*h:-1!==s.indexOf("ccw")&&a>0&&(a=(a-9999999999*h)%h-(0|a/h)*h)),(a>_||-_>a)&&(this._addTween(t,i,r,r+a,i),this._overwriteProps.push(i)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,_=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},l=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return l(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},m=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},p=u("Back",m("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),m("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),m("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),f=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=f.prototype=new t;return d.constructor=f,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},f.ease=new f(.7,.7),d.config=f.config=function(t,e,i){return new f(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",_=[],l=0,u=0|(e.points||20),m=u,p=e.randomize!==!1,f=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--m>-1;)i=p?Math.random():1/u*m,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),p?s+=Math.random()*r-.5*r:m%2?s+=.5*r:s-=.5*r,f&&(s>1?s=1:0>s&&(s=0)),_[l++]={x:i,y:s};for(_.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),m=u;--m>-1;)a=_[m],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",_("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),_("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),_("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",_("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),_("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),_("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)+1},.45)),u("Expo",_("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),_("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),_("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",_("SineOut",function(t){return Math.sin(t*o)}),_("SineIn",function(t){return-Math.cos(t*o)+1}),_("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),l(r.SlowMo,"SlowMo","ease,"),l(i,"RoughEase","ease,"),l(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!i.TweenLite){var s,r,n,a,o,h=function(t){var e,s=t.split("."),r=i;for(e=0;s.length>e;e++)r[s[e]]=r=r[s[e]]||{};return r},_=h("com.greensock"),l=1e-10,u=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},c=function(){},m=function(){var t=Object.prototype.toString,e=t.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&t.call(i)===e)}}(),p={},f=function(s,r,n,a){this.sc=p[s]?p[s].sc:[],p[s]=this,this.gsClass=null,this.func=n;var o=[];this.check=function(_){for(var l,u,c,m,d=r.length,g=d;--d>-1;)(l=p[r[d]]||new f(r[d],[])).gsClass?(o[d]=l.gsClass,g--):_&&l.sc.push(this);if(0===g&&n)for(u=("com.greensock."+s).split("."),c=u.pop(),m=h(u.join("."))[c]=this.gsClass=n.apply(n,o),a&&(i[c]=m,"function"==typeof define&&define.amd?define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+s.split(".").pop(),[],function(){return m}):s===e&&"undefined"!=typeof module&&module.exports&&(module.exports=m)),d=0;this.sc.length>d;d++)this.sc[d].check()},this.check(!0)},d=t._gsDefine=function(t,e,i,s){return new f(t,e,i,s)},g=_._class=function(t,e,i){return e=e||function(){},d(t,[],function(){return e},i),e};d.globals=i;var v=[0,0,1,1],y=[],T=g("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?v.concat(e):v},!0),w=T.map={},b=T.register=function(t,e,i,s){for(var r,n,a,o,h=e.split(","),l=h.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--l>-1;)for(n=h[l],r=s?g("easing."+n,null,!0):_.easing[n]||{},a=u.length;--a>-1;)o=u[a],w[n+"."+o]=w[o+n]=r[o]=t.getRatio?t:t[o]||new t};for(n=T.prototype,n._calcEnd=!1,n.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:.5>t?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:.5>t?s/2:1-s/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],r=s.length;--r>-1;)n=s[r]+",Power"+r,b(new T(null,null,1,r),n,"easeOut",!0),b(new T(null,null,2,r),n,"easeIn"+(0===r?",easeNone":"")),b(new T(null,null,3,r),n,"easeInOut");w.linear=_.easing.Linear.easeIn,w.swing=_.easing.Quad.easeInOut;var P=g("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});n=P.prototype,n.addEventListener=function(t,e,i,s,r){r=r||0;var n,h,_=this._listeners[t],l=0;for(null==_&&(this._listeners[t]=_=[]),h=_.length;--h>-1;)n=_[h],n.c===e&&n.s===i?_.splice(h,1):0===l&&r>n.pr&&(l=h+1);_.splice(l,0,{c:e,s:i,up:s,pr:r}),this!==a||o||a.wake()},n.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;--i>-1;)if(s[i].c===e)return void s.splice(i,1)},n.dispatchEvent=function(t){var e,i,s,r=this._listeners[t];if(r)for(e=r.length,i=this._eventTarget;--e>-1;)s=r[e],s.up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};var S=t.requestAnimationFrame,R=t.cancelAnimationFrame,C=Date.now||function(){return(new Date).getTime()},k=C();for(s=["ms","moz","webkit","o"],r=s.length;--r>-1&&!S;)S=t[s[r]+"RequestAnimationFrame"],R=t[s[r]+"CancelAnimationFrame"]||t[s[r]+"CancelRequestAnimationFrame"];g("Ticker",function(t,e){var i,s,r,n,h,_=this,u=C(),m=e!==!1&&S,p=500,f=33,d=function(t){var e,a,o=C()-k;o>p&&(u+=o-f),k+=o,_.time=(k-u)/1e3,e=_.time-h,(!i||e>0||t===!0)&&(_.frame++,h+=e+(e>=n?.004:n-e),a=!0),t!==!0&&(r=s(d)),a&&_.dispatchEvent("tick")};P.call(_),_.time=_.frame=0,_.tick=function(){d(!0)},_.lagSmoothing=function(t,e){p=t||1/l,f=Math.min(e,p,0)},_.sleep=function(){null!=r&&(m&&R?R(r):tweenClearTimeout(r),s=c,r=null,_===a&&(o=!1))},_.wake=function(){null!==r?_.sleep():_.frame>10&&(k=C()-p+5),s=0===i?c:m&&S?S:function(t){return tweenSetTimeOut(t,0|1e3*(h-_.time)+1)},_===a&&(o=!0),d(2)},_.fps=function(t){return arguments.length?(i=t,n=1/(i||60),h=this.time+n,void _.wake()):i},_.useRAF=function(t){return arguments.length?(_.sleep(),m=t,void _.fps(i)):m},_.fps(t),tweenSetTimeOut(function(){m&&(!r||5>_.frame)&&_.useRAF(!1)},1500)}),n=_.Ticker.prototype=new _.events.EventDispatcher,n.constructor=_.Ticker;var A=g("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=e.immediateRender===!0,this.data=e.data,this._reversed=e.reversed===!0,G){o||a.wake();var i=this.vars.useFrames?j:G;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});a=A.ticker=new _.Ticker,n=A.prototype,n._dirty=n._gc=n._initted=n._paused=!1,n._totalTime=n._time=0,n._rawPrevTime=-1,n._next=n._last=n._onUpdate=n._timeline=n.timeline=null,n._paused=!1;var D=function(){o&&C()-k>2e3&&a.wake(),tweenSetTimeOut(D,2e3)};D(),n.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},n.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},n.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},n.seek=function(t,e){return this.totalTime(Number(t),e!==!1)},n.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,e!==!1,!0)},n.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},n.render=function(){},n.invalidate=function(){return this},n.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime())>=i&&i+this.totalDuration()/this._timeScale>t},n._enabled=function(t,e){return o||a.wake(),this._gc=!t,this._active=this.isActive(),e!==!0&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},n._kill=function(){return this._enabled(!1,!1)},n.kill=function(t,e){return this._kill(t,e),this},n._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},n._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},n.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=m(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},n.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},n.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:t,e)):this._time},n.totalTime=function(t,e,i){if(o||a.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>t&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,r=this._timeline;if(t>s&&!i&&(t=s),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?s-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==t||0===this._duration)&&(this.render(t,e,!1),E.length&&Q())}return this},n.progress=n.totalProgress=function(t,e){return arguments.length?this.totalTime(this.duration()*t,e):this._time/this.duration()},n.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},n.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||l,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},n.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},n.paused=function(t){if(!arguments.length)return this._paused;if(t!=this._paused&&this._timeline){o||t||a.wake();var e=this._timeline,i=e.rawTime(),s=i-this._pauseTime;!t&&e.smoothChildTiming&&(this._startTime+=s,this._uncache(!1)),this._pauseTime=t?i:null,this._paused=t,this._active=this.isActive(),!t&&0!==s&&this._initted&&this.duration()&&this.render(e.smoothChildTiming?this._totalTime:(i-this._startTime)/this._timeScale,!0,!0)}return this._gc&&!t&&this._enabled(!0,!1),this};var x=g("core.SimpleTimeline",function(t){A.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});n=x.prototype=new A,n.constructor=x,n.kill()._gc=!1,n._first=n._last=null,n._sortChildren=!1,n.add=n.insert=function(t,e){var i,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),i=this._last,this._sortChildren)for(s=t._startTime;i&&i._startTime>s;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},n._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,this._timeline&&this._uncache(!0)),this},n.render=function(t,e,i){var s,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)s=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=s},n.rawTime=function(){return o||a.wake(),this._totalTime};var O=g("TweenLite",function(e,i,s){if(A.call(this,i,s),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:O.selector(e)||e;var r,n,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),h=this.vars.overwrite;if(this._overwrite=h=null==h?q[O.defaultOverwrite]:"number"==typeof h?h>>0:q[h],(o||e instanceof Array||e.push&&m(e))&&"number"!=typeof e[0])for(this._targets=a=u(e),this._propLookup=[],this._siblings=[],r=0;a.length>r;r++)n=a[r],n?"string"!=typeof n?n.length&&n!==t&&n[0]&&(n[0]===t||n[0].nodeType&&n[0].style&&!n.nodeType)?(a.splice(r--,1),this._targets=a=a.concat(u(n))):(this._siblings[r]=$(n,this,!1),1===h&&this._siblings[r].length>1&&K(n,this,null,1,this._siblings[r])):(n=a[r--]=O.selector(n),"string"==typeof n&&a.splice(r+1,1)):a.splice(r--,1);else this._propLookup={},this._siblings=$(e,this,!1),1===h&&this._siblings.length>1&&K(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-l,this.render(-this._delay))},!0),I=function(e){return e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)},z=function(t,e){var i,s={};for(i in t)B[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!U[i]||U[i]&&U[i]._autoCSS)||(s[i]=t[i],delete t[i]);t.css=s};n=O.prototype=new A,n.constructor=O,n.kill()._gc=!1,n.ratio=0,n._firstPT=n._targets=n._overwrittenProps=n._startAt=null,n._notifyPluginsOfEnabled=n._lazy=!1,O.version="1.13.1",O.defaultEase=n._ease=new T(null,null,1,1),O.defaultOverwrite="auto",O.ticker=a,O.autoSleep=!0,O.lagSmoothing=function(t,e){a.lagSmoothing(t,e)},O.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(O.selector=i,i(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var E=[],M={},L=O._internals={isArray:m,isSelector:I,lazyTweens:E},U=O._plugins={},N=L.tweenLookup={},F=0,B=L.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1},q={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},j=A._rootFramesTimeline=new x,G=A._rootTimeline=new x,Q=L.lazyRender=function(){var t=E.length;for(M={};--t>-1;)s=E[t],s&&s._lazy!==!1&&(s.render(s._lazy,!1,!0),s._lazy=!1);E.length=0};G._startTime=a.time,j._startTime=a.frame,G._active=j._active=!0,tweenSetTimeOut(Q,1),A._updateRoot=O.render=function(){var t,e,i;if(E.length&&Q(),G.render((a.time-G._startTime)*G._timeScale,!1,!1),j.render((a.frame-j._startTime)*j._timeScale,!1,!1),E.length&&Q(),!(a.frame%120)){for(i in N){for(e=N[i].tweens,t=e.length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete N[i]}if(i=G._first,(!i||i._paused)&&O.autoSleep&&!j._first&&1===a._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||a.sleep()}}},a.addEventListener("tick",A._updateRoot);var $=function(t,e,i){var s,r,n=t._gsTweenID;if(N[n||(t._gsTweenID=n="t"+F++)]||(N[n]={target:t,tweens:[]}),e&&(s=N[n].tweens,s[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return N[n].tweens},K=function(t,e,i,s,r){var n,a,o,h;if(1===s||s>=4){for(h=r.length,n=0;h>n;n++)if((o=r[n])!==e)o._gc||o._enabled(!1,!1)&&(a=!0);else if(5===s)break;return a}var _,u=e._startTime+l,c=[],m=0,p=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(_=_||H(e,0,p),0===H(o,_,p)&&(c[m++]=o)):u>=o._startTime&&o._startTime+o.totalDuration()/o._timeScale>u&&((p||!o._initted)&&2e-10>=u-o._startTime||(c[m++]=o)));for(n=m;--n>-1;)o=c[n],2===s&&o._kill(i,t)&&(a=!0),(2!==s||!o._firstPT&&o._initted)&&o._enabled(!1,!1)&&(a=!0);return a},H=function(t,e,i){for(var s=t._timeline,r=s._timeScale,n=t._startTime;s._timeline;){if(n+=s._startTime,r*=s._timeScale,s._paused)return-100;s=s._timeline}return n/=r,n>e?n-e:i&&n===e||!t._initted&&2*l>n-e?l:(n+=t.totalDuration()/t._timeScale/r)>e+l?0:n-e-l};n._init=function(){var t,e,i,s,r,n=this.vars,a=this._overwrittenProps,o=this._duration,h=!!n.immediateRender,_=n.ease;if(n.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(s in n.startAt)r[s]=n.startAt[s];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=h&&n.lazy!==!1,r.startAt=r.delay=null,this._startAt=O.to(this.target,0,r),h)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(n.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{i={};for(s in n)B[s]&&"autoCSS"!==s||(i[s]=n[s]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&n.lazy!==!1,i.immediateRender=h,this._startAt=O.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1)}if(this._ease=_=_?_ instanceof T?_:"function"==typeof _?new T(_,n.easeParams):w[_]||O.defaultEase:O.defaultEase,n.easeParams instanceof Array&&_.config&&(this._ease=_.config.apply(_,n.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(t=this._targets.length;--t>-1;)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],a?a[t]:null)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,a);if(e&&O._onPluginEvent("_onInitAllProps",this),a&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),n.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=n.onUpdate,this._initted=!0},n._initProps=function(e,i,s,r){var n,a,o,h,_,l;if(null==e)return!1;M[e._gsTweenID]&&Q(),this.vars.css||e.style&&e!==t&&e.nodeType&&U.css&&this.vars.autoCSS!==!1&&z(this.vars,e);for(n in this.vars){if(l=this.vars[n],B[n])l&&(l instanceof Array||l.push&&m(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[n]=l=this._swapSelfInParams(l,this));else if(U[n]&&(h=new U[n])._onInitTween(e,this.vars[n],this)){for(this._firstPT=_={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:!0,n:n,pg:!0,pr:h._priority},a=h._overwriteProps.length;--a>-1;)i[h._overwriteProps[a]]=this._firstPT;(h._priority||h._onInitAllProps)&&(o=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=i[n]=_={_next:this._firstPT,t:e,p:n,f:"function"==typeof e[n],n:n,pg:!1,pr:0},_.s=_.f?e[n.indexOf("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)]():parseFloat(e[n]),_.c="string"==typeof l&&"="===l.charAt(1)?parseInt(l.charAt(0)+"1",10)*Number(l.substr(2)):Number(l)-_.s||0;_&&_._next&&(_._next._prev=_)}return r&&this._kill(r,e)?this._initProps(e,i,s,r):this._overwrite>1&&this._firstPT&&s.length>1&&K(e,this,i,this._overwrite,s)?(this._kill(i,e),this._initProps(e,i,s,r)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(M[e._gsTweenID]=!0),o)},n.render=function(t,e,i){var s,r,n,a,o=this._time,h=this._duration,_=this._rawPrevTime;if(t>=h)this._totalTime=this._time=h,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(s=!0,r="onComplete"),0===h&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>_||_===l)&&_!==t&&(i=!0,_>l&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||_===t?t:l);else if(1e-7>t)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===h&&_>0&&_!==l)&&(r="onReverseComplete",s=this._reversed),0>t?(this._active=!1,0===h&&(this._initted||!this.vars.lazy||i)&&(_>=0&&(i=!0),this._rawPrevTime=a=!e||t||_===t?t:l)):this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/h,c=this._easeType,m=this._easePower;(1===c||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===m?u*=u:2===m?u*=u*u:3===m?u*=u*u*u:4===m&&(u*=u*u*u*u),this.ratio=1===c?1-u:2===c?u:.5>t/h?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/h);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=_,E.push(this),void(this._lazy=t);this._time&&!s?this.ratio=this._ease.getRatio(this._time/h):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._time||0===h)&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||y))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._time!==o||s)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||y)),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||y),0===h&&this._rawPrevTime===l&&a!==l&&(this._rawPrevTime=0))}},n._kill=function(t,e){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:O.selector(e)||e;var i,s,r,n,a,o,h,_;if((m(e)||I(e))&&"number"!=typeof e[0])for(i=e.length;--i>-1;)this._kill(t,e[i])&&(o=!0);else{if(this._targets){for(i=this._targets.length;--i>-1;)if(e===this._targets[i]){a=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[i]=t?this._overwrittenProps[i]||{}:"all";break}}else{if(e!==this.target)return!1;a=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(a){h=t||a,_=t!==s&&"all"!==s&&t!==a&&("object"!=typeof t||!t._tempKill);for(r in h)(n=a[r])&&(n.pg&&n.t._kill(h)&&(o=!0),n.pg&&0!==n.t._overwriteProps.length||(n._prev?n._prev._next=n._next:n===this._firstPT&&(this._firstPT=n._next),n._next&&(n._next._prev=n._prev),n._next=n._prev=null),delete a[r]),_&&(s[r]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return o},n.invalidate=function(){return this._notifyPluginsOfEnabled&&O._onPluginEvent("_onDisable",this),this._firstPT=null,this._overwrittenProps=null,this._onUpdate=null,this._startAt=null,this._initted=this._active=this._notifyPluginsOfEnabled=this._lazy=!1,this._propLookup=this._targets?{}:[],this},n._enabled=function(t,e){if(o||a.wake(),t&&this._gc){var i,s=this._targets;if(s)for(i=s.length;--i>-1;)this._siblings[i]=$(s[i],this,!0);else this._siblings=$(this.target,this,!0)}return A.prototype._enabled.call(this,t,e),this._notifyPluginsOfEnabled&&this._firstPT?O._onPluginEvent(t?"_onEnable":"_onDisable",this):!1},O.to=function(t,e,i){return new O(t,e,i)},O.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new O(t,e,i)},O.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new O(t,e,s)},O.delayedCall=function(t,e,i,s,r){return new O(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:r,overwrite:0})},O.set=function(t,e){return new O(t,0,e)},O.getTweensOf=function(t,e){if(null==t)return[];t="string"!=typeof t?t:O.selector(t)||t;var i,s,r,n;if((m(t)||I(t))&&"number"!=typeof t[0]){for(i=t.length,s=[];--i>-1;)s=s.concat(O.getTweensOf(t[i],e));for(i=s.length;--i>-1;)for(n=s[i],r=i;--r>-1;)n===s[r]&&s.splice(i,1)}else for(s=$(t).concat(),i=s.length;--i>-1;)(s[i]._gc||e&&!s[i].isActive())&&s.splice(i,1);return s},O.killTweensOf=O.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var s=O.getTweensOf(t,e),r=s.length;--r>-1;)s[r]._kill(i,t)};var J=g("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=J.prototype},!0);if(n=J.prototype,J.version="1.10.1",J.API=2,n._firstPT=null,n._addTween=function(t,e,i,s,r,n){var a,o;return null!=s&&(a="number"==typeof s||"="!==s.charAt(1)?Number(s)-i:parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)))?(this._firstPT=o={_next:this._firstPT,t:t,p:e,s:i,c:a,f:"function"==typeof t[e],n:r||e,r:n},o._next&&(o._next._prev=o),o):void 0},n.setRatio=function(t){for(var e,i=this._firstPT,s=1e-6;i;)e=i.c*t+i.s,i.r?e=Math.round(e):s>e&&e>-s&&(e=0),i.f?i.t[i.p](e):i.t[i.p]=e,i=i._next},n._kill=function(t){var e,i=this._overwriteProps,s=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);
for(;s;)null!=t[s.n]&&(s._next&&(s._next._prev=s._prev),s._prev?(s._prev._next=s._next,s._prev=null):this._firstPT===s&&(this._firstPT=s._next)),s=s._next;return!1},n._roundProps=function(t,e){for(var i=this._firstPT;i;)(t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&(i.r=e),i=i._next},O._onPluginEvent=function(t,e){var i,s,r,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,s=r;s&&s.pr>o.pr;)s=s._next;(o._prev=s?s._prev:n)?o._prev._next=o:r=o,(o._next=s)?s._prev=o:n=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},J.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===J.API&&(U[(new t[e])._propName]=t[e]);return!0},d.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,r=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=g("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){J.call(this,i,s),this._overwriteProps=r||[]},t.global===!0),o=a.prototype=new J(i);o.constructor=a,a.API=t.API;for(e in n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,J.activate([a]),a},s=t._gsQueue){for(r=0;s.length>r;r++)s[r]();for(n in p)p[n].func||t.console.log("GSAP encountered missing dependency: com.greensock."+n)}o=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax");
//libs/commonlibs/tripledes/DESEncrypt.min.js
var DESEncrypt = (function () {
function DESEncrypt() {
}
DESEncrypt.encrypt = function(msg, key){
var key = CryptoJS.enc.Utf8.parse(key);
var msg = CryptoJS.enc.Utf8.parse(msg);
var encrypted = CryptoJS.DES.encrypt(msg, key, { iv: key,mode:CryptoJS.mode.CBC});
return encrypted;
};
// added by alex.leung
DESEncrypt.md5hash = function(msg) {
var hash = CryptoJS.MD5(msg).toString();
return hash;
};
return DESEncrypt;
})();
//libs/commonlibs/tripledes/tripledes.min.js
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var t=0;t>>2]|=(m[t>>>2]>>>24-8*(t%4)&255)<<24-8*((f+t)%4);else if(65535>>2]=m[t>>>2];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((t>>>4).toString(16));m.push((t&15).toString(16))}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>3]|=parseInt(a.substr(f,
2),16)<<24-4*(f%8);return new q.init(m,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},
r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(4*t),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*t;f=u.min(4*a,f);if(a){for(var e=0;e>>2]>>>24-8*(q%4)&255)<<16|(n[q+1>>>2]>>>24-8*((q+1)%4)&255)<<8|n[q+2>>>2]>>>24-8*((q+2)%4)&255,v=0;4>v&&q+0.75*v>>6*(3-v)&63));if(n=s.charAt(64))for(;d.length%4;)d.push(n);return d.join("")},parse:function(d){var n=d.length,p=this._map,s=p.charAt(64);s&&(s=d.indexOf(s),-1!=s&&(n=s));for(var s=[],q=0,w=0;w<
n;w++)if(w%4){var v=p.indexOf(d.charAt(w-1))<<2*(w%4),b=p.indexOf(d.charAt(w))>>>6-2*(w%4);s[q>>>2]|=(v|b)<<24-8*(q%4);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
(function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<>>32-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<>>32-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<>>32-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<>>32-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},
_doProcessBlock:function(r,e){for(var a=0;16>a;a++){var c=e+a,m=r[c];r[c]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var a=this._hash.words,c=r[e+0],m=r[e+1],f=r[e+2],t=r[e+3],y=r[e+4],q=r[e+5],s=r[e+6],w=r[e+7],v=r[e+8],u=r[e+9],x=r[e+10],z=r[e+11],A=r[e+12],B=r[e+13],C=r[e+14],D=r[e+15],g=a[0],h=a[1],j=a[2],k=a[3],g=l(g,h,j,k,c,7,b[0]),k=l(k,g,h,j,m,12,b[1]),j=l(j,k,g,h,f,17,b[2]),h=l(h,j,k,g,t,22,b[3]),g=l(g,h,j,k,y,7,b[4]),k=l(k,g,h,j,q,12,b[5]),j=l(j,k,g,h,s,17,b[6]),h=l(h,j,k,g,w,22,b[7]),
g=l(g,h,j,k,v,7,b[8]),k=l(k,g,h,j,u,12,b[9]),j=l(j,k,g,h,x,17,b[10]),h=l(h,j,k,g,z,22,b[11]),g=l(g,h,j,k,A,7,b[12]),k=l(k,g,h,j,B,12,b[13]),j=l(j,k,g,h,C,17,b[14]),h=l(h,j,k,g,D,22,b[15]),g=d(g,h,j,k,m,5,b[16]),k=d(k,g,h,j,s,9,b[17]),j=d(j,k,g,h,z,14,b[18]),h=d(h,j,k,g,c,20,b[19]),g=d(g,h,j,k,q,5,b[20]),k=d(k,g,h,j,x,9,b[21]),j=d(j,k,g,h,D,14,b[22]),h=d(h,j,k,g,y,20,b[23]),g=d(g,h,j,k,u,5,b[24]),k=d(k,g,h,j,C,9,b[25]),j=d(j,k,g,h,t,14,b[26]),h=d(h,j,k,g,v,20,b[27]),g=d(g,h,j,k,B,5,b[28]),k=d(k,g,
h,j,f,9,b[29]),j=d(j,k,g,h,w,14,b[30]),h=d(h,j,k,g,A,20,b[31]),g=n(g,h,j,k,q,4,b[32]),k=n(k,g,h,j,v,11,b[33]),j=n(j,k,g,h,z,16,b[34]),h=n(h,j,k,g,C,23,b[35]),g=n(g,h,j,k,m,4,b[36]),k=n(k,g,h,j,y,11,b[37]),j=n(j,k,g,h,w,16,b[38]),h=n(h,j,k,g,x,23,b[39]),g=n(g,h,j,k,B,4,b[40]),k=n(k,g,h,j,c,11,b[41]),j=n(j,k,g,h,t,16,b[42]),h=n(h,j,k,g,s,23,b[43]),g=n(g,h,j,k,u,4,b[44]),k=n(k,g,h,j,A,11,b[45]),j=n(j,k,g,h,D,16,b[46]),h=n(h,j,k,g,f,23,b[47]),g=p(g,h,j,k,c,6,b[48]),k=p(k,g,h,j,w,10,b[49]),j=p(j,k,g,h,
C,15,b[50]),h=p(h,j,k,g,q,21,b[51]),g=p(g,h,j,k,A,6,b[52]),k=p(k,g,h,j,t,10,b[53]),j=p(j,k,g,h,x,15,b[54]),h=p(h,j,k,g,m,21,b[55]),g=p(g,h,j,k,v,6,b[56]),k=p(k,g,h,j,D,10,b[57]),j=p(j,k,g,h,s,15,b[58]),h=p(h,j,k,g,B,21,b[59]),g=p(g,h,j,k,y,6,b[60]),k=p(k,g,h,j,z,10,b[61]),j=p(j,k,g,h,f,15,b[62]),h=p(h,j,k,g,u,21,b[63]);a[0]=a[0]+g|0;a[1]=a[1]+h|0;a[2]=a[2]+j|0;a[3]=a[3]+k|0},_doFinalize:function(){var b=this._data,e=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;e[c>>>5]|=128<<24-c%32;var m=u.floor(a/
4294967296);e[(c+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;e[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(e.length+1);this._process();b=this._hash;e=b.words;for(a=0;4>a;a++)c=e[a],e[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math);
(function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=1;this._mode=b.call(a,
this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([1398893684,
1701076831]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var b=p.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},
decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random(8));a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),4*b);a.sigBytes=4*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e,
c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}();
(function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<>>b^this._lBlock)&a;this._lBlock^=c;this._rBlock^=c<c;c++){var d=q[c]-1;a[c]=b[d>>>5]>>>31-d%32&1}b=this._subKeys=[];for(d=0;16>d;d++){for(var f=b[d]=[],l=v[d],c=0;24>c;c++)f[c/6|0]|=a[(w[c]-1+l)%28]<<31-c%6,f[4+(c/6|0)]|=a[28+(w[c+24]-1+l)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>=
4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}a=this._invSubKeys=[];for(c=0;16>c;c++)a[c]=b[15-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+1];u.call(this,4,252645135);u.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);u.call(this,1,1431655765);for(var d=0;16>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=0,r=0;8>r;r++)q|=b[r][((p^
f[r])&x[r])>>>0];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);u.call(this,16,65535);u.call(this,4,252645135);e[a]=this._lBlock;e[a+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(0,2)));this._des2=r.createEncryptor(p.create(b.slice(2,4)));this._des3=
r.createEncryptor(p.create(b.slice(4,6)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=n._createHelper(s)})();
//main.min.js
var __reflect=this&&this.__reflect||function(e,t,n){e.__class__=t,n?n.push(t):n=[t],e.__types__=e.__types__?n.concat(e.__types__):n},__extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),GameStateController=function(){function e(){this.hasBigWin=!1,this.statusFlag={},this.isActive=!1,this.data=SocketManager.getInstance().GetData()}return e.prototype.Start=function(e){void 0===e&&(e=!1),this.AddListeners(),this.SetActive(!0)},e.prototype.Stop=function(){this.RemoveListeners(),this.SetActive(!1)},e.prototype.SetActive=function(e){this.isActive=e},e.prototype.ToState=function(e){return CommonFunc.log("To State: "+GameState[e]),this.isActive?!1:!0},e.prototype.AddListeners=function(){},e.prototype.RemoveListeners=function(){},e}();__reflect(GameStateController.prototype,"GameStateController");var SlotGameStatusFlag;!function(e){e[e.BookFinished=0]="BookFinished",e[e.LoopFinished=1]="LoopFinished",e[e.BigWinFinished=2]="BigWinFinished"}(SlotGameStatusFlag||(SlotGameStatusFlag={}));var SlotGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(t){e.prototype.Start.call(this,t)},t.prototype.AddListeners=function(){EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.on_button_pressed,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.on_reel_stopped,this),EventCentral.getInstance().addEventListener(SceneNotify.TRIGGER_ANIMATION_FINISHED,this.on_trigger_animation_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.LOOP_COMPLETE,this.on_first_animation_loop_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_FINISHED,this.on_win_booking_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.BIG_WIN_FINISHED,this.on_big_win_finished,this)},t.prototype.RemoveListeners=function(){EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.on_button_pressed,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.on_reel_stopped,this),EventCentral.getInstance().removeEventListener(SceneNotify.TRIGGER_ANIMATION_FINISHED,this.on_trigger_animation_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.LOOP_COMPLETE,this.on_first_animation_loop_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_FINISHED,this.on_win_booking_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.BIG_WIN_FINISHED,this.on_big_win_finished,this)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_trigger_animation_finished=function(e){this.ToState(GameState.Slot_Result_Displaying)},t.prototype.on_first_animation_loop_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.LoopFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.on_win_booking_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.BookFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.on_big_win_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.BigWinFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.ToState(GameState.Slot_End)},t.prototype.CheckResultDisplayFinished=function(){var e=!0;this.statusFlag[SlotGameStatusFlag.BookFinished]||(e=!1),this.statusFlag[SlotGameStatusFlag.LoopFinished]||(e=!1),this.hasBigWin&&(this.statusFlag[SlotGameStatusFlag.BigWinFinished]?GameConfig.TurboModeState&&GameConfig.isTurboMode&&(e||EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop))):e=!1),e&&(this.hasBigWin=!1,this.statusFlag[SlotGameStatusFlag.BookFinished]=!1,this.statusFlag[SlotGameStatusFlag.LoopFinished]=!1,this.statusFlag[SlotGameStatusFlag.BigWinFinished]=!1,this.CheckEndState())},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(this.currentState=t,t){case GameState.Slot_Idle:return this.StateIdle(),StringUtil.getParameterByName("inum")&&(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes||SocketManager.getInstance().GetData().isNextFSOSpin()||SocketManager.getInstance().GetData().IsFreeGame()||IFrameCloseButtonState(!0),SocketManager.getInstance().GetData().IsLastFreeGameFinished()&&!SocketManager.getInstance().GetData().isNextFSOSpin()&&IFrameCloseButtonState(!0)),!0;case GameState.Slot_Spinning:return this.StateSpinning(),StringUtil.getParameterByName("inum")&&(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes||IFrameCloseButtonState(!1)),!0;case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_Special_Event:return this.StateSpecialEvent(),!0;case GameState.Slot_Result_Displaying:return this.StateResultDisplay(),!0;case GameState.Slot_End:return this.StateEnd(),!0}return!1},t.prototype.StateIdle=function(){},t.prototype.StateSpinning=function(){},t.prototype.StateFeatureTriggered=function(){},t.prototype.StateSpecialEvent=function(){},t.prototype.StateResultDisplay=function(){},t.prototype.StateEnd=function(){SocketManager.getInstance().SendActionDone(),this.endToIdleDelayID=egret.setTimeout(this.EndToIdle,this,1e3/60,1)},t.prototype.EndToIdle=function(){egret.clearTimeout(this.endToIdleDelayID),this.ToState(GameState.Slot_Idle)},t}(GameStateController);__reflect(SlotGameStateController.prototype,"SlotGameStateController");var SceneHandler=function(){function e(e){void 0===e&&(e=SceneType.Unknown),this.sceneType=SceneType.Unknown,this.fromType=SceneType.Unknown,this.itemLoaded=new Object,this.itemTotal=0,this.isDummyLoaded=!1,this.sceneType=e,this.timeoutHelper=new TimeoutHelper(this.Timeout,this,1e3*SlotConfig.spinTimeout),EventCentral.getInstance().addEventListener(SceneNotify.DUMMY_SCENE_COMPLETED,this.DummyLoadCompleted,this)}return e.prototype.Timeout=function(){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(GameError.TIMEOUT))},e.prototype.GetRelatedgroupList=function(){return[]},e.prototype.ResourceGroupLoaded=function(e){CommonFunc.log(e.groupName+" is loaded."),this.timeoutHelper.Reset(),this.currentLoadingGroup++,this.nWaitGroup==this.currentLoadingGroup&&this.AllResourceGroupLoaded()},e.prototype.CreateAndTransit=function(){this.CreateSceneAndController(),this.StartTransitToScene()},e.prototype.DummyLoadCompleted=function(e){this.isDummyLoaded=e.data,0==this.isDummyLoaded&&EventCentral.getInstance().removeEventListener(SceneNotify.DUMMY_SCENE_COMPLETED,this.DummyLoadCompleted,this)},e.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;ni?(n>r&&(o=!0,n=r),t=n*i):(t>a&&(o=!0,t=a),n=t/i),Math.abs(this.stage.stageWidth-t)<5||(o||this.canvas.classList.contains("Pixelate")?o&&this.canvas.classList.contains("Pixelate")&&this.canvas.classList.remove("Pixelate"):this.canvas.classList.add("Pixelate"),GameConfig.ContentScaleInv=t/GameConfig.DefaultContentWidth,e.scaleX=GameConfig.ContentScaleInv,e.scaleY=GameConfig.ContentScaleInv,this.stage.setContentSize(t,n))},e.prototype.InitSceneHandlers=function(){var e=new BaseGameSceneHandler(SceneType.Base),t=new FreeGameSceneHandler(SceneType.Free),n=new FreeSpinOfferGameSceneHandler(SceneType.FSO);e.initializer=this,t.initializer=this,n.initializer=this,GameSceneManager.GetInstance().AddSceneHandler(SceneType.Base,e),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Free,t),GameSceneManager.GetInstance().AddSceneHandler(SceneType.FSO,n);var i=new MiniLobbyOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("MiniLobby",i);var o=new BigWinOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("BigWin",o);var a=new JackpotOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Jackpot",a);var r=new PaytableOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Paytable",r);var s=new GameRulesOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("GameRule",s)},e.prototype.SetCSIPList=function(e){for(var t=0;t"+t+"::"+i.ip+":"+i.port),GameConfig.sshosts.push(i)}},e.prototype.SetRegionSSIPList=function(e){for(var t=0;t0),StringUtil.getParameterByName("FT")&&(GameConfig.isFeatureTrial=parseInt(StringUtil.getParameterByName("FT"))>0),StringUtil.getParameterByName("feature")&&(GameConfig.isShowQuitButton=0!=(2048&parseInt(StringUtil.getParameterByName("feature"))),0!=(4096&parseInt(StringUtil.getParameterByName("feature")))?GameConfig.quitGameMethod="_top":0!=(8192&parseInt(StringUtil.getParameterByName("feature")))?GameConfig.quitGameMethod="_parent":0!=(16384&parseInt(StringUtil.getParameterByName("feature")))&&(GameConfig.quitGameMethod="_self")),StringUtil.getParameterByName("referer")&&(GameConfig.referer=StringUtil.getParameterByName("referer")),"undefined"==typeof GameConfig.token&&(alert("Invalid Token"),CommonFunc.leaveGame())},e.prototype.LoadCommonErrorCodeFile=function(){var e,t=GameConfig.langData[GameConfig.Locale].code;e=CDNPath2();var n=e+"CommonResources/commonErrorCode_"+t+".json?t="+(new Date).getTime(),i=new egret.URLLoader;i.dataFormat=egret.URLLoaderDataFormat.TEXT;var o=new egret.URLRequest;o.url=n,i.addEventListener(egret.Event.COMPLETE,this.OnCommonErrorCodeLoaded,this),i.addEventListener(egret.IOErrorEvent.IO_ERROR,this.CommonErrorCodeLoadedFailed,this),i.load(o)},e.prototype.OnCommonErrorCodeLoaded=function(e){var t=e.target,n=t.data;if(null==n){var i=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+i+"_json")}else GameConfig.CommonErrorCodeFile=JSON.parse(n)},e.prototype.CommonErrorCodeLoadedFailed=function(e){console.log("Common Error code translation files load fail");var t=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+t+"_json")},e.prototype.LoadLobbyInfo=function(e,t){this.lobbyInfoLoadedCallback=e.bind(t);var n;n=CDNPath2();var i=n+"CommonResources/LobbyInfo.dat?t="+(new Date).getTime(),o=new egret.URLVariables,a="t="+(new Date).getTime();o.decode(a);var r=new egret.URLLoader;r.dataFormat=egret.URLLoaderDataFormat.TEXT;var s=new egret.URLRequest;s.url=i,r.data=o,r.addEventListener(egret.Event.COMPLETE,this.OnLobbyInfoLoaded,this),r.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LobbyInfoLoadedFailed,this),r.load(s)},e.prototype.OnLobbyInfoLoaded=function(e){var t=e.target.data;GameConfig.lobbyInfo=JSON.parse(StringUtil.tryDecode64(t)),this.SetLobby(GameConfig.lobby),this.lobbyInfoLoadedCallback()},e.prototype.LobbyInfoLoadedFailed=function(e){alert("Fail to load lobby info"),this.LoadLobbyInfoTemplate()},e.prototype.LoadLobbyInfoTemplate=function(){var e="resource/UI/commonUI/images/MiniLobby/LobbyInfo_Template.dat",t=new egret.URLVariables,n="t="+(new Date).getTime();t.decode(n);var i=new egret.URLLoader;i.dataFormat=egret.URLLoaderDataFormat.TEXT;var o=new egret.URLRequest;o.url=e,i.data=t,i.addEventListener(egret.Event.COMPLETE,this.OnLobbyInfoLoaded,this),i.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LobbyInfoLoadedFailed,this),i.load(o),StringUtil.getParameterByName("inum")&&(GameConfig.isMiniLobbyEnabled=!1)},e.prototype.CheckSupportedLanguage=function(e){for(var t=GameConfig.Locale,n=!1,i=0;i0?GameConfig.isTurboMode=!1:GameConfig.isTurboMode=!0),GameConfig.isTurboModeReady||(GameConfig.isTurboMode=!1),GameConfig.lobbyInfo[GameConfig.lobby].GameListException){GameConfig.gameListException=GameConfig.lobbyInfo[GameConfig.lobby].GameListException;for(var i=0;i=0&&GameConfig.gameList.splice(o,1)}}var a=GameConfig.GameCode.split("-"),o=GameConfig.gameList.indexOf(a[a.length-1]);o>=0&&GameConfig.gameList.splice(o,1),this.SetSupportedLanguageList(t),CommonFunc.log(GameConfig.GetGeneralRuleURL())},e.prototype.SetSupportedLanguageList=function(e){GameConfig.supportedLanguageList=e;for(var t=0;twindow.innerWidth?(GameConfig.Orientation=OrientationState.Portrait,isIOSChrome()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideIOSChromeFullScreenTips(),GameConfig.platform==Platform.mobile&&"Android"==egret.Capabilities.os&&isSupportFullScreen()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideChromeFullscreenTips(),apputil.isIOSSafari()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideIOSFullscreenTips()):(GameConfig.Orientation=OrientationState.Landscape,GameConfig.platform==Platform.mobile&&isIOSChrome()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.toShowIOSFullscreenTips()?(document.getElementsByTagName("html")[0].style.overflow="visible",document.getElementsByTagName("body")[0].style.overflow="visible",this.showIOSChromeFullScreenTips()):(document.getElementsByTagName("html")[0].style.overflow="hidden",document.getElementsByTagName("body")[0].style.overflow="hidden",this.hideIOSChromeFullScreenTips())),GameConfig.platform==Platform.mobile&&"Android"==egret.Capabilities.os&&isSupportFullScreen()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.disableAndroidChromFullscreen||this.showChromeFullscreenTips()),apputil.isIOSSafari()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.showIOSFullscreenTips(),this.doFullscreenCheck()&&this.hideIOSFullscreenTips())),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.ORIENTATION_CHANGED)),this.oldHeight=window.innerHeight,this.oldWidth=window.innerWidth,this.stage.addEventListener(egret.Event.RESIZE,this.OnOrientation,this),window.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchend",this.onTouchEnd)},e.prototype.initIOSFullScreenTip=function(){var e=document.createElement("div");e.id="iphone-tips",document.getElementsByTagName("body")[0].appendChild(e),isIOSover18Safari()?document.getElementById("iphone-tips").innerHTML='
':isIOS15Safari()?document.getElementById("iphone-tips").innerHTML='
':document.getElementById("iphone-tips").innerHTML='
',apputil.isIOSSafari()&&isIOS14()&&(isIOS15Safari()?(document.getElementById("iphone-tips").style.height="100%",document.getElementById("iphone-tips").style.top="0%"):(document.getElementById("iphone-tips").style.height="130%",document.getElementById("iphone-tips").style.top="30%"))},e.prototype.initAndroidChromeFullScreenTip=function(){var e=this,t=document.createElement("div");t.id="chrome-tips",document.getElementsByTagName("body")[0].appendChild(t);var n=document.createElement("img");n.src="../CommonResources/commonImage/AndroidFullScreenTip/close.png",n.id="android-chrome-tips-close-button",t.appendChild(n);var i=document.createElement("img");i.src="../CommonResources/commonImage/AndroidFullScreenTip/doubleClick_animation.gif",i.id="android-chrome-tips-doubletap-animation",t.appendChild(i),egret.Ticker.getInstance().register(this.onDoubleClickTimeOut,this),t.addEventListener("click",function(){e.doubleClick<=0?e.doubleClick=600:apputil.enterFullScreen()}),n.addEventListener("click",function(){e.removeChromeFullscreenTips()})},e.prototype.showChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="visible"},e.prototype.hideChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="hidden"},e.prototype.removeChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="hidden",this.disableAndroidChromFullscreen=!0},e.prototype.ScrollToTop=function(){var e=this;egret.setTimeout(function(){window.scrollY>0&&window.scrollTo(0,0),e.ScrollToTop()},this,1e3)},e.prototype.initIOSChromeFullScreenTips=function(){var e=this;this.bgGroup=document.createElement("div"),this.bgGroup.id="iosTips",this.bgGroup.style.width="100%",isIOSChrome()?this.bgGroup.style.height="150%":isIOS14()?this.bgGroup.style.height="130%":this.bgGroup.style.height="100%",this.bgGroup.style.position="absolute",this.bgGroup.style.top="0",this.bgGroup.style.left="0",this.bgGroup.style.backgroundColor="rgba(0, 0, 0, 0.7)",this.bgGroup.style.textAlign="center",document.body.appendChild(this.bgGroup),this.animImage=document.createElement("img"),this.animImage.id="animImage",isIOSChrome()?this.animImage.style.height="40%":this.animImage.style.height="70%",this.animImage.style.border="0",this.animImage.style.position="absolute",this.animImage.style.top="10%",this.animImage.style.right="30%",this.animImage.src="../CommonResources/commonImage/IOSFullScreenTip/drag_animation.gif",this.bgGroup.appendChild(this.animImage),this.btnClose=document.createElement("img"),this.btnClose.id="btnClose",this.btnClose.style.width="5%",this.btnClose.style.border="0",this.btnClose.style.position="absolute",this.btnClose.style.top="3%",this.btnClose.style.right="2%",this.btnClose.src="../CommonResources/commonImage/IOSFullScreenTip/close.png",this.btnClose.addEventListener("click",function(){e.removeIOSChromeFullScreenTips()}),this.bgGroup.appendChild(this.btnClose),this.bgGroup.style.visibility="hidden"},e.prototype.showIOSChromeFullScreenTips=function(){"iOS"==egret.Capabilities.os&&(this.bgGroup.style.visibility="visible",this.isIOSChromeFullscreenTipsAlive=!0)},e.prototype.hideIOSChromeFullScreenTips=function(){var e=this;"iOS"==egret.Capabilities.os&&(this.bgGroup.style.visibility="hidden",this.isIOSChromeFullscreenTipsAlive&&egret.setTimeout(function(){egret.updateAllScreens(),e.isIOSChromeFullscreenTipsAlive=!1},this,1e3))},e.prototype.removeIOSChromeFullScreenTips=function(){"iOS"==egret.Capabilities.os&&(this.bgGroup.style.display="none")},e.prototype.onDoubleClickTimeOut=function(e){this.doubleClick-=e},e.prototype.doFullscreenCheck=function(){var e=Math.min(screen.availHeight,screen.availWidth);return window.innerHeight==window.outerHeight?!0:0==window.outerHeight&&window.innerHeight==e?!0:isOverIOS13Safari()?window.innerHeight>=window.outerHeight-20?!0:window.innerHeight=377?!0:void 0:(window.scrollY>0&&window.scrollTo(0,0),!1)},e.prototype.showIOSFullscreenTips=function(){"iOS"==egret.Capabilities.os&&(document.getElementById("iphone-tips").style.visibility="visible")},e.prototype.hideIOSFullscreenTips=function(){"iOS"==egret.Capabilities.os&&(document.getElementById("iphone-tips").style.visibility="hidden")},e.prototype.toShowIOSFullscreenTips=function(){var e=(1.90?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t}(SceneHandler);__reflect(FeatureGameSceneHandler.prototype,"FeatureGameSceneHandler");var ReelSpinAnimationHandler=function(){function e(){}return e.prototype.InitResult=function(){},e.prototype.StartSpin=function(){},e.prototype.PositionUpdate=function(e){},e.prototype.PrepareToStop=function(){},e.prototype.StopSpin=function(e){void 0===e&&(e=!1)},e.prototype.OnReelStop=function(){},e}();__reflect(ReelSpinAnimationHandler.prototype,"ReelSpinAnimationHandler");var FreeGameStateController=function(e){function t(){var t=e.call(this)||this;return t.tempTimeoutID=-1,t}return __extends(t,e),t.prototype.InitFreeReelStrip=function(){var e=new Object;e.classtype=UpdateSlotReelStripEffect;var t=new Object;t.gameMode=SceneType.Free,e.arg=t,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))},t.prototype.Start=function(t){this.InitFreeReelStrip(),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),e.prototype.Start.call(this,t),this.SetInitState(t)},t.prototype.SetInitState=function(e){var t=this.data.nTriggeredAccFreeGame,n=this.data.nPlayedFreeGame+","+t;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,n)),e){if(this.data.fso){var n=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,n)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.data.waitClient)EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.PreAccFreeAmount)),CommonFunc.log("Free Game Resume"),this.Resume();else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),CommonFunc.log("init Idle");var i=new Object;i.type=MessageType.PressToStart,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}}else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,Math.max(this.data.winAmount,this.data.accumulatedWinAmount)));var i=new Object;i.type=MessageType.FreeGameRemaining,i.current=this.data.nPlayedFreeGame+1,i.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}},t.prototype.Resume=function(){AudioManager.Instance.setBgm(Sound.FreeBGM,!0),this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY))},t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_SUMMARY_FINISHED,this.on_win_summary_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().addEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1,1)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_SUMMARY_FINISHED,this.on_win_summary_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().removeEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();this.data.nTriggeredAccFreeGame+=this.data.nTriggeredFreeGame,this.data.nTriggeredFreeGame=0,GameConfig.SYMBOL_DATA=null;var t=this.data.nPlayedFreeGame+1+","+this.data.nTriggeredAccFreeGame;this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,t));break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStop()},t.prototype.on_trigger_animation_finished=function(e){this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_special_event_finished=function(e){this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_sync_data_ready=function(e){this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.on_win_summary_finished=function(e){this.data.fso||this.data.fsoPlayed==this.data.fsoCount&&-1!=this.data.fsoPlayed&&-1!=this.data.fsoCount?this.ToFSO():this.ToBaseGame()},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.ShowBigWin=function(e,t,n){void 0===n&&(n=-1),0>n&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.CheckNextStateAfterReelStop=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.CheckEndState=function(){this.data.IsLastFreeGameFinished()?this.ToState(GameState.Slot_To_Summary):this.ToState(GameState.Slot_End)},t.prototype.stop_bgm=function(e){this.timer.removeEventListener("stop_bgm",this.stop_bgm,this),AudioManager.Instance.stopBgm()},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateIdle=function(){!GameConfig.isDebugPanelOpened||GameConfig.demoPanelOn?this.on_start_pressed():EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE))},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nPlayedFreeGame:e.current=this.data.nPlayedFreeGame+1,e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount,this.data.accumulatedWinAmount):this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount,this.data.accumulatedWinAmount):this.ShowBigWin(1,this.data.winAmount,this.data.accumulatedWinAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.accumulatedWinAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmount=this.Length()&&(t-=this.Length()),this.At(t)},e}();__reflect(ReelStrip.prototype,"ReelStrip");var EffectContainer=function(){function e(){this.effects=new Array}return e.prototype.AddEffect=function(e){this.effects.push(e)},e.prototype.FindEffect=function(e){return this.effects[this.effects.indexOf(e)]},e.prototype.RemoveEffect=function(e){this.effects.indexOf(e)>=0&&this.effects.splice(this.effects.indexOf(e),1)},e.prototype.FindEffectWithClass=function(e){for(var t=0;t=0;n--){var i=this.slotReel.GetQueuedSymbol(n);egret.Tween.removeTweens(i),t=egret.Tween.get(i),t.to({y:i.y+.9*SlotConfig.SLOT_HEIGHT},50)}t.call(this.StartPositionUpdate.bind(this))},t.prototype.StartPositionUpdate=function(){for(var e=this.slotReel.GetQueueOrder(),t=e.length-1;t>=0;t--){var n=this.slotReel.GetQueuedSymbol(t),i=this.GetReelStripIndexWithOffset(t),o=this.reelStrip.At(i);n.SetResult(o)}this.slotReel.addEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this)},t.prototype.PositionUpdate=function(){if(this.isStopped)return!0;var e=egret.getTimer(),t=e-this.previousTime;this.previousTime=e,t=1e3/30;for(var n,i=Math.floor(this.speed*t),o=(Math.floor(i/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),a=o.length-1;a>=0;a--)n=this.slotReel.GetQueuedSymbol(a),n.y+=i;return this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions()),!0},t.prototype.PrepareToStop=function(){this.slotReel.StopSpin(!0)},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);for(var t,n=this.slotReel.GetQueueOrder(),i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,this.slotReel.removeEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this);for(var i=0;ii)if(a.yt&&(t=e);a.y=i)for(e=Math.floor((i-a.y)/SlotConfig.SLOT_HEIGHT),t>e&&(t=e);a.y>i;)a.y-=i-n}return this.slotReel.UpdateQueueOrder(),t},t.prototype.UpdateAllSymbolResults=function(e,t){if(void 0===t&&(t=0),0!=e){var n;if(this.OffsetReelStrip(e),e>0){var i=Math.max(0,this.slotReel.nSymbol-e);n=e;for(var o=i;o=0;r--){var a=this.slotReel.GetQueuedSymbol(r);this.UpdateSymbolResult(a,r,n,t)}}}},t.prototype.UpdateSymbolResult=function(e,t,n,i){void 0===i&&(i=0);var o=i>0;if(o)e.SetResult(i);else{var a=(this.currentReelStripIdx+t)%this.reelStrip.Length(),r=this.reelStrip.At(a);e.SetResult(r)}},t.prototype.GetReelStripIndexWithOffset=function(e){return e%=this.reelStrip.Length(),(this.currentReelStripIdx+e+this.reelStrip.Length())%this.reelStrip.Length()},t.prototype.OffsetReelStrip=function(e){this.currentReelStripIdx=this.GetReelStripIndexWithOffset(e)},t}(ReelSpinAnimationHandler);__reflect(SimpleSpinningReelAnimationHandler.prototype,"SimpleSpinningReelAnimationHandler",["SpinningReelValidator"]);var FreeGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[RESGroupKey.UIPanelCommon,GameConfig.platform==Platform.desktop?this.LoadUIPanel():this.LoadUIPanelMobile(),GameConfig.platform==Platform.desktop?this.LoadSlotSceneCommon():this.LoadSlotSceneCommonMobile(),GameConfig.platform==Platform.desktop?RESGroupKey.BaseGame:RESGroupKey.BaseGameMobile,GameConfig.platform==Platform.desktop?this.LoadFreeGameGroup():this.LoadFreeGameMobileGroup(),GameConfig.platform==Platform.desktop?this.LoadJackpotWinNotice():this.LoadJackpotWinNotice(),GameConfig.platform==Platform.desktop?this.LoadFSOPrizeWinNotice():this.LoadFSOPrizeWinNotice()]},t.prototype.LoadUIPanel=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.UIPanelEng;case Language.SimplifiedChinese:return RESGroupKey.UIPanelCn;case Language.TraditionalChinese:return RESGroupKey.UIPanelZh;case Language.Korean:return RESGroupKey.UIPanelKr;case Language.Japanese:return RESGroupKey.UIPanelJp;case Language.Thai:return RESGroupKey.UIPanelTh;case Language.Vietnam:return RESGroupKey.UIPanelVi;case Language.Indonesia:return RESGroupKey.UIPanelId}},t.prototype.LoadUIPanelMobile=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.UIPanelMobileEng;case Language.SimplifiedChinese:return RESGroupKey.UIPanelMobileCn;case Language.TraditionalChinese:return RESGroupKey.UIPanelMobileZh;case Language.Korean:return RESGroupKey.UIPanelMobileKr;case Language.Japanese:return RESGroupKey.UIPanelMobileJp;case Language.Thai:return RESGroupKey.UIPanelMobileTh;case Language.Vietnam:return RESGroupKey.UIPanelMobileVi;case Language.Indonesia:return RESGroupKey.UIPanelMobileId}},t.prototype.LoadFreeGameGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameZh;case Language.Korean:return RESGroupKey.FreeGameKr;case Language.Japanese:return RESGroupKey.FreeGameJp;case Language.Thai:return RESGroupKey.FreeGameTh;case Language.Vietnam:return RESGroupKey.FreeGameVi;case Language.Indonesia:return RESGroupKey.FreeGameId}},t.prototype.LoadFreeGameMobileGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameMobileEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameMobileCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameMobileZh;case Language.Korean:return RESGroupKey.FreeGameMobileKr;case Language.Japanese:return RESGroupKey.FreeGameMobileJp;case Language.Thai:return RESGroupKey.FreeGameMobileTh;case Language.Vietnam:return RESGroupKey.FreeGameMobileVi;case Language.Indonesia:return RESGroupKey.FreeGameMobileId}},t.prototype.LoadSlotSceneCommon=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.SlotSceneCommonEng;case Language.SimplifiedChinese:return RESGroupKey.SlotSceneCommonCn;case Language.TraditionalChinese:return RESGroupKey.SlotSceneCommonZh;case Language.Korean:return RESGroupKey.SlotSceneCommonKr;case Language.Japanese:return RESGroupKey.SlotSceneCommonJp;case Language.Thai:return RESGroupKey.SlotSceneCommonTh;case Language.Vietnam:return RESGroupKey.SlotSceneCommonVi;case Language.Indonesia:return RESGroupKey.SlotSceneCommonId}},t.prototype.LoadSlotSceneCommonMobile=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.SlotSceneCommonMobileEng;case Language.SimplifiedChinese:return RESGroupKey.SlotSceneCommonMobileCn;case Language.TraditionalChinese:return RESGroupKey.SlotSceneCommonMobileZh;case Language.Korean:return RESGroupKey.SlotSceneCommonMobileKr;case Language.Japanese:return RESGroupKey.SlotSceneCommonMobileJp;case Language.Thai:return RESGroupKey.SlotSceneCommonMobileTh;case Language.Vietnam:return RESGroupKey.SlotSceneCommonMobileVi;case Language.Indonesia:return RESGroupKey.SlotSceneCommonMobileId}},t.prototype.CreateSceneAndController=function(){if(!AssetManager.GetInstance().ContainKey("SlotGameUI")){var e=new SlotConfig.CGameUI;AssetManager.GetInstance().AddAsset("SlotGameUI",e),GameLayer.GetInstance().AddObjectToLayer(e,Layer.Slot)}if(AssetManager.GetInstance().GetAsset("SlotGameUI").visible=!0,!AssetManager.GetInstance().ContainKey("UIController")){var n=new SlotConfig.CUIController;AssetManager.GetInstance().AddAsset("UIController",n),GameLayer.GetInstance().AddObjectToLayer(n,Layer.UI)}if(!AssetManager.GetInstance().ContainKey(t.kSlotController)){this.initializer.InitSlotController();AssetManager.GetInstance().GetAsset("SlotController")}if((GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase)&&GameConfig.maxNumOfLine>1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),i=new LineDetail;i.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,i.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("LineDetail",i),e.AddObjectToUI(i,"winEffectLayer");var o=new ParticleWinLineManager;o.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,o.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",o),e.AddObjectToUI(o,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CFreeGameStateController)},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.FSO:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Free,this.OnTransitionEnd,this);break;case SceneType.Feature1:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.fromType]+"] to Mode:["+SceneType[this.sceneType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t.kSlotController="SlotController",t}(SceneHandler);__reflect(FreeGameSceneHandler.prototype,"FreeGameSceneHandler");var ChargingEffect=function(e){function t(){var t=e.call(this)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t.data=new Object,t.data.ChargingArray=new Array,t}return __extends(t,e),t.prototype.Evaluate=function(){this.data.FeatureSymbolArray=SlotConfig.FeatureSymbolIDs,this.data.ChargingArray=this.CheckFeatureAndCharging(this.data.FeatureSymbolArray),EventCentral.getInstance().addEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.IsNeed=function(e){return void 0===e&&(e=-1),e>this.data.ChargingArray.length?!1:null!=this.data.ChargingArray&&this.data.ChargingArray[e].length>0?!0:!1},t.prototype.OnReelStartStoppingExecute=function(e){null!=this.chargingChannel?this.chargingChannel.stop():AudioManager.Instance.stopSound(Sound.Charging);var t=this.slotController.slotView.GetStopReelOrderByReelId(e.data);t++,t>=this.slotController.slotView.reelCount||this.IsNeed(t)&&this.Execute(t,"")},t.prototype.OnReelStopExecute=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.Execute=function(e,t){this.chargingChannel=AudioManager.Instance.playSound(Sound.Charging),this.slotController.slotView.GetStopReelOrderedReel(e).effectHandler.ExecuteEffect(SlotEffectCollection.charging,t)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.charging)},t.prototype.CheckFeatureAndCharging=function(e){var t,n,i,o;this.data.ChargingArray=new Array(5);var a=this.data.ChargingArray;for(t=0;t1&&a[t].push(e[i]),n=0;n0?(n=a,t="major"):r>0?(n=r,t="minor"):s>0&&(n=s,t="mini"),SlotConfig.JackpotWinData.push({key:t,name:i,totalAmount:n}),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_JACKPOT_WINNING_NOTICE))},t.prototype.onSpSimplayCampaignList=function(e){if(CommonFunc.log("onSpSimplayCampaignList"),CommonFunc.log("CMDSpSimplayCampaignList"+e.CampaignList),CommonFunc.log("CMDSpSimplayCampaignList"+e.CampaignList.length),e.CampaignList.length>0){var t=new CampaignDetailOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("CampaignDetail",t),GameConfig.IsCampaignEnable=!0,this.data.campaignList=e.CampaignList,CommonFunc.log(" this.data.campaignList.CampaignID"+this.data.campaignList[e.CampaignList.length-1].CampaignID),CommonFunc.log(" this.data.campaignList.Popup"+this.data.campaignList[e.CampaignList.length-1].Popup),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_CAMPAIGN_BUTTON))}},t.prototype.onSpSimplayCampaignDetail=function(e){egret.clearTimeout(this.campaignDetailTimeoutTimer),this.campaignDetailTimeoutTimer=-1,this.data.campaignInvolvedGamesData=e.EGameList,EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.CAMPAIGN_DETAIL_RECEIVED))},t.prototype.onSpSimplayCampaignWinnerList=function(e){egret.clearTimeout(this.campaignWinnerListTimeoutTimer),this.campaignWinnerListTimeoutTimer=-1,this.data.campaignWinnerListData=e.WinnerList,CommonFunc.log("onSpSimplayCampaignWinnerList WinnerList"+e.WinnerList),EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.CAMPAIGN_WINNERLIST_RECEIVED))},t.prototype.SendRequestCampaignDetailAction=function(e){if(this.isSendCustomAction=!0,this.isCampaignDetailReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,this.isCampaignDetailReconnect=!1,this.isSendCustomAction=!1;var t=new CMDPsCampaignDetail;t.CampaignID=e,t.PlayerID=SocketManager.getInstance().GetData().playerID,this._net.send(t),this.campaignDetailTimeoutTimer=egret.setTimeout(this.onCampaignDetailTimerComplete,this,1e4)},t.prototype.SendRequestCampaignWinnerListAction=function(e){if(this.isSendCustomAction=!0,this.isCampaignWinnerListReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,this.isCampaignWinnerListReconnect=!1,this.isSendCustomAction=!1;var t=new CMDPsCampaignWinner;t.CampaignID=e,t.PlayerID=SocketManager.getInstance().GetData().playerID,this._net.send(t),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.REQUESTING_CAMPAIGN_WINNERLIST)),this.campaignWinnerListTimeoutTimer=egret.setTimeout(this.onCampaignWinnerListTimerComplete,this,1e4)},t.prototype.onSpCampaignNotice=function(e){var t,n=e.PlayerName,i=e.Prize,o=(e.Type,e.Value);switch(i){case 1:t="1st";break;case 2:t="2nd";break;case 3:t="3rd";break;case 4:t="4th"}SlotConfig.JackpotWinData.push({key:t,name:n,totalAmount:o}),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_JACKPOT_WINNING_NOTICE))},t.prototype.onSpSimplayFsoEventList=function(e){255==e.Result&&(SocketManager.getInstance().GetData().SetFSOEventList(e.EventList),SocketManager.getInstance().GetData().fsoEventListPopup=e.Popup,EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.SHOW_GIFTBOX)),EventCentral.getInstance().dispatchEvent(new egret.Event(SysNotify.FSO_EVENTLIST_RECEIVED)),GameConfig.isFSOOverlayOpened&&(0==e.EventList.length?(CommonFunc.ShowMessage(Localization.Instance.getString("common.freeSpinOffer.fso_redeem_page_updated_withoutGame"),!1),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.HIDE_FSO_REDEEM_PAGE))):(CommonFunc.ShowMessage(Localization.Instance.getString("common.freeSpinOffer.fso_redeem_page_updated"),!1),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.HIDE_FSO_REDEEM_PAGE)))))},t.prototype.onSpSimplayFsoEventDetail=function(e){if(console.log("Received on Sp SimplayFsoEventDetail"),255==e.Result)if(GameConfig.checkingFSOEventValid){for(var t=0;t0?e=this.data.statusInit:e==SlotAction.Free?0!=this.data.nRemainingFreeGame||0!=this.data.nFreeGame&&this.data.nFreeGame||(e=0):this.data.nRemainingFreeGame>0&&(e=1)),e},t.prototype.onSpInitSlot=function(e){if(this._retryTimes=0,SocketManager.getInstance().isWaitingForBalanceUpdate||this.ReadInitPacket(e),SocketManager.getInstance().isReconnecting){if(SocketManager.getInstance().isReconnecting=!1,SocketManager.getInstance().isWaitingForBalanceUpdate){var t=JSON.parse(e.UnknownData);return void 0!=t[JSONTag.WaitClient]&&(this.data.waitClient=t[JSONTag.WaitClient]),1==this.data.waitClient&&(this.SendActionDone(),this.data.waitClient=0),SocketManager.getInstance().isActionPending&&(SocketManager.getInstance().isActionPending=!1,this.ResendAction()),void(SocketManager.getInstance().isStarted=!0)}return SocketManager.getInstance().isWaitingForResponse?(SocketManager.getInstance().isWaitingForResponse=!1,0==this.data.waitClient?(this.ResendAction(),void(SocketManager.getInstance().isStarted=!0)):(egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,this.data.waitClient=0,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY)),void(SocketManager.getInstance().isStarted=!0))):(1==this.data.waitClient&&(this.SendActionDone(),this.data.waitClient=0),SocketManager.getInstance().isBetLogReconnect||SocketManager.getInstance().isFSORedeemReconnect||SocketManager.getInstance().isRankingReconnect||this.isSendCustomAction||this.ResendAction(),SocketManager.getInstance().isBetLogReconnect&&this.SendBetQuery(this.betlogFromDate,this.betlogToDate),SocketManager.getInstance().isRankingReconnect&&this.SendRankingListRequest(this.rankingReconnect[0],this.rankingReconnect[1]),this.isCampaignDetailReconnect&&this.SendRequestCampaignDetailAction(this.data.campaignList[this.data.campaignList.length-1].CampaignID),this.isCampaignWinnerListReconnect&&this.SendRequestCampaignWinnerListAction(this.data.campaignList[this.data.campaignList.length-1].CampaignID),void(SocketManager.getInstance().isStarted=!0))}SocketManager.getInstance().isStarted=!0,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.INIT_DATA_READY)),FesEventController.getInstance().Init(),FesConstant.FES_ENABLE&&FesEventController.getInstance().StartRequest()
},t.prototype.onSpSlotAction=function(e){SocketManager.getInstance().isReconnecting||(CommonFunc.log("data recieved"),SocketManager.getInstance().isWaitingForResponse=!1,this._retryTimes=0,this.ReadPacket(e),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY)))},t.prototype.onSpSlotJackpot=function(e){this.data.majorJackpot=e.Jackpot.MajorJP,this.data.minorJackpot=e.Jackpot.MinorJP,this.data.miniJackpot=e.Jackpot.MiniJP,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.JACKPOT_DATA_READY))},t.prototype.onScSyncData=function(e){(!SocketManager.getInstance().isStarted||SocketManager.getInstance().IsConnected())&&(SocketManager.getInstance().isWaitingForBalanceUpdate=!1,this.ReadBalancePacket(e),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.SYNC_DATA_READY)))},t.prototype.onSpSlotError=function(e){CommonFunc.ShowMessage(Localization.Instance.translateErrorMsg(StringUtil.SearchErrorCodeInJson(50037),e.Error),!0)},t.prototype.onShGameServerKick=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(50026))},t.prototype.onPlayerBeDisabled=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(50067))},t.prototype.onShGameProcessingFail=function(e){switch(e.errorCode){case 94:this.ResendAction();break;case 95:this.SendActionDone(),this.ResendAction();break;case 114:case 76:this._retryTimes>=GameConfig.MaxRetryTimes?(this.data.errorCode=e.errorCode,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e.errorCode))):(this._retryTimes++,this.ResendAction());break;default:this.data.errorCode=e.errorCode,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e.errorCode))}},t.prototype.onSpTokenRequest=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.TOKEN_READY,e))},t.prototype.ReadPacket=function(e){var t=e;if(null!=t.Jackpot){var n=t.Jackpot;n.MajorJP>0?(this.data.jackpotType=1,this.data.jackpotAmount=n.MajorJP):n.MinorJP>0?(this.data.jackpotType=2,this.data.jackpotAmount=n.MinorJP):n.MiniJP>0?(this.data.jackpotType=3,this.data.jackpotAmount=n.MiniJP):(this.data.jackpotType=0,this.data.jackpotAmount=0)}this.data.betID=t.BetID,this.ReadData(t.UnknownData)},t.prototype.ReadData=function(e){var t=JSON.parse(e);this._setGameData(t),this.data.fso||(void 0!==t[JSONTag.DenominationId]&&(this.data.denominationId=t[JSONTag.DenominationId]),(this.data.denominationId>=this.data.denominationList.length||this.data.denominationId<0)&&(this.data.denominationId=0),void 0!==t[JSONTag.LineBet]&&(this.data.lineBet=t[JSONTag.LineBet]),this.data.lineBet=Math.min(this.data.lineBet,10),this.data.lineBet=Math.max(this.data.lineBet,0),GameConfig.gameType!=GameType.WayBase&&(null!=t[JSONTag.BetLineNum]&&(this.data.nBetLine=parseInt(t[JSONTag.BetLineNum])),(this.data.nBetLine<=0||this.data.nBetLine>GameConfig.maxNumOfLine)&&(this.data.nBetLine=GameConfig.maxNumOfLine)),GameConfig.gameType==GameType.DirectionalWayBase&&null!=t[JSONTag.BetDirection]&&this.data.direction.SetDirection(parseInt(t[JSONTag.BetDirection])))},t.prototype.ReadInitPacket=function(e){var t=e;if(this.data.playerID=t.PlayerID,this.data.betID=t.BetID,this.data.NoChanceJackpot=1==t.NoChanceJackpot,this.data.lobbyCode=t.LobbyCode,this.data.isCW=t.IsCommonWallet,this.data.currencyName=t.CurrencyName,""!=t.UnsettleEGameList&&(this.data.unsettledEGamesList=t.UnsettleEGameList.split(",")),null!=t.Jackpot){var n=t.Jackpot;n.MajorJP>0?(this.data.jackpotType=1,this.data.jackpotAmount=n.MajorJP):n.MinorJP>0?(this.data.jackpotType=2,this.data.jackpotAmount=n.MinorJP):n.MiniJP>0?(this.data.jackpotType=3,this.data.jackpotAmount=n.MiniJP):(this.data.jackpotType=0,this.data.jackpotAmount=0)}SocketManager.getInstance().isReconnecting||GameConfig.slotGameInitializer.SetLobby(t.LobbyCode),this.ReadInitData(t.UnknownData)},t.prototype.ReadInitData=function(e){var t=JSON.parse(e);if(void 0!=t[JSONTag.Status]&&(this.data.statusInit=t[JSONTag.Status]),void 0!=t[JSONTag.WaitClient]&&(this.data.waitClient=t[JSONTag.WaitClient]),void 0!=t[JSONTag.DenominationType]&&(this.data.denominationType=t[JSONTag.DenominationType]),void 0!=t[JSONTag.DenominationList]){var n,i=t[JSONTag.DenominationList],o=[];for(n=0;n=this.data.denominationList.length||this.data.denominationId<0)&&(this.data.denominationId=0),void 0!==t[JSONTag.LineBet]&&(this.data.lineBet=t[JSONTag.LineBet]),this.data.lineBet=Math.min(this.data.lineBet,10),this.data.lineBet=Math.max(this.data.lineBet,0),GameConfig.gameType!=GameType.WayBase&&(null!=t[JSONTag.BetLineNum]&&(this.data.nBetLine=parseInt(t[JSONTag.BetLineNum])),(this.data.nBetLine<=0||this.data.nBetLine>GameConfig.maxNumOfLine)&&(this.data.nBetLine=GameConfig.maxNumOfLine)),GameConfig.gameType==GameType.DirectionalWayBase&&null!=t[JSONTag.BetDirection]&&this.data.direction.SetDirection(parseInt(t[JSONTag.BetDirection]))),this._setGameData(t)},t.prototype._setGameData=function(e){var t=[];if(void 0!=e[JSONTag.Symbol]){if("string"==typeof e[JSONTag.Symbol]){this.isIntArray=!1;var n=e[JSONTag.Symbol];t=SymbolResultConverter.CharStringToIntArray(n)}else{this.isIntArray=!0;for(var i in e[JSONTag.Symbol])t[i]=e[JSONTag.Symbol][i]}this.data.slotSymbols=t}if(t=[],void 0!=e[JSONTag.SymbolExt])if("string"==typeof e[JSONTag.SymbolExt].T){var o=e[JSONTag.SymbolExt].T,a=e[JSONTag.SymbolExt].B;t[1]=SymbolResultConverter.CharStringToIntArray(o),t[0]=SymbolResultConverter.CharStringToIntArray(a)}else{var r=e[JSONTag.SymbolExt].T,s=e[JSONTag.SymbolExt].B;t[0]=[],t[1]=[];for(var l=0;5>l;l++)t[1][l]=parseFloat(r[l]),t[0][l]=parseFloat(s[l])}else this.data.slotSymExts=new Array,t[0]=[3,7,9,5,7],t[1]=[3,7,9,5,7];this.data.slotSymExts=t,void 0!==e[JSONTag.NextAction]?this.data.nextAction=e[JSONTag.NextAction]:this.data.nextAction=-1,void 0!==e[JSONTag.WinAmount]&&(this.data.winAmount=e[JSONTag.WinAmount]),void 0!==e[JSONTag.FrAccuAmount]&&(this.data.frAccAmount=e[JSONTag.FrAccuAmount]),void 0!==e[JSONTag.GameTypeTrigger]?this.data.triggeredType=e[JSONTag.GameTypeTrigger]:this.data.triggeredType=BonusType.None,void 0!==e[JSONTag.AccuAmount]?this.data.accumulatedWinAmount=e[JSONTag.AccuAmount]:this.data.accumulatedWinAmount=BonusType.None,void 0!==e[JSONTag.FrTriggerNum]?this.data.nTriggeredFreeGame=e[JSONTag.FrTriggerNum]:this.data.nTriggeredFreeGame=0,void 0!==e[JSONTag.FrTriggerAcc]?this.data.nTriggeredAccFreeGame=e[JSONTag.FrTriggerAcc]:this.data.nTriggeredAccFreeGame=0,void 0!==e[JSONTag.FrPlayedNum]?this.data.nPlayedFreeGame=e[JSONTag.FrPlayedNum]:this.data.nPlayedFreeGame=0,void 0!==e[JSONTag.FrMultiplier]?this.data.resultMultiplier=e[JSONTag.FrMultiplier]:this.data.resultMultiplier=1,void 0!==e[JSONTag.FrSpinCount]?this.data.nFreeSpinCount=e[JSONTag.FrSpinCount]:this.data.nFreeSpinCount=0,void 0!==e[JSONTag.FrRemainNum]?this.data.nRemainingFreeGame=e[JSONTag.FrRemainNum]:this.data.nRemainingFreeGame=0,void 0!==e[JSONTag.FrMeter]?this.data.nFreeGame=e[JSONTag.FrMeter]:this.data.nFreeGame=0,void 0!==e[JSONTag.FrDepth]?this.data.gameLevel=e[JSONTag.FrDepth]:this.data.gameLevel=0,void 0!==e[JSONTag.FeAccuAmount]?this.data.featureAccumulatedAmount=e[JSONTag.FeAccuAmount]:this.data.featureAccumulatedAmount=0,void 0!==e[JSONTag.NextSpinFSO]?this.data.fso=e[JSONTag.NextSpinFSO]:this.data.fso=!1,void 0!==e[JSONTag.FSOSpinCount]?this.data.fsoCount=e[JSONTag.FSOSpinCount]:this.data.fsoCount=-1,void 0!==e[JSONTag.FSOSpinPlayed]?this.data.fsoPlayed=e[JSONTag.FSOSpinPlayed]:this.data.fsoPlayed=-1,void 0!==e[JSONTag.FSOAccumulatedWin]?this.data.fsoAccumulatedWin=e[JSONTag.FSOAccumulatedWin]:this.data.fsoAccumulatedWin=-1,void 0!==e[JSONTag.FSOEventName]?this.data.fsoName=e[JSONTag.FSOEventName]:this.data.fsoName="",null!=this._winInfoParser&&(this.data.winInfo=this._winInfoParser.ParseWinInfo(e))},t.prototype.ReadTokenPacket=function(e){var t=e;GameConfig.token=t.Token},t.prototype.ReadBalancePacket=function(e){var t=e,n=t.Field;this.data.balance,this.data.betPending;for(var i in n){var o=n[i].Index,a=n[i].Value;o==GameConfig.DataValidityFieldID?GameConfig.isSyncDataValid=1==a:o==GameConfig.LowBalanceFieldID?this.data.loBal=a:o==GameConfig.HighBalanceFieldID?this.data.hiBal=a:o==GameConfig.LowBetPendingFieldID?this.data.loPed=a:o==GameConfig.HighBetPendingFieldID?this.data.hiPed=a:o==GameConfig.isShowInGameLobbyID&&(StringUtil.getParameterByName("inum")?GameConfig.isMiniLobbyEnabled=!1:GameConfig.isMiniLobbyEnabled=(512&a)>0)}if(GameConfig.isSyncDataValid){console.log("Valid SyncData");var r=this.data.hiBal*Math.pow(2,32),s=this.data.hiPed*Math.pow(2,32);this.data.hiBal>=2147483648?this.data.balance=r|this.data.loBal:this.data.balance=r+this.data.loBal,this.data.hiPed>=2147483648?this.data.betPending=s|this.data.loPed:this.data.betPending=s+this.data.loPed}},t.prototype.ReadErrorPacket=function(e){var t=e;this.data.errorCode=t.errorCode},t.prototype.ReadJackpotPacket=function(e){var t=e,n=t.Jackpot.MajorJP,i=t.Jackpot.MinorJP,o=t.Jackpot.MiniJP;this.data.majorJackpot=n,this.data.minorJackpot=i,this.data.miniJackpot=o},t.prototype.SendRequestTokenAction=function(e){var t=Command.getCommand(55028);t.GameCode=e,t.Language=this.getLanguageString(),t.GenFor=LoginTokenGenFor.InGameTransferLogin,this._net.send(t)},t.prototype.getLanguageString=function(){switch(Localization.Instance.currentLanguage){case Language.SimplifiedChinese:return"ZH_CN";case Language.English:return"EN";case Language.TraditionalChinese:return"ZH_TW";case Language.Korean:return"KR";case Language.Japanese:return"JP";case Language.Thai:return"TH";case Language.Vietnam:return"VN";case Language.Indonesia:return"ID";default:return"EN"}},t.prototype.ResendAction=function(){this.isResend=!0,this.SendAction(this._previousAction,this._betSource,this._previousInput)},t.prototype.SendAction=function(e,t,n){if(void 0===n&&(n=null),!this.isResend){var i=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.Timeout,this,i)}this.data.waitClient=0;var o=new CMDPsSlotAction;o.Action=e%SlotAction.DebugAction,o.BetSource=t,this._betSource=t;var a=new Object;if(this._previousAction=e,this._previousInput=n,this.CreateJsonObject(a,e,n),SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();var r=JSON.stringify(a);CommonFunc.log("PsAction "+r);var s=new egret.ByteArray;s.endian=egret.Endian.LITTLE_ENDIAN,s.position=0,BitwiseUtil.writeString(s,r),s.position=0,o.UnknownData=s,this._net.send(o),this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!0,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1},t.prototype.CheckTimeout=function(){SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isWaitingForBalanceUpdate=!0:(SocketManager.getInstance().isWaitingForBalanceUpdate=!0,SocketManager.getInstance().Reconnect())},t.prototype.Timeout=function(){CommonFunc.log("SendAction Timeout."),SocketManager.getInstance().isStarted=!1,SocketManager.getInstance().ForceClose()},t.prototype.SendActionDone=function(){if(0!=this.data.triggeredType){if(!SocketManager.getInstance().IsConnected())return}else if(this.data.IsFreeGame()){if(-1==this.data.nextAction){if(this.data.IsLastFreeGameFinished()&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(0==this.data.nextAction&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(-1==this.data.nextAction){if(!this.data.IsFreeGameTriggered()&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(0==this.data.nextAction&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return;var e=new CMDPsSlotActionDone;this._net.send(e)},t.prototype.SendDebugJackpot=function(e){var t=new CMDPsEgameDebugJackpot;t.JackpotType=e,this._net.send(t)},t.prototype.CreateJsonObject=function(e,t,n){switch(void 0===n&&(n=null),t){case SlotAction.Spin:this.CreateSpinJSONData(e);break;case SlotAction.Free:case SlotAction.Free2:var i=n;this.CreateFreeSpinJSONData(e,i);break;case SlotAction.Feature1:var o=n;this.CreateFeatureJSONData(e,o);break;case SlotAction.DebugFeature1:var a=n;this.CreateDebugFeatureJSONData(e,a);break;case SlotAction.DebugSpin:var r=n;this.CreateDebugSpinJSONData(e,r);break;case SlotAction.DebugFree:case SlotAction.DebugFree2:r=n,this.CreateDebugSpinJSONData(e,r)}},t.prototype.AddCommonJSONData=function(e){e[JSONTag.GameCode]=GameConfig.GameCode,e[JSONTag.DenominationId]=String(this.data.denominationId),e[JSONTag.LineBet]=String(this.data.lineBet),e[JSONTag.GmGambleAct]="-1",e[JSONTag.Feature1SelectionId]="-1",e[JSONTag.Feature2SelectionId]="-1",GameConfig.gameType==GameType.DirectionalWayBase&&(e[JSONTag.BetDirection]=this.data.direction.GetDirection())},t.prototype.CreatePSSlotDebugJackpot=function(e){var t=Command.getCommand(55027);return t.JackpotType=e,t},t.prototype.CreateSpinJSONData=function(e){this.AddCommonJSONData(e)},t.prototype.CreateFreeSpinJSONData=function(e,t){void 0===t&&(t=null),this.AddCommonJSONData(e),null!=t&&-1!=t.selectionId&&(e[JSONTag.FrSymbolSelected]=t.selectionId)},t.prototype.CreateDebugSpinJSONData=function(e,t){if(this.AddCommonJSONData(e),GameConfig.isScreenBased){var n,i=[],o=t.symbols.length;for(n=0;o>n;n++){var a=t.symbols[n];if("object"==typeof a[0])for(var r=0;rn;n++)s.push(String(t.symbols[n]));this.isIntArray?e[JSONTag.ExpectedSymbol]=s:e[JSONTag.ExpectedSymbol]=SymbolResultConverter.IntArrayToCharString(s)}},t.prototype.CreateFeatureJSONData=function(e,t){this.AddCommonJSONData(e);var t=t;-1!=t.featureSelectCharacter?e[JSONTag.CharacterSelectID]=t.featureSelectCharacter:e[JSONTag.Feature1SelectionId]=t.featureSelectionID},t.prototype.CreateDebugFeatureJSONData=function(e,t){this.AddCommonJSONData(e);var t=t;-1!=t.featureSelectCharacter?e[JSONTag.CharacterSelectID]=t.featureSelectCharacter:(e[JSONTag.Feature1SelectionId]=t.featureSelectionID,e[JSONTag.ExpectedF1Result]=t.featureExpectResult)},t.prototype.SendBetQuery=function(e,t){var n=new CMDPsBetLogQuery;return n.FromDate=e,n.ToDate=t,this.betlogFromDate=e,this.betlogToDate=t,SocketManager.getInstance().isBetLogReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect():(this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,SocketManager.getInstance().isBetLogReconnect=!1,void this._net.send(n))},t.prototype.SendRankingListRequest=function(e,t){var n=new CMDPsRankingList;return n.RankingType=e,n.GameCategory=t,this.rankingReconnect=[e,t],SocketManager.getInstance().isRankingReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect():(this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,SocketManager.getInstance().isRankingReconnect=!1,void this._net.send(n))},t.prototype.onCampaignDetailTimerComplete=function(){egret.clearTimeout(this.campaignDetailTimeoutTimer),this.campaignDetailTimeoutTimer=-1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.CAMPAIGN_DETAIL_TIMEOUT))},t.prototype.onCampaignWinnerListTimerComplete=function(){egret.clearTimeout(this.campaignWinnerListTimeoutTimer),this.campaignWinnerListTimeoutTimer=-1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.CAMPAIGN_WINNERLIST_TIMEOUT))},t.LOW_BANLANCE=7,t.HIGH_BANLANCE=8,t.LOW_BET_PENDING=9,t.HIGH_BET_PENDING=10,t}(egret.EventDispatcher);__reflect(SlotActionManager.prototype,"SlotActionManager");var SlotData=function(){function e(){this.balance=-1,this.betPending=0,this.hiBal=0,this.loBal=0,this.hiPed=0,this.loPed=0,this.isCW=0,this.direction=new BetDirection,this.unsettledEGamesList=[],this.isWinAmountInclude=!1,this.lineBetList=[],this.denominationList=[],this.slotSymbols=[],this.winInfo=[],this.slotSymExts=[],this.freeMeter=0,this.selectionID=-1,this.randomID=-1,this.campaignDetailsData=[],this.campaignWinnerListData=[],this.campaignInvolvedGamesData=[],this.campaignList=[],this.campaignAwardData=[],this.fsoEventListPopup=-1}return e.prototype.GetInitGameMode=function(){switch(this.statusInit){case SceneType.Base:return!this.isNextFSOSpin()&&this.fsoPlayed<=0?SceneType.Base:SceneType.FSO;case SceneType.Free:return this.IsFreeGameCompleted()?!this.isNextFSOSpin()&&this.fsoPlayed<=0?SceneType.Base:SceneType.FSO:SceneType.Free;case SceneType.Feature1:return this.IsFeatureGameCompleted()?SceneType.Free:SceneType.Feature1}return SceneType.Base},e.prototype.isNextFSOSpin=function(){return this.fso},e.prototype.isLastFSOSpin=function(){return this.fsoCount-this.fsoPlayed==0},e.prototype.GetCredit=function(){return this.denominationList[this.denominationId]*this.lineBet},e.prototype.GetTotalBet=function(){return this.nBetLine*this.denominationList[this.denominationId]*this.lineBet},e.prototype.GetFSOTotalBet=function(){return this.nBetLine*this.fsoDenominationValue*this.lineBet},e.prototype.IsBalanceReady=function(){return this.balance>=0},e.prototype.IsEnoughBalance=function(){CommonFunc.log("balance: "+(this.balance-this.betPending)),CommonFunc.log("Total Bet: "+this.GetTotalBet());var e=this.balance-this.betPending;return this.isWinAmountInclude&&(e+=this.IsFreeGameCompleted()?this.accumulatedWinAmount:this.winAmount),e>=this.GetTotalBet()?!0:!1},e.prototype.IsEnoughBalanceMax=function(){var e=this.balance-this.betPending;return this.isWinAmountInclude&&(e+=this.IsFreeGameCompleted()?this.accumulatedWinAmount:this.winAmount),e>=GameConfig.maxNumOfLine*this.denominationList[this.denominationId]*10?!0:!1},e.prototype.SetMaxBet=function(){this.nBetLine=GameConfig.maxNumOfLine,this.lineBet=10},e.prototype.ParseFSODetailJson=function(){var e=JSON.parse(this.fsoDetailJsonString);this.lineBet=e.FSOLB,GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase?this.nBetLine=e.FSOLN:this.nBetLine=GameConfig.maxNumOfLine,this.fsoDenominationValue=e.FSODV,this.fsoCount=e.FSOC,this.fsoPlayed=e.FSOP,this.fso=e.FSO,this.fsoName=e.FSON},e.prototype.SetFSOBetSetting=function(){GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase?this.nBetLine=this.fsoLineNumber:this.nBetLine=GameConfig.maxNumOfLine,this.lineBet=this.fsoLineBet},e.prototype.IsFreeGameCompleted=function(){return 0==this.nFreeGame&&this.nPlayedFreeGame==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0&&0==this.waitClient?!0:!1},e.prototype.IsLastFreeGameFinished=function(){return 0==this.nFreeGame&&this.nPlayedFreeGame==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0?!0:!1},e.prototype.IsFreeGame=function(){return this.nTriggeredFreeGame>0||this.nTriggeredAccFreeGame>0?!0:!1},e.prototype.IsFreeGameTriggered=function(){return 0!=this.triggeredType?!0:!1},e.prototype.IsFeatureGameCompleted=function(){return!1},e.prototype.GetTriggerWinInfoIdx=function(){for(var e=new Array,t=0;t0&&e.push(t);return e},e.prototype.IsWinInfoHasPayout=function(e){return this.winInfo[e].GetPayout()>0?!0:!1},e.prototype.GetScreenID=function(){return this.screenID},e.prototype.ResetScreenID=function(){this.screenID=0},e.prototype.IncrementScreenID=function(){this.screenID++},e.prototype.SetLastScreenID=function(){this.screenID=this.GetLastScreenID()},e.prototype.GetLastScreenID=function(){return this.screenDatas.length-1},e.prototype.UpdateCurrentScreenData=function(e){void 0===e&&(e=-1),-1==e&&(e=this.GetLastScreenID()),this.slotSymbols=this.screenDatas[e].slotSymbols,this.winInfo=this.screenDatas[e].winInfo,this.winAmount=this.screenDatas[e].winAmount,this.accumulatedWinAmount=this.screenDatas[e].accumulatedWinAmount,this.triggeredType=this.screenDatas[e].triggerType},e.prototype.CheckInitScreenDatas=function(){for(var e=0;e0&&this.fsoEventDetail.splice(t,1),this.fsoID=-1);EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.SHOW_GIFTBOX))},e.prototype.CheckFSOEventDetailOrder=function(){for(var e=0;e0&&this.gameStateController.ResetFreeGameData(!1),this.gameStateController.balance+=t.accumulatedWinAmount,this.CreateAndReturnPacketWithDelay(30008,.2,this.gameStateController.balance))}},DebugNetSocket.prototype.close=function(){},DebugNetSocket.prototype.destroy=function(){},DebugNetSocket.prototype.CreateAndReturnPacketWithDelay=function(e,t){for(var n=[],i=2;i0&&(t=e[0]);var n=Command.getCommand(30008),i=new CMDField;i.Index=7,i.Value=t;var o=new CMDField;return o.Index=19,o.Value=1,n.Field=[i,o],n},DebugNetSocket.prototype.RandomInitData=function(){var e=DebugResultType.DataWithNoWin+Math.floor(1*Math.random());return JSON.stringify(this.warpInitResult(this.CreateData(e,!1)))},DebugNetSocket.prototype.RandomData=function(){var e=0;if(this.gameStateController.GetState()==LocalDebug.GameState.Base){if(this.gameStateController.GetState()==LocalDebug.GameState.Base&&(this.tempAccumulatedWinAmount=0,this.tempFreeAccumulatedWinAmount=0),this.gameStateController.ResetFreeGameData(),GameConfig.DebugResultType==DebugResultType.DataWithTriggerWin)return GameConfig.DebugResultType=-1,this.gameStateController.ToFree(),e=DebugResultType.DataWithTriggerWin,JSON.stringify(this.CreateData(e,!1));var t=this.gameStateController.ToNextGameStateFromBaseGame();return t==LocalDebug.GameState.Free?(e=DebugResultType.DataWithTriggerWin,JSON.stringify(this.CreateData(e,!1))):(e=this.GetRandomIndex(),GameConfig.DebugResultType>=0&&(e=GameConfig.DebugResultType,GameConfig.DebugResultType=-1),JSON.stringify(this.CreateData(e,!1)))}return e=this.GetRandomIndex(),GameConfig.DebugResultType>=0&&(e=GameConfig.DebugResultType,GameConfig.DebugResultType=-1),JSON.stringify(this.warpFreeResult(this.CreateData(e,!1),e))},DebugNetSocket.prototype.GetRandomIndex=function(){for(var e=Math.floor(5*Math.random()),t=(e+1)*(e+1);0!=Math.floor(Math.random()*t);)e=Math.floor(5*Math.random()),t=(e+1)*(e+1);return e},DebugNetSocket.prototype.CreateData=function(e,t){var n="Create"+DebugResultType[e],i=this[n].bind(this);return"function"==typeof i?(CommonFunc.log(n),i()):"error"},DebugNetSocket.prototype.CreateDataWithNoWin=function(){var e=this.resultArray[DebugResultType.DataWithNoWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithWin=function(){var e=this.resultArray[DebugResultType.DataWithWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithJackpotWin=function(){var e=this.resultArray[DebugResultType.DataWithWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithTriggerWin=function(){var e=this.resultArray[DebugResultType.DataWithTriggerWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithBigWin=function(){var e=this.resultArray[DebugResultType.DataWithBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithSuperBigWin=function(){var e=this.resultArray[DebugResultType.DataWithSuperBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithMegaBigWin=function(){var e=this.resultArray[DebugResultType.DataWithMegaBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.generateBaseResult=function(result){this.tempWinAmount=0;for(var jsonObj=CommonFunc.assign(new Object,result.base),availableSymbolArray=result.s.slice(),sortedSymbolArray=[];availableSymbolArray.length>0;){var rand=Math.floor(Math.random()*availableSymbolArray.length);sortedSymbolArray[sortedSymbolArray.length]=availableSymbolArray[rand],availableSymbolArray.splice(rand,1)}jsonObj.CSB=this.generateSymbolResultStr(jsonObj.CSB,sortedSymbolArray),null!=jsonObj.CSE&&(jsonObj.CSE.T=this.generateSymbolResultStr(jsonObj.CSE.T,sortedSymbolArray),jsonObj.CSE.B=this.generateSymbolResultStr(jsonObj.CSE.B,sortedSymbolArray));var winInfos=jsonObj.CWL;if((GameConfig.gameType==GameType.WayBase||GameConfig.gameType==GameType.DirectionalWayBase)&&(winInfos=jsonObj.CWP),null!=winInfos)for(var i=0;i0?data.freeMeter+=TriggerTimes:data.freeMeter+=jsonObj.CGT>0?1:0}else null!=jsonObj.FTF&&(TriggerTimes>0||jsonObj.CGT>0)&&this.gameStateController.AddFreeSpin(jsonObj.FTF);return jsonObj},DebugNetSocket.prototype.generateScreenResult=function(jsonObj,sortedSymbolArray){this.tempWinAmount=0,jsonObj.CSB=this.generateSymbolResultStr(jsonObj.CSB,sortedSymbolArray),null!=jsonObj.CSE&&(jsonObj.CSE.T=this.generateSymbolResultStr(jsonObj.CSE.T,sortedSymbolArray),jsonObj.CSE.B=this.generateSymbolResultStr(jsonObj.CSE.B,sortedSymbolArray));var winInfos=jsonObj.CWL;if((GameConfig.gameType==GameType.WayBase||GameConfig.gameType==GameType.DirectionalWayBase)&&(winInfos=jsonObj.CWP),null!=winInfos)for(var i=0;i0?(null!=jsonObj.FTF&&this.gameStateController.AddFreeSpin(jsonObj.FTF),!0):!1},DebugNetSocket.prototype.warpInitResult=function(e){var t=CommonFunc.assign(e,this.initJson.base);return t},DebugNetSocket.prototype.warpFreeResult=function(e,t){var n=3;this.gameStateController.IncrementFreeSpinIndex();var i=CommonFunc.assign(e,this.freeJson);i.FSN=this.gameStateController.GetCurrentFreeSpinIndex();var o=0;if(null!=i.FTF&&(o=i.FTF),i.FFC=this.gameStateController.GetFreeGameSpinCount()-o,i.FSC=this.gameStateController.GetTotalFreeSpinPlayed()-o,this.tempFreeAccumulatedWinAmount+=i.CWA,null!=e.SPR){for(var a=0;a0&&(this.animationCount++,this.fullReelWildIndexArray.push(o));this.totalAnimationCount=this.animationCount;var a=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount],r=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount]+1;if(GameConfig.platform==Platform.desktop)switch(this.reelMultiArray[a]){case 2:n="FullReelWildB",i="FullReelWildBLoop",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="FullReelWildA",i="FullReelWildALoop",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}else switch(this.reelMultiArray[a]){case 2:n="FullReelWildB_Mobile",i="FullReelWildBLoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="FullReelWildA_Mobile",i="FullReelWildALoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}var s=new Object;s.Multiplier=this.reelMultiArray[a];for(var l=this.slotController.slotView.GetStopReelOrderedReel(r),o=1;o0&&s.CurrentSymbol.SetContent(n,i),EventCentral.getInstance().addEventListener(SceneNotify.BIGSYMBOL_ANIMATION_COMPLETED,this.OnAnimationFinished,this),this.slotController.slotView.GetStopReelOrderedReel(r).effectHandler.ExecuteEffect(SlotEffectCollection.fullReelWild,s)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.fullReelWild),this.animationCount=0,this.totalAnimationCount=0,this.reelMultiArray=[],this.fullReelWildIndexArray=new Array},t.prototype.NextFullReelWildAnimation=function(){var e="",t="",n=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount],i=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount]+1;if(GameConfig.platform==Platform.desktop)switch(this.reelMultiArray[n]){case 2:e="FullReelWildB",t="FullReelWildBLoop",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:e="FullReelWildA",t="FullReelWildALoop",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}else switch(this.reelMultiArray[n]){case 2:e="FullReelWildB_Mobile",t="FullReelWildBLoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:e="FullReelWildA_Mobile",t="FullReelWildALoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}var o=new Object;o.Multiplier=this.reelMultiArray[n];for(var a=this.slotController.slotView.GetStopReelOrderedReel(i),r=1;r0&&o.CurrentSymbol.SetContent(e,t),this.slotController.slotView.GetStopReelOrderedReel(i).effectHandler.ExecuteEffect(SlotEffectCollection.fullReelWild,o)},t.prototype.OnAnimationFinished=function(e){this.animationCount--,0==this.animationCount?(EventCentral.getInstance().removeEventListener(SceneNotify.BIGSYMBOL_ANIMATION_COMPLETED,this.OnAnimationFinished,this),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SPECIAL_EVENT_FINISHED))):this.NextFullReelWildAnimation()},t}(Effect);__reflect(FullReelWildEffect.prototype,"FullReelWildEffect");var ScatterOneSecondEffect=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t}return __extends(t,e),t.prototype.Evaluate=function(){this.data.FeatureSymbolArray=new Array,this.data.FeatureSymbolArray=SlotConfig.FeatureSymbolIDs,this.data.ScatterSymbolPosition=new Array,this.data.SoundCount=-1,EventCentral.getInstance().addEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.IsNeed=function(e){void 0===e&&(e=-1),this.CheckFeatureAndCharging(this.data.FeatureSymbolArray);var t=this.CheckFeatureSymbols(e);return null!=t&&t.length>0?(this.data.ScatterSymbolPosition=t,!0):!1},t.prototype.Execute=function(e,t){void 0===t&&(t=null);this.CheckFeatureSymbols(e);this.data.ScatterSymbolPosition.length>0&&this.data.SoundCount++,this.slotController.slotView.GetStopReelOrderedReel(e).effectHandler.ExecuteEffect(SlotEffectCollection.scatterOneSecond,this.data)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.scatterOneSecond),this.data=new Object},t.prototype.OnReelStartStoppingExecute=function(e){var t=this.slotController.slotView.GetStopReelOrderByReelId(e.data);this.IsNeed(t)&&this.Execute(t,"")},t.prototype.OnReelStopExecute=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.CheckFeatureAndCharging=function(e){var t,n,i,o;this.data.ChargingArray=new Array(5);var a=this.data.ChargingArray;for(t=0;t1&&a[t].push(e[i]),n=0;n0){var e=Math.floor(this.data.jackpotAmount/100),t=this.data.jackpotType.toString()+","+e.toString(),n=new SysNotify(SysNotify.SHOW_RESUME_JACKPOT_POPUP);n.data=t,EventCentral.getInstance().dispatchEvent(n),this.data.jackpotAmount=0,this.data.jackpotType=0}},t.prototype.Resume=function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY))},t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.JACKPOT_FINISHED,this.on_jackpot_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().addEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1,1),EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_FINISHED,this.on_restart_game,this),EventCentral.getInstance().addEventListener(SysNotify.FSO_REDEEMED,this.on_fso_redeemed,this)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.JACKPOT_FINISHED,this.on_jackpot_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().removeEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1),EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_FINISHED,this.on_restart_game,this),EventCentral.getInstance().removeEventListener(SysNotify.FSO_REDEEMED,this.on_fso_redeemed,this)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction(),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.triggeredType==BonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_trigger_animation_finished=function(e){this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_To_Feature_Idle)},t.prototype.on_jackpot_finished=function(e){this.data.jackpotAmount=0,this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_special_event_finished=function(e){this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.on_sync_data_ready=function(e){this.data.IsBalanceReady&&this.currentState==SlotReelState.IDLE&&(this.data.IsEnoughBalance()?FesConstant.FES_ENABLE&&FesInfo.INFO_LOADED&&FesInfo.TO_SHOW&&!FesInfo.FINISHED||GameConfig.isOverlayOpened||EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON)):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund"))),this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,GameConfig.TurboModeState&&GameConfig.isTurboMode?requestAnimationFrame(this.StopSpin):this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.on_fso_redeemed=function(e){this.ToFSO()},t.prototype.on_restart_game=function(e){console.log("After Effect restart game"),this.ToState(GameConfig.previousGameState),GameConfig.previousGameState=-1},t.prototype.stop_bgm=function(e){this.timer.removeEventListener("stop_bgm",this.stop_bgm,this),AudioManager.Instance.stopBgm()},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t.prototype.CheckAndExecuteAutoSpin=function(){0!=GameConfig.autoSpinTimes&&this.data.IsEnoughBalance()?this.on_start_pressed():this.data.IsEnoughBalance()||(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)))},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Jackpot:return this.StateJackpot(),!0;case GameState.Slot_To_Feature_Idle:return this.StateFeatureIdle(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateIdle=function(){if(this.data.currentGameState=GameState.Slot_Idle,void 0!=FesEventController&&null!=FesEventController&&FesEventController.getInstance().IsFesEventTriggered())return GameConfig.previousGameState=GameState.Slot_Idle,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),void FesEventController.getInstance().CheckIsInfoReady();if(FesEventController.getInstance().RemoveListeners(),this.data.IsBalanceReady()&&!this.data.IsEnoughBalance(),this.data.isNextFSOSpin())return this.ToFSO(),void(GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))));if(EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON)),this.data.isReceivedFSOPrize){CommonFunc.log(" ShowFreeSpinOfferCongratulationPanel");new CampaignAward;this.data.isReceivedFSOPrize=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_FSO_CONGRATULATIONPANEL)),SocketManager.getInstance().SendRequestFSOEventListAction(),GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)))}if(GameConfig.isAutoSpin&&this.CheckAndExecuteAutoSpin(),!this.data.isNextFSOSpin()&&1==this.data.fsoEventListPopup&&this.data.fsoEventList.length>0&&0==GameConfig.isAutoSpin){SocketManager.getInstance().SendFsoNotificationReceived(),CommonFunc.log(" ShowFreeSpinOfferRedeemPage");new FSOPanel}},t.prototype.StateSpinning=function(){this.data.currentGameState=GameState.Slot_Spinning,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var e=new Object;e.type=MessageType.GoodLuck,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateJackpot=function(){this.ShowJackpot()},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount):this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount):this.ShowBigWin(1,this.data.winAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.winAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmountn&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.ShowJackpot=function(){var e=this.data.jackpotType.toString()+","+this.data.jackpotAmount;CommonFunc.log("Show Jackpot, amount: "+this.data.jackpotAmount),GameSceneManager.GetInstance().ShowOverlay("Jackpot",e)},t.prototype.CheckTimeout=function(){},t.prototype.ToFreeGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Free)},t.prototype.ToFeature1=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Feature1)},t.prototype.ToFSO=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.FSO)},t.prototype.delay_stop_bgm=function(){this.timer=new egret.Timer(5e3,1),this.timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.stop_bgm,this),this.timer.start()},t}(SlotGameStateController);__reflect(BaseGameStateController.prototype,"BaseGameStateController");var BaseSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,GameConfig.platform==Platform.desktop?a.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_json."+a.currentId.toString())):a.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_Mobile_json."+a.currentId.toString())),a.movieClipSource=SlotConfig.Items[a.currentId.toString()],a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),null==a.currentSymbol?(console.error("cannot find slot "+a.currentId.toString()),a):(a.visible=!0,a.currentSymbol.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,a.currentSymbol.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,a.currentSymbol.anchorOffsetX=.5*a.currentSymbol.width,a.currentSymbol.anchorOffsetY=.5*a.currentSymbol.height,a.currentSymbol.x=.5*a.width,a.currentSymbol.y=.5*a.height,a.touchEnabled=!1,a.addChild(a.currentSymbol),a)}return __extends(t,e),t.prototype.SetReelId=function(e){this.reelId=e},t.prototype.Fade=function(e,t){var n=egret.Tween.get(this.content);e?n.to({alpha:1},t):n.to({alpha:0},t)},t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){this.currentId=e;try{this.currentSymbol.parent.removeChild(this.currentSymbol)}catch(t){}this.movieClipSource=SlotConfig.Items[this.currentId.toString()],null!=this.movieClipSource&&(GameConfig.platform==Platform.desktop?this.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_json."+this.currentId.toString())):this.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_Mobile_json."+this.currentId.toString())),this.currentSymbol.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.currentSymbol.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.currentSymbol.anchorOffsetX=.5*this.currentSymbol.width,this.currentSymbol.anchorOffsetY=.5*this.currentSymbol.height,this.currentSymbol.x=.5*this.width,this.currentSymbol.y=.5*this.height,this.addChild(this.currentSymbol))},t.prototype.GetResult=function(){return this.currentId},t.prototype.SetOriginPosition=function(e,t){this.x=e,this.y=t,this.posX=e,this.posY=t},t.prototype.PlayAnimation=function(e){return null!=this.content&&(this.content.parent.removeChild(this.content),this.content=null),this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+this.currentId.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=this.currentSymbol.anchorOffsetX,this.content.anchorOffsetY=this.currentSymbol.anchorOffsetY,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.currentSymbol.visible=!1,this.addChild(this.content),e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y,void this.content.gotoAndPlay(0))},t.prototype.HitSpecialAnimation=function(e){var t=this;return null!=this.content&&(this.content.parent.removeChild(this.content),this.content=null),this.movieClipSource=SlotConfig.Items[e.toString()],this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+e.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=this.currentSymbol.anchorOffsetX,this.content.anchorOffsetY=this.currentSymbol.anchorOffsetY,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.currentSymbol.visible=!1,this.addChildAt(this.content,0),this.winningMask.addChild(this),this.content.gotoAndPlay(0),void(this.newSpecialTimer=setInterval(function(){return t.CheckAnimationFinished()},1e3/30)))
},t.prototype.CheckAnimationFinished=function(){this.content.currentFrame==this.content.totalFrames&&(this.currentSymbol.visible=!0,null!=this.content&&(this.content.gotoAndStop(0),this.content.parent.removeChild(this.content),this.content=null),clearInterval(this.newSpecialTimer),this.SetResult(this.currentId))},t.prototype.StopSymbolAnimation=function(){clearInterval(this.newSpecialTimer),this.idleMask.UpdateLayer(this),this.symbolBorder.StopAnimation(),null!=this.content&&(this.content.gotoAndStop(0),this.content.parent.removeChild(this.content),this.content=null),this.currentSymbol.visible=!0},t.prototype.SetValidSymbolIdxRange=function(e,t){this.minIdx=e,this.maxIdx=t},t.prototype.InitContent=function(){},t}(SlotSymbol);__reflect(BaseSlotSymbol.prototype,"BaseSlotSymbol");var DragonBones2SlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.idleMask=t,a.winningMask=n,a.borderMask=i,SlotConfig.isSymbolBorderExist?(a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content)):a.symbolBorder=null,a.visible=!0,a.backgroundEffect=new Object,a.body=new Object,a.overlayEffect=new Object,a.image=new egret.Bitmap,a.touchEnabled=!1,a.SetResult(a.currentId),a}return __extends(t,e),t.prototype.SetResult=function(e){this.currentId=e,void 0!=this.image.parent&&this.removeChild(this.image);var t;switch(GameConfig.platform==Platform.desktop,t="AllSlotSymbol_Idle_json",this.slotSymbolState){case SlotSymbolState.IDLE:this.image=new egret.Bitmap(RES.getRes(t+"."+SlotConfig.Items[this.currentId].idle)),this.image.visible=!0;break;case SlotSymbolState.ANIMATION:this.image.visible=!1;break;case SlotSymbolState.SPINNING:this.image=new egret.Bitmap(RES.getRes(t+"."+SlotConfig.Items[this.currentId].idle)),this.image.visible=!0}void 0==this.image.parent&&this.addChildAt(this.image,0),this.image.anchorOffsetX=.5*this.image.width,this.image.anchorOffsetY=.5*this.image.height,this.image.scaleX=SlotConfig.SLOT_IDLE_SCALE*GameConfig.ContentScale,this.image.scaleY=SlotConfig.SLOT_IDLE_SCALE*GameConfig.ContentScale,this.image.x=.5*this.width,this.image.y=.5*this.height},t.prototype.GetResult=function(){return this.currentId},t.prototype.PlayAnimation=function(e){this.StopSymbolAnimation(),this.slotSymbolState=SlotSymbolState.ANIMATION,this.winningMask.addChild(this),e&&SlotConfig.isSymbolBorderExist&&(this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y),this.image.visible=!1,""!=SlotConfig.Items[this.currentId].background&&(this.backgroundEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].background),this.backgroundEffect=this.backgroundEffectArmature.display,void 0==this.backgroundEffect.parent&&this.addChildAt(this.backgroundEffect,0),this.backgroundEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].background),this.backgroundEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.x=.5*this.width,this.backgroundEffect.y=.5*this.height),this.bodyArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].body),this.body=this.bodyArmature.display,void 0==this.body.parent&&this.addChildAt(this.body,1),this.body.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].body),this.body.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.x=.5*this.width,this.body.y=.5*this.height,""!=SlotConfig.Items[this.currentId].overlay&&(this.overlayEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].overlay),this.overlayEffect=this.overlayEffectArmature.display,void 0==this.overlayEffect.parent&&this.addChildAt(this.overlayEffect,2),this.overlayEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].overlay),this.overlayEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.x=.5*this.width,this.overlayEffect.y=.5*this.height)},t.prototype.HitSpecialAnimation=function(e){switch(this.StopSymbolAnimation(),this.slotSymbolState=SlotSymbolState.ANIMATION,this.winningMask.addChild(this),this.image.visible=!1,this.animationName="",e){case SymbolType.FourSecScatter:this.currentId=SymbolType.Scatter,this.animationName="4s";break;case SymbolType.FourSecWild:this.currentId=SymbolType.Wild,this.animationName="4s";break;case SymbolType.OneSecScatter:this.currentId=SymbolType.Scatter,this.animationName="1s";break;case SymbolType.OneSecWild:this.currentId=SymbolType.Wild,this.animationName="1s";break;default:this.animationName="2s"}""!=SlotConfig.Items[this.currentId].background&&(this.backgroundEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].background),this.backgroundEffect=this.backgroundEffectArmature.display,void 0==this.backgroundEffect.parent&&this.addChildAt(this.backgroundEffect,0),this.backgroundEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].background,0,0,1),this.backgroundEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.x=.5*this.width,this.backgroundEffect.y=.5*this.height),this.bodyArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].body),this.body=this.bodyArmature.display,void 0==this.body.parent&&this.addChildAt(this.body,1),this.body.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].body,0,0,1),this.body.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.x=.5*this.width,this.body.y=.5*this.height,""!=SlotConfig.Items[this.currentId].overlay&&(this.overlayEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].overlay),this.overlayEffect=this.overlayEffectArmature.display,void 0==this.overlayEffect.parent&&this.addChildAt(this.overlayEffect,0),this.overlayEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].overlay,0,0,1),this.overlayEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.x=.5*this.width,this.overlayEffect.y=.5*this.height)},t.prototype.StopReelTween=function(){GameConfig.isTurboMode&&GameConfig.TurboModeState?TweenLite.to(this,.01,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)}):TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){GameConfig.isTurboMode&&GameConfig.TurboModeState?(this.y=this.posY+40,TweenLite.to(this,.2,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})):(this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)}))},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.StopSymbolAnimation=function(){SlotConfig.isSymbolBorderExist&&this.symbolBorder.StopAnimation(),null!=this.backgroundEffect&&(null!=this.backgroundEffect.parent&&(this.removeChild(this.backgroundEffect),this.backgroundEffect=null),this.backgroundEffect=new Object,void 0!=this.backgroundEffectArmature&&(this.backgroundEffectArmature.dispose(),this.backgroundEffectArmature=null)),null!=this.overlayEffect&&(this.overlayEffect.parent==this&&(this.removeChild(this.overlayEffect),this.overlayEffect=null),this.overlayEffect=new Object,void 0!=this.overlayEffectArmature&&(this.overlayEffectArmature.dispose(),this.overlayEffectArmature=null)),null!=this.body&&(this.body.parent==this&&(this.removeChild(this.body),this.body=null),this.body=new Object,void 0!=this.bodyArmature&&(this.bodyArmature.dispose(),this.bodyArmature=null)),this.slotSymbolState=SlotSymbolState.IDLE,this.SetResult(this.currentId)},t}(SlotSymbol);__reflect(DragonBones2SlotSymbol.prototype,"DragonBones2SlotSymbol");var DragonBonesSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),a.visible=!0,a.content=DragonBonesManager.getInstance().CreateArmature("SlotSymbol"),a.sequenceContent=DragonBonesManager.getInstance().CreateArmature("SlotSymbol_seq");var r=a.content.getDisplay();return r.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.x=.5*a.width,r.y=.5*a.height,a.addChild(r),void 0!=a.sequenceContent&&(r=a.sequenceContent.getDisplay(),r.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.x=.5*a.width,r.y=.5*a.height,a.addChild(r)),a.touchEnabled=!1,a.SetResult(a.currentId),a}return __extends(t,e),t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){this.currentId=e,0==SlotConfig.Items[e].isSequence||null==SlotConfig.Items[e].isSequence?(this.content.animation.gotoAndStop(this.currentId.toString()),this.content.getDisplay().visible=!0,void 0!=this.sequenceContent&&(this.sequenceContent.getDisplay().visible=!1),this.currentContent=this.content):(this.sequenceContent.animation.gotoAndStop(this.currentId.toString()),this.content.getDisplay().visible=!1,this.sequenceContent.getDisplay().visible=!0,this.currentContent=this.sequenceContent)},t.prototype.GetResult=function(){return this.currentId},t.prototype.PlayAnimation=function(e){this.currentContent.animation.gotoAndPlay(this.currentId.toString()),e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y},t.prototype.HitSpecialAnimation=function(e){this.winningMask.addChild(this),0==SlotConfig.Items[e].isSequence?(this.content.animation.gotoAndPlay(e.toString(),0,0,1),this.content.getDisplay().visible=!0,void 0!=this.sequenceContent&&(this.sequenceContent.getDisplay().visible=!1),this.currentContent=this.content):(this.sequenceContent.animation.gotoAndPlay(e.toString(),0,0,1),this.content.getDisplay().visible=!1,this.sequenceContent.getDisplay().visible=!0,this.currentContent=this.sequenceContent)},t.prototype.StopSymbolAnimation=function(){this.symbolBorder.StopAnimation();var e=this.currentContent;e.animation.gotoAndStopByFrame(e.animation.lastAnimationName,0)},t}(SlotSymbol);__reflect(DragonBonesSlotSymbol.prototype,"DragonBonesSlotSymbol");var SlotController=function(e){function t(){var t=e.call(this)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t.previousTime=0,t.timeBuffer=0,t.normalInterval=1e3,t.chargingInterval=2800,t.currentReelIdx=0,t.effectHandler=new SlotEffectHandler(t),t.AddListeners(),t.normalInterval=SlotConfig.SPIN_DUR,t.chargingInterval=SlotConfig.SPIN_DUR_SP,t}return __extends(t,e),t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.START_SPIN,this.OnSpinStart,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_SPIN,this.StopSpin,this),EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),EventCentral.getInstance().addEventListener(SysNotify.BET_INFO_UPDATE,this.OnLineInfoUpdate,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.OnDataReady,this,!1,0),EventCentral.getInstance().addEventListener(SceneNotify.SHOW_WININFO_ANIMATION,this.OnShowWinningAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,this.StopAllSymbolAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.SHOW_All_RESULT,this.OnShowAllWinningAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.START_TRIGGER_ANIMATION,this.ShowTriggerAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.PLAY_EFFECT,this.PlayEffect,this)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.START_SPIN,this.OnSpinStart,this),EventCentral.getInstance().removeEventListener(SceneNotify.STOP_SPIN,this.StopSpin,this),EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),EventCentral.getInstance().removeEventListener(SysNotify.BET_INFO_UPDATE,this.OnLineInfoUpdate,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.OnDataReady,this),EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_WININFO_ANIMATION,this.OnShowWinningAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,this.StopAllSymbolAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_All_RESULT,this.OnShowAllWinningAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.START_TRIGGER_ANIMATION,this.ShowTriggerAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.PLAY_EFFECT,this.PlayEffect,this)},t.prototype.ShowAllReels=function(){for(var e=0;en){this.timeBuffer=0,this.slotView.GetStopReelOrderedReel(this.currentReelIdx).PrepareToStop();for(var i=0;ia;a++)this.numOfSignificantSymbols.push(i);else if(i instanceof Object)for(var a=0;a0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Feature1,this.OnTransitionEnd,this);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.OnTransitionEnd=function(){console.log("----------------OnTransitionEnd"),this.HideSlotGameUI(),AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0,this.stateController.Start()},t}(FeatureGameSceneHandler);__reflect(FLTypeFeatureGameSceneHandler.prototype,"FLTypeFeatureGameSceneHandler");var FLTypeFreeGameStateController=function(e){function t(){var t=e.call(this)||this;return t.isSpecialEventPlayed=!1,t}return __extends(t,e),Object.defineProperty(t.prototype,"flData",{get:function(){return SocketManager.getInstance().GetData()},enumerable:!0,configurable:!0}),t.prototype.Start=function(t){e.prototype.Start.call(this,t)},t.prototype.SetInitState=function(e){if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,this.GetRemainContent())),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_RETRIGGER,this.GetRetriggerContent())),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_MULTIPLIER,0)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(FLSceneNotify.FEATURE_MYSTERY_TYPE_SELECTED,this.GetSelectedMysteryType())),e){if(this.data.fso){var t=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,t)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.flData.waitClient)CommonFunc.log("Free Game Resume"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount-this.data.winAmount)),this.Resume();else if(this.flData.triggeredType==BonusType.Feature1)CommonFunc.log("to feature idle"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.ToState(GameState.Slot_To_Feature_Idle);else if(this.flData.IsFeatureGameRemain()&&!this.flData.IsFreeSpinRemain())console.log("Next",this.flData.nRemainingFreeGame,this.flData.nPlayedFreeGame,this.flData.nTriggeredAccFreeGame,this.flData.nTriggeredFreeGame),this.ToState(GameState.Slot_To_Feature_Idle);else{CommonFunc.log("init Idle"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.ToState(GameState.Slot_Idle);var n=new Object;n.type=MessageType.FreeGameRemaining,n.current=1==this.data.nPlayedFreeGame?this.data.nPlayedFreeGame:this.data.nPlayedFreeGame+1,n.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n))}}else if(this.flData.IsFeatureGameRemain()&&!this.flData.IsFreeSpinRemain())this.ToState(GameState.Slot_To_Feature_Idle);else{var n=new Object;n.type=MessageType.FreeGameRemaining,n.current=1==this.data.nPlayedFreeGame?this.data.nPlayedFreeGame:this.data.nPlayedFreeGame+1,n.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.Resume(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(FLSceneNotify.FREEGAME_RETRIGGER,this.flData.freeMeter))},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_MULTIPLIER,0)),this.isSpecialEventPlayed=!1,this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();GameConfig.SYMBOL_DATA=null,this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,this.GetRemainContent(1)));break;case GameState.Slot_To_Feature_Idle:this.flData.triggeredType==BonusType.Feature1&&this.ToFeatureGame();break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.CheckEndState=function(){this.flData.triggeredType==BonusType.Feature1?this.ToState(GameState.Slot_To_Feature_Idle):this.flData.IsFreeSpinRemain()?this.ToState(GameState.Slot_End):this.flData.IsFeatureGameRemain()?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_To_Summary)},t.prototype.isSpecialEvent=function(){return this.isSpecialEventPlayed?!1:this.GetMultiplierContent()>1?!0:!1},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;case GameState.Slot_To_Feature_Idle:this.StateFeatureIdle();
default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}},t.prototype.StateIdle=function(){!GameConfig.isDebugPanelOpened||GameConfig.demoPanelOn?this.on_start_pressed():EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE))},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nPlayedFreeGame:e.current=this.data.nPlayedFreeGame+1,0==this.data.waitClient?e.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame:e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN)),0==this.data.waitClient&&(this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,5e3))},t.prototype.StateFeatureIdle=function(){SocketManager.getInstance().SendActionDone(),setTimeout(this.ToFeatureGame.bind(this),33)},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.isSpecialEventPlayed=!0;var e,t;t=new Object,t.classtype=FreeMultiplierWinAnimationEffect,e=new Object,e.CurMulitplier=this.GetMultiplierContent();for(var n=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multiplierMeter"),i=this.GetSelectedMysteryType()-1,o=[],a=0;a0&&AudioManager.Instance.playSound("Multiplier_mp3"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_RETRIGGER,this.GetRetriggerContent()))},t.prototype.StateSummary=function(){this.ShowWinSummary()},t.prototype.on_data_ready=function(t){e.prototype.on_data_ready.call(this,t)},t.prototype.ToFeatureGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Feature1),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.STOP_ALL_WINNING_ANIMATION))},t.prototype.ToBaseGame=function(){EventCentral.getInstance().dispatchEventWith(SceneNotify.SET_FREE_MULTIPLIER,!1,0),e.prototype.ToBaseGame.call(this)},t.prototype.GetRemainContent=function(e){return void 0===e&&(e=0),this.data.nPlayedFreeGame+e+","+this.data.nTriggeredAccFreeGame},t.prototype.GetRetriggerContent=function(){return this.data.nFreeGame},t.prototype.GetMultiplierContent=function(){var e=this.flData.resultMultiplier;return e},t.prototype.GetSelectedMysteryType=function(){return 6==this.flData.featureResultID?this.flData.randomID:this.flData.featureResultID},t}(FreeGameStateController);__reflect(FLTypeFreeGameStateController.prototype,"FLTypeFreeGameStateController");var FLTypeSlotGameInitializer=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.InitSceneHandlers=function(){var e=new BaseGameSceneHandler(SceneType.Base),t=new FreeGameSceneHandler(SceneType.Free),n=new FreeSpinOfferGameSceneHandler(SceneType.FSO),i=new FLTypeFeatureGameSceneHandler(SceneType.Feature1);e.initializer=this,t.initializer=this,i.initializer=this,n.initializer=this,GameSceneManager.GetInstance().AddSceneHandler(SceneType.Base,e),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Free,t),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Feature1,i),GameSceneManager.GetInstance().AddSceneHandler(SceneType.FSO,n);var o=new MiniLobbyOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("MiniLobby",o);var a=new BigWinOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("BigWin",a);var r=new JackpotOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Jackpot",r);var s=new PaytableOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Paytable",s);var l=new GameRulesOverlayHandler;if(GameSceneManager.GetInstance().AddOverlayHandler("GameRule",l),GameConfig.isBetLogEnabled){var h=new BetlogOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Betlog",h)}if(GameConfig.IsRankingEnable)if(1==GameConfig.JackpotRankingEnable||1==GameConfig.FishRankingEnable||1==GameConfig.SlotRankingEnable){var c=new RankingOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Ranking",c)}else EventCentral.getInstance().addEventListener(SceneNotify.WAITING_RANKING_ENABLE,this.OnReceiveRankingEnable,this)},t.prototype.InitSlotController=function(){var e=new FLTypeSlotView,t=[6,6,6,6,6];e.SetSlotViewParameter(1,5,t,4,[0,1,2,3,4]);var n=DragonBonesManager.getInstance();n.Init(),GameConfig.platform==Platform.desktop?(n.LoadAnimationData("L1",1),n.LoadAnimationData("L2",1),n.LoadAnimationData("L3",1),n.LoadAnimationData("L4",1),n.LoadAnimationData("L5",1),n.LoadAnimationData("L6",1),n.LoadAnimationData("H1",1),n.LoadAnimationData("H2",1),n.LoadAnimationData("H3",1),n.LoadAnimationData("H4",1),n.LoadAnimationData("H5",1),n.LoadAnimationData("wild",1),n.LoadAnimationData("scatter",1)):(n.LoadAnimationData("L1_Mobile",1),n.LoadAnimationData("L2_Mobile",1),n.LoadAnimationData("L3_Mobile",1),n.LoadAnimationData("L4_Mobile",1),n.LoadAnimationData("L5_Mobile",1),n.LoadAnimationData("L6_Mobile",1),n.LoadAnimationData("H1_Mobile",1),n.LoadAnimationData("H2_Mobile",1),n.LoadAnimationData("H3_Mobile",1),n.LoadAnimationData("H4_Mobile",1),n.LoadAnimationData("H5_Mobile",1),n.LoadAnimationData("wild_Mobile",1),n.LoadAnimationData("scatter_Mobile",1)),e.SetRelatedClasses(SlotReel,FLTypeDragonBones2SlotSymbol);var i=new SymbolMask,o=new SymbolMask,a=new SymbolMask,r=new SymbolMask,s=AssetManager.GetInstance().GetAsset("SlotGameUI"),l=this.GetMask(new egret.Rectangle(0,0,SlotConfig.SLOT_MASK_WIDTH,SlotConfig.SLOT_MASK_HEIGHT));s.slotLayer.addChild(l),s.slotLayer.mask=l,s.AddObjectToUI(o,"slotLayer"),s.AddObjectToUI(i,"slotLayer"),s.AddObjectToUI(a,"winEffectLayer"),s.AddObjectToUI(r,"winEffectLayer"),e.CreateSlotReelsAndSymbols(i,a,r);var h=new Object([i,o]);e.SetSymbolMasks(h),e.InitReelResults();var c=new SlotController;c.SetSlotView(e);var u=new SlotEffectHandler(c);u.AddEffect(new FLTypeChargingEffect),u.AddEffect(new FLTypeScatterOneSecondEffect),u.AddEffect(new UpdateSlotReelStripEffect),u.AddEffect(new FreeMultiplierWinAnimationEffect),GameConfig.isTurboMode&&u.AddEffect(new TurboModeNormalWinEffect);for(var p,g=0;ge||e>this.GetCurrentClipTotalFrames()-1||this.GetCurrentClip().gotoAndStop(e)},t.prototype.IsCurrentStylePlaying=function(){return this.GetCurrentClip().isPlaying},t.prototype.GetSize=function(){var e=new egret.Point(0,0);return e.x=this.GetCurrentClip().width,e.y=this.GetCurrentClip().height,e},t.LOOP_ACTING_END="loop_acting_end",t.ACTING_END="acting_end",t}(HTMLUI.UIBase);__reflect(UIActingClip.prototype,"UIActingClip");var UIFreeGameMetersManager=function(){function e(e,t,n){this.multiplierStay=!1,this.remainMeter=null==e?new UIFreeGameRemainMeter:e,this.remainMeter.Hide(),this.retriggerMeter=null==t?new UIFreeGameRetriggerMeter:t,this.retriggerMeter.Hide(),this.multiplierMeter=null==n?new UIFreeGameMultiplierMeter:n,this.multiplierMeter.Hide(),this.RegisterEvent()}return e.prototype.RegisterEvent=function(){EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_REMAIN,this.UpdateRemainMeter,this),EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_MULTIPLIER,this.UpdateMultiplierMeter,this),EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_RETRIGGER,this.UpdateRetriggerMeter,this)},e.prototype.UnregisterEvent=function(){EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_REMAIN,this.UpdateRemainMeter,this),EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_MULTIPLIER,this.UpdateMultiplierMeter,this),EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_RETRIGGER,this.UpdateRetriggerMeter,this)},e.prototype.SetRemainMeter=function(e){this.remainMeter=e},e.prototype.GetRemainMeter=function(){return this.remainMeter},e.prototype.SetRemainMeterReferencePoint=function(e){this.SetRemainMeterPosition(e.x,e.y),this.SetRemainMeterScale(e.scaleX,e.scaleY)},e.prototype.SetRemainMeterPosition=function(e,t){this.remainMeter.SetPosition(e,t)},e.prototype.SetRemainMeterScale=function(e,t){this.remainMeter.SetScale(e,t)},e.prototype.ShowRemainMeter=function(){this.remainMeter.Show()},e.prototype.HideRemainMeter=function(){this.remainMeter.Hide()},e.prototype.UpdateRemainMeter=function(e){if(null!=this.remainMeter){this.ShowRemainMeter();var t=e.data.split(","),n=parseInt(t[0]),i=parseInt(t[1]);console.log("-----------UpdateRemainMeter: "+n+"/"+i),this.remainMeter.SetSpinLeft(n),this.remainMeter.SetSpinMax(i)}},e.prototype.SetRetriggerMeter=function(e){this.retriggerMeter=e},e.prototype.GetRetriggerMeter=function(){return this.retriggerMeter},e.prototype.SetRetriggerMeterReferencePoint=function(e){this.SetRetriggerMeterPosition(e.x,e.y),this.SetRetriggerMeterScale(e.scaleX,e.scaleY)},e.prototype.SetRetriggerMeterPosition=function(e,t){this.retriggerMeter.SetPosition(e,t)},e.prototype.SetRetriggerMeterScale=function(e,t){this.retriggerMeter.SetScale(e,t)},e.prototype.ShowRetriggerMeter=function(){this.retriggerMeter.Show()},e.prototype.HideRetriggerMeter=function(){this.retriggerMeter.Hide()},e.prototype.UpdateRetriggerMeter=function(e){if(console.log("---------------- UpdateRetriggerMeter"),null!=this.retriggerMeter){var t=parseInt(e.data);this.retriggerMeter.SetRetriggerCount(t),t>0?this.ShowRetriggerMeter():this.HideRetriggerMeter()}},e.prototype.SteppingRetriggerAmount=function(e){var t=this.retriggerMeter.GetRetriggerCount()+1,n=SocketManager.getInstance().GetData().triggerWon,i=n-t;i>0&&(this.retriggerMeter.SetRetriggerCount(t),egret.setTimeout(this.SteppingRetriggerAmount,this,500))},e.prototype.SetMultiplierMeter=function(e){this.multiplierMeter=e},e.prototype.GetMultiplierMeter=function(){return this.multiplierMeter},e.prototype.SetMultiplierMeterPosition=function(e,t){this.multiplierMeter.SetPosition(e,t)},e.prototype.SetMultiplierMeterScale=function(e,t){this.multiplierMeter.SetScale(e,t)},e.prototype.ShowMultiplierMeter=function(){this.multiplierMeter.Show()},e.prototype.HideMultiplierMeter=function(){this.multiplierMeter.Hide()},e.prototype.UpdateMultiplierMeter=function(e){if(console.log("---------------- UpdateMultiplierMeter"),null!=this.multiplierMeter){var t=parseInt(e.data);this.multiplierStay?this.ShowMultiplierMeter():t>0?this.ShowMultiplierMeter():this.HideMultiplierMeter(),t>0||this.multiplierMeter.HideLabel()}},e.prototype.ShowAllMeters=function(){this.ShowMultiplierMeter(),this.ShowRemainMeter(),this.ShowRetriggerMeter()},e.prototype.HideAllMeters=function(){this.HideRemainMeter(),this.HideRetriggerMeter(),this.HideMultiplierMeter()},Object.defineProperty(e.prototype,"isMultiplierStay",{set:function(e){this.multiplierStay=e},enumerable:!0,configurable:!0}),e}();__reflect(UIFreeGameMetersManager.prototype,"UIFreeGameMetersManager");var ButtonType=function(){function e(){}return e.Start=0,e.Stop=1,e.StopAuto=2,e.MaxBet=3,e.MiniLobby=4,e.Paytable=5,e.Quit=6,e.GameRule=7,e.Betlog=8,e.Giftbox=9,e.Ranking=10,e.CampaignDetail=11,e}();__reflect(ButtonType.prototype,"ButtonType");var ValueType=function(){function e(){}return e.Volume=0,e.LineBet=1,e.NumberOfLine=2,e.Denomination=3,e.AutoSpinCount=4,e.TotalWin=5,e.Language=6,e.Direction=7,e}();__reflect(ValueType.prototype,"ValueType");var DelegateType=function(){function e(){}return e.COUNT=0,e.LanguageChange=e.COUNT++,e.BalanceUpdate=e.COUNT++,e.BetIDUpdate=e.COUNT++,e.BetInfoUpdate=e.COUNT++,e.TotalWinUpdate=e.COUNT++,e.SetWinAmount=e.COUNT++,e.StartWinBooking=e.COUNT++,e.EnableAllButton=e.COUNT++,e.DisableAllButton=e.COUNT++,e.EnableStartButton=e.COUNT++,e.EnableStopButton=e.COUNT++,e.ShowPaytable=e.COUNT++,e.ShowBetlog=e.COUNT++,e.ShowFreeSpinOfferRedeemPage=e.COUNT++,e.ShowMiniLobby=e.COUNT++,e.QuitGame=e.COUNT++,e.VolumeUpdate=e.COUNT++,e.ShowMessage=e.COUNT++,e.ButtonPressed=e.COUNT++,e.AutoSpinCountUpdate=e.COUNT++,e.JackpotDataReady=e.COUNT++,e.ShowGameRule=e.COUNT++,e.BetDirectionUpdate=e.COUNT++,e.EnableTurboModeButton=e.COUNT++,e.ShowRanking=e.COUNT++,e.ShowCampaignDetail=e.COUNT++,e}();__reflect(DelegateType.prototype,"DelegateType");var UIController=function(e){function t(){var t=e.call(this)||this;t.delegates=[];for(var n=0;n=3?(StringUtil.getParameterByName("inum")&&IFrameCloseButtonState(!1),CommonFunc.log("AutoSpinCountSelected"),GameConfig.isAutoSpin=!0,GameConfig.autoSpinTimes=this.autoValue[this.autoList.getChildIndex(e.currentTarget)],this.setAutoMenu(),this.autoplaybtn.visible=!1,this.stopautobtn.visible=!0,this.stopautobtn.enabled=!0,void this.uiController.ValueUpdated(ValueType.AutoSpinCount)):(CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin")),void(this.autoPopupMenu.visible=!1))},t.prototype.onSpinPressed=function(e){return SocketManager.getInstance().GetData().IsEnoughBalance()||0!=SocketManager.getInstance().GetData().triggeredType||SocketManager.getInstance().GetData().nextAction>=3?(CommonFunc.log("SpinPressed"),this.OnDisableAllButton(),void this.uiController.ButtonPressed(ButtonType.Start)):(CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),void(SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin"))))},t.prototype.onStopPressed=function(e){CommonFunc.log("StopPressed"),this.OnDisableAllButton(),this.uiController.ButtonPressed(ButtonType.Stop)},t.prototype.onStopAutoPressed=function(e){CommonFunc.log("StopAutoPressed"),GameConfig.isAutoSpin=!1,GameConfig.autoSpinTimes=0,this.AutoSpinCountUpdate(this),this.uiController.ButtonPressed(ButtonType.StopAuto)},t.prototype.onMaxBetPressed=function(e){CommonFunc.log("MaxBetPressed"),this.uiController.ButtonPressed(ButtonType.MaxBet)},t.prototype.setAutoMenu=function(){this.autoPopupMenu.visible?(this.autoPopupMenu.visible=!1,this.autoInfinitySymbol.visible=!1,this.autoOutside.removeEventListener(mouse.MouseEvent.MOUSE_OVER,this.setAutoMenu,this)):(this.autoPopupMenu.visible=!0,this.autoInfinitySymbol.visible=!0,this.autoOutside.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.setAutoMenu,this))},t.prototype.AutoSpinCountUpdate=function(e){for(var t=[],n=1;n0,void(this.autoCount.text=""+GameConfig.autoSpinTimes)):(GameConfig.isAutoSpin=!1,GameConfig.autoSpinTimes=0,this.autoplaybtn.visible=!0,this.stopautobtn.visible=!1,this.autoCountBg.visible=!1,this.autoCountBg.visible=!1,this.autoCountInfinity.visible=!1,void(this.autoCount.visible=!1))},t.prototype.onTurboOnPressed=function(e){GameConfig.isTurboMode&&(this.turboModeMsg.text=Localization.Instance.getString("common.turbomode.activated"),GameConfig.TurboModeState=!0,this.btnTurboOff.enabled=!0,this.ToggleTurboMode(GameConfig.TurboModeState))},t.prototype.onTurboOffPressed=function(e){GameConfig.isTurboMode&&(this.turboModeMsg.text=Localization.Instance.getString("common.turbomode.deactivated"),GameConfig.TurboModeState=!1,this.btnTurboOn.enabled=!0,this.ToggleTurboMode(GameConfig.TurboModeState))},t.prototype.OnEnableTurboModeButton=function(e){for(var t=[],n=1;n0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_sync_data_ready=function(e){this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,GameConfig.TurboModeState&&GameConfig.isTurboMode?requestAnimationFrame(this.StopSpin):this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.ShowBigWin=function(e,t,n){void 0===n&&(n=-1),0>n&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckNextStateAfterReelStop=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.CheckEndState=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.data.IsLastFreeGameFinished()?this.ToState(GameState.Slot_To_Summary):this.ToState(GameState.Slot_End)},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_To_Feature_Idle:return this.StateFeatureIdle(),!0;case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;case GameState.FreeSpinOffer_Idle:return this.StateFreeSpinOfferIdle(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateFreeSpinOfferIdle=function(){this.isResume=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_STARTMENU_FSO))},t.prototype.StateFeatureIdle=function(){if(void 0!=FesEventController&&null!=FesEventController&&FesEventController.getInstance().IsFesEventTriggered())return GameConfig.previousGameState=GameState.Slot_To_Feature_Idle,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),void FesEventController.getInstance().CheckIsInfoReady();FesEventController.getInstance().RemoveListeners(),SocketManager.getInstance().SendActionDone(),GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)));var e=new Object;e.type=MessageType.PressToFeature,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.START_ENABLE)),GameConfig.isTurboMode&&EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.ENABLE_TURBOMODEBUTTON))},t.prototype.StateIdle=function(){GameConfig.isDebugPanelOpened&&!GameConfig.demoPanelOn||!this.data.isNextFSOSpin()?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE)):this.isResume?this.ToState(GameState.FreeSpinOffer_Idle):this.on_start_pressed()},t.prototype.StateSpinning=function(){EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0));var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.fsoPlayed:e.current=this.data.fsoPlayed+1,e.total=this.data.fsoCount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount):this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount):this.ShowBigWin(1,this.data.winAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.winAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmount0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_To_Feature_Idle)},t.prototype.ToBaseGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Base),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.REMOVE_FSO_REMAIN))},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:case GameState.FreeSpinOffer_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction();var e=this.data.fsoPlayed+1+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,e)),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Summary:this.ToBaseGame();case GameState.Slot_To_Feature_Idle:this.data.triggeredType==BonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.on_fsoStartMenu_start_pressed=function(){console.log("FSO START MENU START PRESSED")},t}(SlotGameStateController);__reflect(FreeSpinOfferGameStateController.prototype,"FreeSpinOfferGameStateController");var DebugPanel=function(e){function t(){var t=e.call(this)||this;return t}return __extends(t,e),t.prototype.childrenCreated=function(){},t.prototype.OnDebugButtonPressed=function(e){},t.prototype.InitBaseDebugOptionPane=function(){},t.prototype.CreateBasicDetailDebugOptionPane=function(){},t.prototype.CreateCustomDetailDebugOptionPane=function(){},t.prototype.CreateDetailDebugOptionPane=function(){},t.prototype.AddTouchEvent=function(e,t){},t.prototype.OnActionButtonPressed=function(e){},t.prototype.ExecuteAction=function(e){},t.prototype.ToggleDebugSymbolPane=function(){},t.prototype.ToggleDebugFeaturePane=function(){},t.prototype.OnDebugSymbolPaneStartPressed=function(e){},t.prototype.OnDebugButtonPaneStartPressed=function(e){},t.prototype.ExecuteData=function(e){},t}(eui.Component);__reflect(DebugPanel.prototype,"DebugPanel");var DemoDebugPanel=function(e){function t(){var t=e.call(this)||this;return t}return __extends(t,e),t.prototype.childrenCreated=function(){},t.prototype.OnDebugButtonPressed=function(e){},t.prototype.InitDebugList=function(){},t.prototype.CreateDetailDebugOptionPane=function(){},t.prototype.AddTouchEvent=function(e,t){},t.prototype.OnActionButtonPressed=function(e){},t.prototype.ExecuteAction=function(e){},t.prototype.ExecuteData=function(e){},t}(eui.Component);__reflect(DemoDebugPanel.prototype,"DemoDebugPanel");var UIBackgroundManager=function(){function e(){GameConfig.platform==Platform.mobile?this.background=new UIBackground("base_bg_png","freegame_bg_PNG"):this.background=new UIBackground("base_bg_png","freegame_bg_PNG")}return e.prototype.SwitchToBaseGameBackground=function(){this.background.SwitchToBaseGameBackground()},e.prototype.SwitchToFreeGameBackground=function(){this.background.SwitchToFreeGameBackground()},e.prototype.GetBackgroundObject=function(){return this.background},e}();__reflect(UIBackgroundManager.prototype,"UIBackgroundManager");
var SceneNotify=function(e){function t(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!1),e.call(this,t,n,i)||this}return __extends(t,e),t.Notify=function(e,n){void 0===n&&(n=null);var i=new t(e);return i.data=n,i},t.ENTER_SETTING="ENTER_SETTING",t.LEAVE_SETTING="LEAVE_SETTING",t.DUMMY_SCENE_COMPLETED="DUMMY_SCENE_COMPLETED",t.START_SPIN="START_SPIN",t.STOP_SPIN="STOP_SPIN",t.START_ENABLE="START_ENABLE",t.STOP_ENABLE="STOP_ENABLE",t.SPIN_STOPPED="SPIN_STOPPED",t.SHOW_WIN_SUMMARY="SHOW_WIN_SUMMARY",t.WIN_SUMMARY_FINISHED="WIN_SUMMARY_FINISHED",t.SHOW_TRIGGER_ANIMATION="SHOW_TRIGGER_ANIMATION",t.START_TRIGGER_ANIMATION="START_TRIGGER_ANIMATION",t.TRIGGER_ANIMATION_FINISHED="TRIGGER_ANIMATION_FINISHED",t.SHOW_SPECIAL_EVENT="SHOW_SPECIAL_EVENT",t.SPECIAL_EVENT_FINISHED="SPECIAL_EVENT_FINISHED",t.AUTO_SPIN_UPDATE="AUTO_SPIN_UPDATE",t.SHOW_RESULT="SHOW_RESULT",t.SHOW_All_RESULT="SHOW_ALL_RESULT",t.SHOW_WININFO_ANIMATION="SHOW_WININFO_ANIMATION",t.PLAY_EFFECT="PLAY_EFFECT",t.ON_STARTSTOPPING="ON_STARTSTOPPING",t.STOP_ALL_WINNING_ANIMATION="STOP_ALL_WINNING_ANIMATION",t.SET_WIN_AMOUNT="SET_WIN_AMOUNT",t.WIN_BOOKING_START="UI.WIN_BOOKING_START",t.WIN_BOOKING_FINISHED="UI.WIN_BOOKING_FINISHED",t.SET_FREE_REMAIN="SET_FREE_REMAIN",t.SET_FREE_MULTIPLIER="SET_FREE_MULTIPLIER",t.SET_FREE_RETRIGGER="SET_FREE_RETRIGGER",t.SET_TURBOMODEBUTTON_VISIBLE="SET_TURBOMODEBUTTON_VISIBLE",t.BASE_RANDOM_IN="BASE_RANDOM_IN",t.BASE_TRIGGER="BASE_TRIGGER",t.BASE_NO_TRIGGER="BASE_NO_TRIGGER",t.SHOW_JACKPOT_METER="SHOW_JACKPOT_METER",t.HIDE_JACKPOT_METER="HIDE_JACKPOT_METER",t.SHOW_JACKPOT_PANEL="SHOW_JACKPOT_PANEL",t.SHOW_BIG_WIN="SHOW_BIG_WIN",t.BIG_WIN_FINISHED="BIG_WIN_FINISHED",t.JACKPOT_FINISHED="JACKPOT_FINISHED",t.SHOW_MESSAGE="SHOW_MESSAGE",t.FEATURE_DISABLE_ALLBUTTON="FEATURE_DISABLE_ALLBUTTON",t.FEATURE_ENABLE_ALLBUTTON="FEATURE_ENABLE_ALLBUTTON",t.FEATURE_ITEM_SELECTED="FEATURE_ITEM_SELECTED",t.FEATURE_SHOW_ANIMATION="FEATURE_SHOW_ANIMATION",t.FEATURE_ANIMATION_COMPLETED="FEATURE_ANIMATION_COMPLETED",t.FEATURE_HISTORY_UPDATE="FEATURE_HISTORY_UPDATE",t.FEATURE_TEAM_SELECTED="FEATURE_TEAM_SELECTED",t.FEATURE_ALL_ANIMATION_ENED="FEATURE_ALL_ANIMATION_ENED",t.FEATURE_SHOW_SELECTTEAM_TRANSITION="FEATURE_SHOW_SELECTTEAM_TRANSITION",t.FEATURE_SHOW_SELECTCHARACTER_TRANSITION="FEATURE_SHOW_SELECTCHARACTER_TRANSITION",t.FEATURE_ROUND_NUMBER="FEATURE_ROUND_NUMBER",t.FEATURE_FEATURE_MULTIPLIER="FEATURE_FEATURE_MULTIPLIER",t.FEATURE_RESET="FEATURE_RESET",t.FEATURE_EXIT="FEATURE_EXIT",t.FEATURE_CHARACTER_SELECTED="FEATURE_CHARACTER_SELECTED",t.FEATURE_PLAY_IDLE="FEATURE_PLAY_IDLE",t.FEATURE_IDLE_ENDED="FEATURE_IDLE_ENDED",t.FEATURE_PLAY_RESULT="FEATURE_PLAY_RESULT",t.FEATURE_RESULT_ENDED="FEATURE_RESULT_ENDED",t.FEATURE_CHANCE_UPDATE="FEATURE_CHANCE_UPDATE",t.FEATURE_BONUS_START="FEATURE_BONUS_START",t.FEATURE_BONUS_SELECTED="FEATURE_BONUS_SELECTED",t.FEATURE_BONUS_RESULT="FEATURE_BONUS_RESULT",t.FEATURE_BONUS_RESULT_ENDED="FEATURE_BONUS_RESULT_ENDED",t.FEATURE_DEBUG_ACTION="FEATURE_DEBUG_ACTION",t.FEATURE_BONUS_RESULT_RESUME="FEATURE_BONUS_RESULT_RESUME",t.FEATURE_HISTORY_UPDATE_RESUME_ZH="FEATURE_HISTORY_UPDATE_RESUME_ZH",t.VIDEO_LOAD_COMPLETED="VIDEO_LOAD_COMPLETED",t.BIGSYMBOL_ANIMATION_COMPLETED="BIGSYMBOL_ANIMATION_COMPLETED",t.FULLREELWILD_NUDGE_FINISHED="FULLREELWILD_NUDGE_FINISHED",t.ON_NUDGEEFFECT_STARTED="ON_NUDGEEFFECT_STARTED",t.EXPLODE="EXPLODE",t.SYMBOL_EXPLODE_FINISHED="SYMBOL_EXPLODE_FINISHED",t.REEL_EXPLODE_FINISHED="REEL_EXPLODE_FINISHED",t.SCREEN_EXPLODE_FINISHED="SCREEN_EXPLODE_FINISHED",t.RESPINNING="RESPINNING",t.SYMBOL_DROPIN_FINISHED="SYMBOL_DROPIN_FINIISHED",t.IDLE_TO_FREE_DROPOUT="IDLE_TO_FREE_DROPOUT",t.SYMBOL_TRANSFORM_FINISHED="SYMBOL_TRANSFORM_FINISHED",t.ADD_OR_REMOVE_EFFECT="ADD_OR_REMOVE_EFFECT",t.FIXED_REEL_EFFECT_FINISHED="FIXED_REEL_EFFECT_FINISHED",t.START_REEL_SYNC_EFFECT="START_REEL_SYNC_EFFECT",t.REEL_SYNC_EFFECT_FINISHED="REEL_SYNC_EFFECT_FINISHED",t.STOP_ALL_REEL_SYNC_EFFECT="STOP_ALL_REEL_SYNC_EFFECT",t.START_REEL_POSITION_UPDATE="START_REEL_POSITION_UPDATE",t.FES_IS_TRIGGERED="FES_IS_TRIGGERED",t.FES_IS_FINISHED="FES_IS_FINISHED",t.FES_IS_INFO_LOADED="FES_IS_INFO_LOADED",t.IS_LOADING_READY="IS_LOADING_READY",t.CHANGE_TO_FULLREELWILD="CHANGE_TO_FULLREELWILD",t.CHANGE_TO_BOMBWILD="CHANGE_TO_BOMBWILD",t.CHANGE_TO_RANDOMWILD="CHANGE_TO_RANDOMWILD",t.WILD_FEATURE_FINISHED="WILD_FEATURE_FINISHED",t.RESUME_WITH_WILD_FEATURE="RESUME_WITH_WILD_FEATURE",t.SCATTER_ONE_SECOND="SCATTER_ONE_SECOND",t.CREATE_FREE_GAME_METER="CREATE_FREE_GAME_METER",t.START_REEL_TRANSITION="START_REEL_TRANSITION",t.END_REEL_TRANSITION="END_REEL_TRANSITION",t.START_EFFECT_BEGIN="START_EFFECT_BEGIN",t.START_EFFECT_END="START_EFFECT_END",t.SHOW_LIGHT_FOR_MODE_3="SHOW_LIGHT_FOR_MODE_3",t.FEATURE_SCENE_INIT="FEATURE_SCENE_INIT",t.FEATURE_SCENE_REVEAL_ALL="FEATURE_SCENE_REVEAL_ALL",t.FEATURE_SCENE_REVEAL_ALL_FINISHED="FEATURE_SCENE_REVEAL_ALL_FINISHED",t.FEATURE_SHOW_WIN_SUMMARY="FEATURE_SHOW_WIN_SUMMARY",t.FEATURE_WIN_SUMMARY_FINISHED="FEATURE_WIN_SUMMARY_FINISHED",t.ON_UICONTROLLER_CREATED="ON_UICONTROLLER_CREATED",t.REELBOARD_STAGE_2="REELBOARD_STAGE_2",t.REELBOARD_STAGE_3="REELBOARD_STAGE_3",t.LEVEL_UP_FINISHED="LEVEL_UP_FINISHED",t.CHANGE_WAYS="CHANGE_WAYS",t.SLOT_VIEW_UPDATED="SLOT_VIEW_UPDATED",t.START_SCATTER_COUNT="START_SCATTER_COUNT",t.END_SCATTER_COUNT="END_SCATTER_COUNT",t.COUNTING_FINISHED="COUNTING_FINISHED",t.START_SHAKING="START_SHAKING",t.STOP_SHAKING="STOP_SHAKING",t.PLAY_MULTIPLIER_METER_ANIMATION="PLAY_MULTIPLIER_METER_ANIMATION",t.ENABLE_TURBOMODEBUTTON="ENABLE_TURBOMODEBUTTON",t.SHOW_WIN_SUMMARY_FSO="SHOW_WIN_SUMMARY_FSO",t.WIN_SUMMARY_FINISHED_FSO="WIN_SUMMARY_FINISHED_FSO",t.SET_FSO_REMAIN="SET_FSO_REMAIN",t.REMOVE_FSO_REMAIN="REMOVE_FSO_REMAIN",t.SHOW_STARTMENU_FSO="SHOW_STARTMENU_FSO",t.START_PRESSED_FSO="START_PRESSED_FSO",t.SHOW_GIFTBOX="SHOW_GIFTBOX",t.HIDE_FSO_REDEEM_PAGE="HIDE_FSO_REDEEM_PAGE",t.SHOW_FSO_CONGRATULATIONPANEL="SHOW_FSO_CONGRATULATIONPANEL",t.SHOW_JACKPOT_WINNING_NOTICE="SHOW_JACKPOT_WINNING_NOTICE",t.RANKING_DATA_UPDATE="RANKING_DATA_UPDATE",t.RANKING_JACKPOT_UPDATE="RANKING_JACKPOT_UPDATE",t.RANKING_SHOW_DETAIL="RANKING_SHOW_DETAIL",t.LOAD_RANKING_ICON="LOAD_RANKING_ICON",t.RANKING_ICON_LOADED="RANKING_ICON_LOADED",t.WAITING_RANKING_ENABLE="WAITING_RANKING_ENABLE",t.REQUESTING_RANKING_INFO="REQUESTING_RANKING_INFO",t.RANKING_TIMEOUT="RANKING_TIMEOUT",t.SHOW_CAMPAIGN_BUTTON="SHOW_CAMPAIGN_BUTTON",t.CAMPAIGN_DETAIL_RECEIVED="CAMPAIGN_DETAIL_RECEIVED",t.CAMPAIGN_WINNERLIST_RECEIVED="CAMPAIGN_WINNERLIST_RECEIVED",t.CAMPAIGN_DETAIL_TIMEOUT="CAMPAIGN_DETAIL_TIMEOUT",t.CAMPAIGN_WINNERLIST_TIMEOUT="CAMPAIGN_WINNERLIST_TIMEOUT",t.REQUESTING_CAMPAIGN_WINNERLIST="REQUESTING_CAMPAIGN_WINNERLIST",t.SP_SIMPLEPLAY_GAME_LIST_LOADED="SP_SIMPLEPLAY_GAME_LIST_LOADED",t}(egret.Event);__reflect(SceneNotify.prototype,"SceneNotify");var UIBGTranscation=function(e){function t(t,n,i){void 0===t&&(t=""),void 0===n&&(n=0),void 0===i&&(i=24);var o=e.call(this)||this;return o.frameSetName=t,o.totalFrames=n,o.currentFrame=0,o.framePerSecond=i,o.fadeTime=500,o.lastTimestamp=0,o.timer=new egret.Timer(1e3/o.framePerSecond),o.bitmap=new egret.Bitmap,o.addChild(o.bitmap),o}return __extends(t,e),t.prototype.StartTranscation=function(e,n,i){void 0===e&&(e=!0),this.isForward=e,this.previousTime=egret.getTimer(),this.callbackTarget=i,this.transationEndCallback=n,this.isForward||(this.currentFrame=this.totalFrames),this.timer.addEventListener(egret.TimerEvent.TIMER,this.ChangeFrame,this),this.timer.start(),this.lastTimestamp=egret.getTimer(),this.FadeInOut(),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.START))},t.prototype.SkipTranscation=function(){this.StopTranscation()},t.prototype.StopTranscation=function(){this.timer.stop(),this.timer.removeEventListener(egret.TimerEvent.TIMER,this.ChangeFrame,this),null!=this.callbackTarget&&(this.transationEndCallback.call(this.callbackTarget),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.END))),this.RemoveFromParent()},t.prototype.RemoveFromParent=function(){this.parent.removeChild(this)},t.prototype.ChangeFrame=function(e){var t=this.totalFrames.toString().length,n=(egret.getTimer()-this.lastTimestamp)/(1e3/this.framePerSecond);if(!(Math.round(n)<1)){this.isForward?this.currentFrame+=Math.round(n):this.currentFrame-=Math.round(n);var i=RES.getRes(this.frameSetName+this.ZeroFillNumber(this.currentFrame,t));null==i&&this.StopTranscation(),this.bitmap.texture=i,this.lastTimestamp=egret.getTimer()}},t.prototype.ZeroFillNumber=function(e,t){for(var n="",i=0;t>i;i++)n+="0";return n=n.substr(0,t-e.toString().length)+e},t.prototype.FadeInOut=function(){var e=this.totalFrames/this.framePerSecond*1e3-2*this.fadeTime;this.alpha=0;var n=egret.Tween.get(this);n.to({alpha:1},this.fadeTime).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(t.FADEIN_END))}).wait(e).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(t.FADEOUT_START))}).to({alpha:0},this.fadeTime)},t.prototype.SetFPS=function(e){this.framePerSecond=e,this.timer.delay=1e3/this.framePerSecond},t.START="TranscationStart",t.END="TranscationEnd",t.FADEIN_START="transcation_ fadein_start",t.FADEIN_END="transcation_ fadein_end",t.FADEOUT_START="transcation_ fadeout_start",t.FADEOUT_END="transcation_ fadeout_end",t}(eui.Component);__reflect(UIBGTranscation.prototype,"UIBGTranscation");var UIGameLogo=function(e){function t(){var t=e.call(this)||this;return GameConfig.platform==Platform.desktop?t.skinName="UIGameLogoSkin":t.skinName="UIGameLogoSkin_mobile",t}return __extends(t,e),t.prototype.partAdded=function(t,n){n.name=t,e.prototype.partAdded.call(this,t,n)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.changeLanguageHandler=new UIChangeLanguage(this.OnLanguageChanged,this),this.OnLanguageChanged(GameConfig.Locale)},Object.defineProperty(t.prototype,"width",{get:function(){return null==this.logoBitmap?e.prototype.$getWidth.call(this):this.logoBitmap.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return null==this.logoBitmap?e.prototype.$getHeight.call(this):this.logoBitmap.height},enumerable:!0,configurable:!0}),t.prototype.OnLanguageChanged=function(e){var t=null;t=GameConfig.platform==Platform.desktop?RES.getRes(Localization.Instance.getString("common.game_logo")):RES.getRes(Localization.Instance.getString("common.game_logo_mobile")),this.logoBitmap.texture=t,this.logoBitmap.x=-this.logoBitmap.width/2,this.logoBitmap.y=-this.logoBitmap.height/2},t}(HTMLUI.UIBase);__reflect(UIGameLogo.prototype,"UIGameLogo");var UIWinSummary=function(e){function t(){var t=e.call(this)||this;return t.skinName="UIWinSummarySkin",t.SetScale(.001,.001),t.anchorOffsetX=t.width/2,t.anchorOffsetY=t.height/2,t.fixedScale=!0,t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.lblWinAmountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");this.lblWinAmountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won_font"),this.lblPlayCountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");this.lblPlayCountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played_font"),this.lblPlayCountTitle.addEventListener(egret.Event.RESIZE,this.OnTitleResize,this)},t.prototype.Init=function(e,t,n){void 0===n&&(n=0),this.lblWinAmount.text=n.toString(),this.lblPlayCount.text=e.toString()},t.prototype.Start=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.Init(e,t,n),this.FadeIn()},t.prototype.FadeIn=function(){this.SetScale(.001,.001);var e=egret.Tween.get(this);e.to({scaleX:1,scaleY:1},500,egret.Ease.backOut).call(this.FadeInFinished),this.backdrop.alpha=.1;var t=egret.Tween.get(this.backdrop);t.to({alpha:1},500)},t.prototype.FadeInFinished=function(){this.dispatchEvent(new egret.Event(t.FADE_IN_COMPLETE))},t.prototype.SetPlayCount=function(e){this.lblPlayCount.text=e.toString()},t.prototype.SetWinAmount=function(e){this.lblWinAmount.text=StringUtil.numberFormat(Number(e)/100,2)},t.prototype.Close=function(){this.FadeOut()},t.prototype.FadeOut=function(){this.SetScale(1,1);var e=egret.Tween.get(this);e.to({scaleX:.001,scaleY:.001},500,egret.Ease.backIn).call(this.FadeOutFinished);var t=egret.Tween.get(this.backdrop);t.to({alpha:.1},500)},t.prototype.FadeOutFinished=function(){this.dispatchEvent(new egret.Event(t.FADE_OUT_COMPLETE))},t.prototype.WinSummaryFinished=function(e){this.dispatchEvent(new egret.Event(egret.Event.COMPLETE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.WINSUMMARY_FINISH))},t.prototype.OnTitleResize=function(){var e=this.lblPlayCountTitle,t=this.lblPlayCountTitle.textWidth;if(null!=e.$textLinesWidth){t=0;for(var n=0;n=0&&500>=a?25:a>500&&2500>=a?100:a>2500&&6500>=a?200:a>6500&&12500>=a?300:600;var s=r*o;return s},e.prototype.ComputeTime=function(e){var t=0,n=SocketManager.getInstance().GetData().GetCredit(),i=e/n;return t=i>=0&&500>=i?i/25:i>500&&2500>=i?20+(i-500)/100:i>2500&&6500>=i?40+(i-2500)/200:i>6500&&12500>=i?60+(i-6500)/300:i>12500?80+(i-12500)/600:80+i/600},e}();__reflect(BookingSpeedCalculator.prototype,"BookingSpeedCalculator",["IBookingSpeedCalculator"]);var GameState;!function(e){e[e.Slot_Idle=0]="Slot_Idle",e[e.Slot_Spinning=1]="Slot_Spinning",e[e.Slot_Jackpot=2]="Slot_Jackpot",e[e.Slot_Feature_Triggered=3]="Slot_Feature_Triggered",e[e.Slot_Special_Event=4]="Slot_Special_Event",e[e.Slot_Result_Displaying=5]="Slot_Result_Displaying",e[e.Slot_End=6]="Slot_End",e[e.Slot_To_Feature_Idle=7]="Slot_To_Feature_Idle",e[e.Slot_To_Summary=8]="Slot_To_Summary",e[e.Feature_SelectTeam=9]="Feature_SelectTeam",e[e.Feature_Idle=10]="Feature_Idle",e[e.Feature_ShowResult=11]="Feature_ShowResult",e[e.Feature_ShowWin=12]="Feature_ShowWin",e[e.Feature_ShowLose=13]="Feature_ShowLose",e[e.Feature_End=14]="Feature_End",e[e.Feature_To_Summary=15]="Feature_To_Summary",e[e.FreeSpinOffer_Idle=16]="FreeSpinOffer_Idle",e[e.Feature_Intro=17]="Feature_Intro",e[e.Feature_SelectCharacter=18]="Feature_SelectCharacter",e[e.Feature_Bonus=19]="Feature_Bonus",e[e.Slot_Exploding=20]="Slot_Exploding",e[e.Slot_Respinning=21]="Slot_Respinning",e[e.Slot_TotalResultDisplay=22]="Slot_TotalResultDisplay",e[e.Free_Game_Unlock_Meter=23]="Free_Game_Unlock_Meter"}(GameState||(GameState={}));var MovieClip=function(){function e(){}return e.movieClipBySpriteSheet=function(t,n){void 0===n&&(n=SlotConfig.SLOT_FRAME_RATE);var i=RES.getRes(t+"_json"),o=RES.getRes(t+"_png");i||console.error(t+"_json not found"),o||console.error(t+"_png not found");var a=[],r={mc:{mov:{frameRate:n,frames:a}},res:i.frames},s=0,l=t+"_"+e.fillZore(s,2);for(void 0==i.frames[l]&&(s=1,l=t+"_"+e.fillZore(s,2));void 0!=i.frames[l];)a.push({duration:1,res:l,x:i.frames[l].offX,y:i.frames[l].offY}),s++,l=t+"_"+e.fillZore(s,2);var h=new egret.MovieClipDataFactory(r,o),c=new egret.MovieClip(h.generateMovieClipData("mov"));c.width!=i.frames[t+"_01"].sourceW&&(c.width=i.frames[t+"_01"].sourceW,c.height=i.frames[t+"_01"].sourceH);var u=new MultiResolutionMovieClip(c.movieClipData);return u.width=c.width,u.height=c.height,u},e.movieClipByName=function(e,t){void 0===t&&(t="");var n=RES.getRes(e+"_json"),i=RES.getRes(e+"_png"),o=new egret.MovieClipDataFactory(n,i);""==t&&(t=e);var a=new egret.MovieClip(o.generateMovieClipData(t)),r=new MultiResolutionMovieClip(a.movieClipData);return r},e.fillZore=function(e,t){for(var n="",i=0;t>i;i++)n+="0";return n+=e.toString(),n.substr(n.length-t,t)},e}();__reflect(MovieClip.prototype,"MovieClip");var ShakeAnimation=function(){function e(){this.count=0,this.timer=new egret.Timer(1e3)}return e.prototype.shakeObj=function(e,t,n,i){this.stop(),this.target=e,this.initX=e.x,this.initY=e.y,this.maxDis=i,this.count=t*n,this.rate=n,this.timer.delay=1e3/n,this.timer.repeatCount=this.count,this.timer.addEventListener(egret.TimerEvent.TIMER,this.shaking,this),this.timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.shakeComplete,this),this.timer.reset(),this.timer.start()},e.prototype.shaking=function(){egret.Tween.removeTweens(this.target),this.target.x=this.initX-this.maxDis+Math.random()*this.maxDis*2,this.target.y=this.initY-this.maxDis+Math.random()*this.maxDis*2,egret.Tween.get(this.target).to({x:this.initX,y:this.initY},999/this.rate)},e.prototype.shakeComplete=function(){this.target&&(egret.Tween.removeTweens(this.target),this.target.x=this.initX,this.target.y=this.initY,this.target=null),this.timer.removeEventListener(egret.TimerEvent.TIMER,this.shaking,this),this.timer.removeEventListener(egret.TimerEvent.TIMER_COMPLETE,this.shakeComplete,this)},e.prototype.stop=function(){this.shakeComplete()},e}();__reflect(ShakeAnimation.prototype,"ShakeAnimation");var NewBaseGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(e){if(AudioManager.Instance.stopBgm(),this.InitBaseReelStrip(),e?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)):EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.AddListeners(),this.SetActive(!0),e)if(1==this.data.waitClient)CommonFunc.log("Base Game Resume"),this.CheckResumeJackpot(),this.Resume();else if(this.data.nextAction!=NGABonusType.None)CommonFunc.log("init To_Feature_Idle"),this.ToState(GameState.Slot_To_Feature_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.winAmount));else{CommonFunc.log("init Idle");var t=new Object;t.type=MessageType.PressToStart,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,t)),this.ToState(GameState.Slot_Idle)}else{var t=new Object;t.type=MessageType.TotalWin,t.data=this.data.accumulatedWinAmount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,t)),this.ToState(GameState.Slot_Idle)}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction(),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.nextAction==NGABonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t}(BaseGameStateController);__reflect(NewBaseGameStateController.prototype,"NewBaseGameStateController");var NewFreeGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.CheckNextStateAfterReelStop=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.SetInitState=function(e){var t=this.data.nTriggeredAccFreeGame,n=this.data.nFreeSpinCount+","+t;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,n)),e){if(this.data.fso){var n=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,n)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.data.waitClient)EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.PreAccFreeAmount)),CommonFunc.log("Free Game Resume"),this.Resume();else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),CommonFunc.log("init Idle");var i=new Object;i.type=MessageType.PressToStart,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}}else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,Math.max(this.data.winAmount,this.data.accumulatedWinAmount)));var i=new Object;i.type=MessageType.FreeGameRemaining,i.current=this.data.nFreeSpinCount+1,i.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();this.data.nTriggeredAccFreeGame+=this.data.nTriggeredFreeGame,this.data.nTriggeredFreeGame=0,GameConfig.SYMBOL_DATA=null;var t=this.data.nFreeSpinCount+1+","+this.data.nTriggeredAccFreeGame;this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,t));break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nFreeSpinCount:e.current=this.data.nFreeSpinCount+1,e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t}(FreeGameStateController);__reflect(NewFreeGameStateController.prototype,"NewFreeGameStateController");var NewFreeSpinOfferGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(e){e&&(this.isResume=!0),AudioManager.Instance.stopBgm(),this.InitBaseReelStrip(),e&&SocketManager.getInstance().GetData().SetFSOBetSetting();var t=this.data.fsoPlayed+","+this.data.fsoCount;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,t)),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),e?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)):EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)),this.AddListeners(),this.SetActive(!0),e)if(1==this.data.waitClient)CommonFunc.log("FSO Game Resume"),this.Resume();else if(this.data.nextAction!=NGABonusType.None)CommonFunc.log("init To_Feature_Idle"),this.ToState(GameState.Slot_To_Feature_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.winAmount));else{CommonFunc.log("init Idle");var n=new Object;n.type=MessageType.PressToStart,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n)),this.ToState(GameState.FreeSpinOffer_Idle)}else{var n=new Object;n.type=MessageType.PressToStart,n.data=this.data.accumulatedWinAmount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n)),0==this.data.fsoPlayed?this.ToState(GameState.FreeSpinOffer_Idle):this.data.isNextFSOSpin()?this.ToState(GameState.Slot_Idle):this.ToState(GameState.Slot_To_Summary)}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.FreeSpinOffer_Idle:case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction();var e=this.data.fsoPlayed+1+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,e)),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.nextAction==NGABonusType.Feature1?this.ToFeature1():this.ToFreeGame();break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t}(FreeSpinOfferGameStateController);__reflect(NewFreeSpinOfferGameStateController.prototype,"NewFreeSpinOfferGameStateController");var AssetManager=function(){function e(){this.map={}}return e.GetInstance=function(){return null==e._instance&&(e._instance=new e),e._instance},e.prototype.AddAsset=function(e,t){this.ContainKey(e)?CommonFunc.log("Key:"+e+" is already exist."):this.map[e]=t},e.prototype.RemoveAsset=function(e){this.ContainKey(e)&&(this.map[e]=null)},e.prototype.ContainKey=function(e){return null==this.map[e]?!1:!0},e.prototype.GetAsset=function(e){return this.ContainKey(e)?this.map[e]:void 0},e}();__reflect(AssetManager.prototype,"AssetManager");var Layer;!function(e){e[e.Root=1e3]="Root",e[e.Slot=1001]="Slot",e[e.Feature=1002]="Feature",e[e.UI=1003]="UI",e[e.Translation=1004]="Translation",e[e.Overlay=1005]="Overlay",e[e.LandscapeOnlyOverlay=1006]="LandscapeOnlyOverlay"}(Layer||(Layer={}));var GameLayer=function(e){function t(){var t=e.call(this)||this;return t.map={},t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.InitLayer=function(){this.RegisterLayer(Layer.Root,this),this.AddNewLayerToLayer(Layer.Slot,Layer.Root),this.AddNewLayerToLayer(Layer.Feature,Layer.Root),this.AddNewLayerToLayer(Layer.UI,Layer.Root),this.AddNewLayerToLayer(Layer.Translation,Layer.Root),this.AddNewLayerToLayer(Layer.Overlay,Layer.Root),this.AddNewLayerToLayer(Layer.LandscapeOnlyOverlay,Layer.Root)},t.prototype.AddNewLayerToLayer=function(e,t){var n=new egret.Sprite;this.AddObjectToLayer(n,t),this.RegisterLayer(e,n)},t.prototype.RegisterLayer=function(e,t){if(null!=this.map[e])throw new Error("The Layer is already exist! Please check the keys' value and see if they are duplicated");this.map[e]=t},t.prototype.DeregisterLayer=function(e){null!=this.map[e]&&(this.map[e]=null)},t.prototype.AddObjectToLayer=function(e,t){var n=this.map[t];n.addChild(e);var i=document.getElementById("egretDOMRoot");if(i&&(t===Layer.Overlay||t===Layer.LandscapeOnlyOverlay)&&"BetLog"!==e.name){i.remove();
var o=this.getObjectToLauyer(Layer.Overlay,"BetLog");o&&o.parent.removeChild(o)}},t.prototype.ClearLayer=function(e){var t=this.map[e];t.removeChildren()},t.prototype.AddObjectToLayerAt=function(e,t,n){var i=this.map[t];i.addChildAt(e,n)},t.prototype.GetLayer=function(e){return this.map[e]},t.prototype.getObjectToLauyer=function(e,t){var n=this.map[e];return n.getChildByName(t)},t}(egret.Sprite);__reflect(GameLayer.prototype,"GameLayer");var LoadingStatus;!function(e){e.COUNT=0,e.InitGameAndSlotConfigStart=e.COUNT++,e.InitGameAndSlotConfigFinish=e.COUNT++,e.LoadLocalConfigStart=e.COUNT++,e.LoadLocalConfigFinish=e.COUNT++,e.LoadCommonConfigStart=e.COUNT++,e.LoadCommonConfigFinish=e.COUNT++,e.InitBeforeLoadResourceStart=e.COUNT++,e.InitBeforeLoadResourceFinish=e.COUNT++,e.LoadThemeAndResourceStart=e.COUNT++,e.LoadThemeAndResourceFinish=e.COUNT++,e.LoadQueryStringAndLobbyInfoStart=e.COUNT++,e.LoadQueryStringAndLobbyInfoFinish=e.COUNT++,e.InitAfterLoadResourceStart=e.COUNT++,e.InitAfterLoadResourceFinish=e.COUNT++,e.LoginStart=e.COUNT++,e.LoginFinish=e.COUNT++}(LoadingStatus||(LoadingStatus={}));var GameLoadingManager=function(){function e(e){this._loadingStatus=LoadingStatus.InitGameAndSlotConfigStart,this.doubleClick=0,this.isThemeLoadEnd=!1,this.isResourceLoadEnd=!1,this.numOfResource=6,this.numOfResLoaded=0,this.stage=e}return Object.defineProperty(e.prototype,"loadingStatus",{get:function(){return this._loadingStatus},set:function(e){CommonFunc.log(e),this._loadingStatus=e},enumerable:!0,configurable:!0}),e.prototype.StartLoading=function(){this.loadingStatus=LoadingStatus.InitGameAndSlotConfigStart,this.CheckStatus()},e.prototype.CheckStatus=function(){switch(this.loadingStatus){case LoadingStatus.InitGameAndSlotConfigStart:this.InitGameAndSlotConfig();break;case LoadingStatus.InitGameAndSlotConfigFinish:this.LoadLocalConfig();break;case LoadingStatus.LoadLocalConfigFinish:this.LoadCommonConfig();break;case LoadingStatus.LoadCommonConfigFinish:this.InitBeforeLoadResource();break;case LoadingStatus.InitBeforeLoadResourceFinish:this.LoadThemeAndResource();break;case LoadingStatus.LoadThemeAndResourceFinish:this.LoadQueryStringAndLobbyInfo();break;case LoadingStatus.LoadQueryStringAndLobbyInfoFinish:this.InitAfterLoadResource();break;case LoadingStatus.InitAfterLoadResourceFinish:this.Login()}},e.prototype.InitGameAndSlotConfig=function(){ConfigInitializer.initGameConfig(),ConfigInitializer.initSlotConfig(),this.initializer=new SlotConfig.CInitializer,GameConfig.platform==Platform.mobile?(this.stage.addEventListener(egret.Event.DEACTIVATE,this.onDeactivate,this),this.stage.addEventListener(egret.Event.ACTIVATE,this.onActivate,this)):this.initMouse(),this.loadingStatus=LoadingStatus.InitGameAndSlotConfigFinish,this.CheckStatus()},e.prototype.onDoubleClickTimeOut=function(e){this.doubleClick-=e},e.prototype.onDeactivate=function(){CommonFunc.log("onDeactivate"),AudioManager.Instance.onDeactivate()},e.prototype.onActivate=function(){CommonFunc.log("onActivate"),AudioManager.Instance.onActivate()},e.prototype.initMouse=function(){mouse.enable(this.stage),KeyPressManager.Instance},e.prototype.LoadLocalConfig=function(){this.loadingStatus=LoadingStatus.LoadLocalConfigStart;var e=new egret.HttpRequest;e.responseType=egret.HttpResponseType.TEXT,e.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),e.addEventListener(egret.Event.COMPLETE,function(t){var n=e.response;this.onLocalConfigFileLoaded(n)},this),e.open("html5web/resource/LocalConfig.json?t="+(new Date).getTime(),egret.HttpMethod.GET),e.send()},e.prototype.onLocalConfigFileLoaded=function(e){if(null==e)throw new Error("Load config xml error");var t=JSON.parse(e);GameConfig.CDNVersion=t.CDNVersion,this.loadingStatus=LoadingStatus.LoadLocalConfigFinish,this.CheckStatus()},e.prototype.LoadCommonConfig=function(){this.loadingStatus=LoadingStatus.LoadCommonConfigStart;var e=0==GameConfig.configPath.indexOf("//"),t=(e?window.location.protocol:"")+GameConfig.configPath+"?t="+(new Date).getTime();CommonFunc.log("Config: "+t);var n=new egret.HttpRequest;n.responseType=egret.HttpResponseType.TEXT,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),n.addEventListener(egret.Event.COMPLETE,function(e){var t=n.response;this.onConfigFileLoaded(t)},this),n.open(t,egret.HttpMethod.GET),n.send()},e.prototype.onConfigFileLoaded=function(e){if(null==e)throw new Error("Load config xml error");this.initializer.OnConfigLoaded(e),this.loadingStatus=LoadingStatus.LoadCommonConfigFinish,this.CheckStatus()},e.prototype.InitBeforeLoadResource=function(){egret.ImageLoader.crossOrigin="anonymous",this.loadingStatus=LoadingStatus.InitBeforeLoadResourceStart,this.initializer.InitBeforePreload(this.stage),this.loadingStatus=LoadingStatus.InitBeforeLoadResourceFinish,this.CheckStatus()},e.prototype.LoadThemeAndResource=function(){var e=new RES.VersionController;e.getVirtualUrl=function(e){return e+"?v="+GameConfig.version+"."+SlotConfig.SLOT_VERSION},RES.registerVersionController(e),this.loadingStatus=LoadingStatus.LoadThemeAndResourceStart;var t=new AssetAdapter;this.stage.registerImplementation("eui.IAssetAdapter",t),this.stage.registerImplementation("eui.IThemeAdapter",new ThemeAdapter);var n=0==GameConfig.resourceRootPath.indexOf("//"),i=GameConfig.resourceDirectory;GameConfig.isUseCDNVersion&&(i=i.replace("/resource","/"+GameConfig.CDNVersion+"/resource"));var o=(n?window.location.protocol:"")+GameConfig.resourceRootPath+i;CommonFunc.log("Resource Root: "+o),ResUtils.getInstance().addConfig(o+"default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/commonUI/default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/desktopUI/default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/mobileUI/default.res.json",o),ResUtils.getInstance().loadConfig(this.onConfigComplete,this)},e.prototype.parseConfig=function(e){},e.prototype.onConfigComplete=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);var t=0==GameConfig.resourceRootPath.indexOf("//"),n=GameConfig.resourceDirectory;GameConfig.isUseCDNVersion&&(n=n.replace("/resource","/"+GameConfig.CDNVersion+"/resource"));var i=(t?window.location.protocol:"")+GameConfig.resourceRootPath+n;CommonFunc.log("Resource Root: "+i);var o=new eui.Theme(i+"default.thm.json",this.stage);o.addEventListener(eui.UIEvent.COMPLETE,this.onThemeLoadComplete,this),RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,this.onItemLoadError,this),this.numOfResource=6,this.numOfResLoaded=0,this.initializer.LoadURLQueryString(),GameConfig.Locale>Language.Indonesia&&(GameConfig.Locale=GameConfig.FallbackLocale),RES.loadGroup("config"),RES.loadGroup(this.LoadLanguage()),RES.loadGroup("loadingCommon"),RES.loadGroup(this.LoadLanguageCommon()),RES.loadGroup("postload"),RES.loadGroup(this.LoadLoadingPage())},e.prototype.LoadLanguage=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.languageEng;case Language.SimplifiedChinese:return RESGroupKey.languageCn;case Language.TraditionalChinese:return RESGroupKey.languageZh;case Language.Korean:return RESGroupKey.languageKr;case Language.Japanese:return RESGroupKey.languageJp;case Language.Thai:return RESGroupKey.languageTh;case Language.Vietnam:return RESGroupKey.languageVi;case Language.Indonesia:return RESGroupKey.languageId;default:return RESGroupKey.languageEng}},e.prototype.LoadLanguageCommon=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.languageCommonEng;case Language.SimplifiedChinese:return RESGroupKey.languageCommonCn;case Language.TraditionalChinese:return RESGroupKey.languageCommonZh;case Language.Korean:return RESGroupKey.languageCommonKr;case Language.Japanese:return RESGroupKey.languageCommonJp;case Language.Thai:return RESGroupKey.languageCommonTh;case Language.Vietnam:return RESGroupKey.languageCommonVi;case Language.Indonesia:return RESGroupKey.languageCommonId;default:return RESGroupKey.languageCommonEng}},e.prototype.LoadLoadingPage=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.loadingEng;case Language.SimplifiedChinese:return RESGroupKey.loadingCn;case Language.TraditionalChinese:return RESGroupKey.loadingZh;case Language.Korean:return RESGroupKey.loadingKr;case Language.Japanese:return RESGroupKey.loadingJp;case Language.Thai:return RESGroupKey.loadingTh;case Language.Vietnam:return RESGroupKey.loadingVi;case Language.Indonesia:return RESGroupKey.loadingId;default:return RESGroupKey.loadingEng}},e.prototype.onThemeLoadComplete=function(){this.isThemeLoadEnd=!0,this.LoadThemeAndResourceCompleted()},e.prototype.onResourceLoadComplete=function(e){switch(CommonFunc.log("Resource Group name: %s",e.groupName),e.groupName){case this.LoadLanguageCommon():this.numOfResLoaded++,this.CheckResourceLoadCompleted();var t=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+t+"_json"),this.initializer.LoadCommonErrorCodeFile();break;case this.LoadLanguage():this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"config":this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case this.LoadLoadingPage():this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"loadingCommon":this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"postload":this.numOfResLoaded++,this.CheckResourceLoadCompleted()}},e.prototype.CheckResourceLoadCompleted=function(){this.numOfResLoaded==this.numOfResource&&(this.isResourceLoadEnd=!0,this.LoadThemeAndResourceCompleted())},e.prototype.onItemLoadError=function(e){console.warn("Url:"+e.resItem.url+" has failed to load")},e.prototype.onResourceLoadError=function(e){console.warn("Group:"+e.groupName+" has failed to load"),this.onResourceLoadComplete(e)},e.prototype.LoadThemeAndResourceCompleted=function(){this.isThemeLoadEnd&&this.isResourceLoadEnd&&(RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,this.onItemLoadError,this),this.loadingStatus=LoadingStatus.LoadThemeAndResourceFinish,this.CheckStatus())},e.prototype.LoadQueryStringAndLobbyInfo=function(){this.loadingStatus=LoadingStatus.LoadQueryStringAndLobbyInfoStart,this.initializer.LoadLobbyInfo(this.LoadLobbyInfoFinished,this)},e.prototype.LoadLobbyInfoFinished=function(){this.loadingStatus=LoadingStatus.LoadQueryStringAndLobbyInfoFinish,this.CheckStatus()},e.prototype.InitAfterLoadResource=function(){this.loadingStatus=LoadingStatus.InitAfterLoadResourceStart,this.initializer.InitAfterPreLoad(this.stage),this.initializer.createMsgBoxLandscapeOnly(),this.loadingStatus=LoadingStatus.InitAfterLoadResourceFinish,this.CheckStatus()},e.prototype.getIOSAppBetSource=function(){return BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile|BetSource.BSApp|BetSource.BSIOS},e.prototype.getAndroidAppBetSource=function(){return BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile|BetSource.BSApp|BetSource.BSAndroid},e.prototype.Login=function(){this.loadingStatus=LoadingStatus.LoginStart;var e=new SlotConfig.CNetSocket,t=new SlotConfig.CNetSocket,n=new Network.LoginManager(t,e),i=new SlotConfig.CSlotActionManager(e),o=new SlotConfig.CWinInfoParser;i.SetWinInfoParser(o),SocketManager.getInstance().SetLoginManager(n),SocketManager.getInstance().SetActionManager(i),SocketManager.getInstance().SetLocation(GameConfig.cshosts,GameConfig.port,GameConfig.sshosts),"Android"==egret.Capabilities.os&&parseInt(StringUtil.getParameterByName("native"))>=1&&(SlotConfig.BetSource=this.getAndroidAppBetSource()),"iOS"==egret.Capabilities.os&&parseInt(StringUtil.getParameterByName("native"))>=1&&(SlotConfig.BetSource=this.getIOSAppBetSource()),SocketManager.getInstance().Login(GameConfig.GameCode,GameConfig.token,SlotConfig.BetSource),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.LOGIN_STARTED)),this.loadingStatus=LoadingStatus.LoginFinish},e}();__reflect(GameLoadingManager.prototype,"GameLoadingManager");var GameSceneManager=function(e){function t(){var t=e.call(this)||this;return t.sceneHandlers={},t.componentHandlers={},t.sceneHandlers=[],t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.AddEventListeners=function(){GameConfig.hasOpeningVideo&&GameConfig.platform==Platform.desktop?(EventCentral.getInstance().addEventListener(SysNotify.OPENING_VIDEO_COMPLETED,this.VideoComplete,this),EventCentral.getInstance().addEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this)):EventCentral.getInstance().addEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this)},t.prototype.AddSceneHandler=function(e,t){if(null!=this.sceneHandlers[e])throw new Error("GameMode: "+SceneType[e]+" has already got a sceneHandler registered");CommonFunc.log("Register GameMode: "+SceneType[e]),this.sceneHandlers[e]=t},t.prototype.AddOverlayHandler=function(e,t){null==this.componentHandlers[e]?(CommonFunc.log("Register Overlay: "+e),this.componentHandlers[e]=t):console.log("Overlay: "+e+" has already got a sceneHandler registered")},t.prototype.InitGame=function(e){void 0===e&&(e=null),hideLanding(),SocketManager.getInstance().GetData().balance>=0&&EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.SYNC_DATA_READY)),this.removeEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this),setTimeout(this.InitScene.bind(this),16)},t.prototype.InitScene=function(){var e=new DummySceneHandler(SceneType.Dummy);t.GetInstance().AddSceneHandler(SceneType.Dummy,e);var n=SceneType.Dummy;if(null==this.sceneHandlers[n])throw new Error("This game has no status: "+n);var i=this.sceneHandlers[n];this.loadingScene=AssetManager.GetInstance().GetAsset("LoadingScene"),i.InitScene(this.loadingScene),GameConfig.platform==Platform.desktop&&1==GameConfig.hasOpeningVideo&&this.LoadingSceneVisible(!1),this.currentGameMode=n},t.prototype.VideoComplete=function(){EventCentral.getInstance().removeEventListener(SysNotify.OPENING_VIDEO_COMPLETED,this.VideoComplete,this),this.LoadingSceneVisible(!0)},t.prototype.LoadingSceneVisible=function(e){this.loadingScene.SetVisible(e)},t.prototype.InitSceneFromDummy=function(){var e=SocketManager.getInstance().GetData().GetInitGameMode();if(null==this.sceneHandlers[e])throw new Error("This game has no status: "+e);var t=this.sceneHandlers[e];this.currentGameMode=e,GameConfig.platform==Platform.desktop&&1==GameConfig.hasOpeningVideo&&this.LoadingSceneVisible(!0),t.InitScene(this.loadingScene)},t.prototype.ToGameMode=function(e){if(null==this.sceneHandlers[e])throw new Error("This game has no status: "+e);var t=this.sceneHandlers[e],n=AssetManager.GetInstance().GetAsset("InGameLoadingIndicator");t.EnterFrom(this.currentGameMode,n),this.currentGameMode=e},t.prototype.ShowOverlay=function(e,t){if(void 0===t&&(t=null),null==this.componentHandlers[e])throw new Error("This game has no component: "+e);var n=this.componentHandlers[e];n.data=t;var i=AssetManager.GetInstance().GetAsset("InGameLoadingIndicator");n.EnterFrom(this.currentGameMode,i)},t}(egret.EventDispatcher);__reflect(GameSceneManager.prototype,"GameSceneManager");var AssetAdapter=function(){function e(){}return e.prototype.getAsset=function(e,t,n){function i(i){t.call(n,i,e)}if(RES.hasRes(e)){var o=RES.getRes(e);o?i(o):RES.getResAsync(e,i,this)}else RES.getResByUrl(e,i,this,RES.ResourceItem.TYPE_IMAGE)},e}();__reflect(AssetAdapter.prototype,"AssetAdapter",["eui.IAssetAdapter"]);var DBInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.isFixedScale=!0,t.skinName="skins.DBInGameLoadingIndicatorSkin",t.loadingIndicator.source="LoadingInd",t.loadingIndicator.animationName="LoadingIndicator",t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%")},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(DBInGameLoadingIndicator.prototype,"DBInGameLoadingIndicator",["IProcessIndiator"]);var InGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.skinName=skins.InGameLoadingIndicatorSkin,t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.loadingIndicator&&this.isIndicatorLooping&&this.loadingIndicator.play(-1),null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%"),null==this.loadingIndicator||this.isIndicatorLooping||this.loadingIndicator.gotoAndStop(Math.ceil(e*this.frameCount*.01))},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(InGameLoadingIndicator.prototype,"InGameLoadingIndicator",["IProcessIndiator"]);var BSFeatureView=function(e){function t(){var t=e.call(this)||this;return t.selection=[],t.isMysteryOptionSelected=!1,t.skinName="FeatureUISkin",t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.InitScene()},t.prototype.InitScene=function(){for(var e=0;6>e;e++){var t=new BSFeatureSelection(e);this.selectionGroup.addChild(t),this.selection.push(t),t.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnBtnTap,this)}EventCentral.getInstance().addEventListener(FLSceneNotify.FEATURE_MYSTERY_ROULETTE_START,this.OnMysteryOptionSelected,this)},t.prototype.OnBtnTap=function(e){5==e.currentTarget.SelectionId&&(this.isMysteryOptionSelected=!0),e.currentTarget.IsSelected=!0;var t=new SceneNotify(SceneNotify.FEATURE_ITEM_SELECTED);t.data=e.currentTarget.SelectionId,EventCentral.getInstance().dispatchEvent(t),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.OnDataReady,this)},t.prototype.OnMysteryOptionSelected=function(){this.featureMysteryResult=new FeatureMysteryResult,this.mysteryGroup.addChild(this.featureMysteryResult)},t.prototype.OnDataReady=function(){var e=this;if(EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.OnDataReady,this),this.isMysteryOptionSelected){var t=SocketManager.getInstance().GetData();egret.setTimeout(function(){e.featureMysteryResult.ReadyToStop(t.nTriggeredAccFreeGame,t.randomID)},this,2e3)}else EventCentral.getInstance().dispatchEvent(new SceneNotify(FLSceneNotify.FEATURE_SCENE_REVEAL_FINISHED))},t}(HTMLUI.UIBase);__reflect(BSFeatureView.prototype,"BSFeatureView");var LoadingSceneHint=function(e){function t(){var t=e.call(this)||this;return t.rand=0,t.numberOfHints=1,t.isInSequence=!0,t.skinName=skins.LoadingSceneHintSkin,t.addEventListener(egret.Event.LEAVE_STAGE,t.CancelUpdate,t),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.showHints(),this.updateHints=egret.setInterval(this.showHints,this,4e3)},t.prototype.showHints=function(){this.UpdateIndex(),this.hintsIcon&&(this.hintsIcon.source="hints_icon_json.symbol0"+(this.rand+1).toString()),this.hintsLabel&&(this.hintsLabel.font=Localization.Instance.getString(GameConfig.GameCode+".font.loading"),this.hintsLabel.text=Localization.Instance.getString(GameConfig.GameCode+".loading.hints")[this.rand])},t.prototype.UpdateIndex=function(){return this.isInSequence?this.rand=++this.rand%this.numberOfHints:this.rand=Math.floor(Math.random()*this.numberOfHints),this.rand},t.prototype.CancelUpdate=function(e){egret.clearInterval(this.updateHints)},t}(eui.Component);__reflect(LoadingSceneHint.prototype,"LoadingSceneHint");var SpInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.skinName="skins.InGameLoadingIndicatorSkin",t.loadingIndicator.source="LoadingIndicator",t.loadingIndicator.animationName="loop",t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%")},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(SpInGameLoadingIndicator.prototype,"SpInGameLoadingIndicator",["IProcessIndiator"]);var SpriteInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.skinName=skins.InGameLoadingIndicatorSkin,t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.loadingIndicator&&this.isIndicatorLooping&&this.loadingIndicator.play(-1),null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%"),null==this.loadingIndicator||this.isIndicatorLooping||this.loadingIndicator.gotoAndStop(Math.ceil(e*this.frameCount*.01))},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(SpriteInGameLoadingIndicator.prototype,"SpriteInGameLoadingIndicator",["IProcessIndiator"]);var BaseGameSceneHandler=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeoutId=-1,t}return __extends(t,e),t.prototype.LoadFreeGameGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameZh;case Language.Korean:return RESGroupKey.FreeGameKr;case Language.Japanese:return RESGroupKey.FreeGameJp;case Language.Thai:return RESGroupKey.FreeGameTh;case Language.Vietnam:return RESGroupKey.FreeGameVi;case Language.Indonesia:return RESGroupKey.FreeGameId}},t.prototype.LoadFreeGameMobileGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameMobileEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameMobileCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameMobileZh;case Language.Korean:return RESGroupKey.FreeGameMobileKr;case Language.Japanese:return RESGroupKey.FreeGameMobileJp;case Language.Thai:return RESGroupKey.FreeGameMobileTh;case Language.Vietnam:return RESGroupKey.FreeGameMobileVi;case Language.Indonesia:return RESGroupKey.FreeGameMobileId}},t.prototype.GetPreloadgroupList=function(){return console.log("##################################### GetPreloadgroupList"),[RESGroupKey.UIPanelCommon,GameConfig.platform==Platform.desktop?this.LoadUIPanel():this.LoadUIPanelMobile(),GameConfig.platform==Platform.desktop?this.LoadSlotSceneCommon():this.LoadSlotSceneCommonMobile(),GameConfig.platform==Platform.desktop?this.LoadFreeGameGroup():this.LoadFreeGameMobileGroup(),GameConfig.platform==Platform.desktop?RESGroupKey.BaseGame:RESGroupKey.BaseGameMobile]},t.prototype.PreLoadResources=function(){var e=this.GetPreloadgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;console.log(e),console.log(e.length);for(var t=0;t1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),i=new LineDetail;AssetManager.GetInstance().AddAsset("LineDetail",i),e.AddObjectToUI(i,"winEffectLayer");var o=new ParticleWinLineManager;o.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,o.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",o),e.AddObjectToUI(o,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CBaseGameStateController),this.timeoutId=egret.setTimeout(this.Progress2,this,1e3)},t.prototype.Progress2=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,this.PreLoadResources()},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;SocketManager.getInstance().GetData().waitClient>0||SocketManager.getInstance().GetData().unsettledEGamesList.length>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;case SceneType.Feature1:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;case SceneType.FSO:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t.kSlotController="SlotController",t}(SceneHandler);__reflect(BaseGameSceneHandler.prototype,"BaseGameSceneHandler");var BetlogOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.hasExtraResource=!0,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?this.LoadBetlogGroup():this.LoadBetlogGroupMobile()]},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()?this.CreateSceneAndController():this.LoadGameListDetail()},t.prototype.IsGameListArrayLoaded=function(){return null!=GameConfig.gameListDetail},t.prototype.LoadGameListDetail=function(){var e=CommonFunc.getGameListURL(),t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.OnGameListDetailLoaded=function(e){var t=e.target,n=t.data;if(null==n){var i=RES.getRes("GameList_Template_json");GameConfig.gameListDetail=i,this.processIndicator.Hide(),this.CreateSceneAndController()}else GameConfig.gameListDetail=JSON.parse(StringUtil.tryDecode64(n)),this.processIndicator.Hide(),this.CreateSceneAndController()},t.prototype.GameListDetailLoadedFailed=function(e){alert("Fail to load GameListDetail"),GameConfig.debugPanelOn||GameConfig.demoPanelOn?this.LoadGameListDetailTemplate():this.LoadGameListDetailTemplate()},t.prototype.LoadGameListDetailTemplate=function(){var e="resource/UI/commonUI/images/MiniLobby/GameList_Template.dat",t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;n1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),n=new LineDetail;AssetManager.GetInstance().AddAsset("LineDetail",n),e.AddObjectToUI(n,"winEffectLayer");var i=new ParticleWinLineManager;i.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,i.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",i),e.AddObjectToUI(i,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CFreeSpinOfferGameStateController)},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.FSO,this.OnTransitionEnd,this,this.fromType);break;case SceneType.Feature1:case SceneType.Base:this.processIndicator.Hide(),this.stateController.Start(!1);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t}(SceneHandler);__reflect(FreeSpinOfferGameSceneHandler.prototype,"FreeSpinOfferGameSceneHandler");var JackpotOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.hasExtraResource=!1,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[this.LoadJackpot()]},t.prototype.LoadJackpot=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.JackpotEng;case Language.SimplifiedChinese:return RESGroupKey.JackpotCn;case Language.TraditionalChinese:return RESGroupKey.JackpotZh;case Language.Korean:return RESGroupKey.JackpotKr;case Language.Japanese:return RESGroupKey.JackpotJp;case Language.Thai:return RESGroupKey.JackpotTh;case Language.Vietnam:return RESGroupKey.JackpotVi;case Language.Indonesia:return RESGroupKey.JackpotId}},t.prototype.CreateSceneAndController=function(){var e=this.data,t=e.split(",");this.type=parseInt(t[0]),this.amount=parseInt(t[1]),null==this.jackpot&&(this.jackpot=new Jackpot),GameLayer.GetInstance().AddObjectToLayer(this.jackpot,Layer.Overlay),this.jackpot.InitJackpot(this.type,this.amount)
},t}(OverlayComponentSceneHandler);__reflect(JackpotOverlayHandler.prototype,"JackpotOverlayHandler");var MiniLobbyOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.nLoadedIcon=0,n.hasExtraResource=!0,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[RESGroupKey.MiniLobby]},t.prototype.CreateSceneAndController=function(){GameConfig.platform==Platform.desktop?(null==this.miniLobby&&(this.miniLobby=new MiniLobby),GameLayer.GetInstance().AddObjectToLayer(this.miniLobby,Layer.UI)):(null==this.miniLobbyMobile&&(this.miniLobbyMobile=new MiniLobbyMobile),GameLayer.GetInstance().AddObjectToLayer(this.miniLobbyMobile,Layer.UI))},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()&&this.IsGameListIconsLoaded()?this.CreateSceneAndController():this.LoadGameListDetail()},t.prototype.IsGameListArrayLoaded=function(){return null!=GameConfig.gameListDetail},t.prototype.IsGameListIconsLoaded=function(){return this.IsGameListArrayLoaded()&&GameConfig.gameIconArray.length==GameConfig.gameListDetail.gamelist.length},t.prototype.LoadGameListDetail=function(){var e=CommonFunc.getGameListURL(),t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.LoadGameListIcons=function(){for(var e="",t=0;t0},e.prototype.ContainAllDirections=function(e){return(this._value&e)==e},e.Left=1,e.Right=2,e.Top=4,e.Bottom=8,e}();__reflect(BetDirection.prototype,"BetDirection");var RankingOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.iconMaxCount=0,n.iconCount=0,n.hasExtraResource=!0,EventCentral.getInstance().addEventListener(SceneNotify.REQUESTING_RANKING_INFO,n.onRequestingRankingInfo,n),EventCentral.getInstance().addEventListener(SceneNotify.LOAD_RANKING_ICON,n.LoadIcon,n),n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?RESGroupKey.Ranking:RESGroupKey.RankingMobile]},t.prototype.CreateSceneAndController=function(){GameConfig.isOverlayOpened=!0,GameConfig.platform==Platform.desktop?this.rankingPanel=new RankingPanel:this.rankingPanel=new RankingPanelMobile,this.popupLayer=new eui.UILayer,this.rankingPanel.addChild(this.popupLayer),this.popupLayer.touchThrough=!0,GameLayer.GetInstance().AddObjectToLayer(this.rankingPanel,Layer.Overlay)},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()?this.LoadGameIconResJson():this.LoadGameListDetail()},t.prototype.LoadGameIconResJson=function(){if(GameConfig.isUseCDNVersion){var e;e=CDNPath2(),RES.loadConfig(e+GameConfig.gameIconPath+"resource/default.res.json",e+GameConfig.gameIconPath+"resource/")}else RES.loadConfig(GameConfig.gameIconPath+"resource/default.res.json",GameConfig.gameIconPath+"resource/");RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.addEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this)},t.prototype.onConfigCompleteHandle=function(e){console.log("onConfigCompleteHandle"),RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.removeEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this),this.processIndicator.Hide(),this.CreateSceneAndController()},t.prototype.onConfigFailed=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.removeEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this),console.log("onConfigFailed"),this.processIndicator.Hide()},t.prototype.onRequestingRankingInfo=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this),EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_TIMEOUT,this.onTimeOut,this),GameConfig.platform==Platform.desktop?CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE.POPUP,this.popupLayer):CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE_MOBILE.POPUP,this.popupLayer),EventCentral.getInstance().addEventListener(SceneNotify.RANKING_TIMEOUT,this.onTimeOut,this),EventCentral.getInstance().addEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this)},t.prototype.onRankingList=function(e){CommonFunc.clearPopUp(this.popupLayer),EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this)},t.prototype.LoadIcon=function(e){GameConfig.platform==Platform.desktop?CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE.POPUP,this.popupLayer):CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE_MOBILE.POPUP,this.popupLayer);var t=e.data;this.iconMaxCount=t.length,this.iconCount=0;for(var n,i=0;i=0&&(o.indexMap[e]=a),i?webaudio.playUrl(t,n):e==o.curBgm&&webaudio.playUrl(t,n)}),this.audioMap[e]=t,this.urlMap[t]=e)},t.prototype.getNameByUrl=function(e){return this.urlMap[e]?this.urlMap[e]:e},t.prototype.unloadWebAudio=function(){this.useWebAudio&&this.doSoundUnload&&(webaudio.unloadAll(),this.audioMap={},this.urlMap={},this.indexMap={})},t.prototype.loadWebAudioGroup=function(e){if(this.useWebAudio&&this.curSoundGroup!=e){this.unloadWebAudio();for(var t=RES.getGroupByName(e),n=0;n1&&(s.panel=new PaytablePanel,s.panel.addEventListener(egret.TouchEvent.TOUCH_TAP,function(e){switch(e.data){case"prev":s.curPage>0&&s.doPrev();break;case"next":s.curPage1&&(s.pageDot=new PagingDotPane(n.length,r.x,r.y),s.addChild(s.pageDot)),s.addEventListener(egret.Event.ADDED_TO_STAGE,s.init,s),s.addEventListener(egret.Event.REMOVED_FROM_STAGE,s.release,s),s}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),null!=this.foreground&&this.addChild(this.foreground)},Object.defineProperty(t.prototype,"page",{get:function(){return this.curPage},set:function(e){this.curPage=e,this.onPagingEnd()},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.init,this);for(var e=0;3>e;e++){var t=new eui.Group;t.x=(e-1)*this.width,t.y=0,t.width=this.width,t.height=this.height,this.content.addChild(t),1==e&&(t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegan,this),t.addEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnded,this),t.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),t.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchEnded,this))}this.onPagingEnd()},t.prototype.release=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.release,this)},t.prototype.onTouchBegan=function(e){this.touchX=e.stageX},t.prototype.onTouchEnded=function(e){var t=this.content.getChildAt(1);t.x<.3*-this.width?this.doNext():t.x>.3*this.width?this.doPrev():this.doCancel()},t.prototype.onTouchMove=function(e){var t=e.stageX-this.touchX;if(!this.isLoop){if(0==this.curPage&&t>0)return;if(this.curPage>=this.mPages.length-1&&0>t)return}for(var n=0;3>n;n++){var i=this.content.getChildAt(n);i.x=t+(n-1)*this.width}},t.prototype.doNext=function(){if(this.logPage==this.curPage){this.curPage++;for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);0==e?n.to({x:(e-2)*this.width},500).call(this.onPagingEnd,this):n.to({x:(e-2)*this.width},500)}}},t.prototype.doPrev=function(){if(this.logPage==this.curPage){this.curPage--;for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);0==e?n.to({x:this.width*e},500).call(this.onPagingEnd,this):n.to({x:this.width*e},500)}}},t.prototype.doCancel=function(){for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);n.to({x:(e-1)*this.width,y:0},500,egret.Ease.sineIn)}},t.prototype.onPagingEnd=function(){if(0==this.mPages.length)return void CommonFunc.log("Pager stack is empty");null!=this.panel&&(this.curPage>=this.mPages.length-1?(this.panel.SetEnableNext(!1),this.panel.SetEnablePrev(!0)):this.curPage<=0?(this.panel.SetEnablePrev(!1),this.panel.SetEnableNext(!0)):(this.panel.SetEnablePrev(!0),this.panel.SetEnableNext(!0))),this.curPage>=this.mPages.length&&(this.isLoop?this.curPage-=this.mPages.length:this.curPage=this.mPages.length-1),this.curPage<0&&(this.isLoop?this.curPage+=this.mPages.length:this.curPage=0),this.logPage=this.curPage;for(var e=0;3>e;e++){var t=this.curPage+e-1;if(0>t?t+=this.mPages.length:t>=this.mPages.length&&(t-=this.mPages.length),t!=this.curPage||1==e){var n=this.content.getChildAt(e);n.x=(e-1)*this.width,n.removeChildren();var i=this.mPages[t];n.addChild(i)}}this.pageDot&&(this.pageDot.selected=this.curPage)},t}(eui.Component);__reflect(HorizontalPager.prototype,"HorizontalPager");var SpacebarState;!function(e){e[e.Spin=0]="Spin",e[e.Stop=1]="Stop",e[e.Disable=2]="Disable"}(SpacebarState||(SpacebarState={}));var KeyPressManager=function(){function e(){this.downKey={},document.addEventListener("keydown",function(t){CommonFunc.log(t.keyCode),e.Instance.downKey[t.keyCode]=1,e.Instance.CheckKeyPattern()},!1),document.addEventListener("keyup",function(t){e.Instance.downKey[t.keyCode]=0},!1),EventCentral.getInstance().addEventListener(SceneNotify.START_ENABLE,this.EnableSpin,this),EventCentral.getInstance().addEventListener(SysNotify.ENABLE_ALL_BUTTON,this.EnableSpin,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_ENABLE,this.EnableStop,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_START,this.EnableStop,this),EventCentral.getInstance().addEventListener(SysNotify.DISABLE_ALL_BUTTON,this.DisableSpacebar,this)}return Object.defineProperty(e,"Instance",{get:function(){return this._instance||(this._instance=new e),this._instance},enumerable:!0,configurable:!0}),e.prototype.EnableSpin=function(e){SocketManager.getInstance().GetData().IsBalanceReady()?this.currentState=SpacebarState.Spin:this.currentState=SpacebarState.Disable},e.prototype.EnableStop=function(e){this.currentState=SpacebarState.Stop},e.prototype.DisableSpacebar=function(e){this.currentState=SpacebarState.Disable},e.prototype.CheckKeyPattern=function(){if(1==this.downKey[17]&&1==this.downKey[18]&&1==this.downKey[73]&&CommonFunc.ShowMessage("Game version: "+GameConfig.version+"\n \nServer version: \n"+SocketManager.getInstance().GetData().serverVersion+"\n\n"),GameConfig.platform==Platform.desktop&&1==this.downKey[32])switch(this.currentState){case SpacebarState.Spin:if(!SocketManager.getInstance().GetData().IsEnoughBalance()&&!(0!=SocketManager.getInstance().GetData().triggeredType||SocketManager.getInstance().GetData().nextAction>=3)&&!SocketManager.getInstance().GetData().fso)return CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),void(SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin")));EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Start)),this.currentState=SpacebarState.Disable;break;case SpacebarState.Stop:EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),SocketManager.getInstance().GetData().triggeredType==BonusType.None&&(this.currentState=SpacebarState.Disable);break;case SpacebarState.Disable:}},e}();__reflect(KeyPressManager.prototype,"KeyPressManager");var VideoManager=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.intervalID=-1,t.map={},t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.videoLoad=function(e,t,n){void 0===n&&(n=null),this.completeVideoCount=0,this.totalVideoCount=0,this.indicator=t,this.progressArray=[];for(var i=0;ia;a+=o)a+o>n&&(o=n-a),i+=String.fromCharCode.apply(null,t.subarray(a,a+o));
return"data:video/mp4;base64,"+btoa(i)},t.prototype.AddAsset=function(e,t){this.ContainKey(e)?CommonFunc.log("Key:"+e+" is already exist."):this.map[e]=t},t.prototype.RemoveAsset=function(e){this.ContainKey(e)&&(this.map[e]=null)},t.prototype.ContainKey=function(e){return null==this.map[e]?!1:!0},t.prototype.GetAsset=function(e){return this.ContainKey(e)?this.map[e]:void 0},t}(egret.EventDispatcher);__reflect(VideoManager.prototype,"VideoManager");var NewSlotActionManager=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype._setGameData=function(t){e.prototype._setGameData.call(this,t),void 0!==t[JSONTag.NextAction]?this.data.nextAction=t[JSONTag.NextAction]:this.data.nextAction=NGABonusType.None},t}(SlotActionManager);__reflect(NewSlotActionManager.prototype,"NewSlotActionManager");var GameScene=function(){function e(){}return e.MAIN_GAME="main_game",e.FEATURE_GAME="feature1",e.FEATURE_GAME_2="feature2",e.DOUBLE_UP="doubleup",e.SETTING_MENU="setting",e.views=[e.MAIN_GAME,e.FEATURE_GAME,e.FEATURE_GAME_2,e.DOUBLE_UP,e.SETTING_MENU],e}();__reflect(GameScene.prototype,"GameScene");var SocketClient=function(){function e(e){void 0===e&&(e=0),this._bufferPos=0,this._pckHead=!1,this._packetSize=0,this.target=null,this.remoteType=0,this.isHandshaked=!1,this.remoteType=e,this._initialize()}return e.prototype._initialize=function(){this.socket=new egret.WebSocket,this._buffer=new egret.ByteArray,this._buffer.endian=egret.Endian.LITTLE_ENDIAN,this._bbuffer=new egret.ByteArray,this._bbuffer.endian=egret.Endian.LITTLE_ENDIAN,this._subPacket=new egret.ByteArray,this._subPacket.endian=egret.Endian.LITTLE_ENDIAN,this.socket.type=egret.WebSocket.TYPE_BINARY,this.socket.addEventListener(egret.ProgressEvent.SOCKET_DATA,this.onReceiveMessage,this),this.socket.addEventListener(egret.Event.CONNECT,this.onSocketOpen,this),this.socket.addEventListener(egret.Event.CLOSE,this.onSocketClose,this),this.socket.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onSocketError,this)},e.prototype.connect=function(e,t,n){null==this.socket&&this._initialize(),this.target=n,this.socket.connect(e,t)},e.prototype.close=function(){this.socket.close(),this.socket.removeEventListener(egret.ProgressEvent.SOCKET_DATA,this.onReceiveMessage,this),this.socket.removeEventListener(egret.Event.CONNECT,this.onSocketOpen,this),this.socket.removeEventListener(egret.Event.CLOSE,this.onSocketClose,this),this.socket.removeEventListener(egret.IOErrorEvent.IO_ERROR,this.onSocketError,this),this.socket=null},e.prototype.onSocketOpen=function(){CommonFunc.log("SocketClient.onSocketOpen ("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScOpen():this.target.onSpOpen())},e.prototype.onSocketClose=function(e){CommonFunc.log("SocketClient.onSocketClose("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScClose(e):this.target.onSpClose(e))},e.prototype.onReceiveMessage=function(e){if(this._buffer.length>0?(this._bbuffer.clear(),this.socket.readBytes(this._bbuffer),this._bufferPos=this._buffer.position,this._buffer.position=this._buffer.length,this._buffer.writeBytes(this._bbuffer),this._buffer.position=this._bufferPos):this.socket.readBytes(this._buffer),!this._pckHead){if(170!=this._buffer.readUnsignedByte())return void console.warn("Invalid packet head");this._pckHead=!0}if(0==this._packetSize){if(!(this._buffer.bytesAvailable>=4))return void console.warn("Not enough bits("+this._buffer.bytesAvailable+") for packet size");this._packetSize=this._buffer.readUnsignedInt()}if(this._packetSize>0){if(this._buffer.bytesAvailable>=this._packetSize){var t=this._deserialize(this._buffer);this._packetSize=0,this._pckHead=!1,this._buffer.clear(),null!=this.target&&(null!=t?0==this.remoteType?this.target.onScCommand(t):this.target.onSpCommand(t):CommonFunc.log("null command received"))}}else console.warn("Invalid packet size "+this._packetSize)},e.prototype.onSocketError=function(){CommonFunc.log("onSocketError"),null!=this.target&&(0==this.remoteType?this.target.onScSocketError():this.target.onSpSocketError())},e.prototype.send=function(e){if(null!==this.socket&&this.socket.connected){var t=this._serialize(e);return this.socket.writeBytes(t,0,t.bytesAvailable),this.socket.flush(),0}return CommonFunc.log("socket not connected"),-1},e.prototype._serialize=function(e){var t=e.toBytes(),n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,n.writeByte(170),n.writeUnsignedInt(6+t.length),BitwiseUtil.writeUint(n,e.getCmdID(),2),n.writeUnsignedInt(t.length),n.writeBytes(t),n.position=0,n},e.prototype.DebugPrintPacket=function(e){BitwiseUtil.__DebugPrintbyteArray__(this._serialize(e))},e.prototype._deserialize=function(e){for(;e.bytesAvailable>0;){var t=BitwiseUtil.readUint(e,2),n=BitwiseUtil.readUint(e);if(n>e.bytesAvailable){console.warn("Unexpected data size "+n+" command id "+t);break}e.readBytes(this._subPacket,0,n);var i=Command.getCommand(t);if(null!=i)return this._subPacket.position=0,i.fromBytes(this._subPacket),this._subPacket.clear(),i}},e}();__reflect(SocketClient.prototype,"SocketClient");var SocketManager=function(e){function t(){var t=e.call(this)||this;return t.isStarted=!1,t.isReconnecting=!1,t.isWaitingForResponse=!1,t.isBetLogReconnect=!1,t.isFSORedeemReconnect=!1,t.isRankingReconnect=!1,t.isActionPending=!1,t.isWaitingForBalanceUpdate=!1,t.isGameListRcvfromServer=!1,t}return __extends(t,e),t.getInstance=function(){return null==this.instance&&(this.instance=new t),this.instance},t.prototype.SetLoginManager=function(e){this._loginManager=e,this.AddEventListeners()},t.prototype.SetActionManager=function(e){this._actionManager=e},t.prototype.IsConnected=function(){return this._loginManager.IsConnected()},t.prototype.Reconnect=function(){this.isReconnecting=!0,this._loginManager.Reconnect()},t.prototype.ForceClose=function(){this._loginManager.ForceClose()},t.prototype.SetNetSocket=function(e,t){this._loginManager.SetNetSocket(e,t),this._actionManager.SetNetSocket(t)},t.prototype.GetData=function(){return this._actionManager.GetData()},t.prototype.SetLocation=function(e,t,n){void 0===n&&(n=null),this._loginManager.setLocation(e,t,n)},t.prototype.Login=function(e,t,n){this._betSource=n,this._loginManager.login(e,t,n)},t.prototype.Logout=function(){this._loginManager.close()},t.prototype.AddEventListeners=function(){this._loginManager.addEventListener(egret.Event.COMPLETE,this.onLoginComplete,this),this._loginManager.addEventListener(egret.Event.CLOSE,this.onLoginFailed,this)},t.prototype.RemoveEventListeners=function(){this._loginManager.removeEventListener(egret.Event.COMPLETE,this.onLoginComplete,this),this._loginManager.removeEventListener(egret.Event.CLOSE,this.onLoginFailed,this)},t.prototype.onLoginComplete=function(e){},t.prototype.onLoginFailed=function(e){},t.prototype.SendSpinAction=function(){this._actionManager.SendAction(SlotAction.Spin,this._betSource)},t.prototype.SendActionDone=function(){this._actionManager.SendActionDone()},t.prototype.SendFreeSpinAction=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free,this._betSource,e)},t.prototype.SendFreeSpin2Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free2,this._betSource,e)},t.prototype.SendFreeSpin3Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free3,this._betSource,e)},t.prototype.SendFreeAction2Debug=function(e){this._actionManager.SendAction(SlotAction.DebugFree2,this._betSource,e)},t.prototype.SendFreeAction3Debug=function(e){this._actionManager.SendAction(SlotAction.DebugFree3,this._betSource,e)},t.prototype.SendFeature1Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Feature1,this._betSource,e)},t.prototype.SendFeature1Debug=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.DebugFeature1,this._betSource,e)},t.prototype.SendSpinActionDebug=function(e){this._actionManager.SendAction(SlotAction.DebugSpin,this._betSource,e)},t.prototype.SendFreeActionDebug=function(e){this._actionManager.SendAction(SlotAction.DebugFree,this._betSource,e)},t.prototype.SendJackpotDebug=function(e){this._actionManager.SendDebugJackpot(e)},t.prototype.SendRequestEGameTokenAction=function(e){void 0===e&&(e=""),this._actionManager.SendRequestTokenAction(e)},t.prototype.SendBetLogAction=function(e,t){this._actionManager.SendBetQuery(e,t)},t.prototype.SendFsoRedeemAction=function(e){this._actionManager.SendFsoRedeemAction(e)},t.prototype.SendFsoEventDetailAction=function(e){this._actionManager.SendFsoEventDetailAction(e)},t.prototype.SendFsoNotificationReceived=function(){this._actionManager.SendFsoNotificationReceived()},t.prototype.SendRequestFSOEventListAction=function(){this._actionManager.SendRequestFSOEventListAction()},t.prototype.SendRequestRankingList=function(e,t){this._actionManager.SendRankingListRequest(e,t)},t.prototype.SendLaunchCompleteAction=function(){this._actionManager.SendLaunchCompleteAction()},t.prototype.SendRequestCampaignDetailAction=function(e){this._actionManager.SendRequestCampaignDetailAction(e)},t.prototype.SendRequestCampaignWinnerListAction=function(e){this._actionManager.SendRequestCampaignWinnerListAction(e)},t.ERR_COMMAND_FAIL=54,t.ERR_COMMAND_BUZY=94,t.ERR_COMMAND_LOST=95,t.ERR_SERVER_KICK=9001,t.ERR_SERVER_NOT_CONNECTED=9002,t.ERR_SOCKET_CLOSED=9003,t.ERR_SC_SOCKET_ERROR=9004,t.ERR_SP_SOCKET_ERROR=9005,t.instance=null,t}(egret.EventDispatcher);__reflect(SocketManager.prototype,"SocketManager");var CMDCampaign=function(){function e(){this.CampaignID=0,this.Popup=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.Popup=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.Popup,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="Popup(B)="+this.Popup+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Campaign"},e}();__reflect(CMDCampaign.prototype,"CMDCampaign",["ICommand"]);var CMDCampaignWinner=function(){function e(){this.AwardTime=0,this.PlayerID=0,this.MaskedName="",this.Prize=0}return e.prototype.fromBytes=function(e){this.AwardTime=BitwiseUtil.readInt53(e),this.PlayerID=BitwiseUtil.readUint(e,4),this.MaskedName=BitwiseUtil.readString(e),this.Prize=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.AwardTime),BitwiseUtil.writeUint(e,this.PlayerID,4),BitwiseUtil.writeString(e,this.MaskedName),BitwiseUtil.writeUint(e,this.Prize,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="AwardTime(Q)="+this.AwardTime+" ",e+="PlayerID(D)="+this.PlayerID+" ",e+="MaskedName(S)="+this.MaskedName+" ",e+="Prize(B)="+this.Prize+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"CampaignWinner"},e}();__reflect(CMDCampaignWinner.prototype,"CMDCampaignWinner",["ICommand"]);var CMDCsAck=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 35002},e.prototype.getCmdName=function(){return"CsAck"},e}();__reflect(CMDCsAck.prototype,"CMDCsAck",["ICommand"]);var CMDCsRequestServer=function(){function e(){this.ClientKey=0,this.ID=0,this.Token=""}return e.prototype.fromBytes=function(e){this.ClientKey=BitwiseUtil.readUint(e,4),this.ID=BitwiseUtil.readUint(e,4),this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.ClientKey,4),BitwiseUtil.writeUint(e,this.ID,4),BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="ClientKey(D)="+this.ClientKey+" ",e+="ID(D)="+this.ID+" ",e+="Token[33](C)="+this.Token+" "},e.prototype.getCmdID=function(){return 35001},e.prototype.getCmdName=function(){return"CsRequestServer"},e}();__reflect(CMDCsRequestServer.prototype,"CMDCsRequestServer",["ICommand"]);var CMDCsSimplayRequestSlotServer=function(){function e(){this.PlayerLoginName="",this.GameCode="",this.Token=""}return e.prototype.fromBytes=function(e){this.PlayerLoginName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.PlayerLoginName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerLoginName(S)="+this.PlayerLoginName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="Token(S)="+this.Token+" "},e.prototype.getCmdID=function(){return 35007},e.prototype.getCmdName=function(){return"CsSimplayRequestSlotServer"},e}();__reflect(CMDCsSimplayRequestSlotServer.prototype,"CMDCsSimplayRequestSlotServer",["ICommand"]);var CMDField=function(){function e(){this.Index=0,this.Value=0}return e.prototype.fromBytes=function(e){this.Index=BitwiseUtil.readUint(e,2),this.Value=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Index,2),BitwiseUtil.writeUint(e,this.Value,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Index(W)="+this.Index+" ",e+="Value(D)="+this.Value+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Field"},e}();__reflect(CMDField.prototype,"CMDField",["ICommand"]);var CMDFsoEventDetail=function(){function e(){this.EventId=0,this.EventName="",this.EventNote="",this.ExpiryDate="",this.SpinOfferCount=0,this.SpinPlayed=0,this.CoinValue=0,this.LineBet=0,this.Line=0,this.Active=0,this.IsRedeemed=0,this.GameList=new Array}return e.prototype.fromBytes=function(e){this.EventId=BitwiseUtil.readUint(e,4),this.EventName=BitwiseUtil.readString(e),this.EventNote=BitwiseUtil.readString(e),this.ExpiryDate=BitwiseUtil.readString(e),this.SpinOfferCount=BitwiseUtil.readUint(e,2),this.SpinPlayed=BitwiseUtil.readUint(e,2),this.CoinValue=BitwiseUtil.readInt53(e),this.LineBet=BitwiseUtil.readUint(e,4),this.Line=BitwiseUtil.readUint(e,4),this.Active=BitwiseUtil.readUint(e,1),this.IsRedeemed=BitwiseUtil.readUint(e,1);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=BitwiseUtil.readString(e);this.GameList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.EventId,4),BitwiseUtil.writeString(e,this.EventName),BitwiseUtil.writeString(e,this.EventNote),BitwiseUtil.writeString(e,this.ExpiryDate),BitwiseUtil.writeUint(e,this.SpinOfferCount,2),BitwiseUtil.writeUint(e,this.SpinPlayed,2),BitwiseUtil.writeInt53(e,this.CoinValue),BitwiseUtil.writeUint(e,this.LineBet,4),BitwiseUtil.writeUint(e,this.Line,4),BitwiseUtil.writeUint(e,this.Active,1),BitwiseUtil.writeUint(e,this.IsRedeemed,1),BitwiseUtil.writeUint(e,this.GameList.length,2);for(var t in this.GameList)BitwiseUtil.writeString(e,this.GameList[t]);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="EventId(D)="+this.EventId+" ",e+="EventName(S)="+this.EventName+" ",e+="EventNote(S)="+this.EventNote+" ",e+="ExpiryDate(S)="+this.ExpiryDate+" ",e+="SpinOfferCount(W)="+this.SpinOfferCount+" ",e+="SpinPlayed(W)="+this.SpinPlayed+" ",e+="CoinValue(Q)="+this.CoinValue+" ",e+="LineBet(D)="+this.LineBet+" ",e+="Line(D)="+this.Line+" ",e+="Active(B)="+this.Active+" ",e+="IsRedeemed(B)="+this.IsRedeemed+" ",e+="GameList_size(W)="+this.GameList.length+" ",e+="GameList(S)=[";for(var t in this.GameList)t>0&&(e+=", "),e+=this.GameList[t];return e+="] "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"FsoEventDetail"},e}();__reflect(CMDFsoEventDetail.prototype,"CMDFsoEventDetail",["ICommand"]);var CMDFsoEventList=function(){function e(){this.EventId=0,this.EventName="",this.EventNote="",this.ExpiryDate="",this.SpinOfferCount=0,this.SpinPlayed=0,this.DenominationValue=0,this.TotalOfferValue=0,this.EnabledRedeem=0,this.GameCount=0,this.GameList=""}return e.prototype.fromBytes=function(e){this.EventId=BitwiseUtil.readUint(e,4),this.EventName=BitwiseUtil.readString(e),this.EventNote=BitwiseUtil.readString(e),this.ExpiryDate=BitwiseUtil.readString(e),this.SpinOfferCount=BitwiseUtil.readUint(e,2),this.SpinPlayed=BitwiseUtil.readUint(e,2),this.DenominationValue=BitwiseUtil.readUint(e,4),this.TotalOfferValue=BitwiseUtil.readUint(e,4),this.EnabledRedeem=BitwiseUtil.readUint(e,1),this.GameCount=BitwiseUtil.readUint(e,2),this.GameList=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.EventId,4),BitwiseUtil.writeString(e,this.EventName),BitwiseUtil.writeString(e,this.EventNote),BitwiseUtil.writeString(e,this.ExpiryDate),BitwiseUtil.writeUint(e,this.SpinOfferCount,2),BitwiseUtil.writeUint(e,this.SpinPlayed,2),BitwiseUtil.writeUint(e,this.DenominationValue,4),BitwiseUtil.writeUint(e,this.TotalOfferValue,4),BitwiseUtil.writeUint(e,this.EnabledRedeem,1),BitwiseUtil.writeUint(e,this.GameCount,2),BitwiseUtil.writeString(e,this.GameList),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="EventId(D)="+this.EventId+" ",e+="EventName(S)="+this.EventName+" ",e+="EventNote(S)="+this.EventNote+" ",e+="ExpiryDate(S)="+this.ExpiryDate+" ",e+="SpinOfferCount(W)="+this.SpinOfferCount+" ",e+="SpinPlayed(W)="+this.SpinPlayed+" ",e+="DenominationValue(D)="+this.DenominationValue+" ",e+="TotalOfferValue(D)="+this.TotalOfferValue+" ",e+="EnabledRedeem(B)="+this.EnabledRedeem+" ",e+="GameCount(W)="+this.GameCount+" ",e+="GameList(S)="+this.GameList+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"FsoEventList"},e}();__reflect(CMDFsoEventList.prototype,"CMDFsoEventList",["ICommand"]);var CMDGameRankingInfo=function(){function e(){this.Rank=0,this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTimeInUTCSecond=0,this.SingleBetPayoutAmount=0,this.BetAmount=0}return e.prototype.fromBytes=function(e){this.Rank=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTimeInUTCSecond=BitwiseUtil.readInt53(e),this.SingleBetPayoutAmount=BitwiseUtil.readInt53(e),this.BetAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Rank,4),BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTimeInUTCSecond),BitwiseUtil.writeInt53(e,this.SingleBetPayoutAmount),BitwiseUtil.writeInt53(e,this.BetAmount),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Rank(D)="+this.Rank+" ",e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTimeInUTCSecond(Q)="+this.GameTimeInUTCSecond+" ",e+="SingleBetPayoutAmount(Q)="+this.SingleBetPayoutAmount+" ",e+="BetAmount(Q)="+this.BetAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"GameRankingInfo"},e}();__reflect(CMDGameRankingInfo.prototype,"CMDGameRankingInfo",["ICommand"]);var CMDJackpot=function(){function e(){this.MajorJP=0,this.MinorJP=0,this.MiniJP=0}return e.prototype.fromBytes=function(e){this.MajorJP=BitwiseUtil.readInt53(e),this.MinorJP=BitwiseUtil.readInt53(e),this.MiniJP=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.MajorJP),BitwiseUtil.writeInt53(e,this.MinorJP),BitwiseUtil.writeInt53(e,this.MiniJP),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="MajorJP(Q)="+this.MajorJP+" ",e+="MinorJP(Q)="+this.MinorJP+" ",e+="MiniJP(Q)="+this.MiniJP+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Jackpot"},e}();__reflect(CMDJackpot.prototype,"CMDJackpot",["ICommand"]);var CMDJackpotDetail=function(){function e(e){void 0===e&&(e=null),this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTime=0,this.JackpotType=0,this.JackpotAmount=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTime=BitwiseUtil.readInt53(e),this.JackpotType=BitwiseUtil.readUint(e,2),this.JackpotAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTime),BitwiseUtil.writeUint(e,this.JackpotType,2),BitwiseUtil.writeInt53(e,this.JackpotAmount),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTime(Q)="+this.GameTime+" ",e+="JackpotType(W)="+this.JackpotType+" ",e+="JackpotAmount(Q)="+this.JackpotAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"JackpotDetail"},e}();__reflect(CMDJackpotDetail.prototype,"CMDJackpotDetail",["ICommand"]);var CMDJackpotRankingInfo=function(){function e(){this.Rank=0,this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTime=0,this.JackpotType=0,this.BetAmount=0,this.JackpotAmount=0}return e.prototype.fromBytes=function(e){this.Rank=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTime=BitwiseUtil.readInt53(e),this.JackpotType=BitwiseUtil.readUint(e,2),this.BetAmount=BitwiseUtil.readInt53(e),this.JackpotAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Rank,4),BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTime),BitwiseUtil.writeUint(e,this.JackpotType,2),BitwiseUtil.writeInt53(e,this.BetAmount),BitwiseUtil.writeInt53(e,this.JackpotAmount),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Rank(D)="+this.Rank+" ",e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTime(Q)="+this.GameTime+" ",e+="JackpotType(W)="+this.JackpotType+" ",e+="BetAmount(Q)="+this.BetAmount+" ",e+="JackpotAmount(Q)="+this.JackpotAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"JackpotRankingInfo"},e}();__reflect(CMDJackpotRankingInfo.prototype,"CMDJackpotRankingInfo",["ICommand"]);var CMDPrize=function(){function e(){this.Prize=0,this.Type=0,this.Value=0,this.PrizeCount=0,this.PrizeValueInCurrency=0}return e.prototype.fromBytes=function(e){this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readInt53(e),this.PrizeCount=BitwiseUtil.readUint(e,4),this.PrizeValueInCurrency=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeInt53(e,this.Value),BitwiseUtil.writeUint(e,this.PrizeCount,4),BitwiseUtil.writeInt53(e,this.PrizeValueInCurrency),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(Q)="+this.Value+" ",e+="PrizeCount(D)="+this.PrizeCount+" ",e+="PrizeValueInCurrency(Q)="+this.PrizeValueInCurrency+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Prize"},e}();__reflect(CMDPrize.prototype,"CMDPrize",["ICommand"]);var CMDPsCampaignDetail=function(){function e(){this.CampaignID=0,this.PlayerID=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" "},e.prototype.getCmdID=function(){return 55082},e.prototype.getCmdName=function(){return"PsCampaignDetail"},e}();__reflect(CMDPsCampaignDetail.prototype,"CMDPsCampaignDetail",["ICommand"]);var CMDPsCampaignWinner=function(){function e(){this.CampaignID=0,this.PlayerID=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" "},e.prototype.getCmdID=function(){return 55083},e.prototype.getCmdName=function(){return"PsCampaignWinner"},e}();__reflect(CMDPsCampaignWinner.prototype,"CMDPsCampaignWinner",["ICommand"]);var CMDPsEgameDebugJackpot=function(){function e(){this.JackpotType=0}return e.prototype.fromBytes=function(e){this.JackpotType=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.JackpotType,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="JackpotType(B)="+this.JackpotType+" "},e.prototype.getCmdID=function(){return 55027},e.prototype.getCmdName=function(){return"PsEgameDebugJackpot"},e}();__reflect(CMDPsEgameDebugJackpot.prototype,"CMDPsEgameDebugJackpot",["ICommand"]);var CMDPsEgameLogin=function(){function e(e){void 0===e&&(e=null),this.Token="",this.BetSource=0,this.GameCode="",this.AdditionalRequest="",this.Referer="",this.Socket=e}return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e),this.BetSource=BitwiseUtil.readUint(e,4),this.GameCode=BitwiseUtil.readString(e),this.AdditionalRequest=BitwiseUtil.readString(e),this.Referer=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeUint(e,this.BetSource,4),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.AdditionalRequest),BitwiseUtil.writeString(e,this.Referer),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token[33](C)="+this.Token+" ",e+="BetSource(D)="+this.BetSource+" ",e+="GameCode(S)="+this.GameCode+" ",e+="AdditionalRequest(S)="+this.AdditionalRequest+" ",e+="Referer(S)="+this.Referer+" "},e.prototype.getCmdID=function(){return 55018},e.prototype.getCmdName=function(){return"PsEgameLogin"},e}();__reflect(CMDPsEgameLogin.prototype,"CMDPsEgameLogin",["ICommand"]);var CMDPsFsoEventDetail=function(){function e(){this.FSOEventID=0}return e.prototype.fromBytes=function(e){this.FSOEventID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.FSOEventID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="FSOEventID(D)="+this.FSOEventID+" "},e.prototype.getCmdID=function(){return 55075},e.prototype.getCmdName=function(){return"PsFsoEventDetail"},e}();__reflect(CMDPsFsoEventDetail.prototype,"CMDPsFsoEventDetail",["ICommand"]);var CMDPsFsoEventList=function(){function e(){this.Tag=0}return e.prototype.fromBytes=function(e){this.Tag=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Tag,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Tag(D)="+this.Tag+" "},e.prototype.getCmdID=function(){return 55076},e.prototype.getCmdName=function(){return"PsFsoEventList"},e}();__reflect(CMDPsFsoEventList.prototype,"CMDPsFsoEventList",["ICommand"]);var CMDPsFsoNotificationReceived=function(){function e(){this.PlayerId=0}return e.prototype.fromBytes=function(e){this.PlayerId=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerId),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerId(Q)="+this.PlayerId+" "},e.prototype.getCmdID=function(){return 55074},e.prototype.getCmdName=function(){return"PsFsoNotificationReceived"},e}();__reflect(CMDPsFsoNotificationReceived.prototype,"CMDPsFsoNotificationReceived",["ICommand"]);var CMDPsFsoRedeem=function(){function e(){this.FSOEventId=0}return e.prototype.fromBytes=function(e){this.FSOEventId=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.FSOEventId,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="FSOEventId(D)="+this.FSOEventId+" "},e.prototype.getCmdID=function(){return 55073},e.prototype.getCmdName=function(){return"PsFsoRedeem"},e}();__reflect(CMDPsFsoRedeem.prototype,"CMDPsFsoRedeem",["ICommand"]);var CMDPsLaunchComplete=function(){function e(){this.Token=""}return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token(S)="+this.Token+" "},e.prototype.getCmdID=function(){return 55078},e.prototype.getCmdName=function(){return"PsLaunchComplete"},e}();__reflect(CMDPsLaunchComplete.prototype,"CMDPsLaunchComplete",["ICommand"]);var CMDPsLogin=function(){function e(){this.Token="",this.BetSource=16,this.GameCode=""
}return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e),this.BetSource=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeUint(e,this.BetSource,4),BitwiseUtil.writeString(e,this.GameCode),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token[33](C)="+this.Token+" ",e+="BetSource(D)="+this.BetSource+" "},e.prototype.getCmdID=function(){return 55018},e.prototype.getCmdName=function(){return"PsLogin"},e}();__reflect(CMDPsLogin.prototype,"CMDPsLogin",["ICommand"]);var CMDPsRankingList=function(){function e(e){void 0===e&&(e=null),this.RankingType=0,this.GameCategory=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.RankingType=BitwiseUtil.readUint(e,4),this.GameCategory=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.RankingType,4),BitwiseUtil.writeUint(e,this.GameCategory,4),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Type(D)="+this.RankingType+" ",e+="GameCategory(D)="+this.GameCategory+" "},e.prototype.getCmdID=function(){return 55077},e.prototype.getCmdName=function(){return"PsRankingList"},e}();__reflect(CMDPsRankingList.prototype,"CMDPsRankingList",["ICommand"]);var CMDPsRequestEgameToken=function(){function e(){this.GameCode=""}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" "},e.prototype.getCmdID=function(){return 55028},e.prototype.getCmdName=function(){return"PsRequestEgameToken"},e}();__reflect(CMDPsRequestEgameToken.prototype,"CMDPsRequestEgameToken",["ICommand"]);var CMDPsRequestLoginToken=function(){function e(){this.GameCode="",this.Language="",this.GenFor=0}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e),this.Language=BitwiseUtil.readString(e),this.GenFor=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.Language),BitwiseUtil.writeUint(e,this.GenFor,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" ",e+="Language(S)="+this.Language+" ",e+="GenFor(B)="+this.GenFor+" "},e.prototype.getCmdID=function(){return 55028},e.prototype.getCmdName=function(){return"PsRequestLoginToken"},e}();__reflect(CMDPsRequestLoginToken.prototype,"CMDPsRequestLoginToken",["ICommand"]);var CMDPsSlotAction=function(){function e(){this.BetSource=0,this.Action=0}return e.prototype.fromBytes=function(e){this.BetSource=BitwiseUtil.readUint(e,4),this.Action=BitwiseUtil.readUint(e,4),this.UnknownData=new egret.ByteArray,this.UnknownData.endian=egret.Endian.LITTLE_ENDIAN,this.UnknownData.readBytes(e,e.position,e.bytesAvailable)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.BetSource),BitwiseUtil.writeUint(e,this.Action),this.UnknownData.position=0;var t=this.UnknownData.bytesAvailable;return e.writeByte(t),e.writeBytes(this.UnknownData,0,this.UnknownData.bytesAvailable),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetSource: "+this.BetSource+", ",e+="Action: "+this.Action+", ",this.UnknownData.position=0,e+=this.UnknownData.bytesAvailable>0?"UnknownData: "+BitwiseUtil.readString(this.UnknownData):"UnknownData: null",this.UnknownData.position=0,e},e.prototype.getCmdID=function(){return 55019},e.prototype.getCmdName=function(){return"PsSlotAction"},e}();__reflect(CMDPsSlotAction.prototype,"CMDPsSlotAction",["ICommand"]);var CMDPsSlotActionDone=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 55020},e.prototype.getCmdName=function(){return"PsSlotActionDone"},e}();__reflect(CMDPsSlotActionDone.prototype,"CMDPsSlotActionDone",["ICommand"]);var CMDPsToggleCampaignPopup=function(){function e(){this.CampaignID=0,this.PlayerID=0,this.ENABLE=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4),this.ENABLE=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),BitwiseUtil.writeUint(e,this.ENABLE,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" ",e+="ENABLE(B)="+this.ENABLE+" "},e.prototype.getCmdID=function(){return 55081},e.prototype.getCmdName=function(){return"PsToggleCampaignPopup"},e}();__reflect(CMDPsToggleCampaignPopup.prototype,"CMDPsToggleCampaignPopup",["ICommand"]);var CMDScAck=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 30024},e.prototype.getCmdName=function(){return"ScAck"},e}();__reflect(CMDScAck.prototype,"CMDScAck",["ICommand"]);var CMDScInitSync=function(){function e(){this.Name=""}return e.prototype.fromBytes=function(e){this.Name=BitwiseUtil.readString(e),this.Data=new CMDScSyncData,this.Data.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Name);var t=this.Data.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Name(S)="+this.Name+" ",e+="Data(CMDScSyncData)="+this.Data+" "},e.prototype.getCmdID=function(){return 30007},e.prototype.getCmdName=function(){return"ScInitSync"},e}();__reflect(CMDScInitSync.prototype,"CMDScInitSync",["ICommand"]);var CMDScRemoveSync=function(){function e(){this.DBID=0}return e.prototype.fromBytes=function(e){this.DBID=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.DBID),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="DBID(Q)="+this.DBID+" "},e.prototype.getCmdID=function(){return 30009},e.prototype.getCmdName=function(){return"ScRemoveSync"},e}();__reflect(CMDScRemoveSync.prototype,"CMDScRemoveSync",["ICommand"]);var CMDScRequestFail=function(){function e(){this.Error=0}return e.prototype.fromBytes=function(e){this.Error=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Error,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Error(B)="+this.Error+" "},e.prototype.getCmdID=function(){return 30001},e.prototype.getCmdName=function(){return"ScRequestFail"},e}();__reflect(CMDScRequestFail.prototype,"CMDScRequestFail",["ICommand"]);var CMDScServer=function(){function e(){this.IP="",this.Port=0,this.UTCOffset=0,this.System=0}return e.prototype.fromBytes=function(e){this.IP=BitwiseUtil.readString(e),this.Port=BitwiseUtil.readUint(e,4),this.UTCOffset=BitwiseUtil.readInt53(e),this.System=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.IP),BitwiseUtil.writeUint(e,this.Port,4),BitwiseUtil.writeInt53(e,this.UTCOffset),BitwiseUtil.writeInt53(e,this.System),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="IP(S)="+this.IP+" ",e+="Port(D)="+this.Port+" ",e+="UTCOffset(Q)="+this.UTCOffset+" ",e+="System(Q)="+this.System+" "},e.prototype.getCmdID=function(){return 30002},e.prototype.getCmdName=function(){return"ScServer"},e}();__reflect(CMDScServer.prototype,"CMDScServer",["ICommand"]);var CMDScSyncData=function(){function e(){this.PlayerID=0,this.Field=new Array}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDField;n.fromBytes(e),this.Field.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeUint(e,this.Field.length,2);for(var t in this.Field){var n=this.Field[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="PlayerID(Q)="+this.PlayerID+" ",e+="Field_size(W)="+this.Field.length+" ",e+="Field(CMDField)=[";for(var t in this.Field)t>0&&(e+=", "),e+=this.Field[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 30008},e.prototype.getCmdName=function(){return"ScSyncData"},e}();__reflect(CMDScSyncData.prototype,"CMDScSyncData",["ICommand"]);var CMDShGameProcessingFail=function(){function e(){this.GameID=0,this.errorCode=0}return e.prototype.fromBytes=function(e){this.GameID=BitwiseUtil.readInt53(e),this.errorCode=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.GameID),BitwiseUtil.writeUint(e,this.errorCode,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameID(Q)="+this.GameID+" ",e+="errorCode(B)="+this.errorCode+" "},e.prototype.getCmdID=function(){return 40002},e.prototype.getCmdName=function(){return"ShGameProcessingFail"},e}();__reflect(CMDShGameProcessingFail.prototype,"CMDShGameProcessingFail",["ICommand"]);var CMDShGameServerKick=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 50026},e.prototype.getCmdName=function(){return"ShGameServerKick"},e}();__reflect(CMDShGameServerKick.prototype,"CMDShGameServerKick");var CMDSimplayGameList=function(){function e(){this.GameCode="",this.UnderMaintenance=0}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e),this.UnderMaintenance=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeUint(e,this.UnderMaintenance,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" ",e+="UnderMaintenance(B)="+this.UnderMaintenance+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"SimplayGameList"},e}();__reflect(CMDSimplayGameList.prototype,"CMDSimplayGameList",["ICommand"]);var CMDSpEgameError=function(){function e(){this.Error=0}return e.prototype.fromBytes=function(e){this.Error=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Error,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Error(B)="+this.Error+" "},e.prototype.getCmdID=function(){return 50037},e.prototype.getCmdName=function(){return"SpEgameError"},e}();__reflect(CMDSpEgameError.prototype,"CMDSpEgameError",["ICommand"]);var CMDSpEgameToken=function(){function e(){this.Result=0,this.Token="",this.URL=""}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,4),this.Token=BitwiseUtil.readString(e),this.URL=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,4),BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeString(e,this.URL),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(D)="+this.Result+" ",e+="Token(S)="+this.Token+" ",e+="URL(S)="+this.URL+" "},e.prototype.getCmdID=function(){return 50036},e.prototype.getCmdName=function(){return"SpEgameToken"},e}();__reflect(CMDSpEgameToken.prototype,"CMDSpEgameToken",["ICommand"]);var CMDSpInitEgame=function(){function e(){this.PlayerID=0,this.BetID=0,this.UnknownData="",this.NoChanceJackpot=0,this.LobbyCode="",this.ReconnectKey="",this.NotificationCount=0,this.IsCommonWallet=0,this.System=0,this.CurrencyName="",this.UnsettleEGameList=""}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e),this.BetID=BitwiseUtil.readInt53(e),this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e),this.UnknownData=BitwiseUtil.readString(e),this.NoChanceJackpot=BitwiseUtil.readUint(e,1),this.LobbyCode=BitwiseUtil.readString(e),this.ReconnectKey=BitwiseUtil.readString(e),this.NotificationCount=BitwiseUtil.readUint(e,2),this.IsCommonWallet=BitwiseUtil.readUint(e,1),this.System=BitwiseUtil.readInt53(e),this.CurrencyName=BitwiseUtil.readString(e),this.UnsettleEGameList=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeInt53(e,this.BetID);var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),BitwiseUtil.writeString(e,this.UnknownData),BitwiseUtil.writeUint(e,this.NoChanceJackpot,1),BitwiseUtil.writeString(e,this.LobbyCode),BitwiseUtil.writeString(e,this.ReconnectKey),BitwiseUtil.writeUint(e,this.NotificationCount,2),BitwiseUtil.writeUint(e,this.IsCommonWallet,1),BitwiseUtil.writeInt53(e,this.System),BitwiseUtil.writeString(e,this.CurrencyName),BitwiseUtil.writeString(e,this.UnsettleEGameList),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerID(Q)="+this.PlayerID+" ",e+="BetID(Q)="+this.BetID+" ",e+="Jackpot(CMDJackpot)="+this.Jackpot+" ",e+="UnknownData(S)="+this.UnknownData+" ",e+="NoChanceJackpot(B)="+this.NoChanceJackpot+" ",e+="LobbyCode(S)="+this.LobbyCode+" ",e+="ReconnectKey(S)="+this.ReconnectKey+" ",e+="NotificationCount(W)="+this.NotificationCount+" ",e+="IsCommonWallet(B)="+this.IsCommonWallet+" ",e+="System(Q)="+this.System+" ",e+="CurrencyName(S)="+this.CurrencyName+" ",e+="UnsettleEGameList(S)="+this.UnsettleEGameList+" "},e.prototype.getProperties=function(){var e="";return e+="PlayerID="+this.PlayerID+"&",e+="BetID="+this.BetID},e.prototype.getCmdID=function(){return 50027},e.prototype.getCmdName=function(){return"SpInitEgame"},e}();__reflect(CMDSpInitEgame.prototype,"CMDSpInitEgame",["ICommand"]);var CMDSpLoginFail=function(){function e(){this.Reason=0,this.CountryCode="",this.IP=""}return e.prototype.fromBytes=function(e){this.Reason=BitwiseUtil.readUint(e,1),this.CountryCode=BitwiseUtil.readString(e),this.IP=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Reason,1),BitwiseUtil.writeString(e,this.CountryCode),BitwiseUtil.writeString(e,this.IP),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Reason(B)="+this.Reason+" ",e+="CountryCode(S)="+this.CountryCode+" ",e+="IP(S)="+this.IP+" "},e.prototype.getCmdID=function(){return 50002},e.prototype.getCmdName=function(){return"SpLoginFail"},e}();__reflect(CMDSpLoginFail.prototype,"CMDSpLoginFail",["ICommand"]);var CMDSpPlayerBeDisabled=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 50067},e.prototype.getCmdName=function(){return"SpPlayerBeDisabled"},e}();__reflect(CMDSpPlayerBeDisabled.prototype,"CMDSpPlayerBeDisabled",["ICommand"]);var CMDSpSimplayCampaignAward=function(){function e(){this.AwardID="",this.AwardTimeInUTC=0,this.Prize=0,this.Type=0,this.Value=0}return e.prototype.fromBytes=function(e){this.AwardID=BitwiseUtil.readString(e),this.AwardTimeInUTC=BitwiseUtil.readInt53(e),this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.AwardID),BitwiseUtil.writeInt53(e,this.AwardTimeInUTC),BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeUint(e,this.Value,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="AwardID(S)="+this.AwardID+" ",e+="AwardTimeInUTC(Q)="+this.AwardTimeInUTC+" ",e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(D)="+this.Value+" "},e.prototype.getCmdID=function(){return 52113},e.prototype.getCmdName=function(){return"SpSimplayCampaignAward"},e}();__reflect(CMDSpSimplayCampaignAward.prototype,"CMDSpSimplayCampaignAward",["ICommand"]);var CMDSpSimplayCampaignDetail=function(){function e(){this.CampaignID=0,this.PrizeList=new Array,this.EGameList=new Array}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDPrize;n.fromBytes(e),this.PrizeList.push(n)}for(var i=BitwiseUtil.readUint(e,2);i-->0;){var o=BitwiseUtil.readString(e);this.EGameList.push(o)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PrizeList.length,2);for(var t in this.PrizeList){var n=this.PrizeList[t].toBytes();BitwiseUtil.writeBytes(n,e)}BitwiseUtil.writeUint(e,this.EGameList.length,2);for(var i in this.EGameList)BitwiseUtil.writeString(e,this.EGameList[i]);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignID(D)="+this.CampaignID+" ",e+="PrizeList_size(W)="+this.PrizeList.length+" ",e+="PrizeList(CMDPrize)=[";for(var t in this.PrizeList)t>0&&(e+=", "),e+=this.PrizeList[t].toString();e+="] ",e+="EGameList_size(W)="+this.EGameList.length+" ",e+="EGameList(S)=[";for(var n in this.EGameList)n>0&&(e+=", "),e+=this.EGameList[n];return e+="] "},e.prototype.getCmdID=function(){return 52116},e.prototype.getCmdName=function(){return"SpSimplayCampaignDetail"},e}();__reflect(CMDSpSimplayCampaignDetail.prototype,"CMDSpSimplayCampaignDetail",["ICommand"]);var CMDSpSimplayCampaignList=function(){function e(){this.CampaignList=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDCampaign;n.fromBytes(e),this.CampaignList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignList.length,2);for(var t in this.CampaignList){var n=this.CampaignList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignList_size(W)="+this.CampaignList.length+" ",e+="CampaignList(CMDCampaign)=[";for(var t in this.CampaignList)t>0&&(e+=", "),e+=this.CampaignList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52115},e.prototype.getCmdName=function(){return"SpSimplayCampaignList"},e}();__reflect(CMDSpSimplayCampaignList.prototype,"CMDSpSimplayCampaignList",["ICommand"]);var CMDSpSimplayCampaignNotice=function(){function e(){this.PlayerName="",this.Prize=0,this.Type=0,this.Value=0,this.PrizeID=0}return e.prototype.fromBytes=function(e){this.PlayerName=BitwiseUtil.readString(e),this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readInt53(e),this.PrizeID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeInt53(e,this.Value),BitwiseUtil.writeUint(e,this.PrizeID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerName(S)="+this.PlayerName+" ",e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(Q)="+this.Value+" ",e+="PrizeID(D)="+this.PrizeID+" "},e.prototype.getCmdID=function(){return 52114},e.prototype.getCmdName=function(){return"SpSimplayCampaignNotice"},e}();__reflect(CMDSpSimplayCampaignNotice.prototype,"CMDSpSimplayCampaignNotice",["ICommand"]);var CMDSpSimplayCampaignWinnerList=function(){function e(){this.CampaignID=0,this.WinnerList=new Array}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDCampaignWinner;n.fromBytes(e),this.WinnerList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.WinnerList.length,2);for(var t in this.WinnerList){var n=this.WinnerList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignID(D)="+this.CampaignID+" ",e+="WinnerList_size(W)="+this.WinnerList.length+" ",e+="WinnerList(CMDCampaignWinner)=[";for(var t in this.WinnerList)t>0&&(e+=", "),e+=this.WinnerList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52117},e.prototype.getCmdName=function(){return"SpSimplayCampaignWinnerList"},e}();__reflect(CMDSpSimplayCampaignWinnerList.prototype,"CMDSpSimplayCampaignWinnerList",["ICommand"]);var CMDSpSimplayEgameFeature=function(){function e(e){void 0===e&&(e=null),this.SlotRankingEnable=0,this.FishRankingEnable=0,this.JackpotRankingEnable=0,this.RecentJackpotEnable=0,this.SpAppEnable=0,this.TableRankingEnable=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.SlotRankingEnable=BitwiseUtil.readUint(e,1),this.FishRankingEnable=BitwiseUtil.readUint(e,1),this.JackpotRankingEnable=BitwiseUtil.readUint(e,1),this.RecentJackpotEnable=BitwiseUtil.readUint(e,1),this.SpAppEnable=BitwiseUtil.readUint(e,1),this.TableRankingEnable=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.SlotRankingEnable,1),BitwiseUtil.writeUint(e,this.FishRankingEnable,1),BitwiseUtil.writeUint(e,this.JackpotRankingEnable,1),BitwiseUtil.writeUint(e,this.RecentJackpotEnable,1),BitwiseUtil.writeUint(e,this.SpAppEnable,1),BitwiseUtil.writeUint(e,this.TableRankingEnable,1),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="SlotRankingEnable(B)="+this.SlotRankingEnable+" ",e+="FishRankingEnable(B)="+this.FishRankingEnable+" ",e+="JackpotRankingEnable(B)="+this.JackpotRankingEnable+" ",e+="RecentJackpotEnable(B)="+this.RecentJackpotEnable+" ",e+="SpAppEnable(B)="+this.SpAppEnable+" ",e+="TableRankingEnable(B)="+this.TableRankingEnable+" "},e.prototype.getCmdID=function(){return 52110},e.prototype.getCmdName=function(){return"SpSimplayEgameFeature"},e}();__reflect(CMDSpSimplayEgameFeature.prototype,"CMDSpSimplayEgameFeature",["ICommand"]);var CMDSpSimplayFsoEnded=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 52107},e.prototype.getCmdName=function(){return"SpSimplayFsoEnded"},e}();__reflect(CMDSpSimplayFsoEnded.prototype,"CMDSpSimplayFsoEnded",["ICommand"]);var CMDSpSimplayFsoEventDetail=function(){function e(){this.Result=0}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.EventDetail=new CMDFsoEventDetail,this.EventDetail.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1);var t=this.EventDetail.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(B)="+this.Result+" ",e+="EventDetail(CMDFsoEventDetail)="+this.EventDetail+" "},e.prototype.getCmdID=function(){return 52108},e.prototype.getCmdName=function(){return"SpSimplayFsoEventDetail"},e}();__reflect(CMDSpSimplayFsoEventDetail.prototype,"CMDSpSimplayFsoEventDetail",["ICommand"]);var CMDSpSimplayFsoEventList=function(){function e(){this.Result=0,this.Tag=0,this.Popup=0,this.EventList=new Array}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.Tag=BitwiseUtil.readUint(e,4),this.Popup=BitwiseUtil.readUint(e,1);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=BitwiseUtil.readUint(e,4);this.EventList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1),BitwiseUtil.writeUint(e,this.Tag,4),BitwiseUtil.writeUint(e,this.Popup,1),BitwiseUtil.writeUint(e,this.EventList.length,2);for(var t in this.EventList)BitwiseUtil.writeUint(e,this.EventList[t],4);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="Result(B)="+this.Result+" ",e+="Tag(D)="+this.Tag+" ",e+="Popup(B)="+this.Popup+" ",e+="EventList_size(W)="+this.EventList.length+" ",e+="EventList(D)=[";for(var t in this.EventList)t>0&&(e+=", "),e+=this.EventList[t];return e+="] "},e.prototype.getCmdID=function(){return 52107},e.prototype.getCmdName=function(){return"SpSimplayFsoEventList"},e}();__reflect(CMDSpSimplayFsoEventList.prototype,"CMDSpSimplayFsoEventList",["ICommand"]);var CMDSpSimplayFsoRedeem=function(){function e(){this.Result=0,this.FSODetailJSON=""}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.FSODetailJSON=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1),BitwiseUtil.writeString(e,this.FSODetailJSON),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(B)="+this.Result+" ",e+="FSODetailJSON(S)="+this.FSODetailJSON+" "},e.prototype.getCmdID=function(){return 52106},e.prototype.getCmdName=function(){return"SpSimplayFsoRedeem"},e}();__reflect(CMDSpSimplayFsoRedeem.prototype,"CMDSpSimplayFsoRedeem",["ICommand"]);var CMDSpSimplayGameList=function(){function e(){this.GameList=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDSimplayGameList;n.fromBytes(e),this.GameList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.GameList.length,2);for(var t in this.GameList){var n=this.GameList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="GameList_Size(W)="+this.GameList.length+" ",e+="GameList(CMDSimplayGameList)=[";for(var t in this.GameList)t>0&&(e+=", "),e+=this.GameList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52103},e.prototype.getCmdName=function(){return"SpSimplayGameList"},e}();__reflect(CMDSpSimplayGameList.prototype,"CMDSpSimplayGameList",["ICommand"]);var CMDSpSimplayGameRanking=function(){function e(){this.LastUpdateTimeInUTCSecond=0,this.GameCategory=0,this.RankingList=new Array}return e.prototype.fromBytes=function(e){this.LastUpdateTimeInUTCSecond=BitwiseUtil.readInt53(e),this.GameCategory=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDGameRankingInfo;n.fromBytes(e),this.RankingList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.LastUpdateTimeInUTCSecond),BitwiseUtil.writeUint(e,this.GameCategory,4),BitwiseUtil.writeUint(e,this.RankingList.length,2);for(var t in this.RankingList){var n=this.RankingList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="LastUpdateTimeInUTCSecond(Q)="+this.LastUpdateTimeInUTCSecond+" ",e+="GameCategory(D)="+this.GameCategory+" ",e+="RankingList_size(W)="+this.RankingList.length+" ",e+="RankingList(CMDGameRankingInfo)=[";for(var t in this.RankingList)t>0&&(e+=", "),e+=this.RankingList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52109},e.prototype.getCmdName=function(){return"SpSimplayGameRanking"},e}();__reflect(CMDSpSimplayGameRanking.prototype,"CMDSpSimplayGameRanking",["ICommand"]);var CMDSpSimplayJackpotRanking=function(){function e(){this.JackpotID=0,this.RankingList=new Array}return e.prototype.fromBytes=function(e){this.JackpotID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDJackpotRankingInfo;n.fromBytes(e),this.RankingList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.JackpotID,4),BitwiseUtil.writeUint(e,this.RankingList.length,2);for(var t in this.RankingList){var n=this.RankingList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="JackpotID(D)="+this.JackpotID+" ",e+="RankingList_size(W)="+this.RankingList.length+" ",e+="RankingList(CMDJackpotRankingInfo)=[";for(var t in this.RankingList)t>0&&(e+=", "),e+=this.RankingList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52111},e.prototype.getCmdName=function(){return"SpSimplayJackpotRanking"},e}();__reflect(CMDSpSimplayJackpotRanking.prototype,"CMDSpSimplayJackpotRanking",["ICommand"]);var CMDSpSimplayRecentJackpot=function(){function e(e){void 0===e&&(e=null),this.Socket=e,this.RecentJackpotList=new Array
}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDJackpotDetail;n.fromBytes(e),this.RecentJackpotList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.RecentJackpotList.length,2);for(var t in this.RecentJackpotList){var n=this.RecentJackpotList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="RecentJackpotList_size(W)="+this.RecentJackpotList.length+" ",e+="RecentJackpotList(CMDJackpotDetail)=[";for(var t in this.RecentJackpotList)t>0&&(e+=", "),e+=this.RecentJackpotList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52112},e.prototype.getCmdName=function(){return"SpSimplayRecentJackpot"},e}();__reflect(CMDSpSimplayRecentJackpot.prototype,"CMDSpSimplayRecentJackpot",["ICommand"]);var CMDSpSimplayWinJackpot=function(){function e(){this.UserName="",this.CurrencyName=""}return e.prototype.fromBytes=function(e){this.UserName=BitwiseUtil.readString(e),this.CurrencyName=BitwiseUtil.readString(e),this.JackpotData=new CMDJackpot,this.JackpotData.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.UserName),BitwiseUtil.writeString(e,this.CurrencyName);var t=this.JackpotData.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="UserName(S)="+this.UserName+" ",e+="CurrencyName(S)="+this.CurrencyName+" ",e+="JackpotData(CMDJackpot)="+this.JackpotData+" "},e.prototype.getCmdID=function(){return 50098},e.prototype.getCmdName=function(){return"SpSimplayWinJackpot"},e}();__reflect(CMDSpSimplayWinJackpot.prototype,"CMDSpSimplayWinJackpot",["ICommand"]);var CMDSpSlotAction=function(){function e(){this.BetID=0,this.Action=0,this.UnknownData=""}return e.prototype.fromBytes=function(e){this.BetID=BitwiseUtil.readInt53(e),this.Action=BitwiseUtil.readUint(e,4),this.UnknownData=BitwiseUtil.readString(e),this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.BetID),BitwiseUtil.writeUint(e,this.Action,4),BitwiseUtil.writeString(e,this.UnknownData);var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetID(Q)="+this.BetID+" ",e+="Action(D)="+this.Action+" ",e+="UnknownData(S)="+this.UnknownData+" ",e+="Jackpot(CMDJackpot)="+this.Jackpot+" "},e.prototype.getProperties=function(){var e="";return e+="BetID="+this.BetID+"&",e+="Action="+this.Action},e.prototype.getCmdID=function(){return 50028},e.prototype.getCmdName=function(){return"SpSlotAction"},e}();__reflect(CMDSpSlotAction.prototype,"CMDSpSlotAction",["ICommand"]);var CMDSpSlotJackpot=function(){function e(){}return e.prototype.fromBytes=function(e){this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN;var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Jackpot(CMDJackpot)="+this.Jackpot+" "},e.prototype.getCmdID=function(){return 50035},e.prototype.getCmdName=function(){return"SpSlotJackpot"},e}();__reflect(CMDSpSlotJackpot.prototype,"CMDSpSlotJackpot",["ICommand"]);var Command=function(){function e(){}return e.getCommand=function(e){switch(e){case 30001:return new CMDScRequestFail;case 30002:return new CMDScServer;case 30007:return new CMDScInitSync;case 30008:return new CMDScSyncData;case 30009:return new CMDScRemoveSync;case 30024:return new CMDScAck;case 35001:return new CMDCsRequestServer;case 35002:return new CMDCsAck;case 50026:return new CMDShGameServerKick;case 40002:return new CMDShGameProcessingFail;case 50002:return new CMDSpLoginFail;case 50027:return new CMDSpInitEgame;case 50028:return new CMDSpSlotAction;case 50035:return new CMDSpSlotJackpot;case 50037:return new CMDSpEgameError;case 55018:return new CMDPsEgameLogin;case 55019:return new CMDPsSlotAction;case 55020:return new CMDPsSlotActionDone;case 55027:return new CMDPsEgameDebugJackpot;case 55028:return new CMDPsRequestLoginToken;case 50036:return new CMDSpEgameToken;case 52102:return new CMDSpSimplayBetLogQuery;case 50010:return new CMDSpBetLogQuery;case 50025:return new CMDSpBetLogQueryTotal;case 50067:return new CMDSpPlayerBeDisabled;case 52103:return new CMDSpSimplayGameList;case 35007:return new CMDCsSimplayRequestSlotServer;case 50098:return new CMDSpSimplayWinJackpot;case 52106:return new CMDSpSimplayFsoRedeem;case 55073:return new CMDPsFsoRedeem;case 55075:return new CMDPsFsoEventDetail;case 52107:return new CMDSpSimplayFsoEventList;case 52108:return new CMDSpSimplayFsoEventDetail;case 55074:return new CMDPsFsoNotificationReceived;case 55076:return new CMDPsFsoEventList;case 52113:return new CMDSpSimplayCampaignAward;case 52114:return new CMDSpSimplayCampaignNotice;case 52115:return new CMDSpSimplayCampaignList;case 52116:return new CMDSpSimplayCampaignDetail;case 52117:return new CMDSpSimplayCampaignWinnerList;case 52109:return new CMDSpSimplayGameRanking;case 52110:return new CMDSpSimplayEgameFeature;case 52111:return new CMDSpSimplayJackpotRanking;case 52112:return new CMDSpSimplayRecentJackpot;case 55078:return new CMDPsLaunchComplete}return null},e}();__reflect(Command.prototype,"Command");var JSONTag=function(){function e(){}return e.version="0.0.4",e.GameCode="CGC",e.BetLineNum="CBLN",e.BetPerLine="CBPL",e.Symbol="CSB",e.WinLine="CWL",e.WinLineID="CWLI",e.WinLinePayout="CWLP",e.WinLineSoak="CWLS",e.WinLineMulti="CWLM",e.WinAmount="CWA",e.AccuAmount="CAA",e.FrRemainNum="FRF",e.FrGameTypeTrigger="FGT",e.FrPlayedNum="FSN",e.FrTriggerNum="FTF",e.FrDepth="FD",e.FrMultiplier="FM",e.FrTriggerAcc="FFC",e.WinLineScreen="SPR",e.FrRandomDetail="FRD",e.GmIsGamble="GIG",e.GmResult="GR",e.BnPickType="BT",e.JackpotType="JT",e.JackpotAmount="JA",e.screenMultiplier="CSM",e.GmGambleAct="GCS",e.BnSelectId="BS",e.ExpectedSymbol="DSB",e.ExpectedGmResult="DGR",e.ExpectedBnResult="DBR",e.ServerVersion="SV",e.Status="ST",e.DenominationType="DT",e.DenominationValue="DV",e.DenominationList="DL",e.DenominationId="CDI",e.LineBet="CLB",e.LineBetList="CLBL",e.Language="LN",e.UserName="UN",e.WaitClient="WC",e.GambleHistory="GH",e.GambleHistoryResult="GHR",e.BonusHistory="BH",e.BonusHistorySelection="BHS",e.BonusHistoryResult="BHR",e.GameType="GT",e.BetDirection="CBD",e.GameTypeTrigger="CGT",e.Feature1Result="F1R",e.Feature2Result="F2R",e.featureMultiplier="FEM",e.AwardList="FAL",e.IsWildExt="FWE",e.Feature1SelectionId="MHS",e.Feature2SelectionId="WRA",e.ExpectedF1Result="DF1R",e.ExpectedF2Result="DF2R",e.Feature1History="F1H",e.Feature1HistorySelection="F1HS",e.Feature1HistoryResult="F1HR",e.Feature2History="F2H",e.Feature2HistorySelection="F2HS",e.Feature2HistoryResult="F2HR",e.Life="PL",e.EnemyLife="EL",e.Feature1Action="F1A",e.PreAccFreeAmount="FPA",e.WinPattern="CWP",e.SymbolExt="CSE",e.FrSpinNumber="FSN",e.FrAccuAmount="FAA",e.FrMeter="FMT",e.FrSpinCount="FSC",e.FixedWildExt="FFWE",e.FrSymbolSelected="FSS",e.ExtWild="DWE",e.NextAction="NGA",e.FrCurrentMode="FCM",e.FrNextMode="FCH",e.FrCountdownNumber="FCN",e.WinLineTriggerType="WLTT",e.ReelMultiplier="CRM",e.FullReelWildArray="FRW",e.FeAccuAmount="FEA",e.F1ResultSet="F1RS",e.CharacterSelectID="CSID",e.FeChance="FEC",e.Feature1HistorySet="F1HS",e.FeTriggerNum="FETF",e.ScreenPerRound="SPR",e.ReelHold="CRH",e.ReelSync="CRS",e.ReelStartIdx="DRS",e.ReelEndIdx="DRE",e.SpecialFeatureType="SFT",e.SpecialFeatureSymbolPosition="SFSP",e.FeatureType="DFT",e.FeatureSymbolPositions="DFS",e.FeatureReelPositions="DFR",e.FreeGameMode="FGM",e.BonusTriggerFreeSpinNum="BFS",e.FreeGameUnlockMeter="FUM",e.FreeGameTriggeredLevel="FUT",e.FreeGameCurrentLevel="FCT",e.FreeGameUnlockMeterMax="FPL",e.NextSpinFSO="FSO",e.FSOSpinCount="FSOC",e.FSOSpinPlayed="FSOP",e.FSOAccumulatedWin="FSOA",e.FSOEventName="FSON",e.FSODenominationValue="FSODV",e.FSOLineNimber="FSOLN",e.FSOLineBet="FSOLB",e.FSOID="FSOID",e}();__reflect(JSONTag.prototype,"JSONTag");var NewSlotData=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.IsFreeGameCompleted=function(){return 0==this.nFreeGame&&this.nFreeSpinCount==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0&&0==this.waitClient?!0:!1},t.prototype.IsLastFreeGameFinished=function(){return 0==this.nFreeGame&&this.nFreeSpinCount==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0?!0:!1},t}(SlotData);__reflect(NewSlotData.prototype,"NewSlotData");var ResultSet=function(){function e(){}return e}();__reflect(ResultSet.prototype,"ResultSet");var ScreenData=function(){function e(){this.slotSymbols=[],this.slotSymExts=[]}return e}();__reflect(ScreenData.prototype,"ScreenData");var RESGroupKey=function(){function e(){}return e.preload="preload",e.UIPanelCommon="UIPanelCommon",e.UIPanel="UIPanel",e.UIPanelMobile="UIPanelMobile",e.SlotSceneCommon="SlotSceneCommon",e.SlotSceneCommonMobile="SlotSceneCommonMobile",e.BaseGame="BaseGame",e.BaseGameMobile="BaseGameMobile",e.FreeGame="FreeGame",e.FreeGameMobile="FreeGameMobile",e.FeatureGame="FeatureGame",e.Paytable="Paytable",e.PaytableMobile="PaytableMobile",e.Jackpot="Jackpot",e.BigWin="BigWin",e.MiniLobby="MiniLobby",e.FeatureGameMobile="FeatureGameMobile",e.GameRules="GameRules",e.languageCn="languageCn",e.languageEng="languageEng",e.languageZh="languageZh",e.languageKr="languageKr",e.languageJp="languageJp",e.languageTh="languageTh",e.languageId="languageId",e.languageVi="languageVi",e.languageCommonCn="languageCommonCn",e.languageCommonEng="languageCommonEng",e.languageCommonZh="languageCommonZh",e.languageCommonKr="languageCommonKr",e.languageCommonJp="languageCommonJp",e.languageCommonTh="languageCommonTh",e.languageCommonId="languageCommonId",e.languageCommonVi="languageCommonVi",e.loadingCn="loadingCn",e.loadingEng="loadingEng",e.loadingZh="loadingZh",e.loadingKr="loadingKr",e.loadingJp="loadingJp",e.loadingTh="loadingTh",e.loadingId="loadingId",e.loadingVi="loadingVi",e.UIPanelCn="UIPanelCn",e.UIPanelEng="UIPanelEng",e.UIPanelZh="UIPanelZh",e.UIPanelKr="UIPanelKr",e.UIPanelJp="UIPanelJp",e.UIPanelTh="UIPanelTh",e.UIPanelId="UIPanelId",e.UIPanelVi="UIPanelVi",e.UIPanelMobileCn="UIPanelMobileCn",e.UIPanelMobileEng="UIPanelMobileEng",e.UIPanelMobileZh="UIPanelMobileZh",e.UIPanelMobileKr="UIPanelMobileKr",e.UIPanelMobileJp="UIPanelMobileJp",e.UIPanelMobileTh="UIPanelMobileTh",e.UIPanelMobileId="UIPanelMobileId",e.UIPanelMobileVi="UIPanelMobileVi",e.SlotSceneCommonCn="SlotSceneCommonCn",e.SlotSceneCommonEng="SlotSceneCommonEng",e.SlotSceneCommonZh="SlotSceneCommonZh",e.SlotSceneCommonKr="SlotSceneCommonKr",e.SlotSceneCommonJp="SlotSceneCommonJp",e.SlotSceneCommonTh="SlotSceneCommonTh",e.SlotSceneCommonId="SlotSceneCommonId",e.SlotSceneCommonVi="SlotSceneCommonVi",e.SlotSceneCommonMobileCn="SlotSceneCommonMobileCn",e.SlotSceneCommonMobileEng="SlotSceneCommonMobileEng",e.SlotSceneCommonMobileZh="SlotSceneCommonMobileZh",e.SlotSceneCommonMobileKr="SlotSceneCommonMobileKr",e.SlotSceneCommonMobileJp="SlotSceneCommonMobileJp",e.SlotSceneCommonMobileTh="SlotSceneCommonMobileTh",e.SlotSceneCommonMobileId="SlotSceneCommonMobileId",e.SlotSceneCommonMobileVi="SlotSceneCommonMobileVi",e.FreeGameCn="FreeGameCn",e.FreeGameEng="FreeGameEng",e.FreeGameZh="FreeGameZh",e.FreeGameKr="FreeGameKr",e.FreeGameJp="FreeGameJp",e.FreeGameTh="FreeGameTh",e.FreeGameId="FreeGameId",e.FreeGameVi="FreeGameVi",e.FreeGameMobileCn="FreeGameMobileCn",e.FreeGameMobileEng="FreeGameMobileEng",e.FreeGameMobileZh="FreeGameMobileZh",e.FreeGameMobileKr="FreeGameMobileKr",e.FreeGameMobileJp="FreeGameMobileJp",e.FreeGameMobileTh="FreeGameMobileTh",e.FreeGameMobileId="FreeGameMobileId",e.FreeGameMobileVi="FreeGameMobileVi",e.FeatureGameCn="FeatureGameCn",e.FeatureGameEng="FeatureGameEng",e.FeatureGameZh="FeatureGameZh",e.FeatureGameKr="FeatureGameKr",e.FeatureGameJp="FeatureGameJp",e.FeatureGameTh="FeatureGameTh",e.FeatureGameId="FeatureGameId",e.FeatureGameVi="FeatureGameVi",e.FeatureGameMobileCn="FeatureGameMobileCn",e.FeatureGameMobileEng="FeatureGameMobileEng",e.FeatureGameMobileZh="FeatureGameMobileZh",e.FeatureGameMobileKr="FeatureGameMobileKr",e.FeatureGameMobileJp="FeatureGameMobileJp",e.FeatureGameMobileTh="FeatureGameMobileTh",e.FeatureGameMobileId="FeatureGameMobileId",e.FeatureGameMobileVi="FeatureGameMobileVi",e.PaytableCn="PaytableCn",e.PaytableEng="PaytableEng",e.PaytableZh="PaytableZh",e.PaytableKr="PaytableKr",e.PaytableJp="PaytableJp",e.PaytableTh="PaytableTh",e.PaytableId="PaytableId",e.PaytableVi="PaytableVi",e.PaytableMobileCn="PaytableMobileCn",e.PaytableMobileEng="PaytableMobileEng",e.PaytableMobileZh="PaytableMobileZh",e.PaytableMobileKr="PaytableMobileKr",e.PaytableMobileJp="PaytableMobileJp",e.PaytableMobileTh="PaytableMobileTh",e.PaytableMobileId="PaytableMobileId",e.PaytableMobileVi="PaytableMobileVi",e.JackpotCn="JackpotCn",e.JackpotEng="JackpotEng",e.JackpotZh="JackpotZh",e.JackpotKr="JackpotKr",e.JackpotJp="JackpotJp",e.JackpotTh="JackpotTh",e.JackpotId="JackpotId",e.JackpotVi="JackpotVi",e.BigWinCn="BigWinCn",e.BigWinEng="BigWinEng",e.BigWinZh="BigWinZh",e.FesEventCn="FesEventCn",e.FesEventEng="FesEventEng",e.FesEventZh="FesEventZh",e.FesEventMobileCn="FesEventMobileCn",e.FesEventMobileEng="FesEventMobileEng",e.FesEventMobileZh="FesEventMobileZh",e.BetlogCommon="BetlogCommon",e.BetlogDesktop="BetlogDesktop",e.BetlogMobile="BetlogMobile",e.FreeGameMode1="FreeGameMode1",e.FreeGameMode2="FreeGameMode2",e.FreeGameMode3="FreeGameMode3",e.FreeGameModeMobile1="FreeGameModeMobile1",e.FreeGameModeMobile2="FreeGameModeMobile2",e.FreeGameModeMobile3="FreeGameModeMobile3",e.JackpotWinNoticeCn="JackpotWinNoticeCn",e.JackpotWinNoticeZh="JackpotWinNoticeZh",e.JackpotWinNoticeEng="JackpotWinNoticeEng",e.JackpotWinNoticeVi="JackpotWinNoticeVi",e.JackpotWinNoticeId="JackpotWinNoticeId",e.JackpotWinNoticeKr="JackpotWinNoticeKr",e.JackpotWinNoticeJp="JackpotWinNoticeJp",e.JackpotWinNoticeTh="JackpotWinNoticeTh",e.FreeSpinOffer="FreeSpinOffer",e.FreeSpinOfferEng="FreeSpinOfferEng",e.FreeSpinOfferCn="FreeSpinOfferCn",e.FreeSpinOfferZh="FreeSpinOfferZh",e.FreeSpinOfferKr="FreeSpinOfferKr",e.FreeSpinOfferJp="FreeSpinOfferJp",e.FreeSpinOfferTh="FreeSpinOfferTh",e.FreeSpinOfferId="FreeSpinOfferId",e.FreeSpinOfferVi="FreeSpinOfferVi",e.FSORedeemPageEng="FSORedeemPageEng",e.FSORedeemPageCn="FSORedeemPageCn",e.FSORedeemPageZh="FSORedeemPageZh",e.FSORedeemPageKr="FSORedeemPageKr",e.FSORedeemPageJp="FSORedeemPageJp",e.FSORedeemPageTh="FSORedeemPageTh",e.FSORedeemPageId="FSORedeemPageId",e.FSORedeemPageVi="FSORedeemPageVi",e.FSOPrizeWinNoticeCn="FSOPrizeWinNoticeCn",e.FSOPrizeWinNoticeZh="FSOPrizeWinNoticeZh",e.FSOPrizeWinNoticeEng="FSOPrizeWinNoticeEng",e.FSOPrizeWinNoticeVi="FSOPrizeWinNoticeVi",e.FSOPrizeWinNoticeId="FSOPrizeWinNoticeId",e.FSOPrizeWinNoticeKr="FSOPrizeWinNoticeKr",e.FSOPrizeWinNoticeJp="FSOPrizeWinNoticeJp",e.FSOPrizeWinNoticeTh="FSOPrizeWinNoticeTh",e.Ranking="Ranking",e.RankingMobile="RankingMobile",e.CampaignAwardCn="CampaignAwardCn",e.CampaignAwardEng="CampaignAwardEng",e.CampaignAwardZh="CampaignAwardZh",e.CampaignAwardKr="CampaignAwardKr",e.CampaignAwardJp="CampaignAwardJp",e.CampaignAwardTh="CampaignAwardTh",e.CampaignAwardVi="CampaignAwardVi",e.CampaignAwardId="CampaignAwardId",e.CampaignEvent="CampaignEvent",e}();__reflect(RESGroupKey.prototype,"RESGroupKey");var LocalDebug;!function(e){var t;!function(e){e[e.Base=0]="Base",e[e.Free=1]="Free"}(t=e.GameState||(e.GameState={}));var n=function(){function e(){this.currentSpinIndex=0,this.freeGameSpinCount=0,this.totalFreeSpinPlayed=0,this.state=t.Base,this.balance=1e7}return e.prototype.GetState=function(){return this.state},e.prototype.ToFree=function(){this.state=t.Free},e.prototype.ToNextGameStateFromBaseGame=function(){return Math.random()>1.9&&this.ToFree(),this.state},e.prototype.IsGameFinished=function(){var e=SocketManager.getInstance().GetData();return this.state==t.Free&&this.freeGameSpinCount>0&&this.currentSpinIndex==this.freeGameSpinCount&&0==e.freeMeter&&(this.state=t.Base),this.state==t.Base||this.state==t.Free&&this.freeGameSpinCount>0&&this.currentSpinIndex==this.freeGameSpinCount},e.prototype.GetFreeGameSpinCount=function(){return this.freeGameSpinCount},e.prototype.GetCurrentFreeSpinIndex=function(){return this.currentSpinIndex},e.prototype.GetTotalFreeSpinPlayed=function(){return this.totalFreeSpinPlayed},e.prototype.IncrementFreeSpinIndex=function(){this.currentSpinIndex++},e.prototype.AddFreeSpin=function(e){this.freeGameSpinCount+=e,this.totalFreeSpinPlayed+=e},e.prototype.ResetFreeGameData=function(e){void 0===e&&(e=!0),e&&(this.totalFreeSpinPlayed=0),this.freeGameSpinCount=0,this.currentSpinIndex=0},e}();e.DebugLocalGameStateController=n,__reflect(n.prototype,"LocalDebug.DebugLocalGameStateController")}(LocalDebug||(LocalDebug={}));var ConfigInitializer=function(){function e(){}return e.initGameConfig=function(){GameConfig.version="2.10.3",GameConfig.GameCode="EG-SLOT-A044",GameConfig.token="Robot14@";var e=!0;e?GameConfig.resourceDirectory="BomberSquad/html5web/resource/":(GameConfig.configPath="resource/config.xml",GameConfig.resourceDirectory="resource/",GameConfig.isUseCDNVersion=!1),GameConfig.bigwin={mega:40,"super":20,normal:10},GameConfig.platform=Platform.desktop,GameConfig.gameType=GameType.WayBase,GameConfig.maxNumOfLine=40,GameConfig.numOfWay=1024,GameConfig.isHttps="https:"==window.location.protocol,GameConfig.DebugSymbolMin=1,GameConfig.DebugSymbolMax=13,GameConfig.DebugRequireFreeSelction=!0,GameConfig.isTurboModeReady=!0,GameConfig.platform==Platform.desktop?(GameConfig.ResourceBaseWidth=1920,GameConfig.ResourceBaseHeight=1080,GameConfig.isDragonBoneBigWin=!0):GameConfig.platform==Platform.mobile&&(GameConfig.ResourceBaseWidth=1068,GameConfig.ResourceBaseHeight=600,GameConfig.isDragonBoneBigWin=!1),GameConfig.ContentWidth=1068,GameConfig.ContentHeight=600,GameConfig.langData=[{code:"cn",Image:"lang_sc",Text:"简体中文",disable:0},{code:"en",Image:"lang_eng",Text:"English",disable:0},{code:"zh-TW",Image:"lang_tc",Text:"繁體中文",disable:0},{code:"kr",Image:"lang_korea",Text:"한국의",disable:0},{code:"jp",Image:"lang_japan",Text:"日本語",disable:0},{code:"th",Image:"lang_thai",Text:"ไทย",disable:0},{code:"vi",Image:"lang_vietnam",Text:"Tiếng Việt",disable:0},{code:"id",Image:"lang_indonesia",Text:"Indonesia",disable:0},{code:"ph",Image:"lang_philip",Text:"Pilipino",disable:1}]},e.initSlotConfig=function(){SlotConfig.CNetSocket=Network.ArenaNetSocket,SlotConfig.CInitializer=BSTypeSlotGameInitializer,SlotConfig.CSlotActionManager=FLTypeSlotActionManager,SlotConfig.CBaseGameStateController=BaseGameStateController,SlotConfig.CFreeGameStateController=BSTypeFreeGameStateController,SlotConfig.CFreeSpinOfferGameStateController=FLTypeFreeSpinOfferGameStateController,SlotConfig.CWinInfoParser=WinPatternInfoParser,SlotConfig.ReelAnimationHandler=SimpleSpinningReelAnimationHandler,SlotConfig.isDragonBonesBorder=!0,SymbolType.H1=3,SymbolType.H2=4,SymbolType.H3=5,SymbolType.H4=6,SymbolType.H5=7,SymbolType.H6=-1,SymbolType.L1=8,SymbolType.L2=9,SymbolType.L3=10,SymbolType.L4=11,SymbolType.L5=12,SymbolType.L6=13,GameConfig.platform==Platform.desktop?(SlotConfig.CGameUI=SlotGameUI,SlotConfig.CUIController=AClassDesktopUIController,SlotConfig.SLOT_WIDTH=120,SlotConfig.SLOT_HEIGHT=96,SlotConfig.SLOT_TOPY=-96,SlotConfig.SLOT_BOTTOMY=480,SlotConfig.OffsetX=5,SlotConfig.BigSymbolScaleYOffset=0,SlotConfig.BetSource=BetSource.BSBrowser|BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSPC,liveUrl="",SlotConfig.Items={1:{body:"wild",sicon:"wild_sicon",idle:"wild_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},201:{body:"wild",sicon:"wild_sicon",idle:"201_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"201_2sec",overlay:""}}},202:{body:"wild",sicon:"wild_sicon",idle:"202_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"202_2sec",overlay:""}}},203:{body:"wild",sicon:"wild_sicon",idle:"203_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"203_2sec",overlay:""}}},204:{body:"wild",sicon:"wild_sicon",idle:"204_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"204_2sec",overlay:""}}},205:{body:"wild",sicon:"wild_sicon",idle:"205_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"205_2sec",overlay:""}}},206:{body:"wild",sicon:"wild_sicon",idle:"206_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"206_2sec",overlay:""}}},2:{body:"scatter",sicon:"scatter_sicon",idle:"scatter_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:"",repeat:0},"1s":{background:"",body:"1sec",overlay:"",repeat:0},"4s":{background:"",body:"4sec",overlay:"",repeat:0}}},3:{body:"H1",sicon:"H1_sicon",idle:"H1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},4:{body:"H2",sicon:"H2_sicon",idle:"H2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},5:{body:"H3",sicon:"H3_sicon",idle:"H3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},6:{body:"H4",sicon:"H4_sicon",idle:"H4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},7:{body:"H5",sicon:"H5_sicon",idle:"H5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},8:{body:"L1",sicon:"L1_sicon",idle:"L1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},9:{body:"L2",sicon:"L2_sicon",idle:"L2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},10:{body:"L3",sicon:"L3_sicon",idle:"L3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},11:{body:"L4",sicon:"L4_sicon",idle:"L4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},12:{body:"L5",sicon:"L5_sicon",idle:"L5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},13:{body:"L6",sicon:"L6_sicon",idle:"L6_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},border:{source:"symbol_effect",repeat:1}}):(SlotConfig.CGameUI=SlotGameUI,SlotConfig.CUIController=MobileUIController,SlotConfig.SLOT_WIDTH=120,SlotConfig.SLOT_HEIGHT=96,SlotConfig.SLOT_TOPY=-96,SlotConfig.SLOT_BOTTOMY=480,SlotConfig.SLOT_SCALE=1.25,SlotConfig.SLOT_IDLE_SCALE=.55625,SlotConfig.BORDER_SCALE=1.25,SlotConfig.OffsetX=5,SlotConfig.BetSource=BetSource.BSBrowser|BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile,liveUrl="",SlotConfig.Items={1:{body:"wild",sicon:"wild_sicon",idle:"wild_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},201:{body:"wild",sicon:"wild_sicon",idle:"201_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"201_2sec",overlay:""}}},202:{body:"wild",sicon:"wild_sicon",idle:"202_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"202_2sec",overlay:""}}},203:{body:"wild",sicon:"wild_sicon",idle:"203_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"203_2sec",overlay:""}}},204:{body:"wild",sicon:"wild_sicon",idle:"204_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"204_2sec",overlay:""}}},205:{body:"wild",sicon:"wild_sicon",idle:"205_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"205_2sec",overlay:""}}},206:{body:"wild",sicon:"wild_sicon",idle:"206_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"206_2sec",overlay:""}}},2:{body:"scatter",sicon:"scatter_sicon",idle:"scatter_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:"",repeat:0},"1s":{background:"",body:"1sec",overlay:"",repeat:0},"4s":{background:"",body:"4sec",overlay:"",repeat:0}}},3:{body:"H1",sicon:"H1_sicon",idle:"H1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},4:{body:"H2",sicon:"H2_sicon",idle:"H2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},5:{body:"H3",sicon:"H3_sicon",idle:"H3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},6:{body:"H4",sicon:"H4_sicon",idle:"H4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},7:{body:"H5",sicon:"H5_sicon",idle:"H5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},8:{body:"L1",sicon:"L1_sicon",idle:"L1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},9:{body:"L2",sicon:"L2_sicon",idle:"L2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},10:{body:"L3",sicon:"L3_sicon",idle:"L3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},11:{body:"L4",sicon:"L4_sicon",idle:"L4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},12:{body:"L5",sicon:"L5_sicon",idle:"L5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},13:{body:"L6",sicon:"L6_sicon",idle:"L6_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},border:{source:"symbol_effect_Mobile",repeat:1}}),SlotConfig.SLOT_COL=5,SlotConfig.SLOT_ROW=4,SlotConfig.SLOT_FRAME_RATE=12,SlotConfig.SLOT_MASK_WIDTH=SlotConfig.SLOT_WIDTH*SlotConfig.SLOT_COL+SlotConfig.OffsetX*(SlotConfig.SLOT_COL-1),SlotConfig.SLOT_MASK_HEIGHT=SlotConfig.SLOT_HEIGHT*SlotConfig.SLOT_ROW,SlotConfig.WINNING_MASK_BORDER_WIDTH=10,SlotConfig.BGMTimeOut=1e4,SlotConfig.SPIN_DUR=500,SlotConfig.SPIN_DUR_SP=3e3,SlotConfig.LineSize=4,SlotConfig.Wild=1,SlotConfig.Wild_Repeat=0,SlotConfig.Scatter=2,SlotConfig.Scatter_LINE=51,SlotConfig.Feature1=-1,SlotConfig.Feature1_LINE=-1,SlotConfig.Feature2=-1,SlotConfig.Feature2_LINE=-1,SlotConfig.ScatterWin=3,SlotConfig.FeatureSymbolIDs=[2],SlotConfig.SlotReelNormalSpeed=2,SlotConfig.SlotReelChargingSpeed=4,SlotConfig.HitSymbolAnimationFrameRate=30,SlotConfig.SignificantSymbolsOnReel=4,SlotConfig.SLOT_BORDER_FPS=12,SlotConfig.SymbolTypeInitString="{}",SymbolType.UpdateSymbolType(SlotConfig.SymbolTypeInitString),SlotConfig.LINES=[[1024,40],[0,4,8,12,16],[0,5,10,13,16],[0,5,8,13,16],[0,4,8,13,16],[0,4,9,13,16],[0,5,9,12,16],[0,5,8,12,16],[0,4,10,13,16],[0,5,10,12,16],[0,4,10,12,16],[0,4,9,12,16],[0,5,9,13,16],[1,5,9,13,17],[1,5,9,12,17],[1,6,9,13,17],[1,4,9,13,17],[1,6,8,14,17],[1,4,10,12,17],[1,5,10,13,17],[1,5,8,13,17],[1,6,10,14,17],[1,4,8,12,17],[1,6,9,14,17],[1,4,9,12,17],[1,5,9,14,17],[2,6,10,14,18],[2,6,11,14,18],[2,6,9,14,18],[2,7,11,15,18],[2,5,9,13,18],[2,7,10,15,18],[2,5,10,13,18],[2,6,10,15,18],[2,6,10,13,18],[2,7,10,14,18],[2,5,10,14,18],[2,7,9,15,18],[2,5,11,13,18],[3,7,11,15,19],[3,7,10,15,19],[3,6,10,14,19],[3,6,9,14,19],[3,6,11,14,19],[3,7,11,14,19],[3,6,11,15,19],[3,7,10,14,19],[3,6,10,15,19],[3,7,9,15,19],[3,7,9,14,19],[3,6,9,15,19]]},e}();__reflect(ConfigInitializer.prototype,"ConfigInitializer");var SceneType;!function(e){e[e.Base=0]="Base",e[e.Free=3]="Free",e[e.Free2=301]="Free2",e[e.Free3=302]="Free3",e[e.Feature1=4]="Feature1",e[e.Feature2=5]="Feature2",e[e.Feature3=6]="Feature3",e[e.Feature4=7]="Feature4",e[e.DoubleUp=2]="DoubleUp",e[e.LegacyFree=1]="LegacyFree",e[e.LegacyFeature1=2]="LegacyFeature1",e[e.LegacyFeature2=3]="LegacyFeature2",e[e.Unknown=100]="Unknown",e[e.Dummy=101]="Dummy",e[e.FSO=130]="FSO",e[e.OverlayComponent=131]="OverlayComponent"}(SceneType||(SceneType={}));var SysNotify=function(e){function t(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!1),e.call(this,t,n,i)||this}return __extends(t,e),t.SysError=function(e){var n=new t(t.SHOW_ERROR);return n.data=e,n},t.Notify=function(e,n){void 0===n&&(n=null);var i=new t(e);return i.data=n,i},t.LANGUAGE_CHANGED="LANGUAGE_CHANGED",t.ENABLE_ALL_BUTTON="ENABLE_ALL_BUTTON",t.DISABLE_ALL_BUTTON="DISABLE_ALL_BUTTON",t.SHOW_ERROR="SHOW_ERROR",t.CLOSE_POPUP_NOTIFY="CLOSE_POPUP_NOTIFY",t.SHOW_RESUME_JACKPOT_POPUP="SHOW_RESUME_JACKPOT_POPUP",t.LOGIN_STARTED="login_started",t.INIT_DATA_READY="init_data_ready",t.DATA_READY="data_ready",t.SYNC_DATA_READY="sync_data_ready",t.JACKPOT_DATA_READY="jackpot_data_ready",t.TOKEN_READY="token_ready",t.FSO_REDEEMED="FSO_REDEEMED",t.FSO_EVENTDETAIL_READY="FSO_EVENTDETAIL_READY",t.FSO_REDEEM_FAIL="FSO_REDEEM_FAIL",t.FSO_EVENTLIST_OUTDATED="FSO_EVENTLIST_OUTDATED",t.FSO_EVENTLIST_VALID="FSO_EVENTLIST_VALID",t.FSO_EVENTLIST_RECEIVED="FSO_EVENTLIST_RECEIVED",t.FSO_PRIZE_RECEIVED="FSO_PRIZE_RECEIVED",t.BUTTON_PRESSED="button_pressed",t.BET_INFO_UPDATE="bet_info_update",t.BET_DIRECTION_UPDATE="bet_direction_update",t.LINE_INFO_UPDATE="line_info_update",t.OPENING_VIDEO_COMPLETED="open_video_completed",t.DISCONNECTED="disconnected",t.RESUME_GAME_POPUP="resume_game_popup",t.ORIENTATION_CHANGED="ORIENTATION_CHANGED",t.GAME_LIST_DETAIL_LOADED="GAME_LIST_DETAIL_LOADED",t}(egret.Event);__reflect(SysNotify.prototype,"SysNotify");var Network;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._failAmount=0,e._sockets=[],e}return __extends(n,t),n.prototype.connect=function(t,n){var i=[];if("object"==typeof t)if(this.hosts=t,this._host=t[0],"object"==typeof n){this.ports=n,this._port=n[0];for(var o=0;o"+t[n].host+":"+t[n].port)}},n.prototype.onComplete=function(t){var n=t.currentTarget;if(!this._winner){this._winner=n,this._winner.addSubscribers(this.getSubscribers());for(var i=0;i=this._sockets.length&&this.dispatchEvent(new egret.Event(e.NetEvent.IO_ERROR)))},n.prototype.onWinnerIOError=function(e){},n.prototype.onWinnerSecurityError=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.SECURITY_ERROR))},n.prototype.onWinnerDisconnect=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.DISCONNECT))},Object.defineProperty(n.prototype,"winner",{get:function(){return this._winner},enumerable:!0,configurable:!0}),n.prototype.subscribe=function(e,n,i){t.prototype.subscribe.call(this,e,n,i),null!=this.winner&&this.winner.subscribe(e,n,i)},n.prototype.subscribeAtFirst=function(e,n,i){t.prototype.subscribeAtFirst.call(this,e,n,i),null!=this.winner&&this.winner.subscribeAtFirst(e,n,i)},n.prototype.unsubscribe=function(e,n,i){t.prototype.unsubscribe.call(this,e,n,i),null!=this.winner&&this.winner.unsubscribe(e,n,i)},n.prototype.isConnected=function(){return null!=this.winner?this.winner.isConnected():!1},n}(e.ANetSocket);e.ArenaNetSocket=t,__reflect(t.prototype,"Network.ArenaNetSocket")}(Network||(Network={}));var Network;!function(e){var t=function(){function e(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.host="",this.port=0,this.host=e,this.port=t}return e}();e.Location=t,__reflect(t.prototype,"Network.Location")}(Network||(Network={}));var Network;!function(e){var t=function(t){function n(e,n){var i=t.call(this)||this;return i.CLIENT_KEY=985417532,i.CS_IP=["127.0.0.1"],i.CS_PORT=[5e4],i.SS_IP=["127.0.0.1"],i.SS_PORT=[5e4],i.SS_PORTByServer=5e4,i.ssList=[],i._gameCode="",i._token="",i.hasError=!1,i.isConnected=!1,i.loginRetryCount=0,i._net=n,i.isConnected=!1,i}return __extends(n,t),n.prototype.setLocation=function(e,t,n){void 0===n&&(n=null);var i=typeof n;if(null==n||0==n.length)this.SS_IP=null;else if("string"==typeof n)this.SS_IP=[n];else if("object"==typeof n){this.SS_IP.length=0;for(var o=0;o"+this.ssList[e].ip+":"+this.ssList[e].port)}},n.prototype.connectSlotServer=function(){if(CommonFunc.log("====================== connectSlotServer =========================="),this.ssList.length<=0)return void EventCentral.getInstance().dispatchEvent(SysNotify.SysError(SocketManager.ERR_SERVER_NOT_CONNECTED));var e=this.ssList.length,t=Math.floor(Math.random()*e);CommonFunc.log("Random selected:: "+this.ssList[t].ip+":"+this.ssList[t].port),this.SS_IP=[],this.SS_PORT=[],this.SS_IP.push(this.ssList[t].ip),void 0!=this.ssList[t].port?this.SS_PORT.push(parseInt(this.ssList[t].port)):this.SS_PORT.push(443),this._net.connect(this.SS_IP,this.SS_PORT)},n.prototype.onConnectSsComplete=function(e){CommonFunc.log("Connected to slot server"),this.psLogin()},n.prototype.onConnectSsFailed=function(e){CommonFunc.log("Connect to slot server fail."),SocketManager.getInstance().isStarted?setTimeout(this.Reconnect.bind(this),1e3):(console.log("re try - ****** "+this.loginRetryCount),this.loginRetryCount<4?(this.loginRetryCount++,setTimeout(this.Reconnect.bind(this),1e3)):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.error.network_timeout"),!0))},n.prototype.Reconnect=function(){CommonFunc.log("-----------------------------------------Start Reconnect-----------------------------------------"),null!=this.timer&&this.timer.stop(),null!=this._net&&(this._net.close(),this._net.destroy());var e=new SlotConfig.CNetSocket,t=new SlotConfig.CNetSocket;SocketManager.getInstance().SetNetSocket(t,e),this.connectSlotServer()},n.prototype.SetNetSocket=function(e,t){this._net=t,this.addEventListeners()},n.prototype.psLogin=function(){var e=new CMDPsEgameLogin;if(e.GameCode=this._gameCode,e.Token=this._token,e.BetSource=this._betSource,StringUtil.getParameterByName("eventid")){var t='{"FSOId":'+StringUtil.getParameterByName("eventid")+"}";e.AdditionalRequest=t}if(1==GameConfig.isReconnect){console.log("is Reconnect ");var t='{"Reconnect":true}';e.AdditionalRequest=t}if(GameConfig.isFeatureTrial){console.log("is Feature Trial");var t='{"FT":1}';e.AdditionalRequest=t}e.Referer=GameConfig.referer,this._net.send(e)},n.prototype.onSpInitSlot=function(t){this._net.addEventListener(e.NetEvent.DISCONNECT,this.onDisconnect,this),this.isConnected=!0,SlotConfig.LoginTime=t.System-egret.getTimer(),this.loginRetryCount=0,GameConfig.isReconnect=!0,this.timer=new egret.Timer(GameConfig.KEEP_ALIVE_TIME),this.timer.addEventListener(egret.TimerEvent.TIMER,this.sendAck,this),this.timer.start()},n.prototype.onSpLoginFail=function(e){GameConfig.countryCode=e.CountryCode,GameConfig.ipAddress=e.IP,this.errorHandler(e.Reason)},n.prototype.sendAck=function(e){console.log(this._net.isConnected());var t=new CMDCsAck;this._net.send(t)},n.prototype.onScSyncData=function(e){},n.prototype.onDisconnect=function(e){if(void 0===e&&(e=null),CommonFunc.log(" Server disconnect."),this.isConnected=!1,EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.DISCONNECTED)),this.removeEventListeners(),SocketManager.getInstance().isStarted){if(SocketManager.getInstance().isWaitingForBalanceUpdate)return CommonFunc.log(" isWaitingForBalanceUpdate"),void SocketManager.getInstance().Reconnect();if(SocketManager.getInstance().isWaitingForResponse)return CommonFunc.log(" isWaitingForResponse"),void SocketManager.getInstance().Reconnect()}else this.hasError||(CommonFunc.log(" isStarted false"),SocketManager.getInstance().Reconnect())},n.prototype.IsConnected=function(){return this.isConnected},n.prototype.errorHandler=function(e){this.hasError=!0,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e))},n.SUCCESS_CODE=255,n}(egret.EventDispatcher);e.LoginManager=t,__reflect(t.prototype,"Network.LoginManager")}(Network||(Network={}));var Network;!function(e){var t=function(){function e(){}return e.IO_ERROR="NetEvent.IO_ERROR",e.SECURITY_ERROR="NetEvent.SECURITY_ERROR",e.RECIEVE="NetEvent.RECIEVE",e.CONNECT="NetEvent.CONNECT",e.DISCONNECT="NetEvent.DISCONNECT",e.UPDATE_STATUS="NetEvent.UPDATE_STATUS",e}();e.NetEvent=t,__reflect(t.prototype,"Network.NetEvent")}(Network||(Network={}));var Network;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e.CMD_HEAD=170,e.CMD_ID_SIZE=2,e.TIMEOUT=3e4,e.HEART_RATE=10,e._bufferPos=0,e._packetSize=0,e._pckHead=!1,e._lastConnected=!1,e._lastRecvTime=0,e._waitBytesAvailableTimoutID=0,e._timer=new egret.Timer(e.HEART_RATE),e._timer.start(),e._socket=new egret.WebSocket,e._socket.type=egret.WebSocket.TYPE_BINARY,e._buffer1=new egret.ByteArray,e._buffer1.endian=egret.Endian.LITTLE_ENDIAN,e._buffer2=new egret.ByteArray,e._buffer2.endian=egret.Endian.LITTLE_ENDIAN,e._subPacket=new egret.ByteArray,e._subPacket.endian=egret.Endian.LITTLE_ENDIAN,e.addEventListeners(),e}return __extends(n,t),n.prototype.connect=function(e,t){if("string"!=typeof e||"number"!=typeof t)throw new Error("This Socket only be implemented to support one host(string) and port(number)");this._host=e,this._port=t;var n=Number(this._port);"https:"==window.location.protocol?this._socket.connectByUrl("wss://"+this._host+":"+n.toString()):this._socket.connect(this._host,this._port)},n.prototype.send=function(e){this._socket.connected&&(this._socket.writeBytes(this.encode(e)),this._socket.flush())},n.prototype.close=function(){this._socket&&this._socket.connected&&this._socket.close()},n.prototype.destroy=function(){this.removeEventListeners(),this._timer.stop(),this.close(),this._socket=null,this._timer=null},n.prototype.encode=function(e){var t=e.toBytes(),n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,n.writeByte(this.CMD_HEAD),n.writeUnsignedInt(this.CMD_ID_SIZE+4+t.length),BitwiseUtil.writeUint(n,e.getCmdID(),this.CMD_ID_SIZE),n.writeUnsignedInt(t.length),n.writeBytes(t),n.position=0,CommonFunc.log("Send "+e.getCmdName()+"("+e.getCmdID()+","+t.length+") "+e.toString()),n},n.prototype.decode=function(e){for(;e.bytesAvailable>0;){var t=BitwiseUtil.readUint(e,this.CMD_ID_SIZE),n=BitwiseUtil.readUint(e);if(n>e.bytesAvailable){console.warn("Unexpected data size "+n+" command id "+t);break}e.readBytes(this._subPacket,0,n);var i=Command.getCommand(t);null==i?console.warn("Recv undefined command "+t):(this._subPacket.position=0,i.fromBytes(this._subPacket),this._subPacket.clear(),this._lastRecvTime=egret.getTimer(),CommonFunc.log("Recv "+i.getCmdName()+"("+t+","+n+") "+i.toString()),this.notify(t,i))}},n.prototype.addEventListeners=function(){this._socket.addEventListener(egret.ProgressEvent.SOCKET_DATA,this.onSocketData,this),this._socket.addEventListener(egret.Event.CONNECT,this.onConnect,this),this._socket.addEventListener(egret.Event.CLOSE,this.onClose,this),this._socket.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onIOError,this),this._timer.addEventListener(egret.TimerEvent.TIMER,this.tick,this)},n.prototype.removeEventListeners=function(){this._socket.removeEventListener(egret.ProgressEvent.SOCKET_DATA,this.onSocketData,this),this._socket.removeEventListener(egret.Event.CONNECT,this.onConnect,this),this._socket.removeEventListener(egret.Event.CLOSE,this.onClose,this),this._socket.removeEventListener(egret.IOErrorEvent.IO_ERROR,this.onIOError,this),this._timer.removeEventListener(egret.TimerEvent.TIMER,this.tick,this)},n.prototype.tick=function(t){this._socket.connected&&(this._lastConnected=!0),this._lastConnected&&!this._socket.connected&&(this._lastConnected=!1,this.dispatchEvent(new egret.Event(e.NetEvent.DISCONNECT)))},n.prototype.onSocketData=function(e){this._socket&&(this._buffer1.length>0?(this._buffer2.clear(),this._socket.readBytes(this._buffer2),this._bufferPos=this._buffer1.position,this._buffer1.position=this._buffer1.length,this._buffer1.writeBytes(this._buffer2),this._buffer1.position=this._bufferPos):this._socket.readBytes(this._buffer1),this.resolvePacket())},n.prototype.resolvePacket=function(){if(!this._pckHead){var e=this._buffer1.readUnsignedByte();if(e!=this.CMD_HEAD)return console.warn("Invalid packet head"),void close();this._pckHead=!0}if(0==this._packetSize){if(!(this._buffer1.bytesAvailable>=4))return void console.warn("Not enough bits("+this._buffer1.bytesAvailable+") for packet size");this._packetSize=this._buffer1.readUnsignedInt()}this._packetSize>0?this._buffer1.bytesAvailable>=this._packetSize&&(this.decode(this._buffer1),this._buffer1.clear(),this._packetSize=0,this._pckHead=!1):CommonFunc.log("packetSize="+this._packetSize)},n.prototype.onConnect=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.CONNECT))},n.prototype.onIOError=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.IO_ERROR))},n.prototype.onSecurityError=function(t){this._socket&&this.dispatchEvent(new egret.Event(e.NetEvent.SECURITY_ERROR))},n.prototype.onClose=function(e){},n.prototype.isConnected=function(){return this._socket.connected},n}(e.ANetSocket);e.NetSocket=t,__reflect(t.prototype,"Network.NetSocket")}(Network||(Network={}));var AdvancedSpinningReelAnimationHandler=function(e){function t(){var t=e.call(this)||this;return t.nudgeCount=0,t.topY=SlotConfig.SLOT_TOPY,t.bottomY=SlotConfig.SLOT_BOTTOMY,t}return __extends(t,e),t.prototype.StartSpin=function(){this.isPrepareToStop=!1,this.isStopped=!1,this.previousTime=egret.getTimer(),this.speed=SlotConfig.SlotReelNormalSpeed,SlotSymbol.ScatterCount=0,this.spinningTimer=new egret.Timer(1e3/30,0),this.spinningTimer.addEventListener(egret.TimerEvent.TIMER,this.PositionUpdate,this),this.spinningTimer.start()},t.prototype.PositionUpdate=function(e){if(!this.isStopped){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i,o=Math.floor(this.speed*n),a=(Math.floor(o/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),r=a.length-1;r>=0;r--)i=this.slotReel.GetQueuedSymbol(r),i.y+=o;this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions())}},t.prototype.NudgeUpdate=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i,o=Math.floor(.2*n),a=(Math.floor(o/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),r=a.length-1;r>=0;r--)i=this.slotReel.GetQueuedSymbol(r),this.nudgeData.direction>1?i.y-=o:i.y+=o;this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions(),1),this.ValidateAllSymbolPositions()>0&&this.nudgeCount++},t.prototype.NudgeChecking=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i=(Math.floor(.2*n),[]),o=0;oi&&(t=i),n++);var o=4-n,a=new Object;a.wildMove=o,a.direction=t,a.callback=e.Callback,this.nudgeData=a,this.nudgeTimer=new egret.Timer(1e3/30),this.nudgeTimer.addEventListener(egret.TimerEvent.TIMER,this.NudgeUpdate,this),this.nudgeTimer.start(),this.nudgeCheckTimer=new egret.Timer(1e3/30),this.nudgeCheckTimer.addEventListener(egret.TimerEvent.TIMER,this.NudgeChecking,this),this.nudgeCheckTimer.start()},t.prototype.PrepareToStop=function(){this.isPrepareToStop=!0,this.displayRemain=5},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);var t;this.isPrepareToStop=!1,this.isStopped=!0,this.spinningTimer.removeEventListener(egret.TimerEvent.TIMER,this.PositionUpdate,this),this.spinningTimer.stop();for(var n=0;nthis.bottomY)if(i.yt&&(t=e);i.y=this.bottomY)for(e=Math.floor((this.bottomY-i.y)/SlotConfig.SLOT_HEIGHT),t>e&&(t=e);i.y>=this.bottomY;)i.y-=this.bottomY-this.topY}return this.slotReel.UpdateQueueOrder(),t},t.prototype.UpdateAllSymbolResults=function(e,t){if(void 0===t&&(t=0),0!=e){var n,i=t>0;if(i||this.isPrepareToStop){if(this.isPrepareToStop&&e>this.displayRemain)return void this.slotReel.StopSpin(!0)}else this.OffsetReelStrip(e);if(e>0){var o=Math.max(0,this.slotReel.nSymbol-e);n=e;for(var a=o;a=0;s--){var r=this.slotReel.GetQueuedSymbol(s);this.UpdateSymbolResult(r,s,n,t)}}}},t.prototype.UpdateSymbolResult=function(e,t,n,i){void 0===i&&(i=0);var o=i>0;if(o)e.SetResult(i);else if(this.isPrepareToStop){if(!this.isUsingRealResult){var a=n>0?-1:1,r=this.GetReelStripIndexWithOffset(t+n),s=this.GetReelStripIndexWithOffset(t+n+a),l=this.reelStrip.At(r);this.reelStrip.At(s);if(l==i)return e.SetResult(l),void this.OffsetReelStrip(-a)}this.isUsingRealResult=!0;var h=--this.displayRemain;e.SetResult(this.slotReel.GetResultAt(h)),0==this.displayRemain&&(this.slotReel.StopSpin(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.ON_STARTSTOPPING,this.slotReel.id)))}else{var c=(this.currentReelStripIdx+t)%this.reelStrip.Length(),u=this.reelStrip.At(c);e.SetResult(u)}},t.prototype.GetReelStripIndexWithOffset=function(e){return(this.currentReelStripIdx+e+this.reelStrip.Length())%this.reelStrip.Length()},t.prototype.OffsetReelStrip=function(e){this.currentReelStripIdx=this.GetReelStripIndexWithOffset(e)},t}(ReelSpinAnimationHandler);__reflect(AdvancedSpinningReelAnimationHandler.prototype,"AdvancedSpinningReelAnimationHandler",["SpinningReelValidator"]);var LoMachine=function(){function LoMachine(){this.playmode=2,this.playdata={},this.playcursor=0,this.BetID=50123055}return LoMachine.prototype._setSpinData=function(e){e[JSONTag.Symbol]=[3,7,9,5,7,3,10,12,4,11,12,3,3,6,7]},LoMachine.getInstance=function(){return null==this.instance&&(this.instance=new LoMachine),this.instance},LoMachine.prototype.createSpinSlotData=function(){var e={};return this._setSpinData(e),JSON.stringify(e)},LoMachine.prototype.createInitSlotData=function(){var e={};return e[JSONTag.Status]=SlotAction.Spin,e[JSONTag.DenominationList]=[1,2,5,10,20,100],e[JSONTag.LineBetList]=[1,2,3,4,5,6,7,8,9,10],e[JSONTag.BetLineNum]=25,e[JSONTag.LineBet]=4,e[JSONTag.DenominationId]=3,e[JSONTag.WinAmount]=0,this._setSpinData(e),JSON.stringify(e)},LoMachine.prototype.initialize=function(_playmode,scClient,spClient){if(this.playmode=_playmode,this.ScClient=scClient,this.SpClient=spClient,3==this.playmode){var _data=LoRecorder.getInstance().data();void 0!==_data&&""!=_data?(this.playdata=eval("("+_data+")"),console.log("*** Playback (localStorage) Mode Activated ***")):(console.log("Playback Records (localStorage) Load Failed."),this.playmode=0)}else 4==this.playmode&&this.loadRecords("playrecord01.csv")},LoMachine.prototype.loadRecords=function(e){RES.getResByUrl(GameConfig.testfile,this.onParseCompleted,this,RES.ResourceItem.TYPE_TEXT)},LoMachine.prototype.onParseCompleted=function(e){if(void 0===e&&(e=void 0),void 0===e||""==e)return this.playmode=0,void console.log("Playback Records ("+GameConfig.testfile+") Load Failed.");console.log("*** Playback ("+GameConfig.testfile+") Mode Activated ***");var t=e.split("\n");this.playdata={};for(var n=0;n1){var i=t[n].split(" ");0==n?(this.playdata.datetime=[i[0]],this.playdata.cmdid=[i[1]],this.playdata.property=[i[2]],this.playdata.content=[i[3]]):(this.playdata.datetime[n]=i[0],this.playdata.cmdid[n]=i[1],this.playdata.property[n]=i[2],this.playdata.content[n]=i[3])}},LoMachine.prototype.ScSend=function(e){var t=e.getCmdID();console.log("ScCommand Send, cmdId : "+t),this.onCommand(e)},LoMachine.prototype.SpSend=function(e){var t=e.getCmdID();console.log("SpCommand Send, cmdId : "+t),this.onCommand(e)},LoMachine.prototype.onCommand=function(e){var t=e.getCmdID();switch(t){case 30002:this.onCMDScServer(e);break;case 35001:case 35007:this.onCMDCsRequestServer(e);break;case 55018:this.onCMDPsSlotLogin(e);break;case 55019:this.onCMDPsSlotAction(e)}},LoMachine.prototype.onCMDScServer=function(e){console.log("onCMDScServer")},LoMachine.prototype.onCMDCsRequestServer=function(e){var t=new CMDScServer;t.IP="127.0.0.1",t.Port=12345,this.ScClient.onReceiveCommand(t)},LoMachine.prototype.onCMDPsSlotLogin=function(e){var t=new CMDSpInitEgame;if(this.playmode>=3&&null!=this.playdata&&this.playdata.content.length>0){for(var n=this.playdata.property[0].split("&"),i=0;i=3&&null!=this.playdata)if(this.playcursor0?(i.datetime[o]=(new Date).toLocaleString(),i.cmdid[o]=a,i.content[o]=r,i.property[o]=s):(i.datetime=[(new Date).toLocaleString()],i.cmdid=[a],i.content=[r],i.property=[s]);var l=JSON.stringify(i);localStorage.setItem(t,l)},e.prototype.append=function(e){var t=this.m_Tag,n=localStorage.getItem(t);(null==n||""==n)&&(n="{}");var i=JSON.parse(n),o=0;void 0!==i.datetime&&(o=i.datetime.length),o>0?(i.datetime[o]=(new Date).toLocaleString(),i.content[o]=e):(i.datetime=[(new Date).toLocaleString()],i.content=[e]);var a=JSON.stringify(i);localStorage.setItem(t,a)},e.instance=null,e}();__reflect(LoRecorder.prototype,"LoRecorder");var LoSocket=function(){function e(e){void 0===e&&(e=0),this.target=null,this.remoteType=0,this.isHandshaked=!1,this.remoteType=e,this._initialize()}return e.prototype._initialize=function(){},e.prototype.connect=function(e,t,n){this.target=n,this.onSocketOpen()},e.prototype.close=function(){},e.prototype.onSocketOpen=function(){console.log("LoSocket.onSocketOpen ("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScOpen():this.target.onSpOpen())},e.prototype.onSocketClose=function(e){console.log("LoSocket.onSocketClose("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScClose(e):this.target.onSpClose(e))},e.prototype.onReceiveCommand=function(e){null!=this.target&&null!=e&&(0==this.remoteType?this.target.onScCommand(e):this.target.onSpCommand(e))},e.prototype.onSocketError=function(){},e.prototype.send=function(e){return 0==this.remoteType?LoMachine.getInstance().ScSend(e):LoMachine.getInstance().SpSend(e),0},e}();__reflect(LoSocket.prototype,"LoSocket");var WinInfo=function(){function e(){this.multiplyer=1,this.direction=new BetDirection}return e.prototype.GetSymbolIDs=function(){return this.symbolIDs},e.prototype.GetPayout=function(){return this.payout},e.prototype.GetSymbolPosition=function(){return this.symbolPositions},e.prototype.GetTriggerType=function(){return this.triggerType},e.prototype.GetMultiplyer=function(){return this.multiplyer},e.prototype.GetDirection=function(){return this.direction.value},e}();__reflect(WinInfo.prototype,"WinInfo");var WinPatternInfo=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.GetWay=function(){return this.way},t.prototype.ParseWinPosition=function(e,t){var n,i=e,o=t,a=[];for(n=0;n0&&(h=!0);var u=1;if(null!=e[JSONTag.screenMultiplier]&&(u=parseInt(e[JSONTag.screenMultiplier][0])),null!=r)for(var p=0;pL));y++)T++;if(GameConfig.gameType==GameType.DirectionalWayBase){var I=SocketManager.getInstance().GetData().direction.GetDirection();null!=C&&(I=C),I==BetDirection.Right?i[_]==m[SlotConfig.SignificantSymbolsOnReel.length-T-1]&&S.push(_):i[_]==m[T]&&S.push(_)}else i[_]==m[T]&&S.push(_)}}else S=r[p].SP;CommonFunc.log("SymbolPosition: "+S),o[p]=new WinPatternInfo,o[p].SetInfo(parseInt(r[p].W),m,parseInt(r[p].P),S,g,l[p],f[p])}return o},t}(WinInfoParser);__reflect(WinPatternInfoParser.prototype,"WinPatternInfoParser");var FreeReelStrip=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.SetSpecialId=function(e){this.specialId=e},t.prototype.At=function(t){return-1==e.prototype.At.call(this,t)?this.specialId:e.prototype.At.call(this,t)},t}(ReelStrip);__reflect(FreeReelStrip.prototype,"FreeReelStrip");var BigDragonBonesOverlaySymbol=function(e){function t(){var t=e.call(this)||this;return t.speedRate=1,t.symbolArray=[],t.isLoop=!1,EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,t.StopLoop,t),t}return __extends(t,e),t.prototype.AddSymbol=function(e){this.symbolArray.push(e),e.addChild(this),this.UpdatePosition()},t.prototype.InitWithInfoArrayIndex=function(e){this.size=SlotConfig.BigSymbolInfoArray[e].size,this.result=SlotConfig.BigSymbolInfoArray[e].resultIdx,this.SetResult()},t.prototype.RemoveSymbol=function(e){null!=this.symbolArray&&this.symbolArray.splice(this.symbolArray.indexOf(e),1),0==this.symbolArray.length&&this.Destroy(),this.parent==e&&(this.symbolArray[0].addChild(this),this.UpdatePosition())
},t.prototype.SetResult=function(){this.SetBigDBSymbolSource("WildX2"),this.SetBigSymbolAnimation(!0)},t.prototype.SetBigDBSymbolSource=function(e,t){void 0===t&&(t=null),this.dbArmatureName=e,null!=t&&(this.imageIdleSource=t)},t.prototype.SetBigSymbolAnimation=function(e){null!=this.dragonBoneDisplay&&this.removeChild(this.dragonBoneDisplay),this.armature=DragonBonesManager.getInstance().CreateArmature(this.dbArmatureName),this.dragonBoneDisplay=this.armature.display,e?this.animationName=SlotConfig.Items[1].animations.opendoor.body:this.animationName=SlotConfig.Items[1].animations.loop.body,this.dragonBoneDisplay.animation.gotoAndStop(this.animationName),this.dragonBoneDisplay.y=0;for(var t=0,n=0,i=0;i=e.GetTotalBet()*GameConfig.bigwin.normal?this.speedRate=1:this.speedRate=2:this.speedRate=1},t}(egret.DisplayObjectContainer);__reflect(BigDragonBonesOverlaySymbol.prototype,"BigDragonBonesOverlaySymbol");var ReelStripSet=function(){function e(e,t){this.baseReelStrip=e,this.freeReelStrip=t}return e.prototype.GetBaseReelStrip=function(){return this.baseReelStrip},e.prototype.GetFreeReelStrip=function(){return this.freeReelStrip},e}();__reflect(ReelStripSet.prototype,"ReelStripSet");var SlotReelState=function(){function e(){}return e.IDLE=0,e.SPINSTARTING=1,e.SPINNING=2,e.SPINSTOPPING=3,e.REELFIXED=4,e.COUNT=5,e}();__reflect(SlotReelState.prototype,"SlotReelState");var SymbolBorder=function(e){function t(t){var n=e.call(this)||this;if(n.borderMask=t,SlotConfig.isDragonBonesBorder)n.dbBorder=null,n.dbArmatureDisplay=null,n.armatureName="symbol_effect";else{var i=SlotConfig.Items.border;n.movieClip=MovieClip.movieClipBySpriteSheet(i.source,SlotConfig.SLOT_BORDER_FPS),n.movieClip.visible=!1,n.movieClip.gotoAndStop(0),n.addChild(n.movieClip)}return EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,n.StopAnimation,n),n}return __extends(t,e),t.prototype.InitMovieclip=function(e,t){this.slotSymbol=e,SlotConfig.isDragonBonesBorder?(this.x=e.x,this.y=e.y,this.posX=e.x,this.posY=e.y):(this.movieClip.scaleX=1*SlotConfig.BORDER_SCALE,this.movieClip.scaleY=1*SlotConfig.BORDER_SCALE,this.x=e.x,this.y=e.y,this.movieClip.x=e.x,this.movieClip.y=e.y,this.movieClip.anchorOffsetX=.5*this.movieClip.width,this.movieClip.anchorOffsetY=.5*this.movieClip.height,this.movieClip.gotoAndStop(0),this.movieClip.visible=!1,this.borderMask.addChild(this))},t.prototype.SetBorderPosition=function(e,t){this.movieClip.x=t.x,this.movieClip.y=t.y,this.x=e.x,this.y=e.y,this.movieClip.gotoAndStop(0)},t.prototype.PlayAnimation=function(){SlotConfig.isDragonBonesBorder?(this.dbBorder=DragonBonesManager.getInstance().CreateArmature("symbol_effect"),this.dbBorder.x=this.posX,this.dbBorder.y=this.posY,this.dbBorder.anchorOffsetX=.5*this.dbBorder.width,this.dbBorder.anchorOffsetY=.5*this.dbBorder.height,this.dbArmatureDisplay=this.dbBorder.getDisplay(),this.dbArmatureDisplay.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.dbArmatureDisplay.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.dbArmatureDisplay.x=0,this.dbArmatureDisplay.y=0,this.dbArmatureDisplay.visible=!1,this.borderMask.addChild(this),this.addChild(this.dbArmatureDisplay),this.dbArmatureDisplay.visible=!0,this.dbBorder.animation.gotoAndPlay("loop")):(this.movieClip.visible=!0,isIOS14()?this.movieClip.gotoAndPlay(0,3):this.movieClip.gotoAndPlay(0))},t.prototype.StopAnimation=function(){SlotConfig.isDragonBonesBorder?(null!=this.dbArmatureDisplay&&(this.dbArmatureDisplay.visible=!1),null!=this.dbBorder&&this.dbBorder.animation.gotoAndStop("loop"),null!=this.dbArmatureDisplay&&(this.removeChild(this.dbArmatureDisplay),this.dbArmatureDisplay=null),null!=this.dbBorder&&(this.dbBorder.dispose(),this.dbBorder=null)):(this.movieClip.visible=!1,this.movieClip.gotoAndStop(0))},t}(egret.DisplayObjectContainer);__reflect(SymbolBorder.prototype,"SymbolBorder");var SymbolMask=function(e){function t(){var t=e.call(this)||this;t.symbolTypeCount=4,t.symbolTypeIndexArray=new Array;for(var n=0;n5&&this.childrenArray[t].currentId<14&&(this.setChildIndex(this.childrenArray[t],this.indexNum),this.indexNum++);for(t=0;t=0;i--)this.slotView.GetStopReelOrderedReel(n).GetQueuedSymbol(i).SetResult(this.slotView.GetStopReelOrderedReel(n).GetResultAt(i));this.slotView.GetStopReelOrderedReel(n).reelAnimHandler.StartRespin()},t.prototype.OnIdleToFeatureDropOut=function(e){for(var t=0;tn&&(this.timeBuffer=0,this.slotView.GetStopReelOrderedReel(this.respinReelIndex).reelAnimHandler.StartRespin(),this.respinReelIndex++,this.respinReelIndex==this.slotView.reelCount)?void clearInterval(this.respinTimer):void 0},t}(SlotController);__reflect(BombingTypeSlotController.prototype,"BombingTypeSlotController");var ObsoletedSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.movieClipSource=SlotConfig.Items[a.currentId.toString()],a.content=MovieClip.movieClipBySpriteSheet(a.movieClipSource.source,SlotConfig.HitSymbolAnimationFrameRate),a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),null==a.content?(console.error("cannot find slot "+a.currentId.toString()),a):(a.visible=!0,a.content.scaleX=SlotConfig.SLOT_SCALE,a.content.scaleY=SlotConfig.SLOT_SCALE,a.content.anchorOffsetX=.5*a.content.width,a.content.anchorOffsetY=.5*a.content.height,a.content.x=.5*a.width,a.content.y=.5*a.height,a.touchEnabled=!1,a.content.gotoAndStop(0),a.addChild(a.content),a)}return __extends(t,e),t.prototype.SetReelId=function(e){this.reelId=e},t.prototype.Fade=function(e,t){var n=egret.Tween.get(this.content);e?n.to({alpha:1},t):n.to({alpha:0},t)},t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){if(this.currentId=e,this.removeChild(this.content),this.movieClipSource=SlotConfig.Items[this.currentId.toString()],null!=this.movieClipSource){if(this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content)return void console.error("cannot find slot "+this.currentId.toString());this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=.5*this.content.width,this.content.anchorOffsetY=.5*this.content.height,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.addChild(this.content)}},t.prototype.GetResult=function(){return this.currentId},t.prototype.SetOriginPosition=function(e,t){this.x=e,this.y=t,this.posX=e,this.posY=t},t.prototype.PlayAnimation=function(e){e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y,this.winningMask.addChild(this),this.content.gotoAndPlay(0)},t.prototype.HitSpecialAnimation=function(e){return this.removeChild(this.content),this.movieClipSource=SlotConfig.Items[e.toString()],this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+e.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=.5*this.content.width,this.content.anchorOffsetY=.5*this.content.height,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.addChildAt(this.content,0),this.winningMask.addChild(this),this.content.gotoAndPlay(0),void(this.newSpecialTimer=setInterval(this.CheckAnimationFinished(),1e3/30)))},t.prototype.CheckAnimationFinished=function(){this.content.currentFrame==this.content.totalFrames&&(this.content.gotoAndStop(0),clearInterval(this.newSpecialTimer),this.SetResult(this.currentId))},t.prototype.StopSymbolAnimation=function(){clearInterval(this.newSpecialTimer),this.idleMask.addChild(this),this.content.gotoAndStop(0),this.symbolBorder.StopAnimation()},t.prototype.SetValidSymbolIdxRange=function(e,t){this.minIdx=e,this.maxIdx=t},t.prototype.InitContent=function(){},t}(SlotSymbol);__reflect(ObsoletedSlotSymbol.prototype,"ObsoletedSlotSymbol");var CascadeReelAnimationHandler=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDroppedOutFinished=!1,t.dropInDelay=new Array,t.dropOutDelay=new Array,t}return __extends(t,e),t.prototype.StartSpin=function(){if(t.ReelStopCount=0,this.dropOutDelay.length>0){for(var e=0;e0){for(var e=0;e0)for(var o=0;o=0;i--)n=this.slotReel.GetQueuedSymbol(i),n.y<=this.bottomY&&(n.y+=t);this.ValidateAllSymbolPositions()},t.prototype.InstantDropOut=function(){this.preparationQueue=new Array;for(var e,t=0;t=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,egret.stopTick(this.PositionUpdate,this);for(var i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),this.slotReel.GetQueuedSymbol(i).SetResult(this.slotReel.GetResultAt(i));if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.ON_STARTSTOPPING,this.slotReel.id)),e){if(this.dropInDelay.length>0)for(var i=0;i0)for(var i=0;i=0;n--)if(t=this.slotReel.GetQueuedSymbol(n),i=SlotConfig.SLOT_TOPY+this.slotReel.symbolHeight*n,t.y!=i){var r=1;GameConfig.isTurboMode&&GameConfig.TurboModeState&&(r=4),o=egret.setTimeout(this.DropInDelay,this,e/r,[t,o,i,n]),this.dropInDelay.push(o),e+=this.symbolDropDelay,a--}else a--,this.dropInDelay.push(0),0==a&&this.slotReel.OnReelStop()},t.prototype.DropInDelay=function(e){var t=e[0],n=e[1],i=e[2],o=e[3],a=egret.Tween.get(t),r=this,s=1;GameConfig.isTurboMode&&GameConfig.TurboModeState&&(s=4),a.to({y:i},220/s).call(function(){r.OnHitScatter(t),t.ReelStopTween(),AudioManager.Instance.playSound(Sound.BombingSlotStop),0==o&&r.slotReel.OnReelStop()}),egret.clearTimeout(n)},t.prototype.DropOut=function(e){var t=e[0];null!=this.startSpinDelayID&&(egret.clearTimeout(this.startSpinDelayID),this.startSpinDelayID=null);var n,i,o=this.slotReel.nSymbol;this.dropInDelay=new Array;for(var a=this.slotReel.nSymbol-1;a>=0;a--){var r=this.slotReel.GetQueuedSymbol(a);i=SlotConfig.SLOT_BOTTOMY+SlotConfig.SLOT_HEIGHT,r.y!=i&&(o--,n=egret.setTimeout(this.DropOutDelay,this,t,[r,i,n]),this.dropOutDelay.push(n),t+=120)}},t.prototype.DropOutDelay=function(e){if(this.isStopped){var t=e[2];
return void egret.clearTimeout(t)}var n=e[0],i=e[1],o=egret.Tween.get(n),a=this;o.to({y:i},150).call(function(){a.preparationQueue.push(n)})},t.prototype.OnReelStop=function(){t.ReelStopCount++,console.log("reel stop count : "+t.ReelStopCount),t.ReelStopCount==this.slotReel.slotView.reelCount&&(SlotSymbol.ScatterCount=0,this.reelStopDelayTimer=new egret.Timer(500,1),this.reelStopDelayTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnReelStopDelay,this),this.reelStopDelayTimer.start())},t.prototype.OnReelStopDelay=function(){t.ReelStopCount=0,e.prototype.OnReelStopDelay.call(this)},t.prototype.CheckDropOutFinished=function(){return this.isDroppedOutFinished?(this.PrepareToStop(),egret.stopTick(this.CheckDropOutFinished,this),!0):void 0},t.prototype.ValidateAllSymbolPositions=function(){for(var e=0;eSlotConfig.SLOT_BOTTOMY&&this.preparationQueue.push(t)}return 0},t.prototype.OnHitScatter=function(e){if(!e.isScatterOneSecFinished&&e.currentId==SymbolType.Scatter){e.isScatterOneSecFinished=!0;var t=new Object;t.symbol=e,t.reelId=e.reelId,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SYMBOL_DROPIN_FINISHED,t))}},t.ReelStopCount=0,t}(SimpleSpinningReelAnimationHandler);__reflect(CascadeReelAnimationHandler.prototype,"CascadeReelAnimationHandler");var SlotReel=function(e){function t(t,n,i,o,a,r){void 0===r&&(r=null);var s=e.call(this)||this;return s.id=t,s.nSymbol=n,s.symbolHeight=o,s.nSignificantSymbol=a,s.slotView=r,s.reelState=SlotReelState.IDLE,s.reelAnimHandler=new SlotConfig.ReelAnimationHandler,s.reelAnimHandler.slotReel=s,s}return __extends(t,e),t.prototype.SetSymbolHeight=function(e){this.symbolHeight=e},t.prototype.SetSymbolMasks=function(e){this.idleMask=e[0],this.spinningMask=e[1],this.SetActiveMask(this.idleMask)},t.prototype.Fade=function(e,t){for(var n=0;n=0;t--){e=!1;for(var n=0;n0?(this.Free1SlowRolling(),this.free1StopCount--):(this.isFreeGroupStopped=!0,this.CheckResultEnded()):(this.Free1SlowRolling(),this.free1StopCount--):this.Free1LoopRolling()},t.prototype.Free2CallBack=function(){if(190==this.free2.x){switch(this.free2.x=650,this.free2Index){case 0:this.free2Img.source="mystery_json.15",this.free2Index=2;break;case 1:this.free2Img.source="mystery_json.10",this.free2Index=3;break;case 2:this.free2Img.source="mystery_json.8",this.free2Index=4;break;case 3:this.free2Img.source="mystery_json.25",this.free2Index=0;break;case 4:this.free2Img.source="mystery_json.20",this.free2Index=1}this.isDataReady?this.numOfFreeGame==this.freeArray[this.free1Index]?this.free2StopCount>0&&(this.Free2SlowRolling(),this.free2StopCount--):(this.Free2SlowRolling(),this.free2StopCount--):this.Free2LoopRolling()}else this.isDataReady?(this.Free2SlowRolling(),this.free2StopCount--):this.Free2LoopRolling()},t.prototype.Mul1CallBack=function(){if(660==this.mul1.x){switch(this.mul1.x=160,this.mul1Index){case 0:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3"),this.mul1Index=2;break;case 1:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4"),this.mul1Index=3;break;case 2:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5"),this.mul1Index=4;break;case 3:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1"),this.mul1Index=0;break;case 4:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2"),this.mul1Index=1}this.isDataReady?(this.Mul1SlowRolling(),this.mul1StopCount--):this.Mul1LoopRolling()}else this.isDataReady?this.multiplierId==this.multiplierArray[this.mul1Index]?this.mul1StopCount>0?(this.Mul1SlowRolling(),this.mul1StopCount--):(this.isMultiplierGroupStopped=!0,this.CheckResultEnded()):(this.Mul1SlowRolling(),this.mul1StopCount--):this.Mul1LoopRolling()},t.prototype.Mul2CallBack=function(){if(660==this.mul2.x){switch(this.mul2.x=160,this.mul2Index){case 0:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3"),this.mul2Index=2;break;case 1:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4"),this.mul2Index=3;break;case 2:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5"),this.mul2Index=4;break;case 3:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1"),this.mul2Index=0;break;case 4:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2"),this.mul2Index=1}this.isDataReady?this.multiplierId==this.multiplierArray[this.mul1Index]?this.mul2StopCount>0&&(this.Mul2SlowRolling(),this.mul2StopCount--):(this.Mul2SlowRolling(),this.mul2StopCount--):this.Mul2LoopRolling()}else this.isDataReady?(this.Mul2SlowRolling(),this.mul2StopCount--):this.Mul2LoopRolling()},t.prototype.StartRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},500).call(this.Free1CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},500).call(this.Free2CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},500).call(this.Mul1CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},500).call(this.Mul2CallBack.bind(this))},t.prototype.Free1LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},200).call(this.Free1CallBack.bind(this))},t.prototype.Free2LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},200).call(this.Free2CallBack.bind(this))},t.prototype.Free1SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},500).call(this.Free1CallBack.bind(this))},t.prototype.Free2SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},500).call(this.Free2CallBack.bind(this))},t.prototype.ReadyToStop=function(e,t){this.numOfFreeGame=e,this.multiplierId=t,this.isDataReady=!0},t.prototype.Mul1LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},200).call(this.Mul1CallBack.bind(this))},t.prototype.Mul2LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},200).call(this.Mul2CallBack.bind(this))},t.prototype.Mul1SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},500).call(this.Mul1CallBack.bind(this))},t.prototype.Mul2SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},500).call(this.Mul2CallBack.bind(this))},t.prototype.CheckResultEnded=function(){this.isFreeGroupStopped&&this.isMultiplierGroupStopped&&EventCentral.getInstance().dispatchEvent(FLSceneNotify.Notify(FLSceneNotify.FEATURE_MYSTERY_REVEAL_FINISHED))},t}(HTMLUI.UIBase);__reflect(FeatureMysteryResult.prototype,"FeatureMysteryResult");var FES_ID;!function(e){e[e.NONE=0]="NONE",e[e.XMAS=1]="XMAS",e[e.WC=2]="WC"}(FES_ID||(FES_ID={}));var FesConstant=function(){function e(){}return e.FES_ENABLE=!1,e.URL="http://192.168.23.85/public/api/CheckPrize",e.FES_ID=FES_ID.WC,e.LOAD_TOKEN_TIMEOUT=1e4,e}();__reflect(FesConstant.prototype,"FesConstant");var FesEvent=function(e){function t(t){var n=e.call(this)||this;if(n._groupName="",n._closeWaitTime=3e3,n._text={2:["請用滑鼠刮去金色部份","一鍵即刮","確定"],0:["请用滑鼠刮去金色部份","一键即刮","确定"],1:["Please scrape the gold part with your mouse","One-click scratch","OK"],4:["皆様のマウスで金色の部分をスクラッチしてください。","ワンクリックスクラッチ","OK"],5:["โปรดขูดแถบสีทองด้วยเมาส์ของคุณ","ขูดเพียงคลิกเดียว","ตกลง"],7:["Silakan gesek bagian emas dengan mouse Anda","Gosok satu kali klik","OKE"],3:["마우스로금색부분을긁어주세요","원클릭스크래치","확인"],6:["Hãy cạo phần\nvàng bằng chuột","Một cú nhấp chuột","ĐƯỢC"]},0==t)switch(GameConfig.Locale){case Language.TraditionalChinese:n._prize="再接再厲!";break;case Language.SimplifiedChinese:n._prize="再接再厉!";break;case Language.Japanese:n._prize="再試行する!";break;case Language.Thai:n._prize="ลองอีกครั้ง!";break;case Language.Indonesia:n._prize="Coba lagi!";break;case Language.Korean:n._prize="다시\n시도하십시오!";break;case Language.Vietnam:n._prize="Thử lại!";break;default:n._prize="Try again!"}else n._prize=StringUtil.numberFormat(t,0);var i="";switch(Math.floor(3*Math.random())){case 1:i="2";break;case 2:i="3"}switch(GameConfig.Locale){case Language.TraditionalChinese:n._cardSheet="wc_card"+i+"_zh_json";break;case Language.SimplifiedChinese:n._cardSheet="wc_card"+i+"_cn_json";break;default:n._cardSheet="wc_card"+i+"_en_json"}return n._modelSheet="wc_sheet"+i+"_json",n.percentWidth=1300,n.percentHeight=670,n.verticalCenter=0,n.horizontalCenter=0,n}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.init=function(){var e=new eui.Rect;e.percentWidth=100,e.percentHeight=100,e.fillAlpha=.5,this.addChild(e),this._lowerLayer=new eui.Image(this._cardSheet+".card_2"),this._lowerLayer.verticalCenter=0,this._lowerLayer.horizontalCenter=0,this._lowerLayer.visible=!1,this.addChild(this._lowerLayer),this._upperLayer=new eui.Image(this._modelSheet+".model_1_2"),this._upperLayer.verticalCenter=0,this._upperLayer.horizontalCenter=0,this.addChild(this._upperLayer),this._playLayer=new eui.Group,this._playLayer.percentWidth=100,this._playLayer.percentHeight=100,this._playLayer.verticalCenter=0,this._playLayer.horizontalCenter=0,this._playLayer.visible=!1,this.addChild(this._playLayer);var t=new eui.Image("wc_common_json.darkgreen_mask");t.verticalCenter=18,t.horizontalCenter=144,t.scaleX=.94,t.scaleY=.94,this._playLayer.addChild(t);var n=new eui.Label;n.verticalCenter=18,n.horizontalCenter=144,GameConfig.Locale==Language.Korean&&(n.size-=4,n.textAlign=egret.HorizontalAlign.CENTER),n.text=this._prize,this._playLayer.addChild(n);var i=new eui.Image("wc_common_json.circle_frame");i.verticalCenter=18,i.horizontalCenter=144,i.scaleX=.94,i.scaleY=.94,this._playLayer.addChild(i),this.startRotateAnimation(i),this._card=new ScratchCard,this._card.verticalCenter=18,this._card.horizontalCenter=144,this._card.scaleX=.94,this._card.scaleY=.94,this._card.addEventListener(ScratchCard.NOTIFY_CARD_SCRAPE,this.onScraped,this),this._playLayer.addChild(this._card);var n=new eui.Label;n.verticalCenter=-90,n.horizontalCenter=144,n.textAlign=egret.HorizontalAlign.CENTER,n.size=16,n.wordWrap=!0,n.width=210,n.text=this._text[GameConfig.Locale][0],(0==GameConfig.Locale||2==GameConfig.Locale)&&(n.fontFamily="Microsoft JhengHei"),this._playLayer.addChild(n);var o=new eui.Group;o.verticalCenter=130,o.horizontalCenter=144,o.minWidth=100,this._playLayer.addChild(o);var n=new eui.Label;n.textAlign=egret.HorizontalAlign.CENTER,n.verticalCenter=0,n.horizontalCenter=0,n.size=16,n.wordWrap=!0,n.text=this._text[GameConfig.Locale][1],n.textWidth>100&&(o.width=150),n.textWidth>150&&(n.size=13),this._lblBtn=n,o.addChild(n),this.btn=new BaseButton,this.btn.percentWidth=100,this.btn.percentHeight=100,this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this);var a=new eui.Rect(this.btn.width,this.btn.height);a.fillAlpha=0,a.percentWidth=100,a.percentHeight=100,this.btn.addChild(a),o.addChild(this.btn),this.play()},t.prototype.startRotateAnimation=function(e){if(this.parent){var t=egret.Tween.get(e);t.to({rotation:e.rotation+120},300).call(this.startRotateAnimation,this,[e])}},t.prototype.startAlphaAnimation=function(e){if(this.parent){var t=egret.Tween.get(e),n=.5;.5==e.alpha&&(n=1),t.to({alpha:n},500).call(this.startAlphaAnimation,this,[e])}},t.prototype.onScraped=function(){this._lblBtn.text=this._text[GameConfig.Locale][2],this._closeWaitTime=0},t.prototype.play=function(){var e=egret.Tween.get(this._upperLayer);e.wait(600).call(this.changeImage,this,[2]).wait(400).call(this.changeImage,this,[3]).wait(400).call(this.changeImage,this,[4]).wait(400).call(this.changeImage,this,[5])},t.prototype.changeImage=function(e){switch(e){case 2:this._lowerLayer.visible=!0,this._upperLayer.source=this._cardSheet+".card_2",this._lowerLayer.source=this._modelSheet+".model_1_2";break;case 3:this._upperLayer.source=this._cardSheet+".card_3",this._lowerLayer.source=this._modelSheet+".model_3";break;case 4:this._upperLayer.source=this._cardSheet+".card_4",this._lowerLayer.source=this._modelSheet+".model_4";break;case 5:this._upperLayer.source=this._modelSheet+".model_5",this._lowerLayer.source=this._cardSheet+".card_5",this._playLayer.visible=!0;var t=new eui.Image("wc_common_json.rect_frame");t.verticalCenter=18,t.horizontalCenter=41,t.scaleX=.9,t.scaleY=.9,this.addChildAt(t,this.getChildIndex(this._lowerLayer)),this.startAlphaAnimation(t)}},t.prototype.close=function(){this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),this._card.visible=!1;var e=egret.Tween.get(this);e.wait(this._closeWaitTime).to({alpha:0},200).call(this.destroy,this)},t.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this._upperLayer=null,this._lowerLayer=null,this._playLayer=null,FesInfo.FINISHED=!0,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t}(eui.Component);__reflect(FesEvent.prototype,"FesEvent");var FesEventController=function(e){function t(){var n=e.call(this)||this;if(n._isInit=!1,n.delay=0,n.isLoadingReady=!1,t._instance)throw new Error("Error: Instantiation failed: Use SingletonClass.getInstance() instead of new.");return t._instance=n,n}return __extends(t,e),t.getInstance=function(){return t._instance},t.prototype.Init=function(){this._isInit?egret.log("FesEventController has already been inited"):(this._isInit=!0,EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this))},t.prototype.RemoveListeners=function(){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this)},t.prototype.StartRequest=function(){console.log("send request for fes-event ",FesConstant.URL);var e=new FesInfoLoader;e.load(FesConstant.URL,FesConstant.FES_ID,SocketManager.getInstance().GetData().playerID)},t.prototype.IsFesEventTriggered=function(){return FesConstant.FES_ENABLE&&!FesInfo.APPEARED?(FesInfo.APPEARED=!0,!0):!1},t.prototype.CheckIsInfoReady=function(){FesInfo.INFO_LOADED?FesInfo.TO_SHOW?EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_TRIGGERED)):EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED)):EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_INFO_LOADED,this.WaitUntilInfoLoaded,this)},t.prototype.WaitUntilInfoLoaded=function(e){void 0===e&&(e=null),EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_INFO_LOADED,this.WaitUntilInfoLoaded,this),FesInfo.TO_SHOW?EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_TRIGGERED)):EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t.prototype.PlayFesEffect=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this),EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_FINISHED,this.OnFesEffectFinished,this),GameSceneManager.GetInstance().ShowOverlay("FesEvent")},t.prototype.OnFesEffectFinished=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_FINISHED,this.PlayFesEffect,this)},t._instance=new t,t}(egret.EventDispatcher);__reflect(FesEventController.prototype,"FesEventController");var FesEventMobile=function(e){function t(t){var n=e.call(this)||this;if(n._closeWaitTime=3e3,n._text={2:["請刮去金色部份","一鍵即刮","確定"],0:["请刮去金色部份","一键即刮","确定"],1:["Please scrape the gold part","One-click scratch","OK"],4:["金色の部分をスクラッチしてください。","ワンクリックスクラッチ","OK"],5:["โปรดขูดแถบสีทองด้วยนิ้วของคุณ","ขูดเพียงคลิกเดียว","ตกลง"],7:["Silakan gesek bagian emas","Gosok satu kali klik","OKE"],3:["금색부분을긁어주세요","원클릭스크래치","확인"],6:["Hãy cạo phần vàng","Một cú nhấp chuột","ĐƯỢC"]},0==t)switch(GameConfig.Locale){case Language.TraditionalChinese:n._prize="再接再厲!";break;case Language.SimplifiedChinese:n._prize="再接再厉!";break;case Language.Japanese:n._prize="再試行する!";break;case Language.Thai:n._prize="ลองอีกครั้ง!";break;case Language.Indonesia:n._prize="Coba lagi!";break;case Language.Korean:n._prize="다시\n시도하십시오!";break;case Language.Vietnam:n._prize="Thử lại!";break;default:n._prize="Try again!"}else n._prize=StringUtil.numberFormat(t,0);var i="",o="germany",a=3*Math.random(),r=Math.floor(a);switch(r){case 1:i="2",o="portugal";break;case 2:i="3",o="france"}var s=GameConfig.Locale;switch(s){case Language.TraditionalChinese:n._cardSheet="bg_"+o+"_zh_png";break;case Language.SimplifiedChinese:n._cardSheet="bg_"+o+"_cn_png";break;default:n._cardSheet="bg_"+o+"_en_png"}return n._modelSheet="wc_mob_sheet"+i+"_json",n.width=1068,n.height=600,n.verticalCenter=0,n.horizontalCenter=0,n}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.init=function(){var e=new eui.Rect;e.percentWidth=100,e.percentHeight=100,e.fillAlpha=.5,this.addChild(e),this._upperLayer=new eui.Image(this._modelSheet+".model_1"),this._upperLayer.verticalCenter=0,this._upperLayer.horizontalCenter=0,this.addChild(this._upperLayer),this._playLayer=new eui.Group,this._playLayer.percentWidth=100,this._playLayer.percentHeight=100,this._playLayer.verticalCenter=0,this._playLayer.horizontalCenter=0,this._playLayer.visible=!1,this.addChild(this._playLayer);var t=new eui.Image("wc_common_json.darkgreen_mask");t.verticalCenter=-34,t.horizontalCenter=132,t.scaleX=1.2,t.scaleY=1.2,this._playLayer.addChild(t);var n=new eui.Label;n.verticalCenter=-34,n.horizontalCenter=132,n.size=36,GameConfig.Locale==Language.Korean&&(n.size-=4,n.textAlign=egret.HorizontalAlign.CENTER),n.text=this._prize,this._playLayer.addChild(n);var i=new eui.Image("wc_common_json.circle_frame");i.verticalCenter=-34,i.horizontalCenter=132,i.scaleX=1.2,i.scaleY=1.2,this._playLayer.addChild(i),this.startRotateAnimation(i),this._card=new ScratchCard,this._card.verticalCenter=-34,this._card.horizontalCenter=132,this._card.scaleX=1.2,this._card.scaleY=1.2,this._card.addEventListener(ScratchCard.NOTIFY_CARD_SCRAPE,this.onScraped,this),this._playLayer.addChild(this._card);var n=new eui.Label;n.verticalCenter=-170,n.horizontalCenter=132,n.textAlign=egret.HorizontalAlign.CENTER,n.size=16,n.wordWrap=!0,n.width=220,n.text=this._text[GameConfig.Locale][0],(0==GameConfig.Locale||2==GameConfig.Locale)&&(n.fontFamily="Microsoft JhengHei"),this._playLayer.addChild(n);var o=new eui.Group;o.verticalCenter=110,o.horizontalCenter=131,o.minWidth=120,o.minHeight=30,this._playLayer.addChild(o);var n=new eui.Label;n.textAlign=egret.HorizontalAlign.CENTER,n.verticalCenter=0,n.horizontalCenter=0,n.size=16,n.wordWrap=!0,n.text=this._text[GameConfig.Locale][1],n.textWidth>120&&(o.width=190),o.addChild(n),this._lblBtn=n,this.btn=new BaseButton,this.btn.percentWidth=100,this.btn.percentHeight=100,this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this);var a=new eui.Rect(this.btn.width,this.btn.height);a.fillAlpha=0,a.percentWidth=100,a.percentHeight=100,this.btn.addChild(a),o.addChild(this.btn),this.play()},t.prototype.startRotateAnimation=function(e){if(this.parent){var t=egret.Tween.get(e);t.to({rotation:e.rotation+120},300).call(this.startRotateAnimation,this,[e])}},t.prototype.startAlphaAnimation=function(e){if(this.parent){var t=egret.Tween.get(e),n=.5;.5==e.alpha&&(n=1),t.to({alpha:n},500).call(this.startAlphaAnimation,this,[e])}},t.prototype.onScraped=function(){this._lblBtn.text=this._text[Localization.Instance.currentLanguage][2],this._closeWaitTime=0},t.prototype.play=function(){var e=egret.Tween.get(this._upperLayer);e.wait(200).call(this.changeImage,this,[2]).wait(200).call(this.changeImage,this,[3]).wait(200).call(this.changeImage,this,[4])},t.prototype.changeImage=function(e){switch(e){case 2:this._upperLayer.source=this._modelSheet+".model_2";break;case 3:this._upperLayer.source=this._modelSheet+"model_3";break;case 4:this._upperLayer.source=this._cardSheet,this._playLayer.visible=!0;var t=new eui.Image("wc_common_json.rect_frame");t.verticalCenter=-33,t.horizontalCenter=-1,t.scaleX=1.16,t.scaleY=1.16,this.addChildAt(t,this.getChildIndex(this._upperLayer)),this.startAlphaAnimation(t)}},t.prototype.close=function(){this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),this._card.visible=!1;var e=egret.Tween.get(this);e.wait(3e3).to({alpha:0},200).call(this.destroy,this)},t.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this._upperLayer=null,this._playLayer=null,FesInfo.FINISHED=!0,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t}(eui.Component);__reflect(FesEventMobile.prototype,"FesEventMobile");var FesEventOverlayHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?this.LoadFesEventGroup():this.LoadFesEventGroupMobile()]},t.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;n.5*(this.width-n)&&e.x<.5*(this.width-n)+n&&e.y>.5*(this.height-n)&&e.y<.5*(this.height-n)+n&&(this._scraped=!0,this.dispatchEventWith(t.NOTIFY_CARD_SCRAPE))},t.prototype.redraw=function(e){this._scraped||this.markScrape(e),this._shape.graphics.clear(),this._shape.graphics.lineStyle(80,16777215,1,!0,"","","round"),null==this._lastPoint&&(this._lastPoint=e),this._shape.graphics.moveTo(this._lastPoint.x,this._lastPoint.y),this._shape.graphics.lineTo(e.x,e.y),this._shape.graphics.endFill()},t.prototype.refreshToBitmap=function(){var e=new egret.RenderTexture;e.drawToTexture(this._drawGroup,new egret.Rectangle(0,0,this.width,this.height)),this._scratchMask.texture&&this._scratchMask.texture.dispose(),this._scratchMask.texture=e,this._scratchMask2.texture=e,e=new egret.RenderTexture,e.drawToTexture(this._scratchGroup,new egret.Rectangle(0,0,this.width,this.height)),this._display.texture&&this._display.texture.dispose(),this._display.texture=e,this._coverImg.visible=!1},t.NOTIFY_CARD_SCRAPE="NOTIFY_CARD_SCRAPE",t}(eui.Component);__reflect(ScratchCard.prototype,"ScratchCard");var BitwiseUtil=function(){function e(){}return e.getBits=function(t,n,i){var o=0,a=Math.pow(2,n)-1;return a=e.leftShift(a,i),o=e.and(t,a),o=e.rightShift(o,i)},e.activeBits=function(t,n,i){return e.or(t,e.leftShift(n,i))},e.leftShift=function(e,t){var n=0;return n=e*Math.pow(2,t)},e.rightShift=function(e,t){return e/Math.pow(2,t)},e.activeBit=function(t,n){return e.or(t,e.leftShift(1,n))},e.and=function(t,n){var i=t<<0,o=(t-i)/Math.pow(2,32),a=n<<0,r=(n-a)/Math.pow(2,32),s=i&a,l=o&r,h=new egret.ByteArray;h.endian=egret.Endian.LITTLE_ENDIAN,h.writeUnsignedInt(s),h.writeUnsignedInt(l),h.position=0;var c=e.readInt53(h);return c},e.or=function(t,n){var i=t<<0,o=(t-i)/Math.pow(2,32),a=n<<0,r=(n-a)/Math.pow(2,32),s=i|a,l=o|r,h=new egret.ByteArray;h.endian=egret.Endian.LITTLE_ENDIAN,h.writeUnsignedInt(s),h.writeUnsignedInt(l),h.position=0;var c=e.readInt53(h);return c},e.editLow=function(t,n){var i=new egret.ByteArray;return i.endian=egret.Endian.LITTLE_ENDIAN,e.writeInt53(i,t),i.position=0,i.writeUnsignedInt(n),i.position=0,e.readInt53(i)},e.editHigh=function(t,n){var i=new egret.ByteArray;return i.endian=egret.Endian.LITTLE_ENDIAN,e.writeInt53(i,t),i.position=4,i.writeUnsignedInt(n),i.position=0,e.readInt53(i)},e.isBitActive=function(e,t){var n=!1;if(32>t)n=0!=(1<0;)n+=e.readUnsignedByte().toString(t)+" ";return e.position=i,n.toUpperCase()},e.readBytes=function(e,t){var n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,e.readBytes(n,0,t),n},e.writeBytes=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),t.writeBytes(e,n,i)},e.readUint=function(e,t){if(void 0===t&&(t=4),4==t)return e.readUnsignedInt();var n=new egret.ByteArray;n.endian=egret.Endian.LITTLE_ENDIAN,e.readBytes(n,0,t),n.position=n.length;for(var i=0;4-t>i;i++)n.writeByte(0);return n.position=0,n.readUnsignedInt()},e.writeUint=function(e,t,n){if(void 0===n&&(n=4),4==n)e.writeUnsignedInt(t);else{var i=new egret.ByteArray;i.endian=egret.Endian.LITTLE_ENDIAN,i.writeUnsignedInt(t),e.writeBytes(i,0,n)}},e.readInt53=function(e){var t=e.readUnsignedInt(),n=e.readUnsignedInt(),i=!1,o=1<<31;0!=(n&o)&&(i=!0,t=~t,n=~n);var a=4294967296*n+t;return i&&(a=-(a+1)),a},e.writeInt53=function(e,t){e.writeUnsignedInt(t),e.writeUnsignedInt(Math.floor(t/4294967296))},e.readString=function(e){for(var t=0,n=e.position,i=e.position;t0&&o%16==0&&(console.log(i),i="");var a=e.readByte();i=i+t[a>>4&15]+t[15&a]+" "}""!=i&&console.log(i),e.position=n},e}();__reflect(BitwiseUtil.prototype,"BitwiseUtil");var CommonFunc=function(){function e(){}return e.leaveGame=function(){if(apputil.exitFullScreen(),""==liveUrl)window.close();else if(e.log("sendRequestEGameTokenAction"),StringUtil.getParameterByName("inum")&&IFrameCloseGame(),!StringUtil.getParameterByName("inum"))if(GameConfig.isOperator&&!GameConfig.isUsingDefaultMobileURL){try{SocketManager.getInstance().SendRequestEGameTokenAction()}catch(t){e.leaveGameHandling()}EventCentral.getInstance().addEventListener(SysNotify.TOKEN_READY,function(t){e.LiveUrlTokenLogin(t)},this),egret.setTimeout(function(){e.leaveGameHandling()},this,5e3)}else e.leaveGameHandling()},e.encryptionName=function(e,t){void 0===t&&(t=3);var n;return e.length<=t&&(t=1),e.indexOf("@")>=0&&(e=e.split("@").shift()),n=new Array(5).join("*")+e.substr(e.length-t)},e.GetGameNameByCode=function(e){for(var t="",n=0;n0?"&platform="+StringUtil.getParameterByName("platform"):"?platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+=t.length>0?"&language="+StringUtil.getParameterByName("language"):"?language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("webview")&&(t+=t.length>0?"&webview="+StringUtil.getParameterByName("webview"):"?webview="+StringUtil.getParameterByName("webview"));var n=liveUrl+t;0!=n.indexOf("http://")&&0!=n.indexOf("https://")&&(t="",StringUtil.getParameterByName("native")&&(t+="?native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(t+=t.length>0?"&platform="+StringUtil.getParameterByName("platform"):"?platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+=t.length>0?"&language="+StringUtil.getParameterByName("language"):"?language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("webview")&&(t+=t.length>0?"&webview="+StringUtil.getParameterByName("webview"):"?webview="+StringUtil.getParameterByName("webview")),n="http://"+liveUrl+t),GameConfig.isOperator&&(t="",StringUtil.getParameterByName("native")&&(t+="&native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(t+="&platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+="&language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("mobile")&&(t+="&mobile="+StringUtil.getParameterByName("mobile")),StringUtil.getParameterByName("webview")&&(t+="&webview="+StringUtil.getParameterByName("webview")),n=0!=n.indexOf("http://")&&0!=n.indexOf("https://")?"http://"+liveUrl+"?token="+e.data.Token+"&username="+StringUtil.getParameterByName("name")+"&source=1"+t:liveUrl+"?token="+e.data.Token+"&username="+StringUtil.getParameterByName("name")+"&source=1"+t),window.open(decodeURIComponent(n),GameConfig.quitGameMethod)},e.ShowAlert=function(e,t,n){var i=AssetManager.GetInstance().GetAsset("MessageBox");null!=i&&i.ShowAlert(e,t,n)},e.ShowMessage=function(e,t){void 0===t&&(t=!1);var n=AssetManager.GetInstance().GetAsset("MessageBox");null!=n&&n.ShowMessage(e,t)},e.log=function(e){for(var t=[],n=1;n0?console.log.apply(console,[e].concat(t)):console.log(e))},e.error=function(e){for(var t=[],n=1;n0?console.error.apply(console,[e].concat(t)):console.error(e))},e.changeCursor=function(e){var t=document.getElementsByTagName("CANVAS")[0];t.style.cursor=e},e.assign=function(t,n){if(!(n instanceof Object))return n;if(Array.isArray(n)){t=[];for(var i=0;i=17?!0:!1},e.getRedirectURL=function(e){return StringUtil.getQueryParam("returnurl")&&(e+="&returnurl="+StringUtil.getQueryParam("returnurl")),StringUtil.getParameterByName("skipintro")&&(e+="&skipintro="+StringUtil.getParameterByName("skipintro")),StringUtil.getParameterByName("operator")&&(e+="&operator="+StringUtil.getParameterByName("operator")),StringUtil.getParameterByName("lobbycode")&&(e+="&lobbycode="+StringUtil.getParameterByName("lobbycode")),StringUtil.getParameterByName("native")&&(e+="&native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(e+="&platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("turboMode")&&(e+="&turboMode="+StringUtil.getParameterByName("turboMode")),StringUtil.getParameterByName("eventid")&&(e+="&eventid="+StringUtil.getParameterByName("eventid")),StringUtil.getParameterByName("mobile")?e+="&mobile="+StringUtil.getParameterByName("mobile"):GameConfig.platform==Platform.mobile&&(e+="&mobile=true"),StringUtil.getParameterByName("webview")&&(e+="&webview="+StringUtil.getParameterByName("webview")),StringUtil.getParameterByName("region_code")&&(e+="®ion_code="+StringUtil.getParameterByName("region_code").toUpperCase()),StringUtil.getParameterByName("FT")&&(e+="&FT="+StringUtil.getParameterByName("FT")),StringUtil.getParameterByName("feature")&&(e+="&feature="+StringUtil.getParameterByName("feature")),StringUtil.getParameterByName("referer")&&(e+="&referer="+StringUtil.getParameterByName("referer")),e},e.isLandscapeOnlyNoticeEnable=function(){if(GameConfig.isAllLobbyLandscapeOnlyNotice)return!0;for(var e=StringUtil.getParameterByName("lobbycode")?StringUtil.getParameterByName("lobbycode"):"",t=0;t=0:!1},e.prototype.add=function(e){return e?(this.contains(e)||this.callees.push(e),this):this},e.prototype.remove=function(e){if(!e)return this;var t=this.callees.indexOf(e);return t>=0&&this.callees.splice(t,1),this},e.prototype.toDelegate=function(){var e=this;return function(t){for(var n=[],i=1;is;s++)a=RES.getRes(e+"_tex_"+s+"_json"),r=RES.getRes(e+"_tex_"+s+"_png"),o.addTextureAtlas(new dragonBones.EgretTextureAtlas(r,a))},e.prototype.CreateArmature=function(e){var t=dragonBones.EgretFactory.factory,n=t.buildArmature(e);return null!=n?(n.animation.gotoAndStop(n.animation.animationNames[0]),dragonBones.WorldClock.clock.add(n),n):void 0},e._instance=new e,e}();__reflect(DragonBonesManager.prototype,"DragonBonesManager");var EffectUtils;!function(e){function t(e,t){function n(){e.alpha=1,e.touchEnabled=!0,e.touchChildren=!0}void 0===t&&(t=1e3),e.alpha=0,e.touchEnabled=!1,e.touchChildren=!1,egret.Tween.get(e).to({alpha:1},t).call(n,e)}function n(e,t){function n(){e.alpha=0,e.touchEnabled=!0,e.touchChildren=!0}void 0===t&&(t=1e3),e.alpha=1,e.touchEnabled=!1,e.touchChildren=!1,egret.Tween.get(e).to({alpha:0},t).call(n,e)}function i(e,t){void 0===t&&(t=1e3),e.alpha=0,e.scaleX=.5,e.scaleY=.5,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.backOut)}function o(e,t){void 0===t&&(t=1e3),e.alpha=1,e.scaleX=1,e.scaleY=1,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:0,scaleX:1.1,scaleY:1.1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.backOut)}function a(e,t){void 0===t&&(t=1e3),e.scaleX=.5,e.scaleY=.5,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.elasticOut)}function r(e,t){if(e.filter){var n=[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0],i=new egret.ColorMatrixFilter(n);e.filters=[i]}}e.fadeIn=t,e.fadeOut=n,e.backOut=i,e.backIn=o,e.elasticOut=a,e.brightnessFilter=r}(EffectUtils||(EffectUtils={}));var EventCentral=function(e){function t(t){var n=e.call(this)||this;if(null==t)throw new Error("Error: instantiation failed; Use EventCentral.getInstance()");return n}return __extends(t,e),t.getInstance=function(){return null==this.instance&&(this.instance=new t(new SingletonBlocker)),this.instance},t}(egret.EventDispatcher);__reflect(EventCentral.prototype,"EventCentral");var SingletonBlocker=function(){function e(){}return e}();__reflect(SingletonBlocker.prototype,"SingletonBlocker");var FireworkParticleManager=function(e){function t(){var t=e.call(this)||this;t.pss=[],t.intervalID=-1;for(var n,i=RES.getRes("firework_json"),o=0;4>o;o++)n=RES.getRes("firework"+o+"_png"),t.pss[o]=new particle.GravityParticleSystem(n,i),t.pss[o].x=0,t.pss[o].y=0,t.pss[o].emissionRate=2,t.pss[o].stop(),t.addChild(t.pss[o]);return t.maxScreenWidth=GameConfig.ContentWidth,t.maxScreenHeight=GameConfig.ContentHeight,t}return __extends(t,e),t.prototype.Start=function(){var e=this.pss[Math.floor(4*Math.random())];e.emitterX=Math.random()*this.maxScreenWidth,e.emitterY=Math.random()*this.maxScreenHeight,AudioManager.Instance.playSound(Sound.Fireworks),e.start(),egret.setTimeout(e.stop,e,200),this.intervalID=egret.setInterval(this.Update,this,500)},t.prototype.Update=function(){var e=this.pss[Math.floor(4*Math.random())];e.emitterX=Math.random()*this.maxScreenWidth,e.emitterY=Math.random()*this.maxScreenHeight,AudioManager.Instance.playSound(Sound.Fireworks),e.start(),egret.setTimeout(e.stop,e,200)},t.prototype.Stop=function(){-1!=this.intervalID&&(egret.clearInterval(this.intervalID),this.intervalID=-1);for(var e=0;4>e;e++)this.pss[e].stop()},t}(egret.Sprite);__reflect(FireworkParticleManager.prototype,"FireworkParticleManager");var H5Logger=function(){function e(e){void 0===e&&(e="h5default"),this.m_url="http://192.168.18.201/~alex/logger.php",this.m_store=1,this.m_tag=e}return e.getInstance=function(){return null==this.instance&&(this.instance=new e),this.instance},Object.defineProperty(e.prototype,"tag",{set:function(e){this.m_tag=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{set:function(e){this.m_url=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storage",{set:function(e){this.m_store=e},enumerable:!0,configurable:!0}),e.prototype.onHttp=function(e){CommonFunc.log(e)},e.prototype.log=function(e,t){void 0===t&&(t=""),0==this.m_store?this.log_http(e,t):1==this.m_store?this.log_local(e,t):this.log_console(e,t)},e.prototype.log_http=function(t,n){if(void 0===n&&(n=""),""==this.m_url)return void CommonFunc.log("server url is not set");var i=this.m_url+"?msg="+t+"&tag="+this.m_tag,o=new XMLHttpRequest;o.onreadystatechange=function(){4==o.readyState&&200==o.status&&e.getInstance().onHttp(o.responseText)},o.open("GET",i,!0),o.send(null)},e.prototype.log_local=function(e,t){void 0===t&&(t="");var n=t;""==n&&(n=this.m_tag);var i=localStorage.getItem(n);(null==i||""==i)&&(i="{}");var o=JSON.parse(i),a=0;void 0!==o.datetime&&(a=o.datetime.length),a>0?(o.datetime[a]=(new Date).toLocaleString(),o.content[a]=e):(o.datetime=[(new Date).toLocaleString()],o.content=[e]);var r=JSON.stringify(o);localStorage.setItem(this.m_tag,r)},e.prototype.log_console=function(e,t){void 0===t&&(t="");var n=this.m_tag;n+=" "+(new Date).toLocaleString(),n+=" "+e,CommonFunc.log(n)},e.prototype.clear=function(){localStorage.setItem(this.m_tag,"")},e.prototype.htmlTable=function(){var e=localStorage.getItem(this.m_tag);if(null==e)return"";var t=JSON.parse(e),n="";n+="";var i=0;void 0!==t.datetime&&(i=t.datetime.length);for(var o=0;i>o;++o)n+="",n+=""+t.datetime[o]+" | ",n+=""+t.content[o]+" | ",n+="
";return n+="
"},e.prototype.json=function(){return JSON.stringify(localStorage.getItem(this.m_tag))},e}();__reflect(H5Logger.prototype,"H5Logger");var HTML5Video=function(e){function t(){var t=e.call(this)||this;return t.videoCtx=null,t.canvas=null,t.ctx=null,t.skipBtn=null,t.icon=null,t.bitmapData=null,t.isAutoPlay=!1,t.url="",t._loadingIndex=-1,t._loadingProgress=0,t.forceUseCanvas=!1,t.forceUseCanvas=0!=detectIE(),t.forceUseCanvas&&(t.elementParent||(t.elementParent=document.getElementById("game"))),t}return __extends(t,e),Object.defineProperty(t.prototype,"loadingIndex",{get:function(){return this._loadingIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadingProgress",{get:function(){return this._loadingProgress},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),null!=this.url&&""!=this.url&&this.load(0,this.url)},t.prototype.load=function(e,t){this.url=t,this._loadingIndex=e,this._loadingProgress=0,this.touchEnabled=!1,this.videoCtx=document.createElement("video"),0!=this.url.search("data")&&this.videoCtx.setAttribute("crossorigin","anonymous"),this.videoCtx.setAttribute("autoplay","autoplay"),this.videoCtx.setAttribute("webkit-playsinline","true"),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%");var n=this;this.videoCtx.addEventListener("canplay",function(){n.dispatchEventWith("canplay")},!1),this.videoCtx.addEventListener("progress",function(e){this.buffered.length>0&&(n._loadingProgress=100*this.buffered.end(0)/this.duration),n.dispatchEventWith("progress")},!1),this.forceUseCanvas?this.videoCtx.onended=function(){n.onSourceEnded()}:this.videoCtx.onended=null,this.addEventListener("canplay",this.canplay,this),this.videoCtx.src=this.url,this.videoCtx.load(),this.icon=new egret.Bitmap,this.icon.width=1068,this.icon.height=600,this.forceUseCanvas||this.addChild(this.icon),this.icon.visible=!1,this.videoCtx.volume=0},t.prototype.canplay=function(e){if(this.videoCtx.width=this.videoCtx.videoWidth,this.videoCtx.height=this.videoCtx.videoHeight,this.forceUseCanvas&&(this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%")),this.bitmapData=new egret.BitmapData(this.videoCtx),this.bitmapData.$deleteSource=!1,this.icon.bitmapData=this.bitmapData,this.removeEventListener("canplay",this.canplay,this),this.isAutoPlay){this.play(!1);var t=this;this.forceUseCanvas||(this.videoCtx.onended=function(){t.onSourceEnded()})}CommonFunc.log(this.videoCtx.buffered.end(0)+"/ "+this.videoCtx.duration),this.LoadCompleted()},t.prototype.progressHaltChecking=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;var i=100*this.videoCtx.buffered.end(0)/this.videoCtx.duration;return this.previousProgress==i?(this.downloadHoldingTime+=n,this.downloadHoldingTime>1e3*GameConfig.videoLoadTimeout&&(this.removeEventListener("progress",this.progress,this),egret.stopTick(this.progressHaltChecking,this),this.LoadCompleted())):this.downloadHoldingTime=0,this.previousProgress=i,!0},t.prototype.progress=function(e){this.videoCtx.buffered.end(0)>=this.videoCtx.duration&&(this.removeEventListener("progress",this.progress,this),egret.stopTick(this.progressHaltChecking,this),this.LoadCompleted())},t.prototype.LoadCompleted=function(){CommonFunc.log("Video complete"),this._loadingProgress=100,null==this.videoCtx.parentElement&&this.forceUseCanvas&&this.videoCtx.pause(),this.dispatchEventWith(egret.Event.COMPLETE)},t.prototype.seekToTime=function(e){this.videoCtx.pause(),this.videoCtx.onended=null,this.videoCtx.currentTime=e;var t=this,n=this.videoCtx,i=setInterval(function(){CommonFunc.log("ReadyState: "+n.readyState),(n.paused&&4==n.readyState||!n.paused)&&(t.icon.visible=!0,this.forceUseCanvas||(n.onended=function(){t.onSourceEnded()}),CommonFunc.log("play"),n.play(),clearInterval(i))},50)},t.prototype.PlayFromBeginning=function(){this.removeEventListener("canplay",this.PlayFromBeginning,this),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%"),this.seekToTime(0)},t.prototype.play=function(e){void 0===e&&(e=!0),this.videoCtx.volume=AudioManager.Instance.volume,e&&this.videoCtx.load(),this.forceUseCanvas?(this.elementParent.appendChild(this.videoCtx),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%"),this.icon.visible=!1,this.addEventListener("canplay",this.PlayFromBeginning,this),this.videoCtx.play()):(this.seekToTime(0),egret.startTick(this.UpdateBitmapData,this))},t.prototype.pause=function(e){void 0===e&&(e=!1),this.videoCtx.pause(),this.forceUseCanvas||(this.videoCtx.onended=null),this.videoCtx.volume=0,this.forceUseCanvas||egret.stopTick(this.UpdateBitmapData,this),e&&this.clear()},t.prototype.clear=function(){this.forceUseCanvas?this.elementParent==this.videoCtx.parentElement&&this.elementParent.removeChild(this.videoCtx):this.icon.visible=!1,this.parent&&this.parent.removeChild(this)},t.prototype.UpdateVideoElement=function(e){e.currentTarget.setAttribute("width","100%"),e.currentTarget.setAttribute("height","100%")},t.prototype.UpdateBitmapData=function(){return this.icon.bitmapData=null,this.icon.bitmapData=this.bitmapData,null!=this.bitmapData&&(this.videoCtx.volume=AudioManager.Instance.volume,egret.WebGLUtils.deleteWebGLTexture(this.bitmapData.webGLTexture),this.bitmapData.webGLTexture=null),!0},t.prototype.onSourceEnded=function(){this.pause(),this.dispatchEventWith(egret.Event.ENDED)},t.prototype.skip=function(){this.onSourceEnded()},t}(eui.Component);__reflect(HTML5Video.prototype,"HTML5Video");var JsonpReq=function(){function e(){}return e.process=function(t){e.completeCall["call_"+e._regID]=function(n){var i=e._regID;t.data=n,t.dispatchEvent(new egret.Event(egret.Event.COMPLETE)),delete e.completeCall["call_"+i]},e.startLoader(t,e._regID++)},e.startLoader=function(e,t){var n=document.createElement("script");n.src=e._request.url+"JsonpReq.completeCall.call_"+t,document.body.appendChild(n),document.body.removeChild(n)},e._regID=0,e.completeCall={},e}();__reflect(JsonpReq.prototype,"JsonpReq");var MathExt=function(){function e(){}return e.Lerp=function(e,t,n){var i=(t-e)*n;e%1===0&&(i=Math.floor(i));var o=e+i;return o},e}();__reflect(MathExt.prototype,"MathExt");var ResUtils=function(){function e(){this._configs=new Array}return e.getInstance=function(){return null==this.instance&&(this.instance=new e),this.instance},e.prototype.addConfig=function(e,t){this._configs.push([e,t])},e.prototype.loadConfig=function(e,t){this._onConfigComplete=e,this._onConfigCompleteTarget=t,this.loadNextConfig()},e.prototype.loadNextConfig=function(){if(0==this._configs.length)return this._onConfigComplete.call(this._onConfigCompleteTarget),this._onConfigComplete=null,void(this._onConfigCompleteTarget=null);var e=this._configs.shift();RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.loadConfig(e[0],e[1])},e.prototype.onConfigCompleteHandle=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),this.loadNextConfig()},e}();__reflect(ResUtils.prototype,"ResUtils");var StringUtil=function(){function e(){}return e.numberFormat=function(e,t,n,i){void 0===t&&(t=2);var o=e,t=isNaN(t=Math.abs(t))?2:t,n=void 0==n?".":n,i=void 0==i?",":i,a=0>o?"-":"",r=parseInt(o=Math.abs(+o||0).toFixed(t))+"",s=(s=r.length)>3?s%3:0;return a+(s?r.substr(0,s)+i:"")+r.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?n+Math.abs(o-r).toFixed(t).slice(2):"")},e.getDeviceInfo=function(){for(var e=navigator.userAgent,t="Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"),n=0;n0&&decodeURIComponent(a[0].toLowerCase())==e.toLowerCase()){var r=i[o].indexOf("=")+1;return decodeURIComponent(i[o].substr(r,i[o].length-r))}}},e.isMsgServerDisconnected=function(e){switch(e){case SocketManager.ERR_SERVER_NOT_CONNECTED:case SocketManager.ERR_SERVER_KICK:case GameError.SERVER_KICK:case SocketManager.ERR_SC_SOCKET_ERROR:case SocketManager.ERR_SP_SOCKET_ERROR:case GameError.NO_SLOT:case 50026:return!0}return!1},e.SearchErrorCodeInJson=function(e){for(var t=0;t=0;)t=t.replace(" ",Localization.Instance.getString("common.font.space_ch"));return t},e.isBase64=function(e){if(""===e||""===e.trim())return!1;try{return btoa(atob(e))==e}catch(t){return!1}},e.tryDecode64=function(e){if(0==e.indexOf("77u/")&&(e=e.replace("77u/","")),this.isBase64(e)){var t=atob(e);return decodeURIComponent(t)}return e},e.replaceS3Path=function(e,t){var n=e.indexOf(".com/");if(n>=0){var i=t+e.substr(n+5);return i}return e},e}();__reflect(StringUtil.prototype,"StringUtil");var SymbolResultConverter=function(){function e(){}return e.IntArrayToCharString=function(t){for(var n="",i=0;i=this.timeoutInterval&&(this.Stop(),this.callback()),this.previousTime=e}},e.prototype.Start=function(){this.Stop(),this.intervalID=egret.setInterval(this.Update,this,33),this.previousTime=egret.getTimer(),this.isRunning=!0},e.prototype.Stop=function(){this.intervalID>=0&&(egret.clearInterval(this.intervalID),this.intervalID=-1)},e.prototype.Reset=function(){this.currentInterval=0},e.prototype.Pause=function(){this.isRunning=!1},e.prototype.Resume=function(){this.isRunning=!0},e}();__reflect(TimeoutHelper.prototype,"TimeoutHelper");var BSFeatureSelection=function(e){function t(t){var n=e.call(this)||this;return n.isSelected=!1,5>t?n.skinName="FeatureSelectionSkin":n.skinName="FeatureSelectionMysterySkin",n.selectionId=t,n}return __extends(t,e),Object.defineProperty(t.prototype,"SelectionId",{get:function(){return this.selectionId},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){if(e.prototype.childrenCreated.call(this),this.imageLabel.source="feature_selection_json."+this.selectionId,this.selectionId<5)switch(this.topLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.free"),this.multiplierLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.multiplier"),this.selectionId){case 0:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1");break;case 1:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2");break;case 2:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3");break;case 3:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4");break;case 4:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5")}else 5==this.selectionId&&(this.topLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.mystery"),this.multiplierLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.random_free"),this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option6"));EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.Disable,this)},t.prototype.SetFilter=function(e){var t=0;switch(e){case"up":t=0;break;case"down":t=-40;break;case"over":t=40;break;case"disabled":t=-80;break;case"selected":t=10}var n=[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0];"disabled"==e&&(n=[.3,.6,0,0,0,.3,.6,0,0,0,.3,.6,0,0,0,0,0,0,1,0]);var i=new egret.ColorMatrixFilter(n);this.topLabel.filters=[i],this.multiplierLabel.filters=[i],this.optionLabel.filters=[i],this.imageLabel&&(this.imageLabel.filters=[i])},t.prototype.getCurrentState=function(){var t=e.prototype.getCurrentState.call(this);return this.SetFilter(t),t},t.prototype.Disable=function(){this.IsSelected||(this.enabled=!1)},Object.defineProperty(t.prototype,"IsSelected",{get:function(){return this.isSelected},set:function(e){this.isSelected=e},enumerable:!0,configurable:!0}),t}(BaseButton);__reflect(BSFeatureSelection.prototype,"BSFeatureSelection");var ConstantBookingSpeedCalculator=function(){function e(){this.amountPreSecond=100,this.duration=5}return e.prototype.ComputeSpeedByDuration=function(e,t){this.amountPreSecond=e/(t+.01),this.duration=t},e.prototype.ComputeSpeed=function(e){for(var t=[],n=1;nt;t++)this.ConstructFirework()},t.prototype.ConstructFirework=function(){var e=new Firework(this.fireworkPool);this.addChild(e),this.fireworkPool.push(e)},t.prototype.Start=function(){var e=1e3/this.rate;this.fireTimerID=egret.setInterval(this.ShowFirework,this,e)},t.prototype.Stop=function(){egret.clearInterval(this.fireTimerID)},t.prototype.ShowFirework=function(){0==this.fireworkPool.length&&this.ConstructFirework();var e=this.fireworkPool.pop(),t=GameConfig.DefaultContentWidth*(1/6+4*Math.random()/6),n=GameConfig.DefaultContentHeight*(1/6+4*Math.random()/6);e.ShowAtPosition(t,n),egret.clearInterval(this.fireTimerID);var i=1e3/this.rate+(-this.timeVar+2*Math.random()*this.timeVar);i=Math.max(1,i),this.fireTimerID=egret.setInterval(this.ShowFirework,this,i)},t}(egret.Sprite);__reflect(FireworkManager.prototype,"FireworkManager");var LineDetail=function(e){function t(){var t=e.call(this)||this;return t.AddListeners(),t}return __extends(t,e),t.prototype.AddListeners=function(){EventCentral.getInstance().addEventListener(SceneNotify.START_SPIN,this.OnHideLines,this),EventCentral.getInstance().addEventListener(SysNotify.LINE_INFO_UPDATE,this.OnShowLines,this)},t.prototype.OnShowLines=function(e){var t=SocketManager.getInstance().GetData().nBetLine;this.ShowLines(t)},t.prototype.OnHideLines=function(e){this.HideLinesWithDuration(0)},t.prototype.SetupPoints=function(e){for(var t=[],n=0;n=t;t++)this.ShowLine(t);this.graphics.lineStyle(SlotConfig.LineSize,SlotConfig.LineHighlightColor),this.ShowLine(e),this.graphics.endFill(),this.HideLinesWithDuration(2)},t.prototype.HideLinesWithDuration=function(e){0==e?this.alpha=0:(this.alpha=1,this.fadingAmount=0,this.fadingAmountIncSpeed=2/(e*(1+24*e)),this.previousTime=egret.getTimer(),this.addEventListener(egret.Event.ENTER_FRAME,this.FadingUpdate,this))},t.prototype.FadingUpdate=function(e){var t=egret.getTimer(),n=.001*(t-this.previousTime);this.previousTime=t,this.fadingAmount+=this.fadingAmountIncSpeed*n;var i=this.alpha-this.fadingAmount;0>i&&(i=0),this.alpha=i,0==this.alpha&&this.removeEventListener(egret.Event.ENTER_FRAME,this.FadingUpdate,this)},t}(egret.Sprite);__reflect(LineDetail.prototype,"LineDetail");var ParticleWinLineManager=function(e){function t(){var t=e.call(this)||this;t.displayFactor=0,t.previousTime=0,t.InitParticle(),t.points=[];for(var n=0;ni)n=new egret.Point(MathExt.Lerp(this.points[0].x,this.points[1].x,2*(i+.5)),this.points[0].y);else{if(i>=SlotConfig.SLOT_COL-.5)return void this.HideWinLine();if(i>=SlotConfig.SLOT_COL-1)n=new egret.Point(MathExt.Lerp(this.points[SlotConfig.SLOT_COL].x,this.points[SlotConfig.SLOT_COL+1].x,2*(i-(SlotConfig.SLOT_COL-1))),this.points[SlotConfig.SLOT_COL+1].y);else{var o=Math.floor(i),a=this.points[o+1],r=this.points[o+2];i-=Math.floor(i),n=new egret.Point(MathExt.Lerp(a.x,r.x,i),MathExt.Lerp(a.y,r.y,i))}}this.ps.emitterX=n.x,this.ps.emitterY=n.y},t.prototype.ShowWinLine=function(e,t){this.SetupPoints(e),this.timer.start(),this.ps.start(),this.addChild(this.ps),this.speed=1/t,this.displayFactor=0,this.previousTime=egret.getTimer()},t.prototype.HideWinLine=function(e){void 0===e&&(e=0),this.timer.stop(),this.ps.stop()},t}(WinLineManager);__reflect(ParticleWinLineManager.prototype,"ParticleWinLineManager");var ShapeWinLineManager=function(e){function t(){var t=e.call(this)||this;t.line=new egret.Shape,t.points=[];for(var n=0;n=0&&egret.clearTimeout(this.timeoutID),this.timeoutID=-1},e.prototype.DisableMessage=function(e){var t=e.data.type;switch(t){case MessageType.PressToFeature:case MessageType.FreeGameCompleted:this.isShowMessage=!1}},e.prototype.GetNextDisplayIdx=function(){for(this.IncrementDisplayIndex();!SocketManager.getInstance().GetData().IsWinInfoHasPayout(this.currentDisplayIdx);)this.IncrementDisplayIndex()},e.prototype.IncrementDisplayIndex=function(){this.currentDisplayIdx++,this.currentDisplayIdx>=this.currentWinInfos.length&&(this.isFirstLoop&&(this.isFirstLoop=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.LOOP_COMPLETE))),this.currentDisplayIdx=0)},e}();__reflect(WinningAnimationController.prototype,"WinningAnimationController");var BSTypeFeatureGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.CreateFeatureGameUI=function(){if(!AssetManager.GetInstance().ContainKey("FeatureGameUI")){var e=void 0;e=new BSFeatureView,AssetManager.GetInstance().AddAsset("FeatureGameUI",e),GameLayer.GetInstance().AddObjectToLayer(e,Layer.Feature),e.visible=!1}},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0;var e=this;SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Feature1,this.OnTransitionEnd,this);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.OnTransitionEnd=function(){this.HideSlotGameUI(),AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0,this.stateController.Start()},t}(FLTypeFeatureGameSceneHandler);__reflect(BSTypeFeatureGameSceneHandler.prototype,"BSTypeFeatureGameSceneHandler");var BSTypeFreeGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.FSO:this.stateController.Start();break;case SceneType.Feature1:AssetManager.GetInstance().RemoveAsset("FeatureGameUI"),GameLayer.GetInstance().ClearLayer(Layer.Feature),GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.fromType]+"] to Mode:["+SceneType[this.sceneType]+"]")}},t}(FreeGameSceneHandler);__reflect(BSTypeFreeGameSceneHandler.prototype,"BSTypeFreeGameSceneHandler");var BSTypeFreeGameStateController=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isSpecialEventPlayed=!1,t}return __extends(t,e),t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.isSpecialEventPlayed=!0;for(var e=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multiplierMeter"),t=this.GetSelectedMysteryType()-1,n=[],i=0;i1&&a[t].push(e[i]);break;case 3:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&r[i]>1&&a[t].push(e[i]);break;case 4:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&1==this.chargedReelArray[3]&&r[i]>1&&a[t].push(e[i])}for(n=0;n0)for(var i=0;i1&&a[t].push(e[i]);break;case 3:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&r[i]>1&&a[t].push(e[i]);break;case 4:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&1==this.chargedReelArray[3]&&r[i]>1&&a[t].push(e[i])}for(n=0;n0},t.prototype.GetFeatureResultID=function(){return this.featureResultID},t}(SlotData);__reflect(FLTypeSlotData.prototype,"FLTypeSlotData");var FLLoadingScene=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.Show=function(){e.prototype.Show.call(this),this.loadingBar.value=0,this.currentPercent=0},t.prototype.SetProcess=function(e){this.progressLabel.text=Math.floor(e)+"%",this.loadingBar.value=Math.floor(e),Math.floor(e)>this.currentPercent&&(this.currentPercent=Math.floor(e))},t}(LoadingScene);__reflect(FLLoadingScene.prototype,"FLLoadingScene");var FLTypeSlotView=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.GetSignificantSymbol=function(e){for(var t,n=0;ni;i++)if(i==e)return t=i-4*n+1,this.GetReel(n).GetQueuedSymbol(t)},t.prototype.GetSymbolCenterPosition=function(e){var t=this.GetSignificantSymbol(e),n=new egret.Point(t.x,t.y);return n},t.prototype.GetReelCenterPosition=function(e){var t=new egret.Point(this.GetReel(e).GetQueuedSymbol(2).x,this.GetReel(e).GetQueuedSymbol(2).y);return t},t.prototype.SetReelResults=function(){this.topBot=SocketManager.getInstance().GetData().slotSymExts,this.slotResults=SocketManager.getInstance().GetData().slotSymbols,e.prototype.SetReelResults.call(this)},t.prototype.InitReelResults=function(){e.prototype.InitReelResults.call(this),this.topBot=SocketManager.getInstance().GetData().slotSymExts,this.slotResults=SocketManager.getInstance().GetData().slotSymbols,this.SetReelResults();for(var t=new Array,n=0;no;o++)t.push(this.slotResults[e*i+o]);t.push(this.topBot[0][e]),n.SetResult(t)},t.prototype.CreateSlotReelsAndSymbols=function(e,t,n){this.numOfSymbols=[6,6,6,6,6],this.numOfSignificantSymbols=[4,4,4,4,4],this.totalNumOfSymbols=0;for(var i,o=SlotConfig.SLOT_POSITION_X,a=-SlotConfig.SLOT_HEIGHT,r=0;r=0;n--){var i=this.slotReel.GetQueuedSymbol(n);egret.Tween.removeTweens(i),t=egret.Tween.get(i),t.to({y:i.y+.9*SlotConfig.SLOT_HEIGHT},50)}t.call(this.StartPositionUpdate.bind(this))},t.prototype.StartPositionUpdate=function(){for(var e=this.slotReel.GetQueueOrder(),t=e.length-1;t>=0;t--){var n=this.slotReel.GetQueuedSymbol(t),i=this.GetReelStripIndexWithOffset(t),o=this.reelStrip.At(i);n.SetResult(o)}this.slotReel.addEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this)},t.prototype.PositionUpdate=function(){if(this.isStopped)return!0;var e=egret.getTimer(),t=e-this.previousTime;this.previousTime=e,t=1e3/30;for(var n,i=Math.floor(this.speed*t),o=(Math.floor(i/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),a=o.length-1;a>=0;a--)n=this.slotReel.GetQueuedSymbol(a),n.y+=i;return this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions()),!0},t.prototype.PrepareToStop=function(){this.slotReel.StopSpin(!0)},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);for(var t,n=this.slotReel.GetQueueOrder(),i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,this.slotReel.removeEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this);for(var i=0;i