1 |
- !function(){"use strict";class t{constructor(){}static init(){Laya.ClassUtils.regClass}}t.width=1334,t.height=750,t.scaleMode="fixedheight",t.screenMode="horizontal",t.alignV="top",t.alignH="left",t.startScene="",t.sceneRoot="",t.debug=!1,t.stat=!1,t.physicsDebug=!1,t.exportSceneToJson=!0,t.init();let e={game:"asset/fgui/game",loading:"fgui/loading"},i={full:"full",flower:"flower"},s={timeOut:"1",notTouch:"2",wrongTouch:"3",wrongHole:"4",rootHole:"5"},o="ALL_BALL_STOP",n="WAIT_SHOOT",a="D3RES_LOADED",h="BALL_SHOOT",l="FIRST_BALL_HOLE",r="RESET_GAME",c="COIN_CHANGE",d="DIAMOND_CHANGE",u="RESTART_GAME",g="GET_USER_INFO",m="CHANGE_SECRETARY",y="POWER_CHANGE",p="POWER_TIME",f="userInfo",x={inHoleEft:"inHoleEft",d3ball:"d3ball",iceEft:"iceEft",hitEft:"hitEft",fireworksEft:"fireworksEft"};var C,b,I,k,w,v,N,L;!function(t){t[t.classic=0]="classic",t[t.bigMove=1]="bigMove",t[t.placeBall=2]="placeBall"}(C||(C={})),function(t){t[t.highSpace=0]="highSpace",t[t.breakArmy=1]="breakArmy",t[t.ice=2]="ice",t[t.fireworks=3]="fireworks",t[t.GuanYu=4]="GuanYu"}(b||(b={})),function(t){t[t.directShoot=0]="directShoot",t[t.bigPower=1]="bigPower",t[t.anotherShoot=2]="anotherShoot",t[t.perfectShow=3]="perfectShow",t[t.hardShoot=4]="hardShoot"}(I||(I={})),function(t){t[t.powerNode=0]="powerNode",t[t.d2Root=1]="d2Root",t[t.moveNode=2]="moveNode",t[t.rulerNode=3]="rulerNode"}(k||(k={})),function(t){t[t.normal=0]="normal",t[t.challenge=1]="challenge"}(w||(w={})),function(t){t[t.upSkill=0]="upSkill",t[t.addDiamond=1]="addDiamond",t[t.placeBallNextLevel=2]="placeBallNextLevel",t[t.regretBall=3]="regretBall",t[t.longHelpLine=4]="longHelpLine",t[t.addFailCoin=5]="addFailCoin",t[t.sign=6]="sign",t[t.draw=7]="draw",t[t.triple=8]="triple",t[t.randomDiamond=9]="randomDiamond",t[t.getPower=10]="getPower",t[t.box=11]="box",t[t.try=12]="try",t[t.againSign=13]="againSign",t[t.addCoin=14]="addCoin"}(v||(v={})),function(t){t[t.diamond=1]="diamond",t[t.coin=2]="coin",t[t.gan1=3]="gan1",t[t.gan2=4]="gan2",t[t.gan3=5]="gan3",t[t.gan4=6]="gan4"}(N||(N={})),function(t){t[t.exitGame=0]="exitGame",t[t.foul=1]="foul"}(L||(L={}));class S{constructor(t,e){this.type=t,this.num=e}}var U=Object.freeze({fguiRes:e,ballCamp:i,FoulType:s,ALL_BALL_STOP:o,WAIT_SHOOT:n,D3RES_LOADED:a,BALL_SHOOT:h,FIRST_BALL_HOLE:l,RESET_GAME:r,COIN_CHANGE:c,DIAMOND_CHANGE:d,RESTART_GAME:u,GET_USER_INFO:g,CHANGE_SECRETARY:m,POWER_CHANGE:y,POWER_TIME:p,keyForLoginInfo:f,baseHeadUrl:"https://mygame1.tangro.cn/headimg/",poolKey:x,get GameMode(){return C},get SkillType(){return b},get ClassicWordsType(){return I},get PressType(){return k},get PlaceBallType(){return w},get EAdType(){return v},get Prop(){return N},get TipsType(){return L},AwardType:S});let B=new class{constructor(){this.winSize={width:0,height:0},this.notchHeight=0,this.bannerHeight=0}init(t,e){this.winSize={width:Laya.Browser.clientWidth,height:Laya.Browser.clientHeight},this.notchHeight=this.getNotchHeight(),this.bannerHeight=this.getBannerHeight(),Laya.loader.load(t,Laya.Handler.create(this,()=>{e&&e()}))}getNotchHeight(){let t=50;if(Laya.Browser.onMiniGame){let e=wx.getSystemInfoSync();Laya.Browser.onIOS?-1!=e.model.search("iPhone X")?t=e.statusBarHeight-10:(375==e.screenWidth&&812==e.screenHeight||414==e.screenWidth&&896==e.screenHeight)&&(t=e.statusBarHeight-10):Laya.Browser.onAndroid&&e.screenWidth/e.screenHeight<9/16&&(t=e.statusBarHeight)}return t}getBannerHeight(){return 0}};var M=Laya.Handler,T=Laya.Tween;function getRandStr(t){let e=[0,1,2,3,4,5,6,7,8,9,"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],i="";for(let s=0;s<t;s++){i+=e[random(0,e.length)]}return i}function random(t,e){var i=e-t,s=Math.random()*i;return Math.floor(s)+t}function getScreenImg(){let t=Laya.WebGLContext.mainContext,e=new Uint8Array(t.drawingBufferWidth*t.drawingBufferHeight*4);t.readPixels(0,0,t.drawingBufferWidth,t.drawingBufferHeight,t.RGBA,t.UNSIGNED_BYTE,e);let i=t.drawingBufferWidth,s=t.drawingBufferHeight,o=new Laya.Texture2D(i,s,Laya.TextureFormat.R8G8B8A8,!1,!1);return o.setPixels(e),new Laya.Texture(o)}function getDistance(t,e,i,s){return Math.pow((t-i)*(t-i)+(e-s)*(e-s),.5)}function fixNumber(t,e){return(""+t).length<e?(new Array(e+1).join("0")+t).slice(-e):""+t}function toThousands(t){return t.replace(/(\d)(?=(?:\d{3})+$)/g,"$1,")}let O=["","K","M","B","T","AK","AM","AB","AT","BK","BM","BB","BT","CK","CM","CB","CT"];let j=0;var D,R=Object.freeze({playClickEffect:function(t){t&&Laya.Tween.to(t,{scaleX:1.05,scaleY:1.05},20,null,Laya.Handler.create(null,()=>{t&&Laya.Tween.to(t,{scaleX:.96,scaleY:.96},30,null,Laya.Handler.create(null,()=>{t&&Laya.Tween.to(t,{scaleX:1,scaleY:1},20,null,null,0,!0)}),0,!0)}),0,!0)},getNumList:function(t){let e=[];if(t){let s=t.split(",");for(var i in s)e.push(Number(s[i]))}return e},getStrList:function(t){let e=[];if(t){let s=t.split("|");for(var i in s)e.push(String(s[i]))}return e},getRandStr:getRandStr,getUserId:function(){return getRandStr(12)+Laya.timer.currTimer%1e6},formatPos:function(t,e=2){let i=Math.pow(10,e);return t.x=Math.floor(t.x*i)/i,t.y=Math.floor(t.y*i)/i,t.z&&(t.z=Math.floor(t.z*i)/i),t},setPosInt:function(t){return t.x=t.x>0?Math.ceil(t.x):Math.floor(t.x),t.y=t.y>0?Math.ceil(t.y):Math.floor(t.y),t.z=t.z>0?Math.ceil(t.z):Math.floor(t.z),t},random:random,randomList:function(t,e){if(t.length<=e)return t;let i=[];t.forEach(t=>{i.push(t)});let s=[];for(let t=0;t<e;t++){let t=random(0,i.length),e=i[t];s.push(e),i.splice(t,1)}return s},worldToScreen:function(t,e,i){t.viewport.project(e,t.projectionViewMatrix,i),i.x=i.x/Laya.stage.clientScaleX,i.y=i.y/Laya.stage.clientScaleY},getStringLenght:function(t){return t.replace(/[\u4e00-\u9fa5]/g,"xx").length},reviseString:function(t,e){if(t.replace(/[\u4e00-\u9fa5]/g,"xx").length>e){let i=Math.floor(e/2),s=t.substring(0,i),o=s.replace(/[\u4e00-\u9fa5]/g,"xx").length;for(;o+2<e;)i++,o=(s=t.substring(0,i)).replace(/[\u4e00-\u9fa5]/g,"xx").length;return s+"..."}return t},getCoinString:function(t){if(t<1e4)return t.toString();if(t<1e6)return Math.ceil(t/100)/10+"k";return t<1e9?Math.ceil(t/1e5)/10+"m":t<1e12?Math.ceil(t/1e8)/10+"b":t<1e15?Math.ceil(t/1e11)/10+"t":void 0},getV3Dest:function(t,e,i,s){return e.x*=i,e.y*=i,e.z*=i,Laya.Vector3.add(t,e,s),s},getV2Dest:function(t,e,i,s,o){return o.x=t+i.x*s,o.y=e+i.y*s,o},getV2Dir:function(t,e,i,s,o){return o.x=i-t,o.y=s-e,Laya.Vector2.normalize(o,o),o},getV3Dir:function(t,e,i){return Laya.Vector3.subtract(t,e,i),Laya.Vector3.normalize(i,i),i},copyPos:function(t,e){return e.x=t.x,e.y=t.y,t.z&&(e.z=t.z),e},getScreenImg:getScreenImg,playMoveByPositions:function(t,e,i,s){let o,n=()=>{0!=e.length?(o=e[0],e.splice(0,1),Laya.Tween.to(t,{x:o.x,y:o.y},getDistance(t.x,t.y,o.x,o.y)/i*1e3,null,M.create(this,()=>{n()}))):s()};n()},setStarPos:function(t,e,i){for(let s=1;s<=5;s++){let o=t.getChildAt(s-1);if(o.width=o.height=30,o.pivotX=o.pivotY=.5,o.gray=s>e,o.visible=s<=i,3==i)o.x=t.width/2+30*(s-2)-15,o.y=t.height-40,2==s&&(o.y=t.height-30);else if(5==i){let e=Math.abs(s-3);o.x=t.width/2+20*(s-3)-15,o.y=t.height-8*e-30}}},playLoopAnimRotate:function(t,e,i=!0){let s;t.rotation=t.rotation%360,s=i?-360:360,T.to(t,{rotation:s},e,null,M.create(this,()=>{this.playLoopAnimRotate(t,e,i)}))},playLoopAnimPosition:function(t,e,i,s,o,n,a=!0){let h,l;a?(h=e,l=s):(h=i,l=o),T.to(t,{x:h,y:l},n,null,M.create(this,()=>{this.playLoopAnimPosition(t,e,i,s,o,n,!a)}))},playLoopAnimScale:function playLoopAnimScale(t,e,i,s,o=!0){let n;n=o?e:i,T.to(t,{scaleX:n,scaleY:n},s,null,M.create(this,()=>{playLoopAnimScale(t,e,i,s,!o)}))},playLoopAnimRotation:function playLoopAnimRotation(t,e,i,s,o=!0,n=8){let a;a=o?e:i,n?(n--,T.to(t,{rotation:a},s,null,M.create(this,()=>{playLoopAnimRotation(t,e,i,s,!o,n)}))):t.rotation=0},inRect:function(t,e){return e.x>=t.x&&e.x<=t.x+t.w&&e.y>=t.y&&e.y<=t.y+t.h},getNumberK:function(t){return t<1e3?t.toString():(t/1e3).toFixed(1)+"k"},pointInsideCircle:function(t,e,i){if(0===i)return!1;var s=e.x-t.x,o=e.y-t.y;return s*s+o*o<=i*i},formatString:function(t,e){if(!t||null==e)return t;if("object"!=typeof e){var i=arguments,s=new RegExp("{([0-"+(i.length-1)+"])}","g");return t.replace(s,function(t,e){return i[e- -1]})}for(var o in e)e.hasOwnProperty(o)&&(t=t.replace(new RegExp("{"+o+"}","g"),e[o]));return t},getIntersection:function(t,e){let i=[];for(var s=0;s<t.length;s++)for(var o=0;o<e.length;o++)t[s]==e[o]&&i.push(t[s]);return i},getComplement:function(t,e){let i=[],s=!1;for(var o=0;o<t.length;o++){s=!1;for(var n=0;n<e.length;n++)if(t[o]==e[n]){s=!0;break}s||i.push(t[o])}return i},geSpriteStageRect:function(t){var e=t.localToGlobal(Laya.Point.TEMP.setTo(0,0));return{x:e.x,y:e.y,width:t.width*t.globalScaleX,height:t.height*t.globalScaleY}},touchButton:function(t){let e=new Laya.Event;t.event(Laya.Event.CLICK,e.setTo(Laya.Event.CLICK,t,t))},setColor:function(t,e,i,s){var o=[e/255,0,0,0,0,i/255,0,0,0,0,s/255,0,0,0,0,0,0,0,1,0],n=new Laya.ColorFilter(o);t.filters=[n]},clone:function clone(t,e={}){for(var i in t)"object"==typeof t[i]?e[i]=clone(t[i],e[i]):e[i]=t[i];return e},sort:function(t,e){if(!Array.isArray(t))throw new Error("sort的参数必须为数组");return function _ms(t,e,i,s){const o=s-i;if(o<=1)return;const n=s+i>>1;if(_ms(t,e,i,n),_ms(t,e,n,s),e(t[n-1],t[n])<=0)return;const a=[];let h=i,l=n;for(;a.length<o;)h===n?a.push(t[l++]):l===s?a.push(t[h++]):e(t[h],t[l])<=0?a.push(t[h++]):a.push(t[l++]);t.splice(i,o,...a)}(t,e,0,t.length),t},getLanguage:function(t){},getLanguageByTip:function(t){},toWeights:function(t){let e=0;for(var i=0;i<t.length;i++)e+=t[i],0==t[i]?t[i]=0:t[i]=e;return t},unique:function(t){for(var e,i,s={},o=[],n=(t.length,0);n<t.length;n++)i=typeof(e=t[n]),s[e]?s[e].indexOf(i)<0&&(s[e].push(i),o.push(e)):(s[e]=[i],o.push(e));return o},unique1:function(t){for(var e=[],i=0,s=t.length;i<s;i++){for(var o=i+1;o<s;o++)t[i]==t[o]&&++i;e.push(t[i])}return e},getDistance:getDistance,getV2Dis:function(t,e){return Math.pow((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y),.5)},getV2SqDis:function(t,e){return(t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)},getDis:function(t,e,i,s){return(t-i)*(t-i)+(e-s)*(e-s)},getDeltaxy:function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)},getSymbolNumber:function(t){return t>0?"+"+t:t.toString()},fixNumber:fixNumber,toThousands:toThousands,fmtMoney:function(t){0==(t=toThousands(t.replace(/^0+/,""))).length&&(t="0");let e=0;for(var i=0;i<t.length;i++)","==t.charAt(i)&&e++;if(0==e)return t;{let i=t.indexOf(",");return i&&(t=t.slice(0,i+2)+O[e]),t.replace(",",".")}},flatten:function(t){for(;t.some(t=>Array.isArray(t));)t=[].concat(...t);return t},getDistanceByPoint:function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},getAngleByPoint:function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)*(180/Math.PI)},toIntByArray:function(t){for(var e=0;e<t.length;e++)t[e]=parseInt(t[e]);return t},getAngle0To360:function(t){for(;t<0;)t+=360;for(;t>=360;)t-=360;return t},toAngle:function(t){return 180*t/Math.PI},toRadian:function(t){return t*Math.PI/180},getArrayValueRandom:function(t){return t[random(0,t.length-1)]},promptByTip:function(t,e="#FFFFFF",i=null,s=1e3,o=35,n=1){},promptByErrorCode:function(t,e="#FFFFFF",i="#FF8B00",s=1e3,o=35,n=1){},fmtTimeMMSS:function(t){return t=t<0?0:Math.floor(t),fixNumber(Math.floor(t/60),2)+":"+fixNumber(t%60,2)},fmtTimeMS:function(t){return t<0&&(t=0),fixNumber(Math.floor(t/60),2)+"m"+fixNumber(t%60,2)+"s"},fmtTimeHHMM:function(t){return t<0&&(t=0),t=Math.floor(t/1e3),fixNumber(Math.floor(t/3600),2)+":"+fixNumber(Math.floor(t%3600/60),2)+":"+fixNumber(Math.floor(t%60),2)},getServerTime:function(){return new Date((new Date).getTime()-j)},setServerTime:function(t){j=(new Date).getTime()-t}});class _{constructor(){_._instance=this}static getInstance(){return this._instance||(this._instance=new _),this._instance}sendPost(t,e,i){let s=new Laya.HttpRequest;s.http.timeout=5e3,s.once(Laya.Event.COMPLETE,this,function(t){if(t&&t.length>0){let e=JSON.parse(t);i&&i(e)}}),s.once(Laya.Event.ERROR,this,function(t){console.log("errorHandler:"+t),alert("Please check your network connection.")}),s.send(t,e,"post","text",["Content-Type","application/json; charset=UTF-8"])}sendPost2025(t,e,i){let s="https://api.kessongame.site/",o=s+"prod-api/api/game/";let n=o+t;"registerForApp"!=t&&"loginForApp"!=t||(n=s+"prod-api/"+t);let a=new Laya.HttpRequest;a.http.timeout=5e3,a.once(Laya.Event.COMPLETE,this,function(t){if(t&&t.length>0){let e=JSON.parse(t);i&&i(e)}}),a.once(Laya.Event.ERROR,this,function(t){i?i("{'msg':'Network exception','code':500}"):alert("Tip:Please check your network connection.")}),a.send(n,e,"post","text",["Content-Type","application/json; charset=UTF-8"])}sendGet(t,e){let i=new Laya.HttpRequest;i.http.timeout=5e3,i.once(Laya.Event.COMPLETE,this,function(t){t&&t.length>0&&e&&e(t)}),i.once(Laya.Event.ERROR,this,function(t){console.log("errorHandler:"+t)}),i.send(t,"","get")}}_._instance=null;class P extends Laya.Sprite{constructor(){super(),this._time=0,this._sin=0,this.initShader()}initShader(){this.shaderValue=new Laya.Value2D(P.DissolveSurfaceSaveName,P.DissolveSurfaceSaveName),this.customRenderEnable=!0,this.shaderValue.shader=new Laya.Shader2X("\n #define FSHIGHPRECISION\n attribute vec4 posuv;\t\n uniform vec2 size;\t\t\n varying vec4 v_texcoord;\n void main() {\n vec4 pos = vec4(posuv.xy,0.,1.);\n vec4 pos1 =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,0.,1.0);\n gl_Position=pos1;\n v_texcoord.xy = posuv.xy;\n \n }\n ","\n #define FSHIGHPRECISION\n precision highp float;\n varying vec4 v_texcoord;\n uniform vec2 size;\n uniform sampler2D texture;\n uniform float u_Time;\n\n void main() {\n vec4 color= texture2D(texture, v_texcoord.xy);\n float width = 0.2;\n float start = u_Time;\n float offset = 1.0;\n vec2 myuv = vec2(v_texcoord.x/size.x,v_texcoord.y/size.y);\n\n if( myuv.x < (start - offset * myuv.y) && myuv.x > (start - offset * myuv.y - width))\n {\n color.r=1.1;\n color.g=1.1;\n color.b=1.1;\n gl_FragColor = color;\n\n } else {\n gl_FragColor = color;\n }\n }\n ",P.DissolveSurfaceSaveName)}customRender(t,e,i){if(this.onUpdate(),!this.texture)return;let s=e-this.pivotX,o=i-this.pivotY;t.drawTarget(this.texture,s,o,this.width,this.height,null,this.shaderValue)}onUpdate(){this._time+=2*Laya.timer.delta*.001,this._sin=Math.sin(this._time),this._sin>.99&&(this._sin=0,this._time=0),this.shaderValue.u_Time=this._sin}}P.DissolveSurfaceSaveName=9997;class A extends fairygui.Window{constructor(){super(),this.isEject=!0,this.isHide=!0,this.showbanner=!0,this.className="",this.isMuti=!1,this.showbanner=!1,this.onConstructor()}checkActive(t){}getUIName(){return A.uiName}onConstructor(){}onInit(){this.contentPane&&this.contentPane.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),this.setPivot(.5,.5,!1)}doShowAnimation(){if(!this.isEject)return;super.doShowAnimation(),Laya.Tween.clearTween(this),this.scaleX=this.scaleY=.8;(t=>{Laya.Tween.to(this,{scaleX:1.1,scaleY:1.1},100,Laya.Ease.linearIn,Laya.Handler.create(this,t))})(t=>{Laya.Tween.to(this,{scaleX:1,scaleY:1},60,Laya.Ease.linearOut,Laya.Handler.create(this,this.refresh))})}show(...t){super.show(),this._openParam=t,this.isHide=!1,Ea.uiMgr.checkUIState()}moveBannerButton(){}showBannerButton(){this.bannerButton.visible=!0,Laya.Tween.to(this.bannerButton,{alpha:1},500,Laya.Ease.linearOut,Laya.Handler.create(this,()=>{this.bannerButton.touchable=!0}))}hide(){super.hide(),this.isHide=!0,Ea.uiMgr.checkUIState()}Dispose(){super.dispose()}myUpdate(t){}refresh(){}addUIClick(t,e,i=null){t.onClick(this,e,i),t.onClick(this,this.playBtnSound)}offUIClick(t,e){t.offClick(this,e)}playBtnSound(){Ea.soundMgr.playSound(Ea.common.btnClickStr)}}A.lastShowBanner=0,A.showBannerNum=0,A.uiName="";class E extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIDraw")}onConstruct(){this.n1=this.getChild("n1"),this.extraNode=this.getChild("extraNode"),this.myNode=this.getChild("myNode"),this.closeNode=this.getChild("closeNode"),this.moneyNode=this.getChild("moneyNode"),this.n38=this.getChild("n38"),this.secretary=this.getChild("secretary"),this.drawBtn=this.getChild("drawBtn"),this.talkNode=this.getChild("talkNode"),this.t0=this.getTransition("t0")}}E.URL="ui://isxx5ak7wcn5v4ke";class G extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIBox")}onConstruct(){this.n0=this.getChild("n0"),this.n12=this.getChild("n12"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.bar=this.getChild("bar"),this.closeBtn=this.getChild("closeBtn"),this.openBtn=this.getChild("openBtn"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}G.URL="ui://isxx5ak7erstv4nm";class F{constructor(){}registerMethod(t,e){console.log("zh: 注册全局方法",t),this[t]=e}callMethod(t,...e){if(console.log("zh: 调用全局方法",t),this[t])return this[t](...e);console.error(`zh: 全局方法 Method ${t} not found`)}}F.instance=new F;class H{constructor(){}static get instance(){return this._instance||(this._instance=new H),this._instance}initBridge(){if(!Laya.Browser.onAndroid)return void console.log("zh:非android dev");let t=window.conchConfig;return!!t&&("Conch-android"==t.getOS()&&(this.bridge=window.PlatformClass.createClass("demo.JSBridge"),!!this.bridge))}testAd1(){if(!Laya.Browser.onAndroid)return void console.log("zh:非android dev");if(!this.initBridge())return;let t=this.bridge.call("testString","hello");console.log("zh:testString rs="+t)}testAdCallBack(){if(!this.initBridge())return;console.log("zh:testAdCallBack start");this.bridge.callWithBack(t=>{JSON.parse(t);console.log(`zh:testAsyncCallback js收到java返回值=${t}`)},"testAsyncCallback",JSON.stringify({code:300,msg:"hello java ui"}))}showInternAd(t){if(console.log("zh:showInternAd start"),!Laya.Browser.onAndroid)return console.log("zh:showInternAd 非android dev"),!1;if(!this.initBridge())return!1;let e=this.bridge.call("showInternAd",t);try{const t=JSON.parse(e);return 200===t.code?(console.log("zh:showInternAd OK"),!0):(console.warn("zh:showInternAd FAILL:",t.msg),!1)}catch(t){return console.error("zh:解析桥接返回值失败:",t),!1}}exitAndCloseGame(){Laya.Browser.onAndroid&&this.initBridge()&&(console.log("zh:开始关闭游戏-"),this.bridge.call("exitAndCloseGame"))}showRewardAd(t){if(!Laya.Browser.onAndroid)return!1;if(!this.initBridge())return!1;let e=this.bridge.call("showRewardAd",t);console.log("zh:showRewardAd rs= "+e+" ,mark="+t);try{const t=JSON.parse(e);return 200===t.code?(console.log("zh:广告显示成功"),!0):(console.warn("zh:广告显示失败:",t.msg),!1)}catch(t){return console.error("zh:解析桥接返回值失败:",t),!1}}logEventForAdNoParams(t){console.log("zh:logEventForAdNoParams eventName1="+t),Laya.Browser.onAndroid&&this.initBridge()&&(console.log("zh:call logEventForAdNoParams eventName2="+t),this.bridge.call("logEventForAdNoParams",t))}logEventForAdHaveParams(t,e){console.log("zh:ts logEventForAdHaveParams eventName1="+t),Laya.Browser.onAndroid&&this.initBridge()&&(console.log("zh:call logEventForAdHaveParams eventName2="+t),console.log("zh:logEventForAdHaveParams req = json="+e),this.bridge.call("logEventForAdHaveParams",t,e))}logEventForFirebase(t,e){console.log("zh:ts logEventForFirebase eventName1="+t),Laya.Browser.onAndroid&&this.initBridge()&&(console.log("zh:call logEventForFirebase eventName2="+t),console.log("zh:logEventForFirebase req = json="+e),this.bridge.call("logEventForFirebase",t,e))}testNetTip(){if(Laya.Browser.onAndroid){this.getNetworkAvailable();this.showToast2("Network error, reward unavailable")}else;}getNetworkAvailable(){if(!Laya.Browser.onAndroid)return;if(!this.initBridge())return;let t=this.bridge.call("getNetworkAvailable");return console.log("zh:getNetworkAvailable boo="+t),t}showToast2(t){Laya.Browser.onAndroid&&this.initBridge()&&this.bridge.call("showToast2",t)}nativeCallJs(t){console.log("zh:nativeCallJs received data: 1111",t),"Ad1"===t?(F.instance.callMethod("Ad1"),console.log("zh: Ad1 奖励发送成功")):"Ad2"===t?(F.instance.callMethod("Ad2"),console.log("zh: Ad2 奖励发送成功")):"Ad3"===t?(F.instance.callMethod("Ad3"),console.log("zh: Ad3 奖励发送成功")):"Ad4"===t?(F.instance.callMethod("Ad4"),console.log("zh: Ad4 奖励发送成功")):"Ad5"===t&&(console.log("zh: Ad5 奖励发送成功"),F.instance.callMethod("Ad5"))}}class z extends A{constructor(){super(),this.boxNum=0,this.boxMax=10,this.inAd=!1,this.isClose=!1}onConstructor(){this.ui=G.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.onCloseBox),this.addUIClick(this.ui.openBtn,this.onOpenBox),Laya.timer.loop(1e3,this,this.update)}update(){this.boxNum>0&&this.boxNum<this.boxMax&&(this.boxNum-=1,this.upBar())}upBar(){this.boxNum>this.boxMax&&(this.boxNum=this.boxMax),this.ui.bar.value=10*this.boxNum}show(){super.show(),this.isClose=!1,this.boxNum=0,this.inAd=!1,this.upBar(),this.ui.t0.play(),this.ui.closeBtn.visible=!1,Laya.timer.once(3e3,this,()=>{this.ui.closeBtn.visible=!0,this.ui.bar.alpha=1}),Laya.timer.once(500,this,()=>{this.ui.t1.play()})}hide(){Laya.timer.clearAll(this),Moyu.showBannerAd(!1),super.hide()}onOpenBox(){if(this.boxNum++,this.boxNum<this.boxMax)Y.getRand()<Y.boxInsertRate&&H.instance.showInternAd("uivideoshare_show");else if(this.boxNum==this.boxMax)Y.getRand()<Y.boxVideoRate?(this.ui.openBtn.c1.selectedIndex=13,this.inAd=!0):this.getAward();else if(this.inAd){if(console.log("zh:qjff_AD_for_UIBOX_onOpenBox"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIBOX_onOpenBox")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIBOX_onOpenBox())}this.upBar()}qjff_AD_for_UIBOX_onOpenBox(){this.getAward()}onCloseBox(){this.isClose?this.hide():Y.getRand()<Y.boxBannerRate?(this.isClose=!0,Y.showBanner(!0,0,3e3)):this.hide()}getAward(){let t="";if(Math.random()<.5){let e=Moyu.isLegal?500:2500,i=Ea.tools.random(e,500+e);Wa.setCoin(i),t="金币x"+i}else{let e=Moyu.isLegal?10:30,i=Ea.tools.random(e,30+e);Wa.setDiamond(i),t="钻石x"+i}Ea.showTip("恭喜获得-"+t),this.hide()}}z.uiName="UIBox";class V extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITry")}onConstruct(){this.n11=this.getChild("n11"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}V.URL="ui://isxx5ak7cj92v4o4";class W extends A{constructor(){super(),this.closeTime=0,this.closeNum=0,this.skillUrl=Ea.common.skillIconList}onConstructor(){this.ui=V.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.myNode.cancelBtn,this.onCancel),this.addUIClick(this.ui.myNode.videoBtn,this.onTry)}show(){super.show(),this.closeNum=0,this.closeTime=15,this.ui.t0.play(),Y.showRateBanner(),this.ui.myNode.txtTime.text=this.closeTime.toString(),Laya.timer.loop(1e3,this,this.updateTime);let t=this.skillUrl[Ea.common.curPlayerSkillType];this.ui.myNode.n29.skillicon.url=Ea.common.getGameIconUrl(t),Ea.common.gameMgr.gamePause=!0}updateTime(){this.closeTime>1?(this.closeTime--,this.ui.myNode.txtTime.text=this.closeTime.toString()):this.hide()}hide(){Laya.timer.clearAll(this),Moyu.showBannerAd(!1),super.hide(),Ea.common.gameMgr.gamePause=!1}onTry(){if(console.log("zh:qjff_AD_for_uitry"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uitry")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uitry())}qjff_AD_for_uitry(){let t=Ea.common.curPlayerSkillType;Wa.gameData.trySkill=t,Wa.gameData.tryTime=Laya.timer.currTimer+3e5,Wa.saveGameData(),Wa.setBigSkill(t,1),Ea.showTip("Trial Successful"),this.hide()}onCancel(){if(this.closeNum>0)return this.closeNum--,void(this.closeNum<2&&this.hide());Y.getRand()<Y.tryVideoRate?this.onTry():Y.getRand()<Y.tryClose3Rate?this.closeNum=3:this.hide()}}W.uiName="UITry";class Y{static initConfig(){if(this.lastVt=0,Moyu.platConfig){for(let t in Moyu.platConfig){let e=this[t],i=Moyu.platConfig[t];null!=e&&null!=i&&(this[t]=i)}Moyu.setBannerPos(.5,1)}}static rand100(t){return Ea.tools.random(0,100)<t}static isMisVideo(){return Laya.timer.currTimer-this.lastVt>this.forceVideoGap&&this.rand100(this.forceVideoRate)?(this.lastVt=Laya.timer.currTimer,!0):(this.rand100(this.fullVideoRate)&&(console.log("zh:插屏 ad start"),H.instance.showInternAd("platMgr")),!1)}static showVideo(t,e){Moyu.showVideoAd(()=>{this.lastVt=Laya.timer.currTimer,t&&t()},e)}static showInsert(t=!1){if(this.getRand()<this.insertRate){t&&this.insertDelay;console.log("zh:插屏 ad start"),H.instance.showInternAd("gameInsert")}}static gameInsert(){let t=this.getRand(),e=this.gameInsertRate;t<e&&console.log("zh:插屏 ad start 游戏中每回合开始插屏 t: %d, r: %d",t,e)}static showRateBanner(){this.getRand()<this.bannerRate&&this.showBanner(!0,this.bannerDelay,3e3)}static showBanner(t,e=0,i=0){console.log("zh:显示showBanner广告 直接返回")}static bannerShow(t){console.log("zh:显示showBanner广告 直接返回")}static getRand(){return Ea.tools.random(0,100)}static openBox(){this.getRand()<this.boxRate&&Ea.uiMgr.Show(z)}static openTry(){Laya.timer.currTimer<Wa.gameData.tryTime||(this.getRand()<this.tryRate?Ea.uiMgr.Show(W):1==Wa.gameData.gameCount&&Ea.uiMgr.Show(W))}}Y.forceShare=0,Y.signAdRate=0,Y.forceVideoRate=0,Y.forceVideoGap=0,Y.fullVideoRate=0,Y.gameInsertRate=0,Y.insertGap=0,Y.insertDelay=0,Y.insertRate=0,Y.boxRate=0,Y.boxVideoRate=0,Y.boxInsertRate=0,Y.boxBannerRate=0,Y.tryRate=0,Y.tryClose3Rate=0,Y.tryVideoRate=0,Y.bannerRate=0,Y.lastVt=0;class X extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIAddProp")}onConstruct(){this.n11=this.getChild("n11"),this.myNode=this.getChild("myNode"),this.closeBtn=this.getChild("closeBtn"),this.t0=this.getTransition("t0")}}X.URL="ui://isxx5ak7p4tr42k";class q{constructor(t,e=null){this.loaded=!1,this.spineName="",this.loadedCallback=e,this.templet=new Laya.Templet,this.templet.on(Laya.Event.COMPLETE,this,this.parseComplete),this.templet.on(Laya.Event.ERROR,this,this.onError),"mishu"===t?this.templet.loadAni("spine/nvmishu.sk"):this.templet.loadAni(`spine/${t}.sk`),this.templet.lock=!0,this.spineName=t}onError(){console.log("zh:spine加载出错")}parseComplete(){this.loaded=!0,this.loadedCallback&&this.loadedCallback()}dispose(){this.templet&&!this.templet.destroyed&&this.templet.destroy(),this.templet=null}play(t,e,i=!0,s,o,n=null){if(!this.loaded)return;let a;return(a=n||this.createSpine(t,s)).play(e,i,!0,0,0,!0),i||a.on(Laya.Event.STOPPED,this,()=>{a.offAll(Laya.Event.STOPPED),o&&o(a)}),a}createSpine(t,e,i=1){let s;return(s=this.templet.buildArmature(i)).showSkinByIndex(0),e.addChild(s),s.pos(t.x,t.y),s.scale(t.scaleX,t.scaleY,!0),s}}!function(t){t[t.none=0]="none",t[t.idle=1]="idle",t[t.reset=2]="reset",t[t.move=3]="move",t[t.wait=4]="wait",t[t.select=5]="select",t[t.turn=6]="turn",t[t.shoot=7]="shoot",t[t.leave=8]="leave"}(D||(D={}));class J{constructor(){this.dtime=30,this.awayTime=0,this.awayNum=0,this.hideTime=0,this.rootMoveTime=0,this.isGuide=!1,this.state=D.none,this.waitTime=0,this.forceNum=0,this.forceMax=0,this.ballSize=33,this.selectNum=0,this.destRot=0,this.aiLv=10,this.kickBall=[],this.lineBall=[],this.scoreBall=[],this.holeBall=[],this.turnNum=0,this.setNum=0,this.setMax=0,this.setRate=0,this.rectL=0,this.rectR=0,this.rectT=0,this.rectB=0,this.rootPos={x:0,y:0},this.bestForce=0,this.bestAngle=180,this.bestPos={x:0,y:0},this.bestKick={x:0,y:0},this.posList=[],this.posIdx=0,this.chatTime=3e3,this.tempDir1=new Laya.Vector2,this.tempDir2=new Laya.Vector2,this.tempDir3=new Laya.Vector2,Laya.timer.loop(this.dtime,this,this.onUpdate),Ea.eventMgr.off(r,this,this.resetAI),Ea.eventMgr.on(r,this,this.resetAI),this.gameSrc=Ea.common.gameUI,this.hideTime=Laya.timer.currTimer,Moyu.setOnTipCall(t=>{20012==t&&(this.hideTime=Laya.timer.currTimer);{let t=Laya.timer.currTimer-this.hideTime;console.log("onshow"+t),t>3e4&&this.state>D.none&&Ea.common.gameMgr.aiGameEnd(!1)}},this)}init(){this.isGuide=Wa.getSkillGuide()<1||Wa.gameData.gameCount<1,this.awayTime=Ea.tools.random(5e3,1e4),this.awayNum=0,this.hideTime=Laya.timer.currTimer;let t=Ea.common.d2World.borderRect;if(this.rectL=Math.ceil(t.x)+17,this.rectT=Math.ceil(t.y)+17,this.rectR=Math.floor(t.x+t.width)-17,this.rectB=Math.floor(t.y+t.height)-17,this.wBall=Ea.common.d2World.rootBall,this.ballSize=this.wBall.gameObj.width-1,this.posList.length<1){let t=40;for(let e=this.rectL;e<this.rectR+t;e+=t)for(let i=this.rectT;i<this.rectB+t;i+=t){let t=e<this.rectR?e:this.rectR,s=i<this.rectB?i:this.rectB,o=Ea.tools.random(0,1e3);this.posList.push({x:t,y:s,order:o})}this.posList.sort(function(t,e){return t.order-e.order}),this.setMax=this.posList.length}this.state=D.idle}setAiLevel(t){this.aiLv=t}initBall(){this.rootPos.x=this.wBall.gameObj.x,this.rootPos.y=this.wBall.gameObj.y,this.initHoleBall()}initHoleBall(){this.kickBall=[],this.lineBall=[],this.scoreBall=[],this.holeBall=[],this.selectNum=0,this.forceNum=0,this.forceMax=0,this.turnNum=0;let t=Ea.common.d2World.ballArr;if(t.length<20&&!this.isGuide){let e=Ea.common.gameMgr.holePosList;for(let i=0;i<t.length;i++){let s=t[i];if(!s)continue;if(s.kickPos.x=0,s.kickPos.y=0,s.poleAngle=0,s.hard=0,s.borderDis=0,s.kickAngle=180,0==s.number)continue;if(s.ballType==Ea.common.gameMgr.selfCamp)continue;if(8==s.number&&0==Ea.common.gameMode&&(Ea.common.gameMgr.aiBallArr.length>0||!Ea.common.gameMgr.ensureBallType))continue;let o=s.gameObj,n=this.rootPos,a=n.x-o.x,h=n.y-o.y;if(s.borderDis=Ea.tools.random(0,100),this.kickBall.push(s),!this.isLine(n,s))continue;s.kickAngle=Ea.tools.random(90,180),s.kickPos.x=o.x,s.kickPos.y=o.y,this.lineBall.push(s);let l=999999,r=!1;for(let t=0;t<e.length;t++){let i=e[t];if(!(a>=0&&i.x>o.x+100)&&!(a<=0&&i.x<o.x-100||h<-10&&i.y<n.y||h>10&&i.y>n.y||this.isBlock(s.number,o.x,o.y,i.x,i.y))){let t=Ea.tools.getDeltaxy(o.x,o.y,i.x,i.y);if(t<l){let e=o.x-this.tempDir1.x*this.ballSize,a=o.y-this.tempDir1.y*this.ballSize;if(this.tempDir3.x=this.tempDir1.x,this.tempDir3.y=this.tempDir1.y,!this.isBlock(this.wBall.number,n.x,n.y,e,a,s.number)){s.kickPos.x=e,s.kickPos.y=a;let n=Laya.Vector2.dot(this.tempDir1,this.tempDir3);n>1&&(n=1),s.kickAngle=57.3*Math.acos(n),(o.x<this.rectL+2||o.x>this.rectR-2||o.y<this.rectT+2||o.y>this.rectB-2)&&(t*=2),Math.abs(i.x-600)<100&&(t+=50),s.hard=t+3*s.kickAngle,r=!0}}}}r&&(this.scoreBall.push(s),this.holeBall.push(s))}this.scoreBall.sort(function(t,e){return t.hard-e.hard}),this.holeBall.sort(function(t,e){return t.kickAngle-e.kickAngle}),this.kickBall.sort(function(t,e){return t.borderDis-e.borderDis})}else{let e=t.length-1,i=Ea.tools.random(0,e);for(;i<=e;i++){let s=t[i>=e?i-=e:i];if(s&&0!=s.number){s.kickAngle=Ea.tools.random(90,180),s.kickPos.x=s.gameObj.x+Ea.tools.random(-10,10),s.kickPos.y=s.gameObj.y+Ea.tools.random(-10,10),this.lineBall.push(s);break}}}}selectBall(){let t=null;this.destRot=0;let e=this.isGuide?1:3-Math.ceil(this.aiLv/4)+Ea.tools.random(0,2),i=110-10*this.aiLv,s=.005*Ea.tools.random(-i,i),o=!1;if(this.scoreBall.length<1)if(this.lineBall.length<1)for(let t=0;t<this.kickBall.length;t++){let e=[],i=this.kickBall[t],o=i.gameObj,n=Ea.common.d2World.borderRect,a=this.wBall.gameObj,h=o.y-n.y-20,l=a.y-n.y-50;if(h>0&&l>0){let t=0,i=a.y-n.y,s=a.x,o=n.y-i;e.push({order:h,bx:0,by:n.y,spx:s,spy:o,dlenx:t,dleny:i})}if(h=n.y+n.height-o.y-20,l=n.y+n.height-a.y-50,h>0&&l>0){let t=0,i=n.y+n.height-a.y,s=a.x,o=n.y+n.height+i;e.push({order:h,bx:0,by:n.y+n.height,spx:s,spy:o,dlenx:t,dleny:i})}if(h=o.x-n.x-20,l=a.x-n.x-50,h>0&&l>0){let t=a.x-n.x,i=0,s=n.x-t,o=a.y;e.push({order:h,bx:n.x,by:0,spx:s,spy:o,dlenx:t,dleny:i})}if(h=n.x+n.width-o.x-20,l=n.x+n.width-a.x-50,h>0&&l>0){let t=n.x+n.width-a.x,i=0,s=n.x+n.width+t,o=a.y;e.push({order:h,bx:n.x+n.width,by:0,spx:s,spy:o,dlenx:t,dleny:i})}e.sort(function(t,e){return t.order-e.order});for(let t=0;t<e.length;t++){let n=e[t],h=a.x-o.x,l=a.y-o.y;Ea.tools.getV2Dir(n.spx,n.spy,o.x,o.y,this.tempDir1),Ea.tools.getV2Dir(n.spx,n.spy,a.x,a.y,this.tempDir2);let r=Laya.Vector2.dot(this.tempDir1,this.tempDir2);r>1&&(r=1);let c=Math.acos(r);c>1.57?c=1.57:c<.01&&(c=.01);let d=Math.tan(c),u=d*n.dleny,g=d*n.dlenx,m=n.bx>0?n.bx:a.x+(h>0?-u:u);if(Math.abs(m-667)<40)continue;let y=n.by>0?n.by:a.y+(l>0?-g:g);if(!this.isBlock(0,a.x,a.y,m,y)&&!this.isBlock(i.number,o.x,o.y,m,y)){let t=Math.abs(n.dlenx)+Math.abs(n.dleny)+Ea.tools.getDistance(m,y,i.gameObj.x,i.gameObj.y);return this.forceMax=.08*t,this.destRot+=.1*s,this.setKick(m,y),!0}}}else t=Ea.common.getRandArrEle(this.lineBall);else{for(let e=0;e<this.scoreBall.length;e++){if(!(e<this.scoreBall.length-1)){t=this.scoreBall[e];break}{let i=70+10*this.aiLv+10*e;if(Ea.tools.random(0,100)<i){t=this.scoreBall[e];break}}}o=!0,this.selectNum++}if(t||(t=Ea.common.getRandArrEle(Ea.common.d2World.ballArr)),this.selectNum>=e){let e=t.gameObj.x,i=t.gameObj.y,n=0;if(o){e=t.kickPos.x,i=t.kickPos.y,this.tempDir2=Ea.tools.getV2Dir(this.wBall.gameObj.x,this.wBall.gameObj.y,e,i,this.tempDir2),this.tempDir3=Ea.tools.getV2Dir(e,i,t.gameObj.x,t.gameObj.y,this.tempDir3);let o=Laya.Vector2.dot(this.tempDir3,this.tempDir2);if(o>1&&(o=1),(n=57.3*Math.acos(o))>45){let o=t.kickPos.x-t.gameObj.x,n=t.kickPos.y-t.gameObj.y;e=t.kickPos.x-o*s*.3,i=t.kickPos.y-n*s*.3}else this.destRot+=s}else 0!=t.poleAngle&&(this.destRot+=t.poleAngle);if(0==Ea.common.gameMode){let e=.08*n;this.forceMax=.1*t.hard+e*e}this.setKick(e,i)}else{let i=5*this.aiLv+40;t=Ea.tools.random(0,100)<i&&this.scoreBall.length>0?Ea.common.getRandArrEle(this.scoreBall):Ea.common.getRandArrEle(Ea.common.d2World.ballArr),i=3*this.aiLv+40+20*this.selectNum,Ea.tools.random(0,100)>i&&(this.selectNum=e),this.setState(D.select,Ea.tools.random(500,1e3)),this.selectNum++}t.onClick(0,!0)}isBlock(t,e,i,s,o,n=-1){this.tempDir1=Ea.tools.getV2Dir(e,i,s,o,this.tempDir1);let a=Ea.common.d2World.ballArr,h=Ea.tools.getDis(s,o,e,i);for(let s=0;s<a.length;s++){let o=a[s];if(0==o.number)continue;if(o.number==t||o.number==n)continue;let l=Ea.tools.getDistance(o.gameObj.x,o.gameObj.y,e,i);if(l*l>h)continue;this.tempDir2=Ea.tools.getV2Dir(e,i,o.gameObj.x,o.gameObj.y,this.tempDir2);let r=Laya.Vector2.dot(this.tempDir1,this.tempDir2);if((r>1&&(r=1),!(r<0))&&Math.sin(Math.acos(r))*l<this.ballSize)return!0}return!1}isLine(t,e){let i=t.x,s=t.y;if(this.isBlock(0,i,s,e.gameObj.x,e.gameObj.y,e.number)){let o=e.getDestDis(t),n=Math.asin((e.gameObj.width-3)/o),a=Math.sin(n),h=Math.cos(n);this.tempDir3=Ea.tools.getV2Dir(i,s,e.gameObj.x,e.gameObj.y,this.tempDir3),this.tempDir2.x=this.tempDir3.x*h-this.tempDir3.y*a,this.tempDir2.y=this.tempDir3.x*a+this.tempDir3.y*h;let l=i+this.tempDir2.x*o,r=s+this.tempDir2.y*o,c=this.isBlock(0,i,s,l,r,e.number);a=Math.sin(-n),h=Math.cos(-n),this.tempDir2.x=this.tempDir3.x*h-this.tempDir3.y*a,this.tempDir2.y=this.tempDir3.x*a+this.tempDir3.y*h,l=i+this.tempDir2.x*o,r=s+this.tempDir2.y*o;let d=this.isBlock(0,i,s,l,r,e.number);if(c&&d)return!1;e.poleAngle=c?57.3*-n:57.3*n}return!0}turnPole(){this.turnNum++;let t=Ea.common.d2World.d2Gan.ui.rotation%360,e=t-this.destRot,i=Math.abs(e)%360;i>180&&(t>180&&(t-=360),this.destRot>180&&(this.destRot-=360));let s=5*this.turnNum+5*this.aiLv;if(i<.2&&Ea.tools.random(0,100)<s){Ea.common.d2World.d2Gan.rotDest(this.destRot);let t=Ea.tools.random(1e3,2e3);this.onAway(3)||(t+=Ea.tools.random(1e4,15e3)),this.setState(D.shoot,t)}else{let s=0;i>3?s=1+Ea.tools.random(2,6)*i*.01:Math.random()>.6&&(s=.1*Ea.tools.random(1,10)),s=e>0?-s:s,Ea.common.d2World.d2Gan.rotDest(t+s)}}setKick(t,e){this.forceMax+=.1*this.wBall.getDestDis({x:t,y:e}),this.tempDir2=Ea.tools.getV2Dir(this.wBall.gameObj.x,this.wBall.gameObj.y,t,e,this.tempDir2),this.tempDir1.x=0,this.tempDir1.y=1,this.tempDir2.y=-this.tempDir2.y;let i=Laya.Vector2.dot(this.tempDir1,this.tempDir2);i>1&&(i=1);let s=57.3*Math.acos(i);this.tempDir2.x<0&&(s=360-s),this.destRot+=s,Ea.common.gameMgr.finishOneShoot||(this.forceMax+=Ea.tools.random(10,50),this.forceMax-=2*this.aiLv,this.forceMax<20&&(this.forceMax=20)),this.forceMax>100?this.forceMax=101:this.forceMax<10&&(this.forceMax+=Ea.tools.random(0,10)),1==Ea.common.gameMode?this.forceMax=Ea.tools.random(80,100):this.forceMax=Ea.tools.random(.5*this.forceMax,this.forceMax);let o=2e3-100*this.aiLv;Math.random()>.8&&(o+=Ea.tools.random(100,2e3)),this.setState(D.turn,Ea.tools.random(500,o))}shoot(){if(this.waitTime<0&&Math.abs(this.forceNum-this.forceMax)<4)Math.random()>.8&&(this.gameSrc.aiForce(1),this.setState(D.wait));else{let t=Ea.tools.random(3,8);this.forceNum<this.forceMax?this.forceNum+=t:this.forceNum-=t;let e=this.gameSrc.ui.powerNode.y+this.gameSrc.ui.powerNode.height*this.forceNum*.01;this.gameSrc.aiForce(2,e)}}reset(){for(let t=0;t<4;t++){this.setRate--,this.setNum++;let t=this.posList[this.posIdx];this.rootPos.x=t.x+Ea.tools.random(-20,20),this.rootPos.y=t.y+Ea.tools.random(-20,20),!Ea.common.gameMgr.isTouchedBall&&this.rootPos.x>387&&(this.rootPos.x=387),this.rootPos.x<this.rectL?this.rootPos.x=this.rectL:this.rootPos.x>this.rectR&&(this.rootPos.x=this.rectR),this.rootPos.y<this.rectT?this.rootPos.y=this.rectT:this.rootPos.y>this.rectB&&(this.rootPos.y=this.rectB),this.posIdx++;let e=this.posList.length;this.posIdx>=e&&(this.posIdx-=e),this.initHoleBall();let i=null;this.scoreBall.length>0?i=this.scoreBall[0]:this.lineBall.length>0&&(i=Ea.common.getRandArrEle(this.lineBall)),i&&i.kickAngle<this.bestAngle&&(this.bestAngle=i.kickAngle,this.bestKick.x=i.kickPos.x,this.bestKick.y=i.kickPos.y,this.bestPos.x=this.rootPos.x,this.bestPos.y=this.rootPos.y,this.bestForce=.08*i.hard)}this.setNum>=this.setMax&&(this.setMax=0),this.setRate<1&&(this.setState(D.move,0),this.rootMoveTime=Laya.timer.currTimer,this.gameSrc.aiRootMove(!0))}delayLine(){this.gameSrc.aiRootMove(!1)}move(){this.bestPos.x<1&&(this.bestPos=this.rootPos);let t=this.wBall.gameObj,e=t.x,i=t.y,s=Math.abs(e-this.bestPos.x),o=Math.abs(i-this.bestPos.y),n=3+.03*s,a=3+.03*o;if(s<4&&o<4){let t=Laya.timer.currTimer-this.rootMoveTime;if(t=t<1e3?1e3-t:0,this.setMax>0){let t=.3*this.setMax+5*this.aiLv;this.setRate=Ea.tools.random(t,this.setMax),this.setState(D.reset,0)}else this.destRot=0,this.forceMax=this.bestForce,this.setKick(this.bestKick.x,this.bestKick.y);t>100?(Laya.timer.clear(this,this.delayLine),Laya.timer.once(t,this,this.delayLine)):this.gameSrc.aiRootMove(!1)}else s>4&&(e=t.x<this.bestPos.x?t.x+n:t.x-n),o>4&&(i=t.y<this.bestPos.y?t.y+a:t.y-a),this.gameSrc.onRootMove({x:e,y:i})}resetRoot(){this.bestAngle=180,this.bestForce=0,this.setMax=this.posList.length,this.posIdx=Ea.tools.random(0,this.setMax);let t=.3*this.setMax+5*this.aiLv;this.setRate=Ea.tools.random(t,this.setMax);let e=2e3-100*this.aiLv;Math.random()>.8&&(e+=Ea.tools.random(100,1e3)),this.isGuide?this.setState(D.select,500):this.onAway(2)?this.setState(D.reset,Ea.tools.random(400,e)):this.setState(D.none),Ea.common.gameMgr.finishOneShoot&&this.chat()}runAI(){this.state>D.idle||(this.initBall(),this.onGame(2500),Math.random()>.6&&this.chat())}stopRun(){this.setState(D.idle)}onGame(t){let e=t-100*this.aiLv;Math.random()>.8&&(e+=Ea.tools.random(100,1e3)),this.onAway(2)?this.setState(D.select,Ea.tools.random(500,e)):this.setState(D.none)}setState(t,e=0){this.state!=D.none&&(this.state=t,this.waitTime=e)}onUpdate(){if(this.state!=D.none)if(this.awayTime-=this.dtime,this.awayTime<1&&(this.awayTime=Ea.tools.random(6e3,1e4),this.awayNum+=11-this.aiLv,this.onAway(1)),this.waitTime>=0)this.waitTime-=this.dtime;else switch(this.state){case D.idle:this.chat();break;case D.reset:this.reset();break;case D.move:this.move();break;case D.leave:this.state=D.none,Ea.common.gameMgr.aiGameEnd(!0);break;case D.select:this.selectBall();break;case D.turn:this.turnPole();break;case D.shoot:this.shoot()}}onAway(t){if(1==t){let t=Ea.common.gameMgr.aiBallArr.length-Ea.common.gameMgr.selfBallArr.length,e=this.awayNum+20*t;t>0&&e>0&&Ea.tools.random(0,1e4)<e&&this.state==D.idle&&(Ea.common.gameMgr.aiLeave(),this.setState(D.leave,6666))}else if(2==t){let t=Ea.common.gameMgr.aiBallArr.length-Ea.common.gameMgr.selfBallArr.length,e=this.awayNum+30*t;if(Ea.tools.random(0,1e4)<e)return!1}else if(3==t){let t=Ea.common.gameMgr.aiBallArr.length-Ea.common.gameMgr.selfBallArr.length,e=this.awayNum+10*t;if(Ea.tools.random(0,4e3)<e)return!1}return!0}chat(){if(this.chatTime>0)return void(this.chatTime-=this.dtime);this.chatTime=Ea.tools.random(2e3,1e4);let t=Ea.tools.random(0,100);t<15?this.talk():t<35&&this.emotion()}talk(){Ea.common.talkMgr.showAITalk(0)}emotion(){Ea.common.talkMgr.showAIEmotion(0)}resetAI(){this.stopRun(),this.state=D.none}}class K extends Laya.Script3D{constructor(){super(),this.duration=2e3}onAwake(){this.gameObj=this.owner}onEnable(){this.openTimer()}openTimer(){Laya.timer.once(this.duration,this,this.disappear)}setCallback(t,e){this.obj=t,this.callback=e,Laya.timer.clearAll(this),Laya.timer.once(this.duration,this,this.disappear)}disappear(){Ea.poolD3Mgr.putItem(this.gameObj.name,this.gameObj),this.callback&&this.callback(this.obj)}}class Z extends Laya.Script3D{constructor(){super(),this.posV3=new Laya.Vector3,this.rotRate=2.1,this.rotSpeed=new Laya.Vector3,this.myIndex=0}onAwake(){this.gameObj=this.owner,this.transform=this.gameObj.transform,this.ballNode=this.gameObj.getChildByName("Ball"),this.shadowNode=this.gameObj.getChildByName("shadow")}initSelf(t,e,i,s){this.d2BallSrc=s,this.myIndex=t,this.setAlbedoTexture(),this.setTransPos(e,i),this.setScale(),this.ballNode.transform.localRotationEulerX=90}setAlbedoTexture(t=!1){let e;e=t?"res/d3Res/ballTexture/ice.jpg":`res/d3Res/ballTexture/ball${this.myIndex}.png`,Laya.Texture2D.load(e,Laya.Handler.create(this,t=>{this.ballNode.meshRenderer.material.albedoTexture=t}))}runFireworks(t,e,i){Laya.timer.clearAll(this),Laya.timer.once(e+1,this,()=>{let e=Ea.poolD3Mgr.getItem(x.fireworksEft);e.transform.localPositionX=this.transform.localPositionX,e.transform.localPositionY=this.transform.localPositionY,e.transform.localPositionZ=this.transform.localPositionZ;let s=e.getComponent(K);s.duration=1e3,s.setCallback(t,i);let o=Ea.poolD3Mgr.getItem(x.hitEft);o.transform.localPositionX=this.transform.localPositionX,o.transform.localPositionY=this.transform.localPositionY,o.transform.localPositionZ=this.transform.localPositionZ})}setTransPos(t,e){this.setRotation(),Ea.common.pos2to3Convert(t,e,this.posV3),this.transform.localPositionX=this.posV3.x,this.transform.localPositionY=0,this.transform.localPositionZ=this.posV3.z,this.transform.localRotationEulerX=0,this.transform.localRotationEulerY=0,this.transform.localRotationEulerZ=0,this.shadowNode.transform.localPositionX=this.posV3.x/30,this.shadowNode.transform.localPositionY=.1,this.shadowNode.transform.localPositionZ=this.posV3.z/30}setRotation(){if(this.d2BallSrc.canRot){let t=this.d2BallSrc.rigy.linearVelocity;this.rotSpeed.x=t.x*this.rotRate,this.rotSpeed.z=t.y*this.rotRate,this.rotSpeed.y=this.d2BallSrc.rotY,this.ballNode.transform.rotate(this.rotSpeed,!1,!1)}else Math.abs(this.d2BallSrc.rotY)>.1&&(this.rotSpeed.x=this.rotSpeed.y=0,this.rotSpeed.y=this.d2BallSrc.rotY,this.ballNode.transform.rotate(this.rotSpeed,!1,!1))}setScale(){let t=Ea.common.d2World.rootBall.ui.width,e=Ea.common.scale2to3Convert(t);this.transform.localScaleX=e,this.transform.localScaleY=e,this.transform.localScaleZ=e}playInHoleEft(){Ea.poolD3Mgr.getItem(x.inHoleEft).transform.position=this.transform.position}playIceEft(){Ea.poolD3Mgr.getItem(x.iceEft).transform.position=this.transform.position}get scaleXYZ(){return this.transform.localScaleX}set scaleXYZ(t){this.transform.localScaleX=t,this.transform.localScaleY=t,this.transform.localScaleZ=t}get posX(){return this.transform.localPositionX}set posX(t){this.transform.localPositionX=t}get posY(){return this.transform.localPositionY}set posY(t){this.transform.localPositionY=t}get posZ(){return this.transform.localPositionZ}set posZ(t){this.transform.localPositionZ=t}destroySelf(){this.posV3=null,this.rotSpeed=null,this.d2BallSrc=null,this.ballNode=null,this.gameObj.destroy(!0),this.transform=null,this.destroy()}}class $ extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","D2Ball")}onConstruct(){this.myIcon=this.getChild("myIcon"),this.inner=this.getChild("inner"),this.n8=this.getChild("n8"),this.n4=this.getChild("n4"),this.wrongTips=this.getChild("wrongTips"),this.rightTips=this.getChild("rightTips"),this.breathAni=this.getTransition("breathAni")}}$.URL="ui://isxx5ak7kt443qi";class Q extends Laya.Script{constructor(){super(),this.number=0,this.startX=0,this.startY=0,this.angleV2=new Laya.Vector2,this.isRootBall=!1,this.isBlackBall=!1,this.ballType="",this.canRot=!0,this.rotY=0,this.poleAngle=0,this.kickPos={x:0,y:0},this.hard=0,this.kickAngle=0,this.borderDis=0,this.speedP10=5.6,this.lastSpeed={x:0,y:0},this.stillSpeed=.12,this.ballFunc="normal",this.isRunSkillAni=!1,this.isInHole=!1,this.iceOwner="",this.forceRun=!1,this.myUNID="",this.rectL=0,this.rectR=0,this.rectT=0,this.rectB=0,this.forceVec=new Laya.Vector2,this.lastDis=0,this.helpOut={type:"",x:0,y:0}}initSelf(t,e,s,o){this.gameObj||(this.gameObj=this.owner),this.number=t,this.startX=e,this.startY=s,this.d3Ball=o,this.isRootBall=!1,this.isBlackBall=!1,this.ballType="",0==t?this.isRootBall=!0:8==t?this.isBlackBall=!0:this.ballType=t<=7?i.full:i.flower,this.setInfo(),this.setD3Ball(),this.owner.mySrc=this,this.rigy.linearDamping=1,Q._unid++,this.myUNID="d2ball"+Q._unid;let n=Ea.common.d2World.borderRect;this.rectL=Math.ceil(n.x)+20,this.rectT=Math.ceil(n.y)+20,this.rectR=Math.floor(n.x+n.width)-20,this.rectB=Math.floor(n.y+n.height)-20}setInfo(){this.gameObj.x=this.startX,this.gameObj.y=this.startY;let t=this.ui.width/2;this.gameObj.width=2*t,this.gameObj.height=2*t,Ea.common.showDebug?(this.ui.myIcon.alpha=1,this.ui.inner.alpha=1):(this.ui.myIcon.alpha=0,this.ui.inner.alpha=0)}setD3Ball(){this.d3Ball=this.d3Ball,this.d3BallSrc=this.d3Ball.getComponent(Z),this.d3BallSrc.initSelf(this.number,this.startX,this.startY,this)}onUpdate(){Ea.common.gameMgr.gamePause||this.isInHole||Ea.common.d2World.openCheckStill&&this.runBall()}runBall(){this.lastSpeed.x=this.rigy.linearVelocity.x,this.lastSpeed.y=this.rigy.linearVelocity.y,this.d3BallSrc.setTransPos(this.gameObj.x,this.gameObj.y),this.judgeBorder()}getDestDis(t){return Ea.tools.getDistance(t.x,t.y,this.gameObj.x,this.gameObj.y)}setmyXY(t,e){this.d3BallSrc.setTransPos(t,e)}getSpeed(){let t=this.rigy.linearVelocity;return t.x*t.x+t.y*t.y}onTriggerEnter(t){if(!t||!t.owner)return;let e="collide",i=this.getSpeed(),s=this.speedP10*this.speedP10;if("ball"==t.label){if(i<9&&0!=this.number?e="":i<s?e="collide_4":i<6.2*s?e="collide_3":i<25*s?e="collide_2":i<56*s&&(e="collide_1"),Ea.soundMgr.playSound(e),(this.gameObj.x<this.rectL||this.gameObj.x>this.rectR||this.gameObj.y<this.rectT||this.gameObj.y>this.rectB)&&t.owner){let e=t.owner.getComponent(Q);Math.abs(e.rigy.linearVelocity.x)>0&&(e.lastSpeed.x=e.rigy.linearVelocity.x),Math.abs(e.rigy.linearVelocity.y)>0&&(e.lastSpeed.y=e.rigy.linearVelocity.y);let i=Math.abs(.4*e.lastSpeed.x),s=Math.abs(.5*e.lastSpeed.y),o=0,n=0;this.gameObj.x<this.rectL?o=i:this.gameObj.x>this.rectR?o=-i:this.gameObj.y<this.rectT?n=s:this.gameObj.y>this.rectB&&(n=-s),this.rigy.applyLinearImpulseToCenter({x:o,y:n})}if(0!=this.number)return;this.forceRun&&(console.log("randon force"),this.applyForce(t)),Ea.common.d2World.isOnSameLine&&(Ea.common.d2World.isOnSameLine=!1,this.rigy.linearVelocity={x:0,y:0}),null==Ea.common.gameMgr.firstColliObj&&(Ea.common.gameMgr.firstColliObj=t.owner.mySrc.number,Ea.common.gameMgr.isTouchedBall=!0)}else{Ea.common.recoverCameraView();let t="";i<9||i<s||(i<6.2*s?t="wall_30":i<25*s?t="wall_50":i<56*s&&(t="wall_80")),Ea.soundMgr.playSound(t)}}applyForce(t){let e=t.owner.mySrc;this.forceVec.x=e.gameObj.x-this.gameObj.x,this.forceVec.y=e.gameObj.y-this.gameObj.y,Laya.Vector2.normalize(this.forceVec,this.forceVec),Laya.Vector2.scale(this.forceVec,50,this.forceVec),e.rigy.applyLinearImpulseToCenter({x:this.forceVec.x,y:this.forceVec.y})}checkWrongBall(t=!0){if(this.isInHole)return;Ea.common.gameMgr.inHoleBalls.push(this.number),0!=this.number&&t&&this.d3BallSrc.playInHoleEft();let e="inpocket_1",i=this.getSpeed(),s=this.speedP10*this.speedP10*.8;i<9&&0!=this.number?e="":i<6.2*s?e="inpocket_4":i<25*s?e="collide_3":i<56*s&&(e="collide_2"),Ea.soundMgr.playSound(e),this.isInHole=!0,0==this.number?(console.log("白球进了。。"),this.reset(),this.rigy.linearVelocity={x:0,y:0},this.hideSelf(),Ea.common.gameUI.ui.whiteAni.visible=!0,Ea.common.gameUI.ui.whiteAni.t0.play(Laya.Handler.create(this,()=>{Ea.common.gameUI.ui.whiteAni.visible=!1}))):(Ea.common.playClassicEmotion(this.number,this.gameObj.x,this.gameObj.y),Ea.common.d2World.removeOneBall(this),this.destroySelf(),Ea.common.playHappySound(this.number),this.runFlyEft())}runFlyEft(){Ea.common.gameMode==C.placeBall&&Ea.common.gameMgr.placeBallData.type==w.challenge&&Ea.common.playAwardSpine(this.gameObj.x+100,this.gameObj.y-100)}hideSelf(){this.d3Ball&&(this.d3Ball.active=!1)}showSelf(){this.isInHole=!1,this.d3Ball&&!this.d3Ball.active&&(this.d3Ball.active=!0)}isStill(){let t=this.rigy.linearVelocity;return Math.abs(t.x)<=this.stillSpeed&&Math.abs(t.y)<=this.stillSpeed&&(this.rigy.linearVelocity={x:0,y:0},!0)}reset(){}destroySelf(){this.d3BallSrc.destroySelf(),this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose(),this.ui=null),this.outColli=null,this.innerColli=null,this.rigy=null,this.d3Ball=null,this.d3BallSrc=null,this.angleV2=null,this.gameObj.destroy(!0),this.destroy()}judgeBorder(){if(this.forceRun&&this.owner==Ea.common.d2World.rootBall.owner)return;if(this.destroyed)return;if(Ea.common.gameMode==C.classic)return;Ea.common.checkBallOverBorder(this.gameObj.x,this.gameObj.y)&&this.checkWrongBall()}onClick(t,e=!1){if(0==this.number)return;if(e);else{if(Ea.common.d2World.openCheckStill)return;if(!Ea.common.gameMgr.selfTurn)return}if(!Ea.common.gameMgr.finishOneShoot)return;let i=Ea.common.d2World.rootBall.gameObj,s=this.gameObj.x-i.x,o=this.gameObj.y-i.y,n=Ea.common.getfguiRotation(s,o);Ea.common.d2World.d2Gan.ui.rotation=n,Ea.common.d2World.getHelpLine(),Ea.common.clickedBall=!0,this.checkGuide()}checkGuide(){0==Wa.getSkillGuide()&&Ea.common.gameMode==C.bigMove&&0==Ea.common.guideStep&&(Ea.common.guideStep++,Ea.common.gameUI.ui.guide1.visible=!1,Ea.common.gameUI.ui.guide2.visible=!0)}checkDistance(t,e,i){let s=this.gameObj.width-1,o=Math.pow(t-this.gameObj.x,2)+Math.pow(e-this.gameObj.y,2);if(this.lastDis){if(o>this.lastDis)return this.helpOut.type="remove",this.helpOut}else this.lastDis=o;if(o<=Math.pow(s,2)){let o=.01,n=0,a=t-this.gameObj.x,h=e-this.gameObj.y;for(;Math.pow(s,2)-(a*a+h*h)>.01;)n+=o,a=t-this.gameObj.x-n*Math.sin(i*Math.PI/180),h=e-this.gameObj.y-n*-Math.cos(i*Math.PI/180);return this.helpOut.type="ok",this.helpOut.x=a+this.gameObj.x,this.helpOut.y=h+this.gameObj.y,this.helpOut}return this.helpOut.type="no",this.helpOut}clearBallEft(){this.clearBallRightEft(),this.clearBallWrongEft()}clearBallRightEft(){this.ui.breathAni.stop(),this.ui.rightTips.visible=!1}clearBallWrongEft(){this.ui.wrongTips.visible=!1}showWrongEft(){Ea.common.gameMgr.selfTurn&&(this.ui.wrongTips.visible=!0)}showRightEft(){Ea.common.gameMgr.selfTurn&&(this.ui.rightTips.visible=!0,this.ui.rightTips.scaleX=1,this.ui.rightTips.scaleY=1,this.ui.breathAni.play())}setBallFunc(t,e){"ice"==t?(this.ballFunc=t,this.d3BallSrc.setAlbedoTexture(!0),this.rigy.type="static",this.iceOwner=e):e==this.iceOwner&&(this.ballFunc=t,this.d3BallSrc.setAlbedoTexture(!1),this.rigy.type="dynamic")}}Q._unid=0;class tt extends Q{constructor(){super(),this.maxSpeed=0,this.classicMaxSpeed=2.2,this.bigSkillMaxSpeed=4,this.angle=0,this.allPercent=0,this.linearPercent=0,this.anglePercent=0,this.maxAngleRate=.6,this.baseRot=7,this.angleMax=0,this.speed=new Laya.Vector2,this.rotSpeed=new Laya.Vector2}isStill(){let t=this.rigy.linearVelocity;return Math.abs(t.x)<=this.stillSpeed&&Math.abs(t.y)<=this.stillSpeed&&!this.forceRun&&this.anglePercent<=.1&&(this.rigy.linearVelocity={x:0,y:0},!0)}reset(){this.linearPercent=0,this.anglePercent=0}setSpeed(t,e){this.allPercent=t,this.angle=e,this.setAngleSpeed(),this.setLinearSpeed();let i="hit";t<25?i="hit03":t<50?i="hit02":t<75&&(i="hit01"),Ea.soundMgr.playSound(i)}setAngleSpeed(){let t=Ea.common.rodOffest,e=.5*Math.abs(t.y/82);t.y>0?this.angleMax=2*-this.baseRot:this.angleMax=this.baseRot,this.rotY=-t.x/82*100,this.anglePercent=this.maxAngleRate*e*this.allPercent,this.linearPercent=this.allPercent-this.anglePercent}setLinearSpeed(){if(Ea.common.gameMode==C.classic&&3==Wa.getChallengeTimes()&&Ea.common.gameMgr.selfTurn&&Ea.common.gameMgr.aiBallArr.length<=2&&Ea.common.gameMgr.ensureBallType&&!Ea.common.longHelpLine){let t=-150+Ea.common.randomNum(0,300);t/=100,this.angle+=t}let t=Math.sin(this.angle*Math.PI/180),e=Math.cos(this.angle*Math.PI/180);switch(Ea.common.gameMode){case C.classic:this.maxSpeed=this.classicMaxSpeed;break;case C.bigMove:this.maxSpeed=this.bigSkillMaxSpeed;break;case C.placeBall:1==cfgTable.placeballData[Ea.common.placeBallCurLevel].type?this.maxSpeed=this.bigSkillMaxSpeed:this.maxSpeed=this.classicMaxSpeed}this.speed.x=this.maxSpeed*this.linearPercent*t,this.speed.y=-this.maxSpeed*this.linearPercent*e,this.rotSpeed.x=-this.angleMax*t*this.anglePercent,this.rotSpeed.y=this.angleMax*e*this.anglePercent,this.rigy.applyLinearImpulseToCenter(this.speed)}onUpdate(){if(this.anglePercent>.1){this.anglePercent*=.97,this.rotSpeed.x=-this.angleMax*Math.sin(this.angle*Math.PI/180)*this.anglePercent,this.rotSpeed.y=this.angleMax*Math.cos(this.angle*Math.PI/180)*this.anglePercent,this.rigy.applyForceToCenter(this.rotSpeed),Laya.Vector2.normalize(this.rigy.linearVelocity,this.speed),Laya.Vector2.normalize(this.rotSpeed,this.rotSpeed),Laya.Vector2.dot(this.speed,this.rotSpeed)>.9&&(this.canRot=!0)}else this.canRot=!0;Math.abs(this.rotY)>.1&&(this.rotY*=.98),super.onUpdate()}destroySelf(){super.destroySelf(),this.speed=null}}class et extends Laya.Sprite{constructor(t=!1){super(),this.ui=$.createInstance(),this.pivotX=this.ui.width/2,this.pivotY=this.ui.width/2,this.x=0,this.y=0,this.addChild(this.ui.displayObject),this.ui.displayObject.x+=this.ui.width/2,this.ui.displayObject.y+=this.ui.width/2,this.d2Src=t?this.addComponent(tt):this.addComponent(Q),this.d2Src.ui=this.ui,this.addCircleCollider(),this.addInnerCircleCollider(),this.addRigyBody()}addCircleCollider(){let t=Ea.common.getCollider("circle");t.radius=this.ui.width/2,this.addComponentIntance(t),this.d2Src.outColli=t,t.label="ball"}addInnerCircleCollider(){let t=Ea.common.getCollider("circle");t.radius=this.ui.inner.width/2,t.x=(this.ui.width-this.ui.inner.width)/2,t.y=(this.ui.width-this.ui.inner.width)/2,this.addComponentIntance(t),this.d2Src.innerColli=t,t.label="inner"}addRigyBody(){let t=Ea.common.getRigbody();t.type="dynamic",this.addComponentIntance(t),this.d2Src.rigy=t}disposeSelf(){this.ui.isDisposed||(this.ui.dispose(),this.ui.removeFromParent(),this.ui=null)}}class it extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","D2Gan")}onConstruct(){this.myIcon=this.getChild("myIcon"),this.selfRodIcon=this.getChild("selfRodIcon"),this.selfEftRoot=this.getChild("selfEftRoot"),this.self=this.getChild("self"),this.aiRodIcon=this.getChild("aiRodIcon"),this.aiEftRoot=this.getChild("aiEftRoot"),this.ai=this.getChild("ai")}}it.URL="ui://isxx5ak7sdh33qp";class st{constructor(){this.offset=.15,this.cell=1.5,this.onBallCell=.4,this.lastInfo={x:0,y:0,rotation:0},this.moveNum=70,this.rulerRate=.1,this.ui=it.createInstance(),this.changeSelfRod(),this.changeAIRod()}changeSelfRod(){let t=Wa.getCurBallRod(),e=cfgTable.ballrodData[t+1];this.ui.selfEftRoot.displayObject&&this.ui.selfEftRoot.displayObject.destroyChildren(),this.selfMySpine&&this.selfMySpine.dispose(),this.ui.selfRodIcon.url=Ea.common.getGameIconUrl(e.img),e.spine&&(this.ui.selfEftRoot.url=Ea.common.getGameIconUrl(e.img),this.selfMySpine=new q(e.spine,()=>{let t={x:this.ui.selfEftRoot.width/2,y:this.ui.selfEftRoot.height/2,scaleX:1,scaleY:1};this.selfMySpine.play(t,0,!0,this.ui.selfEftRoot.displayObject).rotation=-90}))}changeAIRod(){let t=Object.keys(cfgTable.ballrodData).length,e=Math.floor(t*Math.random())+1,i=cfgTable.ballrodData[e];this.ui.aiEftRoot.displayObject&&this.ui.aiEftRoot.displayObject.destroyChildren(),this.aiMySpine&&this.aiMySpine.dispose(),this.ui.aiRodIcon.url=Ea.common.getGameIconUrl(i.img),i.spine&&(this.ui.aiEftRoot.url=Ea.common.getGameIconUrl(i.img),this.aiMySpine=new q(i.spine,()=>{let t={x:this.ui.aiEftRoot.width/2,y:this.ui.aiEftRoot.height/2,scaleX:1,scaleY:1};this.aiMySpine.play(t,0,!0,this.ui.aiEftRoot.displayObject).rotation=-90}))}setGanLastInfo(){this.lastInfo.rotation=this.ui.rotation,this.lastInfo.x=this.ui.x,this.lastInfo.y=this.ui.y}rotateSelf(t,e=!1){let i;t*=this.offset,i=Ea.common.d2World.isHelpLineOnBall?t*this.onBallCell:t*this.cell,e&&(i*=this.rulerRate),this.ui.rotation+=i,Ea.common.d2World.getHelpLine()}checkDistance(){let t=Ea.common.d2World.targetBall,e=Ea.common.d2World.rootBall;return null==t?1:Math.pow(t.gameObj.x-e.gameObj.x,2)+Math.pow(t.gameObj.y-e.gameObj.y,2)<=2500?5:1}rotDest(t){this.ui.rotation=t,Ea.common.d2World.getHelpLine()}storagePower(t){let e=t/100*this.moveNum,i=-Math.sin(Math.PI*this.ui.rotation/180)*e,s=Math.cos(Math.PI*this.ui.rotation/180)*e;this.ui.x=this.lastInfo.x+i,this.ui.y=this.lastInfo.y+s}shoot(){this.storagePower(0),this.ui.visible=!1}destroySelf(){this.ui.selfEftRoot.displayObject&&this.ui.selfEftRoot.displayObject.destroyChildren(),this.ui.aiEftRoot.displayObject&&this.ui.aiEftRoot.displayObject.destroyChildren(),this.selfMySpine&&this.selfMySpine.dispose(),this.aiMySpine&&this.aiMySpine.dispose(),this.lastInfo=null,this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose())}}class ot extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","HelpLine")}onConstruct(){this.n10=this.getChild("n10"),this.rect=this.getChild("rect"),this.dir11=this.getChild("dir11"),this.dir=this.getChild("dir"),this.rootDir=this.getChild("rootDir"),this.dirDot=this.getChild("dirDot")}}ot.URL="ui://isxx5ak7sdh33qs";class nt{constructor(){this.starX=0,this.starY=0,this.ui=ot.createInstance(),Ea.common.gameUI.ui.ballNode.addChild(this.ui),this.starX=this.ui.rect.x,this.starY=this.ui.rect.y}shoot(){this.ui.visible=!1}destroySelf(){this.ui.isDisposed&&(this.ui.removeFromParent(),this.ui.dispose())}}class at extends Laya.Script{constructor(){super(),this.ballArr=[],this.openCheckStill=!1,this.checkArr=[],this.borderRect={x:169,y:179.25,width:996,height:495,openBallW:236},this.isHelpLineOnBall=!1,this.isOnSameLine=!1,this.reflectAngle=0,this.powerPercent=0,this.inHolesSpeed=[],this.outDir=new Laya.Vector2,this.rootDir=new Laya.Vector2,this.aiLv=0,this.rootPos=new Laya.Vector2,this.tempDir1=new Laya.Vector2,this.tempDir2=new Laya.Vector2,this.tempDir3=new Laya.Vector2,this.ballSize=33,this.destRot=0}initSelf(){this.createBalls(),Ea.eventMgr.off(o,this,this.allBallStop),Ea.eventMgr.on(o,this,this.allBallStop),Ea.eventMgr.off(n,this,this.waitShoot),Ea.eventMgr.on(n,this,this.waitShoot),Ea.eventMgr.on(r,this,this.resetGame)}setBorderRect(){let t=Ea.common.gameUI.ui,e=t.border.bar5.x+t.border.bar5.width/2,i=t.border.bar1.y+t.border.bar1.height/2,s=Math.abs(t.border.bar6.x-t.border.bar5.x-t.border.bar5.width),o=Math.abs(t.border.bar3.y-t.border.bar1.y-t.border.bar1.height);this.borderRect.x=e,this.borderRect.y=i,this.borderRect.width=s,this.borderRect.height=o}resetGame(){let t;this.openCheckStill=!1;for(let e=0;e<this.ballArr.length;e++)(t=this.ballArr[e]).destroySelf();Ea.common.d3World.ballRoot.destroyChildren(),Ea.common.gameUI.ui.ballNode.removeChildren(),console.log("进入摧毁逻辑"),this.d2Gan.destroySelf(),this.d2HelpLine.destroySelf(),this.ballArr=[]}setD2Gan(){let t=this.rootBall.ui,e=new st;this.d2Gan=e;let i=e.ui;t.addChild(i),i.pivotX=i.pivotX,i.pivotY=i.pivotY,i.x=i.myIcon.width/2,i.y=this.rootBall.gameObj.width,e.setGanLastInfo()}setHelpLine(){let t=new nt;this.d2HelpLine=t}createBalls(){let t;switch(Ea.common.gameMode){case C.classic:t=Ea.cfgMgr.getRandomClassicLevel();break;case C.bigMove:t=Ea.cfgMgr.getBigMoveLevelByIndex(Ea.common.bigMoveLevelIndex);break;case C.placeBall:t=Ea.cfgMgr.getPlaceBallByLevel(Ea.common.placeBallCurLevel)}t=JSON.parse(JSON.stringify(t));for(const e in t)if(0==t[e].value){this.createRootBall(t[e]),delete t[e];break}this.createOtherBalls(t)}createRootBall(t){let e=new et(!0);Ea.common.gameUI.ui.ballNode.displayObject.addChild(e),this.rootBall=e.d2Src;let i=Ea.poolD3Mgr.getItem(x.d3ball),s=i.getComponent(Z);Ea.common.d3World.rootBall=i,Ea.common.d3World.rootBallSrc=s;let o=t.x,n=t.y,a=t.value;Ea.common.gameMgr.lastRootBallPos.setValue(o,n),this.rootBall.initSelf(a,o,n,i),this.ballArr.push(this.rootBall),this.setD2Gan(),this.setHelpLine()}createOtherBalls(t){let e,i,s;for(const o in t){s=t[o],e=new et,Ea.common.gameUI.ui.ballNode.displayObject.addChild(e),i=e.d2Src;let n=Ea.poolD3Mgr.getItem(x.d3ball);i.initSelf(s.value,s.x,s.y,n),this.ballArr.push(i)}}shoot(t){this.powerPercent=t,this.openCheckStill=!0;let e=this.d2Gan.ui.rotation;this.rootBall.setSpeed(t,e),this.clearBallAllEft(),this.changePlayerView()}onUpdate(){this.openCheckStill&&this.checkStill()}checkStill(){for(let t=0;t<this.ballArr.length;t++)if(!this.ballArr[t].isStill())return;Ea.eventMgr.event(o)}allBallStop(){this.openCheckStill=!1,Ea.common.recoverCameraView()}waitShoot(){this.d2Gan.ui.isDisposed||(this.d2Gan.ui.visible=!0),this.d2HelpLine.ui.isDisposed||(this.d2HelpLine.ui.visible=!0),this.clearBallAllEft(),this.showBallRightEft(),this.getHelpLine(),this.inHolesSpeed=[],this.selectOneBall()}_getAllBallArr(){let t=this.ballArr,e=[];for(let i=0;i<t.length;i++)t[i]instanceof tt||"ice"!=t[i].ballFunc&&(t[i].destroyed||e.push(t[i]));return e}_getBlackObj(){let t=this.ballArr;for(let e=0;e<t.length;e++)if(8==t[e].number&&Ea.common.gameMode==C.classic)return t[e]}selectOneBall(){let t,e=this._getAllBallArr();switch(Ea.common.gameMode){case C.classic:if(Ea.common.gameMgr.selfTurn){let i=Ea.common.gameMgr.selfBallArr,s=this._getBlackObj();if(Ea.common.gameMgr.ensureBallType)if(i.length>0){let s=[];for(let t=0;t<e.length;t++)i.indexOf(e[t].number)>-1&&s.push(e[t]);t=this.selectBestEnterOne(s)}else t=this.selectBestEnterOne([s]);else t=this.selectBestEnterOne(e)}else t=this.selectBestEnterOne(e);break;case C.bigMove:t=this.selectBestEnterOne(e);break;case C.placeBall:e.length>0&&(t=this.selectBestEnterOne(e))}if(t&&!t.destroyed&&t.onClick){t.onClick(0,!0);let e=-200+Ea.common.randomNum(0,400);e/=150,Ea.common.longHelpLine&&(e=0),this.destRot+=e,Ea.common.d2World.d2Gan.rotDest(this.destRot)}}removeOneBall(t){for(let e=0;e<this.ballArr.length;e++)if(this.ballArr[e].id==t.id){this.ballArr.splice(e,1);break}}getHelpLine(){this.d2HelpLine.ui.dirDot.visible=!1,this.isOnSameLine=!1;let t=this.rootBall.gameObj.x,e=this.rootBall.gameObj.y,i=this.getBorderDot(t,e,this.d2Gan.ui.rotation);if(null==i)return this.d2HelpLine.ui.visible=!1,void console.error("辅助线异常");this.d2HelpLine.ui.visible=!0;let s=this.d2Gan.ui.rotation,o=t+i*Math.sin(s*Math.PI/180),n=e+i*-Math.cos(s*Math.PI/180),a=Ea.common.isBlock(t,e,o,n);if(null==a)this.getColliPos(o,n,16.5,s),Ea.common.d2World.isHelpLineOnBall=!1,this.targetBall=null,this.reflectAngle=0,this.showBallWrongEft();else{let i=a.src,o=16.5,n=4*o*o-a.disVer*a.disVer;n=Math.sqrt(n);let h=a.disHon-n,l=a.dir,r=t+l.x*h,c=e+l.y*h;this.getColliPos(r,c,o,s);let d=this.getReflectLine(r,c,o,i.gameObj)-180;if(Math.abs(d-s)<=.02){let t=Ea.common.rodOffest;Math.abs(t.x)<1&&Math.abs(t.y)<1&&(this.isOnSameLine=!0)}this.getRootDirLine(d,s,r,c,i),Ea.common.d2World.isHelpLineOnBall=!0,this.targetBall=i,this.reflectAngle=d,this.showBallWrongEft(),Ea.common.longHelpLine&&this.delayReflectLine(i,d)}}getBorderDot(t,e,i){let s,o;return s=-(this.borderRect.y-e+17)/Math.cos(i*Math.PI/180),null!=(o=this.judgeUpDown(s,i,t))?o:(s=-(this.borderRect.y+this.borderRect.height-e-17)/Math.cos(i*Math.PI/180),null!=(o=this.judgeUpDown(s,i,t))?o:(s=(this.borderRect.x-t+17)/Math.sin(i*Math.PI/180),null!=(o=this.judgeLeftRight(s,i,e))?o:(s=(this.borderRect.x+this.borderRect.width-t-17)/Math.sin(i*Math.PI/180),null!=(o=this.judgeLeftRight(s,i,e))?o:void 0)))}judgeUpDown(t,e,i){let s=Math.sin(e*Math.PI/180),o=i+t*Math.sin(e*Math.PI/180);if(t>=0)if(s>0){if(o<this.borderRect.x+this.borderRect.width)return t}else if(o>this.borderRect.x)return t}judgeLeftRight(t,e,i){let s=-Math.cos(e*Math.PI/180),o=i+t*-Math.cos(e*Math.PI/180);if(t>=0)if(s>0){if(o<this.borderRect.y+this.borderRect.height)return t}else if(o>this.borderRect.y)return t}clearBallAllEft(){let t;for(let e=0;e<this.ballArr.length;e++)(t=this.ballArr[e]).clearBallEft()}showBallRightEft(){let t,e=Ea.common.gameMgr,i=e.selfTurn?e.selfBallArr:e.aiBallArr;if(!(i.length<=0))for(let e=0;e<this.ballArr.length;e++)t=this.ballArr[e],i.indexOf(t.number)>-1&&t.showRightEft()}showBallWrongEft(){let t,e=Ea.common.gameMgr,i=e.selfTurn?e.selfBallArr:e.aiBallArr;if(!(i.length<=0))for(let e=0;e<this.ballArr.length;e++)t=this.ballArr[e],this.targetBall&&this.targetBall.number==t.number&&i.indexOf(t.number)<=-1?t.showWrongEft():t.clearBallWrongEft()}getColliPos(t,e,i,s){this.d2HelpLine.ui.x=t,this.d2HelpLine.ui.y=e;let o=t-this.rootBall.gameObj.x,n=e-this.rootBall.gameObj.y,a=Math.pow(o*o+n*n,.5);a<=0&&(a=0),this.d2HelpLine.ui.rect.height=0,this.d2HelpLine.ui.rect.height=a,this.d2HelpLine.ui.rect.rotation=Ea.common.getfguiRotation(o,n),a<this.rootBall.gameObj.width?this.d2HelpLine.ui.rect.visible=!1:this.d2HelpLine.ui.rect.visible=!0,this.d2HelpLine.ui.dir.visible=!1,this.d2HelpLine.ui.rootDir.visible=!1}getReflectLine(t,e,i,s){this.d2HelpLine.ui.dir.visible=!0;let o=s.x-t,n=s.y-e,a=Ea.common.getfguiRotation(o,n)+180;return this.d2HelpLine.ui.dir.x=this.d2HelpLine.starX,this.d2HelpLine.ui.dir.y=this.d2HelpLine.starY,this.d2HelpLine.ui.dir.height=48,this.d2HelpLine.ui.dir.rotation=a,this.d2HelpLine.ui.dir.x-=2*i*Math.sin(a*Math.PI/180),this.d2HelpLine.ui.dir.y-=2*i*-Math.cos(a*Math.PI/180),a}getRootDirLine(t,e,i,s,o){let n=Ea.common.d2World.rootBall.gameObj.x,a=Ea.common.d2World.rootBall.gameObj.y,h=o.gameObj.x,l=o.gameObj.y;this.outDir.setValue(h-i,l-s),this.rootDir.setValue(n-i,a-s);let r=Math.PI/2,c=Math.sin(r),d=Math.cos(r),u=this.outDir.x*d-this.outDir.y*c,g=this.outDir.x*c+this.outDir.y*d;this.outDir.setValue(u,g),Laya.Vector2.normalize(this.rootDir,this.rootDir),Laya.Vector2.normalize(this.outDir,this.outDir);let m=Laya.Vector2.dot(this.rootDir,this.outDir);Math.abs(m)<=.08?this.d2HelpLine.ui.rootDir.visible=!1:(m>0?t+=90:m<0&&(t-=90),this.d2HelpLine.ui.rootDir.visible=!0,this.d2HelpLine.ui.rootDir.x=this.d2HelpLine.starX,this.d2HelpLine.ui.rootDir.y=this.d2HelpLine.starY,this.d2HelpLine.ui.rootDir.rotation=t)}delayReflectLine(t,e){if(Ea.common.gameMode!=C.placeBall&&!Ea.common.gameMgr.selfTurn)return;this.isOnSameLine=!1;let i=t.gameObj.x,s=t.gameObj.y,o=this.getBorderDot(i,s,e);if(null==o)return void(this.d2HelpLine.ui.dirDot.visible=!1);this.d2HelpLine.ui.visible=!0;let n=i+o*Math.sin(e*Math.PI/180),a=s+o*-Math.cos(e*Math.PI/180),h=Ea.common.isBlock(i,s,n,a,t);if(null==h)this.setDelayLine(n,a,t,e);else{let o=16,n=4*o*o-h.disVer*h.disVer;n=Math.sqrt(n);let a=h.disHon-n,l=h.dir,r=i+l.x*a,c=s+l.y*a;this.setDelayLine(r,c,t,e)}}setDelayLine(t,e,i,s){let o=t-i.gameObj.x,n=e-i.gameObj.y,a=Math.pow(o*o+n*n,.5);a<=0&&(a=0),this.d2HelpLine.ui.dir.height=a,this.d2HelpLine.ui.dirDot.visible=!0,this.d2HelpLine.ui.dirDot.x=17,this.d2HelpLine.ui.dirDot.y=17,this.d2HelpLine.ui.dirDot.x+=(a+34)*Math.sin(s*Math.PI/180),this.d2HelpLine.ui.dirDot.y+=(a+34)*-Math.cos(s*Math.PI/180)}changePlayerView(){if(Math.random()>=.7)return;if(!this.targetBall)return;if(!Ea.common.gameMgr.selfTurn)return;switch(Ea.common.gameMode){case C.classic:if(Ea.common.gameMgr.selfBallArr.indexOf(this.targetBall.number)<=-1&&8!=this.targetBall.number)return;break;case C.bigMove:return;case C.placeBall:}let t=this.targetBall.gameObj.x,e=this.targetBall.gameObj.y,i=this.reflectAngle,s=this.getBorderDot(t,e,i),o=t+s*Math.sin(i*Math.PI/180),n=e+s*-Math.cos(i*Math.PI/180);if(Ea.common.isBlock(t,e,o,n,this.targetBall))return;let a,h,l,r,c=Ea.common.gameMgr.posObj;for(const s in c)if(a=c[s],l=t+(h=Math.pow((t-a.x)*(t-a.x)+(e-a.y)*(e-a.y),.5))*Math.sin(i*Math.PI/180),r=e+h*-Math.cos(i*Math.PI/180),(l-a.x)*(l-a.x)+(r-a.y)*(r-a.y)<40){Ea.common.showOneCamera("angle"+s),Ea.common.gameUI.ui.d2Node.alpha=0,Laya.physicsTimer.scale=.7;break}}selectBestEnterOne(t){return this.aiLv=Ea.tools.random(1,11),this.aiLv=10,this.wBall=Ea.common.d2World.rootBall,this.rootPos.x=this.wBall.gameObj.x,this.rootPos.y=this.wBall.gameObj.y,this.initHoleBall(t),this.selectBall()}selectBall(){let t=null;this.destRot=0;let e=110-10*this.aiLv,i=.005*Ea.tools.random(-e,e),s=!1;if(this.scoreBall.length<1)if(this.lineBall.length<1)for(let t=0;t<this.kickBall.length;t++){let e=[],s=this.kickBall[t],o=s.gameObj,n=Ea.common.d2World.borderRect,a=this.wBall.gameObj,h=o.y-n.y-20,l=a.y-n.y-50;if(h>0&&l>0){let t=0,i=a.y-n.y,s=a.x,o=n.y-i;e.push({order:h,bx:0,by:n.y,spx:s,spy:o,dlenx:t,dleny:i})}if(h=n.y+n.height-o.y-20,l=n.y+n.height-a.y-50,h>0&&l>0){let t=0,i=n.y+n.height-a.y,s=a.x,o=n.y+n.height+i;e.push({order:h,bx:0,by:n.y+n.height,spx:s,spy:o,dlenx:t,dleny:i})}if(h=o.x-n.x-20,l=a.x-n.x-50,h>0&&l>0){let t=a.x-n.x,i=0,s=n.x-t,o=a.y;e.push({order:h,bx:n.x,by:0,spx:s,spy:o,dlenx:t,dleny:i})}if(h=n.x+n.width-o.x-20,l=n.x+n.width-a.x-50,h>0&&l>0){let t=n.x+n.width-a.x,i=0,s=n.x+n.width+t,o=a.y;e.push({order:h,bx:n.x+n.width,by:0,spx:s,spy:o,dlenx:t,dleny:i})}e.sort(function(t,e){return t.order-e.order});for(let t=0;t<e.length;t++){let n=e[t],h=a.x-o.x,l=a.y-o.y;Ea.tools.getV2Dir(n.spx,n.spy,o.x,o.y,this.tempDir1),Ea.tools.getV2Dir(n.spx,n.spy,a.x,a.y,this.tempDir2);let r=Laya.Vector2.dot(this.tempDir1,this.tempDir2);r>1&&(r=1);let c=Math.acos(r);c>1.57?c=1.57:c<.01&&(c=.01);let d=Math.tan(c),u=d*n.dleny,g=d*n.dlenx,m=n.bx>0?n.bx:a.x+(h>0?-u:u);if(Math.abs(m-667)<40)continue;let y=n.by>0?n.by:a.y+(l>0?-g:g);if(!this.isBlock(0,a.x,a.y,m,y)&&!this.isBlock(s.number,o.x,o.y,m,y)){let t=Math.abs(n.dlenx)+Math.abs(n.dleny)+Ea.tools.getDistance(m,y,s.gameObj.x,s.gameObj.y);return this.forceMax=.08*t,this.destRot+=.1*i,this.setKick(m,y),!0}}}else t=Ea.common.getRandArrEle(this.lineBall);else{for(let e=0;e<this.scoreBall.length;e++){if(!(e<this.scoreBall.length-1)){t=this.scoreBall[e];break}{let i=70+10*this.aiLv+10*e;if(Ea.tools.random(0,100)<i){t=this.scoreBall[e];break}}}s=!0,this.selectNum++}t||(t=Ea.common.getRandArrEle(Ea.common.d2World.ballArr));let o=t.gameObj.x,n=t.gameObj.y,a=0;if(s){o=t.kickPos.x,n=t.kickPos.y,this.tempDir2=Ea.tools.getV2Dir(this.wBall.gameObj.x,this.wBall.gameObj.y,o,n,this.tempDir2),this.tempDir3=Ea.tools.getV2Dir(o,n,t.gameObj.x,t.gameObj.y,this.tempDir3);let e=Laya.Vector2.dot(this.tempDir3,this.tempDir2);if(e>1&&(e=1),(a=57.3*Math.acos(e))>45){let e=t.kickPos.x-t.gameObj.x,s=t.kickPos.y-t.gameObj.y;o=t.kickPos.x-e*i*.3,n=t.kickPos.y-s*i*.3}else this.destRot+=i}else 0!=t.poleAngle&&(this.destRot+=t.poleAngle);if(0==Ea.common.gameMode){let e=.08*a;this.forceMax=.1*t.hard+e*e}return this.setKick(o,n),t}initHoleBall(t){this.kickBall=[],this.lineBall=[],this.scoreBall=[],this.holeBall=[],this.selectNum=0,this.forceNum=0,this.forceMax=0,this.turnNum=0;let e=t,i=Ea.common.gameMgr.holePosList,s=Ea.common.aiPlayer;for(let t=0;t<e.length;t++){let o=e[t];if(!o)continue;o.kickPos.x=0,o.kickPos.y=0,o.poleAngle=0,o.hard=0,o.borderDis=0,o.kickAngle=180;let n=o.gameObj,a=this.rootPos,h=a.x-n.x,l=a.y-n.y;if(o.borderDis=Ea.tools.random(0,100),this.kickBall.push(o),!this.isLine(a,o))continue;o.kickAngle=Ea.tools.random(90,180),o.kickPos.x=n.x,o.kickPos.y=n.y,this.lineBall.push(o);let r=999999,c=!1;for(let t=0;t<i.length;t++){let e=i[t];if(!(h>=0&&e.x>n.x+100)&&!(h<=0&&e.x<n.x-100||l<-10&&e.y<a.y||l>10&&e.y>a.y||this.isBlock(o.number,n.x,n.y,e.x,e.y))){let t=Ea.tools.getDeltaxy(n.x,n.y,e.x,e.y);if(t<r){let i=n.x-this.tempDir1.x*this.ballSize,h=n.y-this.tempDir1.y*this.ballSize;if(this.tempDir3.x=this.tempDir1.x,this.tempDir3.y=this.tempDir1.y,!this.isBlock(this.wBall.number,a.x,a.y,i,h,o.number)){o.kickPos.x=i,o.kickPos.y=h;let a=Laya.Vector2.dot(this.tempDir1,this.tempDir3);a>1&&(a=1),o.kickAngle=57.3*Math.acos(a),(n.x<s.rectL+2||n.x>s.rectR-2||n.y<s.rectT+2||n.y>s.rectB-2)&&(t*=2),Math.abs(e.x-600)<100&&(t+=50),o.hard=t+3*o.kickAngle,c=!0}}}}c&&(this.scoreBall.push(o),this.holeBall.push(o))}this.scoreBall.sort(function(t,e){return t.hard-e.hard}),this.holeBall.sort(function(t,e){return t.kickAngle-e.kickAngle}),this.kickBall.sort(function(t,e){return t.borderDis-e.borderDis})}isBlock(t,e,i,s,o,n=-1){this.tempDir1=Ea.tools.getV2Dir(e,i,s,o,this.tempDir1);let a=Ea.common.d2World.ballArr,h=Ea.tools.getDis(s,o,e,i);for(let s=0;s<a.length;s++){let o=a[s];if(0==o.number)continue;if(o.number==t||o.number==n)continue;let l=Ea.tools.getDistance(o.gameObj.x,o.gameObj.y,e,i);if(l*l>h)continue;this.tempDir2=Ea.tools.getV2Dir(e,i,o.gameObj.x,o.gameObj.y,this.tempDir2);let r=Laya.Vector2.dot(this.tempDir1,this.tempDir2);if((r>1&&(r=1),!(r<0))&&Math.sin(Math.acos(r))*l<this.ballSize)return!0}return!1}isLine(t,e){let i=t.x,s=t.y;if(this.isBlock(0,i,s,e.gameObj.x,e.gameObj.y,e.number)){let o=e.getDestDis(t),n=Math.asin((e.gameObj.width-3)/o),a=Math.sin(n),h=Math.cos(n);this.tempDir3=Ea.tools.getV2Dir(i,s,e.gameObj.x,e.gameObj.y,this.tempDir3),this.tempDir2.x=this.tempDir3.x*h-this.tempDir3.y*a,this.tempDir2.y=this.tempDir3.x*a+this.tempDir3.y*h;let l=i+this.tempDir2.x*o,r=s+this.tempDir2.y*o,c=this.isBlock(0,i,s,l,r,e.number);a=Math.sin(-n),h=Math.cos(-n),this.tempDir2.x=this.tempDir3.x*h-this.tempDir3.y*a,this.tempDir2.y=this.tempDir3.x*a+this.tempDir3.y*h,l=i+this.tempDir2.x*o,r=s+this.tempDir2.y*o;let d=this.isBlock(0,i,s,l,r,e.number);if(c&&d)return!1;e.poleAngle=c?57.3*-n:57.3*n}return!0}setKick(t,e){this.forceMax+=.1*this.wBall.getDestDis({x:t,y:e}),this.tempDir2=Ea.tools.getV2Dir(this.wBall.gameObj.x,this.wBall.gameObj.y,t,e,this.tempDir2),this.tempDir1.x=0,this.tempDir1.y=1,this.tempDir2.y=-this.tempDir2.y;let i=Laya.Vector2.dot(this.tempDir1,this.tempDir2);i>1&&(i=1);let s=57.3*Math.acos(i);this.tempDir2.x<0&&(s=360-s),this.destRot+=s}}class ht extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIGame")}onConstruct(){this.c1=this.getController("c1"),this.d3Root=this.getChild("d3Root"),this.clickNode=this.getChild("clickNode"),this.d2Root=this.getChild("d2Root"),this.topNode=this.getChild("topNode"),this.n72=this.getChild("n72"),this.n40=this.getChild("n40"),this.rulerNode=this.getChild("rulerNode"),this.rulerClickNode=this.getChild("rulerClickNode"),this.n50=this.getChild("n50"),this.keduNode=this.getChild("keduNode"),this.powerTxt=this.getChild("powerTxt"),this.powerNode=this.getChild("powerNode"),this.colorNode=this.getChild("colorNode"),this.powerEft=this.getChild("powerEft"),this.myPowerNode=this.getChild("myPowerNode"),this.ganNode=this.getChild("ganNode"),this.rodMethodNode=this.getChild("rodMethodNode"),this.placeChallengeNode=this.getChild("placeChallengeNode"),this.placeNormalNode=this.getChild("placeNormalNode"),this.skillRod=this.getChild("skillRod"),this.border=this.getChild("border"),this.bigSkillNode=this.getChild("bigSkillNode"),this.classicWorldsNode=this.getChild("classicWorldsNode"),this.bigMoveWorldsNode=this.getChild("bigMoveWorldsNode"),this.classicEmotionSpineNode=this.getChild("classicEmotionSpineNode"),this.awardSpineNode=this.getChild("awardSpineNode"),this.guanyuNode=this.getChild("guanyuNode"),this.helpBtn=this.getChild("helpBtn"),this.wordsBtn=this.getChild("wordsBtn"),this.aiWordsBtn=this.getChild("aiWordsBtn"),this.returnBtn=this.getChild("returnBtn"),this.ballNode=this.getChild("ballNode"),this.whiteAni=this.getChild("whiteAni"),this.blackAni=this.getChild("blackAni"),this.selfTurn=this.getChild("selfTurn"),this.aiTurn=this.getChild("aiTurn"),this.deskNode=this.getChild("deskNode"),this.moveNode=this.getChild("moveNode"),this.selfTalk=this.getChild("selfTalk"),this.aiTalk=this.getChild("aiTalk"),this.d2Node=this.getChild("d2Node"),this.snowNode=this.getChild("snowNode"),this.guide2=this.getChild("guide2"),this.guide1=this.getChild("guide1"),this.guide3=this.getChild("guide3"),this.guideNode=this.getChild("guideNode")}}ht.URL="ui://isxx5ak7kt443qg";class lt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIGameEnd")}onConstruct(){this.c1=this.getController("c1"),this.n22=this.getChild("n22"),this.n2=this.getChild("n2"),this.n52=this.getChild("n52"),this.n53=this.getChild("n53"),this.coinNode=this.getChild("coinNode"),this.closeNode=this.getChild("closeNode"),this.moneyNode=this.getChild("moneyNode"),this.secretary=this.getChild("secretary"),this.n27=this.getChild("n27"),this.n29=this.getChild("n29"),this.talkNode=this.getChild("talkNode"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n40=this.getChild("n40"),this.awardNode=this.getChild("awardNode"),this.starNumNode=this.getChild("starNumNode"),this.n47=this.getChild("n47"),this.conditionNode=this.getChild("conditionNode"),this.isGetAward=this.getChild("isGetAward"),this.leftBtn=this.getChild("leftBtn"),this.rightBtn=this.getChild("rightBtn"),this.btnNode=this.getChild("btnNode")}}lt.URL="ui://isxx5ak7hkrz3u3";class rt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIAddCoin")}onConstruct(){this.n11=this.getChild("n11"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}rt.URL="ui://isxx5ak7uxuev4hs";class ct extends A{constructor(){super(),this.coinNum=2e3}onConstructor(){this.ui=rt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.hide),this.addUIClick(this.ui.myNode.videoBtn,this.videoAddCoin)}show(){super.show(),this.ui.t0.play()}videoAddCoin(){if(console.log("zh:qjff_AD_for_UIAddCoin"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIAddCoin")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIAddCoin())}qjff_AD_for_UIAddCoin(){Ea.common.playObjFlyAnim(this.coinNum,N.coin),this.hide()}}ct.uiName="UIAddCoin";class dt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIInvitation")}onConstruct(){this.n14=this.getChild("n14"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}dt.URL="ui://isxx5ak7lrxgv50r";class ut extends A{constructor(){super()}onConstructor(){this.ui=dt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.enterBtn,this.enterGame)}show(){super.show()}enterGame(){Ea.common.gameMode=C.classic,Wa.setChallengeTimes(1),Ea.common.passAwardCoin=2e3;let t=Ea.common.classicNiceNeddCoin;Wa.coinEnough(t)?(Wa.setCoin(-t),Ea.eventMgr.event(u,!0),Moyu.sendDataEvent("enterChallenge",{mode:Ea.common.gameMode})):Ea.eventMgr.event(u,!0),this.hide()}hide(){super.hide()}}ut.uiName="UIInvitation";class gt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIMain")}onConstruct(){this.n47=this.getChild("n47"),this.n10=this.getChild("n10"),this.secretary=this.getChild("secretary"),this.shopBtn=this.getChild("shopBtn"),this.moneyNode=this.getChild("moneyNode"),this.headNode=this.getChild("headNode"),this.bigMoveBtn=this.getChild("bigMoveBtn"),this.placeBallBtn=this.getChild("placeBallBtn"),this.classicBtn=this.getChild("classicBtn"),this.globalBtn=this.getChild("globalBtn"),this.n44=this.getChild("n44"),this.signBtn=this.getChild("signBtn"),this.drawBtn=this.getChild("drawBtn"),this.settingNode=this.getChild("settingNode"),this.n45=this.getChild("n45"),this.ganFaMoShiBtn=this.getChild("ganFaMoShiBtn"),this.secretaryBtn=this.getChild("secretaryBtn"),this.rankBtn=this.getChild("rankBtn"),this.n46=this.getChild("n46"),this.liucheng1=this.getChild("liucheng1"),this.rightBtn=this.getChild("rightBtn"),this.n75=this.getChild("n75"),this.secretaryGuide=this.getChild("secretaryGuide"),this.liucheng2=this.getChild("liucheng2"),this.guideBtn=this.getChild("guideBtn"),this.n73=this.getChild("n73"),this.wordsNode=this.getChild("wordsNode"),this.enterGuide=this.getChild("enterGuide"),this.talkNode=this.getChild("talkNode"),this.n83=this.getChild("n83"),this.n84=this.getChild("n84"),this.n_Logout=this.getChild("n_Logout"),this.n_zhuCe=this.getChild("n_zhuCe"),this.n_dengLu=this.getChild("n_dengLu")}}gt.URL="ui://isxx5ak7kt443qc";class mt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","UIMoyu")}onConstruct(){this.ageTip=this.getChild("ageTip"),this.mainBg=this.getChild("mainBg"),this.xyNode=this.getChild("xyNode"),this.rnNode=this.getChild("rnNode"),this.fcmNode=this.getChild("fcmNode"),this.ageNode=this.getChild("ageNode"),this.tipNode=this.getChild("tipNode"),this.msgNode=this.getChild("msgNode")}}mt.URL="ui://37nctnhwxe62v4ea";class yt{static initMoyu(){this.moyuView=new pt,Laya.stage.addChild(this.moyuView.ui.displayObject),this.moyuView.ui.x=(Laya.stage.width-1334)/2,this.moyuView.ui.displayObject.zOrder=1e3,this.moyuView.init(),this.moyuView.showTip(!0),this.moyuView.showAge(!0,0,Laya.stage.height-320),window.XApk=this}static showAge(t){this.moyuView&&this.moyuView.showAge(t)}static onPlatMsg(t){yt.moyuView&&"0"==t&&yt.moyuView.showTip(!1)}static showAgree(t){this.moyuView?this.moyuView.showAgree(t):t&&t()}static showXy(t=1){this.moyuView&&this.moyuView.showXy(t)}}yt.isAdvise=!1;class pt{constructor(){this.ysxyNum=1,this.ysJson=null,this.ui=mt.createInstance()}init(){this.ui.mainBg.visible=!1,this.ui.xyNode.visible=!1,this.ui.ageNode.visible=!1,this.ui.tipNode.visible=!1,this.ui.rnNode.visible=!1,this.ui.fcmNode.visible=!1,this.ui.ageTip.visible=!1,this.ui.msgNode.visible=!1,this.ui.visible=!1,this.ui.xyNode.xyList.setVirtual(),this.ui.xyNode.xyList.itemRenderer=Laya.Handler.create(this,this.renderListItem,null,!1),this.ui.ageNode.btnAge.onClick(this,this.onClick,[this.ui.ageNode.btnAge]),this.ui.tipNode.onClick(this,this.onClick,[this.ui.tipNode]),this.ui.ageTip.onClick(this,this.onClick,[this.ui.ageTip]),this.ui.xyNode.btnKnown.visible=!1,this.ui.xyNode.xy1.visible=!1,this.ui.xyNode.xy2.visible=!1,this.ui.xyNode.btnXy1.visible=this.ui.xyNode.btnXy2.visible=!1,this.ui.xyNode.btnSure.visible=this.ui.xyNode.btnXy3.visible=!1,this.ui.xyNode.btnXy1.onClick(this,this.onClick,[this.ui.xyNode.btnXy1]),this.ui.xyNode.btnXy2.onClick(this,this.onClick,[this.ui.xyNode.btnXy2]),this.ui.xyNode.btnXy3.onClick(this,this.onClick,[this.ui.xyNode.btnXy3]),this.ui.xyNode.btnNo.onClick(this,this.onClick,[this.ui.xyNode.btnNo]),this.ui.xyNode.btnYes.onClick(this,this.onClick,[this.ui.xyNode.btnYes]),this.ui.xyNode.btnSure.onClick(this,this.onClick,[this.ui.xyNode.btnSure]),this.ui.xyNode.btnBack.onClick(this,this.onClick,[this.ui.xyNode.btnBack]),this.ui.xyNode.btnKnown.onClick(this,this.onClick,[this.ui.xyNode.btnKnown]),this.ui.rnNode.btnExit.onClick(this,this.onClick,[this.ui.rnNode.btnExit]),this.ui.rnNode.btnCheck.onClick(this,this.onClick,[this.ui.rnNode.btnCheck]),this.ui.rnNode.btnDone.onClick(this,this.onClick,[this.ui.rnNode.btnDone]),this.ui.fcmNode.btnRn.onClick(this,this.onClick,[this.ui.fcmNode.btnRn]),(Moyu.isVVApk||Moyu.isOPApk||Moyu.isTTApk||Moyu.isOppo||Moyu.isVivo)&&(this.ysxyNum=2)}onClick(t){switch(Ea.soundMgr.playSound(Ea.common.btnClickStr),t){case this.ui.ageTip:Moyu.isTTApk&&(this.ui.ageNode.visible=!0,this.ui.mainBg.visible=!0);break;case this.ui.tipNode:this.showTip(!1);break;case this.ui.ageNode.btnAge:this.ui.ageNode.visible=!1,this.ui.mainBg.visible=!1,this.ui.xyNode.visible||this.ui.rnNode.visible||(this.ui.visible=!1);break;case this.ui.xyNode.btnXy3:case this.ui.xyNode.btnXy1:this.loadXy(1);break;case this.ui.xyNode.btnXy2:this.loadXy(2);break;case this.ui.xyNode.btnBack:this.ui.xyNode.xy1.visible=!0,this.ui.xyNode.xy2.visible=!1;break;case this.ui.xyNode.btnKnown:this.ui.xyNode.visible=!1,this.ui.mainBg.visible=!1,this.ui.visible=!1;break;case this.ui.rnNode.btnCheck:this.check();break;case this.ui.rnNode.btnExit:case this.ui.xyNode.btnNo:this.ysxyNum--,this.ysxyNum>0?this.showMsg("Refuse to quit the game once again"):(Moyu.userAgree(!1),Moyu.exit());break;case this.ui.xyNode.btnSure:case this.ui.xyNode.btnYes:Wa.userData.isAgree=!0,Wa.saveUserData(),this.onAgree();break;case this.ui.rnNode.btnDone:this.ui.rnNode.visible=!1,this.ui.visible=!1;break;case this.ui.fcmNode.btnRn:this.showRn()}}showTip(t){(Moyu.isVVApk||Moyu.isOPApk)&&(t?(yt.isAdvise=!0,this.ui.visible=!0,this.ui.tipNode.visible=!0,this.ui.tipNode.alpha=1,Laya.timer.once(1e3,this,this.showTip,[!1])):(this.ui.tipNode.alpha=1,this.ui.tipNode.visible=!0,Laya.Tween.to(this.ui.tipNode,{alpha:0},500,null,Laya.Handler.create(this.ui,()=>{this.ui.tipNode.visible=!1,yt.isAdvise=!1}),1e3)))}showAge(t,e=0,i=0){Moyu.platType>10&&!Moyu.isIos&&(this.ui.ageTip.x=e,this.ui.ageTip.y=i,this.ui.ageTip.visible=t,t&&(this.ui.visible=!0))}showAgree(t){this.agreeCall=t,this.onAgree()}onAgree(){this.ui.ageNode.visible||(this.ui.visible=!1),this.ui.xyNode.visible=!1,Moyu.userAgree(!0),this.showAge(!1),this.agreeCall&&this.agreeCall(),this.showRn()}showMsg(t){this.ui.msgNode.txtMsg.text=t,this.ui.msgNode.visible=!0,this.ui.msgNode.alpha=1,this.ui.visible=!0,Laya.Tween.to(this.ui.msgNode,{alpha:0},600,null,Laya.Handler.create(this.ui,()=>{this.ui.msgNode.visible=!1}),2500,!0)}showRn(){if((Moyu.isTTApk||Moyu.isPlat(MoyuPlat.hhw))&&(!Moyu.isRealName||Moyu.gameTime<999))return this.ui.rnNode.rn1.visible=!0,this.ui.rnNode.rn2.visible=!1,this.ui.rnNode.rn3.visible=!1,this.ui.rnNode.rn4.visible=!1,this.ui.rnNode.visible=!0,this.ui.mainBg.visible=!0,this.ui.rnNode.btnDone.visible=!1,this.ui.rnNode.btnExit.visible=!0,this.ui.rnNode.btnCheck.visible=!0,this.ui.fcmNode.visible=!1,void(this.ui.visible=!0);this.showFcm()}showFcm(){(Moyu.isTTApk||Moyu.isPlat(MoyuPlat.hhw))&&(Moyu.initFCM(!0),Moyu.gameTime<1?this.fcmLoop():Moyu.gameTime<999&&Laya.timer.loop(1e4,this.ui,this.fcmLoop))}fcmLoop(){Moyu.gameTime<1&&(this.ui.rnNode.visible=!1,this.ui.fcmNode.visible=!0,this.ui.mainBg.visible=!0,this.ui.visible=!0,this.ui.fcmNode.btnRn.visible=!Moyu.isLegal,Laya.timer.clear(this.ui,this.fcmLoop))}check(){if(this.ui.rnNode.rn2.visible||this.ui.rnNode.rn1.visible)this.ui.rnNode.rn1.visible=!1,this.ui.rnNode.rn2.visible=!1,this.ui.rnNode.rn4.visible=!0;else if(this.ui.rnNode.rn4.visible){let t=this.ui.rnNode.inputName.text,e=this.ui.rnNode.inputCode.text;e&&18==e.length?(this.ui.rnNode.rn1.visible=!1,this.ui.rnNode.rn4.visible=!1,Moyu.authenticate(t,e,t=>{this.ui.rnNode.rn2.visible=!t,this.ui.rnNode.rn3.visible=t,this.ui.rnNode.btnDone.visible=t,this.ui.rnNode.btnExit.visible=!t,this.ui.rnNode.btnCheck.visible=!t,t&&this.showFcm()})):this.showMsg("信息填写不完整")}}loadXy(t=0){this.ui.xyNode.xy1.visible=!1,this.ui.xyNode.xy2.visible=!0,this.ui.xyNode.xyList.scrollToView(0),1==t?Laya.loader.load("app/xy/yiiwan_ys.json",Laya.Handler.create(this,this.createXY)):2==t&&Laya.loader.load("app/xy/yiiwan_yh.json",Laya.Handler.create(this,this.createXY))}showXy(t=0){this.xyBtn(),0==t?Moyu.isPlat(MoyuPlat.f399Apk)?this.ui.xyNode.btnSure.visible=!0:(this.ui.xyNode.btnYes.visible=!0,this.ui.xyNode.btnNo.visible=!0):(this.ui.xyNode.btnKnown.visible=!0,this.ui.mainBg.visible=!0),this.ui.xyNode.xy1.visible=!0,this.ui.xyNode.xy2.visible=!1,this.ui.xyNode.visible=!0,this.ui.visible=!0}xyBtn(){this.ui.xyNode.btnSure.visible=!1,this.ui.xyNode.btnYes.visible=!1,this.ui.xyNode.btnNo.visible=!1,this.ui.xyNode.btnKnown.visible=!1,this.ui.xyNode.btnXy3.visible=!1,this.ui.xyNode.btnXy2.visible=!0,this.ui.xyNode.btnXy1.visible=!0,this.ui.xyNode.xy1.text="Welcome to《8Ball Fury》"}createXY(t){this.ysJson=t.content,this.ui.xyNode.txtTitle.text=t.title.replace("GAMENAME","8Ball Fury"),this.ui.xyNode.xyList.numItems=this.ysJson.length,this.ui.xyNode.xy2.visible=!0}renderListItem(t,e){let i=this.ysJson[t];e.height=30*i.line,e.xyItem.text=i.text}onDestroy(){this.agreeCall=null}}class ft{constructor(t){this.showSetting=!1,this.openSound=!0,this.openShake=!0,this.ui=t,this.ui.soundBtn.onClick(this,this.switchSound),this.ui.shakeBtn.onClick(this,this.switchShake),this.ui.xyBtn.onClick(this,this.onXy),this.ui.clickNode.onClick(this,this.changeSetting),this.ui.xyBtn.visible=Moyu.isVivo||Moyu.isOppo||Moyu.isOPApk||Moyu.isVVApk,this.ui.xyBtn.visible=!1,this.ui.shakeBtn.visible=!1}changeSetting(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.showSetting=!this.showSetting,this.ui.c1.selectedIndex=this.showSetting?1:0}switchSound(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.openSound=!this.openSound,Moyu.onSetting(this.openSound,this.openShake),Ea.soundMgr.onSetting(this.openSound),this.ui.soundBtn.c1.selectedIndex=this.openSound?0:1}switchShake(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.openShake=!this.openShake,Moyu.onSetting(this.openSound,this.openShake),this.ui.shakeBtn.c1.selectedIndex=this.openShake?0:1}onXy(){Ea.soundMgr.playSound(Ea.common.btnClickStr),yt.showXy(1)}}class xt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UILevelDisplay")}onConstruct(){this.n9=this.getChild("n9"),this.myNode=this.getChild("myNode"),this.closeNode=this.getChild("closeNode")}}xt.URL="ui://isxx5ak7avag46o";class Ct extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UILevelProp")}onConstruct(){this.n16=this.getChild("n16"),this.myNode=this.getChild("myNode"),this.closeBtn=this.getChild("closeBtn"),this.moneyNode=this.getChild("moneyNode"),this.t1=this.getTransition("t1")}}Ct.URL="ui://isxx5ak7xs1r47l";class bt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ShowItem")}onConstruct(){this.myImg=this.getChild("myImg")}}bt.URL="ui://isxx5ak710hfv49o";class It{constructor(){this.ui=bt.createInstance()}destroySelf(){this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose())}setParent(t){t.addChild(this.ui)}setPos(t,e){this.ui.x=t,this.ui.y=e}setUrl(t){this.ui.myImg.url=Ea.common.getGameIconUrl("q"+t)}}class kt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIPower")}onConstruct(){this.n11=this.getChild("n11"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}kt.URL="ui://isxx5ak7jpszv4n1";class wt extends A{constructor(){super()}onConstructor(){this.ui=kt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.hide),this.addUIClick(this.ui.myNode.videoBtn,this.videoGetPower)}show(){super.show(),this.ui.t0.play()}videoGetPower(){if(console.log("zh:qjff_AD_for_uipower"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uipower")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uipower())}qjff_AD_for_uipower(){Wa.setPower(Ea.common.videoPower,!0),Ea.eventMgr.event(p),this.hide()}}wt.uiName="UIPower";class vt{test1(){vt.setItem("playerName","Tom"),vt.setItem("playerLevel",5),vt.setItem("playerData",{score:100,level:3});const t=vt.getItem("playerName"),e=vt.getItem("playerLevel"),i=vt.getItem("playerData");console.log(t),console.log(e),console.log(i),vt.removeItem("playerLevel")}static setItem(t,e){Laya.LocalStorage.setItem(t,JSON.stringify(e))}static getItem(t){const e=Laya.LocalStorage.getItem(t);if(null===e)return null;try{return JSON.parse(e)}catch(t){return e}}static removeItem(t){Laya.LocalStorage.removeItem(t)}static clear(){Laya.LocalStorage.clear()}static hasJosnKey(t){return null!=Laya.LocalStorage.getJSON(t)}static hasKey(t){return null!==Laya.LocalStorage.getItem(t)}}class Nt extends A{constructor(){super(),this.firstPos=385,this.secondPos=467,this.showItemArr=[]}onFontLoaded(){try{this.ui.myNode.conditionTxt.font="arial",console.log("zh: onFontLoaded 设置arial字体成功")}catch(t){console.log("zh: constructor onFontLoaded加载arial字体失败")}}onConstructor(){this.ui=Ct.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.hide),this.moneyNode=new Ne(this.ui.moneyNode),this.addUIClick(this.ui.myNode.startBtn,this.startGame)}show(t){super.show(),this.ui.t1.play(),this.level=t,this.data=cfgTable.placeballData[this.level],this.updateSelf(),this.showPreView(),this.moneyNode.ui.c1.selectedIndex=2,this.moneyNode.checkPowerTime(),this.moneyNode.powerChange()}showPreView(){let t,e;for(let e=0;e<this.showItemArr.length;e++)(t=this.showItemArr[e]).destroySelf();this.showItemArr=[];let i=Ea.cfgMgr.getPlaceBallByLevel(this.level);for(const s in i)e=i[s],(t=new It).setParent(this.ui.myNode.displayRoot),t.setPos(e.x,e.y),t.setUrl(e.value),this.showItemArr.push(t)}updateSelf(){this.ui.myNode.levelTxt.text=`Level ${this.level}`,this.ui.myNode.modeNode.c1.selectedIndex=this.data.type,-1==this.data.ball?this.ui.myNode.conditionTxt.text="Pocket all the balls on the table":this.ui.myNode.conditionTxt.text=`Successfully pocketed ${this.data.ball} balls in total`;let t=Wa.getPlaceBallLevel(this.level).getAward,e=cfgTable.placeballData[this.level],i=this.data.award[0],s=this.data.award[1];e.type==w.challenge&&(s=0,i=100),this.ui.myNode.coinNode.visible=0!=i,this.ui.myNode.diamondNode.visible=0!=s,this.ui.myNode.coinNode.numTxt.text=i+"",e.type==w.challenge&&(this.ui.myNode.coinNode.numTxt.text=""),this.ui.myNode.diamondNode.numTxt.text=s+"",i>0&&s>0?(this.ui.myNode.diamondNode.x=385,this.ui.myNode.coinNode.x=467):(this.ui.myNode.diamondNode.x=385,this.ui.myNode.coinNode.x=385),t?(this.ui.myNode.diamondNode.c1.selectedIndex=1,this.ui.myNode.coinNode.c1.selectedIndex=1):(this.ui.myNode.coinNode.c1.selectedIndex=0,this.ui.myNode.diamondNode.c1.selectedIndex=0)}startGame(){Wa.powerEnough()?(console.log("zh:powerEnough ="+Wa.powerEnough()),this.ui.myNode.startBtn.touchable=!1,this.ui.myNode.startBtn.powerEft.t0.play(Laya.Handler.create(this,()=>{console.log("zh:startGame "),this.ui.myNode.startBtn.touchable=!0,Wa.setPower(-1),Ea.eventMgr.event(p),Ea.common.gameMode=C.placeBall,Ea.common.placeBallCurLevel=this.level,Ea.uiMgr.Show(we),this.logEventForChallenge_level_start(this.level),Ea.uiMgr.Hide(St),Ea.uiMgr.Hide(se),this.hide()}))):(console.log("zh:powerEnough 不足 ="+Wa.powerEnough()),Ea.uiMgr.Show(wt))}logEventForChallenge_level_start(t){let e="sjmd_challenge_level_start",i={count:1,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const s=vt.getItem(e);t>s.level&&(i.count=s.count+1,vt.setItem(e,i))}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_start",s)}hide(){super.hide()}}Nt.uiName="UILevelProp";class Lt{constructor(t,e){this.index=0,this.ui=t,this.index=e,this.ui.onClick(this,this.clickSelf),this.updateSelf(),this.ui.levelTxt.text=this.index+1+"",this.ui.challenge.levelTxt.text=this.index+1+"",this.ui.special.levelTxt.text=this.index+1+""}updateSelf(){let t=this.index+1;this.data=Wa.getPlaceBallLevel(t),this.ui.starNode.c1.selectedIndex=this.data.star;let e=cfgTable.placeballData[t].type;this.data.isCur?this.ui.c1.selectedIndex=e?5:2:this.data.play?3==this.data.star?this.ui.c1.selectedIndex=0:this.ui.c1.selectedIndex=1:this.ui.c1.selectedIndex=e?4:3}clickSelf(){this.data.play&&(Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.uiMgr.Show(Nt,this.index+1))}}class St extends A{constructor(){super()}onConstructor(){this.ui=xt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.myList=this.ui.myNode.myList,this.addUIClick(this.ui.closeNode.closeBtn,this.hide),this.levelItemArr=[];let t=Ea.cfgMgr.getMaxPlaceBall();this.myList.itemRenderer=Laya.Handler.create(this,this.levelItemRender,null,!1),this.myList.numItems=t,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}levelItemRender(t,e){let i=new Lt(e,t);this.levelItemArr.push(i)}show(){super.show(),this.updateLevel(),this.scrollToPlace()}updateLevel(){let t;for(let e=0;e<this.levelItemArr.length;e++)(t=this.levelItemArr[e]).updateSelf()}scrollToPlace(){let t=Ea.cfgMgr.getMaxPlaceBall(),e=Wa.getPlaceBallLevelList().length;e>=t-1&&(e=t-1),this.myList.scrollToView(e,!0,!0)}hide(){super.hide()}}St.uiName="UILevelDisplay";class Ut extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIMatching")}onConstruct(){this.n5=this.getChild("n5"),this.n49=this.getChild("n49"),this.n51=this.getChild("n51"),this.n64=this.getChild("n64"),this.n2=this.getChild("n2"),this.n53=this.getChild("n53"),this.n54=this.getChild("n54"),this.n56=this.getChild("n56"),this.n58=this.getChild("n58"),this.n59=this.getChild("n59"),this.n57=this.getChild("n57"),this.n60=this.getChild("n60"),this.n62=this.getChild("n62"),this.awardTxt=this.getChild("awardTxt"),this.n61=this.getChild("n61"),this.selfHead=this.getChild("selfHead"),this.aiHead=this.getChild("aiHead"),this.n82=this.getChild("n82"),this.n84=this.getChild("n84"),this.n83=this.getChild("n83"),this.t1=this.getTransition("t1"),this.t2=this.getTransition("t2"),this.t3=this.getTransition("t3"),this.t4=this.getTransition("t4")}}Ut.URL="ui://isxx5ak7n0xy3y2";class Bt extends A{constructor(){super()}onConstructor(){this.ui=Ut.createInstance(),this.contentPane=this.ui,this.isEject=!1}show(t){super.show(),Y.showBanner(!0),this.callback=t;let e=Moyu.getUserInfo();switch(this.selfPot||(this.selfPot=new Laya.Point(this.ui.selfHead.x,this.ui.selfHead.y)),this.aiPot||(this.aiPot=new Laya.Point(this.ui.aiHead.x,this.ui.aiHead.y)),this.ui.awardTxt.text=Ea.common.passAwardCoin+"",this.ui.selfHead.nameTxt.text=e.nickName,Ea.common.createHead(this.ui.selfHead.headImg,e.headIcon),this.ui.aiHead.nameTxt.text="???",this.ui.aiHead.headImg.url=Ea.common.getGameIconUrl("cstx"),this.ui.selfHead.c1.selectedIndex=0,this.ui.aiHead.c1.selectedIndex=0,this.ui.selfHead.x=this.selfPot.x,this.ui.selfHead.y=this.selfPot.y,this.ui.aiHead.x=this.aiPot.x,this.ui.aiHead.y=this.aiPot.y,Ea.common.gameMode){case C.classic:break;case C.bigMove:this.initSkillData()}this.ui.t1.play(Laya.Handler.create(this,()=>{this.ui.t2.play(Laya.Handler.create(this,()=>{switch(Ea.common.gameMode){case C.classic:this.waitingPeople();break;case C.bigMove:this.skillSelectFinish(Ea.common.curPlayerSkillType)}}))}))}initSkillData(){this.skillSelectData=[];let t=Ea.common.skillIconList,e=Ea.common.skillNameList,i=Wa.getBigSkillList(),s=[b.highSpace,b.breakArmy,b.ice,b.GuanYu];for(let o=0;o<5;o++){let n={};n.skillImg=t[o],n.skillName=e[o],n.skillType=s[o],n.skillLevel=i[o],this.skillSelectData.push(n)}}getAISkillLevel(t){let e,i;return(e=(i=Ea.common.upSkillLevel?Ea.common.randomNum(-2,-1):t<=5?Ea.common.randomNum(1,3):t<=9?Ea.common.randomNum(-2,1):Ea.common.randomNum(-4,0))+t)<=1&&(e=1),e>=10&&(e=10),e}getAISkillType(){return Ea.common.randomNum(1,4)}getAISkillData(t){let e=this.skillSelectData[t].skillLevel,i=this.getAISkillLevel(e),s=this.getAISkillType()-1;return({aiLevel:i,aiType:s}={aiLevel:i,aiType:s})}skillSelectFinish(t){let e=this.getAISkillData(t);Ea.common.gameMgr.selfCurSkill=t,Ea.common.gameMgr.aiCurSkill=e.aiType,Ea.common.gameMgr.aiSkillLevelNum=e.aiLevel,this.ui.selfHead.c1.selectedIndex=1,this.ui.aiHead.c1.selectedIndex=1;let i=this.skillSelectData[t];this.ui.selfHead.skillImg.url=Ea.common.getGameIconUrl(i.skillImg);let s=Wa.getSkillGuide();this.ui.selfHead.skillTxt.text=0==s?i.skillName+" Max Level":i.skillName+"Lv."+i.skillLevel;let o=this.skillSelectData[e.aiType];this.ui.aiHead.skillImg.url=Ea.common.getGameIconUrl(o.skillImg),this.ui.aiHead.skillTxt.text=o.skillName+"Lv."+e.aiLevel,this.waitingPeople()}waitingPeople(){let t=Ea.common.randomNum(1e3,3e3);t+=1e3,Laya.timer.once(t,this,()=>{this.matchingSuccess()})}matchingSuccess(){let t=Ea.common.gameUI,e=t.ui.topNode.aiNameTxt.text,i=t.ui.topNode.aiHeadLoader.url;this.ui.aiHead.nameTxt.text=e,this.ui.aiHead.headImg.url=i,e=t.ui.topNode.selfNameTxt.text,i=t.ui.topNode.selfHeadLoader.url,this.ui.selfHead.nameTxt.text=e,this.ui.selfHead.headImg.url=i,this.ui.t3.play(Laya.Handler.create(this,()=>{this.callback&&this.callback(),this.ui.t4.play(Laya.Handler.create(this,()=>{this.destroySelf()}))}))}destroySelf(){this.callback=null,this.skillSelectData=null,this.selfPot=null,this.aiPot=null,this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose()),Ea.uiMgr.destroyUI(this)}}Bt.uiName="UIMatching";class Mt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIRanking")}onConstruct(){this.n26=this.getChild("n26"),this.myNode=this.getChild("myNode")}}Mt.URL="ui://isxx5ak7p7rrv4p8";class Tt extends A{constructor(){super(),this.showSelf=!0,this.rankType=1,this.rankList=[],this.topX=10,this.myIndex=this.topX+1,this.myStar=0}onConstructor(){this.ui=Mt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.closeBtn,this.hide),this.addUIClick(this.ui.myNode.changeBtn,this.changeSelfNode),this.addUIClick(this.ui.myNode.starBtn,this.changeList,[1]),this.addUIClick(this.ui.myNode.levelBtn,this.changeList,[2]),this.ui.myNode.myList.setVirtual(),this.ui.myNode.myList.itemRenderer=Laya.Handler.create(this,this.updateItemUI,null,!1)}show(){super.show(),this.getPaiHangBangDataFormJosnFile(),this.updateSelf(),Moyu.getUserInfo().isAuth||Moyu.initUser(this,()=>{Wa.upRankData()})}getPaiHangBangDataFormJosnFile(){const t=cfgTable.paiHangBangData.list;this.updateItemData(t)}updateSelfItem(){console.log("zh:Moyu.platType ="+Moyu.platType);let t=Moyu.getUserInfo();this.ui.myNode.selfNode.c1.selectedIndex=this.myIndex<4?this.myIndex-1:3,this.ui.myNode.selfNode.rankTxt.text=this.myIndex>this.topX?"No Rank":this.myIndex.toString(),this.myIndex>this.topX?this.ui.myNode.selfNode.rankTxt.fontSize=36:this.ui.myNode.selfNode.rankTxt.fontSize=30,this.ui.myNode.selfNode.valueTxt.text=this.myStar+"",this.ui.myNode.selfNode.nameTxt.text="myself",Ea.common.createHead(this.ui.myNode.selfNode.headNode.head.myIcon,t.headIcon)}updateItemData(t){if(this.myStar=Ea.common.getAllStarNum(),this.rankList.length<2){this.rankList=t;let e=Moyu.getUserInfo();console.log("zh:myself iuserinfo = "+JSON.stringify(e)),e.headIcon=e.headIcon;for(let i=0;i<t.length;i++){if(this.rankList[i].userId==e.userId){this.rankList.splice(i,1);break}}for(let i=0;i<t.length;i++){if(this.rankList[i].rankScore<this.myStar&&this.myIndex>this.topX){this.myIndex=i+1;let t={headIcon:e.headIcon,nickName:"myself"},s={user:t,data:{}},o={rankScore:this.myStar.toString(),userId:e.userId,userData:JSON.stringify(s)};console.log("zh:Moyu.platType = "+Moyu.platType),Moyu.platType<11&&(t.headIcon=e.headIcon,t.nickName=e.nickName),this.rankList.splice(i,0,o);break}}}this.updateSelfItem(),this.ui.myNode.myList.numItems=this.rankList.length}updateItemUI(t,e){let i=this.rankList[t],s=JSON.parse(i.userData).user;switch(e.nameTxt.text=s.nickName.toString(),e.valueTxt.text=i.rankScore,Ea.common.createHead(e.headNode.head.myIcon,s.headIcon,80),e.rankTxt.text=t+1,t){case 0:this.setImg(e,1,0,0),e.rankTxt.color="#FFC047";break;case 1:this.setImg(e,0,1,0),e.rankTxt.color="#ACACAC";break;case 2:this.setImg(e,0,0,1),e.rankTxt.color="#D09672";break;default:this.setImg(e,0,0,0),e.rankTxt.color="#496FAB"}}setImg(t,e,i,s){t.img1.visible=!!e,t.img2.visible=!!i,t.img3.visible=!!s}changeList(t){this.rankType=t,this.updateSelf()}changeSelfNode(){this.showSelf=!this.showSelf,this.updateSelf()}updateSelf(){this.ui.myNode.changeBtn.c1.selectedIndex=this.showSelf?0:1,this.ui.myNode.c2.selectedIndex=this.showSelf?0:1,this.ui.myNode.c1.selectedIndex=1==this.rankType?0:1,this.ui.myNode.levelBtn.c1.selectedIndex=1==this.rankType?1:0,this.ui.myNode.starBtn.c1.selectedIndex=1==this.rankType?0:1}}Tt.uiName="UIRanking";class Ot extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UISecretary")}onConstruct(){this.n0=this.getChild("n0"),this.myNode=this.getChild("myNode"),this.closeBtn=this.getChild("closeBtn"),this.t0=this.getTransition("t0")}}Ot.URL="ui://isxx5ak7s46iv4f1";class jt extends A{constructor(){super(),this.curIndex=1}onConstructor(){this.ui=Ot.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.nodeObj={left:null,right:null,cur:null},this.nodeObj.cur=this.ui.myNode.gameNode3}show(){super.show(),this.ui.t0.play(),this.updateData()}addSecretarySpine(t,e){if("mishu"==e)if(this.secretarySpine1)t.displayObject.destroyChildren(),this.playWoman(this.secretarySpine1,t.displayObject);else{let e=new q("mishu",()=>{this.secretarySpine1=e,this.playWoman(this.secretarySpine1,t.displayObject)})}else if(this.secretarySpine2)t.displayObject.destroyChildren(),this.playWoman(this.secretarySpine2,t.displayObject);else{let e=new q("xiaomishu2",()=>{this.secretarySpine2=e,this.playWoman(this.secretarySpine2,t.displayObject)})}}playWoman(t,e){let i=this.ui.myNode.gameNode3.secretary.width/2,s=this.ui.myNode.gameNode3.secretary.height,o=1.5;t==this.secretarySpine2&&(o=1.2);let n={x:i,y:s,scaleX:o,scaleY:o};t.play(n,0,!0,e)}turnLeft(){this.curIndex--,this.curIndex<1&&(this.curIndex=2);let t=this.nodeObj.left,e=this.nodeObj.right,i=this.nodeObj.cur;Laya.Tween.to(t,{x:180,scaleX:.8,scaleY:.8,alpha:.3},500),Laya.Tween.to(e,{x:0,scaleX:1,scaleY:1,alpha:1},500),Laya.Tween.to(i,{x:-180,scaleX:.8,scaleY:.8,alpha:.3},500,null,Laya.Handler.create(this,()=>{this.updateData()})),this.ui.myNode.setChildIndex(e,2),this.nodeObj.left=i,this.nodeObj.right=t,this.nodeObj.cur=e}turnRight(){this.curIndex++,this.curIndex>2&&(this.curIndex=1);let t=this.nodeObj.left,e=this.nodeObj.right,i=this.nodeObj.cur;Laya.Tween.to(i,{x:180,scaleX:.8,scaleY:.8,alpha:.3},500),Laya.Tween.to(t,{x:0,scaleX:1,scaleY:1,alpha:1},500),Laya.Tween.to(e,{x:-180,scaleX:.8,scaleY:.8,alpha:.3},500,null,Laya.Handler.create(this,()=>{this.updateData()})),this.ui.myNode.setChildIndex(t,2),this.nodeObj.left=e,this.nodeObj.right=i,this.nodeObj.cur=t}updateData(){console.log("zh: updateData FFFFFFFFFF");let t,e,i=cfgTable.secretaryshopData,s=this.ui.myNode._children;for(let o=0;o<s.length;o++){t=s[o],e=i[1],t.heightTxt.text=e.height,t.foodTxt.text=e.food,t.historyTxt.text=e.history,t.nameImg.url=Ea.common.getGameIconUrl(e.nameImg),this.addSecretarySpine(t.secretary,e.spine);let n=e.id-1,a=Wa.getSecretary(n),h=Wa.getCurSecretary();a?t.purchaseBtn.c1.selectedIndex=h==n?1:2:(t.purchaseBtn.c1.selectedIndex=0,t.purchaseBtn.diamondTxt.text=e.price+""),t.purchaseBtn.visible=!1}}clickSecretary(t,e,i,s){if(console.log("zh: 点击了clickSecretary "),Ea.soundMgr.playSound(Ea.common.btnClickStr),t)e!=i&&(console.log(),Wa.setCurSecretary(i),this.updateData());else{console.log("zh:点击购买了");let t=s;Wa.diamondEnough(t)?(Wa.setDiamond(-t),Wa.setSecretary(i,1),Wa.setCurSecretary(i),this.updateData()):Ea.uiMgr.Show(ve,1)}}closeSelf(){this.hide()}}jt.uiName="UISecretary";class Dt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIShop")}onConstruct(){this.n48=this.getChild("n48"),this.n0=this.getChild("n0"),this.secretary=this.getChild("secretary"),this.talkNode=this.getChild("talkNode"),this.closeNode=this.getChild("closeNode"),this.moneyNode=this.getChild("moneyNode"),this.myNode=this.getChild("myNode")}}Dt.URL="ui://isxx5ak7g1giv4ep";class Rt{constructor(t,e){this.index=0,this.uiIndex=0,this.ui=t,this.index=e,this.initData()}initData(){this.ui.purchaseBtn.onClick(this,this.buyBallRod);let t=cfgTable.ballrodData[this.index+1];this.ui.nameTxt.text=t.name,this.ui.rodImg.url=Ea.common.getGameIconUrl(t.img),this.ui.levelNode.c1.selectedIndex=t.quality,this.ui.purchaseBtn.diamondTxt.text=t.price+"",t.spine&&(this.mySpine=new q(t.spine,()=>{let t={x:150,y:70,scaleX:1,scaleY:1};this.mySpine.play(t,0,!0,this.ui.eftRod.displayObject)}))}updateSelf(){console.log("zh:updateSelf -------------- ");let t=Wa.getBallRod(this.index);null==t&&(t=1);let e=Wa.getCurBallRod();console.log("zh:updateSelf 选择的球杆 = "+e),t?e==this.index?this.ui.purchaseBtn.c1.selectedIndex=0:this.ui.purchaseBtn.c1.selectedIndex=1:this.ui.purchaseBtn.c1.selectedIndex=2}buyBallRod(){Ea.soundMgr.playSound(Ea.common.btnClickStr);let t=this.ui.purchaseBtn.c1.selectedIndex;switch(t){case 0:break;case 1:console.log("zh:点击了 USE THIS"),Wa.setCurBallRod(this.index);let e=Wa.getCurBallRod();console.log("zh:updateSelf 选择的球杆 = "+e),Ea.uiMgr.getUI(Pt).updateBallRod();break;case 2:let i=cfgTable.ballrodData[this.index+1],s=i.price;if(Wa.diamondEnough(s)){Wa.setDiamond(-s),Wa.setBallRod(this.index,1),Wa.setCurBallRod(this.index),Ea.uiMgr.getUI(Pt).updateBallRod(),this.logEventForGouMaiGan(t+"-"+i.name)}else Ea.uiMgr.Show(ve,1)}}logEventForGouMaiGan(t){const e={value:t},i=JSON.stringify(e);console.log("zh:ts logEventForGouMaiGan req jsonStr="+i),H.instance.logEventForAdHaveParams("iap_start",i)}}class _t{constructor(t,e){this.index=0,this.uiIndex=0,this.ui=t,this.index=e,this.initData()}initData(){this.ui.btn_buy.onClick(this,this.buyDj);let t=cfgTable.daoJuData[this.index+1];console.log("zh:"+JSON.stringify(t)),this.ui.nameTxt.text=t.name,this.ui.n_jiaGe.text=t.price+"",this.ui.n_zuanShi.text=t.price+"",this.ui.zsImg.url=Ea.common.getGameIconUrl(t.img)}buyDj(){Ea.soundMgr.playSound(Ea.common.btnClickStr)}buyBallRod(){}logEventForGouMaiGan(t){const e={value:t},i=JSON.stringify(e);console.log("zh:ts logEventForGouMaiGan req jsonStr="+i),H.instance.logEventForAdHaveParams("iap_start",i)}}class Pt extends A{constructor(){super(),this.itemNums=0,this.itemNumsForDj=0,this.curType=""}onConstructor(){this.ui=Dt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new Ne(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.addUIClick(this.ui.myNode.n_qiuGan,()=>this.switchBtn("qiugan")),this.addUIClick(this.ui.myNode.n_daoju,()=>this.switchBtn("daoju")),this.addUIClick(this.ui,this.interuptSecretary),console.log("zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = "+this.renderBallRod),this.ui.myNode.myList.itemRenderer=Laya.Handler.create(this,this.renderBallRod,null,!1),this.ballRodArr=[],this.itemNums=Object.keys(cfgTable.ballrodData).length,this.ui.myNode.myList.numItems=this.itemNums,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100),this.ui.myNode.djList.itemRenderer=Laya.Handler.create(this,this.renderDaoJu,null,!1),console.log("zh:obj="+this.ui.myNode.djList),this.daoJuArr=[],this.itemNumsForDj=Object.keys(cfgTable.daoJuData).length,this.ui.myNode.djList.numItems=this.itemNumsForDj,console.log("zh:999="+this.itemNumsForDj)}show(t){super.show(),console.log("zh:show type = "+t),this.curType=0==t?"qiugan":"daoju",this.switchBtn("qiugan"),this.playSecretaryIdle(),this.updateBallRod()}test123(){console.log("zh:test123 ")}switchBtn(t){if(console.log("zh:1111切換 sel type="+t),""==t)t=this.curType;else{if(this.curType==t)return;this.curType=t}"qiugan"==t?(this.ui.myNode.n_qiuGan.c1.selectedIndex=0,this.ui.myNode.n_daoju.c1.selectedIndex=1,this.ui.myNode.c1.selectedIndex=0,this.ui.myNode.myList.visible=!0,this.ui.myNode.djList.visible=!1):(this.ui.myNode.n_qiuGan.c1.selectedIndex=1,this.ui.myNode.n_daoju.c1.selectedIndex=0,this.ui.myNode.c1.selectedIndex=1,this.ui.myNode.myList.visible=!1,this.ui.myNode.djList.visible=!0)}updateBallRod(){for(let t=0;t<this.ballRodArr.length;t++)this.ballRodArr[t].updateSelf()}renderBallRod(t,e){let i=this.getIndexBySort(t+1)-1,s=new Rt(e,i);this.ballRodArr.push(s)}renderDaoJu(t,e){let i=this.getIndexBySortForDj(t+1)-1,s=new _t(e,i);this.daoJuArr.push(s)}getIndexBySort(t){let e=cfgTable.ballrodData;for(const i in e)if(e[i].sort==t)return parseInt(i)}getIndexBySortForDj(t){let e=cfgTable.daoJuData;for(const i in e)if(e[i].sort==t)return parseInt(i)}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}closeSelf(){this.hide()}}Pt.uiName="UIShop";class At extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UISign")}onConstruct(){this.n6=this.getChild("n6"),this.closeNode=this.getChild("closeNode"),this.myNode=this.getChild("myNode"),this.moneyNode=this.getChild("moneyNode"),this.secretary=this.getChild("secretary"),this.talkNode=this.getChild("talkNode"),this.tripleBtn=this.getChild("tripleBtn"),this.normalBtn=this.getChild("normalBtn"),this.tipsNode=this.getChild("tipsNode"),this.againBtn=this.getChild("againBtn"),this.t0=this.getTransition("t0")}}At.URL="ui://isxx5ak7bf9jv4jj";class Et{constructor(t){this.ui=t}updateSelf(t,e,i){let s=cfgTable.signData[t+1];this.ui.titleTxt.text=s.title;let o=s.award[0].split("-"),n=s.award[1].split("-"),a=parseInt(o[1]),h=parseInt(n[1]);this.ui.numTxt1.text=a+"",this.ui.numTxt2.text=h+"",this.ui.myIcon1.url=Ea.common.getGameIconUrl(s.icon[0]),this.ui.myIcon2.url=Ea.common.getGameIconUrl(s.icon[1]),Ea.common.signAwardContainsRod([s.award[0]])?this.ui.numTxt1.visible=!1:this.ui.numTxt1.visible=!0,Ea.common.signAwardContainsRod([s.award[1]])?this.ui.numTxt2.visible=!1:this.ui.numTxt2.visible=!0,this.ui.c1.selectedIndex=t<i?1:t==i?2:0}}class Gt{constructor(t){this.ui=t}updateSelf(t,e,i){let s=cfgTable.signData[t+1];this.ui.titleTxt.text=s.title;let o=s.award[0].split("-"),n=parseInt(o[0]),a=parseInt(o[1]);this.ui.numTxt.text=a+"",n>2?(this.ui.myIcon.url=Ea.common.getComponentUrl("s"+s.icon[0]),this.ui.myIcon.rotation=0):(this.ui.myIcon.url=Ea.common.getGameIconUrl(s.icon[0]),this.ui.myIcon.rotation=0),Ea.common.signAwardContainsRod(s.award)?this.ui.numTxt.visible=!1:this.ui.numTxt.visible=!0,this.ui.c1.selectedIndex=t<i?1:t==i?2:0}}class Ft extends A{constructor(){super(),this.curDayIndex=0,this.starX=0}onConstructor(){this.ui=At.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new Ne(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.initSignItem(),this.addUIClick(this.ui.normalBtn,this.normalGetAward),this.addUIClick(this.ui.againBtn,this.againGetAward)}show(){super.show(),this.ui.t0.play(),this.playSecretaryIdle(),this.updateSign()}initSignItem(){this.signArr=[];for(let t=0;t<6;t++){let e=new Gt(this.ui.myNode["day"+(t+1)]);this.signArr.push(e)}this.signMax=new Et(this.ui.myNode.day7),Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}updateSign(){let t=Ea.common.judgeSameDay();if(this.curDayIndex=Wa.getSignData(),(!this.curDayIndex||this.curDayIndex>=7&&!t)&&(this.curDayIndex=0),t){this.ui.normalBtn.visible=!1;let t=Wa.getExtraSign(),e=!1,i=this.curDayIndex;0==i&&(i=7);let s=cfgTable.signData[i].award[0].split("-")[0];"1"!=s&&"2"!=s||(e=!0);let o=0==t&&e;this.ui.againBtn.visible=o,this.ui.tipsNode.visible=!o}else this.ui.normalBtn.visible=!0,this.ui.tipsNode.visible=!1,this.ui.againBtn.visible=!1;for(let e=0;e<this.signArr.length;e++)this.signArr[e].updateSelf(e,t,this.curDayIndex);this.signMax.updateSelf(6,t,this.curDayIndex)}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}closeSelf(){this.hide()}normalGetAward(){if(!Ea.common.judgeSameDay()){let t,e,i,s=cfgTable.signData[this.curDayIndex+1].award,o=[];for(let n=0;n<s.length;n++){t=s[n].split("-"),e=parseInt(t[0]),i=parseInt(t[1]);let a=new S;a.num=i,a.type=e,o.push(a)}Ea.common.getAward(o,t=>{this.curDayIndex++,this.curDayIndex>7&&(this.curDayIndex=0),Wa.setSignData(this.curDayIndex),Wa.setSignTime((new Date).getTime()),t&&(Wa.setExtraSign(1),Moyu.sendDataEvent("signIn1")),this.updateSign()})}}againGetAward(){if(Moyu.sendDataEvent("signIn2"),console.log("zh:qjff_AD_for_uisign"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uisign")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uisign())}qjff_AD_for_uisign(){let t=this.curDayIndex;0==t&&(t=7);let e,i,s,o=cfgTable.signData[t].award;for(let t=0;t<o.length;t++)e=o[t].split("-"),i=parseInt(e[0]),s=3*parseInt(e[1]),Ea.common.playObjFlyAnim(s,i);Wa.setExtraSign(1),this.updateSign()}}Ft.uiName="UISign";class Ht extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UISkill")}onConstruct(){this.n48=this.getChild("n48"),this.n0=this.getChild("n0"),this.secretary=this.getChild("secretary"),this.talkNode=this.getChild("talkNode"),this.closeNode=this.getChild("closeNode"),this.moneyNode=this.getChild("moneyNode"),this.skillNode=this.getChild("skillNode"),this.guideNode=this.getChild("guideNode")}}Ht.URL="ui://isxx5ak7j69a40z";class zt{constructor(t,e,i){this.starX=0,this.starY=0,this.index=0,this.ui=t,this.data=e,this.index=i,this.initSelf(),console.log("zh:SkillDisplay constructor this.skillData=",e)}initSelf(){this.ui.normalBtn.onClick(this,this.clickAddLevel),this.ui.nameTxt.text=this.data.name,this.ui.describeTxt.text=this.data.describe,this.ui.skillImg.url=Ea.common.getGameIconUrl(this.data.icon),this.ui.startBtn.onClick(this,this.startGame),this.updateSelf()}updateSelf(){this.checkTry();let t=Wa.getBigSkillByIndex(this.index);this.ui.c1.selectedIndex=t>=Ea.common.maxSkillLevel?1:0}checkTry(){let t=this.index,e=Wa.getBigSkillByIndex(t);null==e&&(Wa.setBigSkill(t,1,!1),e=1),this.ui.levelTxt.text="LV."+e,this.index==Wa.gameData.trySkill&&Laya.timer.currTimer<Wa.gameData.tryTime?this.ui.tryNode.visible=!0:this.ui.tryNode.visible=!1}clickAddLevel(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("UpSkill",{id:this.data.index}),console.log("zh:qjff_AD_for_skilldisplay_clickAddLevel"),H.instance.showInternAd("qjff_AD_for_skilldisplay_clickAddLevel")?this.qjff_AD_for_skilldisplay_clickAddLevel():(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_skilldisplay_clickAddLevel())}qjff_AD_for_skilldisplay_clickAddLevel(){Wa.setBigSkill(this.data.index,1),this.updateSelf(),Ea.common.upSkillLevel=!0}startGame(){if(console.log("zh:rod skill startgame"),3==this.data.index)return void alert("Coming soon!");Ea.soundMgr.playSound(Ea.common.btnClickStr);let t=Ea.common.bigMoveNeedCoin;Ea.common.passAwardCoin=2e3;let e=Wa.getSkillGuide();console.log("zh:startGame guide="+e),Ea.common.temSelfLevel=0,0==e&&(t=0,Ea.common.temSelfLevel=100),Wa.coinEnough(t)?(Wa.setCoin(-t),Ea.common.curPlayerSkillType=this.index,0==e&&(Ea.common.curPlayerSkillType=0),console.log("zh: skilldisplay 1"),Ea.uiMgr.Show(we),Ea.uiMgr.Hide(se),Ea.uiMgr.Show(Bt,()=>{Ea.common.gameUI.ui.alpha=1,Ea.common.gameUI.startGame(),Ea.uiMgr.Hide(Vt)}),this.logEventForRod_start()):(console.log("zh: skilldisplay 2"),Ea.uiMgr.Show(ve,0),Moyu.sendDataEvent("AddCoinVideo"))}logEventForRod_start(){let t=Ea.common.curPlayerSkillType;console.log("zh:选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i="sjmd_rod_start_"+t,s={count:0,name:e};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.count=t.count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("rod_start",o)}}class Vt extends A{constructor(){super(),this.skillData=[]}onConstructor(){this.ui=Ht.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new Ne(this.ui.moneyNode),this.initSkillData(),console.log("zh:aaaaaa1111111111"),this.addUIClick(this.ui.closeNode.closeBtn,this.returnUIMain),this.ui.skillNode.skillList.itemRenderer=Laya.Handler.create(this,this.updateSkillItem,null,!1),console.log("zh:aaaaaa22222222"),this.displayList=[],this.ui.skillNode.skillList.numItems=3,this.addUIClick(this.ui,this.interuptSecretary),this.addUIClick(this.ui.guideNode.guideBtn,this.enterGuideLevel),this.ui.talkNode.visible=!1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}show(){super.show(),this.playSecretaryIdle(),this.moneyNode.ui.c1.selectedIndex=1,Laya.timer.clearAll(this),Ea.soundMgr.playSound("s_start"),Ea.common.showGirlTalkPop(13,this.ui.talkNode,this.ui.talkNode.womanTxt);let t=Wa.getSkillGuide();this.ui.guideNode.visible=0==t;let e=this.getSkillItemByUIIndex(0);e.ui.c1.selectedIndex=0==t?1:0,this.ui.guideNode.guideBtn.visible=0==t;for(let t=0;t<this.displayList.length;t++)this.displayList[t].checkTry()}getSkillItemByUIIndex(t){for(let e=0;e<this.displayList.length;e++)if(this.displayList[e].index==t)return this.displayList[e]}enterGuideLevel(){this.getSkillItemByUIIndex(0).startGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart1")}initSkillData(){this.skillData=[];let t,e=Ea.common.skillNameList,i=Ea.common.skillIconList,s=["A strike from the sky, like a meteor tearing through the heavens—delivering a thunderous blow! ","A break shot surging like a raging tide—powerful, explosive, and straight into the pocket!","The power of frost descends—freezing the flow and taking full control of the game!"];console.log("zh:initSkillData 111111111");for(let o=0;o<e.length;o++)(t={}).name=e[o],t.icon=i[o],t.describe=s[o],t.index=o,this.skillData.push(t)}updateSkillItem(t,e){if(null==this.displayList[t]){let i;switch(t){case 0:i=1;break;case 1:i=0;break;case 2:i=2;break;case 3:i=3}let s=new zt(e,this.skillData[i],i);this.displayList.push(s)}}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}returnUIMain(){this.hide(),Ea.common.stopGirlPop(this.ui.talkNode),Ea.uiMgr.Show(se)}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}}Vt.uiName="UISkill";class Wt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIMsg")}onConstruct(){this.tipsNode=this.getChild("tipsNode")}}Wt.URL="ui://isxx5ak7hkrz3qt";class Yt extends A{constructor(){super()}onConstructor(){this.ui=Wt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.isMuti=!0}show(t,e){super.show(),this.ui.tipsNode.msgTxt.text=t,this.ui.alpha=1,Laya.Tween.to(this.ui,{alpha:0},500,null,Laya.Handler.create(this,()=>{this.hide(),e&&e()}),1e3)}}Yt.uiName="UIMsg";class Xt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIModeSelection")}onConstruct(){this.n19=this.getChild("n19"),this.closeBtn=this.getChild("closeBtn"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}Xt.URL="ui://isxx5ak7rz5r458";class qt extends A{constructor(){super()}onConstructor(){this.ui=Xt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.type1,this.enterGame,[1]),this.addUIClick(this.ui.myNode.type2,this.enterGame,[2]),this.addUIClick(this.ui.myNode.type3,this.enterGame,[3]),this.addUIClick(this.ui.closeBtn,this.hide),this.peopleArr=[65,990,580],this.peopleOffest=[5,10,10]}show(t){this.updateSelf(),super.show(),this.ui.t0.play(),this.callback=t}updateSelf(){let t=cfgTable.modeselectData;for(let e=1;e<=3;e++){let i=this.ui.myNode["type"+e];i.need.text=t[e].need,i.tipsTxt.text=`Min ${t[e].need} Eligible`,i.peopleTxt.text=this.getRandPeople(e-1)}}enterGame(t){console.log("zh: 进入经典模式 type: "+t),Ea.common.classicRoomType=t;let e=cfgTable.modeselectData[t],i=e.need;Ea.common.passAwardCoin=e.award,Wa.coinEnough(i)?(Wa.setCoin(-i),this.ui.myNode["type"+t].t0.play(),Laya.timer.once(200,this,()=>{this.callback&&this.callback()}),this.logEventForClassic_start()):(Moyu.sendDataEvent("AddCoinVideo"),Ea.uiMgr.Show(ve,0))}getRandPeople(t){let e=this.peopleOffest[t];return this.peopleArr[t]+Ea.common.randomNum(-e,e)}logEventForClassic_start(){let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_start_"+t,s={difficulty:e,classic_count:1,difficulty_count:1};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.classic_count=t.classic_count+1,s.difficulty_count=t.difficulty_count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("classic_start",o)}}qt.uiName="UIModeSelection";class Jt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIReg")}onConstruct(){this.n38=this.getChild("n38"),this.n9=this.getChild("n9"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n34=this.getChild("n34"),this.closeBtn=this.getChild("closeBtn"),this.lab_tip=this.getChild("lab_tip"),this.n43=this.getChild("n43"),this.txt_ua=this.getChild("txt_ua"),this.n44=this.getChild("n44"),this.txt_up1=this.getChild("txt_up1"),this.n45=this.getChild("n45"),this.txt_up2=this.getChild("txt_up2"),this.btn_gotoLogin=this.getChild("btn_gotoLogin"),this.btn_reg=this.getChild("btn_reg"),this.n50=this.getChild("n50")}}Jt.URL="ui://isxx5ak7bobav57v";class Kt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UILogin")}onConstruct(){this.c1=this.getController("c1"),this.n18=this.getChild("n18"),this.n7=this.getChild("n7"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.closeBtn=this.getChild("closeBtn"),this.btn_gotoReg=this.getChild("btn_gotoReg"),this.btn_login=this.getChild("btn_login"),this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.txt_up=this.getChild("txt_up"),this.n32=this.getChild("n32"),this.txt_ua=this.getChild("txt_ua")}}Kt.URL="ui://isxx5ak7bobav57u";class Zt extends A{constructor(){super()}onConstructor(){this.ui=Kt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.btn_gotoReg,this.gotoRegPage),this.addUIClick(this.ui.btn_login,this.userLogin)}show(){super.show(),this.x=(Laya.stage.width-this.width)/2,this.y=(Laya.stage.height-this.height)/2}closeSelf(){this.hide()}userLogin(){let t=this.ui.txt_ua.text,e=this.ui.txt_up.text;if(t&&e){let i=JSON.stringify({username:t.trim(),password:e.trim(),fromMark:"app_game"});Ea.httpMgr.sendPost2025("loginForApp",i,t=>{try{console.log("zh:res = "+JSON.stringify(t));let e=t.code,i=t.msg;if(200==e){let e="userInfo",s={username:t.username,token:t.token};vt.setItem(e,s),Ea.uiMgr.Show(Yt,i),this.closeSelf()}else Ea.uiMgr.Show(Yt,i)}catch(t){console.log("error="+t),alert(t)}})}else Ea.uiMgr.Show(Yt,"Missing information!")}gotoRegPage(){this.closeSelf(),Ea.uiMgr.Show($t)}}Zt.uiName="UILogin";class $t extends A{constructor(){super()}onConstructor(){this.ui=Jt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.btn_reg,this.regUser),this.addUIClick(this.ui.btn_gotoLogin,this.gotoLogin)}show(){super.show(),this.x=(Laya.stage.width-this.width)/2,this.y=(Laya.stage.height-this.height)/2}closeSelf(){this.hide()}regUser(){this.ui.lab_tip.visible=!1;let t=this.ui.txt_ua.text,e=this.ui.txt_up1.text,i=this.ui.txt_up2.text;if(t&&e&&i&&e==i){let i=JSON.stringify({username:t.trim(),password:e.trim(),fromMark:"app_game"});Ea.httpMgr.sendPost2025("registerForApp",i,t=>{try{console.log("zh:res = "+JSON.stringify(t));let e=t.code,i=t.msg;Ea.uiMgr.Show(Yt,i),200==e?(this.ui.lab_tip.color="#FFFFFF",Ea.uiMgr.Show(Yt,i),this.closeSelf()):(this.ui.lab_tip.color="#FF0000",Ea.uiMgr.Show(Yt,i))}catch(t){console.log("error="+t),alert(t)}})}else e!=i?Ea.uiMgr.Show(Yt,"Password mismatch!"):Ea.uiMgr.Show(Yt,"Missing information!")}gotoLogin(){this.closeSelf(),Ea.uiMgr.Show(Zt)}}$t.uiName="UIReg";class Qt extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIGetAward")}onConstruct(){this.n4=this.getChild("n4"),this.n0=this.getChild("n0"),this.myList=this.getChild("myList"),this.n1=this.getChild("n1"),this.eftNode=this.getChild("eftNode"),this.btnNode=this.getChild("btnNode"),this.t0=this.getTransition("t0")}}Qt.URL="ui://isxx5ak7p4tr426";class te extends A{constructor(){super(),this.showTriple=!0}onConstructor(){this.ui=Qt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.btnNode.tripleBtn,this.tripleGetAward),this.addUIClick(this.ui.btnNode.normalBtn,this.normalGetAward),this.ui.myList.itemRenderer=Laya.Handler.create(this,this.renderItem,null,!1)}show(t,e,i){super.show(),this.ui.t0.play(),this.ui.eftNode.visible=!0,this.ui.eftNode.t0.play(Laya.Handler.create(this,()=>{this.ui.eftNode.visible=!1}),1,0,0,.9),this.awardArr=t,this.showTriple=e,this.callback=i,this.ui.btnNode.c1.selectedIndex=this.showTriple?0:1,this.ui.myList.numItems=t.length,Ea.soundMgr.playSound("getaward")}updateSelf(t,e){let i=this.awardArr[t],s=this.getIcon(i.type),o=s;i.type>2&&(o="s"+s),e.myIcon.url=Ea.common.getGameIconUrl(o),e.myIcon.rotation=0,e.numTxt.text=i.num+"",e.numTxt.visible=!(i.type>2),e.nameTxt.text=this.getNameStr(i.type)}renderItem(t,e){this.updateSelf(t,e)}tripleGetAward(){if(console.log("zh:qjff_AD_for_uigetAward"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uigetAward")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uigetAward())}qjff_AD_for_uigetAward(){this.getAward(3)}normalGetAward(){Y.isMisVideo()?this.tripleGetAward():this.getAward()}getAward(t=1){this.hide();for(let e=0;e<this.awardArr.length;e++)this.awardArr[e].num*=t;this.callback&&this.callback(1!=t)}getIcon(t){switch(t){case N.diamond:return"ty_zs";case N.coin:return"ty_jb";case N.gan1:return"qg1";case N.gan2:return"qg2";case N.gan3:return"qg3";case N.gan4:return"qg4"}}getNameStr(t){switch(t){case N.diamond:return"Diamond";case N.coin:return"Coins";case N.gan1:case N.gan2:case N.gan3:case N.gan4:return cfgTable.ballrodData[t-1].name}}}te.uiName="UIGetAward";class ee extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIRepentProp")}onConstruct(){this.c1=this.getController("c1"),this.n11=this.getChild("n11"),this.regretNode=this.getChild("regretNode"),this.helpLineNode=this.getChild("helpLineNode"),this.t0=this.getTransition("t0")}}ee.URL="ui://isxx5ak7trk948v";class ie extends A{constructor(){super(),this.viewType=0,this.regretType=0}onConstructor(){this.ui=ee.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.regretNode.cancelBtn,this.hideSelf),this.addUIClick(this.ui.regretNode.videoBtn,this.videoRegret),this.addUIClick(this.ui.helpLineNode.cancelBtn,this.hideSelf),this.addUIClick(this.ui.helpLineNode.videoBtn,this.videoAddHelpLine)}show(t,e,i){if(Y.showInsert(!0),this.viewType=t,this.regretType=e,this.callback=i,super.show(),this.ui.t0.play(),this.ui.c1.selectedIndex=this.viewType,this.ui.regretNode.tipsTxt.text=0==this.regretType?"Missed the target ball!":"The cue ball has been pocketed!",0==this.viewType){let t=Wa.getGuideHelpLine();this.ui.helpLineNode.c1.selectedIndex=0==t?1:0,this.ui.helpLineNode.videoBtn.c1.selectedIndex=0==t?1:0}Ea.common.gameMgr.gamePause=!0}hideSelf(){Ea.common.gameMgr.gamePause=!1,this.callback&&this.callback(!1),this.hide()}videoRegret(){console.log("zh:qjff_AD_for_UIrepentProp_videoRegret"),H.instance.showRewardAd("qjff_AD_for_UIrepentProp_videoRegret")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIrepentProp_videoRegret())}qjff_AD_for_UIrepentProp_videoRegret(){this.callback&&this.callback(!0),this.hideSelf()}videoAddHelpLine(){if(0==Wa.getGuideHelpLine())this.callback&&this.callback(!0),this.hideSelf(),Wa.setGuideHelpLine(),Ea.common.gameUI.ui.guideNode.visible=!1;else{if(console.log("zh:qjff_AD_for_UIrepentProp_videoAddHelpLine"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIrepentProp_videoAddHelpLine")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIrepentProp_videoAddHelpLine())}}qjff_AD_for_UIrepentProp_videoAddHelpLine(){this.callback&&this.callback(!0),this.hideSelf()}}ie.uiName="UIRepentProp";class se extends A{constructor(){super(),this.firstEnter=!0}nativeCallJs(t){let e=t;switch(console.log("zh: nativeCallJs 奖励开始发放:",e),e){case"qjff_chouJiang":Ea.uiMgr.getUI(Le).qjff_chouJiang();break;case"qjff_AD_for_uisign":Ea.uiMgr.getUI(Ft).qjff_AD_for_uisign();break;case"qjff_AD_for_uitry":Ea.uiMgr.getUI(W).qjff_AD_for_uitry();break;case"qjff_AD_for_uipower":Ea.uiMgr.getUI(wt).qjff_AD_for_uipower();break;case"qjff_AD_for_uigetAward":Ea.uiMgr.getUI(te).qjff_AD_for_uigetAward();break;case"qjff_AD_for_uiGameEnd":let t=Laya.LocalStorage.getItem("temp_qjff_AD_for_uiGameEnd_level");Ea.uiMgr.getUI(oe).qjff_AD_for_uiGameEnd(parseInt(t));break;case"qjff_AD_for_uiAddProp_videoGetDiamond":Ea.uiMgr.getUI(ve).qjff_AD_for_uiAddProp_videoGetDiamond();break;case"qjff_AD_for_uiAddProp_videoGetCoin":Ea.uiMgr.getUI(ve).qjff_AD_for_uiAddProp_videoGetCoin();break;case"qjff_AD_for_UIrepentProp_videoRegret":Ea.uiMgr.getUI(ie).qjff_AD_for_UIrepentProp_videoRegret();break;case"qjff_AD_for_UIrepentProp_videoAddHelpLine":Ea.uiMgr.getUI(ie).qjff_AD_for_UIrepentProp_videoAddHelpLine();break;case"qjff_AD_for_UIBOX_onOpenBox":Ea.uiMgr.getUI(z).qjff_AD_for_UIBOX_onOpenBox();break;case"qjff_AD_for_UIAddCoin":Ea.uiMgr.getUI(ct).qjff_AD_for_UIAddCoin();break;case"111a":Ea.uiMgr.getUI(Ft).qjff_AD_for_uisign();break;case"222a":Ea.uiMgr.getUI(Ft).qjff_AD_for_uisign();break;case"333a":Ea.uiMgr.getUI(Ft).qjff_AD_for_uisign();break;default:console.log("zh:未知的方法名字"+e)}}onConstructor(){console.log("zh: UIMain onConstructor"),this.ui=gt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addEvent(),this.addClickSpine(),this.settingNode=new ft(this.ui.settingNode),this.moneyNode=new Ne(this.ui.moneyNode),Ea.eventMgr.on(u,this,this.beginGame),Ea.eventMgr.on(g,this,this.onGetUserInfo),Ea.eventMgr.on(m,this,this.changeSecretary);let t=Wa.getCurSecretary();this.changeSecretary(t),this.ui.talkNode.visible=!1;let e=Wa.getSkillGuide();if(Ea.common.isNewDay&&1==e&&(Ea.common.isNewDay=!1,Ea.soundMgr.playSound("s_main01"),Ea.common.showGirlTalkPop(1,this.ui.talkNode,this.ui.talkNode.womanTxt),console.log("zh:播放小秘书每天语音")),this.onGetUserInfo(),this.ui.n83.visible=!1,vt.hasJosnKey(f)){let t=vt.getItem(f).username;this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t,16)}this.c_btn_for_user(),window.nativeCallJs=this.nativeCallJs.bind(this)}Logout(){vt.hasJosnKey(f)&&(vt.removeItem(f),this.freshUser())}gotoLogin(){Ea.uiMgr.Show(Zt)}gotoRegUser(){Ea.uiMgr.Show($t)}c_btn_for_user(){this.ui.n_Logout.visible=!1,this.ui.n_dengLu.visible=!1,this.ui.n_zhuCe.visible=!1,vt.hasJosnKey(f)?this.ui.n_Logout.visible=!0:this.ui.n_dengLu.visible=!0}changeSecretary(t){let e=cfgTable.secretaryshopData[t+1].spine;Ea.common.secretary&&Ea.common.secretary.dispose(),this.addSecretarySpine(e)}addSecretarySpine(t){let e=new q(t,()=>{this.playSecretaryIdle()});Ea.common.secretary=e}addClickSpine(){let t=new q("dianji",()=>{Laya.stage.on(Laya.Event.CLICK,this,e=>{let i=Laya.stage,s={x:e.stageX,y:e.stageY,scaleX:.8,scaleY:.8};t.play(s,0,!1,i,t=>{t.destroy(!0)})})})}addEvent(){this.addUIClick(this.ui.classicBtn,this.startGame,[C.classic]),this.addUIClick(this.ui.bigMoveBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.ganFaMoShiBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.globalBtn,this.startGlobal),this.addUIClick(this.ui.placeBallBtn,this.startPlaceBall),this.addUIClick(this.ui.headNode,this.onGetUserInfo,[!0]),this.addUIClick(this.ui,this.interuptSecretary),this.addUIClick(this.ui.rightBtn,this.ensureSecretary),this.addUIClick(this.ui.guideBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.secretaryBtn,this.openSecretaryView),this.addUIClick(this.ui.shopBtn,this.openShopView),this.addUIClick(this.ui.signBtn,this.openSignView),this.addUIClick(this.ui.drawBtn,this.openDrawView),this.addUIClick(this.ui.rankBtn,this.openRanking),this.addUIClick(this.ui.n_Logout,this.Logout),this.addUIClick(this.ui.n_dengLu,this.gotoLogin),this.addUIClick(this.ui.n_zhuCe,this.gotoRegUser)}show(t){if(super.show(),this.moneyNode.ui.c1.selectedIndex=1,this.playSecretaryIdle(),Ea.soundMgr.playMusic("caromhall01",0),Laya.timer.clearAll(this),this.playSecretaryRandomSound(),console.log("zh:uimain.ts show show FailWords=",t),t&&(console.log("zh:uimain.ts "),setTimeout(()=>{let t=Math.random()<=.5?"s_main02":"s_main03",e=-1;e="s_main02"==t?2:3,Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),Ea.soundMgr.playSound(t)},300)),this.showGuide(),this.ui.guideBtn.x=this.ui.liucheng2.myMask.x,this.ui.guideBtn.y=this.ui.liucheng2.myMask.y,1==Wa.getSkillGuide()){let t=Ea.common.randomNum(300,800);this.firstEnter?(console.log("zh: firstEnter"),this.firstEnter=!1,t+=900):console.log("zh: no firstEnter"),Laya.timer.once(t,this,()=>{Ea.common.autoPopUIView()})}}checkActive(t){}showGuide(){let t=Wa.getSkillGuide();this.ui.guideBtn.visible=0==t,this.ui.enterGuide.visible=!1,this.ui.secretaryGuide.visible=0==t,0==t?(console.log("zh:显示引导"),Ea.soundMgr.playSound("s_guide"),Ea.common.showGirlTalkPop(16,this.ui.talkNode,this.ui.talkNode.womanTxt)):console.log("zh:不需要显示引导")}ensureSecretary(){console.log("zh: ensureSecretary ensureSecretaryensureSecretaryensureSecretaryensureSecretaryensureSecretary"),this.ui.secretaryGuide.visible=!1,this.ui.enterGuide.visible=!0,this.ui.wordsNode.t0.play(),Wa.getNewUser()&&Moyu.sendDataEvent("gameReady")}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};console.log("zh:playSecretaryIdle",o),Ea.common.secretary.play(o,0,!0,t)}startGame(t){switch(Ea.common.gameMode=t,Moyu.sendDataEvent("PlayGame",{type:t}),console.log("zh:进入游戏gameMode ="+Ea.common.gameMode),Ea.common.gameMode){case C.classic:if(console.log("zh:进入经典模式111111111"),!Wa.DIY_challengeMode_overLev_jieSuo_mark){console.log("zh:不需要判断是否可以玩该classic"),0==Wa.getChallengeTimes()?Ea.uiMgr.Show(ut):this.beginGame();break}{let t=Wa.getChallengeMode_overLev();if(console.log("zh:classic db_over_lev=",t),t<Wa.DIY_challengeMode_overLev_jieSuo_Classic){console.log("zh:判断是否可以玩该模式classic =NO");let t="You must complete "+Wa.DIY_challengeMode_overLev_jieSuo_Classic+" levels in Challenge Mode to unlock Classic Mode.";return void Ea.uiMgr.Show(Yt,t)}console.log("zh:可以玩该模式classic 66666666666666"),this.beginGame()}case C.bigMove:console.error("zh:bigMove check");let e=Wa.getSkillGuide();if(Wa.DIY_challengeMode_overLev_jieSuo_mark&&1==e){let t=Wa.getChallengeMode_overLev();if(console.log("zh:bigMove db_over_lev=",t),t<Wa.DIY_challengeMode_overLev_jieSuo_rodMethod){let t="Complete "+Wa.DIY_challengeMode_overLev_jieSuo_rodMethod+" levels in Challenge Mode to unlock the Rod Method Mode";return void Ea.uiMgr.Show(Yt,t)}console.log("zh:可以玩该模式 bigMove"),this.beginGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart0")}else this.beginGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart0");break;default:console.error("zh:未知错误!!!!")}}beginGame(t=!1){console.log("zh:beginGame "),1==Wa.getSkillGuide()?(console.log("zh:非新手引导,showInternAd "),H.instance.showInternAd("beginGame")):console.log("zh:新手引导,不显示AD "),console.log("zh:beginGame 2 go"),Ea.common.gameMode==C.classic?t?this.enterClassic():Ea.uiMgr.Show(qt,()=>{console.log("zh:BBBBBBBBBBBBBBB"),this.enterClassic()}):Ea.common.gameMode==C.bigMove&&(this.ui.enterGuide.visible=!1,Ea.uiMgr.Show(Vt))}enterClassic(){Ea.uiMgr.Show(we),Ea.uiMgr.Show(Bt,()=>{this.isHide||this.hide(),Ea.common.gameUI.ui.alpha=1,Ea.common.gameUI.startGame(),Ea.uiMgr.Hide(oe)})}startGlobal(){Ea.uiMgr.Show(Yt,"Coming Soon")}startWeekly(){Ea.uiMgr.Show(Yt,"Coming Soon")}zhouSaiMonth(){console.log("zh: zhouSaiMonth 被调用")}startPlaceBall(){Ea.uiMgr.Show(St)}hide(){console.log("zh:uimain hide ..."),super.hide(),Ea.common.stopGirlPop(this.ui.talkNode)}onGetUserInfo(t=!1){if(Moyu.isWx){let t=Moyu.getSystemInfo();t&&Moyu.createWXUserBtn(0,0,t.width,t.height,"res/wxuser.png",this.freshUser)}else Moyu.initUser(this,this.freshUser,t);this.freshUser()}freshUser(){let t=Moyu.getUserInfo();t.isAuth?Wa.upRankData():t.headIcon="res/ty_touxiang.png",this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t.nickName,16),Ea.common.createHead(this.ui.headNode.headRoot.headImg,t.headIcon);let e=f;if(vt.hasJosnKey(e)){let t=vt.getItem(e).username;this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t,16)}this.c_btn_for_user()}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}openSecretaryView(){Ea.uiMgr.Show(jt),Moyu.sendDataEvent("secretary")}openShopView(){Ea.uiMgr.Show(Pt,0)}openSignView(){Ea.uiMgr.Show(Ft)}openDrawView(){Ea.uiMgr.Show(Le)}openRanking(){console.log("zh:phb openRanking"),Ea.uiMgr.Show(Tt),Moyu.sendDataEvent("rankingList")}}se.uiName="UIMain";class oe extends A{constructor(){super(),this.success=!1,this.awardCoinNum=1e3,this.awardDiamondNum=10}onConstructor(){this.ui=lt.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.leftBtn,this.clickLeftBtn),this.addUIClick(this.ui.closeNode.closeBtn,this.returnHome),this.addUIClick(this.ui.rightBtn,this.clickRightBtn),this.moneyNode=new Ne(this.ui.moneyNode),this.ui.talkNode.visible=!1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}updateType(){switch(Ea.common.gameMode){case C.classic:this.ui.c1.selectedIndex=this.success?0:1,this.ui.coinNode.visible=this.success,this.success?this.logEventForClassic_win():Laya.timer.once(500,this,()=>{Ea.uiMgr.Show(ct)}),this.logEventForClassic_complete(),this.ui.isGetAward.visible=!1,this.ui.leftBtn.c1.selectedIndex=3,this.ui.rightBtn.c1.selectedIndex=0,this.moneyNode.ui.c1.selectedIndex=1;break;case C.bigMove:console.log("zh:招法模式 aaaaaa bigMove"),this.ui.c1.selectedIndex=this.success?0:1,this.ui.coinNode.visible=this.success,Ea.common.gameMode==C.bigMove&&(this.success?(Wa.setSkillSuccessTimes(1,!0),Wa.setSkillAccTimes(1)):Wa.setSkillSuccessTimes(0,!1)),this.logEventForRod_complete_N(),this.success?this.logEventForRod_win():Laya.timer.once(500,this,()=>{Ea.uiMgr.Show(ct)}),this.ui.isGetAward.visible=!1,this.ui.leftBtn.c1.selectedIndex=3,this.ui.rightBtn.c1.selectedIndex=0,this.moneyNode.ui.c1.selectedIndex=1;break;case C.placeBall:if(this.ui.coinNode.visible=!1,this.success){3==Ea.common.placeBallStarNum?this.ui.c1.selectedIndex=2:this.ui.c1.selectedIndex=3;let t=Ea.common.placeBallCurLevel;t>59?this.logEventForChallenge_level_complete(t):this.logEventForChallenge_level_N(t)}else this.ui.c1.selectedIndex=4;let t=cfgTable.placeballData[Ea.common.placeBallCurLevel];t.type==w.challenge&&(this.ui.c1.selectedIndex=2),this.ui.conditionNode.conditionTxt.text=0==t.type?"Clear the table":`Pocket ${t.ball} balls `,this.updatePlaceBallBtn(),this.updatePlaceBallStarNum(),this.updatePlaceBallAwardState(),this.moneyNode.ui.c1.selectedIndex=2,this.moneyNode.checkPowerTime(),this.moneyNode.powerChange(),Wa.upRankData()}}logEventForRod_complete_N(){let t=Ea.common.curPlayerSkillType;console.log("zh:logEventForRod_complete_N 选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i=Wa.getBigSkillByIndex(t);console.log("zh:logEventForRod_complete_N level = "+i);let s="sjmd_rod_start_"+t,o={count:0,name:e};if(vt.hasJosnKey(s)){const t=vt.getItem(s);o.count=t.count+1,vt.setItem(s,o)}else vt.setItem(s,o);const n=vt.getItem(s);let a=n.count;if(console.log("zh:logEventForRod_complete_N count = "+a),a%5==0){const t=JSON.stringify(o);H.instance.logEventForAdHaveParams("rod_complete_"+n,t),H.instance.logEventForFirebase("rod_complete_"+n,t)}}logEventForRod_win(){console.log("zh:logEventForRod_win,胜利");let t=Ea.common.curPlayerSkillType;console.log("zh:logEventForRod_win 选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i=Wa.getBigSkillByIndex(t);console.log("zh:logEventForRod_win level = "+i);let s="sjmd_rod_win_"+t,o={count:1,name:e+" Lev"+i};if(vt.hasJosnKey(s)){const t=vt.getItem(s);o.count=t.count+1,vt.setItem(s,o)}else vt.setItem(s,o);const n=JSON.stringify(o);H.instance.logEventForAdHaveParams("rod_win",n)}logEventForClassic_win(){console.log("zh:logEventForClassic_win,胜利");let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_win_"+t,s={difficulty:e,classic_count:1,difficulty_count:1};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.classic_count=t.classic_count+1,s.difficulty_count=t.difficulty_count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("classic_win",o)}logEventForClassic_complete(){console.log("zh:logEventForClassic_complete,胜利");let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_complete_"+t,s={msmc:e,count:0};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.count=t.count+1,vt.setItem(i,s)}else vt.setItem(i,s);if(s.count%5==0){JSON.stringify(s);H.instance.logEventForAdNoParams("classic_complete"),H.instance.logEventForFirebase("classic_complete",null)}}updatePlaceBallBtn(){this.ui.leftBtn.c1.selectedIndex=5,this.success?this.ui.rightBtn.c1.selectedIndex=14:3==Ea.common.placeBallStarNum?this.ui.rightBtn.c1.selectedIndex=14:this.ui.rightBtn.c1.selectedIndex=1}updatePlaceBallStarNum(){let t=Ea.common.placeBallStarNum;this.ui.starNumNode.c1.selectedIndex=0==t?3:t-1}updatePlaceBallAwardState(){let t=Ea.common.placeBallCurLevel,e=Ea.common.placeBallStarNum,i=Wa.getPlaceBallLevel(t).getAward,s=cfgTable.placeballData[t].award,o=cfgTable.placeballData[t];this.awardDiamondNum=s[1],this.awardCoinNum=s[0],o.type==w.challenge&&(this.awardDiamondNum=0,this.awardCoinNum=100*Ea.common.gameMgr.finishBalls),this.ui.awardNode.diamondNode.visible=this.awardDiamondNum>0,this.ui.awardNode.coinNode.visible=this.awardCoinNum>0,o.type==w.challenge&&(this.ui.awardNode.coinNode.visible=!0),this.awardCoinNum>0&&this.awardDiamondNum>0?(this.ui.awardNode.diamondNode.x=265,this.ui.awardNode.coinNode.x=354):(this.ui.awardNode.diamondNode.x=291,this.ui.awardNode.coinNode.x=291),this.ui.awardNode.diamondNode.numTxt.text=this.awardDiamondNum+"",this.ui.awardNode.coinNode.numTxt.text=this.awardCoinNum+"",0==this.awardCoinNum&&(this.ui.awardNode.coinNode.numTxt.text=""),i?(this.ui.isGetAward.visible=!0,this.ui.awardNode.diamondNode.c1.selectedIndex=2,this.ui.awardNode.coinNode.c1.selectedIndex=2):(this.ui.isGetAward.visible=!1,3==e&&o.type==w.challenge?(this.ui.awardNode.diamondNode.c1.selectedIndex=0,this.ui.awardNode.coinNode.c1.selectedIndex=0):(this.ui.awardNode.diamondNode.c1.selectedIndex=1,this.ui.awardNode.coinNode.c1.selectedIndex=1))}show(t){super.show(),Ea.eventMgr.event(r),this.success=t,Laya.timer.clearAll(this),this.playSecretaryAni(),Moyu.sendDataEvent("GameEnd",{id:Ea.common.gameMode,res:this.success?1:2});let e=(new Date).getTime()-Ea.common.gameStartTime;e=Math.floor(e/1e3),Moyu.sendDataEvent("gameOver",{isWin:this.success?1:0,timeConsuming:e,gameType:Ea.common.gameMode}),this.updateType(),Laya.timer.once(200,this,()=>{this.addAward(()=>{this.updateType(),Laya.timer.once(500,this,()=>{this.showChallengeLevel()})})}),this.success?(H.instance.showInternAd("gameend_success"),console.log("zh:game end 成功"),Ea.soundMgr.playSound("slots_roll01"),Ea.soundMgr.playSound("s_win"),Ea.common.showGirlTalkPop(8,this.ui.talkNode,this.ui.talkNode.womanTxt),this.diyGameDataUtilForGameWin()):(H.instance.showInternAd("gameend_faill"),console.log("zh:game end失败"),Ea.soundMgr.playSound("matchwin01"),Ea.soundMgr.playSound("s_lose"),Ea.common.showGirlTalkPop(9,this.ui.talkNode,this.ui.talkNode.womanTxt));let i=Wa.getChallengeTimes();Ea.common.gameMode==C.classic&&i>=1&&i<=3&&Wa.setChallengeTimes(1),this.success&&Ea.common.gameMode==C.classic&&Wa.setClassicTimes()}diyGameDataUtilForGameWin(){switch(console.log("zh: DiyGameDataUtilForGameWin diy "),Ea.common.gameMode){case C.classic:console.log("zh:DiyGameDataUtilForGameWin 111");case C.bigMove:console.log("zh:DiyGameDataUtilForGameWin 222"),this.restartGame();break;case C.placeBall:console.log("zh:DiyGameDataUtilForGameWin 333");var t=Ea.common.placeBallCurLevel;console.log("zh:练习模式 联系了多少LEV="+t),t>Wa.getChallengeMode_overLev()&&Wa.setChallengeMode_overLev(t);break;default:console.log("zh:DiyGameDataUtilForGameWin 444")}}showChallengeLevel(){if(0!=Wa.getChallengeTimes())return;let t=Wa.getSkillAccTimes(),e=Wa.getPlaceBallLevelList().length;(t>=3||e>=5)&&(Ea.uiMgr.Show(ut),this.hide())}addAward(t){if(this.success)switch(Ea.common.gameMode){case C.classic:this.awardCoinNum=Ea.common.passAwardCoin,this.awardDiamondNum=0,Ea.common.playObjFlyAnim(this.awardCoinNum,N.coin);break;case C.bigMove:this.awardCoinNum=Ea.common.passAwardCoin,this.awardDiamondNum=0,Ea.common.playObjFlyAnim(this.awardCoinNum,N.coin),t&&t();break;case C.placeBall:let e=Ea.common.placeBallCurLevel;if(Moyu.sendDataEvent("PlaceBall",{id:e,res:this.success?1:2}),3!=Ea.common.placeBallStarNum)return void(t&&t());if(Wa.getPlaceBallLevel(e).getAward)return void(t&&t());let i=cfgTable.placeballData[e],s=cfgTable.placeballData[e].award;this.awardCoinNum=s[0],this.awardDiamondNum=s[1],i.type==w.challenge&&(this.awardDiamondNum=0,this.awardCoinNum=100*Ea.common.gameMgr.finishBalls);let o,n=new S(N.coin,this.awardCoinNum);this.awardDiamondNum>0?(o=new S(N.diamond,this.awardDiamondNum),Ea.common.getAward([o,n],t)):Ea.common.getAward([n],t),i.type==w.normal&&Wa.setPlaceBallAward(e)}else t&&t()}playSecretaryAni_old(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};if(this.success){let e=Math.random()<=.5?2:3;Ea.common.secretary.play(o,e,!1,t,()=>{Ea.common.secretary.play(o,1,!0,t)})}else Ea.common.secretary.play(o,0,!0,t)}playSecretaryAni(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};if(this.success){Ea.common.secretary.play(o,0,!0,t)}else Ea.common.secretary.play(o,0,!0,t)}restartGame(){switch(Ea.common.gameMode){case C.classic:Ea.eventMgr.event(u),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode});break;case C.bigMove:this.hide(),Ea.eventMgr.event(u),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode})}}hide(){super.hide(),Ea.common.stopGirlPop(this.ui.talkNode),Y.showBanner(!1)}returnHome(){this.hide();let t=!this.success;Ea.uiMgr.Show(se,t)}clickLeftBtn(){switch(Ea.common.gameMode){case C.classic:case C.bigMove:this.returnHome();break;case C.placeBall:let t=Ea.common.placeBallCurLevel;this.powerStartPlaceBallLevel(t,this.ui.leftBtn),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode})}}powerStartPlaceBallLevel(t,e){Wa.powerEnough()?(e.touchable=!1,e.powerEft.t0.play(Laya.Handler.create(this,()=>{e.touchable=!0,Wa.setPower(-1),Ea.eventMgr.event(p),this.startPlaceBallLevel(t),this.logEventForChallenge_level_start(t)}))):Ea.uiMgr.Show(wt,0)}clickRightBtn(){switch(Ea.common.gameMode){case C.classic:console.log("zh:clickRightBtn 111");case C.bigMove:console.log("zh:clickRightBtn 222"),this.restartGame();break;case C.placeBall:console.log("zh:clickRightBtn 333");let t=Ea.common.placeBallCurLevel,e=Wa.getPlaceBallLevel(t);if(e.play&&!e.isCur)if(console.log("zh:clickRightBtn 333-111"),console.log("zh:当前LV="+t),60==t)Ea.uiMgr.Show(Yt,"Congratulations on passing all levels."),Laya.timer.once(3e3,this,()=>{this.returnHome()});else{let e=t+1;this.powerStartPlaceBallLevel(e,this.ui.rightBtn)}else{if(console.log("zh:clickRightBtn 333-000"),Moyu.sendDataEvent("placeBallNextLevel"),console.log("zh:qjff_AD_for_uiGameEnd"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}Laya.LocalStorage.setItem("temp_qjff_AD_for_uiGameEnd_level",t+""),H.instance.showRewardAd("qjff_AD_for_uiGameEnd")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiGameEnd(t))}break;default:console.log("zh:clickRightBtn 444")}}logEventForChallenge_level_start(t){let e="sjmd_challenge_level_start",i={count:0,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const s=vt.getItem(e);t>s.level&&(i.count=s.count+1,vt.setItem(e,i))}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_start",s)}qjff_AD_for_uiGameEnd(t){Wa.setPlaceBallLevel(t,1),this.startPlaceBallLevel(t+1)}startPlaceBallLevel(t){Ea.common.gameMode=C.placeBall,Ea.common.placeBallCurLevel=t,Ea.uiMgr.Show(we),this.hide()}logEventForChallenge_level_complete(t){let e="sjmd_challenge_level_complete",i={count:1,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const t=vt.getItem(e);i.count=t.count+1,vt.setItem(e,i)}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_complete",s)}logEventForChallenge_level_N(t){console.log("zh:logEventForChallenge_level_N "+t);let e="sjmd_challenge_level_N";if(vt.hasKey(e)){if(t>vt.getItem(e)&&vt.setItem(e,t),t%5==0){console.log("zh:每5关上报1次");let e="challenge_level_"+t;H.instance.logEventForAdNoParams(e);let i="challenge_level_"+t;H.instance.logEventForFirebase(i,null)}else console.log("zh:5 no 上报")}else vt.setItem(e,t)}}oe.uiName="UIGameEnd";class ne extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIVideoShare")}onConstruct(){this.n10=this.getChild("n10"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}ne.URL="ui://isxx5ak7hkrz3tj";class ae extends A{constructor(){super(),this.success=!1,this.awardNum=0,this.isShared=!0}onConstructor(){this.ui=ne.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.closeBtn,this.hideSelf),this.addUIClick(this.ui.myNode.shareBtn,this.videoShare),this.addUIClick(this.ui.myNode.share2Btn,this.shareGame),this.addUIClick(this.ui.myNode.tipsNode.shareNode,this.checkForceShare)}show(t){super.show(),this.ui.myNode.screenNode.screenImg.displayObject.texture=Ea.common.screenImg,this.ui.myNode.screenNode.screenImg.displayObject.scaleY=-1,this.ui.myNode.screenNode.screenImg.displayObject.y=this.ui.myNode.screenNode.screenImg.y+.5*this.ui.myNode.screenNode.screenImg.height,this.success=t;Ea.common.randomNum(600,1500);H.instance.showInternAd("uivideoshare_show"),t&&Ea.soundMgr.playSound("applause"),this.ui.t0.play(),this.checkShareState();let e=Wa.getDailyVideoShareTimes();this.awardNum=0==e?2e3:200,this.ui.myNode.awardNode.coinTxt.text="x"+this.awardNum}checkShareState(){0==Y.forceShare?(this.ui.myNode.closeBtn.visible=!0,this.ui.myNode.tipsNode.visible=!1,this.ui.myNode.closeBtn.x=90,this.ui.myNode.shareBtn.x=342):1==Y.forceShare&&(this.ui.myNode.closeBtn.visible=!1,this.ui.myNode.tipsNode.visible=!0,this.ui.myNode.shareBtn.x=218,this.isShared=!0,this.ui.myNode.tipsNode.shareNode.c1.selectedIndex=this.isShared?0:1)}checkForceShare(){this.isShared=!this.isShared,this.ui.myNode.tipsNode.shareNode.c1.selectedIndex=this.isShared?0:1}videoShare(){1==Y.forceShare?this.isShared?this.shareGame():this.hideSelf():this.shareGame()}shareGame(){Moyu.sendDataEvent("VideoShare"),Moyu.canShare()>100?Moyu.shareGame(t=>{t&&(Wa.setDailyVideoShareTimes(1),Wa.setCoin(this.awardNum)),this.hideSelf()},this):(Ea.uiMgr.Show(Yt,"录屏时间不足,分享失败"),this.hideSelf())}hideSelf(){this.hide(),Ea.uiMgr.Show(oe,this.success),Ea.common.screenImg&&!Ea.common.screenImg.destroyed&&(Ea.common.screenImg.destroy(),Ea.common.screenImg=null)}}ae.uiName="UIVideoShare";class he extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITips")}onConstruct(){this.n0=this.getChild("n0"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}he.URL="ui://isxx5ak7mnrs42z";class le extends A{constructor(){super(),this.type=0}onConstructor(){this.ui=he.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.clickLeftBtn),this.addUIClick(this.ui.myNode.sureBtn,this.clickRightBtn)}show(t,e,i){switch(super.show(),this.ui.t0.play(),this.ui.myNode.tipsTxt.text=t,this.ui.myNode.womanTxt.text=e,Y.showInsert(!0),this.ui.myNode.c1.selectedIndex=i,this.type=i,this.type){case L.exitGame:Ea.common.gameMgr.gamePause=!0;break;case L.foul:Laya.timer.once(200,this,()=>{Ea.common.gameMgr.gamePause=!0})}}clickLeftBtn(){switch(this.hide(),Ea.common.gameMgr.gamePause=!1,this.type){case L.exitGame:case L.foul:}}clickRightBtn(){switch(this.hide(),this.type){case L.exitGame:Ea.eventMgr.event(r),Ea.uiMgr.Show(se),Moyu.recordEnd(this,null),Ea.common.longHelpLine=!1;break;case L.foul:Ea.common.gameMgr.gamePause=!1,Laya.timer.clearAll(this)}}}le.uiName="UITips";class re{constructor(){this.selfCamp="",this.selfFoulNum=0,this.selfBallArr=[],this.selfTimer=0,this.selfScore=0,this.aiCamp="",this.aiFoulNum=0,this.aiBallArr=[],this.aiTimer=0,this.aiScore=0,this.aiSkillLevelNum=1,this.targertScore=0,this.setTime=30,this.selfTurnRate=.5,this.accTime=0,this.curFoul="",this.maxFoulTimes=3,this.isFirstInGame=!0,this.firstColliObj=null,this.inHoleBalls=[],this.blackNum=8,this.success=!1,this.holePosList=[],this.posObj={},this._selfTurn=!1,this.lastRootBallPos=new Laya.Vector2(311,430),this.ensureBallType=!1,this.isOpenBall=!0,this.finishOneShoot=!0,this.isEnd=!1,this.isChangeTurn=!1,this.isInterrupt=!1,this.aiPlayedBreakArmy=!1,this.isTouchedBall=!1,this.finishBalls=0,this.needBalls=0,this.allBallNum=0,this.placeBallPosData={},this.curHP=0,this.showLongView=!1,this.firstShoot=!0,this._gamePause=!1,this.trunCount=0,this.isBlackInHole=!1,this.isEnter=!0,Ea.eventMgr.offAll(o),Ea.eventMgr.on(o,this,this.gameRun),Ea.eventMgr.off(h,this,this.ballShoot),Ea.eventMgr.on(h,this,this.ballShoot),Ea.eventMgr.off(l,this,this.ensureCamp),Ea.eventMgr.on(l,this,this.ensureCamp),Ea.eventMgr.off(r,this,this.resetGame),Ea.eventMgr.on(r,this,this.resetGame)}get gamePause(){return this._gamePause}set gamePause(t){t?Laya.physicsTimer.pause():Laya.physicsTimer.resume(),this._gamePause=t}get selfTurn(){return this._selfTurn}set selfTurn(t){this.trunCount++,this._selfTurn=t,t?(Ea.common.d2World.d2Gan.ui.self.visible=!0,Ea.common.d2World.d2Gan.ui.ai.visible=!1):(Ea.common.d2World.d2Gan.ui.self.visible=!1,Ea.common.d2World.d2Gan.ui.ai.visible=!0,this.trunCount>1&&Y.openBox())}resetGame(){this.inHoleBalls=[],this.isFirstInGame=!0,this.firstColliObj=null,this.aiCamp="",this.selfCamp="",this.aiFoulNum=0,this.selfFoulNum=0,this.selfBallArr=[],this.aiBallArr=[],this.gamePause=!1,this.ensureBallType=!1,this.isInterrupt=!1,this.updateLeftBall(),this.clearTime(),this.aiPlayedBreakArmy=!1,this.isBlackInHole=!1,this.placeBallPosData={},Ea.common.d3World.knifeRoot&&Ea.common.d3World.knifeRoot.destroyChildren()}gameReady(){this.trunCount=0,this.firstColliObj=null,this.isFirstInGame=!0,this.selfTurn=Math.random()<=this.selfTurnRate;let t=Wa.getChallengeTimes();Ea.common.gameMode==C.classic&&t>=1&&t<=3&&(this.selfTurn=!0),Ea.common.gameMode==C.placeBall&&(this.selfTurn=!0),Ea.common.gameMode!=C.bigMove||Wa.getSkillGuide()||(this.selfTurn=!0),Ea.common.gameUI.setTurnAlpha(this.selfTurn),this.checkGuide(),Ea.common.uiRodMethod&&Ea.common.uiRodMethod.resetRod(),Ea.common.d2World.getHelpLine(),this.isOpenBall=!0,this.isTouchedBall=!1,Ea.common.aiPlayer.stopRun(),this.setTime=30;let e=Ea.common.gameUI.ui;switch(Ea.common.gameMode){case C.classic:Ea.common.aiPlayer.init(),this.blackNum=8,this.placeRootBall(),this.peoplePlay(9,10),e.wordsBtn.visible=!0,e.aiWordsBtn.visible=!0,Ea.common.talkMgr.changeAIState(!0),Wa.gameData.gameCount++,Wa.saveGameData();break;case C.bigMove:this.blackNum=-1,this.selfScore=0,this.aiScore=0,Ea.common.aiPlayer.init(),this.targertScore=cfgTable.bigmoveData[Ea.common.bigMoveLevelIndex].target,this.updateSelfScore(),this.updateAIScore(),this.updateTargetSroce(),this.placeRootBall(),this.peoplePlay(9,10),e.wordsBtn.visible=!0,e.aiWordsBtn.visible=!0,Ea.common.talkMgr.changeAIState(!0),Wa.getSkillGuide()<1?Wa.gameData.gameCount=0:(Wa.gameData.gameCount++,Wa.saveGameData(),Y.openTry()),Ea.common.d3World.knifeRoot&&Ea.common.d3World.knifeRoot.destroyChildren();break;case C.placeBall:this.blackNum=-1,this.selfTurn=!0,this.setTime=1e4,this.placeBallData=cfgTable.placeballData[Ea.common.placeBallCurLevel],this.curHP=this.placeBallData.hp,-1==this.placeBallData.ball?this.needBalls=Ea.common.d2World.ballArr.length-1:this.needBalls=this.placeBallData.ball,console.log("需要的进球数目",this.needBalls),this.allBallNum=Ea.common.d2World.ballArr.length-1,this.finishBalls=0,this.placeBallPosData={},this.updatePlaceBallPos(),this.updatePlaceBallState(),this.finishOneShoot=!0,Ea.common.gameUI.ui.moveNode.visible=!1,this.isOpenBall=!1,Ea.common.d2World.d2Gan.ui.ai.visible=!1,e.wordsBtn.visible=!1,e.aiWordsBtn.visible=!1,Ea.common.talkMgr.changeAIState(!1),Laya.timer.frameOnce(Ea.tools.random(2e3,5100),this,()=>{Y.openBox()})}this.showLongView=!1,Ea.common.wordsMgr.comboTimes=1,Wa.getSkillGuide()&&Ea.eventMgr.event(n),Ea.common.upSkillLevel=!1,Ea.common.gameStartTime=(new Date).getTime(),this.firstShoot=!0}checkGuide(){let t=Wa.getSkillGuide(),e=Ea.common.gameUI.ui;if(e.guide1.visible=!1,e.guide2.visible=!1,e.guide3.visible=!1,0!=t||Ea.common.gameMode!=C.bigMove)return;this.selfTurn=!0;let i=this.getOneBall();e.guide1.visible=!0,e.guide1.fingerNode.x=i.gameObj.x,e.guide1.fingerNode.y=i.gameObj.y}getOneBall(){let t=Ea.common.d2World.ballArr;for(let e=0;e<t.length;e++)if(0!=t[e].number)return t[e]}updateSelfScore(){Ea.common.gameUI.ui.topNode.selfScoreTxt.text=this.selfScore+""}updateAIScore(){Ea.common.gameUI.ui.topNode.aiScoreTxt.text=this.aiScore+""}updateTargetSroce(){Ea.common.gameUI.ui.topNode.middleNode.targetScoreTxt.text=this.targertScore+""}updateLeftBall(){let t=Ea.common.gameUI.ui.topNode;t.selfBallList.numItems=this.selfBallArr.length,t.aiBallList.numItems=this.aiBallArr.length}ballShoot(){this.clearTime(),this.finishOneShoot=!1,Ea.common.gameUI.ui.moveNode.visible=!1,Ea.common.gameUI.ui.guideNode.visible&&(Ea.common.gameUI.ui.guideNode.visible=!1),this.firstShoot&&(this.firstShoot=!1,Moyu.sendDataEvent(`gameType${Ea.common.gameMode}`))}ensureCamp(t){if(this.ensureBallType=!0,this.isOpenBall=!1,Ea.common.gameMode!=C.classic)return;let e=[1,2,3,4,5,6,7],s=[9,10,11,12,13,14,15],o="";this.selfTurn?t<=7?(this.selfCamp=i.full,this.selfBallArr=e,this.aiCamp=i.flower,this.aiBallArr=s,o=cfgTable.wordsData[3].msg):(this.selfCamp=i.flower,this.selfBallArr=s,this.aiCamp=i.full,this.aiBallArr=e,o=cfgTable.wordsData[4].msg):t<=7?(this.selfCamp=i.flower,this.selfBallArr=s,this.aiCamp=i.full,this.aiBallArr=e,o=cfgTable.wordsData[2].msg):(this.selfCamp=i.full,this.selfBallArr=e,this.aiCamp=i.flower,this.aiBallArr=s,o=cfgTable.wordsData[1].msg),this.updateLeftBall(),Ea.uiMgr.Show(Yt,o)}updatePlaceBallState(){let t=Ea.common.gameUI.ui;switch(this.placeBallData.type){case w.normal:let e=t.placeNormalNode;e.hpTxt.text=this.curHP+"",this.updatePlaceBallStar(e),e.ballTxt.text=this.finishBalls+"/"+this.needBalls,e.levelTxt.text=`Level ${Ea.common.placeBallCurLevel}`;break;case w.challenge:let i=t.placeChallengeNode;i.hpTxt.text="Shots:"+this.curHP,i.ballTxt.text=this.finishBalls+"/"+this.allBallNum,i.levelTxt.text=`Level ${Ea.common.placeBallCurLevel}`,i.tipsTxt.text=`Pocket ${this.needBalls} balls `}}playSubHpAni(){let t=Ea.common.gameUI.ui;switch(this.placeBallData.type){case w.normal:let e=t.placeNormalNode;e.hpTxt.visible=!1,e.starAni.c1.selectedIndex=1,e.starAni.t0.play(Laya.Handler.create(this,()=>{e.hpTxt.visible=!0,e.starAni.c1.selectedIndex=0}))}}getEndStarNum(){let t,e=Ea.common.placeBallCurLevel;t=this.curHP==this.placeBallData.hp?3:this.curHP<=1?1:2,this.success?Wa.setPlaceBallLevel(e,t):t=0;let i=cfgTable.placeballData[e].type;this.success&&1==i&&(t=3),Ea.common.placeBallStarNum=t}updatePlaceBallStar(t){let e,i=0;i=this.curHP==this.placeBallData.hp?3:this.curHP>=2?2:1==this.curHP?1:0;for(let s=1;s<=3;s++)(e=t["star"+s]).c1.selectedIndex=i>=s?1:0;t.myProgress.value=i/3*100}openRegretView(t,e,i=!1){let s=-1;t?s=1:e<=0&&(s=0),i&&(s=1),-1!=s&&Ea.uiMgr.Show(ie,1,s,t=>{t?(this.curHP++,this.updatePlaceBallState(),this.setPlaceBallAllPos(),Ea.common.gameUI.ui.moveNode.visible=!1):(this.curHP<=0&&(this.success=!1,this.gameEnd()),this.playSubHpAni()),this.updatePlaceBallState(),this.updatePlaceBallPos()})}setPlaceBallAllPos(){let t,e,i=Ea.common.d2World.ballArr,s=this.placeBallPosData;for(let o=0;o<i.length;o++)(t=i[o]).destroyed||(e=s[t.myUNID])&&e.src&&!e.src.destroyed&&(t.gameObj.x=e.posX,t.gameObj.y=e.posY,t.d3BallSrc.setTransPos(e.posX,e.posY));Ea.common.d2World.getHelpLine()}updatePlaceBallPos(){let t,e,i=Ea.common.d2World.ballArr;for(let e=0;e<i.length;e++)t=i[e],this.placeBallPosData[t.myUNID]?(this.placeBallPosData[t.myUNID].posX=t.gameObj.x,this.placeBallPosData[t.myUNID].posY=t.gameObj.y):this.placeBallPosData[t.myUNID]={src:t,posX:t.gameObj.x,posY:t.gameObj.y};for(const t in this.placeBallPosData)(e=this.placeBallPosData[t]).src.destroyed&&delete this.placeBallPosData[t]}gameRun(t){if(!this.gamePause)if(this.curFoul=this.getFoulType(),t&&(Ea.common.d2World.d2Gan.shoot(),Ea.common.gameUI.forceCancel(),this.curFoul=t),this.isEnd=!1,this.isChangeTurn=!0,Ea.common.gameMode==C.classic)this.judgeClassic(this.curFoul),this.checkClassicWords(()=>{Ea.common.destroyClassicEmotion(),this.isEnd?this.isBlackInHole?(Ea.common.gameUI.ui.blackAni.visible=!0,Ea.common.gameUI.ui.blackAni.t0.play(Laya.Handler.create(this,()=>{Ea.common.gameUI.ui.blackAni.visible=!1,this.gameEnd()}))):this.gameEnd():(this.waitShoot(),Ea.eventMgr.event(n))});else if(Ea.common.gameMode==C.bigMove){Ea.common.aiPlayer.stopRun();let t=this.getScore(this.curFoul);this.judgeScoreEnd(t[0],t[1])&&(this.isEnd=!0),this.checkBigSkillWords(()=>{this.isEnd?this.gameEnd():(this.waitShoot(),Ea.eventMgr.event(n))})}else if(Ea.common.gameMode==C.placeBall){Ea.common.destroyAwardSpine();let t=this.curFoul==s.rootHole,e=this.inHoleBalls.length;this.inHoleBalls.indexOf(0)>-1&&(e-=1),t&&this.placeRootBall(),console.log("neeballs",this.needBalls),console.log("当前完成的goalNum",e),this.finishBalls+=e,console.log("当前完成的finishballs",this.finishBalls);let i=this.needBalls;if(this.placeBallData.type==w.challenge&&(i+=100),this.finishBalls>=i)this.success=!0,this.gameEnd();else switch(this.placeBallData.type){case w.normal:!t&&e>0?(this.updatePlaceBallPos(),this.updatePlaceBallState()):(this.curHP--,this.openRegretView(t,e)),this.waitShoot(),Ea.eventMgr.event(n);break;case w.challenge:this.curHP--,this.updatePlaceBallState(),t?this.openRegretView(t,e,!0):(this.updatePlaceBallPos(),this.curHP<=0&&(this.success=!0,this.gameEnd())),this.waitShoot(),Ea.eventMgr.event(n)}}}checkClassicWords(t){Ea.common.wordsMgr.setClassicCombo(this.isChangeTurn);let e=!this.isChangeTurn&&(""==this.curFoul||this.curFoul==s.wrongTouch),i=this.getClassicWordsType();if(e&&-1!=i){let e=Math.random()<=.5?"hint01":"hint02";Ea.soundMgr.playSound(e),Ea.common.wordsMgr.playClassicWords(i,t)}else Laya.timer.once(300,this,()=>{t&&t()})}getClassicWordsType(){let t=Ea.common.d2World,e=-1;if(!this.isInterrupt&&this.judgeNormalSuccess())return e=I.perfectShow;if(1==this.inHoleBalls.length&&t.targetBall&&this.inHoleBalls[0]==t.targetBall.number&&t.isOnSameLine)return e=I.directShoot;if(this.inHoleBalls.length>0&&(null==t.targetBall||this.inHoleBalls.indexOf(t.targetBall.number)<=-1))return e=I.anotherShoot;if(100==t.powerPercent&&this.inHoleBalls.length>0)return e=I.bigPower;return 1==this.inHoleBalls.length&&Ea.common.d2World.inHolesSpeed[0]<=1?e=I.hardShoot:this.inHoleBalls.length>0?e=I.directShoot:e}checkBigSkillWords(t){if(this.curFoul==s.timeOut)t&&t();else{let e=!1;this.selfTurn?e=!0:(this.aiPlayedBreakArmy||(this.aiPlayedBreakArmy=!0,e=!0),this.aiCurSkill!=b.breakArmy&&(e=!0)),Ea.common.skillMgr.playedLastSkill&&(Ea.common.skillMgr.playedLastSkill=!1,e=!1),e?Ea.common.skillMgr.runBigSkill(e=>{let i=0,s=0;this.selfTurn?i+=e:s+=e,this.judgeScoreEnd(i,s)&&(this.isEnd=!0),this.playBigSkillTimes(t)}):this.playBigSkillTimes(t)}}playBigSkillTimes(t){let e=this.inHoleBalls.length;this.inHoleBalls.indexOf(0)>-1&&(e=this.inHoleBalls.length-1),e<=0?t&&t():Ea.common.wordsMgr.playBigSkillTimes(e,()=>{t&&t()})}playSkillTips(){let t,e=0;this.selfTurn?(e=Wa.getBigSkillByIndex(this.selfCurSkill),(t=this.selfCurSkill)==Wa.gameData.trySkill&&Laya.timer.currTimer<Wa.gameData.tryTime&&(e+=5)):(e=this.aiSkillLevelNum,t=this.aiCurSkill);let i="";switch(t){case b.highSpace:i=`An extra ${Ea.common.extraMoveNum} balls were moved`;break;case b.breakArmy:i=`You pocketed ${e} extra balls`;break;case b.ice:i=`${2*e} extra balls were frozen`;break;case b.fireworks:i=`${e} extra balls exploded `;break;case b.GuanYu:i=`There were ${Ea.common.extraMoveNum} displacement movements`}Ea.uiMgr.Show(Yt,i)}getFoulType(){let t="";if(null==this.firstColliObj)return 1==this.inHoleBalls.length&&0==this.inHoleBalls[0]?s.rootHole:s.notTouch;{if(this.selfTurn?this.selfBallArr.length>0?this.selfBallArr.indexOf(this.firstColliObj)<=-1&&(t=s.wrongTouch):this.ensureBallType||this.firstColliObj==this.blackNum&&(t=s.wrongTouch):this.aiBallArr.length>0?this.aiBallArr.indexOf(this.firstColliObj)<=-1&&(t=s.wrongTouch):this.ensureBallType||this.firstColliObj==this.blackNum&&(t=s.wrongTouch),this.inHoleBalls.length<=0)return t;let e,i;if(this.inHoleBalls.indexOf(0)>-1)t=s.rootHole;else for(let i=0;i<this.inHoleBalls.length;i++)if(e=this.inHoleBalls[i],this.selfTurn){if(this.aiBallArr.indexOf(e)>-1&&!this.isOpenBall){t=s.wrongHole;break}}else if(this.selfBallArr.indexOf(e)>-1&&!this.isOpenBall){t=s.wrongHole;break}for(let t=0;t<this.inHoleBalls.length;t++)e=this.inHoleBalls[t],(i=this.selfBallArr.indexOf(e))>-1&&this.selfBallArr.splice(i,1),(i=this.aiBallArr.indexOf(e))>-1&&this.aiBallArr.splice(i,1);this.updateLeftBall()}return t}judgeGameEndByBlack(t){if(this.selfTurn){if(this.selfBallArr.length>0&&t.indexOf(this.blackNum)>-1)return this.selfFoulNum=this.maxFoulTimes,!0}else if(this.aiBallArr.length>0&&t.indexOf(this.blackNum)>-1)return this.aiFoulNum=this.maxFoulTimes,!0}judgeClassic(t){if(this.isBlackInHole=this.judgeGameEndByBlack(this.inHoleBalls),Ea.common.aiPlayer.stopRun(),this.judgeNormalSuccess())return void(this.isEnd=!0);let e=t==s.timeOut||t==s.rootHole;if(this.selfTurn){if(e&&this.selfFoulNum++,this.selfFoulNum>=this.maxFoulTimes)return this.success=!1,void(this.isEnd=!0)}else if(e&&this.aiFoulNum++,this.aiFoulNum>=this.maxFoulTimes)return this.success=!0,void(this.isEnd=!0);(""==t||t==s.wrongTouch)&&this.inHoleBalls.length>0?this.isChangeTurn=!1:this.isInterrupt=!0}waitShoot(){if(Ea.common.gameMode==C.classic)switch(this.curFoul){case s.timeOut:case s.rootHole:this.selfTurn=!this.selfTurn,this.peoplePlay(5,6,!0);break;case s.notTouch:this.selfTurn=!this.selfTurn,this.peoplePlay(7,7);break;case s.wrongHole:this.selfTurn=!this.selfTurn,this.peoplePlay(11,11);break;default:this.inHoleBalls.length>0?this.peoplePlay(0,0,!1,!1):(this.selfTurn=!this.selfTurn,this.peoplePlay(7,7))}else Ea.common.gameMode==C.bigMove?this.curFoul==s.timeOut?(this.selfTurn=!this.selfTurn,this.peoplePlay(14,15),this.placeRootBall()):(this.selfTurn=!this.selfTurn,this.curFoul==s.rootHole?(this.peoplePlay(12,13),this.placeRootBall()):this.peoplePlay(0,0,!1,!1)):Ea.common.gameMode==C.placeBall&&(this.finishOneShoot=!0);this.gameResult()}gameResult(){this.firstColliObj=null,this.inHoleBalls=[];let t=Ea.common.d2World.rootBall.gameObj.x,e=Ea.common.d2World.rootBall.gameObj.y;Ea.common.gameMgr.lastRootBallPos.setValue(t,e),Ea.common.uiRodMethod&&Ea.common.uiRodMethod.resetRod(),Ea.common.d2World.rootBall.showSelf(),this.clearIceSkill(),this.selfTurn&&Y.gameInsert(),Ea.common.d3World.knifeRoot.destroyChildren(),this.selfTurn?(Ea.common.gameUI.showHelpLineGuide(),Ea.common.gameUI.setTurnAlpha(!0)):Ea.common.gameUI.setTurnAlpha(!1)}getScore(t){let e=0,i=0;return t==s.timeOut?this.selfTurn?i+=3:e+=3:this.inHoleBalls.length>0&&(this.selfTurn?t==s.rootHole?(i+=3,this.inHoleBalls.length-1>0&&(e+=this.inHoleBalls.length-1)):e+=this.inHoleBalls.length:t==s.rootHole?(e+=3,this.inHoleBalls.length-1>0&&(i+=this.inHoleBalls.length-1)):i+=this.inHoleBalls.length),[e,i]}judgeScoreEnd(t,e){if(this.selfScore+=t,this.aiScore+=e,this.updateAIScore(),this.updateSelfScore(),this.selfScore>=this.targertScore)return this.success=!0,!0;if(this.aiScore>=this.targertScore)return this.success=!1,!0;let i=Ea.common.d2World.ballArr;return 1==i.length&&0==i[0].number?this.selfScore>this.aiScore?(this.success=!0,!0):this.selfScore<this.aiScore?(this.success=!1,!0):(this.selfTurn?this.success=!1:this.success=!0,!0):void 0}clearIceSkill(){let t,e=Ea.common.d2World.ballArr;if(this.selfTurn){if(this.selfCurSkill==b.ice)for(let i=0;i<e.length;i++)"ice"==(t=e[i]).ballFunc&&t.setBallFunc("normal","self")}else if(this.aiCurSkill==b.ice)for(let i=0;i<e.length;i++)"ice"==(t=e[i]).ballFunc&&t.setBallFunc("normal","ai")}judgeNormalSuccess(){if(this.selfTurn){if(this.selfBallArr.length<=0&&this.inHoleBalls.indexOf(this.blackNum)>-1)return this.success=!0,!0}else if(this.aiBallArr.length<=0&&this.inHoleBalls.indexOf(this.blackNum)>-1)return this.success=!1,!0}gameEnd(){Moyu.isTT&&(Ea.common.screenImg=getScreenImg()),console.log("游戏结束",this.success),Ea.common.aiPlayer.stopRun(),Ea.common.gameMode==C.placeBall&&(this.getEndStarNum(),this.updatePlaceBallState()),this.isEnter=!1,Moyu.recordEnd(this,()=>{this.isEnter||(this.isEnter=!0,console.log("进入录结束回调"),this.enterNext())}),Laya.timer.once(1e3,this,()=>{this.isEnter||(this.isEnter=!0,this.enterNext())}),Ea.common.longHelpLine=!1}enterNext(){Laya.timer.clearAll(this),Moyu.canShare()>100||Moyu.isKs?Ea.uiMgr.Show(ae,this.success):Ea.uiMgr.Show(oe,this.success)}aiLeave(){Ea.common.gameUI.ui.topNode.aiNameTxt.text="offline"}aiGameEnd(t){this.success=t,Ea.common.aiPlayer.stopRun(),this.success&&(Ea.uiMgr.Show(Yt,"The opponent has fled"),Laya.timer.once(1e3,this,()=>{this.clearTime(),this.gameEnd()}))}openTimer(){let t=Ea.common.gameUI;this.selfTurn?(t.ui.topNode.selfProgress.visible=!0,t.ui.topNode.aiProgress.visible=!1,this.curTimer=t.ui.topNode.selfProgress):(t.ui.topNode.selfProgress.visible=!1,t.ui.topNode.aiProgress.visible=!0,this.curTimer=t.ui.topNode.aiProgress),this.accTime=0,Laya.timer.clearAll(this),Laya.timer.loop(20,this,this.updateTime,[.02]),this.curTimer.value=100}updateTime(t){this.gamePause||(this.accTime+=t,this.curTimer.value=100*(this.setTime-this.accTime)/this.setTime,this.accTime>=this.setTime&&(this.clearTime(),console.log("时钟进入了gameRun"),this.gameRun(s.timeOut)))}clearTime(){let t=Ea.common.gameUI;t.ui.topNode.selfProgress.visible=!1,t.ui.topNode.aiProgress.visible=!1,Laya.timer.clearAll(this)}peoplePlay(t,e,i=!1,o=!0){let n,a,h=Ea.common.gameUI.ui;if(o&&(n=cfgTable.wordsData[t].msg,a=cfgTable.wordsData[e].msg,i&&(n=n.replace("$",this.aiFoulNum+""),a=a.replace("$",this.selfFoulNum+""),this.placeRootBall(),!this.selfTurn&&Ea.common.gameMode==C.classic)))if(this.curFoul==s.rootHole){if(!Wa.getRootBallFoul()){Wa.setRootBallFoul(),a="";let t="The cue ball (white ball) has been pocketed. Three fouls have been committed—you lose this game",e="Boss, pay attention next time~";Ea.uiMgr.Show(le,t,e,L.foul)}}else if(this.curFoul==s.timeOut&&!Wa.getTimeoutFoul()){Wa.setTimeoutFoul(),a="";let t="Game timeout, 3 fouls, this game failed.",e="Boss, pay attention to the timeline~";Ea.uiMgr.Show(le,t,e,L.foul)}if(this.selfTurn)o&&Ea.uiMgr.Show(Yt,n,()=>{h.selfTurn.visible=!0,h.aiTurn.visible=!1,h.selfTurn.t0.play(),Moyu.vibration()});else{let t=Ea.tools.random(1,11),e=Wa.getChallengeTimes(),i=!1;if(Ea.common.gameMode==C.classic&&e>=1&&e<=3&&(t=9,this.aiBallArr.length<=2&&this.ensureBallType&&(t=3,3==e&&(this.showLongView||(this.showLongView=!0,i=!0)))),i)return void Ea.uiMgr.Show(ie,0,0,e=>{e?(Ea.common.longHelpLine=!0,Ea.common.d2World.getHelpLine()):t=10,Ea.common.aiPlayer.setAiLevel(t),o?Ea.uiMgr.Show(Yt,a,()=>{Ea.common.aiPlayer.runAI(),h.selfTurn.visible=!1,h.aiTurn.visible=!0,h.aiTurn.t0.play()}):Ea.common.aiPlayer.runAI(),this.openTimer(),this.finishOneShoot=!0,this.selfTurn?(h.topNode.selfKuang.visible=!0,h.topNode.aiKuang.visible=!1,h.topNode.selfTips.visible=!0,h.topNode.aiTips.visible=!1):(h.topNode.selfKuang.visible=!1,h.topNode.aiKuang.visible=!0,h.topNode.selfTips.visible=!1,h.topNode.aiTips.visible=!0)});if(Ea.common.gameMode==C.classic){let e=cfgTable.modeselectData[Ea.common.classicRoomType];if(e){let i=Ea.common.randomNum(e.aiLevel[0],e.aiLevel[1]);t=i}}Ea.common.aiPlayer.setAiLevel(t),o?Ea.uiMgr.Show(Yt,a,()=>{Ea.common.aiPlayer.runAI(),h.selfTurn.visible=!1,h.aiTurn.visible=!0,h.aiTurn.t0.play()}):Ea.common.aiPlayer.runAI()}this.openTimer(),this.finishOneShoot=!0,this.selfTurn?(h.topNode.selfKuang.visible=!0,h.topNode.aiKuang.visible=!1,h.topNode.selfTips.visible=!0,h.topNode.aiTips.visible=!1):(h.topNode.selfKuang.visible=!1,h.topNode.aiKuang.visible=!0,h.topNode.selfTips.visible=!1,h.topNode.aiTips.visible=!0)}placeRootBall(){let t=Ea.common.d2World.rootBall;if(!t)return;t.gameObj.x=this.lastRootBallPos.x,t.gameObj.y=this.lastRootBallPos.y,t.d3BallSrc.setTransPos(this.lastRootBallPos.x,this.lastRootBallPos.y);let e=Ea.common.gameUI.ui.moveNode;e.visible=!0,e.x=this.lastRootBallPos.x,e.y=this.lastRootBallPos.y,this.selfTurn||Ea.common.aiPlayer.resetRoot()}}class ce extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","guanyuAni")}onConstruct(){this.n0=this.getChild("n0")}}ce.URL="ui://isxx5ak7jaakv55u";class de extends A{constructor(){super()}onConstructor(){this.isEject=!1}show(t){super.show()}}de.uiName="UIFireworks";class ue extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIGuanYu")}onConstruct(){this.n2=this.getChild("n2"),this.n1=this.getChild("n1"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n7=this.getChild("n7"),this.t0=this.getTransition("t0")}}ue.URL="ui://isxx5ak7dt0av4yc";class ge extends A{constructor(){super()}onConstructor(){this.ui=ue.createInstance(),this.contentPane=this.ui,this.isEject=!1}show(t){super.show(),this.ui.t0.play(Laya.Handler.create(this,()=>{t&&t(),this.hide()}))}}ge.uiName="UIGuanYu";class me{constructor(){this.leveNum=0,this.extraScore=0,this.selfTurn=!1,this.playedLastSkill=!1,this.tweenArr=[],this._finishNum=0,this._curFinish=0,this._rootX=0,this._rootY=0,this.knifeTimes=0,this.knifeV2=new Laya.Vector2,this.knifeV3=new Laya.Vector3,this.rtStarX=0,this.rtStarY=0,this.addBigSkillSpine(),Ea.eventMgr.on(r,this,this.resetGame)}addBigSkillSpine(){this.skillSpine2=new q("yxz_dazhao",()=>{console.log("extra2 success")})}runBigSkill(t){this.tweenArr=[],this.callback=t,this.judgeSkill(),this.leveNum=Wa.getBigSkillByIndex(this.curSkill);let e=Wa.getSkillGuide();Ea.common.gameMgr.selfTurn?(0!=Ea.common.temSelfLevel&&(this.leveNum=Ea.common.temSelfLevel),this.curSkill==Wa.gameData.trySkill&&Laya.timer.currTimer<Wa.gameData.tryTime&&(this.leveNum+=5)):this.leveNum=Ea.common.gameMgr.aiSkillLevelNum,0==e&&(Wa.setSkillGuide(1),Wa.getNewUser()&&(Moyu.sendDataEvent("gameFirstPlay"),Wa.setNewUser())),this.playSpineAni(()=>{switch(this.curSkill){case b.highSpace:this.runHighSpace();break;case b.breakArmy:this.runBreakArmy();break;case b.ice:this.runIce();break;case b.fireworks:this.runFireworks();break;case b.GuanYu:this.runGuanYu()}})}judgeSkill(){let t,e=[b.highSpace,b.breakArmy,b.ice,b.GuanYu],i=Ea.common.gameMgr;for(let s=0;s<e.length;s++)if(t=e[s],i.selfTurn){if(i.selfCurSkill==t)return this.selfTurn=!0,void(this.curSkill=t)}else if(i.aiCurSkill==t)return this.selfTurn=!1,void(this.curSkill=t)}playSpineAni(t){let e={x:0,y:0,scaleX:1.2,scaleY:1.2},i=Ea.common.gameUI.ui.bigSkillNode.displayObject;i.destroyChildren();let s,o=0;switch(this.curSkill){case b.highSpace:o=1,Ea.soundMgr.playSound("skill01"),s=this.skillSpine2,e.scaleX=.5,e.scaleY=.5,s.play(e,1,!1,i,()=>{t&&t()});break;case b.breakArmy:o=2,Ea.soundMgr.playSound("skill02"),s=this.skillSpine2,e.scaleX=.5,e.scaleY=.5,s.play(e,2,!1,i,()=>{t&&t()});break;case b.ice:o=0,Ea.soundMgr.playSound("skill03"),s=this.skillSpine2,e.scaleX=.5,e.scaleY=.5,s.play(e,0,!1,i,()=>{t&&t()});break;case b.fireworks:Ea.soundMgr.playSound("skill_04_01"),Ea.soundMgr.playSound("skill04"),Ea.uiMgr.Show(de,t);break;case b.GuanYu:Ea.soundMgr.playSound("skill05_1"),Ea.soundMgr.playSound("skill05"),Ea.uiMgr.Show(ge,t)}}getAllBallArr(){let t=Ea.common.d2World.ballArr,e=[];for(let i=0;i<t.length;i++)t[i]instanceof tt||"ice"!=t[i].ballFunc&&(t[i].destroyed||e.push(t[i]));return e}getOneArr(t){let e,i=this.getAllBallArr();for(let s=0;s<i.length;s++)if((e=i[s]).id==t.id){i.splice(s,1);break}return i}getNearBallBag(t){let e=Ea.common.gameUI.ui,i=[];for(let t=1;t<=6;t++)i.push(e.border["circle"+t]);let s,o=0,n=Math.pow(i[0].x-t.gameObj.x,2)+Math.pow(i[0].y-t.gameObj.y,2),a=0;for(let e=1;e<i.length;e++)s=i[e],(a=Math.pow(s.x-t.gameObj.x,2)+Math.pow(s.y-t.gameObj.y,2))<n&&(n=a,o=e);return[i[o],o]}ballFlyToBag(t,e=300){let i,s;this._finishNum=t.length,this._curFinish=0;let o={},n={1:0,2:0,3:0,4:0,5:0,6:0};for(let a=0;a<t.length;a++){(i=t[a]).outColli.isSensor=!0,i.innerColli.isSensor=!0,i.isRunSkillAni=!0;let h=this.getNearBallBag(i);s=h[0],o[a]=h[1],i.d3BallSrc.scaleXYZ=.5,this.tweenArr.push(i.d3BallSrc,i),Laya.Tween.to(i.d3BallSrc,{scaleXYZ:1},e,Laya.Ease.sineOut,Laya.Handler.create(this,()=>{Laya.Tween.to(i.d3BallSrc,{scaleXYZ:.5},e,Laya.Ease.sineIn)})),Laya.Tween.to(i,{myX:s.x,myY:s.y},2*e+10,null,Laya.Handler.create(this,()=>{let e=o[this._curFinish];if(n[e]?t[this._curFinish].checkWrongBall(!1):(n[e]=1,t[this._curFinish].checkWrongBall()),this._curFinish++,this._curFinish>=this._finishNum)if(this.curSkill==b.highSpace);else if(this.curSkill==b.breakArmy){let t=Ea.common.d2World.rootBall;t.gameObj.x=this._rootX,t.gameObj.y=this._rootY,t.d3BallSrc.setTransPos(this._rootX,this._rootY),Ea.common.d2World.d2Gan.ui.visible=!0,Ea.common.d2World.d2HelpLine.ui.visible=!0,Ea.common.d2World.getHelpLine(),this.callback&&this.callback(this.extraScore)}}))}}runHighSpace(){let t=Ea.common.d2World.rootBall;t.showSelf();let e=t.d3BallSrc,i=this.getAllBallArr();if(i.length<=0)return void(this.callback&&this.callback(0));let s=Ea.common.d2World.targetBall,o=s&&s.destroyed;s&&!o&&"ice"!=s.ballFunc||(s=Ea.common.getRandArrEle(i));let n=s.d3BallSrc;Ea.common.d2World.d2Gan.ui.visible=!1,Ea.common.d2World.d2HelpLine.ui.visible=!1,e.scaleXYZ=.5,this.tweenArr.push(e),Laya.Tween.to(e,{scaleXYZ:1,posX:n.posX,posZ:n.posZ},1e3,Laya.Ease.sineOut,Laya.Handler.create(this,()=>{Laya.Tween.to(e,{scaleXYZ:.5},500,Laya.Ease.sineIn,Laya.Handler.create(this,()=>{let i=Ea.poolD3Mgr.getItem(x.hitEft);i.transform.localPositionX=e.transform.localPositionX,i.transform.localPositionY=e.transform.localPositionY,i.transform.localPositionZ=e.transform.localPositionZ;let o=[s],n=this.leveNum-1;if(n>0){let t=this.getOneArr(s);if(t.length>0){Ea.common.botherArr(t),n>=t.length&&(n=t.length);for(let e=0;e<n;e++)o.push(t[e])}}Ea.common.extraMoveNum=n+1,this.extraScore=n+1,this._rootX=s.gameObj.x,this._rootY=s.gameObj.y,t.gameObj.x=this._rootX,t.gameObj.y=this._rootY,t.d3BallSrc.setTransPos(this._rootX,this._rootY),Laya.Tween.clearAll(e),this.addRandomForce(o)}))}))}addRandomForce(t){let e;t.length>0&&(Ea.common.d2World.openCheckStill=!0,this.playedLastSkill=!0);for(let i=0;i<t.length;i++){let s=Ea.common.randomNum(0,360),o=Ea.common.randomNum(65,100);e=t[i],this.setLinearSpeed(s,e.rigy,o)}}setLinearSpeed(t,e,i){let s=Math.sin(t*Math.PI/180),o=Math.cos(t*Math.PI/180),n=new Laya.Vector2;n.x=4*i*s,n.y=-4*i*o,e.applyLinearImpulseToCenter(n)}runBreakArmy(){Ea.common.d2World.d2Gan.ui.visible=!1,Ea.common.d2World.d2HelpLine.ui.visible=!1;let t=Ea.common.gameUI.ui;t.skillRod.visible=!0,t.skillRod.rotation=110;let e=this.getAllBallArr();if(e.length<=0)return t.skillRod.visible=!1,void(this.callback&&this.callback(0));Ea.common.botherArr(e),this.leveNum>=e.length&&(this.leveNum=e.length);let i=e.length-this.leveNum;e.splice(0,i),this.extraScore=this.leveNum;let s=t.skillRod.x,o=t.skillRod.y;this._rootX=Ea.common.d2World.rootBall.gameObj.x,this._rootY=Ea.common.d2World.rootBall.gameObj.y;let n=[];for(let t=0;t<e.length;t++){let i=e[t],a=Math.pow(i.gameObj.x-s,2)+Math.pow(i.gameObj.y-o,2);a=Math.pow(a,.5),n.push(a)}this.tweenArr.push(t.skillRod),Laya.Tween.to(t.skillRod,{rotation:20},800,Laya.Ease.sineIn,Laya.Handler.create(this,()=>{})).update=Laya.Handler.create(this,(i,a,h)=>{let l,r,c,d=t.skillRod.rotation;for(let t=0;t<e.length;t++)c=e[t],l=s+n[t]*Math.sin(d*Math.PI/180),r=o-n[t]*Math.cos(d*Math.PI/180),r-=20,c.gameObj.x=l,c.gameObj.y=r,c.d3BallSrc.setTransPos(l,r);d<=60&&(Laya.Tween.clearAll(t.skillRod),this.ballFlyToBag(e,150),t.skillRod.visible=!1)},null,!1)}runIce(){let t=Ea.common.d2World.ballArr;this.leveNum*=2,this.leveNum>=t.length-1&&(this.leveNum=t.length-1);let e,i=[],s=[];for(let e=0;e<t.length;e++)t[e]instanceof tt||i.push(t[e]);if(i.length<=0)this.callback&&this.callback(0);else{Ea.common.botherArr(i);for(let t=0;t<this.leveNum;t++)s.push(i[t]);this.extraScore=this.leveNum;for(let t=0;t<s.length;t++)(e=s[t]).d3BallSrc.playIceEft();Laya.timer.once(2e3,this,()=>{for(let t=0;t<s.length;t++){e=s[t];let i=Ea.common.gameMgr.selfTurn?"self":"ai";e.setBallFunc("ice",i)}this.callback&&this.callback(0)})}}runFireworks(){let t=this.getAllBallArr();if(t.length<=0)return void(this.callback&&this.callback(0));Ea.common.d2World.d2Gan.ui.visible=!1,Ea.common.d2World.d2HelpLine.ui.visible=!1;let e=[],i=this.leveNum;if(i>0&&t.length>0){Ea.common.botherArr(t),i>=t.length&&(i=t.length);for(let s=0;s<i;s++)e.push(t[s])}Ea.common.extraMoveNum=i,this.extraScore=i,this.addRandmomFireworks(e)}addRandmomFireworks(t){let e;Laya.timer.once(1100,this,()=>{t.length>0&&(Ea.common.d2World.openCheckStill=!0,this.playedLastSkill=!0)}),Ea.soundMgr.playSound("skill_04_02");let i=-200;for(let s=0;s<t.length;s++)i+=200,(e=t[s]).d3BallSrc.runFireworks(e,i,t=>{let e=Ea.common.randomNum(0,360);e=this.getFireworksAngle(t);let i=Ea.common.randomNum(45,80);t.destroyed||this.setLinearSpeed(e,t.rigy,i)})}getFireworksAngle(t){let e=Ea.common.d2World.rootBall;return Ea.common.getfguiRotation(t.gameObj.x-e.gameObj.x,t.gameObj.y-e.gameObj.y)}resetGame(){if(Laya.timer.clearAll(this),this.tweenArr)for(let t=0;t<this.tweenArr.length;t++)Laya.Tween.clearAll(this.tweenArr[t]);this.tweenArr=null}runGuanYu(){Ea.common.d2World.d2Gan.ui.visible=!1,Ea.common.d2World.d2HelpLine.ui.visible=!1;let t=Ea.common.d2World.rootBall;t.isInHole&&(t.gameObj.x=Ea.common.gameMgr.lastRootBallPos.x,t.gameObj.y=Ea.common.gameMgr.lastRootBallPos.y,t.d3BallSrc.setTransPos(t.gameObj.x,t.gameObj.y),t.showSelf()),this.rtStarX=t.gameObj.x,this.rtStarY=t.gameObj.y,this.knifeTimes=0,this.playedLastSkill=!0,t.forceRun=!0,t.rigy.type="static",Ea.common.d2World.openCheckStill=!0,this.guanyuRandomKnife()}guanyuRandomKnife(){let t=Ea.common.d2World.rootBall,e=this.getRandDir(),i=Ea.common.getfguiRotation(e.x,e.y);console.log("当前angle",i),this.cloneKnife(t.gameObj.x,t.gameObj.y,180-i),this.cloneGuanYuEft(t.gameObj.x,t.gameObj.y,i);let s=this.rtStarX+324*Math.sin(i*Math.PI/180),o=this.rtStarY+324*-Math.cos(i*Math.PI/180);Laya.Tween.to(t.gameObj,{x:s,y:o},150,null,Laya.Handler.create(this,()=>{let e;this.rtStarX=t.gameObj.x,this.rtStarY=t.gameObj.y,this.knifeTimes++,(e=Ea.common.gameMgr.selfTurn?Wa.getBigSkillByIndex(4):Ea.common.gameMgr.aiSkillLevelNum)||(e=1),e+=2,this.knifeTimes<e?Laya.timer.once(400,this,()=>{this.guanyuRandomKnife()}):(t.forceRun=!1,t.rigy.type="dynamic",Ea.common.extraMoveNum=e)}))}getRandDir(){let t=Ea.common.d2World.rootBall,e=this.getAllBallArr(),i=Ea.common.getRandArrEle(e);return this.knifeV2.setValue(i.gameObj.x-t.gameObj.x,i.gameObj.y-t.gameObj.y),this.knifeV2}cloneKnife(t,e,i){let s=Ea.common.d3World.knifeRoot,o=Ea.common.d3World.knife.clone();return s.addChild(o),Ea.common.pos2to3Convert(t,e,this.knifeV3),o.transform.localPositionX=this.knifeV3.x,o.transform.localPositionY=0,o.transform.localPositionZ=this.knifeV3.z,o.transform.localRotationEulerX=0,o.transform.localRotationEulerY=i,o.transform.localRotationEulerZ=0,o.active=!0,o}cloneGuanYuEft(t,e,i){}}class ye extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIWordsList")}onConstruct(){this.c1=this.getController("c1"),this.n74=this.getChild("n74"),this.clickNode=this.getChild("clickNode"),this.myNode=this.getChild("myNode"),this.n68=this.getChild("n68"),this.n66=this.getChild("n66"),this.n55=this.getChild("n55"),this.wordsBtn=this.getChild("wordsBtn"),this.emotionBtn=this.getChild("emotionBtn"),this.mybggg=this.getChild("mybggg"),this.wordsList=this.getChild("wordsList"),this.emotionList=this.getChild("emotionList"),this.myRoot=this.getChild("myRoot")}}ye.URL="ui://isxx5ak7i4k243i";class pe{constructor(t,e){this.ui=e,this.index=t,this.ui.onClick(this,this.clickSelf),this.updateSelf()}updateSelf(){let t=cfgTable.emotionData[this.index+1];this.ui.myIcon.url=Ea.common.getGameIconUrl(t.icon)}clickSelf(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.common.talkMgr.showSelfEmotion(this.index+1),Ea.common.talkMgr.closeTalkView()}}class fe{constructor(t,e){this.ui=e,this.index=t,this.ui.onClick(this,this.clickSelf),this.updateSelf()}updateSelf(){let t=cfgTable.talkwordsData[this.index+1];this.ui.txt.text=t.msg}clickSelf(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.common.talkMgr.showSelfTalk(this.index+1),Ea.common.talkMgr.closeTalkView()}}class xe extends A{constructor(){super()}onConstructor(){this.ui=ye.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.wordsBtn,this.openTalkList),this.addUIClick(this.ui.emotionBtn,this.openEmotionList),this.addUIClick(this.ui.clickNode,this.hide),this.initTalkList(),this.initEmotionList()}show(){super.show()}initTalkList(){this.ui.wordsList.itemRenderer=Laya.Handler.create(this,this.renderTalkItem,null,!1);let t=cfgTable.talkwordsData,e=Object.keys(t).length;this.ui.wordsList.numItems=e}initEmotionList(){this.ui.emotionList.itemRenderer=Laya.Handler.create(this,this.renderEmotionItem,null,!1);let t=cfgTable.emotionData,e=Object.keys(t).length;this.ui.emotionList.numItems=e}renderTalkItem(t,e){new fe(t,e)}renderEmotionItem(t,e){new pe(t,e)}openTalkList(){this.ui.c1.selectedIndex=0}openEmotionList(){this.ui.c1.selectedIndex=1}}xe.uiName="UIWordsList";class Ce{constructor(){this.aiSpeak=!0,this.emotionList=[],this.talkList=[],this.addEvent(),Ea.eventMgr.on(r,this,this.resetGame),this.emotionList=[],this.talkList=[];for(let t in cfgTable.emotionData)this.emotionList.push(cfgTable.emotionData[t].id);for(let t in cfgTable.talkwordsData)this.talkList.push(cfgTable.talkwordsData[t].id)}addEvent(){let t=Ea.common.gameUI.ui;t.wordsBtn.visible=!0,t.wordsBtn.onClick(this,this.openTalkView),t.aiWordsBtn.visible=!0,t.aiWordsBtn.onClick(this,this.clickAIState)}openTalkView(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.uiMgr.Show(xe)}closeTalkView(){Ea.uiMgr.Hide(xe)}clickAIState(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.aiSpeak=!this.aiSpeak,this.changeAIState(this.aiSpeak)}changeAIState(t){this.aiSpeak=t;let e=Ea.common.gameUI.ui.aiWordsBtn;e.c1.selectedIndex=t?0:1}showSelfTalk(t){let e=Ea.common.gameUI.ui;e.selfTalk.visible=!0,e.selfTalk.myNode.c1.selectedIndex=1,e.selfTalk.myNode.txt.text=cfgTable.talkwordsData[t].msg,e.selfTalk.t0.play()}showSelfEmotion(t){let e=Ea.common.gameUI.ui;e.selfTalk.visible=!0,e.selfTalk.myNode.c1.selectedIndex=0,this.selfSpine&&this.selfSpine.dispose(),e.selfTalk.myNode.spineRoot&&e.selfTalk.myNode.spineRoot.displayObject.destroyChildren();let i=cfgTable.emotionData[t].spine;this.selfSpine=new q(i,()=>{let t={x:e.selfTalk.myNode.spineRoot.width/2-2,y:e.selfTalk.myNode.spineRoot.height/2,scaleX:.35,scaleY:.35};this.selfSpine.play(t,0,!1,e.selfTalk.myNode.spineRoot.displayObject)}),e.selfTalk.t0.play()}showAITalk(t){if(!this.aiSpeak)return;if(Wa.gameData.gameCount<2)return;t<1&&(t=this.getRandTalk());let e=Ea.common.gameUI.ui;e.aiTalk.visible=!0,e.aiTalk.myNode.c1.selectedIndex=1,e.aiTalk.myNode.txt.text=cfgTable.talkwordsData[t].msg,e.aiTalk.t0.play()}getRandTalk(){let t=Ea.tools.random(0,this.talkList.length);return this.emotionList[t]}getRandEmotion(){let t=Ea.tools.random(0,this.emotionList.length);return this.emotionList[t]}showAIEmotion(t){if(!this.aiSpeak)return;if(Wa.gameData.gameCount<2)return;t<1&&(t=this.getRandEmotion());let e=Ea.common.gameUI.ui;e.aiTalk.visible=!0,e.aiTalk.myNode.c1.selectedIndex=0,this.aiSpine&&this.aiSpine.dispose(),e.aiTalk.myNode.spineRoot&&e.aiTalk.myNode.spineRoot.displayObject.destroyChildren();let i=cfgTable.emotionData[t].spine;this.aiSpine=new q(i,()=>{let t={x:e.aiTalk.myNode.spineRoot.width/2-2,y:e.aiTalk.myNode.spineRoot.height/2,scaleX:.35,scaleY:.35};this.aiSpine.play(t,0,!1,e.aiTalk.myNode.spineRoot.displayObject)}),e.aiTalk.t0.play()}resetGame(){let t=Ea.common.gameUI.ui;t.aiTalk.visible=!1,t.selfTalk.visible=!1,this.aiSpine&&this.aiSpine.dispose(),this.selfSpine&&this.selfSpine.dispose(),t.aiTalk.myNode.spineRoot&&t.aiTalk.myNode.spineRoot.displayObject.destroyChildren(),t.selfTalk.myNode.spineRoot&&t.selfTalk.myNode.spineRoot.displayObject.destroyChildren(),this.closeTalkView()}}class be{constructor(){this.comboTimes=1,this.skillTimes=0,this.wordsSpine=new q("yxz_jingqiu"),this.comboSpine=new q("yxz_liangan"),this.skillSpine=new q("yiganxqiu"),this.scoreSpine=new q("defen")}setClassicCombo(t){t&&(this.comboTimes=0)}playClassicWords(t,e){this.callback=e;let i=t,s=Ea.common.gameUI.ui.classicWorldsNode.displayObject,o=this.wordsSpine.play({x:0,y:0,scaleX:1,scaleY:1},i,!1,s,()=>{o.destroy(!0),this.playClassicTimes()})}playClassicTimes(){if(this.comboTimes++,this.comboTimes<=1)this.callback&&this.callback();else{let t=this.comboTimes-1,e={x:0,y:0,scaleX:1,scaleY:1},i=Ea.common.gameUI.ui.classicWorldsNode.displayObject,s=this.comboSpine.play(e,t,!1,i,()=>{s.destroy(!0),this.callback&&this.callback()})}}playBigSkillTimes(t,e){if(t<=0)return void(e&&e());this.callback=e;let i="sz_0",s=0;this.getWordsImg(t,i,()=>{let e={x:0,y:0,scaleX:1,scaleY:1},i=Ea.common.gameUI.ui.bigMoveWorldsNode.displayObject,o=this.skillSpine.createSpine(e,i,1),n="",a="";t<=9?(n=`res/d2Res/sz_0${t}.png`,o.setSlotSkin("sz_6",Laya.loader.getRes(n)),s=0):(n=`res/d2Res/sz_0${t%10}.png`,a=`res/d2Res/sz_0${Math.floor(t/10)}.png`,o.setSlotSkin("sz_7",Laya.loader.getRes(n)),o.setSlotSkin("sz_6",Laya.loader.getRes(a)),s=1),this.skillSpine.play(e,s,!1,i,()=>{o.destroy(!0),Ea.common.gameMgr.playSkillTips(),this.playScore(t),Ea.common.playRandomMutiBallBigSkillSound()},o)})}playScore(t){let e=0;this.getWordsImg(t,"sz_",()=>{let i={x:0,y:0,scaleX:1,scaleY:1},s=Ea.common.gameUI.ui.bigMoveWorldsNode.displayObject,o=this.scoreSpine.createSpine(i,s,1),n="",a="";t<=9?(n=`res/d2Res/sz_${t}.png`,o.setSlotSkin("sz_6",Laya.loader.getRes(n)),e=0):(n=`res/d2Res/sz_${t%10}.png`,a=`res/d2Res/sz_${Math.floor(t/10)}.png`,o.setSlotSkin("sz_6",Laya.loader.getRes(n)),o.setSlotSkin("sz_7",Laya.loader.getRes(a)),e=1),this.scoreSpine.play(i,e,!1,s,()=>{o.destroy(!0),this.callback&&this.callback()},o)})}getWordsImg(t,e="",i){let s=[];t<=9?s.push({url:`res/d2Res/${e+t}.png`,type:Laya.Loader.IMAGE}):s.push({url:`res/d2Res/${e}${t%10}.png`,type:Laya.Loader.IMAGE},{url:`res/d2Res/${e}${Math.floor(t/10)}.png`,type:Laya.Loader.IMAGE}),Laya.loader.load(s,Laya.Handler.create(this,()=>{i&&i()}))}}class Ie extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIRodMethod")}onConstruct(){this.n24=this.getChild("n24"),this.white=this.getChild("white"),this.dot=this.getChild("dot"),this.sureBtn=this.getChild("sureBtn"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.n5=this.getChild("n5"),this.n14=this.getChild("n14"),this.t0=this.getTransition("t0")}}Ie.URL="ui://isxx5ak7hkrz3tv";class ke extends A{constructor(){super(),this.isPressd=!1}onConstructor(){this.ui=Ie.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.sureBtn,this.closeSelf),this.moveDir=new Laya.Vector2,this.moveDest=new Laya.Vector2,this.centerPos=new Laya.Vector2,Ea.common.uiRodMethod=this}show(){super.show(),Ea.common.gameMgr.gamePause=!0,this.openPressDotEvent(),this.gameRod=Ea.common.gameUI.ui.rodMethodNode,this.centerPos.x=this.ui.white.x,this.centerPos.y=this.ui.white.y,this.moveDest.x=this.centerPos.x-Ea.common.rodOffest.x,this.moveDest.y=this.centerPos.y-Ea.common.rodOffest.y,this.setDot()}setDot(){this.ui.dot.x=this.moveDest.x,this.ui.dot.y=this.moveDest.y}closeSelf(){Ea.common.rodOffest.x=this.centerPos.x-this.moveDest.x,Ea.common.rodOffest.y=this.centerPos.y-this.moveDest.y,this.gameRod.dot.x=this.gameRod.bg.x-Ea.common.rodOffest.x,this.gameRod.dot.y=this.gameRod.bg.y-Ea.common.rodOffest.y,Ea.common.gameMgr.gamePause=!1,this.hide()}openPressDotEvent(){this.closePressDotEvent(),this.ui.dot.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_DOWN,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_MOVE,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.on(Laya.Event.MOUSE_MOVE,this,this.onDown)}closePressDotEvent(){this.ui.dot.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_DOWN,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_MOVE,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.off(Laya.Event.MOUSE_MOVE,this,this.onDown)}onDown(t){if(t.type==Laya.Event.MOUSE_DOWN?this.isPressd=!0:t.type==Laya.Event.MOUSE_UP&&this.isPressd&&(this.isPressd=!1),!this.isPressd)return;this.moveDest.x=t.stageX,this.moveDest.y=t.stageY,Ea.tools.getV2SqDis(this.moveDest,this.centerPos)>6724&&(this.moveDir=Ea.tools.getV2Dir(this.centerPos.x,this.centerPos.y,t.stageX,t.stageY,this.moveDir),this.moveDest=Ea.tools.getV2Dest(this.centerPos.x,this.centerPos.y,this.moveDir,82,this.moveDest)),this.setDot()}resetRod(){this.ui.dot.x=this.ui.white.x,this.ui.dot.y=this.ui.white.y,this.gameRod.dot.x=this.gameRod.bg.x,this.gameRod.dot.y=this.gameRod.bg.y,Ea.common.rodOffest.x=0,Ea.common.rodOffest.y=0}}ke.uiName="UIRodMethod";class we extends A{constructor(){super(),this.powerNum=0,this.isD3Inited=!1,this.isPrePlay=!1,this.isMoveRod=!1,this.eventObj={curX:0,curY:0,lastX:0,lastY:0,starX:0,starY:0},this.rulerDis=20,this.rulerOffset=0}onConstructor(){this.ui=ht.createInstance(),this.contentPane=this.ui,this.ui.x+=Ea.common.sysOffestNum,this.ui.border.alpha=Ea.common.showDebug?1:0,this.isEject=!1,Ea.common.gameUI=this,this.initSelf()}isTurnSelf(){if(!Ea.common.d2World.openCheckStill&&Ea.common.gameMgr.selfTurn&&Ea.common.gameMgr.finishOneShoot)return!0}initSelf(){let t=this.ui.topNode;t.selfBallList.itemRenderer=Laya.Handler.create(this,this.renderSelfDisplayBalls,null,!1),t.aiBallList.itemRenderer=Laya.Handler.create(this,this.renderAIDisplayBalls,null,!1),this.barInfo={},this.barInfo.curY=0,this.barInfo.height=this.ui.powerNode.height,this.barInfo.showStarY=this.ui.powerNode.showImg.y,this.barInfo.powerStartY=this.ui.powerNode.y,Ea.common.aiPlayer=new J,Ea.common.gameMgr=new re,Ea.common.skillMgr=new me,Ea.common.wordsMgr=new be,Ea.common.talkMgr=new Ce,Ea.common.classicEmotionSpine=new q("yxz_bqwz",()=>{console.log("加载经典模式表情文件chenggon !")}),Ea.common.awardSpine=new q("jinbi",()=>{console.log("挑战模式奖励模式spine加载成功!")}),Ea.eventMgr.off(r,this,this.resetGame),Ea.eventMgr.on(r,this,this.resetGame),this.addUIClick(this.ui.rodMethodNode,this.addRodMethodClick),this.addUIClick(this.ui.returnBtn,this.returnHome),this.addUIClick(this.ui.helpBtn,this.clickHelpLineBtn),this.addUIClick(this.ui.placeChallengeNode.helpLineBtn,this.clickHelpLineBtn),this.addUIClick(this.ui.placeNormalNode.helpLineBtn,this.clickHelpLineBtn)}getGanZiImg(){let t=Wa.getCurBallRod(),e=cfgTable.ballrodData[t+1],i=Ea.common.getGameIconUrl(e.img);console.log("zh:getGanZiImg gan_url=="+i),this.ui.powerNode.showImg.url=i,console.log("zh:修改杆子图标O K")}returnHome(){Ea.uiMgr.Show(le,"Are you sure to exit the game?","Boss, why don't you play for a while longer?",L.exitGame)}addRodMethodClick(){this.isTurnSelf()&&Ea.uiMgr.Show(ke)}clickHelpLineBtn(t=!1){this.isTurnSelf()&&Ea.uiMgr.Show(ie,0,0,t=>{t&&(Ea.common.longHelpLine=!0,Ea.common.d2World.getHelpLine(),Moyu.sendDataEvent("guideNum"))})}renderSelfDisplayBalls(t,e){let i="q"+Ea.common.gameMgr.selfBallArr[t];e.myImg.url=Ea.common.getGameIconUrl(i)}renderAIDisplayBalls(t,e){let i="q"+Ea.common.gameMgr.aiBallArr[t];e.myImg.url=Ea.common.getGameIconUrl(i)}updateMode(){Ea.common.gameMode==C.classic?this.ui.topNode.scoreNode.visible=!1:Ea.common.gameMode==C.bigMove&&(this.ui.topNode.scoreNode.visible=!0)}show(){super.show(),console.log("zh:uigame show AADD"),this.ui.alpha=0,this.updateSelf(),Ea.common.gameMgr.gamePause=!1,Ea.common.gameUI.ui.blackAni.visible=!1,Ea.common.gameUI.ui.whiteAni.visible=!1,this.ui.powerEft.visible=!1,this.ui.colorNode.visible=!1,this.updateHead();let t=Wa.getCurBallRod();console.log("zh:UIGame 选择的球杆234 = "+t),this.getGanZiImg()}updateSelf(){if(Ea.common.gameMode==C.classic)this.ui.c1.selectedIndex=0,this.ui.topNode.middleNode.c1.selectedIndex=0,this.ui.topNode.middleNode.visible=!0,this.ui.topNode.middleNode.awardTxt.text=Ea.common.passAwardCoin+"";else if(Ea.common.gameMode==C.bigMove){this.ui.c1.selectedIndex=0,this.ui.topNode.middleNode.c1.selectedIndex=1,this.ui.topNode.middleNode.visible=!1;let t=Ea.cfgMgr.getMaxBigMoveLength(),e=Ea.common.randomNum(1,t);0==Wa.getSkillGuide()&&(e=1),Ea.common.bigMoveLevelIndex=e}else if(Ea.common.gameMode==C.placeBall){let t=cfgTable.placeballData[Ea.common.placeBallCurLevel];this.ui.c1.selectedIndex=1+t.type,this.ui.alpha=1,this.startGame()}this.updateMode(),this.initD3world(),this.initD2world()}startGame(){this.ui.snowNode.visible=Math.random()<=.1,this.ui.d2Node.visible=!1,Ea.common.d3World.d3Hand.gameObj.active=!1,Ea.common.d3World.tableSrc.init(),Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=.06,this.cameraViewChange(()=>{switch(Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=0,Ea.common.gameMode){case C.classic:Ea.common.d3World.d3Hand.gameObj.active=!0,this.playPutBallD3Ani();break;case C.bigMove:this.enterGame(),Laya.timer.once(500,this,()=>{this.ui.topNode.middleNode.visible=!0,this.ui.topNode.middleNode.t0.play()});break;case C.placeBall:this.enterGame()}}),Y.showBanner(!1)}enterGame(){this.ui.d2Node.visible=!0,Ea.common.d3World.d3Hand.gameObj.active=!1,Ea.common.showOneCamera("mainCamera"),Moyu.recordGame(30,!0),this.isPrePlay||(this.isPrePlay=!0,Ea.common.d3World.prePlayEft()),Ea.common.gameMgr.gameReady(),this.openAllEvent(),this.ui.snowNode.visible=!1;let t=Ea.common.gameMode!=C.bigMove&&1==Wa.getGuideHelpLine();this.ui.helpBtn.visible=t}showHelpLineGuide(){let t=Wa.getGuideHelpLine();Ea.common.gameMode==C.classic&&0==t&&(this.ui.helpBtn.visible=!0,this.ui.guideNode.visible=!0)}setTurnAlpha(t){this.ui.keduNode.alpha=t,this.ui.ganNode.alpha=t,this.ui.rodMethodNode.alpha=t,this.ui.helpBtn.alpha=t?1:0}cameraViewChange(t){Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=.06;let e=Ea.common.d3World.cameraObj.visitAngle.transform;Ea.common.showOneCamera("visitAngle"),e.localRotationEulerY=180,e.localRotationEulerZ=0,Laya.Tween.to(e,{localRotationEulerY:0},3e3,null,Laya.Handler.create(this,()=>{Laya.Tween.to(e,{localRotationEulerZ:-70},800,null,Laya.Handler.create(this,()=>{t&&t()}))}))}playPutBallD3Ani(){Ea.common.showOneCamera("mainCamera");let t=Ea.common.d3World.d3Hand;t.gameObj.active=!0,t.transform.localPositionZ=3,Laya.Tween.to(t,{posZ:0},500,Laya.Ease.sineIn,Laya.Handler.create(this,()=>{Laya.Tween.to(t,{posZ:10},400,null,Laya.Handler.create(this,()=>{t.gameObj.active=!1,this.enterGame()}),400)}))}updateHead(){let t=Moyu.getUserInfo();this.ui.topNode.selfNameTxt.text=t.nickName,Ea.common.createHead(this.ui.topNode.selfHeadLoader,t.headIcon,80);let e=Ea.cfgMgr.getRandomUserInfo();if(Wa.getSkillGuide()<1)this.ui.topNode.aiNameTxt.text="billiards",this.ui.topNode.aiHeadLoader.url="res/icon.png";else{this.ui.topNode.aiNameTxt.text=e.name;let t=Math.floor(10*Math.random())+1;this.ui.topNode.aiHeadLoader.url="res/playersImg/"+t+".png"}}initD2world(){let t=this.ui.d2Root.displayObject;t.getComponent(at)||(Ea.common.d2World=t.addComponent(at)),Ea.common.d2World.initSelf()}initD3world(){if(this.isD3Inited)return;this.isD3Inited=!0;let t=Ea.common.d3Scene;this.ui.d3Root.displayObject.addChild(t),t.active=!0,Ea.common.d3World.tableSrc.setBorderPos()}onRootMove(t){let e=Ea.common.d2World.rootBall;this.ui.moveNode.x=t.x,this.ui.moveNode.y=t.y,e.gameObj.x=t.x,e.gameObj.y=t.y,e.d3BallSrc.setTransPos(t.x,t.y)}aiRootMove(t){t?this.hideBallUI():(this.showBallUI(),Ea.common.d2World.getHelpLine())}aiForce(t,e=0){this.pressTarget=k.powerNode,1==t?this.onEventUp({force:!0}):2==t&&this.onEventMove({stageY:e,force:!0})}onEventPress(t){if(t.stopPropagation&&t.stopPropagation(),!this.isTurnSelf())return;switch(t.target){case this.ui.myPowerNode.displayObject:this.pressTarget=k.powerNode,this.barInfo.curY=t.stageY,this.updateBarInfo();break;case this.ui.moveNode.displayObject:this.pressTarget=k.moveNode,this.hideBallUI(),this.eventObj.curX=this.ui.moveNode.x,this.eventObj.curY=this.ui.moveNode.y,this.ui.moveNode.finger.visible=!1,this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY;break;case this.ui.rulerClickNode.displayObject:this.pressTarget=k.rulerNode,this.eventObj.lastY=t.stageY;break;case this.ui.d2Root.displayObject:this.pressTarget=k.d2Root,this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY,this.eventObj.starX=t.stageX,this.eventObj.starY=t.stageY,this.eventObj.curX=0,this.eventObj.curY=0,Ea.common.d2World.d2Gan.setGanLastInfo(),this.rulerOffset=0}}onEventMove(t){if(t.stopPropagation&&t.stopPropagation(),t&&t.force);else if(!this.isTurnSelf())return;switch(this.pressTarget){case k.powerNode:this.barInfo.curY=t.stageY,this.updateBarInfo(),this.isMoveRod=!0;break;case k.moveNode:let e=Ea.common.d2World.rootBall,i=e.gameObj.width/2,s=this.eventObj.curX+t.stageX-this.eventObj.lastX,o=this.eventObj.curY+t.stageY-this.eventObj.lastY,n=Ea.common.d2World.borderRect;s<=n.x+i?s=n.x+i:s>=n.x+n.width-i&&(s=n.x+n.width-i),o<=n.y+i?o=n.y+i:o>=n.y+n.height-i&&(o=n.y+n.height-i),Ea.common.gameMgr.isOpenBall&&s>=n.x+n.openBallW-i&&(s=n.x+n.openBallW-i),this.ui.moveNode.x=s,this.ui.moveNode.y=o,e.gameObj.x=s,e.gameObj.y=o,e.d3BallSrc.setTransPos(s,o),this.isMoveRod=!0;break;case k.rulerNode:let a=t.stageY-this.eventObj.lastY;this.eventObj.lastY=t.stageY;let h=this.ui.rulerNode.img1,l=this.ui.rulerNode.img2;h.y+=a,l.y+=a,this.rulerOffset+=a,Math.abs(this.rulerOffset)>=this.rulerDis&&(this.rulerOffset=0,Ea.soundMgr.playSound("inch",1,10)),Ea.common.d2World.d2Gan.rotateSelf(a,!0);let r=h.height;if(this.checkGuide(),this.isMoveRod=!0,h.y>=r)return h.y=-r,void(l.y=0);if(h.y<=-r)return h.y=r,void(l.y=0);if(l.y>=r)return l.y=-r,void(h.y=0);if(l.y<=-r)return l.y=r,void(h.y=0);break;case k.d2Root:this.eventObj.curX=t.stageX,this.eventObj.curY=t.stageY;let c=this.checkRodMoveDir();Ea.common.d2World.d2Gan.rotateSelf(c),this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY}}onEventUp(t){if(t.stopPropagation&&t.stopPropagation(),t&&t.force);else if(!this.isTurnSelf())return;switch(this.pressTarget){case k.powerNode:if(this.ui.powerNode.value=0,this.ui.powerNode.showImg.y=this.barInfo.showStarY,this.ui.powerTxt.text="",this.powerNum>0){Ea.eventMgr.event(h),Ea.common.d2World.shoot(this.powerNum),Ea.common.d2World.d2Gan.shoot(),Ea.common.d2World.d2HelpLine.shoot(),this.finishGuide(),this.ui.powerEft.visible=!1,this.ui.colorNode.visible=!1;let t="";t=this.powerNum<=30?"gan_30":this.powerNum<=60?"gan_50":"gan_80",Ea.soundMgr.playSound(t)}break;case k.moveNode:let e=Ea.common.d2World.rootBall,i=Ea.common.gameMgr.lastRootBallPos.x,s=Ea.common.gameMgr.lastRootBallPos.y;this.judgeBallIntersect()?(this.ui.moveNode.x=i,this.ui.moveNode.y=s,e.gameObj.x=i,e.gameObj.y=s,e.d3BallSrc.setTransPos(i,s),Ea.uiMgr.Show(Yt,"Incorrect placement position")):(Ea.common.gameMgr.lastRootBallPos.x=e.gameObj.x,Ea.common.gameMgr.lastRootBallPos.y=e.gameObj.y),this.showBallUI(),this.ui.moveNode.finger.visible=!0,Ea.common.d2World.getHelpLine();break;case k.rulerNode:break;case k.d2Root:Math.pow(this.eventObj.starX-t.stageX,2)+Math.pow(this.eventObj.starY-t.stageY,2)<=25&&this.moveToClickDot(t)}this.pressTarget=-1}checkGuide(){0==Wa.getSkillGuide()&&Ea.common.gameMode==C.bigMove&&1==Ea.common.guideStep&&(Ea.common.guideStep++,Ea.common.gameUI.ui.guide2.visible=!1,Ea.common.gameUI.ui.guide3.visible=!0)}finishGuide(){0==Wa.getSkillGuide()&&Ea.common.gameMode==C.bigMove&&(Ea.common.guideStep=10,this.closeAllGuide(),console.log("zh: 新手引导完毕"),H.instance.logEventForAdNoParams("tutorial_complete"))}closeAllGuide(){Ea.common.gameUI.ui.guide1.visible=!1,Ea.common.gameUI.ui.guide2.visible=!1,Ea.common.gameUI.ui.guide3.visible=!1}updateBarInfo(){let t=this.ui.powerNode.y,e=(this.barInfo.curY-t)/this.barInfo.height;e>=1&&(e=1),e<=0&&(e=0),this.powerNum=Math.ceil(100*e),this.ui.powerNode.value=this.powerNum,this.ui.powerNode.showImg.y=this.barInfo.showStarY+this.powerNum/100*this.barInfo.height,this.ui.colorNode.value=this.powerNum,this.ui.powerEft.y=this.barInfo.powerStartY+this.powerNum/100*this.barInfo.height,this.ui.powerEft.visible=0!=this.powerNum,this.ui.colorNode.visible=0!=this.powerNum,this.ui.powerTxt.text=this.powerNum+"",Ea.common.d2World.d2Gan.storagePower(this.powerNum)}forceCancel(){this.ui.powerNode.value=0,this.ui.powerNode.showImg.y=this.barInfo.showStarY,this.ui.powerTxt.text=""}checkRodMoveDir(){let t=this.eventObj.lastX-Ea.common.sysOffestNum-Ea.common.d2World.rootBall.gameObj.x,e=this.eventObj.lastY-Ea.common.d2World.rootBall.gameObj.y;return t>=0&&e<=0?this.checkDir():t<0&&e<0?this.checkDir(1,-1):t<0&&e>0?this.checkDir(-1,-1):this.checkDir(-1,1)}checkDir(t=1,e=1){let i=this.eventObj.curX-this.eventObj.lastX,s=this.eventObj.curY-this.eventObj.lastY;if(0==s)return i*t;if(0==i)return s*e;let o=s/i;return Math.abs(o)>=1?s*e:i*t}judgeBallIntersect(){let t,e=Ea.common.d2World.rootBall,i=Ea.common.d2World.ballArr,s=e.gameObj.width/2,o=!1;for(let n=0;n<i.length&&((t=i[n]).number==e.number||!(o=Math.pow(e.gameObj.x-t.gameObj.x,2)+Math.pow(e.gameObj.y-t.gameObj.y,2)<=4*s*s));n++);return o}hideBallUI(){let t=Ea.common.d2World.d2Gan;t.ui.isDisposed||(t.ui.visible=!1);let e=Ea.common.d2World.d2HelpLine;e.ui.isDisposed||(e.ui.visible=!1);let i=Ea.common.d2World.rootBall;i.destroyed||(i.gameObj.active=!1)}showBallUI(){let t=Ea.common.d2World.d2Gan;t.ui.isDisposed||(t.ui.visible=!0);let e=Ea.common.d2World.d2HelpLine;e.ui.isDisposed||(e.ui.visible=!0);let i=Ea.common.d2World.rootBall;i.destroyed||(i.gameObj.active=!0)}moveToClickDot(t){if(!this.isMoveRod&&!Ea.common.clickedBall){let e=Ea.common.d2World.rootBall.gameObj,i=t.stageX-Ea.common.sysOffestNum,s=t.stageY,o=i-e.x,n=s-e.y,a=Ea.common.getfguiRotation(o,n);Ea.common.d2World.d2Gan.ui.rotation=a,Ea.common.d2World.getHelpLine()}this.isMoveRod=!1,Ea.common.clickedBall=!1}openAllEvent(){this.closeAllEvent(),this.ui.myPowerNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.moveNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.rulerClickNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.on(Laya.Event.MOUSE_MOVE,this,this.onEventMove),this.ui.on(Laya.Event.MOUSE_UP,this,this.onEventUp),this.ui.on(Laya.Event.MOUSE_OUT,this,this.onEventUp)}closeAllEvent(){this.ui.myPowerNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.moveNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.rulerClickNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.off(Laya.Event.MOUSE_MOVE,this,this.onEventMove),this.ui.off(Laya.Event.MOUSE_UP,this,this.onEventUp),this.ui.off(Laya.Event.MOUSE_OUT,this,this.onEventUp)}resetGame(){this.closeAllEvent(),this.hideBallUI(),Ea.common.gameMgr.gamePause=!0}}we.uiName="UIGame";class ve extends A{constructor(){super(),this.curType=""}onConstructor(){this.ui=X.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.myNode.coinBtn,this.switchBtn,["coin"]),this.addUIClick(this.ui.myNode.diamondBtn,this.switchBtn,["diamond"]),this.updateUI(),this.addUIClick(this.ui.myNode.node1,this.shareGetDiamond),this.addUIClick(this.ui.myNode.node2,this.videoGetDiamond),this.addUIClick(this.ui.myNode.node6,this.openPutBallView),this.addUIClick(this.ui.myNode.node3,this.videoGetCoin),this.addUIClick(this.ui.myNode.node4,this.convertCoin,[4]),this.addUIClick(this.ui.myNode.node5,this.convertCoin,[5])}show(t){super.show(),this.curType=0==t?"coin":"diamond",this.switchBtn(""),this.ui.t0.play(),this.ui.myNode.node1.c1.selectedIndex=Moyu.isTT?0:1,Y.showInsert(!0)}closeSelf(){this.hide()}updateUI(){let t,e,i=cfgTable.moneyData;for(const s in i)t=i[s],e=this.ui.myNode["node"+s],parseInt(s)<=2?e.diamondTxt.text="+"+t.num:(e.coinTxt.text=t.num,e.diamondTxt.text=t.get.split("_")[1]);this.updateDiamondShare()}updateDiamondShare(){let t=Wa.getShareDiamondTimes();t>=Ea.common.maxShareDiamondTimes?(this.ui.myNode.node1.shareTxt.text="Available Tomorrow",this.ui.myNode.node1.touchable=!1,Ea.uiMgr.Show(Yt,"Come back tomorrow")):(this.ui.myNode.node1.shareTxt.text=`(${t}/${Ea.common.maxShareDiamondTimes})`,this.ui.myNode.node1.touchable=!0)}switchBtn(t){if(""==t)t=this.curType;else{if(this.curType==t)return;this.curType=t}"coin"==t?(this.ui.myNode.coinBtn.c1.selectedIndex=0,this.ui.myNode.diamondBtn.c1.selectedIndex=1,this.ui.myNode.coinBtn.displayObject.zOrder=10,this.ui.myNode.diamondBtn.displayObject.zOrder=9,this.ui.myNode.c1.selectedIndex=0):(this.ui.myNode.coinBtn.c1.selectedIndex=1,this.ui.myNode.diamondBtn.c1.selectedIndex=0,this.ui.myNode.coinBtn.displayObject.zOrder=9,this.ui.myNode.diamondBtn.displayObject.zOrder=10,this.ui.myNode.c1.selectedIndex=1)}convertCoin(t){let e=cfgTable.moneyData[t],i=e.num,s=e.get.split("_")[1],o=parseInt(s);Wa.diamondEnough(o)?(Wa.setDiamond(-o),Ea.common.playObjFlyAnim(i,N.coin),Ea.uiMgr.Show(Yt,"Exchange successful!")):(Ea.uiMgr.Show(Yt,"Diamond shortage"),this.switchBtn("diamond"))}videoGetDiamond(){if(console.log("zh:qjff_AD_for_uiAddProp_videoGetDiamond"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_videoGetDiamond")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_videoGetDiamond())}qjff_AD_for_uiAddProp_videoGetDiamond(){let t=cfgTable.moneyData[2].num;Ea.common.playObjFlyAnim(t,N.diamond),this.closeSelf()}videoGetCoin(){if(console.log("zh:qjff_AD_for_uiAddProp_videoGetCoin"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_videoGetCoin")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_videoGetCoin())}qjff_AD_for_uiAddProp_videoGetCoin(){Ea.common.playObjFlyAnim(2e3,N.coin),this.closeSelf()}shareGetDiamond(){if(Wa.getShareDiamondTimes()>=Ea.common.maxShareDiamondTimes)console.log("zh: 233333333333 maxShareDiamondTimes"),Ea.uiMgr.Show(Yt,"Come back tomorrow");else{if(console.log("zh:33333333333333ad"),console.log("zh:qjff_AD_for_uiAddProp_shareGetDiamond"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_shareGetDiamond")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_shareGetDiamond())}}qjff_AD_for_uiAddProp_shareGetDiamond(){let t=Ea.common.randomNum(50,100);Ea.common.playObjFlyAnim(t,N.diamond),Wa.setShareDiamondTimes(1),this.updateDiamondShare()}openPutBallView(){let t=Ea.uiMgr.getUI(oe),e=Ea.uiMgr.getUI(Vt),i=Ea.uiMgr.getUI(St),s=Ea.uiMgr.getUI(we);t&&!t.isHide&&(Ea.uiMgr.Hide(oe),Ea.uiMgr.Show(se)),e&&!e.isHide&&Ea.uiMgr.Hide(Vt),s&&!s.isHide&&Ea.uiMgr.Hide(we),i&&!i.isHide||Ea.uiMgr.Show(St),this.closeSelf()}}ve.uiName="UIAddProp";class Ne{constructor(t){this.leftTime=0,this.ui=t,this.ui.addCoinBtn.onClick(this,this.addCoin),this.ui.addDiamondBtn.onClick(this,this.addDiamond),this.ui.addPowerBtn.onClick(this,this.addPower),this.ui.c1.selectedIndex=1,Ea.eventMgr.on(c,this,this.coinChange),Ea.eventMgr.on(d,this,this.diamondChange),Ea.eventMgr.on(y,this,this.powerChange),Ea.eventMgr.on(p,this,this.checkPowerTime),this.coinChange(),this.diamondChange(),this.powerChange()}addPower(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.uiMgr.Show(wt)}powerChange(){let t=Wa.getPower();this.ui.powerTxt.text=t+""}checkPowerTime(){let t=(new Date).getTime(),e=Wa.getPowerTime();0==e&&(e=t,Wa.setPowerTime(t));let i=Wa.getPower(),s=Math.floor((t-e)/(1e3*Ea.common.powerRecoverNum));if(Laya.timer.clearAll(this),i>=Ea.common.natureMaxPower)return this.ui.powerTimeTxt.text="",void Wa.setPowerTime(t);if(i+s>=Ea.common.natureMaxPower)Wa.setPower(Ea.common.natureMaxPower,!1),this.ui.powerTimeTxt.text="",Wa.setPowerTime(t);else{s>0&&(Wa.setPower(s),Wa.setPowerTime(t));let i=Math.floor((t-e-s*Ea.common.powerRecoverNum*1e3)/1e3);this.leftTime=Ea.common.powerRecoverNum-i,this.leftTime<=0&&(this.leftTime=0),this.ui.powerTimeTxt.text=Ea.common.getMSTime(this.leftTime),Laya.timer.loop(1e3,this,this.updatePowerTime)}}updatePowerTime(){this.leftTime-=1,this.ui.powerTimeTxt.text=Ea.common.getMSTime(this.leftTime),this.leftTime<=0&&this.checkPowerTime()}coinChange(){this.ui.coinTxt.text=Wa.getCoin()+""}diamondChange(){this.ui.diamondTxt.text=Wa.getDiamond()+""}addCoin(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("AddCoinBtn"),Ea.uiMgr.Show(ve,0)}addDiamond(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("AddDiamondBtn"),Ea.uiMgr.Show(ve,1)}}class Le extends A{constructor(){super(),this.curKey=0}onConstructor(){this.ui=E.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new Ne(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.addUIClick(this.ui.drawBtn,this.startDraw),this.initDraw(),this.initUI(),this.ui.myNode.flashNode.c1.selectedIndex=1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}show(){super.show(),this.ui.t0.play(),this.playSecretaryIdle(),this.updateDraw(),this.checkFree(),Y.bannerDelay>0&&(this.ui.closeNode.closeBtn.visible=!1,Laya.timer.once(Y.bannerDelay,this,()=>{this.ui.closeNode.closeBtn.visible=!0})),Y.showRateBanner()}hide(){Laya.timer.clearAll(this),super.hide()}checkFree(){let t=Wa.getDailyfreeDrawTimes();this.ui.drawBtn.c1.selectedIndex=t>0?0:1}initDraw(){this.drawObj=[];let t,e=cfgTable.drawData,i=0;for(const s in e)i+=(t=e[s]).weight,this.drawObj.push(i);this.allWeight=i}initUI(){let t,e,i,s=cfgTable.drawData;for(const o in s)t=s[o],e=this.ui.myNode.rotNode["img"+o],i=this.ui.myNode.rotNode["txt"+o],e.url=Ea.common.getGameIconUrl(t.icon),i.visible=!0,t.award>2?(e.rotation=0,i.text=cfgTable.ballrodData[t.award-1].name):(e.rotation=t.rotation,i.text=t.num)}getCurkey(){let t,e=Math.random()*this.allWeight;for(let i=0;i<this.drawObj.length-1;i++)if(t=this.drawObj[i],0==i){if(e<t)return i+1}else if(e>=t&&e<this.drawObj[i+1])return i+1;return 2}startDraw(){if(Wa.getDailyfreeDrawTimes()>0)this.beginDraw(),Wa.setDailyfreeDrawTimes(0),this.checkFree();else{if(Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_chouJiang")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_chouJiang())}}qjff_chouJiang(){this.beginDraw()}beginDraw(){this.ui.myNode.flashNode.c1.selectedIndex=0,this.ui.drawBtn.touchable=!1,this.curKey=this.getCurkey(),console.log("当前key",this.curKey);let t=60*(this.curKey-1)+1080,e=this.ui.myNode.rotNode;e.rotation=0,Laya.Tween.to(e,{rotation:t},1500,Laya.Ease.cubicOut,Laya.Handler.create(this,()=>{console.log("旋转完成"),this.ui.drawBtn.touchable=!0,this.getAward()}))}getAward(){let t=cfgTable.drawData[this.curKey],e=new S;e.type=t.award,e.num=t.num,Ea.common.getAward([e],()=>{Wa.setDrawTimes(1),this.updateDraw(),this.ui.myNode.flashNode.c1.selectedIndex=1})}updateDraw(){let t=Wa.getDrawTimes(),e=Wa.getDrawAwardTimes();Math.floor(t/3)>e?(this.ui.extraNode.boxBtn.t0.play(null,-1),this.ui.extraNode.boxBtn.touchable=!0,this.ui.extraNode.tipsTxt.text="3/3",this.ui.extraNode.barNode.width=265,this.getExtraAward()):(this.ui.extraNode.boxBtn.t0.stop(),this.ui.extraNode.boxBtn.touchable=!1,this.ui.extraNode.tipsTxt.text=`${t%3}/3`,this.ui.extraNode.barNode.width=t%3*265/3);let i=cfgTable.drawData[1];if(0==e)this.ui.myNode.rotNode.img1.url=Ea.common.getComponentUrl("s"+i.icon),this.ui.myNode.rotNode.txt1.text=cfgTable.ballrodData[i.award-1].name,this.ui.myNode.rotNode.img1.rotation=0;else{let t=i.nextid;this.ui.myNode.rotNode.img1.url=Ea.common.getGameIconUrl(t[2]),this.ui.myNode.rotNode.txt1.text=t[1],this.ui.myNode.rotNode.img1.rotation=0}}getExtraAward(){let t=Wa.getDrawTimes(),e=Wa.getDrawAwardTimes(),i=cfgTable.drawData[1],s=new S;0==e?(s.num=i.num,s.type=i.award,Ea.common.getAward([s],()=>{let e=Math.floor(t/3);Wa.setDrawAwardTimes(e),this.updateDraw()})):(s.num=parseInt(i.nextid[1]),s.type=parseInt(i.nextid[0]),Ea.common.getAward([s],()=>{let e=Math.floor(t/3);Wa.setDrawAwardTimes(e),this.updateDraw()}))}closeSelf(){this.hide()}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}}Le.uiName="UIDraw";class Se extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIFlyEft")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.iconNode=this.getChild("iconNode"),this.txt=this.getChild("txt"),this.txtNode=this.getChild("txtNode")}}Se.URL="ui://isxx5ak7lj6tv4mf";class Ue extends A{constructor(){super(),this.max=8,this.delay=0}onConstructor(){this.ui=Se.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.isMuti=!0,this.ui.x+=Ea.common.sysOffestNum}getArrPos(){if(this.iconPos&&this.iconPos.length>0)return;let t;this.iconPos=[];for(let e=0;e<this.max;e++)t=this.ui["n"+e],this.iconPos.push([t.x,t.y])}show(t,e,i,s,o){super.show(),this.parent.setChildIndex(this,this.parent.numChildren-1),this.getArrPos(),this.updateUI(s),this.updatePos(),this.runFly(e,o),this.runWorlds(t,i)}updateUI(t){let e,i;for(let s=0;s<this.max;s++)e=this.ui["n"+s],i=this.getIconStr(t),e.url=Ea.common.getGameIconUrl(i)}getIconStr(t){switch(t){case N.diamond:return"ty_zs";case N.coin:return"ty_jb"}}updatePos(){let t;for(let e=0;e<this.max;e++)(t=this.ui["n"+e]).x=this.iconPos[e][0],t.y=this.iconPos[e][1]}runFly(t,e){let i,s=0;for(let o=0;o<this.max;o++)(i=this.ui["n"+o]).visible=!0,Laya.Tween.to(i,{x:t.x,y:t.y},600,Laya.Ease.cubicInOut,Laya.Handler.create(this,()=>{i.visible=!1,++s>=this.max&&e&&e()}),20*o)}runWorlds(t,e){let i="+"+e;this.ui.txt.text=i;let s=t.x,o=t.y+50;this.ui.txt.x=s,this.ui.txt.y=o,this.ui.txt.visible=!0,this.ui.txt.alpha=1,Laya.Tween.to(this.ui.txt,{x:s,y:o-30},500,null,Laya.Handler.create(this,()=>{Laya.Tween.to(this.ui.txt,{alpha:0},500,null,Laya.Handler.create(this,()=>{this.ui.txt.visible=!1,this.hide()}))}))}}Ue.uiName="UIFlyEft";class Be{constructor(){this.convertNum=.025,this.VectorUp=new Laya.Vector3(0,1,0),this.scaleV3One=new Laya.Vector3,this.scaleV3Two=new Laya.Vector3,this.posV4=new Laya.Vector4,this.showDebug=!1,this.openGuide=!0,this.rodOffest=new Laya.Vector2(0,0),this.rodAngle=0,this.gameMode=C.classic,this.bigMoveLevelIndex=1,this.bigMoveNeedCoin=1e3,this.classicNiceNeddCoin=1e3,this.passAwardCoin=2e3,this.classicRoomType=1,this.maxPower=20,this.natureMaxPower=5,this.videoPower=2,this.powerRecoverNum=900,this.curPlayerSkillType=0,this.isNewDay=!1,this.clickedBall=!1,this.placeBallCurLevel=0,this.placeBallStarNum=0,this.longHelpLine=!1,this.maxShareDiamondTimes=3,this.guideStep=0,this.temSelfLevel=0,this.extraMoveNum=0,this.curRankID=0,this.rankID={normalStar:12e3,wxStar:12001},this.skillNameList=["Surging Break","Skyfall Shot","Frost Lock"],this.skillIconList=["gf_jn1","gf_jn2","gf_jn4"],this.btnClickStr="buttonclick",this.maxSkillLevel=10,this.upSkillLevel=!1,this.gameStartTime=0,this._sysOffestNum=0,this.angleV2=new Laya.Vector2,this.rootV=new Laya.Vector2(0,1),this.tempDir1=new Laya.Vector2,this.tempDir2=new Laya.Vector2,this.ballSize=33,this.stPos=new Laya.Point,this.edPos=new Laya.Point,Be._instance=this,window.common=this}static getInstance(){return this._instance||(this._instance=new Be),this._instance}get sysOffestNum(){return 0==this._sysOffestNum&&(this._sysOffestNum=(Laya.stage.width-1334)/2),this._sysOffestNum}testShader(){let t=new P;t.texture="res/d3Res/ballTexture/ball1.png",Laya.stage.addChild(t)}playScale(t){Laya.Tween.to(t,{scaleX:1.1,scaleY:1.1},100,null,Laya.Handler.create(this,()=>{Laya.Tween.to(t,{scaleX:1,scaleY:1},100,null,Laya.Handler.create(this,()=>{}))}))}setGroup(t,...e){let i=0;for(let t=0;t<e.length;t++)0==t?i=Laya.Physics3DUtils[`COLLISIONFILTERGROUP_CUSTOMFILTER${e[t]}`]:i|=Laya.Physics3DUtils[`COLLISIONFILTERGROUP_CUSTOMFILTER${e[t]}`];t.collisionGroup=i}setCanGroupWith(t,...e){let i=0;for(let t=0;t<e.length;t++)0==t?i=Laya.Physics3DUtils[`COLLISIONFILTERGROUP_CUSTOMFILTER${e[t]}`]:i|=Laya.Physics3DUtils[`COLLISIONFILTERGROUP_CUSTOMFILTER${e[t]}`];t.canCollideWith=i}loadPrefab(t,e){Laya.loader.create(`prefab/${t}.json`,Laya.Handler.create(this,i=>{let s=new Laya.Prefab;s.json=i;let o=Laya.Pool.getItemByCreateFun(t,s.create,s);e&&e(o)}))}pos2to3Convert(t,e,i){t+=this.sysOffestNum,i.setValue(t,e,0),this.d3World.camera.convertScreenCoordToOrthographicCoord(i,i)||console.error("转换出错了。。。。。。。。")}scale2to3Convert(t){return this.scaleV3One.setValue(0,0,0),this.d3World.camera.convertScreenCoordToOrthographicCoord(this.scaleV3One,this.scaleV3One),this.scaleV3Two.setValue(0,t,0),this.d3World.camera.convertScreenCoordToOrthographicCoord(this.scaleV3Two,this.scaleV3Two),Math.abs(this.scaleV3One.x-this.scaleV3Two.x)}pos3to2Convert(t){this.d3World.camera.viewport.project(t,this.d3World.camera.projectionViewMatrix,this.posV4),t.x=this.posV4.x/Laya.stage.clientScaleX,t.y=this.posV4.y/Laya.stage.clientScaleY,t.x-=this.sysOffestNum}scale3to2Convert(t){return t/this.scale2to3Convert(1)}getCollider(t,e=.9,i=10){let s;return(s="box"==t?new Laya.BoxCollider:new Laya.CircleCollider).friction=0,s.restitution=e,s.density=i,s}getRigbody(){let t=new Laya.RigidBody;return t.bullet=!0,t.allowRotation=!1,t.allowSleep=!1,t.gravityScale=0,t}getfguiRotation(t,e){this.angleV2.setValue(t,e),Laya.Vector2.normalize(this.angleV2,this.angleV2);let i=180*Math.acos(Laya.Vector2.dot(this.rootV,this.angleV2))/Math.PI;return(this.angleV2.x>=0&&this.angleV2.y>=0||this.angleV2.x>=0&&this.angleV2.y<0)&&(i=-i),180+i}getAngle(t,e){return this.angleV2.setValue(t,e),Laya.Vector2.normalize(this.angleV2,this.angleV2),180*Math.acos(Laya.Vector2.dot(this.rootV,this.angleV2))/Math.PI}randomNum(t,e){return t+Math.floor((e-t+1)*Math.random())}getRandArrEle(t){return t[Math.floor(t.length*Math.random())]}getSign(t){return t>=0?1:-1}botherArr(t){let e,i,s,o=t.length+2,n=t.length;for(let a=0;a<o;a++)e=Math.floor(Math.random()*n),i=Math.floor(Math.random()*n),s=t[e],t[e]=t[i],t[i]=s}getGameIconUrl(t){return"ui://game/"+t}getComponentUrl(t){return"ui://game/"+t}getAnimation(){}judgeSkillType(t=b.highSpace){if(this.gameMode==C.classic)return;let e=this.gameMgr;if(e.selfTurn){if(e.selfCurSkill==t)return!0}else if(e.aiCurSkill==t)return!0}ballColliHole(t){Ea.common.gameMgr.isFirstInGame&&0!=t.owner.mySrc.number&&(Ea.common.gameMgr.isFirstInGame=!1,Ea.eventMgr.event(l,t.owner.mySrc.number)),t.owner.mySrc.checkWrongBall()}getArrMaxEle(t){let e=-1/0;for(let i=0;i<t.length;i++)e=Math.max(t[i],e);return e}getArrMinEle(t){let e=1/0;for(let i=0;i<t.length;i++)e=Math.min(t[i],e);return e}playRandomMutiBallBigSkillSound(){if(Math.random()<=.5)return;let t="ganfa0"+this.randomNum(1,6);Ea.soundMgr.playSound(t)}showOneCamera(t){let e=Ea.common.d3World.cameraObj;for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e[i].init(),e[i].owner.active=i==t)}checkBallOverBorder(t,e){if(this._checkBorder(t+17,e)||this._checkBorder(t-17,e)||this._checkBorder(t,e+17)||this._checkBorder(t,e-17))return!0}_checkBorder(t,e){let i=this.d2World.borderRect;return e<=i.y-20||(e>=i.y+i.height+20||(t<=i.x-20||(t>=i.x+i.width+20||void 0)))}initWeight(t){let e={data:{},allWeightNum:0},i=e.data,s=0;for(const e in t)i[e]={},i[e].id=t[e].id,i[e].minWeight=s,s+=t[e].weight,i[e].maxWeight=s;return e.allWeightNum=s,e}getRandomWeightData(t){let e=t.data,i=t.allWeightNum,s=Math.floor(Math.random()*i);for(const t in e)if(s>e[t].minWeight&&s<=e[t].maxWeight)return e[t];return e[1]}showGirlTalkPop(t,e,i){e.visible=!0,i.text=cfgTable.secretaryData[t].msg,e.t0.play(Laya.Handler.create(this,()=>{e.visible=!1}))}stopGirlPop(t){t.t0.stop(),t.visible=!1}createHead(t,e,i=107){"Browser"!=Laya.Browser.name?(console.log("zh:url=",e),t.url=e):t.url=e}addTestCoin(t){Wa.setCoin(t)}addTestDiamond(t){Wa.setDiamond(t)}addTestSkill(){Wa.setBigSkill(0,99),Wa.setBigSkill(1,99),Wa.setBigSkill(2,99)}playClassicEmotion(t,e,i){if(this.gameMode==C.bigMove)return;let s=this.randomNum(0,2),o={x:e,y:i,scaleX:1,scaleY:1},n=this.gameUI.ui.classicEmotionSpineNode.displayObject;this.gameMgr.selfTurn?this.gameMgr.selfBallArr.indexOf(t)>-1?this.classicEmotionSpine.play(o,s,!1,n):this.gameMgr.aiBallArr.indexOf(t)>-1||(t==this.gameMgr.blackNum?0==this.gameMgr.selfBallArr.length&&this.classicEmotionSpine.play(o,s,!1,n):this.classicEmotionSpine.play(o,s,!1,n)):this.gameMgr.aiBallArr.indexOf(t)>-1?this.classicEmotionSpine.play(o,s,!1,n):this.gameMgr.selfBallArr.indexOf(t)>-1||(t==this.gameMgr.blackNum?0==this.gameMgr.aiBallArr.length&&this.classicEmotionSpine.play(o,s,!1,n):this.classicEmotionSpine.play(o,s,!1,n))}playHappySound(t){if(this.gameMode!=C.classic)return;if(8==t)return;let e=!1;this.gameMgr.selfTurn?this.gameMgr.ensureBallType?this.gameMgr.selfBallArr.indexOf(t)>-1&&(e=!0):e=!0:this.gameMgr.ensureBallType?this.gameMgr.aiBallArr.indexOf(t)>-1&&(e=!0):e=!0,e&&Ea.soundMgr.playSound("applause")}destroyClassicEmotion(){if(this.gameMode==C.bigMove)return;this.gameUI.ui.classicEmotionSpineNode.displayObject.destroyChildren()}playAwardSpine(t,e){let i={x:t,y:e,scaleX:1,scaleY:1},s=this.gameUI.ui.awardSpineNode.displayObject;this.awardSpine.play(i,0,!1,s)}destroyAwardSpine(){this.gameUI.ui.awardSpineNode.displayObject.destroyChildren()}isBlock(t,e,i,s,o=null){this.tempDir1=Ea.tools.getV2Dir(t,e,i,s,this.tempDir1);let n=Ea.common.d2World.ballArr,a=[];for(let i=0;i<n.length;i++){let s=n[i];if(0==s.number)continue;if(s==o)continue;let h=Ea.tools.getDistance(s.gameObj.x,s.gameObj.y,t,e);this.tempDir2=Ea.tools.getV2Dir(t,e,s.gameObj.x,s.gameObj.y,this.tempDir2);let l=Laya.Vector2.dot(this.tempDir1,this.tempDir2);(l>=1&&(l=1),l<0)||Math.sin(Math.acos(l))*h<this.ballSize&&a.push({dis:Ea.tools.getDis(t,e,s.gameObj.x,s.gameObj.y),disHon:Math.cos(Math.acos(l))*h,disVer:Math.sin(Math.acos(l))*h,src:n[i],dir:this.tempDir1})}if(a.length>0)return a.sort((t,e)=>t.dis-e.dis),a[0]}AngleBetween(t,e){return Math.acos(Laya.Vector2.dot(t,e))*(180/Math.PI)}getSecretaryScale(){return"mishu"==this.secretary.spineName?1.28:1.024}signAwardContainsRod(t){let e;for(let i=0;i<t.length;i++)if(e=t[i].split("-")[0],parseInt(e)>2)return!0}judgeSameDay(){let t=Wa.getSignTime(),e=(new Date).getTime();return new Date(t).toDateString()===new Date(e).toDateString()}getAward(t,e){let i=t[0].type<=2;Ea.uiMgr.Show(te,t,i,i=>{let s;for(let e=0;e<t.length;e++)switch((s=t[e]).type){case 1:case 2:this.playObjFlyAnim(s.num,s.type);break;case 3:case 4:case 5:case 6:Wa.setBallRod(s.type-2,1),Wa.setCurBallRod(s.type-2)}e&&e(i)})}getMoneyNode(){let t,e=Ea.uiMgr.getUI(Ft),i=Ea.uiMgr.getUI(Le),s=Ea.uiMgr.getUI(oe),o=Ea.uiMgr.getUI(Vt);e&&!e.isHide&&(t=e.ui.moneyNode),i&&!i.isHide&&(t=i.ui.moneyNode),s&&!s.isHide&&(t=s.ui.moneyNode),o&&!o.isHide&&(t=o.ui.moneyNode);let n=(!e||e.isHide)&&(!i||i.isHide)&&(!o||o.isHide),a=Ea.uiMgr.getUI(se);return n&&a&&!a.isHide&&(t=a.ui.moneyNode),t}playObjFlyAnim(t,e,i=null){this.stPos.x=Laya.stage.width/2,this.stPos.y=Laya.stage.height/2;let s=this.getMoneyNode();switch(e){case N.diamond:this.edPos.x=s.x+s.diamondImg.x,this.edPos.y=s.y+s.diamondImg.y,s.diamondImg.displayObject.localToGlobal(this.edPos),this.edPos.x/=2,this.edPos.y/=2;break;case N.coin:this.edPos.x=s.x+s.coinImg.x,this.edPos.y=s.y+s.coinImg.y,s.coinImg.displayObject.localToGlobal(this.edPos),this.edPos.x/=2,this.edPos.y/=2}Ea.soundMgr.playSound("coinbag"),Ea.uiMgr.Show(Ue,this.stPos,this.edPos,t,e,()=>{switch(e){case N.diamond:Wa.setDiamond(t);break;case N.coin:Wa.setCoin(t)}i&&i()})}autoPopUIView(){let t=[];if(!this.judgeSameDay()&&t.push("sign"),Wa.getDailyfreeDrawTimes()>0&&t.push("draw"),!(t.length<=0))switch(this.getRandArrEle(t)){case"sign":Ea.uiMgr.Show(Ft);break;case"draw":Ea.uiMgr.Show(Le)}}getMSTime(t){let e=Math.floor(t/60),i=Math.floor(t-60*e);return i<10&&(i="0"+i),e<10&&(e="0"+e),`${e}:${i}`}testPower(){Wa.setPower(0,!1)}getAllStarNum(){let t=Wa.getPlaceBallLevelList(),e=0;for(let i=0;i<t.length;i++)e+=t[i].star;return e}recoverCameraView(){Laya.timer.once(900,this,()=>{Ea.common.showOneCamera("mainCamera"),0==Ea.common.gameUI.ui.d2Node.alpha&&(Ea.common.gameUI.ui.d2Node.alpha=1,Ea.common.gameUI.ui.border.alpha=0,Laya.physicsTimer.scale<1&&(Laya.physicsTimer.scale=1))})}getClassicLevel(){let t,e=Wa.getClassicTimes(),i="",s="",o=cfgTable.classictimesData;for(const n in o)e<=(t=o[n]).times&&(i=n),s=n;return""==i&&(i=s),o[i]}}Be._instance=null;class Me extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component92")}onConstruct(){this.n0=this.getChild("n0")}}Me.URL="ui://isxx5ak710hfv49p";class Te extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","Component129")}onConstruct(){this.bar_v=this.getChild("bar_v"),this.n84=this.getChild("n84")}}Te.URL="ui://isxx5ak7748uv4mp";class Oe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component130")}onConstruct(){this.ani=this.getChild("ani"),this.t0=this.getTransition("t0")}}Oe.URL="ui://isxx5ak7748uv4mq";class je extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","powerEft")}onConstruct(){this.ani=this.getChild("ani"),this.n88=this.getChild("n88"),this.n89=this.getChild("n89")}}je.URL="ui://isxx5ak79u9xv4mr";class De extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","PutBallLevelDisplay")}onConstruct(){this.c1=this.getController("c1"),this.n2=this.getChild("n2"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.n15=this.getChild("n15"),this.challenge=this.getChild("challenge"),this.n17=this.getChild("n17"),this.n3=this.getChild("n3"),this.starNode=this.getChild("starNode"),this.levelTxt=this.getChild("levelTxt"),this.n14=this.getChild("n14"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.special=this.getChild("special")}}De.URL="ui://isxx5ak7avag476";class Re extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component79")}onConstruct(){this.c1=this.getController("c1"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12")}}Re.URL="ui://isxx5ak7avag477";class _e extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component80")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.myList=this.getChild("myList"),this.t0=this.getTransition("t0")}}_e.URL="ui://isxx5ak7avag47b";class Pe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","SignNormal")}onConstruct(){this.c1=this.getController("c1"),this.n7=this.getChild("n7"),this.n15=this.getChild("n15"),this.titleTxt=this.getChild("titleTxt"),this.n8=this.getChild("n8"),this.myIcon=this.getChild("myIcon"),this.numTxt=this.getChild("numTxt"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n17=this.getChild("n17"),this.n14=this.getChild("n14")}}Pe.URL="ui://isxx5ak7bf9jv4jv";class Ae extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Button_reg")}onConstruct(){this.button=this.getController("button"),this.n6=this.getChild("n6"),this.n4=this.getChild("n4")}}Ae.URL="ui://isxx5ak7bobav57y";class Ee extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","screenNode")}onConstruct(){this.n9=this.getChild("n9"),this.screenImg=this.getChild("screenImg")}}Ee.URL="ui://isxx5ak7brgy3ux";class Ge extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","GetAwrad_com1")}onConstruct(){this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n40=this.getChild("n40"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}Ge.URL="ui://isxx5ak7brwtv4mh";class Fe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","GetAwrad_com2")}onConstruct(){this.n39=this.getChild("n39"),this.n40=this.getChild("n40"),this.t0=this.getTransition("t0")}}Fe.URL="ui://isxx5ak7brwtv4mj";class He extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component128")}onConstruct(){this.n38=this.getChild("n38"),this.n40=this.getChild("n40")}}He.URL="ui://isxx5ak7brwtv4mk";class ze extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component100_1")}onConstruct(){this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}ze.URL="ui://isxx5ak7brwtv4ml";class Ve extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component142")}onConstruct(){this.n41=this.getChild("n41"),this.n42=this.getChild("n42")}}Ve.URL="ui://isxx5ak7c50vv4y6";class We extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","main_guang")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.t0=this.getTransition("t0")}}We.URL="ui://isxx5ak7cj92v4o3";class Ye extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","try_com1")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n2=this.getChild("n2"),this.cancelBtn=this.getChild("cancelBtn"),this.videoBtn=this.getChild("videoBtn"),this.n9=this.getChild("n9"),this.n24=this.getChild("n24"),this.titleTxt=this.getChild("titleTxt"),this.n32=this.getChild("n32"),this.n29=this.getChild("n29"),this.n36=this.getChild("n36"),this.txtTime=this.getChild("txtTime"),this.t0=this.getTransition("t0")}}Ye.URL="ui://isxx5ak7cj92v4o5";class Xe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","try_com2")}onConstruct(){this.skillicon=this.getChild("skillicon"),this.n35=this.getChild("n35"),this.n31=this.getChild("n31"),this.n32=this.getChild("n32"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34")}}Xe.URL="ui://isxx5ak7cj92v4o6";class qe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","try_com3")}onConstruct(){this.n33=this.getChild("n33"),this.n34=this.getChild("n34"),this.n35=this.getChild("n35"),this.t0=this.getTransition("t0")}}qe.URL="ui://isxx5ak7cj92v4o9";class Je extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","huihe1")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}Je.URL="ui://isxx5ak7d1pb47h";class Ke extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","huihe2")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}Ke.URL="ui://isxx5ak7d1pb47k";class Ze extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component143")}onConstruct(){this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.t0=this.getTransition("t0")}}Ze.URL="ui://isxx5ak7dt0av4yn";class $e extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_jingbi2")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n10=this.getChild("n10"),this.t0=this.getTransition("t0")}}$e.URL="ui://isxx5ak7ehtov4g0";class Qe extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_jingbi2_1")}onConstruct(){this.n1=this.getChild("n1"),this.n4=this.getChild("n4"),this.t0=this.getTransition("t0")}}Qe.URL="ui://isxx5ak7ehtov4g1";class ti extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_jingbi3")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n10=this.getChild("n10"),this.t0=this.getTransition("t0")}}ti.URL="ui://isxx5ak7ehtov4g2";class ei extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_jingbi3_1")}onConstruct(){this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}ei.URL="ui://isxx5ak7ehtov4g3";class ii extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_jinbi1")}onConstruct(){this.n20=this.getChild("n20"),this.n25=this.getChild("n25"),this.coinTxt=this.getChild("coinTxt"),this.n28=this.getChild("n28"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n45=this.getChild("n45"),this.getTips=this.getChild("getTips"),this.n39=this.getChild("n39"),this.diamondTxt=this.getChild("diamondTxt"),this.n41=this.getChild("n41"),this.n42=this.getChild("n42"),this.n46=this.getChild("n46"),this.n47=this.getChild("n47"),this.n48=this.getChild("n48"),this.t0=this.getTransition("t0")}}ii.URL="ui://isxx5ak7ehtov4gd";class si extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_jinbi2")}onConstruct(){this.n20=this.getChild("n20"),this.n25=this.getChild("n25"),this.coinTxt=this.getChild("coinTxt"),this.n28=this.getChild("n28"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.diamondTxt=this.getChild("diamondTxt"),this.n41=this.getChild("n41"),this.n42=this.getChild("n42"),this.n43=this.getChild("n43"),this.n44=this.getChild("n44"),this.n45=this.getChild("n45"),this.t0=this.getTransition("t0")}}si.URL="ui://isxx5ak7ehtov4ge";class oi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_jinbi3")}onConstruct(){this.n20=this.getChild("n20"),this.n25=this.getChild("n25"),this.coinTxt=this.getChild("coinTxt"),this.n28=this.getChild("n28"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.diamondTxt=this.getChild("diamondTxt"),this.n41=this.getChild("n41"),this.n42=this.getChild("n42"),this.n43=this.getChild("n43"),this.n44=this.getChild("n44"),this.n45=this.getChild("n45"),this.t0=this.getTransition("t0")}}oi.URL="ui://isxx5ak7ehtov4gf";class ni extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component104")}onConstruct(){this.c1=this.getController("c1"),this.n12=this.getChild("n12"),this.coinBtn=this.getChild("coinBtn"),this.diamondBtn=this.getChild("diamondBtn"),this.node3=this.getChild("node3"),this.node4=this.getChild("node4"),this.node5=this.getChild("node5"),this.node1=this.getChild("node1"),this.node2=this.getChild("node2"),this.node6=this.getChild("node6"),this.t0=this.getTransition("t0")}}ni.URL="ui://isxx5ak7ehtov4gg";class ai extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component105")}onConstruct(){this.c1=this.getController("c1"),this.n49=this.getChild("n49"),this.n18=this.getChild("n18"),this.n46=this.getChild("n46"),this.n48=this.getChild("n48")}}ai.URL="ui://isxx5ak7ehtov4gh";class hi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component106")}onConstruct(){this.c1=this.getController("c1"),this.n49=this.getChild("n49"),this.n18=this.getChild("n18"),this.n46=this.getChild("n46"),this.n48=this.getChild("n48")}}hi.URL="ui://isxx5ak7ehtov4gj";class li extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_zs1")}onConstruct(){this.c1=this.getController("c1"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.shareTxt=this.getChild("shareTxt"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n44=this.getChild("n44"),this.diamondTxt=this.getChild("diamondTxt"),this.n41=this.getChild("n41"),this.n45=this.getChild("n45"),this.n47=this.getChild("n47"),this.n48=this.getChild("n48"),this.randTxt=this.getChild("randTxt"),this.n50=this.getChild("n50"),this.t0=this.getTransition("t0")}}li.URL="ui://isxx5ak7ehtov4gk";class ri extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs1")}onConstruct(){this.n10=this.getChild("n10"),this.n9=this.getChild("n9"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n11=this.getChild("n11"),this.t0=this.getTransition("t0")}}ri.URL="ui://isxx5ak7ehtov4gm";class ci extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs1_1")}onConstruct(){this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}ci.URL="ui://isxx5ak7ehtov4gn";class di extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_zs2")}onConstruct(){this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n44=this.getChild("n44"),this.diamondTxt=this.getChild("diamondTxt"),this.n41=this.getChild("n41"),this.n45=this.getChild("n45"),this.t0=this.getTransition("t0")}}di.URL="ui://isxx5ak7ehtov4gu";class ui extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","hb_zs3")}onConstruct(){this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.n32=this.getChild("n32"),this.n38=this.getChild("n38"),this.n47=this.getChild("n47"),this.t0=this.getTransition("t0")}}ui.URL="ui://isxx5ak7ehtov4gv";class gi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs2")}onConstruct(){this.n10=this.getChild("n10"),this.n9=this.getChild("n9"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n11=this.getChild("n11"),this.t0=this.getTransition("t0")}}gi.URL="ui://isxx5ak7ehtov4gw";class mi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs2_1")}onConstruct(){this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}mi.URL="ui://isxx5ak7ehtov4gx";class yi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs3")}onConstruct(){this.n10=this.getChild("n10"),this.n9=this.getChild("n9"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n11=this.getChild("n11"),this.t0=this.getTransition("t0")}}yi.URL="ui://isxx5ak7ehtov4gy";class pi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs3_1")}onConstruct(){this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}pi.URL="ui://isxx5ak7ehtov4gz";class fi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component107")}onConstruct(){this.n18=this.getChild("n18"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.levelTxt=this.getChild("levelTxt"),this.t0=this.getTransition("t0")}}fi.URL="ui://isxx5ak7ehtov4h0";class xi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","box_com1")}onConstruct(){this.n14=this.getChild("n14"),this.n6=this.getChild("n6"),this.t0=this.getTransition("t0")}}xi.URL="ui://isxx5ak7erstv4nl";class Ci extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","box_com2")}onConstruct(){this.bg0=this.getChild("bg0"),this.bg=this.getChild("bg"),this.bar=this.getChild("bar"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12")}}Ci.URL="ui://isxx5ak7erstv4nt";class bi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","box_com4")}onConstruct(){this.n8=this.getChild("n8"),this.t0=this.getTransition("t0")}}bi.URL="ui://isxx5ak7erstv4nx";class Ii extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","box_com3")}onConstruct(){this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}Ii.URL="ui://isxx5ak7erstv4ny";class ki extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component97")}onConstruct(){this.c1=this.getController("c1"),this.n46=this.getChild("n46"),this.diamondNode=this.getChild("diamondNode"),this.coinNode=this.getChild("coinNode"),this.t0=this.getTransition("t0")}}ki.URL="ui://isxx5ak7g1giv4eb";class wi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component98")}onConstruct(){this.n8=this.getChild("n8"),this.n40=this.getChild("n40")}}wi.URL="ui://isxx5ak7g1giv4ed";class vi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component28_11")}onConstruct(){this.c1=this.getController("c1"),this.n12=this.getChild("n12"),this.n17=this.getChild("n17"),this.n13=this.getChild("n13"),this.diamondTxt=this.getChild("diamondTxt"),this.n15=this.getChild("n15"),this.n16=this.getChild("n16")}}vi.URL="ui://isxx5ak7g1giv4eh";class Ni extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component58_11")}onConstruct(){this.c1=this.getController("c1"),this.n23=this.getChild("n23"),this.n41=this.getChild("n41"),this.n_qiuGan=this.getChild("n_qiuGan"),this.n_daoju=this.getChild("n_daoju"),this.myList=this.getChild("myList"),this.djList=this.getChild("djList"),this.t0=this.getTransition("t0")}}Ni.URL="ui://isxx5ak7g1giv4el";class Li extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component100")}onConstruct(){this.c1=this.getController("c1"),this.n75=this.getChild("n75"),this.n76=this.getChild("n76"),this.n80=this.getChild("n80"),this.txt=this.getChild("txt"),this.spineRoot=this.getChild("spineRoot")}}Li.URL="ui://isxx5ak7g1giv4ex";class Si extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component101")}onConstruct(){this.c1=this.getController("c1"),this.n36=this.getChild("n36"),this.n35=this.getChild("n35"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34")}}Si.URL="ui://isxx5ak7g1giv4ey";class Ui extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component53")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n16=this.getChild("n16"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.n28=this.getChild("n28"),this.n29=this.getChild("n29"),this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.n32=this.getChild("n32"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34"),this.n35=this.getChild("n35"),this.t0=this.getTransition("t0")}}Ui.URL="ui://isxx5ak7g1ie43u";class Bi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component58")}onConstruct(){this.n23=this.getChild("n23"),this.n41=this.getChild("n41"),this.n8=this.getChild("n8"),this.skillList=this.getChild("skillList"),this.t0=this.getTransition("t0")}}Bi.URL="ui://isxx5ak7gg0z445";class Mi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component59")}onConstruct(){this.n3=this.getChild("n3"),this.msgTxt=this.getChild("msgTxt"),this.t0=this.getTransition("t0")}}Mi.URL="ui://isxx5ak7gg0z446";class Ti extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","RulerNode")}onConstruct(){this.n6=this.getChild("n6"),this.n4=this.getChild("n4"),this.img1=this.getChild("img1"),this.img2=this.getChild("img2")}}Ti.URL="ui://isxx5ak7ghnw3x8";class Oi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component108")}onConstruct(){this.n19=this.getChild("n19"),this.t0=this.getTransition("t0")}}Oi.URL="ui://isxx5ak7gpvxv4ha";class ji extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component63")}onConstruct(){this.n66=this.getChild("n66"),this.n56=this.getChild("n56"),this.n63=this.getChild("n63"),this.n65=this.getChild("n65"),this.t0=this.getTransition("t0")}}ji.URL="ui://isxx5ak7h657452";class Di extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","topNode")}onConstruct(){this.selfProgress=this.getChild("selfProgress"),this.aiProgress=this.getChild("aiProgress"),this.selfKuang=this.getChild("selfKuang"),this.aiKuang=this.getChild("aiKuang"),this.selfHeadLoader=this.getChild("selfHeadLoader"),this.aiHeadLoader=this.getChild("aiHeadLoader"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34"),this.selfNameTxt=this.getChild("selfNameTxt"),this.aiNameTxt=this.getChild("aiNameTxt"),this.selfBallList=this.getChild("selfBallList"),this.aiBallList=this.getChild("aiBallList"),this.middleNode=this.getChild("middleNode"),this.selfScoreTxt=this.getChild("selfScoreTxt"),this.aiScoreTxt=this.getChild("aiScoreTxt"),this.scoreNode=this.getChild("scoreNode"),this.selfTips=this.getChild("selfTips"),this.aiTips=this.getChild("aiTips")}}Di.URL="ui://isxx5ak7hkrz3qu";class Ri extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","selfProgress")}onConstruct(){this.n3=this.getChild("n3"),this.bar=this.getChild("bar")}}Ri.URL="ui://isxx5ak7hkrz3sf";class _i extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","aiProgress")}onConstruct(){this.n3=this.getChild("n3"),this.bar=this.getChild("bar")}}_i.URL="ui://isxx5ak7hkrz3sh";class Pi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ballDisplay")}onConstruct(){this.myImg=this.getChild("myImg")}}Pi.URL="ui://isxx5ak7hkrz3sk";class Ai extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","moveNode")}onConstruct(){this.n8=this.getChild("n8"),this.finger=this.getChild("finger")}}Ai.URL="ui://isxx5ak7hkrz3t9";class Ei extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","cancelBtn")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n1=this.getChild("n1")}}Ei.URL="ui://isxx5ak7hkrz3tm";class Gi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","shareBtn")}onConstruct(){this.c1=this.getController("c1"),this.n2=this.getChild("n2"),this.n1=this.getChild("n1"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6")}}Gi.URL="ui://isxx5ak7hkrz3tn";class Fi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","share2Btn")}onConstruct(){this.n3=this.getChild("n3")}}Fi.URL="ui://isxx5ak7hkrz3tr";class Hi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","rodMethodNode")}onConstruct(){this.bg=this.getChild("bg"),this.dot=this.getChild("dot")}}Hi.URL="ui://isxx5ak7hkrz3u1";class zi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","sureBtn")}onConstruct(){this.n2=this.getChild("n2"),this.n1=this.getChild("n1")}}zi.URL="ui://isxx5ak7hkrz3u2";class Vi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component18")}onConstruct(){this.c1=this.getController("c1"),this.nameTxt=this.getChild("nameTxt"),this.headImg=this.getChild("headImg"),this.n24=this.getChild("n24"),this.skillImg=this.getChild("skillImg"),this.skillTxt=this.getChild("skillTxt")}}Vi.URL="ui://isxx5ak7hxtr3yv";class Wi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component45")}onConstruct(){this.c1=this.getController("c1"),this.n40=this.getChild("n40"),this.n41=this.getChild("n41"),this.targetScoreTxt=this.getChild("targetScoreTxt"),this.n42=this.getChild("n42"),this.awardTxt=this.getChild("awardTxt"),this.n44=this.getChild("n44"),this.t0=this.getTransition("t0")}}Wi.URL="ui://isxx5ak7i4k2438";class Yi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","emotionDisplay")}onConstruct(){this.myIcon=this.getChild("myIcon")}}Yi.URL="ui://isxx5ak7i4k243h";class Xi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component49")}onConstruct(){this.n69=this.getChild("n69"),this.n56=this.getChild("n56")}}Xi.URL="ui://isxx5ak7i4k243n";class qi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component50")}onConstruct(){this.n54=this.getChild("n54"),this.n65=this.getChild("n65")}}qi.URL="ui://isxx5ak7i4k243o";class Ji extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component51")}onConstruct(){this.c1=this.getController("c1"),this.n51=this.getChild("n51"),this.n54=this.getChild("n54")}}Ji.URL="ui://isxx5ak7i4k243p";class Ki extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Button5")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n2=this.getChild("n2")}}Ki.URL="ui://isxx5ak7i7rdv4jg";class Zi extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component124")}onConstruct(){this.n22=this.getChild("n22"),this.shareNode=this.getChild("shareNode")}}Zi.URL="ui://isxx5ak7i7rdv4jh";class $i extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component125")}onConstruct(){this.n29=this.getChild("n29"),this.coinTxt=this.getChild("coinTxt")}}$i.URL="ui://isxx5ak7i7rdv4ji";class Qi extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component52")}onConstruct(){this.n35=this.getChild("n35"),this.n36=this.getChild("n36")}}Qi.URL="ui://isxx5ak7ihpy43t";class ts extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","drawBtn")}onConstruct(){this.c1=this.getController("c1"),this.n2=this.getChild("n2"),this.n1=this.getChild("n1"),this.n5=this.getChild("n5")}}ts.URL="ui://isxx5ak7iqrhv4mt";class es extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component43")}onConstruct(){this.n49=this.getChild("n49")}}es.URL="ui://isxx5ak7iveg434";class is extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","wordsDisplay")}onConstruct(){this.txt=this.getChild("txt"),this.n63=this.getChild("n63")}}is.URL="ui://isxx5ak7iveg436";class ss extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component_phb")}onConstruct(){this.n3=this.getChild("n3"),this.n4=this.getChild("n4")}}ss.URL="ui://isxx5ak7ixgmv57c";class os extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component3")}onConstruct(){this.n26=this.getChild("n26"),this.n24=this.getChild("n24"),this.nameTxt=this.getChild("nameTxt"),this.headRoot=this.getChild("headRoot")}}os.URL="ui://isxx5ak7ixm43xh";class ns extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component4")}onConstruct(){this.headImg=this.getChild("headImg")}}ns.URL="ui://isxx5ak7ixm43xi";class as extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component7")}onConstruct(){this.n17=this.getChild("n17")}}as.URL="ui://isxx5ak7ixm43xq";class hs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component8")}onConstruct(){this.n19=this.getChild("n19")}}hs.URL="ui://isxx5ak7ixm43xr";class ls extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component10")}onConstruct(){this.c1=this.getController("c1"),this.n40=this.getChild("n40")}}ls.URL="ui://isxx5ak7ixm43xt";class rs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component11")}onConstruct(){this.n34=this.getChild("n34")}}rs.URL="ui://isxx5ak7ixm43xu";class cs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component12")}onConstruct(){this.n35=this.getChild("n35")}}cs.URL="ui://isxx5ak7ixm43xv";class ds extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component13")}onConstruct(){this.n27=this.getChild("n27"),this.n36=this.getChild("n36")}}ds.URL="ui://isxx5ak7ixm43xw";class us extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_tuowei")}onConstruct(){this.n19=this.getChild("n19"),this.n18=this.getChild("n18"),this.n0=this.getChild("n0"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n20=this.getChild("n20"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}us.URL="ui://isxx5ak7j69a40n";class gs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_tw_g")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}gs.URL="ui://isxx5ak7j69a40o";class ms extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_xingxing")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n0=this.getChild("n0"),this.t2=this.getTransition("t2"),this.t1=this.getTransition("t1")}}ms.URL="ui://isxx5ak7j69a40p";class ys extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zy_jiazai")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n7=this.getChild("n7"),this.t0=this.getTransition("t0")}}ys.URL="ui://isxx5ak7j69a40q";class ps extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_xingxing2")}onConstruct(){this.c1=this.getController("c1"),this.n3=this.getChild("n3"),this.n5=this.getChild("n5"),this.n4=this.getChild("n4"),this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2")}}ps.URL="ui://isxx5ak7j69a40r";class fs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_tuowei2")}onConstruct(){this.n19=this.getChild("n19"),this.n21=this.getChild("n21"),this.n0=this.getChild("n0"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n23=this.getChild("n23"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}fs.URL="ui://isxx5ak7j69a40s";class xs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_tw_g_1")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.t0=this.getTransition("t0")}}xs.URL="ui://isxx5ak7j69a40t";class Cs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_shibai_1")}onConstruct(){this.n4=this.getChild("n4"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.idle=this.getTransition("idle"),this.attack=this.getTransition("attack")}}Cs.URL="ui://isxx5ak7j69a40w";class bs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","special")}onConstruct(){this.n18=this.getChild("n18"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.levelTxt=this.getChild("levelTxt"),this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.t0=this.getTransition("t0")}}bs.URL="ui://isxx5ak7j979v4i6";class Is extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component145")}onConstruct(){this.guanyuNode=this.getChild("guanyuNode")}}Is.URL="ui://isxx5ak7jaakv51f";class ks extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","longBtn")}onConstruct(){this.c1=this.getController("c1"),this.n2=this.getChild("n2"),this.n1=this.getChild("n1"),this.n4=this.getChild("n4")}}ks.URL="ui://isxx5ak7jaakv55v";class ws extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component146")}onConstruct(){this.n89=this.getChild("n89"),this.n90=this.getChild("n90"),this.guideBtn=this.getChild("guideBtn")}}ws.URL="ui://isxx5ak7jaakv55w";class vs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component146_11")}onConstruct(){this.n89=this.getChild("n89"),this.n90=this.getChild("n90"),this.guideBtn=this.getChild("guideBtn")}}vs.URL="ui://isxx5ak7jaakv55x";class Ns extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component111_1")}onConstruct(){this.n68=this.getChild("n68"),this.myMask=this.getChild("myMask")}}Ns.URL="ui://isxx5ak7jaakv55y";class Ls extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component64_1")}onConstruct(){this.n57=this.getChild("n57"),this.n54=this.getChild("n54"),this.n55=this.getChild("n55"),this.n56=this.getChild("n56"),this.t1=this.getTransition("t1")}}Ls.URL="ui://isxx5ak7jaakv55z";class Ss extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ModeSelection_com123")}onConstruct(){this.type1=this.getChild("type1"),this.type2=this.getChild("type2"),this.type3=this.getChild("type3"),this.n38=this.getChild("n38"),this.t0=this.getTransition("t0")}}Ss.URL="ui://isxx5ak7jaakv561";class Us extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component132_2")}onConstruct(){this.n25=this.getChild("n25"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.t0=this.getTransition("t0")}}Us.URL="ui://isxx5ak7jpszv4mw";class Bs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIPower")}onConstruct(){this.n11=this.getChild("n11"),this.myNode=this.getChild("myNode"),this.t0=this.getTransition("t0")}}Bs.URL="ui://isxx5ak7jpszv4n1";class Ms extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component133")}onConstruct(){this.n29=this.getChild("n29"),this.n30=this.getChild("n30")}}Ms.URL="ui://isxx5ak7jpszv4n3";class Ts extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component134")}onConstruct(){this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.t0=this.getTransition("t0")}}Ts.URL="ui://isxx5ak7jpszv4n4";class Os extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component135")}onConstruct(){this.n30=this.getChild("n30"),this.t0=this.getTransition("t0")}}Os.URL="ui://isxx5ak7jpszv4n6";class js extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component137")}onConstruct(){this.n28=this.getChild("n28"),this.n29=this.getChild("n29"),this.n30=this.getChild("n30"),this.n32=this.getChild("n32")}}js.URL="ui://isxx5ak7jpszv4n8";class Ds extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","dh_zuanshi")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n0=this.getChild("n0"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4")}}Ds.URL="ui://isxx5ak7jpszv4n9";class Rs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component138")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.t0=this.getTransition("t0")}}Rs.URL="ui://isxx5ak7jpszv4nf";class _s extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component139")}onConstruct(){this.n0=this.getChild("n0"),this.t0=this.getTransition("t0")}}_s.URL="ui://isxx5ak7jpszv4ng";class Ps extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component140")}onConstruct(){this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.t0=this.getTransition("t0")}}Ps.URL="ui://isxx5ak7jpszv4nh";class As extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component141")}onConstruct(){this.n0=this.getChild("n0"),this.t0=this.getTransition("t0")}}As.URL="ui://isxx5ak7jpszv4ni";class Es extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","powerNode")}onConstruct(){this.n2=this.getChild("n2"),this.bar_v=this.getChild("bar_v"),this.showImg=this.getChild("showImg"),this.n12=this.getChild("n12")}}Es.URL="ui://isxx5ak7kt443qh";class Gs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_jingbi1")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.t0=this.getTransition("t0")}}Gs.URL="ui://isxx5ak7kys749e";class Fs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component94")}onConstruct(){this.n77=this.getChild("n77")}}Fs.URL="ui://isxx5ak7l1574b6";class Hs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component95")}onConstruct(){this.n77=this.getChild("n77")}}Hs.URL="ui://isxx5ak7l1574b7";class zs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component126")}onConstruct(){this.c1=this.getController("c1"),this.normalBtn=this.getChild("normalBtn"),this.tripleBtn=this.getChild("tripleBtn")}}zs.URL="ui://isxx5ak7lhrrv4lg";class Vs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component60")}onConstruct(){this.c1=this.getController("c1"),this.n48=this.getChild("n48"),this.womanTxt=this.getChild("womanTxt"),this.t0=this.getTransition("t0")}}Vs.URL="ui://isxx5ak7llhd44g";class Ws extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component98_3")}onConstruct(){this.c1=this.getController("c1"),this.n8=this.getChild("n8"),this.n41=this.getChild("n41"),this.n40=this.getChild("n40")}}Ws.URL="ui://isxx5ak7lp3lv4j2";class Ys extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ModeSelection_com1")}onConstruct(){this.n34=this.getChild("n34"),this.n36=this.getChild("n36"),this.n22=this.getChild("n22"),this.n20=this.getChild("n20"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n26=this.getChild("n26"),this.n33=this.getChild("n33"),this.coinImg=this.getChild("coinImg"),this.need=this.getChild("need"),this.n35=this.getChild("n35"),this.n29=this.getChild("n29"),this.tipsTxt=this.getChild("tipsTxt"),this.n30=this.getChild("n30"),this.peopleTxt=this.getChild("peopleTxt"),this.t0=this.getTransition("t0")}}Ys.URL="ui://isxx5ak7lrxgv50m";class Xs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ModeSelection_com2")}onConstruct(){this.n36=this.getChild("n36"),this.n34=this.getChild("n34"),this.n22=this.getChild("n22"),this.n20=this.getChild("n20"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n26=this.getChild("n26"),this.n33=this.getChild("n33"),this.coinImg=this.getChild("coinImg"),this.need=this.getChild("need"),this.n35=this.getChild("n35"),this.n29=this.getChild("n29"),this.tipsTxt=this.getChild("tipsTxt"),this.n30=this.getChild("n30"),this.peopleTxt=this.getChild("peopleTxt"),this.t0=this.getTransition("t0")}}Xs.URL="ui://isxx5ak7lrxgv50n";class qs extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ModeSelection_com3")}onConstruct(){this.n34=this.getChild("n34"),this.n36=this.getChild("n36"),this.n22=this.getChild("n22"),this.n20=this.getChild("n20"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n26=this.getChild("n26"),this.n33=this.getChild("n33"),this.coinImg=this.getChild("coinImg"),this.need=this.getChild("need"),this.n35=this.getChild("n35"),this.n29=this.getChild("n29"),this.tipsTxt=this.getChild("tipsTxt"),this.n30=this.getChild("n30"),this.peopleTxt=this.getChild("peopleTxt"),this.t0=this.getTransition("t0")}}qs.URL="ui://isxx5ak7lrxgv50o";class Js extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Invitation_com1")}onConstruct(){this.n14=this.getChild("n14"),this.n13=this.getChild("n13"),this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.enterBtn=this.getChild("enterBtn"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n15=this.getChild("n15"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}Js.URL="ui://isxx5ak7lrxgv513";class Ks extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component87_1")}onConstruct(){this.n74=this.getChild("n74"),this.n73=this.getChild("n73"),this.ballTxt=this.getChild("ballTxt"),this.n76=this.getChild("n76"),this.helpLineBtn=this.getChild("helpLineBtn"),this.levelTxt=this.getChild("levelTxt"),this.n87=this.getChild("n87"),this.n84=this.getChild("n84"),this.hpTxt=this.getChild("hpTxt"),this.n89=this.getChild("n89"),this.tipsTxt=this.getChild("tipsTxt")}}Ks.URL="ui://isxx5ak7luq648t";class Zs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","sqg1")}onConstruct(){this.n1=this.getChild("n1"),this.n0=this.getChild("n0")}}Zs.URL="ui://isxx5ak7mif8v4ma";class $s extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","sqg2")}onConstruct(){this.n1=this.getChild("n1"),this.n0=this.getChild("n0")}}$s.URL="ui://isxx5ak7mif8v4mb";class Qs extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","sqg3")}onConstruct(){this.n1=this.getChild("n1"),this.n0=this.getChild("n0")}}Qs.URL="ui://isxx5ak7mif8v4mc";class to extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","sqg4")}onConstruct(){this.n1=this.getChild("n1"),this.n0=this.getChild("n0")}}to.URL="ui://isxx5ak7mif8v4md";class eo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component36")}onConstruct(){this.c1=this.getController("c1"),this.n53=this.getChild("n53"),this.n56=this.getChild("n56")}}eo.URL="ui://isxx5ak7mnrs42r";class io extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component37")}onConstruct(){this.c1=this.getController("c1"),this.n52=this.getChild("n52"),this.n54=this.getChild("n54")}}io.URL="ui://isxx5ak7mnrs42s";class so extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UISetting")}onConstruct(){this.c1=this.getController("c1"),this.n4=this.getChild("n4"),this.soundBtn=this.getChild("soundBtn"),this.shakeBtn=this.getChild("shakeBtn"),this.clickNode=this.getChild("clickNode"),this.xyBtn=this.getChild("xyBtn")}}so.URL="ui://isxx5ak7mnrs42t";class oo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component39")}onConstruct(){this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.t0=this.getTransition("t0")}}oo.URL="ui://isxx5ak7mnrs42v";class no extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component40")}onConstruct(){this.n46=this.getChild("n46"),this.n47=this.getChild("n47")}}no.URL="ui://isxx5ak7mnrs42y";class ao extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component41")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.titleTxt=this.getChild("titleTxt"),this.n2=this.getChild("n2"),this.msgTips=this.getChild("msgTips"),this.numTxt=this.getChild("numTxt"),this.n18=this.getChild("n18"),this.cancelBtn=this.getChild("cancelBtn"),this.videoBtn=this.getChild("videoBtn"),this.n10=this.getChild("n10")}}ao.URL="ui://isxx5ak7mnrs430";class ho extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component42")}onConstruct(){this.c1=this.getController("c1"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.tipsTxt=this.getChild("tipsTxt"),this.cancelBtn=this.getChild("cancelBtn"),this.sureBtn=this.getChild("sureBtn"),this.n11=this.getChild("n11"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.womanTxt=this.getChild("womanTxt"),this.t0=this.getTransition("t0")}}ho.URL="ui://isxx5ak7mnrs431";class lo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_shengli")}onConstruct(){this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.attack=this.getTransition("attack"),this.idle=this.getTransition("idle")}}lo.URL="ui://isxx5ak7n43d3v0";class ro extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_shengli_g")}onConstruct(){this.n3=this.getChild("n3"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}ro.URL="ui://isxx5ak7n43d3v1";class co extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_js_shibai")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.idle=this.getTransition("idle"),this.attack=this.getTransition("attack")}}co.URL="ui://isxx5ak7n43d3v2";class uo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","dh_zy_ganfa")}onConstruct(){this.n0=this.getChild("n0")}}uo.URL="ui://isxx5ak7n43d3vl";class go extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","dh_zy_sc_guang")}onConstruct(){this.n0=this.getChild("n0"),this.n2=this.getChild("n2")}}go.URL="ui://isxx5ak7n43d3vn";class mo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zy_shangcheng")}onConstruct(){this.n0=this.getChild("n0"),this.n3=this.getChild("n3"),this.t0=this.getTransition("t0")}}mo.URL="ui://isxx5ak7n43d3vo";class yo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","dh_zy_wanfa")}onConstruct(){this.n0=this.getChild("n0")}}yo.URL="ui://isxx5ak7n43d3vp";class po extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Button_login")}onConstruct(){this.button=this.getController("button"),this.n5=this.getChild("n5"),this.n3=this.getChild("n3")}}po.URL="ui://isxx5ak7nnz5v587";class fo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component53_1")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n16=this.getChild("n16"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.n28=this.getChild("n28"),this.n29=this.getChild("n29"),this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.n32=this.getChild("n32"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34"),this.n35=this.getChild("n35"),this.t0=this.getTransition("t0")}}fo.URL="ui://isxx5ak7nqgqv4y4";class xo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component30")}onConstruct(){this.c1=this.getController("c1"),this.n46=this.getChild("n46"),this.n47=this.getChild("n47"),this.numTxt=this.getChild("numTxt"),this.n50=this.getChild("n50"),this.n53=this.getChild("n53"),this.n54=this.getChild("n54"),this.n55=this.getChild("n55"),this.n56=this.getChild("n56")}}xo.URL="ui://isxx5ak7p4tr41y";class Co extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component30_1")}onConstruct(){this.c1=this.getController("c1"),this.n46=this.getChild("n46"),this.n47=this.getChild("n47"),this.numTxt=this.getChild("numTxt"),this.n50=this.getChild("n50"),this.n51=this.getChild("n51"),this.n52=this.getChild("n52"),this.n53=this.getChild("n53"),this.n54=this.getChild("n54")}}Co.URL="ui://isxx5ak7p4tr41z";class bo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component31")}onConstruct(){this.n55=this.getChild("n55"),this.n54=this.getChild("n54"),this.conditionTxt=this.getChild("conditionTxt"),this.n57=this.getChild("n57"),this.t0=this.getTransition("t0")}}bo.URL="ui://isxx5ak7p4tr423";class Io extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component32")}onConstruct(){this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.t0=this.getTransition("t0")}}Io.URL="ui://isxx5ak7p4tr42f";class ko extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","AwardItem")}onConstruct(){this.n9=this.getChild("n9"),this.myIcon=this.getChild("myIcon"),this.numTxt=this.getChild("numTxt"),this.nameTxt=this.getChild("nameTxt"),this.n16=this.getChild("n16"),this.n17=this.getChild("n17")}}ko.URL="ui://isxx5ak7p4tr42h";class wo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com1")}onConstruct(){this.c1=this.getController("c1"),this.n49=this.getChild("n49"),this.n18=this.getChild("n18"),this.n46=this.getChild("n46"),this.n48=this.getChild("n48"),this.n50=this.getChild("n50")}}wo.URL="ui://isxx5ak7p7rrv4pr";class vo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com2")}onConstruct(){this.c1=this.getController("c1"),this.n49=this.getChild("n49"),this.n18=this.getChild("n18"),this.n46=this.getChild("n46"),this.n48=this.getChild("n48"),this.n50=this.getChild("n50")}}vo.URL="ui://isxx5ak7p7rrv4ps";class No extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com3")}onConstruct(){this.n17=this.getChild("n17"),this.myIcon=this.getChild("myIcon")}}No.URL="ui://isxx5ak7p7rrv4pw";class Lo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com4")}onConstruct(){this.n16=this.getChild("n16"),this.head=this.getChild("head")}}Lo.URL="ui://isxx5ak7p7rrv4px";class So extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com5")}onConstruct(){this.c1=this.getController("c1"),this.c2=this.getController("c2"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.levelBtn=this.getChild("levelBtn"),this.starBtn=this.getChild("starBtn"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.myList=this.getChild("myList"),this.selfNode=this.getChild("selfNode"),this.n9=this.getChild("n9"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n39=this.getChild("n39"),this.n41=this.getChild("n41"),this.n42=this.getChild("n42"),this.n45=this.getChild("n45"),this.changeBtn=this.getChild("changeBtn"),this.closeBtn=this.getChild("closeBtn"),this.t0=this.getTransition("t0")}}So.URL="ui://isxx5ak7p7rrv4pz";class Uo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","RankItem")}onConstruct(){this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.rankTxt=this.getChild("rankTxt"),this.headNode=this.getChild("headNode"),this.nameTxt=this.getChild("nameTxt"),this.n19=this.getChild("n19"),this.valueTxt=this.getChild("valueTxt"),this.img1=this.getChild("img1"),this.img2=this.getChild("img2"),this.img3=this.getChild("img3")}}Uo.URL="ui://isxx5ak7p7rrv4q1";class Bo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com9")}onConstruct(){this.c1=this.getController("c1"),this.n27=this.getChild("n27"),this.n28=this.getChild("n28"),this.headNode=this.getChild("headNode"),this.rankTxt=this.getChild("rankTxt"),this.nameTxt=this.getChild("nameTxt"),this.n34=this.getChild("n34"),this.valueTxt=this.getChild("valueTxt"),this.n36=this.getChild("n36"),this.n37=this.getChild("n37"),this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n40=this.getChild("n40")}}Bo.URL="ui://isxx5ak7p7rrv4q3";class Mo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com10")}onConstruct(){this.n23=this.getChild("n23"),this.n24=this.getChild("n24")}}Mo.URL="ui://isxx5ak7p7rrv4q4";class To extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com11")}onConstruct(){this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.t0=this.getTransition("t0")}}To.URL="ui://isxx5ak7p7rrv4q5";class Oo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","ranking_com13")}onConstruct(){this.c1=this.getController("c1"),this.n44=this.getChild("n44"),this.n45=this.getChild("n45"),this.n46=this.getChild("n46")}}Oo.URL="ui://isxx5ak7p7rrv4qa";class jo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component_dl_zc")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0")}}jo.URL="ui://isxx5ak7p8p3v58c";class Do extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component122")}onConstruct(){this.gameNode3=this.getChild("gameNode3")}}Do.URL="ui://isxx5ak7pf2sv4ic";class Ro extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","skillItem")}onConstruct(){this.c1=this.getController("c1"),this.n31=this.getChild("n31"),this.n6=this.getChild("n6"),this.skillImg=this.getChild("skillImg"),this.nameTxt=this.getChild("nameTxt"),this.levelTxt=this.getChild("levelTxt"),this.n28=this.getChild("n28"),this.describeTxt=this.getChild("describeTxt"),this.n32=this.getChild("n32"),this.mutiBtn=this.getChild("mutiBtn"),this.tryNode=this.getChild("tryNode"),this.normalBtn=this.getChild("normalBtn"),this.startBtn=this.getChild("startBtn"),this.n42=this.getChild("n42"),this.n43=this.getChild("n43"),this.n44=this.getChild("n44")}}Ro.URL="ui://isxx5ak7qlo041q";class _o extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component26")}onConstruct(){this.n11=this.getChild("n11"),this.n30=this.getChild("n30"),this.n34=this.getChild("n34")}}_o.URL="ui://isxx5ak7qlo041r";class Po extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component28")}onConstruct(){this.n12=this.getChild("n12"),this.n31=this.getChild("n31"),this.curTxt=this.getChild("curTxt"),this.n33=this.getChild("n33")}}Po.URL="ui://isxx5ak7qlo041t";class Ao extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component1302")}onConstruct(){this.n2=this.getChild("n2"),this.n3=this.getChild("n3")}}Ao.URL="ui://isxx5ak7r4l5v577";class Eo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component113")}onConstruct(){this.n85=this.getChild("n85"),this.n86=this.getChild("n86"),this.n77=this.getChild("n77"),this.n79=this.getChild("n79"),this.n80=this.getChild("n80"),this.n81=this.getChild("n81"),this.n82=this.getChild("n82"),this.n84=this.getChild("n84"),this.n87=this.getChild("n87"),this.t0=this.getTransition("t0")}}Eo.URL="ui://isxx5ak7r5f8v4hv";class Go extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component114")}onConstruct(){this.n77=this.getChild("n77"),this.t0=this.getTransition("t0")}}Go.URL="ui://isxx5ak7r5f8v4hw";class Fo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component115")}onConstruct(){this.n83=this.getChild("n83"),this.fingerNode=this.getChild("fingerNode"),this.n84=this.getChild("n84")}}Fo.URL="ui://isxx5ak7r5f8v4hx";class Ho extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component117")}onConstruct(){this.n87=this.getChild("n87"),this.n88=this.getChild("n88"),this.n84=this.getChild("n84"),this.n85=this.getChild("n85"),this.n86=this.getChild("n86"),this.t0=this.getTransition("t0")}}Ho.URL="ui://isxx5ak7r5f8v4hz";class zo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component98_1")}onConstruct(){this.c1=this.getController("c1"),this.n8=this.getChild("n8"),this.n41=this.getChild("n41"),this.n40=this.getChild("n40")}}zo.URL="ui://isxx5ak7s46iv4f0";class Vo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component61")}onConstruct(){this.n14=this.getChild("n14"),this.n6=this.getChild("n6"),this.t0=this.getTransition("t0")}}Vo.URL="ui://isxx5ak7s8sz44h";class Wo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component62")}onConstruct(){this.n66=this.getChild("n66"),this.n56=this.getChild("n56"),this.n63=this.getChild("n63"),this.n65=this.getChild("n65"),this.t0=this.getTransition("t0")}}Wo.URL="ui://isxx5ak7s8sz44u";class Yo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","d3Root")}onConstruct(){}}Yo.URL="ui://isxx5ak7sdh33ql";class Xo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","d2Root")}onConstruct(){}}Xo.URL="ui://isxx5ak7sdh33qm";class qo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","ballNode")}onConstruct(){}}qo.URL="ui://isxx5ak7sdh33qn";class Jo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","border")}onConstruct(){this.bar1=this.getChild("bar1"),this.bar2=this.getChild("bar2"),this.bar3=this.getChild("bar3"),this.bar4=this.getChild("bar4"),this.bar5=this.getChild("bar5"),this.bar6=this.getChild("bar6"),this.circle1=this.getChild("circle1"),this.circle2=this.getChild("circle2"),this.circle3=this.getChild("circle3"),this.circle4=this.getChild("circle4"),this.circle5=this.getChild("circle5"),this.circle6=this.getChild("circle6"),this.n28=this.getChild("n28")}}Jo.URL="ui://isxx5ak7sdh33qq";class Ko extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","btn_buy")}onConstruct(){this.button=this.getController("button"),this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2")}}Ko.URL="ui://isxx5ak7so7lv596";class Zo extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component41_2")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n2=this.getChild("n2"),this.n19=this.getChild("n19"),this.cancelBtn=this.getChild("cancelBtn"),this.videoBtn=this.getChild("videoBtn"),this.n9=this.getChild("n9"),this.n22=this.getChild("n22"),this.tipsTxt=this.getChild("tipsTxt"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.titleTxt=this.getChild("titleTxt")}}Zo.URL="ui://isxx5ak7trk948w";class $o extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component41_1")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n2=this.getChild("n2"),this.cancelBtn=this.getChild("cancelBtn"),this.videoBtn=this.getChild("videoBtn"),this.n27=this.getChild("n27"),this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.n32=this.getChild("n32"),this.n33=this.getChild("n33"),this.n34=this.getChild("n34"),this.n35=this.getChild("n35"),this.n36=this.getChild("n36"),this.n1=this.getChild("n1"),this.n37=this.getChild("n37"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1"),this.t2=this.getTransition("t2"),this.t3=this.getTransition("t3")}}$o.URL="ui://isxx5ak7trk9491";class Qo extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","againBtn")}onConstruct(){this.n2=this.getChild("n2"),this.n1=this.getChild("n1"),this.n5=this.getChild("n5")}}Qo.URL="ui://isxx5ak7u58xv509";class tn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component118")}onConstruct(){this.c1=this.getController("c1"),this.n14=this.getChild("n14"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.diamondTxt=this.getChild("diamondTxt"),this.n13=this.getChild("n13"),this.n15=this.getChild("n15")}}tn.URL="ui://isxx5ak7u8eiv4i2";class en extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component119")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n13=this.getChild("n13"),this.n6=this.getChild("n6"),this.screenNode=this.getChild("screenNode"),this.n15=this.getChild("n15"),this.closeBtn=this.getChild("closeBtn"),this.share2Btn=this.getChild("share2Btn"),this.shareBtn=this.getChild("shareBtn"),this.tipsNode=this.getChild("tipsNode"),this.awardNode=this.getChild("awardNode")}}en.URL="ui://isxx5ak7u8eiv4i3";class sn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","daoJuDisplay")}onConstruct(){this.n6=this.getChild("n6"),this.n_jiaGe=this.getChild("n_jiaGe"),this.n_zuanShi=this.getChild("n_zuanShi"),this.btn_buy=this.getChild("btn_buy"),this.nameTxt=this.getChild("nameTxt"),this.zsImg=this.getChild("zsImg")}}sn.URL="ui://isxx5ak7uel8v58m";class on extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component132_1")}onConstruct(){this.n25=this.getChild("n25"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.t0=this.getTransition("t0")}}on.URL="ui://isxx5ak7uih8v568";class nn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","SecretaryDisplay")}onConstruct(){this.n2=this.getChild("n2"),this.levelTxt=this.getChild("levelTxt"),this.n4=this.getChild("n4"),this.secretary=this.getChild("secretary"),this.purchaseBtn=this.getChild("purchaseBtn"),this.n16=this.getChild("n16"),this.n37=this.getChild("n37"),this.n41=this.getChild("n41"),this.n14=this.getChild("n14"),this.n17=this.getChild("n17"),this.heightTxt=this.getChild("heightTxt"),this.n46=this.getChild("n46"),this.n36=this.getChild("n36"),this.n38=this.getChild("n38"),this.foodTxt=this.getChild("foodTxt"),this.n47=this.getChild("n47"),this.n40=this.getChild("n40"),this.n42=this.getChild("n42"),this.historyTxt=this.getChild("historyTxt"),this.n48=this.getChild("n48"),this.nameImg=this.getChild("nameImg"),this.n12=this.getChild("n12"),this.n49=this.getChild("n49"),this.t0=this.getTransition("t0")}}nn.URL="ui://isxx5ak7uqohv4lo";class an extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","BallRodDisplay")}onConstruct(){this.c1=this.getController("c1"),this.n31=this.getChild("n31"),this.n6=this.getChild("n6"),this.nameTxt=this.getChild("nameTxt"),this.rodImg=this.getChild("rodImg"),this.levelNode=this.getChild("levelNode"),this.eftRod=this.getChild("eftRod"),this.purchaseBtn=this.getChild("purchaseBtn")}}an.URL="ui://isxx5ak7uqohv4lr";class hn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component111_11")}onConstruct(){this.n68=this.getChild("n68"),this.n69=this.getChild("n69")}}hn.URL="ui://isxx5ak7vhzhv4hk";class ln extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component112")}onConstruct(){this.n68=this.getChild("n68"),this.n70=this.getChild("n70"),this.myMask=this.getChild("myMask")}}ln.URL="ui://isxx5ak7vhzhv4ho";class rn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component111")}onConstruct(){this.n68=this.getChild("n68"),this.myMask=this.getChild("myMask")}}rn.URL="ui://isxx5ak7vhzhv4hq";class cn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component144")}onConstruct(){this.n8=this.getChild("n8")}}cn.URL="ui://isxx5ak7vv6av515";class dn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com2")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}dn.URL="ui://isxx5ak7wcn5v4k1";class un extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_guang")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8")}}un.URL="ui://isxx5ak7wcn5v4k4";class gn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","SignMax")}onConstruct(){this.c1=this.getController("c1"),this.n7=this.getChild("n7"),this.n15=this.getChild("n15"),this.n8=this.getChild("n8"),this.titleTxt=this.getChild("titleTxt"),this.myIcon1=this.getChild("myIcon1"),this.numTxt1=this.getChild("numTxt1"),this.myIcon2=this.getChild("myIcon2"),this.n20=this.getChild("n20"),this.n17=this.getChild("n17"),this.numTxt2=this.getChild("numTxt2"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n21=this.getChild("n21"),this.n14=this.getChild("n14")}}gn.URL="ui://isxx5ak7wcn5v4k6";class mn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com2_1")}onConstruct(){this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.t0=this.getTransition("t0")}}mn.URL="ui://isxx5ak7wcn5v4k7";class yn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com5")}onConstruct(){this.n3=this.getChild("n3"),this.n29=this.getChild("n29"),this.n4=this.getChild("n4"),this.day1=this.getChild("day1"),this.day2=this.getChild("day2"),this.day3=this.getChild("day3"),this.day4=this.getChild("day4"),this.day5=this.getChild("day5"),this.day6=this.getChild("day6"),this.day7=this.getChild("day7"),this.t0=this.getTransition("t0")}}yn.URL="ui://isxx5ak7wcn5v4k9";class pn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com8")}onConstruct(){this.n48=this.getChild("n48"),this.womanTxt=this.getChild("womanTxt"),this.t0=this.getTransition("t0")}}pn.URL="ui://isxx5ak7wcn5v4ka";class fn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com6")}onConstruct(){this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.t0=this.getTransition("t0")}}fn.URL="ui://isxx5ak7wcn5v4kb";class xn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Sign_com7")}onConstruct(){this.n29=this.getChild("n29"),this.n2=this.getChild("n2")}}xn.URL="ui://isxx5ak7wcn5v4kd";class Cn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com1_2")}onConstruct(){this.n5=this.getChild("n5"),this.n4=this.getChild("n4"),this.t0=this.getTransition("t0")}}Cn.URL="ui://isxx5ak7wcn5v4kr";class bn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com2")}onConstruct(){this.c1=this.getController("c1"),this.n4=this.getChild("n4"),this.n6=this.getChild("n6"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n16=this.getChild("n16"),this.n17=this.getChild("n17"),this.n18=this.getChild("n18"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.n24=this.getChild("n24"),this.n25=this.getChild("n25"),this.n26=this.getChild("n26"),this.n27=this.getChild("n27"),this.n28=this.getChild("n28"),this.n29=this.getChild("n29"),this.n30=this.getChild("n30"),this.n31=this.getChild("n31"),this.n32=this.getChild("n32"),this.n33=this.getChild("n33")}}bn.URL="ui://isxx5ak7wcn5v4ks";class In extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com1_1")}onConstruct(){this.n5=this.getChild("n5"),this.n4=this.getChild("n4"),this.t0=this.getTransition("t0")}}In.URL="ui://isxx5ak7wcn5v4kt";class kn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com5")}onConstruct(){this.flashNode=this.getChild("flashNode"),this.rotNode=this.getChild("rotNode"),this.n3=this.getChild("n3"),this.n21=this.getChild("n21"),this.t0=this.getTransition("t0")}}kn.URL="ui://isxx5ak7wcn5v4kz";class wn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com7")}onConstruct(){this.n2=this.getChild("n2"),this.n35=this.getChild("n35"),this.img1=this.getChild("img1"),this.img2=this.getChild("img2"),this.img3=this.getChild("img3"),this.img4=this.getChild("img4"),this.img6=this.getChild("img6"),this.img5=this.getChild("img5"),this.txt1=this.getChild("txt1"),this.txt2=this.getChild("txt2"),this.txt3=this.getChild("txt3"),this.txt4=this.getChild("txt4"),this.txt5=this.getChild("txt5"),this.txt6=this.getChild("txt6")}}wn.URL="ui://isxx5ak7wcn5v4l1";class vn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com9")}onConstruct(){this.n38=this.getChild("n38"),this.n39=this.getChild("n39")}}vn.URL="ui://isxx5ak7wcn5v4l8";class Nn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com10")}onConstruct(){this.n39=this.getChild("n39"),this.n40=this.getChild("n40"),this.t0=this.getTransition("t0")}}Nn.URL="ui://isxx5ak7wcn5v4l9";class Ln extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com11")}onConstruct(){this.n38=this.getChild("n38"),this.n39=this.getChild("n39"),this.n40=this.getChild("n40"),this.t0=this.getTransition("t0")}}Ln.URL="ui://isxx5ak7wcn5v4la";class Sn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com12")}onConstruct(){this.n43=this.getChild("n43"),this.barNode=this.getChild("barNode"),this.tipsTxt=this.getChild("tipsTxt"),this.n45=this.getChild("n45"),this.boxBtn=this.getChild("boxBtn")}}Sn.URL="ui://isxx5ak7wcn5v4lb";class Un extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com1")}onConstruct(){this.n41=this.getChild("n41"),this.n42=this.getChild("n42"),this.t0=this.getTransition("t0")}}Un.URL="ui://isxx5ak7wcn5v4lc";class Bn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UITurntable_com3")}onConstruct(){this.n48=this.getChild("n48"),this.womanTxt=this.getChild("womanTxt"),this.t0=this.getTransition("t0")}}Bn.URL="ui://isxx5ak7wcn5v4ld";class Mn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","cancelBtn2")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.powerEft=this.getChild("powerEft")}}Mn.URL="ui://isxx5ak7wehi3ue";class Tn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","shareBtn2")}onConstruct(){this.c1=this.getController("c1"),this.n2=this.getChild("n2"),this.n24=this.getChild("n24"),this.n1=this.getChild("n1"),this.n3=this.getChild("n3"),this.n23=this.getChild("n23"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.n22=this.getChild("n22"),this.powerEft=this.getChild("powerEft")}}Tn.URL="ui://isxx5ak7wehi3uf";class On extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIMoney")}onConstruct(){this.c1=this.getController("c1"),this.n4=this.getChild("n4"),this.coinImg=this.getChild("coinImg"),this.addCoinBtn=this.getChild("addCoinBtn"),this.coinTxt=this.getChild("coinTxt"),this.n7=this.getChild("n7"),this.addDiamondBtn=this.getChild("addDiamondBtn"),this.diamondTxt=this.getChild("diamondTxt"),this.diamondImg=this.getChild("diamondImg"),this.n12=this.getChild("n12"),this.powerImg=this.getChild("powerImg"),this.addPowerBtn=this.getChild("addPowerBtn"),this.powerTxt=this.getChild("powerTxt"),this.powerTimeTxt=this.getChild("powerTimeTxt")}}On.URL="ui://isxx5ak7wehi3ug";class jn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","backBtn")}onConstruct(){this.n0=this.getChild("n0"),this.t0=this.getTransition("t0"),this.t1=this.getTransition("t1")}}jn.URL="ui://isxx5ak7wehi3ul";class Dn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","MoneyBtn")}onConstruct(){this.button=this.getController("button"),this.n0=this.getChild("n0")}}Dn.URL="ui://isxx5ak7wehi3un";class Rn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","UIMoneyBtn")}onConstruct(){this.n1=this.getChild("n1"),this.closeBtn=this.getChild("closeBtn")}}Rn.URL="ui://isxx5ak7wehi3up";class _n extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component64")}onConstruct(){this.n57=this.getChild("n57"),this.n54=this.getChild("n54"),this.n55=this.getChild("n55"),this.n56=this.getChild("n56"),this.t1=this.getTransition("t1")}}_n.URL="ui://isxx5ak7wp26456";class Pn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component41_3")}onConstruct(){this.c1=this.getController("c1"),this.n0=this.getChild("n0"),this.n2=this.getChild("n2"),this.cancelBtn=this.getChild("cancelBtn"),this.videoBtn=this.getChild("videoBtn"),this.n9=this.getChild("n9"),this.n24=this.getChild("n24"),this.n27=this.getChild("n27"),this.titleTxt=this.getChild("titleTxt"),this.n28=this.getChild("n28"),this.t0=this.getTransition("t0")}}Pn.URL="ui://isxx5ak7wyzsv4o1";class An extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","dh_zs_4")}onConstruct(){this.n1=this.getChild("n1"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n8=this.getChild("n8"),this.t0=this.getTransition("t0")}}An.URL="ui://isxx5ak7wyzsv4o2";class En extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component71_1")}onConstruct(){this.n17=this.getChild("n17"),this.t0=this.getTransition("t0")}}En.URL="ui://isxx5ak7xs1r47w";class Gn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component83")}onConstruct(){this.c1=this.getController("c1"),this.n17=this.getChild("n17"),this.n19=this.getChild("n19"),this.n20=this.getChild("n20")}}Gn.URL="ui://isxx5ak7xs1r47z";class Fn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component84")}onConstruct(){this.c1=this.getController("c1"),this.n4=this.getChild("n4"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.numTxt=this.getChild("numTxt"),this.n25=this.getChild("n25"),this.n26=this.getChild("n26")}}Fn.URL="ui://isxx5ak7xs1r480";class Hn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component84_1")}onConstruct(){this.c1=this.getController("c1"),this.n4=this.getChild("n4"),this.n22=this.getChild("n22"),this.n23=this.getChild("n23"),this.numTxt=this.getChild("numTxt"),this.n25=this.getChild("n25"),this.n26=this.getChild("n26")}}Hn.URL="ui://isxx5ak7xs1r481";class zn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component85")}onConstruct(){this.n1=this.getChild("n1"),this.n6=this.getChild("n6"),this.n2=this.getChild("n2"),this.n3=this.getChild("n3"),this.levelTxt=this.getChild("levelTxt"),this.n10=this.getChild("n10"),this.n11=this.getChild("n11"),this.n12=this.getChild("n12"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.modeNode=this.getChild("modeNode"),this.n18=this.getChild("n18"),this.conditionTxt=this.getChild("conditionTxt"),this.diamondNode=this.getChild("diamondNode"),this.coinNode=this.getChild("coinNode"),this.startBtn=this.getChild("startBtn"),this.n28=this.getChild("n28"),this.displayRoot=this.getChild("displayRoot"),this.t0=this.getTransition("t0")}}zn.URL="ui://isxx5ak7xs1r482";class Vn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component86")}onConstruct(){this.n15=this.getChild("n15"),this.t0=this.getTransition("t0")}}Vn.URL="ui://isxx5ak7xs1r483";class Wn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component87")}onConstruct(){this.n66=this.getChild("n66"),this.myProgress=this.getChild("myProgress"),this.starAni=this.getChild("starAni"),this.hpTxt=this.getChild("hpTxt"),this.n74=this.getChild("n74"),this.n73=this.getChild("n73"),this.ballTxt=this.getChild("ballTxt"),this.n76=this.getChild("n76"),this.helpLineBtn=this.getChild("helpLineBtn"),this.levelTxt=this.getChild("levelTxt"),this.star1=this.getChild("star1"),this.star2=this.getChild("star2"),this.star3=this.getChild("star3")}}Wn.URL="ui://isxx5ak7xs1r48m";class Yn extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("game","Component88")}onConstruct(){this.n68=this.getChild("n68"),this.bar=this.getChild("bar")}}Yn.URL="ui://isxx5ak7xs1r48n";class Xn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component89")}onConstruct(){this.c1=this.getController("c1"),this.n71=this.getChild("n71"),this.n72=this.getChild("n72")}}Xn.URL="ui://isxx5ak7xs1r48o";class qn extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("game","Component90")}onConstruct(){this.c1=this.getController("c1"),this.n64=this.getChild("n64"),this.n65=this.getChild("n65"),this.n66=this.getChild("n66"),this.t0=this.getTransition("t0")}}qn.URL="ui://isxx5ak7xs1r48p";class Jn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("game","Component127")}onConstruct(){this.n5=this.getChild("n5")}}Jn.URL="ui://isxx5ak7yjr4v4m6";class Kn{static bindAll(){fgui.UIObjectFactory.setExtension(bt.URL,bt),fgui.UIObjectFactory.setExtension(Me.URL,Me),fgui.UIObjectFactory.setExtension(Te.URL,Te),fgui.UIObjectFactory.setExtension(Oe.URL,Oe),fgui.UIObjectFactory.setExtension(je.URL,je),fgui.UIObjectFactory.setExtension(xt.URL,xt),fgui.UIObjectFactory.setExtension(De.URL,De),fgui.UIObjectFactory.setExtension(Re.URL,Re),fgui.UIObjectFactory.setExtension(_e.URL,_e),fgui.UIObjectFactory.setExtension(At.URL,At),fgui.UIObjectFactory.setExtension(Pe.URL,Pe),fgui.UIObjectFactory.setExtension(Kt.URL,Kt),fgui.UIObjectFactory.setExtension(Jt.URL,Jt),fgui.UIObjectFactory.setExtension(Ae.URL,Ae),fgui.UIObjectFactory.setExtension(Ee.URL,Ee),fgui.UIObjectFactory.setExtension(Ge.URL,Ge),fgui.UIObjectFactory.setExtension(Fe.URL,Fe),fgui.UIObjectFactory.setExtension(He.URL,He),fgui.UIObjectFactory.setExtension(ze.URL,ze),fgui.UIObjectFactory.setExtension(Ve.URL,Ve),fgui.UIObjectFactory.setExtension(We.URL,We),fgui.UIObjectFactory.setExtension(V.URL,V),fgui.UIObjectFactory.setExtension(Ye.URL,Ye),fgui.UIObjectFactory.setExtension(Xe.URL,Xe),fgui.UIObjectFactory.setExtension(qe.URL,qe),fgui.UIObjectFactory.setExtension(Je.URL,Je),fgui.UIObjectFactory.setExtension(Ke.URL,Ke),fgui.UIObjectFactory.setExtension(ue.URL,ue),fgui.UIObjectFactory.setExtension(Ze.URL,Ze),fgui.UIObjectFactory.setExtension($e.URL,$e),fgui.UIObjectFactory.setExtension(Qe.URL,Qe),fgui.UIObjectFactory.setExtension(ti.URL,ti),fgui.UIObjectFactory.setExtension(ei.URL,ei),fgui.UIObjectFactory.setExtension(ii.URL,ii),fgui.UIObjectFactory.setExtension(si.URL,si),fgui.UIObjectFactory.setExtension(oi.URL,oi),fgui.UIObjectFactory.setExtension(ni.URL,ni),fgui.UIObjectFactory.setExtension(ai.URL,ai),fgui.UIObjectFactory.setExtension(hi.URL,hi),fgui.UIObjectFactory.setExtension(li.URL,li),fgui.UIObjectFactory.setExtension(ri.URL,ri),fgui.UIObjectFactory.setExtension(ci.URL,ci),fgui.UIObjectFactory.setExtension(di.URL,di),fgui.UIObjectFactory.setExtension(ui.URL,ui),fgui.UIObjectFactory.setExtension(gi.URL,gi),fgui.UIObjectFactory.setExtension(mi.URL,mi),fgui.UIObjectFactory.setExtension(yi.URL,yi),fgui.UIObjectFactory.setExtension(pi.URL,pi),fgui.UIObjectFactory.setExtension(fi.URL,fi),fgui.UIObjectFactory.setExtension(xi.URL,xi),fgui.UIObjectFactory.setExtension(G.URL,G),fgui.UIObjectFactory.setExtension(Ci.URL,Ci),fgui.UIObjectFactory.setExtension(bi.URL,bi),fgui.UIObjectFactory.setExtension(Ii.URL,Ii),fgui.UIObjectFactory.setExtension(ki.URL,ki),fgui.UIObjectFactory.setExtension(wi.URL,wi),fgui.UIObjectFactory.setExtension(vi.URL,vi),fgui.UIObjectFactory.setExtension(Ni.URL,Ni),fgui.UIObjectFactory.setExtension(Dt.URL,Dt),fgui.UIObjectFactory.setExtension(Li.URL,Li),fgui.UIObjectFactory.setExtension(Si.URL,Si),fgui.UIObjectFactory.setExtension(Ui.URL,Ui),fgui.UIObjectFactory.setExtension(Bi.URL,Bi),fgui.UIObjectFactory.setExtension(Mi.URL,Mi),fgui.UIObjectFactory.setExtension(Ti.URL,Ti),fgui.UIObjectFactory.setExtension(Oi.URL,Oi),fgui.UIObjectFactory.setExtension(ji.URL,ji),fgui.UIObjectFactory.setExtension(Wt.URL,Wt),fgui.UIObjectFactory.setExtension(Di.URL,Di),fgui.UIObjectFactory.setExtension(Ri.URL,Ri),fgui.UIObjectFactory.setExtension(_i.URL,_i),fgui.UIObjectFactory.setExtension(Pi.URL,Pi),fgui.UIObjectFactory.setExtension(Ai.URL,Ai),fgui.UIObjectFactory.setExtension(ne.URL,ne),fgui.UIObjectFactory.setExtension(Ei.URL,Ei),fgui.UIObjectFactory.setExtension(Gi.URL,Gi),fgui.UIObjectFactory.setExtension(Fi.URL,Fi),fgui.UIObjectFactory.setExtension(Ie.URL,Ie),fgui.UIObjectFactory.setExtension(Hi.URL,Hi),fgui.UIObjectFactory.setExtension(zi.URL,zi),fgui.UIObjectFactory.setExtension(lt.URL,lt),fgui.UIObjectFactory.setExtension(Vi.URL,Vi),fgui.UIObjectFactory.setExtension(Wi.URL,Wi),fgui.UIObjectFactory.setExtension(Yi.URL,Yi),fgui.UIObjectFactory.setExtension(ye.URL,ye),fgui.UIObjectFactory.setExtension(Xi.URL,Xi),fgui.UIObjectFactory.setExtension(qi.URL,qi),fgui.UIObjectFactory.setExtension(Ji.URL,Ji),fgui.UIObjectFactory.setExtension(Ki.URL,Ki),fgui.UIObjectFactory.setExtension(Zi.URL,Zi),fgui.UIObjectFactory.setExtension($i.URL,$i),fgui.UIObjectFactory.setExtension(Qi.URL,Qi),fgui.UIObjectFactory.setExtension(ts.URL,ts),fgui.UIObjectFactory.setExtension(es.URL,es),fgui.UIObjectFactory.setExtension(is.URL,is),fgui.UIObjectFactory.setExtension(ss.URL,ss),fgui.UIObjectFactory.setExtension(os.URL,os),fgui.UIObjectFactory.setExtension(ns.URL,ns),fgui.UIObjectFactory.setExtension(as.URL,as),fgui.UIObjectFactory.setExtension(hs.URL,hs),fgui.UIObjectFactory.setExtension(ls.URL,ls),fgui.UIObjectFactory.setExtension(rs.URL,rs),fgui.UIObjectFactory.setExtension(cs.URL,cs),fgui.UIObjectFactory.setExtension(ds.URL,ds),fgui.UIObjectFactory.setExtension(us.URL,us),fgui.UIObjectFactory.setExtension(gs.URL,gs),fgui.UIObjectFactory.setExtension(ms.URL,ms),fgui.UIObjectFactory.setExtension(ys.URL,ys),fgui.UIObjectFactory.setExtension(ps.URL,ps),fgui.UIObjectFactory.setExtension(fs.URL,fs),fgui.UIObjectFactory.setExtension(xs.URL,xs),fgui.UIObjectFactory.setExtension(Cs.URL,Cs),fgui.UIObjectFactory.setExtension(Ht.URL,Ht),fgui.UIObjectFactory.setExtension(bs.URL,bs),fgui.UIObjectFactory.setExtension(Is.URL,Is),fgui.UIObjectFactory.setExtension(ce.URL,ce),fgui.UIObjectFactory.setExtension(ks.URL,ks),fgui.UIObjectFactory.setExtension(ws.URL,ws),fgui.UIObjectFactory.setExtension(vs.URL,vs),fgui.UIObjectFactory.setExtension(Ns.URL,Ns),fgui.UIObjectFactory.setExtension(Ls.URL,Ls),fgui.UIObjectFactory.setExtension(Ss.URL,Ss),fgui.UIObjectFactory.setExtension(Us.URL,Us),fgui.UIObjectFactory.setExtension(Bs.URL,Bs),fgui.UIObjectFactory.setExtension(Ms.URL,Ms),fgui.UIObjectFactory.setExtension(Ts.URL,Ts),fgui.UIObjectFactory.setExtension(Os.URL,Os),fgui.UIObjectFactory.setExtension(js.URL,js),fgui.UIObjectFactory.setExtension(Ds.URL,Ds),fgui.UIObjectFactory.setExtension(Rs.URL,Rs),fgui.UIObjectFactory.setExtension(_s.URL,_s),fgui.UIObjectFactory.setExtension(Ps.URL,Ps),fgui.UIObjectFactory.setExtension(As.URL,As),fgui.UIObjectFactory.setExtension(gt.URL,gt),fgui.UIObjectFactory.setExtension(ht.URL,ht),fgui.UIObjectFactory.setExtension(Es.URL,Es),fgui.UIObjectFactory.setExtension($.URL,$),fgui.UIObjectFactory.setExtension(Gs.URL,Gs),fgui.UIObjectFactory.setExtension(Fs.URL,Fs),fgui.UIObjectFactory.setExtension(Hs.URL,Hs),fgui.UIObjectFactory.setExtension(zs.URL,zs),fgui.UIObjectFactory.setExtension(Se.URL,Se),fgui.UIObjectFactory.setExtension(Vs.URL,Vs),fgui.UIObjectFactory.setExtension(Ws.URL,Ws),fgui.UIObjectFactory.setExtension(Ys.URL,Ys),fgui.UIObjectFactory.setExtension(Xs.URL,Xs),fgui.UIObjectFactory.setExtension(qs.URL,qs),fgui.UIObjectFactory.setExtension(dt.URL,dt),fgui.UIObjectFactory.setExtension(Js.URL,Js),fgui.UIObjectFactory.setExtension(Ks.URL,Ks),fgui.UIObjectFactory.setExtension(Zs.URL,Zs),fgui.UIObjectFactory.setExtension($s.URL,$s),fgui.UIObjectFactory.setExtension(Qs.URL,Qs),fgui.UIObjectFactory.setExtension(to.URL,to),fgui.UIObjectFactory.setExtension(eo.URL,eo),fgui.UIObjectFactory.setExtension(io.URL,io),fgui.UIObjectFactory.setExtension(so.URL,so),fgui.UIObjectFactory.setExtension(oo.URL,oo),fgui.UIObjectFactory.setExtension(no.URL,no),fgui.UIObjectFactory.setExtension(he.URL,he),fgui.UIObjectFactory.setExtension(ao.URL,ao),fgui.UIObjectFactory.setExtension(ho.URL,ho),fgui.UIObjectFactory.setExtension(Ut.URL,Ut),fgui.UIObjectFactory.setExtension(lo.URL,lo),fgui.UIObjectFactory.setExtension(ro.URL,ro),fgui.UIObjectFactory.setExtension(co.URL,co),fgui.UIObjectFactory.setExtension(uo.URL,uo),fgui.UIObjectFactory.setExtension(go.URL,go),fgui.UIObjectFactory.setExtension(mo.URL,mo),fgui.UIObjectFactory.setExtension(yo.URL,yo),fgui.UIObjectFactory.setExtension(po.URL,po),fgui.UIObjectFactory.setExtension(fo.URL,fo),fgui.UIObjectFactory.setExtension(xo.URL,xo),fgui.UIObjectFactory.setExtension(Co.URL,Co),fgui.UIObjectFactory.setExtension(bo.URL,bo),fgui.UIObjectFactory.setExtension(Qt.URL,Qt),fgui.UIObjectFactory.setExtension(Io.URL,Io),fgui.UIObjectFactory.setExtension(ko.URL,ko),fgui.UIObjectFactory.setExtension(X.URL,X),fgui.UIObjectFactory.setExtension(Mt.URL,Mt),fgui.UIObjectFactory.setExtension(wo.URL,wo),fgui.UIObjectFactory.setExtension(vo.URL,vo),fgui.UIObjectFactory.setExtension(No.URL,No),fgui.UIObjectFactory.setExtension(Lo.URL,Lo),fgui.UIObjectFactory.setExtension(So.URL,So),fgui.UIObjectFactory.setExtension(Uo.URL,Uo),fgui.UIObjectFactory.setExtension(Bo.URL,Bo),fgui.UIObjectFactory.setExtension(Mo.URL,Mo),fgui.UIObjectFactory.setExtension(To.URL,To),fgui.UIObjectFactory.setExtension(Oo.URL,Oo),fgui.UIObjectFactory.setExtension(jo.URL,jo),fgui.UIObjectFactory.setExtension(Do.URL,Do),fgui.UIObjectFactory.setExtension(Ro.URL,Ro),fgui.UIObjectFactory.setExtension(_o.URL,_o),fgui.UIObjectFactory.setExtension(Po.URL,Po),fgui.UIObjectFactory.setExtension(Ao.URL,Ao),fgui.UIObjectFactory.setExtension(Eo.URL,Eo),fgui.UIObjectFactory.setExtension(Go.URL,Go),fgui.UIObjectFactory.setExtension(Fo.URL,Fo),fgui.UIObjectFactory.setExtension(Ho.URL,Ho),fgui.UIObjectFactory.setExtension(Xt.URL,Xt),fgui.UIObjectFactory.setExtension(zo.URL,zo),fgui.UIObjectFactory.setExtension(Ot.URL,Ot),fgui.UIObjectFactory.setExtension(Vo.URL,Vo),fgui.UIObjectFactory.setExtension(Wo.URL,Wo),fgui.UIObjectFactory.setExtension(Yo.URL,Yo),fgui.UIObjectFactory.setExtension(Xo.URL,Xo),fgui.UIObjectFactory.setExtension(qo.URL,qo),fgui.UIObjectFactory.setExtension(it.URL,it),fgui.UIObjectFactory.setExtension(Jo.URL,Jo),fgui.UIObjectFactory.setExtension(ot.URL,ot),fgui.UIObjectFactory.setExtension(Ko.URL,Ko),fgui.UIObjectFactory.setExtension(ee.URL,ee),fgui.UIObjectFactory.setExtension(Zo.URL,Zo),fgui.UIObjectFactory.setExtension($o.URL,$o),fgui.UIObjectFactory.setExtension(Qo.URL,Qo),fgui.UIObjectFactory.setExtension(tn.URL,tn),fgui.UIObjectFactory.setExtension(en.URL,en),fgui.UIObjectFactory.setExtension(sn.URL,sn),fgui.UIObjectFactory.setExtension(on.URL,on),fgui.UIObjectFactory.setExtension(nn.URL,nn),fgui.UIObjectFactory.setExtension(an.URL,an),fgui.UIObjectFactory.setExtension(rt.URL,rt),fgui.UIObjectFactory.setExtension(hn.URL,hn),fgui.UIObjectFactory.setExtension(ln.URL,ln),fgui.UIObjectFactory.setExtension(rn.URL,rn),fgui.UIObjectFactory.setExtension(cn.URL,cn),fgui.UIObjectFactory.setExtension(dn.URL,dn),fgui.UIObjectFactory.setExtension(un.URL,un),fgui.UIObjectFactory.setExtension(gn.URL,gn),fgui.UIObjectFactory.setExtension(mn.URL,mn),fgui.UIObjectFactory.setExtension(yn.URL,yn),fgui.UIObjectFactory.setExtension(pn.URL,pn),fgui.UIObjectFactory.setExtension(fn.URL,fn),fgui.UIObjectFactory.setExtension(xn.URL,xn),fgui.UIObjectFactory.setExtension(E.URL,E),fgui.UIObjectFactory.setExtension(Cn.URL,Cn),fgui.UIObjectFactory.setExtension(bn.URL,bn),fgui.UIObjectFactory.setExtension(In.URL,In),fgui.UIObjectFactory.setExtension(kn.URL,kn),fgui.UIObjectFactory.setExtension(wn.URL,wn),fgui.UIObjectFactory.setExtension(vn.URL,vn),fgui.UIObjectFactory.setExtension(Nn.URL,Nn),fgui.UIObjectFactory.setExtension(Ln.URL,Ln),fgui.UIObjectFactory.setExtension(Sn.URL,Sn),fgui.UIObjectFactory.setExtension(Un.URL,Un),fgui.UIObjectFactory.setExtension(Bn.URL,Bn),fgui.UIObjectFactory.setExtension(Mn.URL,Mn),fgui.UIObjectFactory.setExtension(Tn.URL,Tn),fgui.UIObjectFactory.setExtension(On.URL,On),fgui.UIObjectFactory.setExtension(jn.URL,jn),fgui.UIObjectFactory.setExtension(Dn.URL,Dn),fgui.UIObjectFactory.setExtension(Rn.URL,Rn),fgui.UIObjectFactory.setExtension(_n.URL,_n),fgui.UIObjectFactory.setExtension(Pn.URL,Pn),fgui.UIObjectFactory.setExtension(An.URL,An),fgui.UIObjectFactory.setExtension(Ct.URL,Ct),fgui.UIObjectFactory.setExtension(En.URL,En),fgui.UIObjectFactory.setExtension(Gn.URL,Gn),fgui.UIObjectFactory.setExtension(Fn.URL,Fn),fgui.UIObjectFactory.setExtension(Hn.URL,Hn),fgui.UIObjectFactory.setExtension(zn.URL,zn),fgui.UIObjectFactory.setExtension(Vn.URL,Vn),fgui.UIObjectFactory.setExtension(Wn.URL,Wn),fgui.UIObjectFactory.setExtension(Yn.URL,Yn),fgui.UIObjectFactory.setExtension(Xn.URL,Xn),fgui.UIObjectFactory.setExtension(qn.URL,qn),fgui.UIObjectFactory.setExtension(Jn.URL,Jn)}}class Zn extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn6")}onConstruct(){this.n6=this.getChild("n6"),this.n1=this.getChild("n1")}}Zn.URL="ui://37nctnhwc6l6v4em";class $n extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","xyItem")}onConstruct(){this.xyItem=this.getChild("xyItem")}}$n.URL="ui://37nctnhwcpayv4el";class Qn extends fgui.GProgressBar{static createInstance(){return fgui.UIPackage.createObject("loading","loadinfo")}onConstruct(){this.bg=this.getChild("bg"),this.bar=this.getChild("bar"),this.title=this.getChild("title"),this.ani=this.getChild("ani")}}Qn.URL="ui://37nctnhwis36c";class ta extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","xyNode")}onConstruct(){this.n0=this.getChild("n0"),this.btnYes=this.getChild("btnYes"),this.btnNo=this.getChild("btnNo"),this.btnKnown=this.getChild("btnKnown"),this.btnSure=this.getChild("btnSure"),this.txtWelcom=this.getChild("txtWelcom"),this.txtXy=this.getChild("txtXy"),this.n75=this.getChild("n75"),this.btnXy1=this.getChild("btnXy1"),this.btnXy3=this.getChild("btnXy3"),this.btnXy2=this.getChild("btnXy2"),this.n74=this.getChild("n74"),this.xy1=this.getChild("xy1"),this.txtTitle=this.getChild("txtTitle"),this.btnBack=this.getChild("btnBack"),this.xyList=this.getChild("xyList"),this.xy2=this.getChild("xy2"),this.xyNode=this.getChild("xyNode")}}ta.URL="ui://37nctnhwjvenv4ee";class ea extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","ageNode")}onConstruct(){this.n3=this.getChild("n3"),this.n7=this.getChild("n7"),this.n4=this.getChild("n4"),this.btnAge=this.getChild("btnAge"),this.ageNode=this.getChild("ageNode")}}ea.URL="ui://37nctnhwjvenv4ef";class ia extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","rnNode")}onConstruct(){this.n28=this.getChild("n28"),this.n30=this.getChild("n30"),this.n33=this.getChild("n33"),this.rn1=this.getChild("rn1"),this.n40=this.getChild("n40"),this.n41=this.getChild("n41"),this.rn3=this.getChild("rn3"),this.n37=this.getChild("n37"),this.n39=this.getChild("n39"),this.rn2=this.getChild("rn2"),this.n47=this.getChild("n47"),this.n49=this.getChild("n49"),this.n44=this.getChild("n44"),this.inputCode=this.getChild("inputCode"),this.inputName=this.getChild("inputName"),this.n48=this.getChild("n48"),this.n50=this.getChild("n50"),this.rn4=this.getChild("rn4"),this.btnCheck=this.getChild("btnCheck"),this.btnExit=this.getChild("btnExit"),this.btnDone=this.getChild("btnDone"),this.rnNode=this.getChild("rnNode")}}ia.URL="ui://37nctnhwjvenv4eg";class sa extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","tipNode")}onConstruct(){this.bg=this.getChild("bg"),this.n55=this.getChild("n55"),this.n56=this.getChild("n56"),this.tipNode=this.getChild("tipNode")}}sa.URL="ui://37nctnhwjvenv4eh";class oa extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","fcmNode")}onConstruct(){this.n63=this.getChild("n63"),this.n62=this.getChild("n62"),this.btnRn=this.getChild("btnRn"),this.n61=this.getChild("n61"),this.n58=this.getChild("n58"),this.fcmNode=this.getChild("fcmNode")}}oa.URL="ui://37nctnhwjvenv4ei";class na extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","msgNode")}onConstruct(){this.n69=this.getChild("n69"),this.txtMsg=this.getChild("txtMsg"),this.msgNode=this.getChild("msgNode")}}na.URL="ui://37nctnhwjvenv4ek";class aa extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","dh_zy_ganfa")}onConstruct(){this.n1=this.getChild("n1"),this.n13=this.getChild("n13"),this.n14=this.getChild("n14"),this.n15=this.getChild("n15"),this.n3=this.getChild("n3"),this.n4=this.getChild("n4"),this.n5=this.getChild("n5"),this.n6=this.getChild("n6"),this.n7=this.getChild("n7"),this.n8=this.getChild("n8"),this.n9=this.getChild("n9"),this.n10=this.getChild("n10"),this.n12=this.getChild("n12"),this.n11=this.getChild("n11"),this.n16=this.getChild("n16"),this.n17=this.getChild("n17"),this.n18=this.getChild("n18"),this.n20=this.getChild("n20"),this.n21=this.getChild("n21"),this.t0=this.getTransition("t0")}}aa.URL="ui://37nctnhwkys71u";class ha extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn5")}onConstruct(){this.n9=this.getChild("n9"),this.n1=this.getChild("n1")}}ha.URL="ui://37nctnhwm0q7v4ed";class la extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","UILoading")}onConstruct(){this.n12=this.getChild("n12"),this.loadinfo=this.getChild("loadinfo"),this.n13=this.getChild("n13"),this.txtLoad=this.getChild("txtLoad"),this.n18=this.getChild("n18")}}la.URL="ui://37nctnhwphc33";class ra extends fgui.GComponent{static createInstance(){return fgui.UIPackage.createObject("loading","AgeItem")}onConstruct(){this.txtAge=this.getChild("txtAge")}}ra.URL="ui://37nctnhwxe622n";class ca extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn1")}onConstruct(){this.n6=this.getChild("n6"),this.n1=this.getChild("n1")}}ca.URL="ui://37nctnhwxe622p";class da extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn3")}onConstruct(){this.n9=this.getChild("n9"),this.n1=this.getChild("n1")}}da.URL="ui://37nctnhwxe622s";class ua extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn2")}onConstruct(){this.n6=this.getChild("n6"),this.n1=this.getChild("n1")}}ua.URL="ui://37nctnhwxe622t";class ga extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btnBack")}onConstruct(){this.n6=this.getChild("n6"),this.n7=this.getChild("n7")}}ga.URL="ui://37nctnhwxe622u";class ma extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btnXy1")}onConstruct(){this.n1=this.getChild("n1")}}ma.URL="ui://37nctnhwxe622w";class ya extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btnXy2")}onConstruct(){this.n1=this.getChild("n1")}}ya.URL="ui://37nctnhwxe622x";class pa extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btnXy3")}onConstruct(){this.n1=this.getChild("n1")}}pa.URL="ui://37nctnhwxe622y";class fa extends fgui.GButton{static createInstance(){return fgui.UIPackage.createObject("loading","btn4")}onConstruct(){this.n9=this.getChild("n9"),this.n1=this.getChild("n1")}}fa.URL="ui://37nctnhwxe622z";class xa{static bindAll(){fgui.UIObjectFactory.setExtension(Zn.URL,Zn),fgui.UIObjectFactory.setExtension($n.URL,$n),fgui.UIObjectFactory.setExtension(Qn.URL,Qn),fgui.UIObjectFactory.setExtension(ta.URL,ta),fgui.UIObjectFactory.setExtension(ea.URL,ea),fgui.UIObjectFactory.setExtension(ia.URL,ia),fgui.UIObjectFactory.setExtension(sa.URL,sa),fgui.UIObjectFactory.setExtension(oa.URL,oa),fgui.UIObjectFactory.setExtension(na.URL,na),fgui.UIObjectFactory.setExtension(aa.URL,aa),fgui.UIObjectFactory.setExtension(ha.URL,ha),fgui.UIObjectFactory.setExtension(la.URL,la),fgui.UIObjectFactory.setExtension(ra.URL,ra),fgui.UIObjectFactory.setExtension(ca.URL,ca),fgui.UIObjectFactory.setExtension(da.URL,da),fgui.UIObjectFactory.setExtension(ua.URL,ua),fgui.UIObjectFactory.setExtension(ga.URL,ga),fgui.UIObjectFactory.setExtension(ma.URL,ma),fgui.UIObjectFactory.setExtension(ya.URL,ya),fgui.UIObjectFactory.setExtension(pa.URL,pa),fgui.UIObjectFactory.setExtension(fa.URL,fa),fgui.UIObjectFactory.setExtension(mt.URL,mt)}}class Ca{constructor(){this._stage=null,this._uiList=[],this._showList=[],this._bindPkgList=[],this.uiIndex=0}static get inst(){return null==Ca._inst&&(Ca._inst=new Ca),Ca._inst}setStage(t){this._stage?console.log("ViewMgr::Stage->舞台不可赋值两次"):this._stage=t}clearTempData(){console.log("zh:clearTempData start"),Laya.LocalStorage.removeItem("temp_qjff_AD_for_uiGameEnd_level"),console.log("zh:clearTempData end")}init(){this.setStage(Laya.stage),fairygui.UIConfig.defaultFont="微软雅黑",fairygui.UIConfig.modalLayerColor="rgba(0,0,0,0.9)",fairygui.UIConfig.packageFileExtension="obj",fairygui.UIConfig.bringWindowToFrontOnClick=!1,Laya.stage.addChild(fairygui.GRoot.inst.displayObject),fairygui.GRoot.inst.width=Laya.stage.width,fairygui.GRoot.inst.height=Laya.stage.height,Laya.timer.frameLoop(1,this,this.addAllUpdate)}addAllUpdate(){for(this.uiIndex=0;this.uiIndex<this._uiList.length;this.uiIndex++)this._uiList[this.uiIndex]&&this._uiList[this.uiIndex].isShowing&&this._uiList[this.uiIndex].myUpdate&&this._uiList[this.uiIndex].myUpdate(.001*Laya.timer.delta)}bindFUI(t){if(!(this._bindPkgList.indexOf(t)>=0))switch(t){case e.loading:fairygui.UIPackage.addPackage(t),xa.bindAll(),this._bindPkgList.push(t);break;case e.game:fairygui.UIPackage.addPackage(t),Kn.bindAll(),this._bindPkgList.push(t)}}Show(t,...e){let i=t.uiName;for(let t=this._uiList.length-1;t>=0;t--){let s=this._uiList[t];if(s.className==i){if(!s.isMuti)return s.show(...e),this._uiList.splice(t,1),this._uiList.push(s),s;if(s.isHide)return s.show(...e),this._uiList.splice(t,1),this._uiList.push(s),s}}let s=new t;return s.className=i,this._showUI(s,e),s}destroyUI(t){for(let e=this._uiList.length-1;e>=0;e--){if(this._uiList[e].className==t.className){this._uiList.splice(e,1);break}}this.checkUIState()}_showUI(t,e){this._uiList.push(t),t.show(...e)}Hide(t){let e=this.getUI(t);e&&!e.isHide&&e.hide()}getUI(t){let e=t.uiName;for(let t=0;t<this._uiList.length;t++){let i=this._uiList[t];if(i.className==e)return i}return null}isShow(t){for(var e of this._uiList)if(e instanceof t)return e.isShowing;return!1}showUINum(){let t=0;for(var e of this._uiList)e.isShowing&&t++;return t}checkUIState(){Laya.timer.clear(this,this._uiCheck),Laya.timer.once(400,this,this._uiCheck)}_uiCheck(){let t=[];for(var e of this._uiList)e.isHide||t.push(e);for(let e=0;e<t.length;e++)e==t.length-1?t[e].checkActive(!0):t[e].checkActive(!1)}showTip(t,e=600,i=30){}}class ba{constructor(){this.soundMax=4,this.isLoad=!1,this.soundMap={},this.isSound=!0,this.openShake=!0,ba._instance=this}static getInstance(){return this._instance||(this._instance=new ba),this._instance}init(){console.log("zh:sm init 1"),Laya.SoundManager.autoReleaseSound=!0,Laya.SoundManager.autoStopMusic=!0,Laya.SoundManager.musicVolume=.3,Laya.SoundManager.soundVolume=.5,this.musicPlayed=!1,this.audioUrl="asset/sound/ogg/",console.log("zh:sm init 2"),console.log("zh:dev type "),Laya.Browser.onAndroid?(console.log("zh:dev type android"),this.audioUrl="asset/sound/ogg/",this.isLoad=!0):(console.log("zh:dev type not android"),this.audioUrl="asset/sound/mp3/",this.isLoad=!0)}onSetting(t){this.isSound=t,this.mute(!this.isSound)}clearCount(){for(var t in this.soundMap)delete this.soundMap[t]}playMusic(t,e=0){if(console.log("zh:playMusic 1 PATH="+t),this.musicPath=t,!this.isLoad)return;if(!t||""==t)return;if(!this.isSound)return;this.musicPlayed=!0;let i=this.getUrl(t);Laya.Browser.onAndroid?this.play(i,e):Laya.loader.load(i,Laya.Handler.create(this,()=>{this.play(i,e)}))}play(t,e){Laya.SoundManager.playMusic(t,e)}getUrl(t){let e=this.audioUrl+t;return Laya.Browser.onAndroid?e+=".ogg":e+=".mp3",e}pauseMusic(t){t?this.mute(!0):this.isSound&&this.mute(!1)}stopMusic(){Laya.SoundManager.stopMusic(),Moyu.isNeedPlatAudio&&Moyu.stopMusic()}mute(t){Moyu.isNeedPlatAudio?Moyu.pauseMusic(t):(Laya.SoundManager.musicMuted=t,t||this.musicPlayed||!this.musicPath||this.playMusic(this.musicPath))}stopSound(t){let e=this.getUrl(t);Laya.SoundManager.stopSound(e)}playSound(t,e=1,i=this.soundMax){if(!this.isLoad)return;if(!this.isSound)return;if(!t||""==t)return;let s=this.getUrl(t);if(Moyu.isNeedPlatAudio)Moyu.playSound(t,0==e);else{let o=1;if(this.soundMap[t]&&(o=this.soundMap[t]+1),o>i)return;this.soundMap[t]=o,Laya.SoundManager.playSound(s,e),Laya.timer.once(500*e,this,this.removePath,[t],!1)}}removePath(t){if(this.soundMap[t]){let e=this.soundMap[t];--e<1?delete this.soundMap[t]:this.soundMap[t]=e}}playBtnSound(){this.playSound("btn")}playGetSound(){}playCloseUISound(){}}ba._instance=null;var Ia,ka=Laya.Handler;!function(t){t[t.none=0]="none",t[t.nromal=1]="nromal",t[t.td=2]="td",t[t.sk=3]="sk"}(Ia||(Ia={}));class wa{constructor(t,e){this.completrCall=t,this.progressCall=e,this.progressHander=new ka(this,this.onProgress),this.tdResMap={}}load(t){this.resCount=0,this.loadCount=0;for(let e=0;e<t.length;e++){let i=t[e];if(!i)continue;this.resCount++;let s=this.getResType(i);s==Ia.nromal?this.loadNromal(i):s==Ia.td&&this.loadTd(i)}}getRes(t){let e=this.getResType(t);if(e==Ia.nromal)return Laya.loader.getRes(t);if(e==Ia.td){let e=this.tdResMap[t];return e?e.clone():null}}destroy(){this.progressHander.clear(),this.progressHander=null}clearRes(t){let e=this.getResType(t);if(e==Ia.nromal)Laya.loader.clearRes(t);else if(e==Ia.td){let e=this.tdResMap[t];e&&e.destroy(),delete this.tdResMap[t]}}getResType(t){let e=this.getExtension(t);return"sk"==e?Ia.sk:"ls"==e||"lh"==e||"lm"==e?Ia.td:Ia.nromal}getExtension(t){var e=t.lastIndexOf(".");return t.substr(e+1)}loadNromal(t){Laya.loader.load(t,Laya.Handler.create(this,e=>{e?this.onLoad():console.log("load res fail:"+t)}),this.progressHander)}loadSk(){}loadTd(t){this.tdResMap[t]?this.onLoad():Laya.Sprite3D.load(t,ka.create(this,e=>{e?(this.tdResMap[t]=e,this.onLoad()):console.log("load res fail:"+t)}))}onLoad(){this.loadCount++,this.onProgress(1),this.loadCount>=this.resCount&&this.completrCall.run()}onProgress(t){let e=(this.loadCount+t)/this.resCount;this.progressCall.runWith(e)}}var va=Laya.Handler;class Na{constructor(){this.index=0}}class La{constructor(){this.resList=[],this.doneList=[],this.resMap={},this.currentLoad=null,this.completeHandler=new va(this,this.onComplete),this.progressHandler=new va(this,this.onProgress),this.loader=new wa(this.completeHandler,this.progressHandler)}static getInstance(){return null==La._instance&&(La._instance=new La),La._instance}loadList(t,e,i){if(t.length<1)return void e.run();let s=this.getResInfo();s.resList=t,s.completeHandler=e,s.progressHandler=i,this.resList.push(s),this.startLoad()}loadFguiRes(t,e,i){Laya.loader.load(t,e,i)}loadAny(t,e,i){Laya.loader.load(t,e,i)}load(t,e,i){let s=this.resMap[t];s&&s>0?e&&e.run():this.loadList([t],e,i)}getRes(t){if(this.resMap[t])return this.loader.getRes(t);this.showLog("资源不存在:"+t)}clearList(t,e=!1){if(!t||t.length<1)return;Laya.timer.clearAll(this),Laya.timer.once(2e3,this,()=>{for(const i in t){let s=t[i];if(s)if(e)this.loader.clearRes(s),delete this.resMap[s];else{let t=this.resMap[s];t&&t>1?(t--,this.resMap[s]=t):(this.loader.clearRes(s),delete this.resMap[s])}}window.hasOwnProperty("ks")||Laya.Resource.destroyUnusedResources()})}clear3D(){for(const t in this.loader.tdResMap)this.loader.clearRes(t),this.resMap[t]&&delete this.resMap[t];window.hasOwnProperty("ks")||Laya.Resource.destroyUnusedResources()}clear(t,e=!1){this.clearList([t],e)}getResInfo(){return this.doneList.length>0?this.doneList.pop():new Na}startLoad(){this.currentLoad||(this.currentLoad=this.resList.pop(),this.currentLoad&&this.loader.load(this.currentLoad.resList))}onComplete(){if(this.currentLoad){for(const t in this.currentLoad.resList){let e=this.currentLoad.resList[t],i=this.resMap[e];i?i++:i=1,this.resMap[e]=i}this.currentLoad.completeHandler&&this.currentLoad.completeHandler.run(),this.doneList.push(this.currentLoad),this.currentLoad=null,this.startLoad()}}onProgress(t){this.currentLoad&&this.currentLoad.progressHandler&&this.currentLoad.progressHandler.runWith(t)}showLog(t,...e){console.log("[ResLoader] "+t)}}La._instance=null;let Sa=new class extends Laya.EventDispatcher{};class Ua{static show(t,e,i){if(!Laya.Box||!Laya.Label||!Laya.Button)return void console.error("UI模块未加载!请检查laya.ui.js是否引入");const s=new Laya.Box;s.alpha=0,s.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#000000AA"),Laya.stage.addChild(s),Laya.Tween.to(s,{alpha:1},200);const o=new Laya.Box;o.graphics.drawRect(0,0,400,250,"#cccccc"),o.pos((Laya.stage.width-400)/2,(Laya.stage.height-250)/2),s.addChild(o);const n=new Laya.Text;n.text=t,n.fontSize=32,n.color="#333333",n.bold=!0,n.pos(20,20),n.width=360,n.align="center",o.addChild(n);const a=new Laya.Text;a.text=e,a.fontSize=21,a.color="#555555",a.pos(20,70),a.width=360,a.wordWrap=!0,a.align="center",o.addChild(a);const h=new Laya.Box;h.pos(20,160),o.addChild(h);const l=120*i.length+30*(i.length-1);i.forEach((t,e)=>{const i=new Laya.Button;i.label=t.label,i.size(120,40),i.labelSize=22,i.pos(150*e,0),i.labelColors="#FFFFFF,#FFFFFF,#FFFFFF",i.graphics.drawRect(0,0,120,40,"#4A90E2"),i.on(Laya.Event.MOUSE_OVER,this,()=>{i.alpha=.9}),i.on(Laya.Event.MOUSE_OUT,this,()=>{i.alpha=1}),i.on(Laya.Event.CLICK,this,()=>{t.handler(),Laya.Tween.to(s,{alpha:0},200,null,Laya.Handler.create(this,()=>{s.removeSelf()}))}),h.addChild(i)}),h.x=(o.width-l)/2}}class Ba{constructor(){this.httpReqCount=4,this.httpReqOkCount=0,this.getConfigFromServer=(()=>(function(t,e,i,s){return new(i||(i=Promise))(function(o,n){function fulfilled(t){try{step(s.next(t))}catch(t){n(t)}}function rejected(t){try{step(s.throw(t))}catch(t){n(t)}}function step(t){t.done?o(t.value):new i(function(e){e(t.value)}).then(fulfilled,rejected)}step((s=s.apply(t,e||[])).next())})})(this,void 0,void 0,function*(){try{this.httpReqOkCount=0;let t=JSON.stringify({gameName:"TQ",gameUserName:"zhangSan"});console.log("zh:第1个请求");const e=yield this.sendPostAsync("getClassicCfg",t);this.classicCfg=e,this.httpReqOkCount++,console.log("zh:第2个请求");const i=yield this.sendPostAsync("getLevelCfg",t);this.levelCfg=i,this.httpReqOkCount++,console.log("zh:第3个请求");const s=yield this.sendPostAsync("getPlaceBallCfg",t);this.placeBallCfg=s,this.httpReqOkCount++,console.log("zh:第4个请求npc");const o=yield this.sendPostAsync("getNpc",t);this.npcJson=o.Data,this.httpReqOkCount++,console.log("zh:所有配置加载完成")}catch(t){console.error("请求失败:",t)}finally{this.httpReqCount>this.httpReqOkCount&&Ua.show("Prompt","Failed to load resources. Check your network and restart the game.",[{label:"Okay",handler:()=>{console.log("zh:好的知道了"),H.instance.exitAndCloseGame()}}])}})),this.sendPostAsync=((t,e)=>new Promise((i,s)=>{Ea.httpMgr.sendPost2025(t,e,e=>{try{let o=e.code;if(200==o){const t=JSON.parse(e.msg);i(t)}else console.log(`zh:res = ${JSON.stringify(e)}`),s(new Error(`Request failed with code: ${o}`))}catch(t){console.error(`error=${t}`),alert("Please check your network connection."),s(t)}finally{console.log(`zh:${t}`)}})}))}static getInstance(){return this._instance||(this._instance=new Ba),this._instance}init(){this.getConfigFromServer()}test(){let t=JSON.stringify({gameName:"TQ",gameUserName:"zhangSan"});Ea.httpMgr.sendPost2025("getClassicCfg",t,t=>{console.log("zh:1s");try{let e=t.code,i=t.data;if(200==e){const t=JSON.parse(i);this.classicCfg=t}else console.log("zh:res = "+JSON.stringify(t))}catch(t){console.log("error="+t),alert("Please check your network connection.")}finally{console.log("zh:1")}})}getUserInfoByIndex(t){return this.npcJson[t]}getRandomUserInfo(){let t=Ea.tools.random(0,this.npcJson.length);return this.npcJson[t]}getMaxBigMoveLength(){return Object.keys(this.levelCfg).length}getBigMoveLevelByIndex(t){let e=this.levelCfg;return e=e[t]}getRandomClassicLevel(){let t=this.classicCfg,e=Object.keys(t).length;return t[Ea.common.randomNum(1,e)]}getPlaceBallByLevel(t){return this.placeBallCfg[t]}getMaxPlaceBall(){return Object.keys(this.placeBallCfg).length}}class Ma{constructor(){this.pool={}}static get ins(){return this._ins||(this._ins=new Ma)}createList(t,e,i){this.pool[t]||(this.pool[t]={},this.pool[t].prefab=e,this.pool[t].list=[],this.pool[t].parent=i)}getItem(t){if(!this.pool[t])return;let e;return this.pool[t].list.length>0?e=this.pool[t].list.pop():(e=this.pool[t].prefab.clone(),this.pool[t].parent&&this.pool[t].parent.addChild(e)),e.active=!0,e}putItem(t,e){this.pool[t]&&(e.active=!1,this.pool[t].list.push(e))}}let Ta=B,Oa=Ca.inst,ja=ba.getInstance(),Da=La.getInstance(),Ra=_.getInstance(),_a=Be.getInstance(),Pa=Ba.getInstance(),Aa=Ma.ins;let Ea={context:Ta,eventMgr:Sa,resMgr:Da,uiMgr:Oa,soundMgr:ja,define:U,tools:R,httpMgr:Ra,d3TexUrl:"res/d3Res/",d3ModeUrl:"res/unityRes/",common:_a,cfgMgr:Pa,poolD3Mgr:Aa,setStageSize:function(t){t.width&&(t.width=Laya.stage.width,t.height=Laya.stage.height)},filledBg:function(t){Laya.stage.height/Laya.stage.width>16/9?(t.height=Laya.stage.height,t.width=Laya.stage.height/1334*750):(t.width=Laya.stage.width,t.height=Laya.stage.width/750*1334)},setNotch:function(t){t.height&&(t.y+=Ta.notchHeight)},showTip:function(t){Oa.Show(Yt,t)},log:function(...t){console.log(t)}};window.xGame=Ea;let Ga="tBall_";class Fa{constructor(){this.userId="",this.isAgree=!1,this.coinNum=0,this.gemNum=0,this.sound=!0,this.vibration=!0,this.currentDate=0,this.createTime=0,this.awardTime=0,this.roleId=1,this.roleList=[],this.roleAds=[],this.dressId=101,this.itemId=201,this.bigSkills=[1,1,1,1,1],this.coin=4e3,this.diamond=0,this.skillSuccessTimes=0,this.skillGuide=0,this.skillAccTimes=0,this.placeBallData=[],this.shareDiamondTimes=0,this.dailyVideoShareTimes=0,this.secretary=[1,0],this.curSecretary=0,this.ballRod=[1,0,0,0,0,1],this.curBallRod=5,this.signData=0,this.signTime=0,this.drawTimes=0,this.drawAwardTimes=0,this.dailyfreeDrawTimes=1,this.power=5,this.powerTime=0,this.challengeTimes=0,this.extraSign=0,this.classicTimes=0,this.guideHelpLine=0,this.newUser=!0,this.rootBallFoul=0,this.timeoutFoul=0,this.roleList=[1]}saveData(){let t={};for(let e in this)t[e.toString()]=this[e];Laya.LocalStorage.setItem(Ga+"userdata",JSON.stringify(t))}getData(){let t=Laya.LocalStorage.getItem(Ga+"userdata");if(t){let e=JSON.parse(t);if(e)for(let t in this){let i=e[t.toString()];null!=i&&(this[t]=i)}}}}class Ha{constructor(){this.itemList={},this.itemList[101]={id:101,count:1,adnum:0,active:!0},this.itemList[201]={id:201,count:1,adnum:0,active:!0}}saveData(){Laya.LocalStorage.setItem(Ga+"itemdata",JSON.stringify(this.itemList))}getData(){let t=Laya.LocalStorage.getItem(Ga+"itemdata");if(t){let e=JSON.parse(t);e&&(this.itemList=e)}}}class za{constructor(){this.curLevel=0,this.gameType=1,this.signIdx=0,this.signMax=0,this.rotaryTime=0,this.rotaryCount=0,this.rotaryList=[],this.diyCount=3,this.awardIdx=0,this.shareNum=2,this.rankWeek=0,this.rankScore=0,this.gameCount=0,this.trySkill=-1,this.tryTime=0}saveData(){let t={};for(let e in this)t[e.toString()]=this[e];Laya.LocalStorage.setItem(Ga+"gamedata",JSON.stringify(t))}getData(){let t=Laya.LocalStorage.getItem(Ga+"gamedata");if(t){let e=JSON.parse(t);if(e)for(let t in this){let i=e[t.toString()];null!=i&&(this[t]=i)}}}}class Va{constructor(){this.challengeMode_overLev=0,this.xszyForClassic=!1,this.xszyForChallenge=!1}saveData(){let t={};for(let e in this)t[e.toString()]=this[e];Laya.LocalStorage.setItem(Ga+"diydata",JSON.stringify(t))}getData(){let t=Laya.LocalStorage.getItem(Ga+"diydata");if(t){let e=JSON.parse(t);if(e)for(let t in this){let i=e[t.toString()];null!=i&&(this[t]=i)}}}}class Wa{static Init(){this.userData=new Fa,this.gameData=new za,this.itemData=new Ha,this.diyGameData=new Va,this.userData.getData(),this.gameData.getData(),this.itemData.getData(),this.diyGameData.getData(),this.roleId=this.userData.roleId,this.resetUse()}static isNewDay(){Moyu.isNewDay(this,t=>{Ea.common.isNewDay=t,t&&(Wa.setShareDiamondTimes(0,!1),Wa.setDailyVideoShareTimes(0,!1),Wa.setDailyfreeDrawTimes(1),Wa.setExtraSign(0))})}static deletData(){Laya.LocalStorage.clear()}static upRankData(){let t=Ea.common.getAllStarNum();t>0&&Moyu.upRankData(Ea.common.curRankID,t)}static addItem(t,e=1){let i=this.itemData.itemList[t];i?i.active?i.count+=e:(i.count=e,i.active=!0):i={id:t,count:e,adnum:0,active:!0},this.itemData.itemList[t]=i,Ea.soundMgr.playGetSound(),this.saveItemData()}static hasItem(t){let e=this.itemData.itemList[t];return!(!e||!e.active)}static getItem(t){return this.itemData.itemList[t]}static getItemCount(t){let e=this.itemData.itemList[t];return e&&e.active?e.count:0}static getItemAd(t){let e=this.itemData.itemList[t];return e?e.adnum:0}static onItemAd(t,e=1){let i=this.itemData.itemList[t];i?i.adnum+=e:i={id:t,count:1,adnum:e,active:!1},this.itemData.itemList[t]=i,this.saveItemData()}static costItem(t,e){let i=this.itemData.itemList[t];return!(!i||!i.active)&&(!(i.count<e)&&(i.count-=e,this.itemData.itemList[t]=i,!0))}static resetUse(){this.dressId=this.userData.dressId,this.itemId=this.userData.itemId}static passLevel(){this.curLevel==this.gameData.curLevel&&this.curLevel<=this.maxLevel&&this.gameData.curLevel++,this.curLevel=this.gameData.curLevel,this.saveGameData()}static useRole(t){this.roleId=t,this.hasRole(t)&&(this.userData.roleId=t,this.saveUserData())}static addRole(t){this.hasRole(t)||(this.userData.roleList.push(t),this.saveUserData())}static hasRole(t){return this.userData.roleList.indexOf(t)>=0}static gemEnough(t){return this.userData.gemNum>=t}static roleHasAd(t){let e=this.userData.roleAds[t];return null!=e&&e>=0}static saveUserData(t=500,e,i){this.userSaving||(this.userSaving=!0,Laya.timer.once(t,this,()=>{this.userSaving=!1,this.userData.saveData(),e&&Ea.eventMgr.event(e,i)}))}static saveGameData(){this.gameSaving||(this.gameSaving=!0,Laya.timer.once(1e3,this,()=>{this.gameSaving=!1,this.gameData.saveData()}))}static saveItemData(){let t=()=>{this.itemData.saveData()};Laya.timer.clear(this,t),Laya.timer.once(500,this,t)}static saveData(){this.saveUserData(),this.saveGameData()}static getBigSkillList(){return this.userData.bigSkills}static getBigSkillByIndex(t){return this.userData.bigSkills[t]}static setBigSkill(t,e,i=!0){i?this.userData.bigSkills[t]+=e:this.userData.bigSkills[t]=e,this.saveUserData()}static coinEnough(t){if("number"==typeof t)return this.userData.coin>=t;console.error("金币格式错误")}static setCoin(t){"number"==typeof t&&(this.userData.coin+=t,this.saveUserData(),Ea.eventMgr.event(c))}static getCoin(){return this.userData.coin}static diamondEnough(t){if("number"==typeof t)return this.userData.diamond>=t;console.error("金币格式错误")}static setDiamond(t){"number"==typeof t&&(this.userData.diamond+=t,this.saveUserData(),Ea.eventMgr.event(d))}static getDiamond(){return this.userData.diamond}static getSkillSuccessTimes(){return this.userData.skillSuccessTimes}static setSkillSuccessTimes(t,e=!0){e?this.userData.skillSuccessTimes+=t:this.userData.skillSuccessTimes=t,this.saveUserData()}static getSkillAccTimes(){return this.userData.skillAccTimes}static setSkillAccTimes(t){this.userData.skillAccTimes+=t,this.saveUserData()}static getSkillGuide(){return Ea.common.openGuide?this.userData.skillGuide:1}static setSkillGuide(t){this.userData.skillGuide=t,this.saveUserData()}static getPlaceBallLevelList(){return this.userData.placeBallData}static getPlaceBallLevel(t){let e,i=this.userData.placeBallData,s=t-1;if(i[s])e=i[s];else{e=i.length==s?{star:0,play:!0,isCur:!0,getAward:!1}:{star:0,play:!1,getAward:!1}}return e}static setPlaceBallLevel(t,e){let i=this.userData.placeBallData,s=t-1;if(i[s])i[s].star=Math.max(i[s].star,e);else{i.length==s?i.push({star:e,play:!0,getAward:!1}):console.error("关卡存储出错")}this.saveUserData()}static setPlaceBallAward(t){let e=this.userData.placeBallData,i=t-1;e[i]&&(e[i].getAward=!0),this.saveUserData()}static getShareDiamondTimes(){return this.userData.shareDiamondTimes}static setShareDiamondTimes(t,e=!0){e?this.userData.shareDiamondTimes+=t:this.userData.shareDiamondTimes=t,this.saveUserData()}static getDailyVideoShareTimes(){return this.userData.dailyVideoShareTimes}static setDailyVideoShareTimes(t,e=!0){e?this.userData.dailyVideoShareTimes+=t:this.userData.dailyVideoShareTimes=t,this.saveUserData()}static getSecretary(t){return this.userData.secretary[t]}static setSecretary(t,e){this.userData.secretary[t]=e,this.saveUserData()}static getCurSecretary(){return this.userData.curSecretary}static setCurSecretary(t){this.userData.curSecretary=t,this.saveUserData(),Ea.eventMgr.event(m,t)}static getBallRod(t){return this.userData.ballRod[t]}static setBallRod(t,e){this.userData.ballRod[t]=e,this.saveUserData()}static getCurBallRod(){return this.userData.curBallRod}static setCurBallRod(t){this.userData.curBallRod=t,this.saveUserData()}static setSignData(t){this.userData.signData=t,this.saveUserData()}static getSignData(){return this.userData.signData}static setSignTime(t){this.userData.signTime=t,this.saveUserData()}static getSignTime(){return this.userData.signTime}static getDrawTimes(){return this.userData.drawTimes}static setDrawTimes(t,e=!0){e?this.userData.drawTimes+=t:this.userData.drawTimes=t,this.saveUserData()}static getDrawAwardTimes(){return this.userData.drawAwardTimes}static setDrawAwardTimes(t){this.userData.drawAwardTimes=t,this.saveUserData()}static getDailyfreeDrawTimes(){return this.userData.dailyfreeDrawTimes}static setDailyfreeDrawTimes(t){this.userData.dailyfreeDrawTimes=t,this.saveUserData()}static setPower(t,e=!0){e?this.userData.power+=t:this.userData.power=t,this.userData.power>=Ea.common.maxPower&&(this.userData.power=Ea.common.maxPower),Ea.eventMgr.event(y,t),this.saveUserData()}static getPower(){return this.userData.power}static setPowerTime(t){this.userData.powerTime=t,this.saveUserData()}static getPowerTime(){return this.userData.powerTime}static powerEnough(){return this.getPower()>0}static getChallengeTimes(){return this.userData.challengeTimes}static setChallengeTimes(t){this.userData.challengeTimes+=t,this.saveUserData()}static getExtraSign(){return this.userData.extraSign}static setExtraSign(t){this.userData.extraSign=t,this.saveUserData()}static getClassicTimes(){return this.userData.classicTimes}static setClassicTimes(){this.userData.classicTimes+=1,this.saveUserData()}static getGuideHelpLine(){return this.userData.guideHelpLine}static setGuideHelpLine(){this.userData.guideHelpLine=1,this.saveUserData()}static getNewUser(){return this.userData.newUser}static setNewUser(){this.userData.newUser=!1,this.saveUserData()}static getRootBallFoul(){return this.userData.rootBallFoul}static setRootBallFoul(){this.userData.rootBallFoul=1,this.saveUserData()}static getTimeoutFoul(){return this.userData.timeoutFoul}static setTimeoutFoul(){this.userData.timeoutFoul=1,this.saveUserData()}static saveDiyGameData(){this.diyGameSaving||(this.diyGameSaving=!0,Laya.timer.once(500,this,()=>{this.diyGameSaving=!1,this.diyGameData.saveData()}))}static getChallengeMode_overLev(){return this.challengeMode_overLev=this.diyGameData.challengeMode_overLev,this.challengeMode_overLev}static setChallengeMode_overLev(t){this.diyGameData.challengeMode_overLev=t,this.saveDiyGameData()}}Wa.isNewUser=!1,Wa.fristEnter=!0,Wa.levelType=0,Wa.DIY_challengeMode_overLev_jieSuo_mark=!0,Wa.DIY_challengeMode_overLev_jieSuo_Classic=2,Wa.DIY_challengeMode_overLev_jieSuo_rodMethod=4,Wa.challengeMode_overLev=0,Wa.xszyForClassic=!1,Wa.xszyForChallenge=!1,Wa.awardId=0,Wa.awardCoin=0,Wa.sceneId=-1,Wa.tryId=0,Wa.curLevel=1,Wa.vipLevel=0,Wa.maxLevel=0,Wa.awardRatio=1,Wa.gameList=[],Wa.rankList=[],Wa.recoverTime=48e4,Wa.minScore=0,Wa.rankDis=0,Wa.userSaving=!1,Wa.gameSaving=!1,Wa.diyGameSaving=!1;class Ya extends Laya.Script3D{constructor(){super(),this.isInited=!1}init(){this.isInited||(this.isInited=!0,this.gameObj=this.owner,this.transform=this.gameObj.transform)}get rotX(){return this.transform.localRotationEulerX}set rotX(t){this.transform.localRotationEulerX=t}get rotY(){return this.transform.localRotationEulerY}set rotY(t){this.transform.localRotationEulerY=t}get rotZ(){return this.transform.localRotationEulerZ}set rotZ(t){this.transform.localRotationEulerZ=t}get posX(){return this.transform.localPositionX}set posX(t){this.transform.localPositionX=t}get posY(){return this.transform.localPositionY}set posY(t){this.transform.localPositionY=t}get posZ(){return this.transform.localPositionZ}set posZ(t){this.transform.localPositionZ=t}get rotation(){return this.transform.localRotation}set rotation(t){this.transform.localRotation=t}}class Xa extends Laya.Script{constructor(){super()}onTriggerEnter(t){if((!Ea.common.d2World.rootBall.forceRun||t.owner!=Ea.common.d2World.rootBall.owner)&&"inner"==t.label&&Ea.common.d2World.openCheckStill){if(t.owner.mySrc.isRunSkillAni)return;0!=t.owner.mySrc.number&&Ea.common.d2World.inHolesSpeed.push(t.owner.mySrc.rigy.speed),Ea.common.ballColliHole(t),Ea.common.recoverCameraView()}}}class qa extends Laya.Script3D{constructor(){super(),this.isSetBorder=!1,this.inited=!1}onAwake(){this.init()}init(){this.inited||(this.inited=!0,this.gameObj=this.owner,this.border=this.gameObj.getChildByName("border"))}setBorderPos(){if(this.isSetBorder)return;this.isSetBorder=!0;let t=Ea.common.gameUI.ui,e=this.border.getChildByName("bar1"),i=this.border.getChildByName("bar2"),s=this.border.getChildByName("bar3"),o=this.border.getChildByName("bar4"),n=this.border.getChildByName("bar5"),a=this.border.getChildByName("bar6");this.setInfo(e,t.border.bar1,"box"),this.setInfo(i,t.border.bar2,"box"),this.setInfo(s,t.border.bar3,"box"),this.setInfo(o,t.border.bar4,"box"),this.setInfo(n,t.border.bar5,"box"),this.setInfo(a,t.border.bar6,"box");let h=this.border.getChildByName("circle1"),l=this.border.getChildByName("circle2"),r=this.border.getChildByName("circle3"),c=this.border.getChildByName("circle4"),d=this.border.getChildByName("circle5"),u=this.border.getChildByName("circle6");this.setInfo(h,t.border.circle1,"circle"),this.setInfo(l,t.border.circle2,"circle"),this.setInfo(r,t.border.circle3,"circle"),this.setInfo(c,t.border.circle4,"circle"),this.setInfo(d,t.border.circle5,"circle"),this.setInfo(u,t.border.circle6,"circle"),this.initHolePos(t.border.circle1.x,t.border.circle1.y),this.initHolePos(t.border.circle2.x,t.border.circle2.y),this.initHolePos(t.border.circle3.x,t.border.circle3.y),this.initHolePos(t.border.circle4.x,t.border.circle4.y),this.initHolePos(t.border.circle5.x,t.border.circle5.y),this.initHolePos(t.border.circle6.x,t.border.circle6.y);let g=Ea.common.gameMgr.holePosList;Ea.common.gameMgr.posObj={1:g[0],3:g[2],4:g[3],6:g[5]}}initHolePos(t,e){t<300?t+=25:t>1e3?t-=25:e>200?e-=10:e+=10,e<200?e+=30:e>500&&(e-=30),Ea.common.gameMgr.holePosList.push({x:t,y:e})}setInfo(t,e,i){let s=Ea.common.gameUI.ui,o=new Laya.Sprite;s.border.displayObject.addChild(o);let n=Ea.common.getCollider(i);o.addComponentIntance(n);let a=Ea.common.getRigbody();a.type="static",o.addComponentIntance(a);let h=t.transform.position;Ea.common.pos3to2Convert(h);let l=t.transform.localScaleX,r=t.transform.localScaleZ,c=Ea.common.scale3to2Convert(r),d=Ea.common.scale3to2Convert(l);o.pivotX=c/2,o.pivotY=d/2,o.x=h.x,o.y=h.y,o.width=c,o.height=d,e.x=h.x,e.y=h.y,e.width=c,e.height=d,"box"==i?(n.width=c,n.height=d,n.isSensor=!1,n.label="border"):(n.radius=c/2,n.isSensor=!0,n.label="hole",o.addComponent(Xa))}}class Ja extends Laya.Script3D{constructor(){super(),this.loadNum=0,this.setLoadNum=7,this.visitRootObj={posX:0,posY:0,posZ:0,rotX:0,rotY:0,rotZ:0}}onAwake(){}loadScene(){this.scene=this.owner;Laya.loader.create("res/unityRes/root.lh",Laya.Handler.create(this,t=>{this.scene.addChild(t),this.camera=this.scene.getChildByName("root").getChildByName("cameraRoot").getChildByName("mainCamera"),this.putCameraInfo(),this.camera.enableHDR=!1,this.ballRoot=this.scene.getChildByName("root").getChildByName("ballRoot"),this.tableRoot=this.scene.getChildByName("root").getChildByName("tableRoot"),this.roomRoot=this.scene.getChildByName("root").getChildByName("roomRoot"),this.particialRoot=this.scene.getChildByName("root").getChildByName("particialRoot"),this.knifeRoot=this.scene.getChildByName("root").getChildByName("knifeRoot"),this.knife=this.scene.getChildByName("root").getChildByName("knife"),this.knife.active=!1,this.loadD3Obj()}))}putCameraInfo(){let t=this.scene.getChildByName("root").getChildByName("cameraRoot");this.cameraObj=new Ka,this.cameraObj.angle1=t.getChildByName("angle1").addComponent(Ya),this.cameraObj.angle3=t.getChildByName("angle3").addComponent(Ya),this.cameraObj.angle4=t.getChildByName("angle4").addComponent(Ya),this.cameraObj.angle6=t.getChildByName("angle6").addComponent(Ya),this.cameraObj.firstAngle=t.getChildByName("firstAngle").addComponent(Ya),this.cameraObj.visitAngle=t.getChildByName("visitAngle").addComponent(Ya),this.visitAngleChild=t.getChildByName("visitAngle").getChildByName("visitAngle").addComponent(Ya),this.visitAngleChild.init(),this.visitRootObj.posX=this.visitAngleChild.posX,this.visitRootObj.posY=this.visitAngleChild.posY,this.visitRootObj.posZ=this.visitAngleChild.posZ,this.visitRootObj.rotX=this.visitAngleChild.rotX,this.visitRootObj.rotY=this.visitAngleChild.rotY,this.visitRootObj.rotZ=this.visitAngleChild.rotZ,this.cameraObj.mainCamera=t.getChildByName("mainCamera").addComponent(Ya),Ea.common.showOneCamera("mainCamera")}loadD3Obj(){this.loadTable(),this.loadRoom(),this.loadInHoleParticial(),this.loadIceParticial(),this.loadHitParticial(),this.loadFireworksParticial(),this.loadBall()}loadInHoleParticial(){this.loadD3Res("inHoleEft","",t=>{t.addComponent(K),Ea.poolD3Mgr.createList(x.inHoleEft,t,this.particialRoot)})}loadIceParticial(){this.loadD3Res("iceEft","",t=>{t.addComponent(K),Ea.poolD3Mgr.createList(x.iceEft,t,this.particialRoot)})}loadHitParticial(){this.loadD3Res("hitEft","",t=>{t.addComponent(K),Ea.poolD3Mgr.createList(x.hitEft,t,this.particialRoot)})}loadFireworksParticial(){this.loadD3Res("fireworksEft","",t=>{t.addComponent(K),Ea.poolD3Mgr.createList(x.fireworksEft,t,this.particialRoot)})}loadBall(t=1){this.loadD3Res("ball",t,t=>{this.ballPrefab=t,this.ballPrefab.addComponent(Z),Ea.poolD3Mgr.createList(x.d3ball,this.ballPrefab,this.ballRoot)})}loadTable(t=1){this.loadD3Res("table",t,t=>{this.tableSrc=t.addComponent(qa),this.d3Hand=t.getChildByName("hand").addComponent(Ya),this.d3Hand.init(),this.tableRoot.addChild(t)})}loadRoom(t=1){this.loadD3Res("room",t,t=>{this.roomRoot.addChild(t)})}loadD3Res(t,e,i){let s=`res/unityRes/${t}${e}.lh`;Laya.Sprite3D.load(s,Laya.Handler.create(this,t=>{i&&i(t),this.checkResLoad()}))}checkResLoad(){this.loadNum++,this.loadNum>=this.setLoadNum&&Ea.eventMgr.event(a)}prePlayEft(){let t=Ea.poolD3Mgr.getItem(x.inHoleEft);t.transform.localPositionX=0,t.transform.localPositionY=-5,t.transform.localPositionZ=0,t.active=!0;let e=Ea.poolD3Mgr.getItem(x.iceEft);e.transform.localPositionX=0,e.transform.localPositionY=-5,e.transform.localPositionZ=0,e.active=!0;let i=Ea.poolD3Mgr.getItem(x.hitEft);i.transform.localPositionX=0,i.transform.localPositionY=-5,i.transform.localPositionZ=0,i.active=!0;let s=Ea.poolD3Mgr.getItem(x.fireworksEft);s.transform.localPositionX=0,s.transform.localPositionY=-5,s.transform.localPositionZ=0,s.active=!0}}class Ka{}class Za{static initMoyu(){this.moyuView=new $a,Laya.stage.addChild(this.moyuView.ui.displayObject),this.moyuView.ui.x=(Laya.stage.width-1334)/2,this.moyuView.ui.displayObject.zOrder=1e3,this.moyuView.init(),this.moyuView.showTip(!0),this.moyuView.showAge(!0,0,Laya.stage.height-320),window.XApk=this}static showAge(t){this.moyuView&&this.moyuView.showAge(t)}static onPlatMsg(t){Za.moyuView&&"0"==t&&Za.moyuView.showTip(!1)}static showAgree(t){this.moyuView?this.moyuView.showAgree(t):t&&t()}static showXy(t=1){this.moyuView&&this.moyuView.showXy(t)}}Za.isAdvise=!1;class $a{constructor(){this.ysxyNum=1,this.ysJson=null,this.ui=mt.createInstance()}init(){this.ui.mainBg.visible=!1,this.ui.xyNode.visible=!1,this.ui.ageNode.visible=!1,this.ui.tipNode.visible=!1,this.ui.rnNode.visible=!1,this.ui.fcmNode.visible=!1,this.ui.ageTip.visible=!1,this.ui.msgNode.visible=!1,this.ui.visible=!1,this.ui.xyNode.xyList.setVirtual(),this.ui.xyNode.xyList.itemRenderer=Laya.Handler.create(this,this.renderListItem,null,!1),this.ui.ageNode.btnAge.onClick(this,this.onClick,[this.ui.ageNode.btnAge]),this.ui.tipNode.onClick(this,this.onClick,[this.ui.tipNode]),this.ui.ageTip.onClick(this,this.onClick,[this.ui.ageTip]),this.ui.xyNode.btnKnown.visible=!1,this.ui.xyNode.xy1.visible=!1,this.ui.xyNode.xy2.visible=!1,this.ui.xyNode.btnXy1.visible=this.ui.xyNode.btnXy2.visible=!1,this.ui.xyNode.btnSure.visible=this.ui.xyNode.btnXy3.visible=!1,this.ui.xyNode.btnXy1.onClick(this,this.onClick,[this.ui.xyNode.btnXy1]),this.ui.xyNode.btnXy2.onClick(this,this.onClick,[this.ui.xyNode.btnXy2]),this.ui.xyNode.btnXy3.onClick(this,this.onClick,[this.ui.xyNode.btnXy3]),this.ui.xyNode.btnNo.onClick(this,this.onClick,[this.ui.xyNode.btnNo]),this.ui.xyNode.btnYes.onClick(this,this.onClick,[this.ui.xyNode.btnYes]),this.ui.xyNode.btnSure.onClick(this,this.onClick,[this.ui.xyNode.btnSure]),this.ui.xyNode.btnBack.onClick(this,this.onClick,[this.ui.xyNode.btnBack]),this.ui.xyNode.btnKnown.onClick(this,this.onClick,[this.ui.xyNode.btnKnown]),this.ui.rnNode.btnExit.onClick(this,this.onClick,[this.ui.rnNode.btnExit]),this.ui.rnNode.btnCheck.onClick(this,this.onClick,[this.ui.rnNode.btnCheck]),this.ui.rnNode.btnDone.onClick(this,this.onClick,[this.ui.rnNode.btnDone]),this.ui.fcmNode.btnRn.onClick(this,this.onClick,[this.ui.fcmNode.btnRn]),(Moyu.isVVApk||Moyu.isOPApk||Moyu.isTTApk||Moyu.isOppo||Moyu.isVivo)&&(this.ysxyNum=2)}onClick(t){switch(Ea.soundMgr.playSound(Ea.common.btnClickStr),t){case this.ui.ageTip:Moyu.isTTApk&&(this.ui.ageNode.visible=!0,this.ui.mainBg.visible=!0);break;case this.ui.tipNode:this.showTip(!1);break;case this.ui.ageNode.btnAge:this.ui.ageNode.visible=!1,this.ui.mainBg.visible=!1,this.ui.xyNode.visible||this.ui.rnNode.visible||(this.ui.visible=!1);break;case this.ui.xyNode.btnXy3:case this.ui.xyNode.btnXy1:this.loadXy(1);break;case this.ui.xyNode.btnXy2:this.loadXy(2);break;case this.ui.xyNode.btnBack:this.ui.xyNode.xy1.visible=!0,this.ui.xyNode.xy2.visible=!1;break;case this.ui.xyNode.btnKnown:this.ui.xyNode.visible=!1,this.ui.mainBg.visible=!1,this.ui.visible=!1;break;case this.ui.rnNode.btnCheck:this.check();break;case this.ui.rnNode.btnExit:case this.ui.xyNode.btnNo:this.ysxyNum--,this.ysxyNum>0?this.showMsg("Refuse to quit the game once again"):(Moyu.userAgree(!1),Moyu.exit());break;case this.ui.xyNode.btnSure:case this.ui.xyNode.btnYes:Wa.userData.isAgree=!0,Wa.saveUserData(),this.onAgree();break;case this.ui.rnNode.btnDone:this.ui.rnNode.visible=!1,this.ui.visible=!1;break;case this.ui.fcmNode.btnRn:this.showRn()}}showTip(t){(Moyu.isVVApk||Moyu.isOPApk)&&(t?(Za.isAdvise=!0,this.ui.visible=!0,this.ui.tipNode.visible=!0,this.ui.tipNode.alpha=1,Laya.timer.once(1e3,this,this.showTip,[!1])):(this.ui.tipNode.alpha=1,this.ui.tipNode.visible=!0,Laya.Tween.to(this.ui.tipNode,{alpha:0},500,null,Laya.Handler.create(this.ui,()=>{this.ui.tipNode.visible=!1,Za.isAdvise=!1}),1e3)))}showAge(t,e=0,i=0){Moyu.platType>10&&!Moyu.isIos&&(this.ui.ageTip.x=e,this.ui.ageTip.y=i,this.ui.ageTip.visible=t,t&&(this.ui.visible=!0))}showAgree(t){this.agreeCall=t,this.onAgree()}onAgree(){this.ui.ageNode.visible||(this.ui.visible=!1),this.ui.xyNode.visible=!1,Moyu.userAgree(!0),this.showAge(!1),this.agreeCall&&this.agreeCall(),this.showRn()}showMsg(t){this.ui.msgNode.txtMsg.text=t,this.ui.msgNode.visible=!0,this.ui.msgNode.alpha=1,this.ui.visible=!0,Laya.Tween.to(this.ui.msgNode,{alpha:0},600,null,Laya.Handler.create(this.ui,()=>{this.ui.msgNode.visible=!1}),2500,!0)}showRn(){if((Moyu.isTTApk||Moyu.isPlat(MoyuPlat.hhw))&&(!Moyu.isRealName||Moyu.gameTime<999))return this.ui.rnNode.rn1.visible=!0,this.ui.rnNode.rn2.visible=!1,this.ui.rnNode.rn3.visible=!1,this.ui.rnNode.rn4.visible=!1,this.ui.rnNode.visible=!0,this.ui.mainBg.visible=!0,this.ui.rnNode.btnDone.visible=!1,this.ui.rnNode.btnExit.visible=!0,this.ui.rnNode.btnCheck.visible=!0,this.ui.fcmNode.visible=!1,void(this.ui.visible=!0);this.showFcm()}showFcm(){(Moyu.isTTApk||Moyu.isPlat(MoyuPlat.hhw))&&(Moyu.initFCM(!0),Moyu.gameTime<1?this.fcmLoop():Moyu.gameTime<999&&Laya.timer.loop(1e4,this.ui,this.fcmLoop))}fcmLoop(){Moyu.gameTime<1&&(this.ui.rnNode.visible=!1,this.ui.fcmNode.visible=!0,this.ui.mainBg.visible=!0,this.ui.visible=!0,this.ui.fcmNode.btnRn.visible=!Moyu.isLegal,Laya.timer.clear(this.ui,this.fcmLoop))}check(){if(this.ui.rnNode.rn2.visible||this.ui.rnNode.rn1.visible)this.ui.rnNode.rn1.visible=!1,this.ui.rnNode.rn2.visible=!1,this.ui.rnNode.rn4.visible=!0;else if(this.ui.rnNode.rn4.visible){let t=this.ui.rnNode.inputName.text,e=this.ui.rnNode.inputCode.text;e&&18==e.length?(this.ui.rnNode.rn1.visible=!1,this.ui.rnNode.rn4.visible=!1,Moyu.authenticate(t,e,t=>{this.ui.rnNode.rn2.visible=!t,this.ui.rnNode.rn3.visible=t,this.ui.rnNode.btnDone.visible=t,this.ui.rnNode.btnExit.visible=!t,this.ui.rnNode.btnCheck.visible=!t,t&&this.showFcm()})):this.showMsg("信息填写不完整")}}loadXy(t=0){this.ui.xyNode.xy1.visible=!1,this.ui.xyNode.xy2.visible=!0,this.ui.xyNode.xyList.scrollToView(0),1==t?Laya.loader.load("app/xy/yiiwan_ys.json",Laya.Handler.create(this,this.createXY)):2==t&&Laya.loader.load("app/xy/yiiwan_yh.json",Laya.Handler.create(this,this.createXY))}showXy(t=0){this.xyBtn(),0==t?Moyu.isPlat(MoyuPlat.f399Apk)?this.ui.xyNode.btnSure.visible=!0:(this.ui.xyNode.btnYes.visible=!0,this.ui.xyNode.btnNo.visible=!0):(this.ui.xyNode.btnKnown.visible=!0,this.ui.mainBg.visible=!0),this.ui.xyNode.xy1.visible=!0,this.ui.xyNode.xy2.visible=!1,this.ui.xyNode.visible=!0,this.ui.visible=!0}xyBtn(){this.ui.xyNode.btnSure.visible=!1,this.ui.xyNode.btnYes.visible=!1,this.ui.xyNode.btnNo.visible=!1,this.ui.xyNode.btnKnown.visible=!1,this.ui.xyNode.btnXy3.visible=!1,this.ui.xyNode.btnXy2.visible=!0,this.ui.xyNode.btnXy1.visible=!0,this.ui.xyNode.xy1.text="Welcome to《8Ball Fury》"}createXY(t){this.ysJson=t.content,this.ui.xyNode.txtTitle.text=t.title.replace("GAMENAME","8Ball Fury"),this.ui.xyNode.xyList.numItems=this.ysJson.length,this.ui.xyNode.xy2.visible=!0}renderListItem(t,e){let i=this.ysJson[t];e.height=30*i.line,e.xyItem.text=i.text}onDestroy(){this.agreeCall=null}}class Qa extends A{constructor(){super(),this.accTime=0,this.curNum=0,this.rate=1,this.loadSubOk=!1,this.loadResOK=!1,this.openLoading=!0,this.beginLoadRes=!1,this.finishD2=!1,this.finishD3=!1}onConstructor(){this.ui=la.createInstance(),this.contentPane=this.ui,this.isEject=!1,this._initUI(),this._addEvent()}_initUI(){Za.initMoyu()}_addEvent(){Ea.eventMgr.off(a,this,this.d3ResFinish),Ea.eventMgr.on(a,this,this.d3ResFinish)}show(){super.show(),console.log("zh:加载分包资源"),function(t){var e=["asset","res","spine"];let i=0;for(var s=0;s<e.length;s++){let o=e[s];Moyu.loadSubRes(o,e=>{t&&t(e,!1)}).then(()=>{++i>=e.length&&t&&t(1,!0)})}}(this.subResProgress.bind(this)),this.ui.txtLoad.text="Loading..."}subResProgress(t,e){this.curNum=t,e&&(this.curNum=1,this.loadSubOk=!0)}laodD3Res(){let t=new Laya.Scene3D;Ea.common.d3Scene=t,Ea.common.d3World=t.addComponent(Ja),Ea.common.d3World.loadScene()}loadD2Res(){Laya.loader.load([{url:"asset/fgui/game.obj",type:Laya.Loader.BUFFER},{url:"asset/fgui/game_atlas0.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas0_1.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas0_2.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas0_3.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas10.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_n43d3v3.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_n43d3v4.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_p4tr427.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_p4tr42b.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_p4tr42c.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_p4tr42e.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_rz5r457.jpg",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_s8sz44t.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_s8sz44v.png",type:Laya.Loader.IMAGE},{url:"asset/fgui/game_atlas_wehi3uc.jpg",type:Laya.Loader.IMAGE},{url:"res/font/arial.ttf",type:Laya.Loader.FONT}],Laya.Handler.create(this,()=>{this.finishD2=!0,this.checkLoadAll(),this.curNum=1}),Laya.Handler.create(this,t=>{this.curNum=t},null,!1))}d3ResFinish(){this.finishD3=!0,this.checkLoadAll()}checkLoadAll(){this.finishD2&&this.finishD3&&(this.loadResOK=!0)}loadRes(){this.laodD3Res(),this.loadD2Res()}myUpdate(t){this.openLoading&&(this.accTime+=t*this.rate,this.accTime>=this.curNum&&(this.accTime=this.curNum),this.ui.loadinfo.value=100*this.accTime,this.accTime>=1&&this.loadSubOk&&!Za.isAdvise&&(this.beginLoadRes||(this.beginLoadRes=!0,this.ui.txtLoad.text="Loading...",this.curNum=0,this.accTime=0,this.loadRes()),this.loadResOK&&(this.openLoading=!1,Laya.timer.once(300,this,()=>{Ea.common.d3Scene.active=!1,Za.showAgree(enterGame)}))))}release(){}hide(){super.hide(),this.release()}onClose(){this.hide()}}Qa.uiName="UILoading";class th extends A{constructor(){super(),this.viewType=0,this.regretType=0}onConstructor(){this.ui=ee.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.regretNode.cancelBtn,this.hideSelf),this.addUIClick(this.ui.regretNode.videoBtn,this.videoRegret),this.addUIClick(this.ui.helpLineNode.cancelBtn,this.hideSelf),this.addUIClick(this.ui.helpLineNode.videoBtn,this.videoAddHelpLine)}show(t,e,i){if(Y.showInsert(!0),this.viewType=t,this.regretType=e,this.callback=i,super.show(),this.ui.t0.play(),this.ui.c1.selectedIndex=this.viewType,this.ui.regretNode.tipsTxt.text=0==this.regretType?"Missed the target ball!":"The cue ball has been pocketed!",0==this.viewType){let t=Wa.getGuideHelpLine();this.ui.helpLineNode.c1.selectedIndex=0==t?1:0,this.ui.helpLineNode.videoBtn.c1.selectedIndex=0==t?1:0}Ea.common.gameMgr.gamePause=!0}hideSelf(){Ea.common.gameMgr.gamePause=!1,this.callback&&this.callback(!1),this.hide()}videoRegret(){console.log("zh:qjff_AD_for_UIrepentProp_videoRegret"),H.instance.showRewardAd("qjff_AD_for_UIrepentProp_videoRegret")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIrepentProp_videoRegret())}qjff_AD_for_UIrepentProp_videoRegret(){this.callback&&this.callback(!0),this.hideSelf()}videoAddHelpLine(){if(0==Wa.getGuideHelpLine())this.callback&&this.callback(!0),this.hideSelf(),Wa.setGuideHelpLine(),Ea.common.gameUI.ui.guideNode.visible=!1;else{if(console.log("zh:qjff_AD_for_UIrepentProp_videoAddHelpLine"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIrepentProp_videoAddHelpLine")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIrepentProp_videoAddHelpLine())}}qjff_AD_for_UIrepentProp_videoAddHelpLine(){this.callback&&this.callback(!0),this.hideSelf()}}th.uiName="UIRepentProp";class eh extends A{constructor(){super(),this.isPressd=!1}onConstructor(){this.ui=Ie.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.sureBtn,this.closeSelf),this.moveDir=new Laya.Vector2,this.moveDest=new Laya.Vector2,this.centerPos=new Laya.Vector2,Ea.common.uiRodMethod=this}show(){super.show(),Ea.common.gameMgr.gamePause=!0,this.openPressDotEvent(),this.gameRod=Ea.common.gameUI.ui.rodMethodNode,this.centerPos.x=this.ui.white.x,this.centerPos.y=this.ui.white.y,this.moveDest.x=this.centerPos.x-Ea.common.rodOffest.x,this.moveDest.y=this.centerPos.y-Ea.common.rodOffest.y,this.setDot()}setDot(){this.ui.dot.x=this.moveDest.x,this.ui.dot.y=this.moveDest.y}closeSelf(){Ea.common.rodOffest.x=this.centerPos.x-this.moveDest.x,Ea.common.rodOffest.y=this.centerPos.y-this.moveDest.y,this.gameRod.dot.x=this.gameRod.bg.x-Ea.common.rodOffest.x,this.gameRod.dot.y=this.gameRod.bg.y-Ea.common.rodOffest.y,Ea.common.gameMgr.gamePause=!1,this.hide()}openPressDotEvent(){this.closePressDotEvent(),this.ui.dot.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_DOWN,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_MOVE,this,this.onDown),this.ui.white.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.on(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.on(Laya.Event.MOUSE_MOVE,this,this.onDown)}closePressDotEvent(){this.ui.dot.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_DOWN,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_MOVE,this,this.onDown),this.ui.white.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.off(Laya.Event.MOUSE_UP,this,this.onDown),this.ui.off(Laya.Event.MOUSE_MOVE,this,this.onDown)}onDown(t){if(t.type==Laya.Event.MOUSE_DOWN?this.isPressd=!0:t.type==Laya.Event.MOUSE_UP&&this.isPressd&&(this.isPressd=!1),!this.isPressd)return;this.moveDest.x=t.stageX,this.moveDest.y=t.stageY,Ea.tools.getV2SqDis(this.moveDest,this.centerPos)>6724&&(this.moveDir=Ea.tools.getV2Dir(this.centerPos.x,this.centerPos.y,t.stageX,t.stageY,this.moveDir),this.moveDest=Ea.tools.getV2Dest(this.centerPos.x,this.centerPos.y,this.moveDir,82,this.moveDest)),this.setDot()}resetRod(){this.ui.dot.x=this.ui.white.x,this.ui.dot.y=this.ui.white.y,this.gameRod.dot.x=this.gameRod.bg.x,this.gameRod.dot.y=this.gameRod.bg.y,Ea.common.rodOffest.x=0,Ea.common.rodOffest.y=0}}eh.uiName="UIRodMethod";class ih extends A{constructor(){super()}onConstructor(){this.ui=Wt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.isMuti=!0}show(t,e){super.show(),this.ui.tipsNode.msgTxt.text=t,this.ui.alpha=1,Laya.Tween.to(this.ui,{alpha:0},500,null,Laya.Handler.create(this,()=>{this.hide(),e&&e()}),1e3)}}ih.uiName="UIMsg";class sh extends A{constructor(){super(),this.type=0}onConstructor(){this.ui=he.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.clickLeftBtn),this.addUIClick(this.ui.myNode.sureBtn,this.clickRightBtn)}show(t,e,i){switch(super.show(),this.ui.t0.play(),this.ui.myNode.tipsTxt.text=t,this.ui.myNode.womanTxt.text=e,Y.showInsert(!0),this.ui.myNode.c1.selectedIndex=i,this.type=i,this.type){case L.exitGame:Ea.common.gameMgr.gamePause=!0;break;case L.foul:Laya.timer.once(200,this,()=>{Ea.common.gameMgr.gamePause=!0})}}clickLeftBtn(){switch(this.hide(),Ea.common.gameMgr.gamePause=!1,this.type){case L.exitGame:case L.foul:}}clickRightBtn(){switch(this.hide(),this.type){case L.exitGame:Ea.eventMgr.event(r),Ea.uiMgr.Show(Dh),Moyu.recordEnd(this,null),Ea.common.longHelpLine=!1;break;case L.foul:Ea.common.gameMgr.gamePause=!1,Laya.timer.clearAll(this)}}}sh.uiName="UITips";class oh extends A{constructor(){super(),this.powerNum=0,this.isD3Inited=!1,this.isPrePlay=!1,this.isMoveRod=!1,this.eventObj={curX:0,curY:0,lastX:0,lastY:0,starX:0,starY:0},this.rulerDis=20,this.rulerOffset=0}onConstructor(){this.ui=ht.createInstance(),this.contentPane=this.ui,this.ui.x+=Ea.common.sysOffestNum,this.ui.border.alpha=Ea.common.showDebug?1:0,this.isEject=!1,Ea.common.gameUI=this,this.initSelf()}isTurnSelf(){if(!Ea.common.d2World.openCheckStill&&Ea.common.gameMgr.selfTurn&&Ea.common.gameMgr.finishOneShoot)return!0}initSelf(){let t=this.ui.topNode;t.selfBallList.itemRenderer=Laya.Handler.create(this,this.renderSelfDisplayBalls,null,!1),t.aiBallList.itemRenderer=Laya.Handler.create(this,this.renderAIDisplayBalls,null,!1),this.barInfo={},this.barInfo.curY=0,this.barInfo.height=this.ui.powerNode.height,this.barInfo.showStarY=this.ui.powerNode.showImg.y,this.barInfo.powerStartY=this.ui.powerNode.y,Ea.common.aiPlayer=new J,Ea.common.gameMgr=new re,Ea.common.skillMgr=new me,Ea.common.wordsMgr=new be,Ea.common.talkMgr=new Ce,Ea.common.classicEmotionSpine=new q("yxz_bqwz",()=>{console.log("加载经典模式表情文件chenggon !")}),Ea.common.awardSpine=new q("jinbi",()=>{console.log("挑战模式奖励模式spine加载成功!")}),Ea.eventMgr.off(r,this,this.resetGame),Ea.eventMgr.on(r,this,this.resetGame),this.addUIClick(this.ui.rodMethodNode,this.addRodMethodClick),this.addUIClick(this.ui.returnBtn,this.returnHome),this.addUIClick(this.ui.helpBtn,this.clickHelpLineBtn),this.addUIClick(this.ui.placeChallengeNode.helpLineBtn,this.clickHelpLineBtn),this.addUIClick(this.ui.placeNormalNode.helpLineBtn,this.clickHelpLineBtn)}getGanZiImg(){let t=Wa.getCurBallRod(),e=cfgTable.ballrodData[t+1],i=Ea.common.getGameIconUrl(e.img);console.log("zh:getGanZiImg gan_url=="+i),this.ui.powerNode.showImg.url=i,console.log("zh:修改杆子图标O K")}returnHome(){Ea.uiMgr.Show(sh,"Are you sure to exit the game?","Boss, why don't you play for a while longer?",L.exitGame)}addRodMethodClick(){this.isTurnSelf()&&Ea.uiMgr.Show(eh)}clickHelpLineBtn(t=!1){this.isTurnSelf()&&Ea.uiMgr.Show(th,0,0,t=>{t&&(Ea.common.longHelpLine=!0,Ea.common.d2World.getHelpLine(),Moyu.sendDataEvent("guideNum"))})}renderSelfDisplayBalls(t,e){let i="q"+Ea.common.gameMgr.selfBallArr[t];e.myImg.url=Ea.common.getGameIconUrl(i)}renderAIDisplayBalls(t,e){let i="q"+Ea.common.gameMgr.aiBallArr[t];e.myImg.url=Ea.common.getGameIconUrl(i)}updateMode(){Ea.common.gameMode==C.classic?this.ui.topNode.scoreNode.visible=!1:Ea.common.gameMode==C.bigMove&&(this.ui.topNode.scoreNode.visible=!0)}show(){super.show(),console.log("zh:uigame show AADD"),this.ui.alpha=0,this.updateSelf(),Ea.common.gameMgr.gamePause=!1,Ea.common.gameUI.ui.blackAni.visible=!1,Ea.common.gameUI.ui.whiteAni.visible=!1,this.ui.powerEft.visible=!1,this.ui.colorNode.visible=!1,this.updateHead();let t=Wa.getCurBallRod();console.log("zh:UIGame 选择的球杆234 = "+t),this.getGanZiImg()}updateSelf(){if(Ea.common.gameMode==C.classic)this.ui.c1.selectedIndex=0,this.ui.topNode.middleNode.c1.selectedIndex=0,this.ui.topNode.middleNode.visible=!0,this.ui.topNode.middleNode.awardTxt.text=Ea.common.passAwardCoin+"";else if(Ea.common.gameMode==C.bigMove){this.ui.c1.selectedIndex=0,this.ui.topNode.middleNode.c1.selectedIndex=1,this.ui.topNode.middleNode.visible=!1;let t=Ea.cfgMgr.getMaxBigMoveLength(),e=Ea.common.randomNum(1,t);0==Wa.getSkillGuide()&&(e=1),Ea.common.bigMoveLevelIndex=e}else if(Ea.common.gameMode==C.placeBall){let t=cfgTable.placeballData[Ea.common.placeBallCurLevel];this.ui.c1.selectedIndex=1+t.type,this.ui.alpha=1,this.startGame()}this.updateMode(),this.initD3world(),this.initD2world()}startGame(){this.ui.snowNode.visible=Math.random()<=.1,this.ui.d2Node.visible=!1,Ea.common.d3World.d3Hand.gameObj.active=!1,Ea.common.d3World.tableSrc.init(),Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=.06,this.cameraViewChange(()=>{switch(Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=0,Ea.common.gameMode){case C.classic:Ea.common.d3World.d3Hand.gameObj.active=!0,this.playPutBallD3Ani();break;case C.bigMove:this.enterGame(),Laya.timer.once(500,this,()=>{this.ui.topNode.middleNode.visible=!0,this.ui.topNode.middleNode.t0.play()});break;case C.placeBall:this.enterGame()}}),Y.showBanner(!1)}enterGame(){this.ui.d2Node.visible=!0,Ea.common.d3World.d3Hand.gameObj.active=!1,Ea.common.showOneCamera("mainCamera"),Moyu.recordGame(30,!0),this.isPrePlay||(this.isPrePlay=!0,Ea.common.d3World.prePlayEft()),Ea.common.gameMgr.gameReady(),this.openAllEvent(),this.ui.snowNode.visible=!1;let t=Ea.common.gameMode!=C.bigMove&&1==Wa.getGuideHelpLine();this.ui.helpBtn.visible=t}showHelpLineGuide(){let t=Wa.getGuideHelpLine();Ea.common.gameMode==C.classic&&0==t&&(this.ui.helpBtn.visible=!0,this.ui.guideNode.visible=!0)}setTurnAlpha(t){this.ui.keduNode.alpha=t,this.ui.ganNode.alpha=t,this.ui.rodMethodNode.alpha=t,this.ui.helpBtn.alpha=t?1:0}cameraViewChange(t){Ea.common.d3World.tableSrc.gameObj.transform.localPositionY=.06;let e=Ea.common.d3World.cameraObj.visitAngle.transform;Ea.common.showOneCamera("visitAngle"),e.localRotationEulerY=180,e.localRotationEulerZ=0,Laya.Tween.to(e,{localRotationEulerY:0},3e3,null,Laya.Handler.create(this,()=>{Laya.Tween.to(e,{localRotationEulerZ:-70},800,null,Laya.Handler.create(this,()=>{t&&t()}))}))}playPutBallD3Ani(){Ea.common.showOneCamera("mainCamera");let t=Ea.common.d3World.d3Hand;t.gameObj.active=!0,t.transform.localPositionZ=3,Laya.Tween.to(t,{posZ:0},500,Laya.Ease.sineIn,Laya.Handler.create(this,()=>{Laya.Tween.to(t,{posZ:10},400,null,Laya.Handler.create(this,()=>{t.gameObj.active=!1,this.enterGame()}),400)}))}updateHead(){let t=Moyu.getUserInfo();this.ui.topNode.selfNameTxt.text=t.nickName,Ea.common.createHead(this.ui.topNode.selfHeadLoader,t.headIcon,80);let e=Ea.cfgMgr.getRandomUserInfo();if(Wa.getSkillGuide()<1)this.ui.topNode.aiNameTxt.text="billiards",this.ui.topNode.aiHeadLoader.url="res/icon.png";else{this.ui.topNode.aiNameTxt.text=e.name;let t=Math.floor(10*Math.random())+1;this.ui.topNode.aiHeadLoader.url="res/playersImg/"+t+".png"}}initD2world(){let t=this.ui.d2Root.displayObject;t.getComponent(at)||(Ea.common.d2World=t.addComponent(at)),Ea.common.d2World.initSelf()}initD3world(){if(this.isD3Inited)return;this.isD3Inited=!0;let t=Ea.common.d3Scene;this.ui.d3Root.displayObject.addChild(t),t.active=!0,Ea.common.d3World.tableSrc.setBorderPos()}onRootMove(t){let e=Ea.common.d2World.rootBall;this.ui.moveNode.x=t.x,this.ui.moveNode.y=t.y,e.gameObj.x=t.x,e.gameObj.y=t.y,e.d3BallSrc.setTransPos(t.x,t.y)}aiRootMove(t){t?this.hideBallUI():(this.showBallUI(),Ea.common.d2World.getHelpLine())}aiForce(t,e=0){this.pressTarget=k.powerNode,1==t?this.onEventUp({force:!0}):2==t&&this.onEventMove({stageY:e,force:!0})}onEventPress(t){if(t.stopPropagation&&t.stopPropagation(),!this.isTurnSelf())return;switch(t.target){case this.ui.myPowerNode.displayObject:this.pressTarget=k.powerNode,this.barInfo.curY=t.stageY,this.updateBarInfo();break;case this.ui.moveNode.displayObject:this.pressTarget=k.moveNode,this.hideBallUI(),this.eventObj.curX=this.ui.moveNode.x,this.eventObj.curY=this.ui.moveNode.y,this.ui.moveNode.finger.visible=!1,this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY;break;case this.ui.rulerClickNode.displayObject:this.pressTarget=k.rulerNode,this.eventObj.lastY=t.stageY;break;case this.ui.d2Root.displayObject:this.pressTarget=k.d2Root,this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY,this.eventObj.starX=t.stageX,this.eventObj.starY=t.stageY,this.eventObj.curX=0,this.eventObj.curY=0,Ea.common.d2World.d2Gan.setGanLastInfo(),this.rulerOffset=0}}onEventMove(t){if(t.stopPropagation&&t.stopPropagation(),t&&t.force);else if(!this.isTurnSelf())return;switch(this.pressTarget){case k.powerNode:this.barInfo.curY=t.stageY,this.updateBarInfo(),this.isMoveRod=!0;break;case k.moveNode:let e=Ea.common.d2World.rootBall,i=e.gameObj.width/2,s=this.eventObj.curX+t.stageX-this.eventObj.lastX,o=this.eventObj.curY+t.stageY-this.eventObj.lastY,n=Ea.common.d2World.borderRect;s<=n.x+i?s=n.x+i:s>=n.x+n.width-i&&(s=n.x+n.width-i),o<=n.y+i?o=n.y+i:o>=n.y+n.height-i&&(o=n.y+n.height-i),Ea.common.gameMgr.isOpenBall&&s>=n.x+n.openBallW-i&&(s=n.x+n.openBallW-i),this.ui.moveNode.x=s,this.ui.moveNode.y=o,e.gameObj.x=s,e.gameObj.y=o,e.d3BallSrc.setTransPos(s,o),this.isMoveRod=!0;break;case k.rulerNode:let a=t.stageY-this.eventObj.lastY;this.eventObj.lastY=t.stageY;let h=this.ui.rulerNode.img1,l=this.ui.rulerNode.img2;h.y+=a,l.y+=a,this.rulerOffset+=a,Math.abs(this.rulerOffset)>=this.rulerDis&&(this.rulerOffset=0,Ea.soundMgr.playSound("inch",1,10)),Ea.common.d2World.d2Gan.rotateSelf(a,!0);let r=h.height;if(this.checkGuide(),this.isMoveRod=!0,h.y>=r)return h.y=-r,void(l.y=0);if(h.y<=-r)return h.y=r,void(l.y=0);if(l.y>=r)return l.y=-r,void(h.y=0);if(l.y<=-r)return l.y=r,void(h.y=0);break;case k.d2Root:this.eventObj.curX=t.stageX,this.eventObj.curY=t.stageY;let c=this.checkRodMoveDir();Ea.common.d2World.d2Gan.rotateSelf(c),this.eventObj.lastX=t.stageX,this.eventObj.lastY=t.stageY}}onEventUp(t){if(t.stopPropagation&&t.stopPropagation(),t&&t.force);else if(!this.isTurnSelf())return;switch(this.pressTarget){case k.powerNode:if(this.ui.powerNode.value=0,this.ui.powerNode.showImg.y=this.barInfo.showStarY,this.ui.powerTxt.text="",this.powerNum>0){Ea.eventMgr.event(h),Ea.common.d2World.shoot(this.powerNum),Ea.common.d2World.d2Gan.shoot(),Ea.common.d2World.d2HelpLine.shoot(),this.finishGuide(),this.ui.powerEft.visible=!1,this.ui.colorNode.visible=!1;let t="";t=this.powerNum<=30?"gan_30":this.powerNum<=60?"gan_50":"gan_80",Ea.soundMgr.playSound(t)}break;case k.moveNode:let e=Ea.common.d2World.rootBall,i=Ea.common.gameMgr.lastRootBallPos.x,s=Ea.common.gameMgr.lastRootBallPos.y;this.judgeBallIntersect()?(this.ui.moveNode.x=i,this.ui.moveNode.y=s,e.gameObj.x=i,e.gameObj.y=s,e.d3BallSrc.setTransPos(i,s),Ea.uiMgr.Show(ih,"Incorrect placement position")):(Ea.common.gameMgr.lastRootBallPos.x=e.gameObj.x,Ea.common.gameMgr.lastRootBallPos.y=e.gameObj.y),this.showBallUI(),this.ui.moveNode.finger.visible=!0,Ea.common.d2World.getHelpLine();break;case k.rulerNode:break;case k.d2Root:Math.pow(this.eventObj.starX-t.stageX,2)+Math.pow(this.eventObj.starY-t.stageY,2)<=25&&this.moveToClickDot(t)}this.pressTarget=-1}checkGuide(){0==Wa.getSkillGuide()&&Ea.common.gameMode==C.bigMove&&1==Ea.common.guideStep&&(Ea.common.guideStep++,Ea.common.gameUI.ui.guide2.visible=!1,Ea.common.gameUI.ui.guide3.visible=!0)}finishGuide(){0==Wa.getSkillGuide()&&Ea.common.gameMode==C.bigMove&&(Ea.common.guideStep=10,this.closeAllGuide(),console.log("zh: 新手引导完毕"),H.instance.logEventForAdNoParams("tutorial_complete"))}closeAllGuide(){Ea.common.gameUI.ui.guide1.visible=!1,Ea.common.gameUI.ui.guide2.visible=!1,Ea.common.gameUI.ui.guide3.visible=!1}updateBarInfo(){let t=this.ui.powerNode.y,e=(this.barInfo.curY-t)/this.barInfo.height;e>=1&&(e=1),e<=0&&(e=0),this.powerNum=Math.ceil(100*e),this.ui.powerNode.value=this.powerNum,this.ui.powerNode.showImg.y=this.barInfo.showStarY+this.powerNum/100*this.barInfo.height,this.ui.colorNode.value=this.powerNum,this.ui.powerEft.y=this.barInfo.powerStartY+this.powerNum/100*this.barInfo.height,this.ui.powerEft.visible=0!=this.powerNum,this.ui.colorNode.visible=0!=this.powerNum,this.ui.powerTxt.text=this.powerNum+"",Ea.common.d2World.d2Gan.storagePower(this.powerNum)}forceCancel(){this.ui.powerNode.value=0,this.ui.powerNode.showImg.y=this.barInfo.showStarY,this.ui.powerTxt.text=""}checkRodMoveDir(){let t=this.eventObj.lastX-Ea.common.sysOffestNum-Ea.common.d2World.rootBall.gameObj.x,e=this.eventObj.lastY-Ea.common.d2World.rootBall.gameObj.y;return t>=0&&e<=0?this.checkDir():t<0&&e<0?this.checkDir(1,-1):t<0&&e>0?this.checkDir(-1,-1):this.checkDir(-1,1)}checkDir(t=1,e=1){let i=this.eventObj.curX-this.eventObj.lastX,s=this.eventObj.curY-this.eventObj.lastY;if(0==s)return i*t;if(0==i)return s*e;let o=s/i;return Math.abs(o)>=1?s*e:i*t}judgeBallIntersect(){let t,e=Ea.common.d2World.rootBall,i=Ea.common.d2World.ballArr,s=e.gameObj.width/2,o=!1;for(let n=0;n<i.length&&((t=i[n]).number==e.number||!(o=Math.pow(e.gameObj.x-t.gameObj.x,2)+Math.pow(e.gameObj.y-t.gameObj.y,2)<=4*s*s));n++);return o}hideBallUI(){let t=Ea.common.d2World.d2Gan;t.ui.isDisposed||(t.ui.visible=!1);let e=Ea.common.d2World.d2HelpLine;e.ui.isDisposed||(e.ui.visible=!1);let i=Ea.common.d2World.rootBall;i.destroyed||(i.gameObj.active=!1)}showBallUI(){let t=Ea.common.d2World.d2Gan;t.ui.isDisposed||(t.ui.visible=!0);let e=Ea.common.d2World.d2HelpLine;e.ui.isDisposed||(e.ui.visible=!0);let i=Ea.common.d2World.rootBall;i.destroyed||(i.gameObj.active=!0)}moveToClickDot(t){if(!this.isMoveRod&&!Ea.common.clickedBall){let e=Ea.common.d2World.rootBall.gameObj,i=t.stageX-Ea.common.sysOffestNum,s=t.stageY,o=i-e.x,n=s-e.y,a=Ea.common.getfguiRotation(o,n);Ea.common.d2World.d2Gan.ui.rotation=a,Ea.common.d2World.getHelpLine()}this.isMoveRod=!1,Ea.common.clickedBall=!1}openAllEvent(){this.closeAllEvent(),this.ui.myPowerNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.moveNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.rulerClickNode.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.on(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.on(Laya.Event.MOUSE_MOVE,this,this.onEventMove),this.ui.on(Laya.Event.MOUSE_UP,this,this.onEventUp),this.ui.on(Laya.Event.MOUSE_OUT,this,this.onEventUp)}closeAllEvent(){this.ui.myPowerNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.moveNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.rulerClickNode.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.off(Laya.Event.MOUSE_DOWN,this,this.onEventPress),this.ui.off(Laya.Event.MOUSE_MOVE,this,this.onEventMove),this.ui.off(Laya.Event.MOUSE_UP,this,this.onEventUp),this.ui.off(Laya.Event.MOUSE_OUT,this,this.onEventUp)}resetGame(){this.closeAllEvent(),this.hideBallUI(),Ea.common.gameMgr.gamePause=!0}}oh.uiName="UIGame";class nh extends A{constructor(){super(),this.coinNum=2e3}onConstructor(){this.ui=rt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.hide),this.addUIClick(this.ui.myNode.videoBtn,this.videoAddCoin)}show(){super.show(),this.ui.t0.play()}videoAddCoin(){if(console.log("zh:qjff_AD_for_UIAddCoin"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIAddCoin")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIAddCoin())}qjff_AD_for_UIAddCoin(){Ea.common.playObjFlyAnim(this.coinNum,N.coin),this.hide()}}nh.uiName="UIAddCoin";class ah extends A{constructor(){super()}onConstructor(){this.ui=dt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.enterBtn,this.enterGame)}show(){super.show()}enterGame(){Ea.common.gameMode=C.classic,Wa.setChallengeTimes(1),Ea.common.passAwardCoin=2e3;let t=Ea.common.classicNiceNeddCoin;Wa.coinEnough(t)?(Wa.setCoin(-t),Ea.eventMgr.event(u,!0),Moyu.sendDataEvent("enterChallenge",{mode:Ea.common.gameMode})):Ea.eventMgr.event(u,!0),this.hide()}hide(){super.hide()}}ah.uiName="UIInvitation";class hh extends A{constructor(){super()}onConstructor(){this.ui=kt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.cancelBtn,this.hide),this.addUIClick(this.ui.myNode.videoBtn,this.videoGetPower)}show(){super.show(),this.ui.t0.play()}videoGetPower(){if(console.log("zh:qjff_AD_for_uipower"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uipower")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uipower())}qjff_AD_for_uipower(){Wa.setPower(Ea.common.videoPower,!0),Ea.eventMgr.event(p),this.hide()}}hh.uiName="UIPower";class lh extends A{constructor(){super(),this.success=!1,this.awardCoinNum=1e3,this.awardDiamondNum=10}onConstructor(){this.ui=lt.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.leftBtn,this.clickLeftBtn),this.addUIClick(this.ui.closeNode.closeBtn,this.returnHome),this.addUIClick(this.ui.rightBtn,this.clickRightBtn),this.moneyNode=new fh(this.ui.moneyNode),this.ui.talkNode.visible=!1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}updateType(){switch(Ea.common.gameMode){case C.classic:this.ui.c1.selectedIndex=this.success?0:1,this.ui.coinNode.visible=this.success,this.success?this.logEventForClassic_win():Laya.timer.once(500,this,()=>{Ea.uiMgr.Show(nh)}),this.logEventForClassic_complete(),this.ui.isGetAward.visible=!1,this.ui.leftBtn.c1.selectedIndex=3,this.ui.rightBtn.c1.selectedIndex=0,this.moneyNode.ui.c1.selectedIndex=1;break;case C.bigMove:console.log("zh:招法模式 aaaaaa bigMove"),this.ui.c1.selectedIndex=this.success?0:1,this.ui.coinNode.visible=this.success,Ea.common.gameMode==C.bigMove&&(this.success?(Wa.setSkillSuccessTimes(1,!0),Wa.setSkillAccTimes(1)):Wa.setSkillSuccessTimes(0,!1)),this.logEventForRod_complete_N(),this.success?this.logEventForRod_win():Laya.timer.once(500,this,()=>{Ea.uiMgr.Show(nh)}),this.ui.isGetAward.visible=!1,this.ui.leftBtn.c1.selectedIndex=3,this.ui.rightBtn.c1.selectedIndex=0,this.moneyNode.ui.c1.selectedIndex=1;break;case C.placeBall:if(this.ui.coinNode.visible=!1,this.success){3==Ea.common.placeBallStarNum?this.ui.c1.selectedIndex=2:this.ui.c1.selectedIndex=3;let t=Ea.common.placeBallCurLevel;t>59?this.logEventForChallenge_level_complete(t):this.logEventForChallenge_level_N(t)}else this.ui.c1.selectedIndex=4;let t=cfgTable.placeballData[Ea.common.placeBallCurLevel];t.type==w.challenge&&(this.ui.c1.selectedIndex=2),this.ui.conditionNode.conditionTxt.text=0==t.type?"Clear the table":`Pocket ${t.ball} balls `,this.updatePlaceBallBtn(),this.updatePlaceBallStarNum(),this.updatePlaceBallAwardState(),this.moneyNode.ui.c1.selectedIndex=2,this.moneyNode.checkPowerTime(),this.moneyNode.powerChange(),Wa.upRankData()}}logEventForRod_complete_N(){let t=Ea.common.curPlayerSkillType;console.log("zh:logEventForRod_complete_N 选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i=Wa.getBigSkillByIndex(t);console.log("zh:logEventForRod_complete_N level = "+i);let s="sjmd_rod_start_"+t,o={count:0,name:e};if(vt.hasJosnKey(s)){const t=vt.getItem(s);o.count=t.count+1,vt.setItem(s,o)}else vt.setItem(s,o);const n=vt.getItem(s);let a=n.count;if(console.log("zh:logEventForRod_complete_N count = "+a),a%5==0){const t=JSON.stringify(o);H.instance.logEventForAdHaveParams("rod_complete_"+n,t),H.instance.logEventForFirebase("rod_complete_"+n,t)}}logEventForRod_win(){console.log("zh:logEventForRod_win,胜利");let t=Ea.common.curPlayerSkillType;console.log("zh:logEventForRod_win 选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i=Wa.getBigSkillByIndex(t);console.log("zh:logEventForRod_win level = "+i);let s="sjmd_rod_win_"+t,o={count:1,name:e+" Lev"+i};if(vt.hasJosnKey(s)){const t=vt.getItem(s);o.count=t.count+1,vt.setItem(s,o)}else vt.setItem(s,o);const n=JSON.stringify(o);H.instance.logEventForAdHaveParams("rod_win",n)}logEventForClassic_win(){console.log("zh:logEventForClassic_win,胜利");let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_win_"+t,s={difficulty:e,classic_count:1,difficulty_count:1};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.classic_count=t.classic_count+1,s.difficulty_count=t.difficulty_count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("classic_win",o)}logEventForClassic_complete(){console.log("zh:logEventForClassic_complete,胜利");let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_complete_"+t,s={msmc:e,count:0};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.count=t.count+1,vt.setItem(i,s)}else vt.setItem(i,s);if(s.count%5==0){JSON.stringify(s);H.instance.logEventForAdNoParams("classic_complete"),H.instance.logEventForFirebase("classic_complete",null)}}updatePlaceBallBtn(){this.ui.leftBtn.c1.selectedIndex=5,this.success?this.ui.rightBtn.c1.selectedIndex=14:3==Ea.common.placeBallStarNum?this.ui.rightBtn.c1.selectedIndex=14:this.ui.rightBtn.c1.selectedIndex=1}updatePlaceBallStarNum(){let t=Ea.common.placeBallStarNum;this.ui.starNumNode.c1.selectedIndex=0==t?3:t-1}updatePlaceBallAwardState(){let t=Ea.common.placeBallCurLevel,e=Ea.common.placeBallStarNum,i=Wa.getPlaceBallLevel(t).getAward,s=cfgTable.placeballData[t].award,o=cfgTable.placeballData[t];this.awardDiamondNum=s[1],this.awardCoinNum=s[0],o.type==w.challenge&&(this.awardDiamondNum=0,this.awardCoinNum=100*Ea.common.gameMgr.finishBalls),this.ui.awardNode.diamondNode.visible=this.awardDiamondNum>0,this.ui.awardNode.coinNode.visible=this.awardCoinNum>0,o.type==w.challenge&&(this.ui.awardNode.coinNode.visible=!0),this.awardCoinNum>0&&this.awardDiamondNum>0?(this.ui.awardNode.diamondNode.x=265,this.ui.awardNode.coinNode.x=354):(this.ui.awardNode.diamondNode.x=291,this.ui.awardNode.coinNode.x=291),this.ui.awardNode.diamondNode.numTxt.text=this.awardDiamondNum+"",this.ui.awardNode.coinNode.numTxt.text=this.awardCoinNum+"",0==this.awardCoinNum&&(this.ui.awardNode.coinNode.numTxt.text=""),i?(this.ui.isGetAward.visible=!0,this.ui.awardNode.diamondNode.c1.selectedIndex=2,this.ui.awardNode.coinNode.c1.selectedIndex=2):(this.ui.isGetAward.visible=!1,3==e&&o.type==w.challenge?(this.ui.awardNode.diamondNode.c1.selectedIndex=0,this.ui.awardNode.coinNode.c1.selectedIndex=0):(this.ui.awardNode.diamondNode.c1.selectedIndex=1,this.ui.awardNode.coinNode.c1.selectedIndex=1))}show(t){super.show(),Ea.eventMgr.event(r),this.success=t,Laya.timer.clearAll(this),this.playSecretaryAni(),Moyu.sendDataEvent("GameEnd",{id:Ea.common.gameMode,res:this.success?1:2});let e=(new Date).getTime()-Ea.common.gameStartTime;e=Math.floor(e/1e3),Moyu.sendDataEvent("gameOver",{isWin:this.success?1:0,timeConsuming:e,gameType:Ea.common.gameMode}),this.updateType(),Laya.timer.once(200,this,()=>{this.addAward(()=>{this.updateType(),Laya.timer.once(500,this,()=>{this.showChallengeLevel()})})}),this.success?(H.instance.showInternAd("gameend_success"),console.log("zh:game end 成功"),Ea.soundMgr.playSound("slots_roll01"),Ea.soundMgr.playSound("s_win"),Ea.common.showGirlTalkPop(8,this.ui.talkNode,this.ui.talkNode.womanTxt),this.diyGameDataUtilForGameWin()):(H.instance.showInternAd("gameend_faill"),console.log("zh:game end失败"),Ea.soundMgr.playSound("matchwin01"),Ea.soundMgr.playSound("s_lose"),Ea.common.showGirlTalkPop(9,this.ui.talkNode,this.ui.talkNode.womanTxt));let i=Wa.getChallengeTimes();Ea.common.gameMode==C.classic&&i>=1&&i<=3&&Wa.setChallengeTimes(1),this.success&&Ea.common.gameMode==C.classic&&Wa.setClassicTimes()}diyGameDataUtilForGameWin(){switch(console.log("zh: DiyGameDataUtilForGameWin diy "),Ea.common.gameMode){case C.classic:console.log("zh:DiyGameDataUtilForGameWin 111");case C.bigMove:console.log("zh:DiyGameDataUtilForGameWin 222"),this.restartGame();break;case C.placeBall:console.log("zh:DiyGameDataUtilForGameWin 333");var t=Ea.common.placeBallCurLevel;console.log("zh:练习模式 联系了多少LEV="+t),t>Wa.getChallengeMode_overLev()&&Wa.setChallengeMode_overLev(t);break;default:console.log("zh:DiyGameDataUtilForGameWin 444")}}showChallengeLevel(){if(0!=Wa.getChallengeTimes())return;let t=Wa.getSkillAccTimes(),e=Wa.getPlaceBallLevelList().length;(t>=3||e>=5)&&(Ea.uiMgr.Show(ah),this.hide())}addAward(t){if(this.success)switch(Ea.common.gameMode){case C.classic:this.awardCoinNum=Ea.common.passAwardCoin,this.awardDiamondNum=0,Ea.common.playObjFlyAnim(this.awardCoinNum,N.coin);break;case C.bigMove:this.awardCoinNum=Ea.common.passAwardCoin,this.awardDiamondNum=0,Ea.common.playObjFlyAnim(this.awardCoinNum,N.coin),t&&t();break;case C.placeBall:let e=Ea.common.placeBallCurLevel;if(Moyu.sendDataEvent("PlaceBall",{id:e,res:this.success?1:2}),3!=Ea.common.placeBallStarNum)return void(t&&t());if(Wa.getPlaceBallLevel(e).getAward)return void(t&&t());let i=cfgTable.placeballData[e],s=cfgTable.placeballData[e].award;this.awardCoinNum=s[0],this.awardDiamondNum=s[1],i.type==w.challenge&&(this.awardDiamondNum=0,this.awardCoinNum=100*Ea.common.gameMgr.finishBalls);let o,n=new S(N.coin,this.awardCoinNum);this.awardDiamondNum>0?(o=new S(N.diamond,this.awardDiamondNum),Ea.common.getAward([o,n],t)):Ea.common.getAward([n],t),i.type==w.normal&&Wa.setPlaceBallAward(e)}else t&&t()}playSecretaryAni_old(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};if(this.success){let e=Math.random()<=.5?2:3;Ea.common.secretary.play(o,e,!1,t,()=>{Ea.common.secretary.play(o,1,!0,t)})}else Ea.common.secretary.play(o,0,!0,t)}playSecretaryAni(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};if(this.success){Ea.common.secretary.play(o,0,!0,t)}else Ea.common.secretary.play(o,0,!0,t)}restartGame(){switch(Ea.common.gameMode){case C.classic:Ea.eventMgr.event(u),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode});break;case C.bigMove:this.hide(),Ea.eventMgr.event(u),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode})}}hide(){super.hide(),Ea.common.stopGirlPop(this.ui.talkNode),Y.showBanner(!1)}returnHome(){this.hide();let t=!this.success;Ea.uiMgr.Show(Dh,t)}clickLeftBtn(){switch(Ea.common.gameMode){case C.classic:case C.bigMove:this.returnHome();break;case C.placeBall:let t=Ea.common.placeBallCurLevel;this.powerStartPlaceBallLevel(t,this.ui.leftBtn),Moyu.sendDataEvent("GameAgain",{mode:Ea.common.gameMode})}}powerStartPlaceBallLevel(t,e){Wa.powerEnough()?(e.touchable=!1,e.powerEft.t0.play(Laya.Handler.create(this,()=>{e.touchable=!0,Wa.setPower(-1),Ea.eventMgr.event(p),this.startPlaceBallLevel(t),this.logEventForChallenge_level_start(t)}))):Ea.uiMgr.Show(hh,0)}clickRightBtn(){switch(Ea.common.gameMode){case C.classic:console.log("zh:clickRightBtn 111");case C.bigMove:console.log("zh:clickRightBtn 222"),this.restartGame();break;case C.placeBall:console.log("zh:clickRightBtn 333");let t=Ea.common.placeBallCurLevel,e=Wa.getPlaceBallLevel(t);if(e.play&&!e.isCur)if(console.log("zh:clickRightBtn 333-111"),console.log("zh:当前LV="+t),60==t)Ea.uiMgr.Show(ih,"Congratulations on passing all levels."),Laya.timer.once(3e3,this,()=>{this.returnHome()});else{let e=t+1;this.powerStartPlaceBallLevel(e,this.ui.rightBtn)}else{if(console.log("zh:clickRightBtn 333-000"),Moyu.sendDataEvent("placeBallNextLevel"),console.log("zh:qjff_AD_for_uiGameEnd"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}Laya.LocalStorage.setItem("temp_qjff_AD_for_uiGameEnd_level",t+""),H.instance.showRewardAd("qjff_AD_for_uiGameEnd")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiGameEnd(t))}break;default:console.log("zh:clickRightBtn 444")}}logEventForChallenge_level_start(t){let e="sjmd_challenge_level_start",i={count:0,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const s=vt.getItem(e);t>s.level&&(i.count=s.count+1,vt.setItem(e,i))}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_start",s)}qjff_AD_for_uiGameEnd(t){Wa.setPlaceBallLevel(t,1),this.startPlaceBallLevel(t+1)}startPlaceBallLevel(t){Ea.common.gameMode=C.placeBall,Ea.common.placeBallCurLevel=t,Ea.uiMgr.Show(oh),this.hide()}logEventForChallenge_level_complete(t){let e="sjmd_challenge_level_complete",i={count:1,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const t=vt.getItem(e);i.count=t.count+1,vt.setItem(e,i)}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_complete",s)}logEventForChallenge_level_N(t){console.log("zh:logEventForChallenge_level_N "+t);let e="sjmd_challenge_level_N";if(vt.hasKey(e)){if(t>vt.getItem(e)&&vt.setItem(e,t),t%5==0){console.log("zh:每5关上报1次");let e="challenge_level_"+t;H.instance.logEventForAdNoParams(e);let i="challenge_level_"+t;H.instance.logEventForFirebase(i,null)}else console.log("zh:5 no 上报")}else vt.setItem(e,t)}}lh.uiName="UIGameEnd";class rh{constructor(){this.ui=bt.createInstance()}destroySelf(){this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose())}setParent(t){t.addChild(this.ui)}setPos(t,e){this.ui.x=t,this.ui.y=e}setUrl(t){this.ui.myImg.url=Ea.common.getGameIconUrl("q"+t)}}class ch extends A{constructor(){super(),this.firstPos=385,this.secondPos=467,this.showItemArr=[]}onFontLoaded(){try{this.ui.myNode.conditionTxt.font="arial",console.log("zh: onFontLoaded 设置arial字体成功")}catch(t){console.log("zh: constructor onFontLoaded加载arial字体失败")}}onConstructor(){this.ui=Ct.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.hide),this.moneyNode=new fh(this.ui.moneyNode),this.addUIClick(this.ui.myNode.startBtn,this.startGame)}show(t){super.show(),this.ui.t1.play(),this.level=t,this.data=cfgTable.placeballData[this.level],this.updateSelf(),this.showPreView(),this.moneyNode.ui.c1.selectedIndex=2,this.moneyNode.checkPowerTime(),this.moneyNode.powerChange()}showPreView(){let t,e;for(let e=0;e<this.showItemArr.length;e++)(t=this.showItemArr[e]).destroySelf();this.showItemArr=[];let i=Ea.cfgMgr.getPlaceBallByLevel(this.level);for(const s in i)e=i[s],(t=new rh).setParent(this.ui.myNode.displayRoot),t.setPos(e.x,e.y),t.setUrl(e.value),this.showItemArr.push(t)}updateSelf(){this.ui.myNode.levelTxt.text=`Level ${this.level}`,this.ui.myNode.modeNode.c1.selectedIndex=this.data.type,-1==this.data.ball?this.ui.myNode.conditionTxt.text="Pocket all the balls on the table":this.ui.myNode.conditionTxt.text=`Successfully pocketed ${this.data.ball} balls in total`;let t=Wa.getPlaceBallLevel(this.level).getAward,e=cfgTable.placeballData[this.level],i=this.data.award[0],s=this.data.award[1];e.type==w.challenge&&(s=0,i=100),this.ui.myNode.coinNode.visible=0!=i,this.ui.myNode.diamondNode.visible=0!=s,this.ui.myNode.coinNode.numTxt.text=i+"",e.type==w.challenge&&(this.ui.myNode.coinNode.numTxt.text=""),this.ui.myNode.diamondNode.numTxt.text=s+"",i>0&&s>0?(this.ui.myNode.diamondNode.x=385,this.ui.myNode.coinNode.x=467):(this.ui.myNode.diamondNode.x=385,this.ui.myNode.coinNode.x=385),t?(this.ui.myNode.diamondNode.c1.selectedIndex=1,this.ui.myNode.coinNode.c1.selectedIndex=1):(this.ui.myNode.coinNode.c1.selectedIndex=0,this.ui.myNode.diamondNode.c1.selectedIndex=0)}startGame(){Wa.powerEnough()?(console.log("zh:powerEnough ="+Wa.powerEnough()),this.ui.myNode.startBtn.touchable=!1,this.ui.myNode.startBtn.powerEft.t0.play(Laya.Handler.create(this,()=>{console.log("zh:startGame "),this.ui.myNode.startBtn.touchable=!0,Wa.setPower(-1),Ea.eventMgr.event(p),Ea.common.gameMode=C.placeBall,Ea.common.placeBallCurLevel=this.level,Ea.uiMgr.Show(oh),this.logEventForChallenge_level_start(this.level),Ea.uiMgr.Hide(uh),Ea.uiMgr.Hide(Dh),this.hide()}))):(console.log("zh:powerEnough 不足 ="+Wa.powerEnough()),Ea.uiMgr.Show(hh))}logEventForChallenge_level_start(t){let e="sjmd_challenge_level_start",i={count:1,"gold_balance ":Wa.getCoin(),level:t,"diamond_balance ":Wa.getDiamond()};if(vt.hasJosnKey(e)){const s=vt.getItem(e);t>s.level&&(i.count=s.count+1,vt.setItem(e,i))}else vt.setItem(e,i);const s=JSON.stringify(i);H.instance.logEventForAdHaveParams("challenge_level_start",s)}hide(){super.hide()}}ch.uiName="UILevelProp";class dh{constructor(t,e){this.index=0,this.ui=t,this.index=e,this.ui.onClick(this,this.clickSelf),this.updateSelf(),this.ui.levelTxt.text=this.index+1+"",this.ui.challenge.levelTxt.text=this.index+1+"",this.ui.special.levelTxt.text=this.index+1+""}updateSelf(){let t=this.index+1;this.data=Wa.getPlaceBallLevel(t),this.ui.starNode.c1.selectedIndex=this.data.star;let e=cfgTable.placeballData[t].type;this.data.isCur?this.ui.c1.selectedIndex=e?5:2:this.data.play?3==this.data.star?this.ui.c1.selectedIndex=0:this.ui.c1.selectedIndex=1:this.ui.c1.selectedIndex=e?4:3}clickSelf(){this.data.play&&(Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.uiMgr.Show(ch,this.index+1))}}class uh extends A{constructor(){super()}onConstructor(){this.ui=xt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.myList=this.ui.myNode.myList,this.addUIClick(this.ui.closeNode.closeBtn,this.hide),this.levelItemArr=[];let t=Ea.cfgMgr.getMaxPlaceBall();this.myList.itemRenderer=Laya.Handler.create(this,this.levelItemRender,null,!1),this.myList.numItems=t,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}levelItemRender(t,e){let i=new dh(e,t);this.levelItemArr.push(i)}show(){super.show(),this.updateLevel(),this.scrollToPlace()}updateLevel(){let t;for(let e=0;e<this.levelItemArr.length;e++)(t=this.levelItemArr[e]).updateSelf()}scrollToPlace(){let t=Ea.cfgMgr.getMaxPlaceBall(),e=Wa.getPlaceBallLevelList().length;e>=t-1&&(e=t-1),this.myList.scrollToView(e,!0,!0)}hide(){super.hide()}}uh.uiName="UILevelDisplay";class gh extends A{constructor(){super()}onConstructor(){this.ui=Ut.createInstance(),this.contentPane=this.ui,this.isEject=!1}show(t){super.show(),Y.showBanner(!0),this.callback=t;let e=Moyu.getUserInfo();switch(this.selfPot||(this.selfPot=new Laya.Point(this.ui.selfHead.x,this.ui.selfHead.y)),this.aiPot||(this.aiPot=new Laya.Point(this.ui.aiHead.x,this.ui.aiHead.y)),this.ui.awardTxt.text=Ea.common.passAwardCoin+"",this.ui.selfHead.nameTxt.text=e.nickName,Ea.common.createHead(this.ui.selfHead.headImg,e.headIcon),this.ui.aiHead.nameTxt.text="???",this.ui.aiHead.headImg.url=Ea.common.getGameIconUrl("cstx"),this.ui.selfHead.c1.selectedIndex=0,this.ui.aiHead.c1.selectedIndex=0,this.ui.selfHead.x=this.selfPot.x,this.ui.selfHead.y=this.selfPot.y,this.ui.aiHead.x=this.aiPot.x,this.ui.aiHead.y=this.aiPot.y,Ea.common.gameMode){case C.classic:break;case C.bigMove:this.initSkillData()}this.ui.t1.play(Laya.Handler.create(this,()=>{this.ui.t2.play(Laya.Handler.create(this,()=>{switch(Ea.common.gameMode){case C.classic:this.waitingPeople();break;case C.bigMove:this.skillSelectFinish(Ea.common.curPlayerSkillType)}}))}))}initSkillData(){this.skillSelectData=[];let t=Ea.common.skillIconList,e=Ea.common.skillNameList,i=Wa.getBigSkillList(),s=[b.highSpace,b.breakArmy,b.ice,b.GuanYu];for(let o=0;o<5;o++){let n={};n.skillImg=t[o],n.skillName=e[o],n.skillType=s[o],n.skillLevel=i[o],this.skillSelectData.push(n)}}getAISkillLevel(t){let e,i;return(e=(i=Ea.common.upSkillLevel?Ea.common.randomNum(-2,-1):t<=5?Ea.common.randomNum(1,3):t<=9?Ea.common.randomNum(-2,1):Ea.common.randomNum(-4,0))+t)<=1&&(e=1),e>=10&&(e=10),e}getAISkillType(){return Ea.common.randomNum(1,4)}getAISkillData(t){let e=this.skillSelectData[t].skillLevel,i=this.getAISkillLevel(e),s=this.getAISkillType()-1;return({aiLevel:i,aiType:s}={aiLevel:i,aiType:s})}skillSelectFinish(t){let e=this.getAISkillData(t);Ea.common.gameMgr.selfCurSkill=t,Ea.common.gameMgr.aiCurSkill=e.aiType,Ea.common.gameMgr.aiSkillLevelNum=e.aiLevel,this.ui.selfHead.c1.selectedIndex=1,this.ui.aiHead.c1.selectedIndex=1;let i=this.skillSelectData[t];this.ui.selfHead.skillImg.url=Ea.common.getGameIconUrl(i.skillImg);let s=Wa.getSkillGuide();this.ui.selfHead.skillTxt.text=0==s?i.skillName+" Max Level":i.skillName+"Lv."+i.skillLevel;let o=this.skillSelectData[e.aiType];this.ui.aiHead.skillImg.url=Ea.common.getGameIconUrl(o.skillImg),this.ui.aiHead.skillTxt.text=o.skillName+"Lv."+e.aiLevel,this.waitingPeople()}waitingPeople(){let t=Ea.common.randomNum(1e3,3e3);t+=1e3,Laya.timer.once(t,this,()=>{this.matchingSuccess()})}matchingSuccess(){let t=Ea.common.gameUI,e=t.ui.topNode.aiNameTxt.text,i=t.ui.topNode.aiHeadLoader.url;this.ui.aiHead.nameTxt.text=e,this.ui.aiHead.headImg.url=i,e=t.ui.topNode.selfNameTxt.text,i=t.ui.topNode.selfHeadLoader.url,this.ui.selfHead.nameTxt.text=e,this.ui.selfHead.headImg.url=i,this.ui.t3.play(Laya.Handler.create(this,()=>{this.callback&&this.callback(),this.ui.t4.play(Laya.Handler.create(this,()=>{this.destroySelf()}))}))}destroySelf(){this.callback=null,this.skillSelectData=null,this.selfPot=null,this.aiPot=null,this.ui.isDisposed||(this.ui.removeFromParent(),this.ui.dispose()),Ea.uiMgr.destroyUI(this)}}gh.uiName="UIMatching";class mh{constructor(t,e,i){this.starX=0,this.starY=0,this.index=0,this.ui=t,this.data=e,this.index=i,this.initSelf(),console.log("zh:SkillDisplay constructor this.skillData=",e)}initSelf(){this.ui.normalBtn.onClick(this,this.clickAddLevel),this.ui.nameTxt.text=this.data.name,this.ui.describeTxt.text=this.data.describe,this.ui.skillImg.url=Ea.common.getGameIconUrl(this.data.icon),this.ui.startBtn.onClick(this,this.startGame),this.updateSelf()}updateSelf(){this.checkTry();let t=Wa.getBigSkillByIndex(this.index);this.ui.c1.selectedIndex=t>=Ea.common.maxSkillLevel?1:0}checkTry(){let t=this.index,e=Wa.getBigSkillByIndex(t);null==e&&(Wa.setBigSkill(t,1,!1),e=1),this.ui.levelTxt.text="LV."+e,this.index==Wa.gameData.trySkill&&Laya.timer.currTimer<Wa.gameData.tryTime?this.ui.tryNode.visible=!0:this.ui.tryNode.visible=!1}clickAddLevel(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("UpSkill",{id:this.data.index}),console.log("zh:qjff_AD_for_skilldisplay_clickAddLevel"),H.instance.showInternAd("qjff_AD_for_skilldisplay_clickAddLevel")?this.qjff_AD_for_skilldisplay_clickAddLevel():(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_skilldisplay_clickAddLevel())}qjff_AD_for_skilldisplay_clickAddLevel(){Wa.setBigSkill(this.data.index,1),this.updateSelf(),Ea.common.upSkillLevel=!0}startGame(){if(console.log("zh:rod skill startgame"),3==this.data.index)return void alert("Coming soon!");Ea.soundMgr.playSound(Ea.common.btnClickStr);let t=Ea.common.bigMoveNeedCoin;Ea.common.passAwardCoin=2e3;let e=Wa.getSkillGuide();console.log("zh:startGame guide="+e),Ea.common.temSelfLevel=0,0==e&&(t=0,Ea.common.temSelfLevel=100),Wa.coinEnough(t)?(Wa.setCoin(-t),Ea.common.curPlayerSkillType=this.index,0==e&&(Ea.common.curPlayerSkillType=0),console.log("zh: skilldisplay 1"),Ea.uiMgr.Show(oh),Ea.uiMgr.Hide(Dh),Ea.uiMgr.Show(gh,()=>{Ea.common.gameUI.ui.alpha=1,Ea.common.gameUI.startGame(),Ea.uiMgr.Hide(yh)}),this.logEventForRod_start()):(console.log("zh: skilldisplay 2"),Ea.uiMgr.Show(ph,0),Moyu.sendDataEvent("AddCoinVideo"))}logEventForRod_start(){let t=Ea.common.curPlayerSkillType;console.log("zh:选择的技能="+t);let e="Skyfall Shot";0==t&&(e="Skyfall Shot"),1==t&&(e="Surging break"),2==t&&(e="Frost Lock");let i="sjmd_rod_start_"+t,s={count:0,name:e};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.count=t.count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("rod_start",o)}}class yh extends A{constructor(){super(),this.skillData=[]}onConstructor(){this.ui=Ht.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new fh(this.ui.moneyNode),this.initSkillData(),console.log("zh:aaaaaa1111111111"),this.addUIClick(this.ui.closeNode.closeBtn,this.returnUIMain),this.ui.skillNode.skillList.itemRenderer=Laya.Handler.create(this,this.updateSkillItem,null,!1),console.log("zh:aaaaaa22222222"),this.displayList=[],this.ui.skillNode.skillList.numItems=3,this.addUIClick(this.ui,this.interuptSecretary),this.addUIClick(this.ui.guideNode.guideBtn,this.enterGuideLevel),this.ui.talkNode.visible=!1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}show(){super.show(),this.playSecretaryIdle(),this.moneyNode.ui.c1.selectedIndex=1,Laya.timer.clearAll(this),Ea.soundMgr.playSound("s_start"),Ea.common.showGirlTalkPop(13,this.ui.talkNode,this.ui.talkNode.womanTxt);let t=Wa.getSkillGuide();this.ui.guideNode.visible=0==t;let e=this.getSkillItemByUIIndex(0);e.ui.c1.selectedIndex=0==t?1:0,this.ui.guideNode.guideBtn.visible=0==t;for(let t=0;t<this.displayList.length;t++)this.displayList[t].checkTry()}getSkillItemByUIIndex(t){for(let e=0;e<this.displayList.length;e++)if(this.displayList[e].index==t)return this.displayList[e]}enterGuideLevel(){this.getSkillItemByUIIndex(0).startGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart1")}initSkillData(){this.skillData=[];let t,e=Ea.common.skillNameList,i=Ea.common.skillIconList,s=["A strike from the sky, like a meteor tearing through the heavens—delivering a thunderous blow! ","A break shot surging like a raging tide—powerful, explosive, and straight into the pocket!","The power of frost descends—freezing the flow and taking full control of the game!"];console.log("zh:initSkillData 111111111");for(let o=0;o<e.length;o++)(t={}).name=e[o],t.icon=i[o],t.describe=s[o],t.index=o,this.skillData.push(t)}updateSkillItem(t,e){if(null==this.displayList[t]){let i;switch(t){case 0:i=1;break;case 1:i=0;break;case 2:i=2;break;case 3:i=3}let s=new mh(e,this.skillData[i],i);this.displayList.push(s)}}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}returnUIMain(){this.hide(),Ea.common.stopGirlPop(this.ui.talkNode),Ea.uiMgr.Show(Dh)}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}}yh.uiName="UISkill";class ph extends A{constructor(){super(),this.curType=""}onConstructor(){this.ui=X.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.myNode.coinBtn,this.switchBtn,["coin"]),this.addUIClick(this.ui.myNode.diamondBtn,this.switchBtn,["diamond"]),this.updateUI(),this.addUIClick(this.ui.myNode.node1,this.shareGetDiamond),this.addUIClick(this.ui.myNode.node2,this.videoGetDiamond),this.addUIClick(this.ui.myNode.node6,this.openPutBallView),this.addUIClick(this.ui.myNode.node3,this.videoGetCoin),this.addUIClick(this.ui.myNode.node4,this.convertCoin,[4]),this.addUIClick(this.ui.myNode.node5,this.convertCoin,[5])}show(t){super.show(),this.curType=0==t?"coin":"diamond",this.switchBtn(""),this.ui.t0.play(),this.ui.myNode.node1.c1.selectedIndex=Moyu.isTT?0:1,Y.showInsert(!0)}closeSelf(){this.hide()}updateUI(){let t,e,i=cfgTable.moneyData;for(const s in i)t=i[s],e=this.ui.myNode["node"+s],parseInt(s)<=2?e.diamondTxt.text="+"+t.num:(e.coinTxt.text=t.num,e.diamondTxt.text=t.get.split("_")[1]);this.updateDiamondShare()}updateDiamondShare(){let t=Wa.getShareDiamondTimes();t>=Ea.common.maxShareDiamondTimes?(this.ui.myNode.node1.shareTxt.text="Available Tomorrow",this.ui.myNode.node1.touchable=!1,Ea.uiMgr.Show(ih,"Come back tomorrow")):(this.ui.myNode.node1.shareTxt.text=`(${t}/${Ea.common.maxShareDiamondTimes})`,this.ui.myNode.node1.touchable=!0)}switchBtn(t){if(""==t)t=this.curType;else{if(this.curType==t)return;this.curType=t}"coin"==t?(this.ui.myNode.coinBtn.c1.selectedIndex=0,this.ui.myNode.diamondBtn.c1.selectedIndex=1,this.ui.myNode.coinBtn.displayObject.zOrder=10,this.ui.myNode.diamondBtn.displayObject.zOrder=9,this.ui.myNode.c1.selectedIndex=0):(this.ui.myNode.coinBtn.c1.selectedIndex=1,this.ui.myNode.diamondBtn.c1.selectedIndex=0,this.ui.myNode.coinBtn.displayObject.zOrder=9,this.ui.myNode.diamondBtn.displayObject.zOrder=10,this.ui.myNode.c1.selectedIndex=1)}convertCoin(t){let e=cfgTable.moneyData[t],i=e.num,s=e.get.split("_")[1],o=parseInt(s);Wa.diamondEnough(o)?(Wa.setDiamond(-o),Ea.common.playObjFlyAnim(i,N.coin),Ea.uiMgr.Show(ih,"Exchange successful!")):(Ea.uiMgr.Show(ih,"Diamond shortage"),this.switchBtn("diamond"))}videoGetDiamond(){if(console.log("zh:qjff_AD_for_uiAddProp_videoGetDiamond"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_videoGetDiamond")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_videoGetDiamond())}qjff_AD_for_uiAddProp_videoGetDiamond(){let t=cfgTable.moneyData[2].num;Ea.common.playObjFlyAnim(t,N.diamond),this.closeSelf()}videoGetCoin(){if(console.log("zh:qjff_AD_for_uiAddProp_videoGetCoin"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_videoGetCoin")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_videoGetCoin())}qjff_AD_for_uiAddProp_videoGetCoin(){Ea.common.playObjFlyAnim(2e3,N.coin),this.closeSelf()}shareGetDiamond(){if(Wa.getShareDiamondTimes()>=Ea.common.maxShareDiamondTimes)console.log("zh: 233333333333 maxShareDiamondTimes"),Ea.uiMgr.Show(ih,"Come back tomorrow");else{if(console.log("zh:33333333333333ad"),console.log("zh:qjff_AD_for_uiAddProp_shareGetDiamond"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uiAddProp_shareGetDiamond")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uiAddProp_shareGetDiamond())}}qjff_AD_for_uiAddProp_shareGetDiamond(){let t=Ea.common.randomNum(50,100);Ea.common.playObjFlyAnim(t,N.diamond),Wa.setShareDiamondTimes(1),this.updateDiamondShare()}openPutBallView(){let t=Ea.uiMgr.getUI(lh),e=Ea.uiMgr.getUI(yh),i=Ea.uiMgr.getUI(uh),s=Ea.uiMgr.getUI(oh);t&&!t.isHide&&(Ea.uiMgr.Hide(lh),Ea.uiMgr.Show(Dh)),e&&!e.isHide&&Ea.uiMgr.Hide(yh),s&&!s.isHide&&Ea.uiMgr.Hide(oh),i&&!i.isHide||Ea.uiMgr.Show(uh),this.closeSelf()}}ph.uiName="UIAddProp";class fh{constructor(t){this.leftTime=0,this.ui=t,this.ui.addCoinBtn.onClick(this,this.addCoin),this.ui.addDiamondBtn.onClick(this,this.addDiamond),this.ui.addPowerBtn.onClick(this,this.addPower),this.ui.c1.selectedIndex=1,Ea.eventMgr.on(c,this,this.coinChange),Ea.eventMgr.on(d,this,this.diamondChange),Ea.eventMgr.on(y,this,this.powerChange),Ea.eventMgr.on(p,this,this.checkPowerTime),this.coinChange(),this.diamondChange(),this.powerChange()}addPower(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Ea.uiMgr.Show(hh)}powerChange(){let t=Wa.getPower();this.ui.powerTxt.text=t+""}checkPowerTime(){let t=(new Date).getTime(),e=Wa.getPowerTime();0==e&&(e=t,Wa.setPowerTime(t));let i=Wa.getPower(),s=Math.floor((t-e)/(1e3*Ea.common.powerRecoverNum));if(Laya.timer.clearAll(this),i>=Ea.common.natureMaxPower)return this.ui.powerTimeTxt.text="",void Wa.setPowerTime(t);if(i+s>=Ea.common.natureMaxPower)Wa.setPower(Ea.common.natureMaxPower,!1),this.ui.powerTimeTxt.text="",Wa.setPowerTime(t);else{s>0&&(Wa.setPower(s),Wa.setPowerTime(t));let i=Math.floor((t-e-s*Ea.common.powerRecoverNum*1e3)/1e3);this.leftTime=Ea.common.powerRecoverNum-i,this.leftTime<=0&&(this.leftTime=0),this.ui.powerTimeTxt.text=Ea.common.getMSTime(this.leftTime),Laya.timer.loop(1e3,this,this.updatePowerTime)}}updatePowerTime(){this.leftTime-=1,this.ui.powerTimeTxt.text=Ea.common.getMSTime(this.leftTime),this.leftTime<=0&&this.checkPowerTime()}coinChange(){this.ui.coinTxt.text=Wa.getCoin()+""}diamondChange(){this.ui.diamondTxt.text=Wa.getDiamond()+""}addCoin(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("AddCoinBtn"),Ea.uiMgr.Show(ph,0)}addDiamond(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Moyu.sendDataEvent("AddDiamondBtn"),Ea.uiMgr.Show(ph,1)}}class xh{constructor(t){this.showSetting=!1,this.openSound=!0,this.openShake=!0,this.ui=t,this.ui.soundBtn.onClick(this,this.switchSound),this.ui.shakeBtn.onClick(this,this.switchShake),this.ui.xyBtn.onClick(this,this.onXy),this.ui.clickNode.onClick(this,this.changeSetting),this.ui.xyBtn.visible=Moyu.isVivo||Moyu.isOppo||Moyu.isOPApk||Moyu.isVVApk,this.ui.xyBtn.visible=!1,this.ui.shakeBtn.visible=!1}changeSetting(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.showSetting=!this.showSetting,this.ui.c1.selectedIndex=this.showSetting?1:0}switchSound(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.openSound=!this.openSound,Moyu.onSetting(this.openSound,this.openShake),Ea.soundMgr.onSetting(this.openSound),this.ui.soundBtn.c1.selectedIndex=this.openSound?0:1}switchShake(){Ea.soundMgr.playSound(Ea.common.btnClickStr),this.openShake=!this.openShake,Moyu.onSetting(this.openSound,this.openShake),this.ui.shakeBtn.c1.selectedIndex=this.openShake?0:1}onXy(){Ea.soundMgr.playSound(Ea.common.btnClickStr),Za.showXy(1)}}class Ch extends A{constructor(){super(),this.curKey=0}onConstructor(){this.ui=E.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new fh(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.addUIClick(this.ui.drawBtn,this.startDraw),this.initDraw(),this.initUI(),this.ui.myNode.flashNode.c1.selectedIndex=1,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}show(){super.show(),this.ui.t0.play(),this.playSecretaryIdle(),this.updateDraw(),this.checkFree(),Y.bannerDelay>0&&(this.ui.closeNode.closeBtn.visible=!1,Laya.timer.once(Y.bannerDelay,this,()=>{this.ui.closeNode.closeBtn.visible=!0})),Y.showRateBanner()}hide(){Laya.timer.clearAll(this),super.hide()}checkFree(){let t=Wa.getDailyfreeDrawTimes();this.ui.drawBtn.c1.selectedIndex=t>0?0:1}initDraw(){this.drawObj=[];let t,e=cfgTable.drawData,i=0;for(const s in e)i+=(t=e[s]).weight,this.drawObj.push(i);this.allWeight=i}initUI(){let t,e,i,s=cfgTable.drawData;for(const o in s)t=s[o],e=this.ui.myNode.rotNode["img"+o],i=this.ui.myNode.rotNode["txt"+o],e.url=Ea.common.getGameIconUrl(t.icon),i.visible=!0,t.award>2?(e.rotation=0,i.text=cfgTable.ballrodData[t.award-1].name):(e.rotation=t.rotation,i.text=t.num)}getCurkey(){let t,e=Math.random()*this.allWeight;for(let i=0;i<this.drawObj.length-1;i++)if(t=this.drawObj[i],0==i){if(e<t)return i+1}else if(e>=t&&e<this.drawObj[i+1])return i+1;return 2}startDraw(){if(Wa.getDailyfreeDrawTimes()>0)this.beginDraw(),Wa.setDailyfreeDrawTimes(0),this.checkFree();else{if(Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_chouJiang")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_chouJiang())}}qjff_chouJiang(){this.beginDraw()}beginDraw(){this.ui.myNode.flashNode.c1.selectedIndex=0,this.ui.drawBtn.touchable=!1,this.curKey=this.getCurkey(),console.log("当前key",this.curKey);let t=60*(this.curKey-1)+1080,e=this.ui.myNode.rotNode;e.rotation=0,Laya.Tween.to(e,{rotation:t},1500,Laya.Ease.cubicOut,Laya.Handler.create(this,()=>{console.log("旋转完成"),this.ui.drawBtn.touchable=!0,this.getAward()}))}getAward(){let t=cfgTable.drawData[this.curKey],e=new S;e.type=t.award,e.num=t.num,Ea.common.getAward([e],()=>{Wa.setDrawTimes(1),this.updateDraw(),this.ui.myNode.flashNode.c1.selectedIndex=1})}updateDraw(){let t=Wa.getDrawTimes(),e=Wa.getDrawAwardTimes();Math.floor(t/3)>e?(this.ui.extraNode.boxBtn.t0.play(null,-1),this.ui.extraNode.boxBtn.touchable=!0,this.ui.extraNode.tipsTxt.text="3/3",this.ui.extraNode.barNode.width=265,this.getExtraAward()):(this.ui.extraNode.boxBtn.t0.stop(),this.ui.extraNode.boxBtn.touchable=!1,this.ui.extraNode.tipsTxt.text=`${t%3}/3`,this.ui.extraNode.barNode.width=t%3*265/3);let i=cfgTable.drawData[1];if(0==e)this.ui.myNode.rotNode.img1.url=Ea.common.getComponentUrl("s"+i.icon),this.ui.myNode.rotNode.txt1.text=cfgTable.ballrodData[i.award-1].name,this.ui.myNode.rotNode.img1.rotation=0;else{let t=i.nextid;this.ui.myNode.rotNode.img1.url=Ea.common.getGameIconUrl(t[2]),this.ui.myNode.rotNode.txt1.text=t[1],this.ui.myNode.rotNode.img1.rotation=0}}getExtraAward(){let t=Wa.getDrawTimes(),e=Wa.getDrawAwardTimes(),i=cfgTable.drawData[1],s=new S;0==e?(s.num=i.num,s.type=i.award,Ea.common.getAward([s],()=>{let e=Math.floor(t/3);Wa.setDrawAwardTimes(e),this.updateDraw()})):(s.num=parseInt(i.nextid[1]),s.type=parseInt(i.nextid[0]),Ea.common.getAward([s],()=>{let e=Math.floor(t/3);Wa.setDrawAwardTimes(e),this.updateDraw()}))}closeSelf(){this.hide()}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}}Ch.uiName="UIDraw";class bh extends A{constructor(){super(),this.showSelf=!0,this.rankType=1,this.rankList=[],this.topX=10,this.myIndex=this.topX+1,this.myStar=0}onConstructor(){this.ui=Mt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.closeBtn,this.hide),this.addUIClick(this.ui.myNode.changeBtn,this.changeSelfNode),this.addUIClick(this.ui.myNode.starBtn,this.changeList,[1]),this.addUIClick(this.ui.myNode.levelBtn,this.changeList,[2]),this.ui.myNode.myList.setVirtual(),this.ui.myNode.myList.itemRenderer=Laya.Handler.create(this,this.updateItemUI,null,!1)}show(){super.show(),this.getPaiHangBangDataFormJosnFile(),this.updateSelf(),Moyu.getUserInfo().isAuth||Moyu.initUser(this,()=>{Wa.upRankData()})}getPaiHangBangDataFormJosnFile(){const t=cfgTable.paiHangBangData.list;this.updateItemData(t)}updateSelfItem(){console.log("zh:Moyu.platType ="+Moyu.platType);let t=Moyu.getUserInfo();this.ui.myNode.selfNode.c1.selectedIndex=this.myIndex<4?this.myIndex-1:3,this.ui.myNode.selfNode.rankTxt.text=this.myIndex>this.topX?"No Rank":this.myIndex.toString(),this.myIndex>this.topX?this.ui.myNode.selfNode.rankTxt.fontSize=36:this.ui.myNode.selfNode.rankTxt.fontSize=30,this.ui.myNode.selfNode.valueTxt.text=this.myStar+"",this.ui.myNode.selfNode.nameTxt.text="myself",Ea.common.createHead(this.ui.myNode.selfNode.headNode.head.myIcon,t.headIcon)}updateItemData(t){if(this.myStar=Ea.common.getAllStarNum(),this.rankList.length<2){this.rankList=t;let e=Moyu.getUserInfo();console.log("zh:myself iuserinfo = "+JSON.stringify(e)),e.headIcon=e.headIcon;for(let i=0;i<t.length;i++){if(this.rankList[i].userId==e.userId){this.rankList.splice(i,1);break}}for(let i=0;i<t.length;i++){if(this.rankList[i].rankScore<this.myStar&&this.myIndex>this.topX){this.myIndex=i+1;let t={headIcon:e.headIcon,nickName:"myself"},s={user:t,data:{}},o={rankScore:this.myStar.toString(),userId:e.userId,userData:JSON.stringify(s)};console.log("zh:Moyu.platType = "+Moyu.platType),Moyu.platType<11&&(t.headIcon=e.headIcon,t.nickName=e.nickName),this.rankList.splice(i,0,o);break}}}this.updateSelfItem(),this.ui.myNode.myList.numItems=this.rankList.length}updateItemUI(t,e){let i=this.rankList[t],s=JSON.parse(i.userData).user;switch(e.nameTxt.text=s.nickName.toString(),e.valueTxt.text=i.rankScore,Ea.common.createHead(e.headNode.head.myIcon,s.headIcon,80),e.rankTxt.text=t+1,t){case 0:this.setImg(e,1,0,0),e.rankTxt.color="#FFC047";break;case 1:this.setImg(e,0,1,0),e.rankTxt.color="#ACACAC";break;case 2:this.setImg(e,0,0,1),e.rankTxt.color="#D09672";break;default:this.setImg(e,0,0,0),e.rankTxt.color="#496FAB"}}setImg(t,e,i,s){t.img1.visible=!!e,t.img2.visible=!!i,t.img3.visible=!!s}changeList(t){this.rankType=t,this.updateSelf()}changeSelfNode(){this.showSelf=!this.showSelf,this.updateSelf()}updateSelf(){this.ui.myNode.changeBtn.c1.selectedIndex=this.showSelf?0:1,this.ui.myNode.c2.selectedIndex=this.showSelf?0:1,this.ui.myNode.c1.selectedIndex=1==this.rankType?0:1,this.ui.myNode.levelBtn.c1.selectedIndex=1==this.rankType?1:0,this.ui.myNode.starBtn.c1.selectedIndex=1==this.rankType?0:1}}bh.uiName="UIRanking";class Ih extends A{constructor(){super(),this.curIndex=1}onConstructor(){this.ui=Ot.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.nodeObj={left:null,right:null,cur:null},this.nodeObj.cur=this.ui.myNode.gameNode3}show(){super.show(),this.ui.t0.play(),this.updateData()}addSecretarySpine(t,e){if("mishu"==e)if(this.secretarySpine1)t.displayObject.destroyChildren(),this.playWoman(this.secretarySpine1,t.displayObject);else{let e=new q("mishu",()=>{this.secretarySpine1=e,this.playWoman(this.secretarySpine1,t.displayObject)})}else if(this.secretarySpine2)t.displayObject.destroyChildren(),this.playWoman(this.secretarySpine2,t.displayObject);else{let e=new q("xiaomishu2",()=>{this.secretarySpine2=e,this.playWoman(this.secretarySpine2,t.displayObject)})}}playWoman(t,e){let i=this.ui.myNode.gameNode3.secretary.width/2,s=this.ui.myNode.gameNode3.secretary.height,o=1.5;t==this.secretarySpine2&&(o=1.2);let n={x:i,y:s,scaleX:o,scaleY:o};t.play(n,0,!0,e)}turnLeft(){this.curIndex--,this.curIndex<1&&(this.curIndex=2);let t=this.nodeObj.left,e=this.nodeObj.right,i=this.nodeObj.cur;Laya.Tween.to(t,{x:180,scaleX:.8,scaleY:.8,alpha:.3},500),Laya.Tween.to(e,{x:0,scaleX:1,scaleY:1,alpha:1},500),Laya.Tween.to(i,{x:-180,scaleX:.8,scaleY:.8,alpha:.3},500,null,Laya.Handler.create(this,()=>{this.updateData()})),this.ui.myNode.setChildIndex(e,2),this.nodeObj.left=i,this.nodeObj.right=t,this.nodeObj.cur=e}turnRight(){this.curIndex++,this.curIndex>2&&(this.curIndex=1);let t=this.nodeObj.left,e=this.nodeObj.right,i=this.nodeObj.cur;Laya.Tween.to(i,{x:180,scaleX:.8,scaleY:.8,alpha:.3},500),Laya.Tween.to(t,{x:0,scaleX:1,scaleY:1,alpha:1},500),Laya.Tween.to(e,{x:-180,scaleX:.8,scaleY:.8,alpha:.3},500,null,Laya.Handler.create(this,()=>{this.updateData()})),this.ui.myNode.setChildIndex(t,2),this.nodeObj.left=e,this.nodeObj.right=i,this.nodeObj.cur=t}updateData(){console.log("zh: updateData FFFFFFFFFF");let t,e,i=cfgTable.secretaryshopData,s=this.ui.myNode._children;for(let o=0;o<s.length;o++){t=s[o],e=i[1],t.heightTxt.text=e.height,t.foodTxt.text=e.food,t.historyTxt.text=e.history,t.nameImg.url=Ea.common.getGameIconUrl(e.nameImg),this.addSecretarySpine(t.secretary,e.spine);let n=e.id-1,a=Wa.getSecretary(n),h=Wa.getCurSecretary();a?t.purchaseBtn.c1.selectedIndex=h==n?1:2:(t.purchaseBtn.c1.selectedIndex=0,t.purchaseBtn.diamondTxt.text=e.price+""),t.purchaseBtn.visible=!1}}clickSecretary(t,e,i,s){if(console.log("zh: 点击了clickSecretary "),Ea.soundMgr.playSound(Ea.common.btnClickStr),t)e!=i&&(console.log(),Wa.setCurSecretary(i),this.updateData());else{console.log("zh:点击购买了");let t=s;Wa.diamondEnough(t)?(Wa.setDiamond(-t),Wa.setSecretary(i,1),Wa.setCurSecretary(i),this.updateData()):Ea.uiMgr.Show(ph,1)}}closeSelf(){this.hide()}}Ih.uiName="UISecretary";class kh{constructor(t,e){this.index=0,this.uiIndex=0,this.ui=t,this.index=e,this.initData()}initData(){this.ui.purchaseBtn.onClick(this,this.buyBallRod);let t=cfgTable.ballrodData[this.index+1];this.ui.nameTxt.text=t.name,this.ui.rodImg.url=Ea.common.getGameIconUrl(t.img),this.ui.levelNode.c1.selectedIndex=t.quality,this.ui.purchaseBtn.diamondTxt.text=t.price+"",t.spine&&(this.mySpine=new q(t.spine,()=>{let t={x:150,y:70,scaleX:1,scaleY:1};this.mySpine.play(t,0,!0,this.ui.eftRod.displayObject)}))}updateSelf(){console.log("zh:updateSelf -------------- ");let t=Wa.getBallRod(this.index);null==t&&(t=1);let e=Wa.getCurBallRod();console.log("zh:updateSelf 选择的球杆 = "+e),t?e==this.index?this.ui.purchaseBtn.c1.selectedIndex=0:this.ui.purchaseBtn.c1.selectedIndex=1:this.ui.purchaseBtn.c1.selectedIndex=2}buyBallRod(){Ea.soundMgr.playSound(Ea.common.btnClickStr);let t=this.ui.purchaseBtn.c1.selectedIndex;switch(t){case 0:break;case 1:console.log("zh:点击了 USE THIS"),Wa.setCurBallRod(this.index);let e=Wa.getCurBallRod();console.log("zh:updateSelf 选择的球杆 = "+e),Ea.uiMgr.getUI(vh).updateBallRod();break;case 2:let i=cfgTable.ballrodData[this.index+1],s=i.price;if(Wa.diamondEnough(s)){Wa.setDiamond(-s),Wa.setBallRod(this.index,1),Wa.setCurBallRod(this.index),Ea.uiMgr.getUI(vh).updateBallRod(),this.logEventForGouMaiGan(t+"-"+i.name)}else Ea.uiMgr.Show(ph,1)}}logEventForGouMaiGan(t){const e={value:t},i=JSON.stringify(e);console.log("zh:ts logEventForGouMaiGan req jsonStr="+i),H.instance.logEventForAdHaveParams("iap_start",i)}}class wh{constructor(t,e){this.index=0,this.uiIndex=0,this.ui=t,this.index=e,this.initData()}initData(){this.ui.btn_buy.onClick(this,this.buyDj);let t=cfgTable.daoJuData[this.index+1];console.log("zh:"+JSON.stringify(t)),this.ui.nameTxt.text=t.name,this.ui.n_jiaGe.text=t.price+"",this.ui.n_zuanShi.text=t.price+"",this.ui.zsImg.url=Ea.common.getGameIconUrl(t.img)}buyDj(){Ea.soundMgr.playSound(Ea.common.btnClickStr)}buyBallRod(){}logEventForGouMaiGan(t){const e={value:t},i=JSON.stringify(e);console.log("zh:ts logEventForGouMaiGan req jsonStr="+i),H.instance.logEventForAdHaveParams("iap_start",i)}}class vh extends A{constructor(){super(),this.itemNums=0,this.itemNumsForDj=0,this.curType=""}onConstructor(){this.ui=Dt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new fh(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.addUIClick(this.ui.myNode.n_qiuGan,()=>this.switchBtn("qiugan")),this.addUIClick(this.ui.myNode.n_daoju,()=>this.switchBtn("daoju")),this.addUIClick(this.ui,this.interuptSecretary),console.log("zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = "+this.renderBallRod),this.ui.myNode.myList.itemRenderer=Laya.Handler.create(this,this.renderBallRod,null,!1),this.ballRodArr=[],this.itemNums=Object.keys(cfgTable.ballrodData).length,this.ui.myNode.myList.numItems=this.itemNums,Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100),this.ui.myNode.djList.itemRenderer=Laya.Handler.create(this,this.renderDaoJu,null,!1),console.log("zh:obj="+this.ui.myNode.djList),this.daoJuArr=[],this.itemNumsForDj=Object.keys(cfgTable.daoJuData).length,this.ui.myNode.djList.numItems=this.itemNumsForDj,console.log("zh:999="+this.itemNumsForDj)}show(t){super.show(),console.log("zh:show type = "+t),this.curType=0==t?"qiugan":"daoju",this.switchBtn("qiugan"),this.playSecretaryIdle(),this.updateBallRod()}test123(){console.log("zh:test123 ")}switchBtn(t){if(console.log("zh:1111切換 sel type="+t),""==t)t=this.curType;else{if(this.curType==t)return;this.curType=t}"qiugan"==t?(this.ui.myNode.n_qiuGan.c1.selectedIndex=0,this.ui.myNode.n_daoju.c1.selectedIndex=1,this.ui.myNode.c1.selectedIndex=0,this.ui.myNode.myList.visible=!0,this.ui.myNode.djList.visible=!1):(this.ui.myNode.n_qiuGan.c1.selectedIndex=1,this.ui.myNode.n_daoju.c1.selectedIndex=0,this.ui.myNode.c1.selectedIndex=1,this.ui.myNode.myList.visible=!1,this.ui.myNode.djList.visible=!0)}updateBallRod(){for(let t=0;t<this.ballRodArr.length;t++)this.ballRodArr[t].updateSelf()}renderBallRod(t,e){let i=this.getIndexBySort(t+1)-1,s=new kh(e,i);this.ballRodArr.push(s)}renderDaoJu(t,e){let i=this.getIndexBySortForDj(t+1)-1,s=new wh(e,i);this.daoJuArr.push(s)}getIndexBySort(t){let e=cfgTable.ballrodData;for(const i in e)if(e[i].sort==t)return parseInt(i)}getIndexBySortForDj(t){let e=cfgTable.daoJuData;for(const i in e)if(e[i].sort==t)return parseInt(i)}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}closeSelf(){this.hide()}}vh.uiName="UIShop";class Nh{constructor(t){this.ui=t}updateSelf(t,e,i){let s=cfgTable.signData[t+1];this.ui.titleTxt.text=s.title;let o=s.award[0].split("-"),n=s.award[1].split("-"),a=parseInt(o[1]),h=parseInt(n[1]);this.ui.numTxt1.text=a+"",this.ui.numTxt2.text=h+"",this.ui.myIcon1.url=Ea.common.getGameIconUrl(s.icon[0]),this.ui.myIcon2.url=Ea.common.getGameIconUrl(s.icon[1]),Ea.common.signAwardContainsRod([s.award[0]])?this.ui.numTxt1.visible=!1:this.ui.numTxt1.visible=!0,Ea.common.signAwardContainsRod([s.award[1]])?this.ui.numTxt2.visible=!1:this.ui.numTxt2.visible=!0,this.ui.c1.selectedIndex=t<i?1:t==i?2:0}}class Lh{constructor(t){this.ui=t}updateSelf(t,e,i){let s=cfgTable.signData[t+1];this.ui.titleTxt.text=s.title;let o=s.award[0].split("-"),n=parseInt(o[0]),a=parseInt(o[1]);this.ui.numTxt.text=a+"",n>2?(this.ui.myIcon.url=Ea.common.getComponentUrl("s"+s.icon[0]),this.ui.myIcon.rotation=0):(this.ui.myIcon.url=Ea.common.getGameIconUrl(s.icon[0]),this.ui.myIcon.rotation=0),Ea.common.signAwardContainsRod(s.award)?this.ui.numTxt.visible=!1:this.ui.numTxt.visible=!0,this.ui.c1.selectedIndex=t<i?1:t==i?2:0}}class Sh extends A{constructor(){super(),this.curDayIndex=0,this.starX=0}onConstructor(){this.ui=At.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.moneyNode=new fh(this.ui.moneyNode),this.addUIClick(this.ui.closeNode.closeBtn,this.closeSelf),this.initSignItem(),this.addUIClick(this.ui.normalBtn,this.normalGetAward),this.addUIClick(this.ui.againBtn,this.againGetAward)}show(){super.show(),this.ui.t0.play(),this.playSecretaryIdle(),this.updateSign()}initSignItem(){this.signArr=[];for(let t=0;t<6;t++){let e=new Lh(this.ui.myNode["day"+(t+1)]);this.signArr.push(e)}this.signMax=new Nh(this.ui.myNode.day7),Moyu.isKs&&(this.ui.closeNode.closeBtn.x+=100)}updateSign(){let t=Ea.common.judgeSameDay();if(this.curDayIndex=Wa.getSignData(),(!this.curDayIndex||this.curDayIndex>=7&&!t)&&(this.curDayIndex=0),t){this.ui.normalBtn.visible=!1;let t=Wa.getExtraSign(),e=!1,i=this.curDayIndex;0==i&&(i=7);let s=cfgTable.signData[i].award[0].split("-")[0];"1"!=s&&"2"!=s||(e=!0);let o=0==t&&e;this.ui.againBtn.visible=o,this.ui.tipsNode.visible=!o}else this.ui.normalBtn.visible=!0,this.ui.tipsNode.visible=!1,this.ui.againBtn.visible=!1;for(let e=0;e<this.signArr.length;e++)this.signArr[e].updateSelf(e,t,this.curDayIndex);this.signMax.updateSelf(6,t,this.curDayIndex)}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};Ea.common.secretary.play(o,0,!0,t)}closeSelf(){this.hide()}normalGetAward(){if(!Ea.common.judgeSameDay()){let t,e,i,s=cfgTable.signData[this.curDayIndex+1].award,o=[];for(let n=0;n<s.length;n++){t=s[n].split("-"),e=parseInt(t[0]),i=parseInt(t[1]);let a=new S;a.num=i,a.type=e,o.push(a)}Ea.common.getAward(o,t=>{this.curDayIndex++,this.curDayIndex>7&&(this.curDayIndex=0),Wa.setSignData(this.curDayIndex),Wa.setSignTime((new Date).getTime()),t&&(Wa.setExtraSign(1),Moyu.sendDataEvent("signIn1")),this.updateSign()})}}againGetAward(){if(Moyu.sendDataEvent("signIn2"),console.log("zh:qjff_AD_for_uisign"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uisign")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uisign())}qjff_AD_for_uisign(){let t=this.curDayIndex;0==t&&(t=7);let e,i,s,o=cfgTable.signData[t].award;for(let t=0;t<o.length;t++)e=o[t].split("-"),i=parseInt(e[0]),s=3*parseInt(e[1]),Ea.common.playObjFlyAnim(s,i);Wa.setExtraSign(1),this.updateSign()}}Sh.uiName="UISign";class Uh extends A{constructor(){super()}onConstructor(){this.ui=Xt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.myNode.type1,this.enterGame,[1]),this.addUIClick(this.ui.myNode.type2,this.enterGame,[2]),this.addUIClick(this.ui.myNode.type3,this.enterGame,[3]),this.addUIClick(this.ui.closeBtn,this.hide),this.peopleArr=[65,990,580],this.peopleOffest=[5,10,10]}show(t){this.updateSelf(),super.show(),this.ui.t0.play(),this.callback=t}updateSelf(){let t=cfgTable.modeselectData;for(let e=1;e<=3;e++){let i=this.ui.myNode["type"+e];i.need.text=t[e].need,i.tipsTxt.text=`Min ${t[e].need} Eligible`,i.peopleTxt.text=this.getRandPeople(e-1)}}enterGame(t){console.log("zh: 进入经典模式 type: "+t),Ea.common.classicRoomType=t;let e=cfgTable.modeselectData[t],i=e.need;Ea.common.passAwardCoin=e.award,Wa.coinEnough(i)?(Wa.setCoin(-i),this.ui.myNode["type"+t].t0.play(),Laya.timer.once(200,this,()=>{this.callback&&this.callback()}),this.logEventForClassic_start()):(Moyu.sendDataEvent("AddCoinVideo"),Ea.uiMgr.Show(ph,0))}getRandPeople(t){let e=this.peopleOffest[t];return this.peopleArr[t]+Ea.common.randomNum(-e,e)}logEventForClassic_start(){let t=Ea.common.classicRoomType,e="";1==t&&(e="beginner"),2==t&&(e="expert"),3==t&&(e="master");let i="sjmd_classic_start_"+t,s={difficulty:e,classic_count:1,difficulty_count:1};if(vt.hasJosnKey(i)){const t=vt.getItem(i);s.classic_count=t.classic_count+1,s.difficulty_count=t.difficulty_count+1,vt.setItem(i,s)}else vt.setItem(i,s);const o=JSON.stringify(s);H.instance.logEventForAdHaveParams("classic_start",o)}}Uh.uiName="UIModeSelection";class Bh extends A{constructor(){super()}onConstructor(){this.ui=Kt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.btn_gotoReg,this.gotoRegPage),this.addUIClick(this.ui.btn_login,this.userLogin)}show(){super.show(),this.x=(Laya.stage.width-this.width)/2,this.y=(Laya.stage.height-this.height)/2}closeSelf(){this.hide()}userLogin(){let t=this.ui.txt_ua.text,e=this.ui.txt_up.text;if(t&&e){let i=JSON.stringify({username:t.trim(),password:e.trim(),fromMark:"app_game"});Ea.httpMgr.sendPost2025("loginForApp",i,t=>{try{console.log("zh:res = "+JSON.stringify(t));let e=t.code,i=t.msg;if(200==e){let e="userInfo",s={username:t.username,token:t.token};vt.setItem(e,s),Ea.uiMgr.Show(ih,i),this.closeSelf()}else Ea.uiMgr.Show(ih,i)}catch(t){console.log("error="+t),alert(t)}})}else Ea.uiMgr.Show(ih,"Missing information!")}gotoRegPage(){this.closeSelf(),Ea.uiMgr.Show(Mh)}}Bh.uiName="UILogin";class Mh extends A{constructor(){super()}onConstructor(){this.ui=Jt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.closeSelf),this.addUIClick(this.ui.btn_reg,this.regUser),this.addUIClick(this.ui.btn_gotoLogin,this.gotoLogin)}show(){super.show(),this.x=(Laya.stage.width-this.width)/2,this.y=(Laya.stage.height-this.height)/2}closeSelf(){this.hide()}regUser(){this.ui.lab_tip.visible=!1;let t=this.ui.txt_ua.text,e=this.ui.txt_up1.text,i=this.ui.txt_up2.text;if(t&&e&&i&&e==i){let i=JSON.stringify({username:t.trim(),password:e.trim(),fromMark:"app_game"});Ea.httpMgr.sendPost2025("registerForApp",i,t=>{try{console.log("zh:res = "+JSON.stringify(t));let e=t.code,i=t.msg;Ea.uiMgr.Show(ih,i),200==e?(this.ui.lab_tip.color="#FFFFFF",Ea.uiMgr.Show(ih,i),this.closeSelf()):(this.ui.lab_tip.color="#FF0000",Ea.uiMgr.Show(ih,i))}catch(t){console.log("error="+t),alert(t)}})}else e!=i?Ea.uiMgr.Show(ih,"Password mismatch!"):Ea.uiMgr.Show(ih,"Missing information!")}gotoLogin(){this.closeSelf(),Ea.uiMgr.Show(Bh)}}Mh.uiName="UIReg";class Th extends A{constructor(){super(),this.closeTime=0,this.closeNum=0,this.skillUrl=Ea.common.skillIconList}onConstructor(){this.ui=V.createInstance(),this.contentPane=this.ui,this.addUIClick(this.ui.myNode.cancelBtn,this.onCancel),this.addUIClick(this.ui.myNode.videoBtn,this.onTry)}show(){super.show(),this.closeNum=0,this.closeTime=15,this.ui.t0.play(),Y.showRateBanner(),this.ui.myNode.txtTime.text=this.closeTime.toString(),Laya.timer.loop(1e3,this,this.updateTime);let t=this.skillUrl[Ea.common.curPlayerSkillType];this.ui.myNode.n29.skillicon.url=Ea.common.getGameIconUrl(t),Ea.common.gameMgr.gamePause=!0}updateTime(){this.closeTime>1?(this.closeTime--,this.ui.myNode.txtTime.text=this.closeTime.toString()):this.hide()}hide(){Laya.timer.clearAll(this),Moyu.showBannerAd(!1),super.hide(),Ea.common.gameMgr.gamePause=!1}onTry(){if(console.log("zh:qjff_AD_for_uitry"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uitry")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uitry())}qjff_AD_for_uitry(){let t=Ea.common.curPlayerSkillType;Wa.gameData.trySkill=t,Wa.gameData.tryTime=Laya.timer.currTimer+3e5,Wa.saveGameData(),Wa.setBigSkill(t,1),Ea.showTip("Trial Successful"),this.hide()}onCancel(){if(this.closeNum>0)return this.closeNum--,void(this.closeNum<2&&this.hide());Y.getRand()<Y.tryVideoRate?this.onTry():Y.getRand()<Y.tryClose3Rate?this.closeNum=3:this.hide()}}Th.uiName="UITry";class Oh extends A{constructor(){super(),this.showTriple=!0}onConstructor(){this.ui=Qt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.btnNode.tripleBtn,this.tripleGetAward),this.addUIClick(this.ui.btnNode.normalBtn,this.normalGetAward),this.ui.myList.itemRenderer=Laya.Handler.create(this,this.renderItem,null,!1)}show(t,e,i){super.show(),this.ui.t0.play(),this.ui.eftNode.visible=!0,this.ui.eftNode.t0.play(Laya.Handler.create(this,()=>{this.ui.eftNode.visible=!1}),1,0,0,.9),this.awardArr=t,this.showTriple=e,this.callback=i,this.ui.btnNode.c1.selectedIndex=this.showTriple?0:1,this.ui.myList.numItems=t.length,Ea.soundMgr.playSound("getaward")}updateSelf(t,e){let i=this.awardArr[t],s=this.getIcon(i.type),o=s;i.type>2&&(o="s"+s),e.myIcon.url=Ea.common.getGameIconUrl(o),e.myIcon.rotation=0,e.numTxt.text=i.num+"",e.numTxt.visible=!(i.type>2),e.nameTxt.text=this.getNameStr(i.type)}renderItem(t,e){this.updateSelf(t,e)}tripleGetAward(){if(console.log("zh:qjff_AD_for_uigetAward"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_uigetAward")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_uigetAward())}qjff_AD_for_uigetAward(){this.getAward(3)}normalGetAward(){Y.isMisVideo()?this.tripleGetAward():this.getAward()}getAward(t=1){this.hide();for(let e=0;e<this.awardArr.length;e++)this.awardArr[e].num*=t;this.callback&&this.callback(1!=t)}getIcon(t){switch(t){case N.diamond:return"ty_zs";case N.coin:return"ty_jb";case N.gan1:return"qg1";case N.gan2:return"qg2";case N.gan3:return"qg3";case N.gan4:return"qg4"}}getNameStr(t){switch(t){case N.diamond:return"Diamond";case N.coin:return"Coins";case N.gan1:case N.gan2:case N.gan3:case N.gan4:return cfgTable.ballrodData[t-1].name}}}Oh.uiName="UIGetAward";class jh extends A{constructor(){super(),this.boxNum=0,this.boxMax=10,this.inAd=!1,this.isClose=!1}onConstructor(){this.ui=G.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addUIClick(this.ui.closeBtn,this.onCloseBox),this.addUIClick(this.ui.openBtn,this.onOpenBox),Laya.timer.loop(1e3,this,this.update)}update(){this.boxNum>0&&this.boxNum<this.boxMax&&(this.boxNum-=1,this.upBar())}upBar(){this.boxNum>this.boxMax&&(this.boxNum=this.boxMax),this.ui.bar.value=10*this.boxNum}show(){super.show(),this.isClose=!1,this.boxNum=0,this.inAd=!1,this.upBar(),this.ui.t0.play(),this.ui.closeBtn.visible=!1,Laya.timer.once(3e3,this,()=>{this.ui.closeBtn.visible=!0,this.ui.bar.alpha=1}),Laya.timer.once(500,this,()=>{this.ui.t1.play()})}hide(){Laya.timer.clearAll(this),Moyu.showBannerAd(!1),super.hide()}onOpenBox(){if(this.boxNum++,this.boxNum<this.boxMax)Y.getRand()<Y.boxInsertRate&&H.instance.showInternAd("uivideoshare_show");else if(this.boxNum==this.boxMax)Y.getRand()<Y.boxVideoRate?(this.ui.openBtn.c1.selectedIndex=13,this.inAd=!0):this.getAward();else if(this.inAd){if(console.log("zh:qjff_AD_for_UIBOX_onOpenBox"),Laya.Browser.onAndroid){if(!H.instance.getNetworkAvailable())return void H.instance.showToast2("Network error, reward unavailable")}H.instance.showRewardAd("qjff_AD_for_UIBOX_onOpenBox")||(console.log("zh:AD 失败,直接发放奖励"),this.qjff_AD_for_UIBOX_onOpenBox())}this.upBar()}qjff_AD_for_UIBOX_onOpenBox(){this.getAward()}onCloseBox(){this.isClose?this.hide():Y.getRand()<Y.boxBannerRate?(this.isClose=!0,Y.showBanner(!0,0,3e3)):this.hide()}getAward(){let t="";if(Math.random()<.5){let e=Moyu.isLegal?500:2500,i=Ea.tools.random(e,500+e);Wa.setCoin(i),t="金币x"+i}else{let e=Moyu.isLegal?10:30,i=Ea.tools.random(e,30+e);Wa.setDiamond(i),t="钻石x"+i}Ea.showTip("恭喜获得-"+t),this.hide()}}jh.uiName="UIBox";class Dh extends A{constructor(){super(),this.firstEnter=!0}nativeCallJs(t){let e=t;switch(console.log("zh: nativeCallJs 奖励开始发放:",e),e){case"qjff_chouJiang":Ea.uiMgr.getUI(Ch).qjff_chouJiang();break;case"qjff_AD_for_uisign":Ea.uiMgr.getUI(Sh).qjff_AD_for_uisign();break;case"qjff_AD_for_uitry":Ea.uiMgr.getUI(Th).qjff_AD_for_uitry();break;case"qjff_AD_for_uipower":Ea.uiMgr.getUI(hh).qjff_AD_for_uipower();break;case"qjff_AD_for_uigetAward":Ea.uiMgr.getUI(Oh).qjff_AD_for_uigetAward();break;case"qjff_AD_for_uiGameEnd":let t=Laya.LocalStorage.getItem("temp_qjff_AD_for_uiGameEnd_level");Ea.uiMgr.getUI(lh).qjff_AD_for_uiGameEnd(parseInt(t));break;case"qjff_AD_for_uiAddProp_videoGetDiamond":Ea.uiMgr.getUI(ph).qjff_AD_for_uiAddProp_videoGetDiamond();break;case"qjff_AD_for_uiAddProp_videoGetCoin":Ea.uiMgr.getUI(ph).qjff_AD_for_uiAddProp_videoGetCoin();break;case"qjff_AD_for_UIrepentProp_videoRegret":Ea.uiMgr.getUI(th).qjff_AD_for_UIrepentProp_videoRegret();break;case"qjff_AD_for_UIrepentProp_videoAddHelpLine":Ea.uiMgr.getUI(th).qjff_AD_for_UIrepentProp_videoAddHelpLine();break;case"qjff_AD_for_UIBOX_onOpenBox":Ea.uiMgr.getUI(jh).qjff_AD_for_UIBOX_onOpenBox();break;case"qjff_AD_for_UIAddCoin":Ea.uiMgr.getUI(nh).qjff_AD_for_UIAddCoin();break;case"111a":Ea.uiMgr.getUI(Sh).qjff_AD_for_uisign();break;case"222a":Ea.uiMgr.getUI(Sh).qjff_AD_for_uisign();break;case"333a":Ea.uiMgr.getUI(Sh).qjff_AD_for_uisign();break;default:console.log("zh:未知的方法名字"+e)}}onConstructor(){console.log("zh: UIMain onConstructor"),this.ui=gt.createInstance(),this.contentPane=this.ui,this.isEject=!1,this.addEvent(),this.addClickSpine(),this.settingNode=new xh(this.ui.settingNode),this.moneyNode=new fh(this.ui.moneyNode),Ea.eventMgr.on(u,this,this.beginGame),Ea.eventMgr.on(g,this,this.onGetUserInfo),Ea.eventMgr.on(m,this,this.changeSecretary);let t=Wa.getCurSecretary();this.changeSecretary(t),this.ui.talkNode.visible=!1;let e=Wa.getSkillGuide();if(Ea.common.isNewDay&&1==e&&(Ea.common.isNewDay=!1,Ea.soundMgr.playSound("s_main01"),Ea.common.showGirlTalkPop(1,this.ui.talkNode,this.ui.talkNode.womanTxt),console.log("zh:播放小秘书每天语音")),this.onGetUserInfo(),this.ui.n83.visible=!1,vt.hasJosnKey(f)){let t=vt.getItem(f).username;this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t,16)}this.c_btn_for_user(),window.nativeCallJs=this.nativeCallJs.bind(this)}Logout(){vt.hasJosnKey(f)&&(vt.removeItem(f),this.freshUser())}gotoLogin(){Ea.uiMgr.Show(Bh)}gotoRegUser(){Ea.uiMgr.Show(Mh)}c_btn_for_user(){this.ui.n_Logout.visible=!1,this.ui.n_dengLu.visible=!1,this.ui.n_zhuCe.visible=!1,vt.hasJosnKey(f)?this.ui.n_Logout.visible=!0:this.ui.n_dengLu.visible=!0}changeSecretary(t){let e=cfgTable.secretaryshopData[t+1].spine;Ea.common.secretary&&Ea.common.secretary.dispose(),this.addSecretarySpine(e)}addSecretarySpine(t){let e=new q(t,()=>{this.playSecretaryIdle()});Ea.common.secretary=e}addClickSpine(){let t=new q("dianji",()=>{Laya.stage.on(Laya.Event.CLICK,this,e=>{let i=Laya.stage,s={x:e.stageX,y:e.stageY,scaleX:.8,scaleY:.8};t.play(s,0,!1,i,t=>{t.destroy(!0)})})})}addEvent(){this.addUIClick(this.ui.classicBtn,this.startGame,[C.classic]),this.addUIClick(this.ui.bigMoveBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.ganFaMoShiBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.globalBtn,this.startGlobal),this.addUIClick(this.ui.placeBallBtn,this.startPlaceBall),this.addUIClick(this.ui.headNode,this.onGetUserInfo,[!0]),this.addUIClick(this.ui,this.interuptSecretary),this.addUIClick(this.ui.rightBtn,this.ensureSecretary),this.addUIClick(this.ui.guideBtn,this.startGame,[C.bigMove]),this.addUIClick(this.ui.secretaryBtn,this.openSecretaryView),this.addUIClick(this.ui.shopBtn,this.openShopView),this.addUIClick(this.ui.signBtn,this.openSignView),this.addUIClick(this.ui.drawBtn,this.openDrawView),this.addUIClick(this.ui.rankBtn,this.openRanking),this.addUIClick(this.ui.n_Logout,this.Logout),this.addUIClick(this.ui.n_dengLu,this.gotoLogin),this.addUIClick(this.ui.n_zhuCe,this.gotoRegUser)}show(t){if(super.show(),this.moneyNode.ui.c1.selectedIndex=1,this.playSecretaryIdle(),Ea.soundMgr.playMusic("caromhall01",0),Laya.timer.clearAll(this),this.playSecretaryRandomSound(),console.log("zh:uimain.ts show show FailWords=",t),t&&(console.log("zh:uimain.ts "),setTimeout(()=>{let t=Math.random()<=.5?"s_main02":"s_main03",e=-1;e="s_main02"==t?2:3,Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),Ea.soundMgr.playSound(t)},300)),this.showGuide(),this.ui.guideBtn.x=this.ui.liucheng2.myMask.x,this.ui.guideBtn.y=this.ui.liucheng2.myMask.y,1==Wa.getSkillGuide()){let t=Ea.common.randomNum(300,800);this.firstEnter?(console.log("zh: firstEnter"),this.firstEnter=!1,t+=900):console.log("zh: no firstEnter"),Laya.timer.once(t,this,()=>{Ea.common.autoPopUIView()})}}checkActive(t){}showGuide(){let t=Wa.getSkillGuide();this.ui.guideBtn.visible=0==t,this.ui.enterGuide.visible=!1,this.ui.secretaryGuide.visible=0==t,0==t?(console.log("zh:显示引导"),Ea.soundMgr.playSound("s_guide"),Ea.common.showGirlTalkPop(16,this.ui.talkNode,this.ui.talkNode.womanTxt)):console.log("zh:不需要显示引导")}ensureSecretary(){console.log("zh: ensureSecretary ensureSecretaryensureSecretaryensureSecretaryensureSecretaryensureSecretary"),this.ui.secretaryGuide.visible=!1,this.ui.enterGuide.visible=!0,this.ui.wordsNode.t0.play(),Wa.getNewUser()&&Moyu.sendDataEvent("gameReady")}playSecretaryIdle(){let t=this.ui.secretary.displayObject;t.destroyChildren();let e=this.ui.secretary.width/2,i=this.ui.secretary.height,s=Ea.common.getSecretaryScale(),o={x:e,y:i,scaleX:s,scaleY:s};console.log("zh:playSecretaryIdle",o),Ea.common.secretary.play(o,0,!0,t)}startGame(t){switch(Ea.common.gameMode=t,Moyu.sendDataEvent("PlayGame",{type:t}),console.log("zh:进入游戏gameMode ="+Ea.common.gameMode),Ea.common.gameMode){case C.classic:if(console.log("zh:进入经典模式111111111"),!Wa.DIY_challengeMode_overLev_jieSuo_mark){console.log("zh:不需要判断是否可以玩该classic"),0==Wa.getChallengeTimes()?Ea.uiMgr.Show(ah):this.beginGame();break}{let t=Wa.getChallengeMode_overLev();if(console.log("zh:classic db_over_lev=",t),t<Wa.DIY_challengeMode_overLev_jieSuo_Classic){console.log("zh:判断是否可以玩该模式classic =NO");let t="You must complete "+Wa.DIY_challengeMode_overLev_jieSuo_Classic+" levels in Challenge Mode to unlock Classic Mode.";return void Ea.uiMgr.Show(ih,t)}console.log("zh:可以玩该模式classic 66666666666666"),this.beginGame()}case C.bigMove:console.error("zh:bigMove check");let e=Wa.getSkillGuide();if(Wa.DIY_challengeMode_overLev_jieSuo_mark&&1==e){let t=Wa.getChallengeMode_overLev();if(console.log("zh:bigMove db_over_lev=",t),t<Wa.DIY_challengeMode_overLev_jieSuo_rodMethod){let t="Complete "+Wa.DIY_challengeMode_overLev_jieSuo_rodMethod+" levels in Challenge Mode to unlock the Rod Method Mode";return void Ea.uiMgr.Show(ih,t)}console.log("zh:可以玩该模式 bigMove"),this.beginGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart0")}else this.beginGame(),Wa.getNewUser()&&Moyu.sendDataEvent("gameStart0");break;default:console.error("zh:未知错误!!!!")}}beginGame(t=!1){console.log("zh:beginGame "),1==Wa.getSkillGuide()?(console.log("zh:非新手引导,showInternAd "),H.instance.showInternAd("beginGame")):console.log("zh:新手引导,不显示AD "),console.log("zh:beginGame 2 go"),Ea.common.gameMode==C.classic?t?this.enterClassic():Ea.uiMgr.Show(Uh,()=>{console.log("zh:BBBBBBBBBBBBBBB"),this.enterClassic()}):Ea.common.gameMode==C.bigMove&&(this.ui.enterGuide.visible=!1,Ea.uiMgr.Show(yh))}enterClassic(){Ea.uiMgr.Show(oh),Ea.uiMgr.Show(gh,()=>{this.isHide||this.hide(),Ea.common.gameUI.ui.alpha=1,Ea.common.gameUI.startGame(),Ea.uiMgr.Hide(lh)})}startGlobal(){Ea.uiMgr.Show(ih,"Coming Soon")}startWeekly(){Ea.uiMgr.Show(ih,"Coming Soon")}zhouSaiMonth(){console.log("zh: zhouSaiMonth 被调用")}startPlaceBall(){Ea.uiMgr.Show(uh)}hide(){console.log("zh:uimain hide ..."),super.hide(),Ea.common.stopGirlPop(this.ui.talkNode)}onGetUserInfo(t=!1){if(Moyu.isWx){let t=Moyu.getSystemInfo();t&&Moyu.createWXUserBtn(0,0,t.width,t.height,"res/wxuser.png",this.freshUser)}else Moyu.initUser(this,this.freshUser,t);this.freshUser()}freshUser(){let t=Moyu.getUserInfo();t.isAuth?Wa.upRankData():t.headIcon="res/ty_touxiang.png",this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t.nickName,16),Ea.common.createHead(this.ui.headNode.headRoot.headImg,t.headIcon);let e=f;if(vt.hasJosnKey(e)){let t=vt.getItem(e).username;this.ui.headNode.nameTxt.text=Ea.tools.reviseString(t,16)}this.c_btn_for_user()}interuptSecretary(){Laya.timer.clearAll(this),this.playSecretaryRandomSound()}playSecretaryRandomSound(){if(this.isHide)return;let t=Ea.common.randomNum(45e3,6e4);Laya.timer.once(t,this,()=>{if(this.isHide)return;let t=Ea.common.randomNum(4,7);Ea.soundMgr.playSound("s_main0"+t);let e=1;switch(t){case 4:e=5;break;case 5:e=3;break;case 6:e=6;break;case 7:e=7}Ea.common.showGirlTalkPop(e,this.ui.talkNode,this.ui.talkNode.womanTxt),this.playSecretaryRandomSound()})}openSecretaryView(){Ea.uiMgr.Show(Ih),Moyu.sendDataEvent("secretary")}openShopView(){Ea.uiMgr.Show(vh,0)}openSignView(){Ea.uiMgr.Show(Sh)}openDrawView(){Ea.uiMgr.Show(Ch)}openRanking(){console.log("zh:phb openRanking"),Ea.uiMgr.Show(bh),Moyu.sendDataEvent("rankingList")}}function appInit(){Ea.context.init([{url:"fgui/loading_atlas0.png",type:Laya.Loader.IMAGE},{url:"fgui/loading.obj",type:Laya.Loader.BUFFER}],initCallback)}function initCallback(){window.DataMgr=Wa,Wa.Init(),Moyu.init(function(){let t=new MoyuCfg;if(t.plat=MoyuPlat.web,t.myId=180,t.myKey="8848a885774230a4",t.version=0,window.hasOwnProperty("gamebox"))t.plat=MoyuPlat.f399,t.version=0;else if(window.hasOwnProperty("ks"))t.plat=MoyuPlat.ks,t.version=0,t.ads.ksVideoId="2300002254_01",t.ads.ksInsertId="2300002254_02";else if(Laya.Browser.onTTMiniGame)t.plat=MoyuPlat.tt,t.version=0,t.ads.ttVideoId="55lg4hiq6cl1i98a01",t.ads.ttInsertId="163l1f09abb0fm5l05",t.ads.ttBannerId="349ld7libg2l5h9a3l";else if(Laya.Browser.onMiniGame)t.plat=MoyuPlat.wx,t.ads.wxBannerId="adunit-fb4acc9e4c4d8c7c",t.ads.wxInsertId="adunit-1c0437c20853677c",t.ads.wxVideoId="adunit-51758e3d8d649e01";else if(Laya.Browser.onQQMiniGame)t.plat=MoyuPlat.qq;else if(Laya.Browser.onQGMiniGame)t.plat=MoyuPlat.op,t.ads.opVideoId="455502",t.ads.opBannerId="455507";else if(Laya.Browser.onVVMiniGame)t.plat=MoyuPlat.vv,t.version=0,t.ads.vvVideoId="405d0513a3964187bfb37aca09da5f45",t.ads.vvInsertId="72b18a69075c410986ff16e43fb2b0f0",t.ads.vvBannerId="fe2d2b92dbc144e086df5150b7d3d3d1";else if(Laya.Browser.onHWMiniGame)t.plat=MoyuPlat.hw;else if(window.mz)t.plat=MoyuPlat.mz;else{let t=window.conchConfig;if(t){var e=t.getOS();"Conch-ios"==e&&(t.plat=MoyuPlat.ios)}}return t}(),this,()=>{Wa.isNewDay(),Y.initConfig(),Ea.common.curRankID=Moyu.isWx?Ea.common.rankID.wxStar:Ea.common.rankID.normalStar},!0),console.log("zh:开始sm init1 start"),Ea.soundMgr.init(),console.log("zh:开始sm init1 end"),Ea.uiMgr.init(),Ea.uiMgr.clearTempData(),Ea.uiMgr.bindFUI(e.loading),Ea.uiMgr.Show(Qa)}function enterGame(){Ea.cfgMgr.init(),Ea.soundMgr.onSetting(Wa.userData.sound),Moyu.onSetting(Wa.userData.sound,Wa.userData.vibration),Ea.uiMgr.Hide(Qa),fgui.UIPackage.removePackage(e.loading),Ea.uiMgr.bindFUI(e.game),Ea.uiMgr.Show(Dh),Wa.getNewUser()&&Moyu.sendDataEvent("logOn",{newPlayerTime:new Date})}Dh.uiName="UIMain";new class{constructor(){window.Laya3D?Laya3D.init(t.width,t.height,null,Laya.Handler.create(this,this.initMain)):(Laya.init(t.width,t.height,Laya.WebGL),this.initMain())}initMain(){Laya.Physics&&Laya.Physics.enable(),Laya.DebugPanel&&Laya.DebugPanel.enable(),Laya.stage.scaleMode=t.scaleMode,Laya.stage.screenMode=t.screenMode,Laya.stage.alignV=t.alignV,Laya.stage.alignH=t.alignH,Laya.URL.exportSceneToJson=t.exportSceneToJson,(t.debug||"true"==Laya.Utils.getQueryString("debug"))&&Laya.enableDebugPanel(),t.physicsDebug&&Laya.PhysicsDebugDraw&&Laya.PhysicsDebugDraw.enable(),t.stat&&Laya.Stat.show(),Laya.alertGlobalError(!0),Laya.ResourceVersion.enable("version.json",Laya.Handler.create(this,this.onVersionLoaded),Laya.ResourceVersion.FILENAME_VERSION)}onVersionLoaded(){appInit()}}}();
|